@nuraly/lumenui 0.3.4 → 0.3.5

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.
@@ -2367,14 +2367,20 @@ class Ai{constructor(){this.settled=!1,this.promise=new Promise((e,t)=>{this._re
2367
2367
  }
2368
2368
 
2369
2369
  .thread-item__actions {
2370
- display: none;
2370
+ display: flex;
2371
2371
  align-items: center;
2372
2372
  gap: 2px;
2373
2373
  flex-shrink: 0;
2374
+ opacity: 0;
2375
+ pointer-events: none;
2376
+ transition: opacity 0.15s ease;
2374
2377
  }
2375
2378
 
2376
- .thread-item:hover .thread-item__actions {
2377
- display: flex;
2379
+ .thread-item:hover .thread-item__actions,
2380
+ .thread-item--active .thread-item__actions,
2381
+ .thread-item:focus-within .thread-item__actions {
2382
+ opacity: 1;
2383
+ pointer-events: auto;
2378
2384
  }
2379
2385
 
2380
2386
  .thread-item__action-btn {
Binary file
@@ -1311,14 +1311,20 @@ class rt{constructor(){this.settled=!1,this.promise=new Promise((e,t)=>{this._re
1311
1311
  }
1312
1312
 
1313
1313
  .thread-item__actions {
1314
- display: none;
1314
+ display: flex;
1315
1315
  align-items: center;
1316
1316
  gap: 2px;
1317
1317
  flex-shrink: 0;
1318
+ opacity: 0;
1319
+ pointer-events: none;
1320
+ transition: opacity 0.15s ease;
1318
1321
  }
1319
1322
 
1320
- .thread-item:hover .thread-item__actions {
1321
- display: flex;
1323
+ .thread-item:hover .thread-item__actions,
1324
+ .thread-item--active .thread-item__actions,
1325
+ .thread-item:focus-within .thread-item__actions {
1326
+ opacity: 1;
1327
+ pointer-events: auto;
1322
1328
  }
1323
1329
 
1324
1330
  .thread-item__action-btn {
@@ -8,7 +8,7 @@ import{css as t,nothing as e,html as n,LitElement as i}from"lit";import{property
8
8
  * @license
9
9
  * Copyright 2021 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */let g=f,m=!1;
11
+ */let m=f,g=!1;
12
12
  /**
13
13
  * @license
14
14
  * Copyright 2021 Google LLC
@@ -40,7 +40,7 @@ class y{constructor(){this.settled=!1,this.promise=new Promise((t,e)=>{this._res
40
40
  * @license
41
41
  * Copyright 2021 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */(e),o=t[i];if(o){if("string"==typeof o)return o;if("strTag"in o)return p(o.strings,e.values,o.values);{let t=_.get(o);return void 0===t&&(t=o.values,_.set(o,t)),{...o,values:t.map(t=>e.values[t])}}}}return f(e)}function S(t){window.dispatchEvent(new CustomEvent(u,{detail:t}))}let P,M,T,E,C,z="",O=new y;O.resolve();let I=0;const R=t=>(function(t){if(m)throw new Error("lit-localize can only be configured once");g=t,m=!0}((t,e)=>k(C,t,e)),z=M=t.sourceLocale,T=new Set(t.targetLocales),T.add(t.sourceLocale),E=t.loadLocale,{getLocale:A,setLocale:j}),A=()=>z,j=t=>{if(t===(P??z))return O.promise;if(!T||!E)throw new Error("Internal error");if(!T.has(t))throw new Error("Invalid locale code");I++;const e=I;P=t,O.settled&&(O=new y),S({status:"loading",loadingLocale:t});return(t===M?Promise.resolve({templates:void 0}):E(t)).then(n=>{I===e&&(z=t,P=void 0,C=n.templates,S({status:"ready",readyLocale:t}),O.resolve())},n=>{I===e&&(S({status:"error",errorLocale:t,errorMessage:n.toString()}),O.reject(n))}),O.promise};var D=t`
43
+ */(e),o=t[i];if(o){if("string"==typeof o)return o;if("strTag"in o)return p(o.strings,e.values,o.values);{let t=_.get(o);return void 0===t&&(t=o.values,_.set(o,t)),{...o,values:t.map(t=>e.values[t])}}}}return f(e)}function S(t){window.dispatchEvent(new CustomEvent(u,{detail:t}))}let P,M,T,E,C,z="",O=new y;O.resolve();let I=0;const R=t=>(function(t){if(g)throw new Error("lit-localize can only be configured once");m=t,g=!0}((t,e)=>k(C,t,e)),z=M=t.sourceLocale,T=new Set(t.targetLocales),T.add(t.sourceLocale),E=t.loadLocale,{getLocale:A,setLocale:j}),A=()=>z,j=t=>{if(t===(P??z))return O.promise;if(!T||!E)throw new Error("Internal error");if(!T.has(t))throw new Error("Invalid locale code");I++;const e=I;P=t,O.settled&&(O=new y),S({status:"loading",loadingLocale:t});return(t===M?Promise.resolve({templates:void 0}):E(t)).then(n=>{I===e&&(z=t,P=void 0,C=n.templates,S({status:"ready",readyLocale:t}),O.resolve())},n=>{I===e&&(S({status:"error",errorLocale:t,errorMessage:n.toString()}),O.reject(n))}),O.promise};var D=t`
44
44
  :host {
45
45
  display: block;
46
46
  width: 100%;
@@ -329,14 +329,20 @@ class y{constructor(){this.settled=!1,this.promise=new Promise((t,e)=>{this._res
329
329
  }
330
330
 
331
331
  .thread-item__actions {
332
- display: none;
332
+ display: flex;
333
333
  align-items: center;
334
334
  gap: 2px;
335
335
  flex-shrink: 0;
336
+ opacity: 0;
337
+ pointer-events: none;
338
+ transition: opacity 0.15s ease;
336
339
  }
337
340
 
338
- .thread-item:hover .thread-item__actions {
339
- display: flex;
341
+ .thread-item:hover .thread-item__actions,
342
+ .thread-item--active .thread-item__actions,
343
+ .thread-item:focus-within .thread-item__actions {
344
+ opacity: 1;
345
+ pointer-events: auto;
340
346
  }
341
347
 
342
348
  .thread-item__action-btn {
@@ -1848,9 +1854,9 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
1848
1854
  * @license
1849
1855
  * Copyright 2023 Nuraly, Laabidi Aymen
1850
1856
  * SPDX-License-Identifier: MIT
1851
- */function ht(t,i){var o,s,r,c,d,h,u,p;const f=null===(o=t.text)||void 0===o?void 0:o.includes("[ERROR_START]"),m={error:!!t.error||f,introduction:!!t.introduction,[t.sender]:!0};return n`
1857
+ */function ht(t,i){var o,s,r,c,d,h,u,p;const f=null===(o=t.text)||void 0===o?void 0:o.includes("[ERROR_START]"),g={error:!!t.error||f,introduction:!!t.introduction,[t.sender]:!0};return n`
1852
1858
  <div
1853
- class="message ${a(m)}"
1859
+ class="message ${a(g)}"
1854
1860
  part="message"
1855
1861
  data-sender="${t.sender}"
1856
1862
  data-id="${t.id}"
@@ -1864,7 +1870,7 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
1864
1870
  `}return n`${t}`}(null!==(r=null===(s=t.text)||void 0===s?void 0:s.trim())&&void 0!==r?r:""):(null===(c=null==t?void 0:t.metadata)||void 0===c?void 0:c.renderAsHtml)?l(null!==(h=null===(d=t.text)||void 0===d?void 0:d.trim())&&void 0!==h?h:""):l((null!==(p=null===(u=t.text)||void 0===u?void 0:u.trim())&&void 0!==p?p:"").replaceAll("\n","<br>"))}
1865
1871
  </div>
1866
1872
  ${t.files&&t.files.length>0?n`
1867
- <div class="message__attachments" part="message-attachments" role="list" aria-label="${g("Attached files")}">
1873
+ <div class="message__attachments" part="message-attachments" role="list" aria-label="${m("Attached files")}">
1868
1874
  ${t.files.map(t=>{return n`
1869
1875
  <nr-dropdown
1870
1876
  trigger="hover"
@@ -1916,8 +1922,8 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
1916
1922
  class="message__copy"
1917
1923
  @click=${()=>i.onCopy(t)}
1918
1924
  @keydown=${e=>i.onCopyKeydown(e,t)}
1919
- title="${g("Copy message")}"
1920
- aria-label="${g("Copy message")}"
1925
+ title="${m("Copy message")}"
1926
+ aria-label="${m("Copy message")}"
1921
1927
  role="button"
1922
1928
  tabindex="0"
1923
1929
  ></nr-icon>
@@ -1930,9 +1936,9 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
1930
1936
  part="retry-button"
1931
1937
  @click=${()=>i.onRetry(t)}
1932
1938
  @keydown=${i.onRetryKeydown}
1933
- aria-label="${g("Retry message")}"
1939
+ aria-label="${m("Retry message")}"
1934
1940
  >
1935
- ${g("Retry")}
1941
+ ${m("Retry")}
1936
1942
  </nr-button>`:e}
1937
1943
  </div>
1938
1944
  `}function ut(t,i,o,s){return n`
@@ -1941,7 +1947,7 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
1941
1947
  <div class="empty-state" part="empty-state">
1942
1948
  <slot name="empty-state">
1943
1949
  <div class="empty-state__content">
1944
- ${g("Start a conversation")}
1950
+ ${m("Start a conversation")}
1945
1951
  </div>
1946
1952
  </slot>
1947
1953
  </div>
@@ -1966,7 +1972,7 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
1966
1972
  @click=${()=>e.onClick(t)}
1967
1973
  @keydown=${e.onKeydown}
1968
1974
  data-id="${t.id}"
1969
- aria-label="${g("Select suggestion: ")}${t.text}"
1975
+ aria-label="${m("Select suggestion: ")}${t.text}"
1970
1976
  >
1971
1977
  ${t.text}
1972
1978
  </div>
@@ -2020,7 +2026,7 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2020
2026
  </nr-dropdown>
2021
2027
  `;var o})}
2022
2028
  </div>
2023
- `}function gt(t,i){return n`
2029
+ `}function mt(t,i){return n`
2024
2030
  <div class="action-buttons-row">
2025
2031
  <div class="action-buttons-left">
2026
2032
  ${t.enableFileUpload?function(t,e){return n`
@@ -2040,8 +2046,8 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2040
2046
  size="small"
2041
2047
  .icon=${["upload"]}
2042
2048
  ?disabled=${t.disabled}
2043
- aria-label="${g("Attach files")}"
2044
- title="${g("Attach files")}"
2049
+ aria-label="${m("Attach files")}"
2050
+ title="${m("Attach files")}"
2045
2051
  >
2046
2052
  Attach
2047
2053
  </nr-button>
@@ -2056,12 +2062,12 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2056
2062
  size="small"
2057
2063
  ?disabled=${t.disabled}
2058
2064
  searchable
2059
- search-placeholder="${g("Search modules...")}"
2065
+ search-placeholder="${m("Search modules...")}"
2060
2066
  use-custom-selected-display
2061
2067
  part="module-select"
2062
2068
  class="module-select"
2063
2069
  @nr-change=${e.onModuleChange}
2064
- aria-label="${g("Select modules")}"
2070
+ aria-label="${m("Select modules")}"
2065
2071
  >
2066
2072
  <span slot="selected-display">
2067
2073
  ${t.renderModuleDisplay()}
@@ -2075,10 +2081,10 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2075
2081
  <!-- Speech-to-text: mic + keyboard indicator -->
2076
2082
  <button
2077
2083
  class="audio-mic-btn"
2078
- title="${g("Record speech to text")}"
2084
+ title="${m("Record speech to text")}"
2079
2085
  ?disabled=${t.disabled}
2080
2086
  @click=${()=>{var t;return null===(t=i.onAudioStart)||void 0===t?void 0:t.call(i,"transcribe")}}
2081
- aria-label="${g("Record speech to text")}"
2087
+ aria-label="${m("Record speech to text")}"
2082
2088
  >
2083
2089
  <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
2084
2090
  <path d="M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3z"/>
@@ -2093,10 +2099,10 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2093
2099
  <!-- Voice message: mic + waveform indicator -->
2094
2100
  <button
2095
2101
  class="audio-mic-btn"
2096
- title="${g("Send voice message")}"
2102
+ title="${m("Send voice message")}"
2097
2103
  ?disabled=${t.disabled}
2098
2104
  @click=${()=>{var t;return null===(t=i.onAudioStart)||void 0===t?void 0:t.call(i,"message")}}
2099
- aria-label="${g("Send voice message")}"
2105
+ aria-label="${m("Send voice message")}"
2100
2106
  >
2101
2107
  <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
2102
2108
  <path d="M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3z"/>
@@ -2117,18 +2123,18 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2117
2123
  .iconRight=${t.isQueryRunning?"square":"arrow-up"}
2118
2124
  @click=${t.isQueryRunning?e.onStop:e.onSend}
2119
2125
  @keydown=${e.onSendKeydown}
2120
- aria-label="${t.isQueryRunning?g("Stop query"):g("Send message")}"
2121
- title="${t.isQueryRunning?g("Stop query"):g("Send message")}"
2126
+ aria-label="${t.isQueryRunning?m("Stop query"):m("Send message")}"
2127
+ title="${t.isQueryRunning?m("Stop query"):m("Send message")}"
2122
2128
  >
2123
- ${t.isQueryRunning?g("Stop"):g("Send")}
2129
+ ${t.isQueryRunning?m("Stop"):m("Send")}
2124
2130
  </nr-button>
2125
2131
  `}(t,i):e}
2126
2132
  </div>
2127
2133
  </div>
2128
- `}function mt(t,i){return t.audioRecording.active?n`
2134
+ `}function gt(t,i){return t.audioRecording.active?n`
2129
2135
  <div class="input-box" part="input-box">
2130
2136
  <div class="input-container" part="input-container">
2131
- ${function(t,e){const{duration:i,bars:o}=t.audioRecording,s="transcribe"===t.audioMode,r=g(s?"Convert to text":"Send as voice message"),a=s?n`<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
2137
+ ${function(t,e){const{duration:i,bars:o}=t.audioRecording,s="transcribe"===t.audioMode,r=m(s?"Convert to text":"Send as voice message"),a=s?n`<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
2132
2138
  <rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8M12 17v4"/>
2133
2139
  <path d="M7 10h2l2 3 2-6 2 3h2"/>
2134
2140
  </svg>`:n`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
@@ -2137,9 +2143,9 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2137
2143
  <div class="audio-recording-bar">
2138
2144
  <button
2139
2145
  class="audio-rec-cancel"
2140
- title="${g("Cancel recording")}"
2146
+ title="${m("Cancel recording")}"
2141
2147
  @click=${e.onAudioCancel}
2142
- aria-label="${g("Cancel recording")}"
2148
+ aria-label="${m("Cancel recording")}"
2143
2149
  >
2144
2150
  <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
2145
2151
  <polyline points="3 6 5 6 21 6"/>
@@ -2159,7 +2165,7 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2159
2165
  </div>
2160
2166
 
2161
2167
  <span class="audio-rec-mode-label">
2162
- ${g(s?"Speech to text":"Voice message")}
2168
+ ${m(s?"Speech to text":"Voice message")}
2163
2169
  </span>
2164
2170
 
2165
2171
  <button
@@ -2188,7 +2194,7 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2188
2194
  contenteditable="true"
2189
2195
  role="textbox"
2190
2196
  aria-multiline="true"
2191
- aria-label="${g("Chat input")}"
2197
+ aria-label="${m("Chat input")}"
2192
2198
  data-placeholder="${t.placeholder}"
2193
2199
  @input=${i.onInput}
2194
2200
  @keydown=${i.onKeydown}
@@ -2198,7 +2204,7 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2198
2204
  </div>
2199
2205
 
2200
2206
  <!-- Action buttons -->
2201
- ${gt(t,i)}
2207
+ ${mt(t,i)}
2202
2208
  </div>
2203
2209
  </div>
2204
2210
  `}
@@ -2223,13 +2229,13 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2223
2229
  @blur=${e=>{const n=e.target.value.trim();n&&n!==t.title?i.onRenameThread(t.id,n):i.onRenameThread(t.id,t.title||"")}}
2224
2230
  />
2225
2231
  `:n`
2226
- <div class="thread-item__title">${t.title||g("New Chat")}</div>
2232
+ <div class="thread-item__title">${t.title||m("New Chat")}</div>
2227
2233
  `}
2228
2234
  <div class="thread-item__actions">
2229
2235
  ${i.onRenameThread&&e.editingThreadId!==t.id?n`
2230
2236
  <button
2231
2237
  class="thread-item__action-btn"
2232
- title="${g("Rename conversation")}"
2238
+ title="${m("Rename conversation")}"
2233
2239
  @click=${e=>{e.stopPropagation(),e.target.dispatchEvent(new CustomEvent("nr-thread-edit",{bubbles:!0,composed:!0,detail:{threadId:t.id}}))}}
2234
2240
  part="thread-rename"
2235
2241
  >
@@ -2239,7 +2245,7 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2239
2245
  ${i.onBookmarkThread?n`
2240
2246
  <button
2241
2247
  class="thread-item__action-btn ${t.bookmarked?"thread-item__bookmark--active":""}"
2242
- title="${t.bookmarked?g("Remove bookmark"):g("Bookmark conversation")}"
2248
+ title="${t.bookmarked?m("Remove bookmark"):m("Bookmark conversation")}"
2243
2249
  @click=${e=>{e.stopPropagation(),i.onBookmarkThread(t.id)}}
2244
2250
  part="thread-bookmark"
2245
2251
  >
@@ -2252,10 +2258,10 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2252
2258
  `:""}
2253
2259
  ${i.onDeleteThread?n`
2254
2260
  <nr-popconfirm
2255
- title="${g("Delete this conversation?")}"
2256
- description="${g("This action cannot be undone.")}"
2257
- ok-text="${g("Delete")}"
2258
- cancel-text="${g("Cancel")}"
2261
+ title="${m("Delete this conversation?")}"
2262
+ description="${m("This action cannot be undone.")}"
2263
+ ok-text="${m("Delete")}"
2264
+ cancel-text="${m("Cancel")}"
2259
2265
  ok-type="danger"
2260
2266
  placement="right"
2261
2267
  @click=${t=>t.stopPropagation()}
@@ -2264,7 +2270,7 @@ function rt(t){if(!t)return"";const e=t instanceof Date?t:new Date(t);if(Number.
2264
2270
  <button
2265
2271
  slot="trigger"
2266
2272
  class="thread-item__action-btn thread-item__delete"
2267
- title="${g("Delete conversation")}"
2273
+ title="${m("Delete conversation")}"
2268
2274
  part="thread-delete"
2269
2275
  >
2270
2276
  <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
@@ -2350,16 +2356,16 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2350
2356
  size="small"
2351
2357
  .icon=${["copy"]}
2352
2358
  @click=${()=>i.onCopy(s)}
2353
- title="${g("Copy code")}"
2354
- aria-label="${g("Copy code")}"
2359
+ title="${m("Copy code")}"
2360
+ aria-label="${m("Copy code")}"
2355
2361
  ></nr-button>
2356
2362
  <nr-button
2357
2363
  type="text"
2358
2364
  size="small"
2359
2365
  .icon=${["x"]}
2360
2366
  @click=${i.onClose}
2361
- title="${g("Close panel")}"
2362
- aria-label="${g("Close panel")}"
2367
+ title="${m("Close panel")}"
2368
+ aria-label="${m("Close panel")}"
2363
2369
  ></nr-button>
2364
2370
  </div>
2365
2371
  </div>
@@ -2401,7 +2407,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2401
2407
  ${t.enableThreads&&t.isThreadSidebarOpen&&t.threadSidebar&&i.threadSidebar?function(t,i){const o=t.threads.filter(t=>t.bookmarked),s=t.threads.filter(t=>!t.bookmarked);return n`
2402
2408
  <div class="thread-sidebar" part="thread-sidebar">
2403
2409
  <div class="thread-sidebar__header">
2404
- <h3>${g("Conversations")}</h3>
2410
+ <h3>${m("Conversations")}</h3>
2405
2411
  </div>
2406
2412
 
2407
2413
  <div class="thread-list">
@@ -2409,18 +2415,18 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2409
2415
  <div class="thread-section" part="thread-section-bookmarks">
2410
2416
  <div class="thread-section__label">
2411
2417
  <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"/></svg>
2412
- ${g("Bookmarks")}
2418
+ ${m("Bookmarks")}
2413
2419
  </div>
2414
2420
  ${c(o,t=>t.id,e=>vt(e,t,i))}
2415
2421
  </div>
2416
2422
  `:e}
2417
2423
  ${s.length>0||0===o.length?n`
2418
2424
  ${o.length>0?n`
2419
- <div class="thread-section__label">${g("All Conversations")}</div>
2425
+ <div class="thread-section__label">${m("All Conversations")}</div>
2420
2426
  `:e}
2421
2427
  ${c(s,t=>t.id,e=>vt(e,t,i))}
2422
2428
  ${0===s.length&&0===o.length?n`
2423
- <p class="empty-msg">${g("No conversations yet")}</p>
2429
+ <p class="empty-msg">${m("No conversations yet")}</p>
2424
2430
  `:e}
2425
2431
  `:e}
2426
2432
  </div>
@@ -2442,8 +2448,8 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2442
2448
  size="small"
2443
2449
  .icon=${["panel-left"]}
2444
2450
  @click=${i.onToggleThreadSidebar}
2445
- title="${g(t.isThreadSidebarOpen?"Hide threads":"Show threads")}"
2446
- aria-label="${g(t.isThreadSidebarOpen?"Hide threads":"Show threads")}"
2451
+ title="${m(t.isThreadSidebarOpen?"Hide threads":"Show threads")}"
2452
+ aria-label="${m(t.isThreadSidebarOpen?"Hide threads":"Show threads")}"
2447
2453
  ></nr-button>
2448
2454
  ${t.enableThreadCreation&&t.messages.length>0?n`
2449
2455
  <nr-button
@@ -2451,8 +2457,8 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2451
2457
  size="small"
2452
2458
  .icon=${["square-pen"]}
2453
2459
  @click=${null===(o=i.threadSidebar)||void 0===o?void 0:o.onCreateNew}
2454
- title="${g("New conversation")}"
2455
- aria-label="${g("New conversation")}"
2460
+ title="${m("New conversation")}"
2461
+ aria-label="${m("New conversation")}"
2456
2462
  ></nr-button>
2457
2463
  `:""}
2458
2464
  </div>
@@ -2462,7 +2468,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2462
2468
 
2463
2469
  ${xt(t,i)}
2464
2470
 
2465
- ${mt(t.inputBox,i.inputBox)}
2471
+ ${gt(t.inputBox,i.inputBox)}
2466
2472
 
2467
2473
  <slot name="footer"></slot>
2468
2474
  </div>
@@ -2480,7 +2486,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2480
2486
  <div class="file-upload-area__content">
2481
2487
  <div class="file-upload-area__icon">📁</div>
2482
2488
  <div class="file-upload-area__text">
2483
- ${g("Drop files here to upload")}
2489
+ ${m("Drop files here to upload")}
2484
2490
  </div>
2485
2491
  </div>
2486
2492
  </div>
@@ -2497,7 +2503,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2497
2503
  @nr-modal-close=${i.onClose}
2498
2504
  part="url-modal"
2499
2505
  >
2500
- <div slot="header">${g("Add URL")}</div>
2506
+ <div slot="header">${m("Add URL")}</div>
2501
2507
 
2502
2508
  <div >
2503
2509
  <nr-row gutter="8" align="bottom">
@@ -2506,12 +2512,12 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2506
2512
 
2507
2513
  type="url"
2508
2514
  .value=${t.urlInput}
2509
- placeholder="${g("Enter URL...")}"
2515
+ placeholder="${m("Enter URL...")}"
2510
2516
  ?disabled=${t.isLoading}
2511
2517
  @nr-input=${i.onUrlInputChange}
2512
2518
  @keydown=${i.onUrlInputKeydown}
2513
2519
  >
2514
- <nr-label slot="label">${g("URL")}</nr-label>
2520
+ <nr-label slot="label">${m("URL")}</nr-label>
2515
2521
  </nr-input>
2516
2522
  </nr-col>
2517
2523
  <nr-col span="4" >
@@ -2521,7 +2527,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2521
2527
  size="small"
2522
2528
  ?disabled=${t.isLoading}
2523
2529
  @click=${i.onAttachFile}
2524
- title="${g("Load file from URL")}"
2530
+ title="${m("Load file from URL")}"
2525
2531
  style="margin-left: 0.5rem;"
2526
2532
  >
2527
2533
  </nr-button>
@@ -2543,7 +2549,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2543
2549
  type="success"
2544
2550
  style="margin-top: 1rem;"
2545
2551
  >
2546
- ${g("Selected file")}: ${t.selectedFileName}
2552
+ ${m("Selected file")}: ${t.selectedFileName}
2547
2553
  </nr-alert>
2548
2554
  `:e}
2549
2555
 
@@ -2552,7 +2558,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2552
2558
  type="info"
2553
2559
  style="margin-top: 1rem;"
2554
2560
  >
2555
- ${g("Loading file from URL...")}
2561
+ ${m("Loading file from URL...")}
2556
2562
  </nr-alert>
2557
2563
  `:e}
2558
2564
  </div>
@@ -2564,7 +2570,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2564
2570
  ?disabled=${t.isLoading}
2565
2571
  @click=${i.onClose}
2566
2572
  >
2567
- ${g("Cancel")}
2573
+ ${m("Cancel")}
2568
2574
  </nr-button>
2569
2575
  <nr-button
2570
2576
  type="primary"
@@ -2573,7 +2579,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2573
2579
  ?loading=${t.isLoading}
2574
2580
  @click=${i.onConfirm}
2575
2581
  >
2576
- ${g("Add")}
2582
+ ${m("Add")}
2577
2583
  </nr-button>
2578
2584
  </div>
2579
2585
  </nr-modal>
@@ -2591,7 +2597,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2591
2597
  * @license
2592
2598
  * Copyright 2023 Nuraly, Laabidi Aymen
2593
2599
  * SPDX-License-Identifier: MIT
2594
- */var St=function(t,e,n,i){for(var o,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i,a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,n,r):o(e,n))||r);return s>3&&r&&Object.defineProperty(e,n,r),r},Pt=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};let Mt=class extends((t=>B(F(L(H(t)))))(i)){constructor(){super(...arguments),this.requiredComponents=["nr-input","nr-button","nr-icon","nr-dropdown","nr-select","nr-modal","nr-popconfirm"],this.messages=[],this.currentInput="",this.isBotTyping=!1,this.isQueryRunning=!1,this.suggestions=[],this.chatStarted=!1,this.isRTL=!1,this.size=G.Medium,this.variant=K.Default,this.loadingIndicator=V.Dots,this.loadingText=g("Agent is working..."),this.disabled=!1,this.placeholder=g("Type your message..."),this.showSendButton=!0,this.autoScroll=!0,this.showThreads=!1,this.enableThreadCreation=!1,this.threads=[],this.mode="chat",this.boxed=!1,this.enableUrlSync=!1,this.showMessages=!0,this.enableFileUpload=!1,this.uploadedFiles=[],this.actionButtons=[],this.enableModuleSelection=!1,this.modules=[],this.selectedModules=[],this.moduleSelectionLabel=g("Select Modules"),this.enableArtifacts=!1,this.showAudioButton=!1,this.focused=!1,this.isArtifactPanelOpen=!1,this.selectedArtifact=null,this.isThreadSidebarOpen=!0,this.isUrlModalOpen=!1,this.urlInput="",this.urlModalError="",this.isUrlLoading=!1,this.selectedUrlFileName="",this.isFilePreviewModalOpen=!1,this.previewFile=null,this.controllerUnsubscribes=[],this._audio=new kt(this),this._audioMode="message",this._artifactResizeBound=!1,this.toggleThreadSidebar=()=>{this.isThreadSidebarOpen=!this.isThreadSidebarOpen}}get moduleSelectOptions(){return this.modules.map(t=>({value:t.id,label:t.name,icon:t.icon,disabled:!1===t.enabled,description:t.description}))}connectedCallback(){super.connectedCallback(),this.controller&&this.setupControllerIntegration(),this.setupUrlSync()}firstUpdated(){var t,e,n,i;null===(t=this.shadowRoot)||void 0===t||t.addEventListener("click",t=>{var e,n;const i=null===(n=(e=t.target).closest)||void 0===n?void 0:n.call(e,"[data-artifact-id]");if(i){const t=i.dataset.artifactId;t&&this.handleArtifactClick(t)}}),null===(e=this.shadowRoot)||void 0===e||e.addEventListener("nr-thread-edit",t=>{const e=t.detail;(null==e?void 0:e.threadId)&&(this._editingThreadId=e.threadId,this.requestUpdate(),this.updateComplete.then(()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".thread-item__rename-input");e&&(e.focus(),e.select())}))}),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("click",t=>{var e,n;const i=null===(n=(e=t.target).closest)||void 0===n?void 0:n.call(e,"[data-selection-value]");if(i){const t=i.dataset.selectionValue;t&&this.controller&&this.controller.sendMessage(t)}}),null===(i=this.shadowRoot)||void 0===i||i.addEventListener("keydown",t=>{var e,n,i,o;const s=t;if("Enter"!==s.key&&" "!==s.key)return;const r=null===(n=(e=s.target).closest)||void 0===n?void 0:n.call(e,"[data-artifact-id]");if(r){s.preventDefault();const t=r.dataset.artifactId;return void(t&&this.handleArtifactClick(t))}const a=null===(o=(i=s.target).closest)||void 0===o?void 0:o.call(i,"[data-selection-value]");if(a){s.preventDefault();const t=a.dataset.selectionValue;t&&this.controller&&this.controller.sendMessage(t)}})}disconnectedCallback(){var t;super.disconnectedCallback(),this.controller&&this.cleanupControllerIntegration(),this.teardownUrlSync(),null===(t=this._artifactResizeCleanup)||void 0===t||t.call(this),this._artifactResizeBound=!1}updated(t){if(super.updated(t),t.has("controller")&&(this.cleanupControllerIntegration(),this.controller)){this.setupControllerIntegration();try{const t=this.controller.getState();this.handleControllerStateChange(t)}catch(t){}this.enableUrlSync&&this.handleHashChange()}if(t.has("enableUrlSync")&&(this.enableUrlSync?this.setupUrlSync():this.teardownUrlSync()),this.controller&&!t.has("controller")){if(t.has("messages")||t.has("suggestions")||t.has("threads"))try{const t=this.controller.getState();this.handleControllerStateChange(t)}catch(t){}}t.has("messages")&&this.autoScroll&&this.messages.length>0&&this.scrollToLatestMessage(),this.updateArtifactPanelResize()}scrollToLatestMessage(){requestAnimationFrame(()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".messages");e&&(e.scrollTop=e.scrollHeight)})}setupControllerIntegration(){this.controller&&this.controllerUnsubscribes.push(this.controller.on("state:changed",this.handleControllerStateChange.bind(this)),this.controller.on("message:sent",this.handleControllerMessageSent.bind(this)),this.controller.on("message:received",this.handleControllerMessageReceived.bind(this)),this.controller.on("error",this.handleControllerError.bind(this)))}cleanupControllerIntegration(){if(this.controllerUnsubscribes.length)try{this.controllerUnsubscribes.forEach(t=>{try{t()}catch(t){}})}finally{this.controllerUnsubscribes=[]}}setupUrlSync(){this.enableUrlSync&&!this._hashChangeHandler&&(this._hashChangeHandler=this.handleHashChange.bind(this),window.addEventListener("hashchange",this._hashChangeHandler),this.handleHashChange())}teardownUrlSync(){this._hashChangeHandler&&(window.removeEventListener("hashchange",this._hashChangeHandler),this._hashChangeHandler=void 0)}handleHashChange(){const t=window.location.hash.match(/^#conversation\/(.+)$/);if(t){const e=decodeURIComponent(t[1]);e!==this.activeThreadId&&this.controller&&this.controller.switchThread(e)}}handleControllerStateChange(t){var e,n,i,o,s;if(t.messages&&(this.messages=t.messages),t.threads&&(this.threads=t.threads),t.suggestions&&t.suggestions.length>0&&(this.suggestions=t.suggestions),t.currentThreadId&&(this.activeThreadId=t.currentThreadId),this.enableUrlSync&&t.currentThreadId){const e=`#conversation/${encodeURIComponent(t.currentThreadId)}`;window.location.hash!==e&&history.replaceState(null,"",e)}if(this.chatStarted=(null===(e=t.messages)||void 0===e?void 0:e.length)>0,this.isBotTyping=t.isTyping||!1,this.statusText=t.statusText,this.isQueryRunning=t.isProcessing||!1,t.uploadedFiles&&(this.uploadedFiles=t.uploadedFiles),this.enableArtifacts){const e=null===(n=t.messages)||void 0===n?void 0:n.some(t=>{var e,n;return(null===(n=null===(e=t.metadata)||void 0===e?void 0:e.artifactIds)||void 0===n?void 0:n.length)>0});e||(this.isArtifactPanelOpen=!1,this.selectedArtifact=null)}if(this.enableArtifacts&&(null===(i=t.messages)||void 0===i?void 0:i.length)){const e=[...t.messages].reverse().find(t=>"bot"===t.sender),n=null===(o=null==e?void 0:e.metadata)||void 0===o?void 0:o.artifactIds;if(null==n?void 0:n.length){const t=n[n.length-1];if((null===(s=this.selectedArtifact)||void 0===s?void 0:s.id)!==t){const e=this.getArtifactPlugin(),n=null==e?void 0:e.getArtifact(t);n&&(this.selectedArtifact=n,this.isArtifactPanelOpen=!0)}}}}handleControllerMessageSent(t){this.isQueryRunning=!0,this.isBotTyping=!0}handleControllerMessageReceived(t){}handleControllerError(t){this.isQueryRunning=!1,this.isBotTyping=!1,console.error("Controller error:",t.error)}render(){var t;const e={boxed:this.boxed,showMessages:this.showMessages,messages:this.messages,isTyping:this.isBotTyping,loadingIndicator:this.loadingIndicator,loadingText:this.statusText||this.loadingText,chatStarted:this.chatStarted,suggestions:this.suggestions,inputBox:{placeholder:this.placeholder,disabled:this.disabled||this.isQueryRunning,currentInput:this.currentInput,uploadedFiles:this.uploadedFiles,isQueryRunning:this.isQueryRunning,showSendButton:this.showSendButton,enableFileUpload:this.enableFileUpload,fileUploadItems:[{id:"upload-file",label:"Upload File",icon:"upload"},{id:"upload-url",label:"Upload from URL",icon:"link"}],enableModuleSelection:this.enableModuleSelection,moduleOptions:this.moduleSelectOptions,selectedModules:this.selectedModules,moduleSelectionLabel:this.moduleSelectionLabel,renderModuleDisplay:this.renderModuleSelectedDisplay.bind(this),showAudioButton:this.showAudioButton,audioRecording:this._audio.state,audioMode:this._audioMode},enableThreads:this.showThreads,enableThreadCreation:this.enableThreadCreation,isThreadSidebarOpen:this.showThreads&&this.isThreadSidebarOpen,threadSidebar:this.showThreads?{threads:this.threads,activeThreadId:this.activeThreadId,editingThreadId:this._editingThreadId}:void 0,isDragging:!1,enableArtifacts:this.enableArtifacts,artifactPanel:this.enableArtifacts?{artifact:this.selectedArtifact,isOpen:this.isArtifactPanelOpen,renderContent:null!==(t=this.renderArtifactContent)&&void 0!==t?t:this.getPluginArtifactRenderer()}:void 0,urlModal:this.isUrlModalOpen?{isOpen:this.isUrlModalOpen,urlInput:this.urlInput,isLoading:this.isUrlLoading,error:this.urlModalError,selectedFileName:this.selectedUrlFileName}:void 0},i={message:{onRetry:this.handleRetry.bind(this),onRetryKeydown:()=>{},onCopy:this.handleCopyMessage.bind(this),onCopyKeydown:()=>{},onFileClick:this.handleFilePreview.bind(this)},suggestion:{onClick:this.handleSuggestionClick.bind(this),onKeydown:()=>{}},inputBox:{onInput:this.handleContentEditableInput.bind(this),onKeydown:this.handleKeyDown.bind(this),onFocus:this.handleInputFocus.bind(this),onBlur:this.handleInputBlur.bind(this),onSend:this.handleSendMessage.bind(this),onStop:this.handleStopQuery.bind(this),onSendKeydown:()=>{},onFileDropdownClick:this.handleFileDropdownClick.bind(this),onModuleChange:this.handleModuleSelectionChange.bind(this),onFileRemove:this.handleFileRemove.bind(this),onFileClick:this.handleFilePreview.bind(this),onAudioStart:this.handleAudioStart.bind(this),onAudioCancel:this.handleAudioCancel.bind(this),onAudioSend:this.handleAudioSend.bind(this)},threadSidebar:this.showThreads?{onCreateNew:()=>{var t;null===(t=this.controller)||void 0===t||t.createThread("New Chat")},onSelectThread:t=>{var e;this.enableUrlSync&&history.pushState(null,"",`#conversation/${encodeURIComponent(t)}`),null===(e=this.controller)||void 0===e||e.switchThread(t)},onDeleteThread:t=>{var e;null===(e=this.controller)||void 0===e||e.deleteThread(t)},onBookmarkThread:t=>{var e;null===(e=this.controller)||void 0===e||e.bookmarkThread(t)},onRenameThread:(t,e)=>{var n;null===(n=this.controller)||void 0===n||n.renameThread(t,e),this._editingThreadId=void 0}}:void 0,fileUploadArea:{onDrop:()=>{},onDragOver:()=>{},onDragLeave:()=>{}},urlModal:this.isUrlModalOpen?{onClose:this.handleUrlModalClose.bind(this),onUrlInputChange:this.handleUrlInputChange.bind(this),onUrlInputKeydown:this.handleUrlInputKeydown.bind(this),onConfirm:this.handleUrlConfirm.bind(this),onAttachFile:this.handleUrlAttachFile.bind(this)}:void 0,artifactPanel:this.enableArtifacts?{onClose:this.handleArtifactPanelClose.bind(this),onCopy:this.handleArtifactCopy.bind(this)}:void 0,onToggleThreadSidebar:this.showThreads?this.toggleThreadSidebar.bind(this):void 0};return n`
2600
+ */var St=function(t,e,n,i){for(var o,s=arguments.length,r=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i,a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,n,r):o(e,n))||r);return s>3&&r&&Object.defineProperty(e,n,r),r},Pt=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};let Mt=class extends((t=>B(F(L(H(t)))))(i)){constructor(){super(...arguments),this.requiredComponents=["nr-input","nr-button","nr-icon","nr-dropdown","nr-select","nr-modal","nr-popconfirm"],this.messages=[],this.currentInput="",this.isBotTyping=!1,this.isQueryRunning=!1,this.suggestions=[],this.chatStarted=!1,this.isRTL=!1,this.size=G.Medium,this.variant=K.Default,this.loadingIndicator=V.Dots,this.loadingText=m("Agent is working..."),this.disabled=!1,this.placeholder=m("Type your message..."),this.showSendButton=!0,this.autoScroll=!0,this.showThreads=!1,this.enableThreadCreation=!1,this.threads=[],this.mode="chat",this.boxed=!1,this.enableUrlSync=!1,this.showMessages=!0,this.enableFileUpload=!1,this.uploadedFiles=[],this.actionButtons=[],this.enableModuleSelection=!1,this.modules=[],this.selectedModules=[],this.moduleSelectionLabel=m("Select Modules"),this.enableArtifacts=!1,this.showAudioButton=!1,this.focused=!1,this.isArtifactPanelOpen=!1,this.selectedArtifact=null,this.isThreadSidebarOpen=!0,this.isUrlModalOpen=!1,this.urlInput="",this.urlModalError="",this.isUrlLoading=!1,this.selectedUrlFileName="",this.isFilePreviewModalOpen=!1,this.previewFile=null,this.controllerUnsubscribes=[],this._audio=new kt(this),this._audioMode="message",this._artifactResizeBound=!1,this.toggleThreadSidebar=()=>{this.isThreadSidebarOpen=!this.isThreadSidebarOpen}}get moduleSelectOptions(){return this.modules.map(t=>({value:t.id,label:t.name,icon:t.icon,disabled:!1===t.enabled,description:t.description}))}connectedCallback(){super.connectedCallback(),this.controller&&this.setupControllerIntegration(),this.setupUrlSync()}firstUpdated(){var t,e,n,i;null===(t=this.shadowRoot)||void 0===t||t.addEventListener("click",t=>{var e,n;const i=null===(n=(e=t.target).closest)||void 0===n?void 0:n.call(e,"[data-artifact-id]");if(i){const t=i.dataset.artifactId;t&&this.handleArtifactClick(t)}}),null===(e=this.shadowRoot)||void 0===e||e.addEventListener("nr-thread-edit",t=>{const e=t.detail;(null==e?void 0:e.threadId)&&(this._editingThreadId=e.threadId,this.requestUpdate(),this.updateComplete.then(()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".thread-item__rename-input");e&&(e.focus(),e.select())}))}),null===(n=this.shadowRoot)||void 0===n||n.addEventListener("click",t=>{var e,n;const i=null===(n=(e=t.target).closest)||void 0===n?void 0:n.call(e,"[data-selection-value]");if(i){const t=i.dataset.selectionValue;t&&this.controller&&this.controller.sendMessage(t)}}),null===(i=this.shadowRoot)||void 0===i||i.addEventListener("keydown",t=>{var e,n,i,o;const s=t;if("Enter"!==s.key&&" "!==s.key)return;const r=null===(n=(e=s.target).closest)||void 0===n?void 0:n.call(e,"[data-artifact-id]");if(r){s.preventDefault();const t=r.dataset.artifactId;return void(t&&this.handleArtifactClick(t))}const a=null===(o=(i=s.target).closest)||void 0===o?void 0:o.call(i,"[data-selection-value]");if(a){s.preventDefault();const t=a.dataset.selectionValue;t&&this.controller&&this.controller.sendMessage(t)}})}disconnectedCallback(){var t;super.disconnectedCallback(),this.controller&&this.cleanupControllerIntegration(),this.teardownUrlSync(),null===(t=this._artifactResizeCleanup)||void 0===t||t.call(this),this._artifactResizeBound=!1}updated(t){if(super.updated(t),t.has("controller")&&(this.cleanupControllerIntegration(),this.controller)){this.setupControllerIntegration();try{const t=this.controller.getState();this.handleControllerStateChange(t)}catch(t){}this.enableUrlSync&&this.handleHashChange()}if(t.has("enableUrlSync")&&(this.enableUrlSync?this.setupUrlSync():this.teardownUrlSync()),this.controller&&!t.has("controller")){if(t.has("messages")||t.has("suggestions")||t.has("threads"))try{const t=this.controller.getState();this.handleControllerStateChange(t)}catch(t){}}t.has("messages")&&this.autoScroll&&this.messages.length>0&&this.scrollToLatestMessage(),this.updateArtifactPanelResize()}scrollToLatestMessage(){requestAnimationFrame(()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".messages");e&&(e.scrollTop=e.scrollHeight)})}setupControllerIntegration(){this.controller&&this.controllerUnsubscribes.push(this.controller.on("state:changed",this.handleControllerStateChange.bind(this)),this.controller.on("message:sent",this.handleControllerMessageSent.bind(this)),this.controller.on("message:received",this.handleControllerMessageReceived.bind(this)),this.controller.on("error",this.handleControllerError.bind(this)))}cleanupControllerIntegration(){if(this.controllerUnsubscribes.length)try{this.controllerUnsubscribes.forEach(t=>{try{t()}catch(t){}})}finally{this.controllerUnsubscribes=[]}}setupUrlSync(){this.enableUrlSync&&!this._hashChangeHandler&&(this._hashChangeHandler=this.handleHashChange.bind(this),window.addEventListener("hashchange",this._hashChangeHandler),this.handleHashChange())}teardownUrlSync(){this._hashChangeHandler&&(window.removeEventListener("hashchange",this._hashChangeHandler),this._hashChangeHandler=void 0)}handleHashChange(){const t=window.location.hash.match(/^#conversation\/(.+)$/);if(t){const e=decodeURIComponent(t[1]);e!==this.activeThreadId&&this.controller&&this.controller.switchThread(e)}}handleControllerStateChange(t){var e,n,i,o,s;if(t.messages&&(this.messages=t.messages),t.threads&&(this.threads=t.threads),t.suggestions&&t.suggestions.length>0&&(this.suggestions=t.suggestions),t.currentThreadId&&(this.activeThreadId=t.currentThreadId),this.enableUrlSync&&t.currentThreadId){const e=`#conversation/${encodeURIComponent(t.currentThreadId)}`;window.location.hash!==e&&history.replaceState(null,"",e)}if(this.chatStarted=(null===(e=t.messages)||void 0===e?void 0:e.length)>0,this.isBotTyping=t.isTyping||!1,this.statusText=t.statusText,this.isQueryRunning=t.isProcessing||!1,t.uploadedFiles&&(this.uploadedFiles=t.uploadedFiles),this.enableArtifacts){const e=null===(n=t.messages)||void 0===n?void 0:n.some(t=>{var e,n;return(null===(n=null===(e=t.metadata)||void 0===e?void 0:e.artifactIds)||void 0===n?void 0:n.length)>0});e||(this.isArtifactPanelOpen=!1,this.selectedArtifact=null)}if(this.enableArtifacts&&(null===(i=t.messages)||void 0===i?void 0:i.length)){const e=[...t.messages].reverse().find(t=>"bot"===t.sender),n=null===(o=null==e?void 0:e.metadata)||void 0===o?void 0:o.artifactIds;if(null==n?void 0:n.length){const t=n[n.length-1];if((null===(s=this.selectedArtifact)||void 0===s?void 0:s.id)!==t){const e=this.getArtifactPlugin(),n=null==e?void 0:e.getArtifact(t);n&&(this.selectedArtifact=n,this.isArtifactPanelOpen=!0)}}}}handleControllerMessageSent(t){this.isQueryRunning=!0,this.isBotTyping=!0}handleControllerMessageReceived(t){}handleControllerError(t){this.isQueryRunning=!1,this.isBotTyping=!1,console.error("Controller error:",t.error)}render(){var t;const e={boxed:this.boxed,showMessages:this.showMessages,messages:this.messages,isTyping:this.isBotTyping,loadingIndicator:this.loadingIndicator,loadingText:this.statusText||this.loadingText,chatStarted:this.chatStarted,suggestions:this.suggestions,inputBox:{placeholder:this.placeholder,disabled:this.disabled||this.isQueryRunning,currentInput:this.currentInput,uploadedFiles:this.uploadedFiles,isQueryRunning:this.isQueryRunning,showSendButton:this.showSendButton,enableFileUpload:this.enableFileUpload,fileUploadItems:[{id:"upload-file",label:"Upload File",icon:"upload"},{id:"upload-url",label:"Upload from URL",icon:"link"}],enableModuleSelection:this.enableModuleSelection,moduleOptions:this.moduleSelectOptions,selectedModules:this.selectedModules,moduleSelectionLabel:this.moduleSelectionLabel,renderModuleDisplay:this.renderModuleSelectedDisplay.bind(this),showAudioButton:this.showAudioButton,audioRecording:this._audio.state,audioMode:this._audioMode},enableThreads:this.showThreads,enableThreadCreation:this.enableThreadCreation,isThreadSidebarOpen:this.showThreads&&this.isThreadSidebarOpen,threadSidebar:this.showThreads?{threads:this.threads,activeThreadId:this.activeThreadId,editingThreadId:this._editingThreadId}:void 0,isDragging:!1,enableArtifacts:this.enableArtifacts,artifactPanel:this.enableArtifacts?{artifact:this.selectedArtifact,isOpen:this.isArtifactPanelOpen,renderContent:null!==(t=this.renderArtifactContent)&&void 0!==t?t:this.getPluginArtifactRenderer()}:void 0,urlModal:this.isUrlModalOpen?{isOpen:this.isUrlModalOpen,urlInput:this.urlInput,isLoading:this.isUrlLoading,error:this.urlModalError,selectedFileName:this.selectedUrlFileName}:void 0},i={message:{onRetry:this.handleRetry.bind(this),onRetryKeydown:()=>{},onCopy:this.handleCopyMessage.bind(this),onCopyKeydown:()=>{},onFileClick:this.handleFilePreview.bind(this)},suggestion:{onClick:this.handleSuggestionClick.bind(this),onKeydown:()=>{}},inputBox:{onInput:this.handleContentEditableInput.bind(this),onKeydown:this.handleKeyDown.bind(this),onFocus:this.handleInputFocus.bind(this),onBlur:this.handleInputBlur.bind(this),onSend:this.handleSendMessage.bind(this),onStop:this.handleStopQuery.bind(this),onSendKeydown:()=>{},onFileDropdownClick:this.handleFileDropdownClick.bind(this),onModuleChange:this.handleModuleSelectionChange.bind(this),onFileRemove:this.handleFileRemove.bind(this),onFileClick:this.handleFilePreview.bind(this),onAudioStart:this.handleAudioStart.bind(this),onAudioCancel:this.handleAudioCancel.bind(this),onAudioSend:this.handleAudioSend.bind(this)},threadSidebar:this.showThreads?{onCreateNew:()=>{var t;null===(t=this.controller)||void 0===t||t.createThread("New Chat")},onSelectThread:t=>{var e;this.enableUrlSync&&history.pushState(null,"",`#conversation/${encodeURIComponent(t)}`),null===(e=this.controller)||void 0===e||e.switchThread(t)},onDeleteThread:t=>{var e;null===(e=this.controller)||void 0===e||e.deleteThread(t)},onBookmarkThread:t=>{var e;null===(e=this.controller)||void 0===e||e.bookmarkThread(t)},onRenameThread:(t,e)=>{var n;null===(n=this.controller)||void 0===n||n.renameThread(t,e),this._editingThreadId=void 0}}:void 0,fileUploadArea:{onDrop:()=>{},onDragOver:()=>{},onDragLeave:()=>{}},urlModal:this.isUrlModalOpen?{onClose:this.handleUrlModalClose.bind(this),onUrlInputChange:this.handleUrlInputChange.bind(this),onUrlInputKeydown:this.handleUrlInputKeydown.bind(this),onConfirm:this.handleUrlConfirm.bind(this),onAttachFile:this.handleUrlAttachFile.bind(this)}:void 0,artifactPanel:this.enableArtifacts?{onClose:this.handleArtifactPanelClose.bind(this),onCopy:this.handleArtifactCopy.bind(this)}:void 0,onToggleThreadSidebar:this.showThreads?this.toggleThreadSidebar.bind(this):void 0};return n`
2595
2601
  <div
2596
2602
  class="chat-container ${a({"chat-container--with-threads":this.showThreads,"chat-container--disabled":this.disabled,"chat-container--focused":this.focused,"chat-container--boxed":this.boxed})}"
2597
2603
  dir=${this.isRTL?"rtl":"ltr"}
@@ -2612,7 +2618,7 @@ function(t){if(0===t)return"0 Bytes";const e=Math.floor(Math.log(t)/Math.log(102
2612
2618
  </span>
2613
2619
  `}return n`
2614
2620
  <span class="module-display-multiple">
2615
- ${t} ${g("modules selected")}
2621
+ ${t} ${m("modules selected")}
2616
2622
  </span>
2617
2623
  `}handleContentEditableInput(t){const e=t.target.textContent||"";this.currentInput=e,this.dispatchEventWithMetadata("nr-chatbot-input-changed",{metadata:{value:e}})}handleInputFocus(t){this.focused=!0,this.dispatchEventWithMetadata("nr-chatbot-input-focused",{metadata:{event:t}})}handleInputBlur(t){this.focused=!1,this.dispatchEventWithMetadata("nr-chatbot-input-blurred",{metadata:{event:t}})}clearInput(){var t;this.currentInput="";const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".input-box__input");e&&(e.textContent="")}focusInput(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".input-box__input");e&&e.focus()}handleAudioStart(t){this._audioMode=t,this._audio.start()}handleAudioCancel(){this._audio.cancel()}handleAudioSend(){return Pt(this,void 0,void 0,function*(){var t;const e=yield this._audio.stop();if(!e)return;const n=this._audioMode;null===(t=this.onAudioRecorded)||void 0===t||t.call(this,e.blob,e.mimeType,e.duration,n),this.dispatchEvent(new CustomEvent("nr-chatbot-audio-recorded",{detail:{blob:e.blob,mimeType:e.mimeType,duration:e.duration,mode:n},bubbles:!0,composed:!0}))})}handleKeyDown(t){"Enter"!==t.key||t.shiftKey||(t.preventDefault(),this.handleSendMessage())}handleSendMessage(){if(!this.currentInput.trim()||this.disabled)return;if(!this.controller)return void console.warn("nr-chatbot: No controller is attached; message will not be sent.");const t=this.uploadedFiles&&this.uploadedFiles.length>0?[...this.uploadedFiles]:void 0;this.controller.sendMessage(this.currentInput.trim(),{files:t,metadata:{selectedModules:this.selectedModules}}),this.clearInput(),this.chatStarted=!0,this.dispatchEventWithMetadata("nr-chatbot-message-sent",{metadata:{text:this.currentInput}})}handleStopQuery(){var t;try{null===(t=this.controller)||void 0===t||t.stop()}catch(t){console.warn("nr-chatbot: stop failed",t)}this.dispatchEventWithMetadata("nr-chatbot-query-stopped",{metadata:{action:"stop"}})}handleRetry(t){t.text&&(this.currentInput=t.text,this.handleSendMessage())}handleCopyMessage(t){const e=t.text;if(!e)return;const n=()=>{this.dispatchEventWithMetadata("nr-chatbot-message-copied",{metadata:{messageId:t.id}})};navigator.clipboard?navigator.clipboard.writeText(e).then(n).catch(()=>{this.copyViaFallback(e,n)}):this.copyViaFallback(e,n)}copyViaFallback(t,e){const n=document.createElement("textarea");n.value=t,n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy"),e()}catch(t){}n.remove()}handleSuggestionClick(t){this.currentInput=t.text,this.handleSendMessage(),this.dispatchEventWithMetadata("nr-chatbot-suggestion-clicked",{metadata:{suggestion:t}})}handleModuleSelectionChange(t){const e=t.detail.value;this.selectedModules=e,this.dispatchEventWithMetadata("nr-chatbot-modules-selected",{metadata:{modules:e}})}handleFileDropdownClick(t){const e=t.detail.item.id;"upload-file"===e?this.openFileDialog():"upload-url"===e&&this.openUrlModal()}openFileDialog(){const t=document.createElement("input");t.type="file",t.multiple=!0,t.accept="image/*,application/pdf,text/*,video/*,audio/*",t.addEventListener("change",t=>Pt(this,void 0,void 0,function*(){var e;const n=t.target;if(n.files&&n.files.length>0){const t=Array.from(n.files);yield null===(e=this.controller)||void 0===e?void 0:e.uploadFiles(t)}})),t.click()}openUrlModal(){this.isUrlModalOpen=!0,this.urlInput="",this.urlModalError="",this.selectedUrlFileName=""}handleUrlModalClose(){this.isUrlModalOpen=!1,this.urlInput="",this.urlModalError="",this.isUrlLoading=!1,this.selectedUrlFileName=""}handleUrlInputChange(t){const e=t.target;this.urlInput=e.value,this.urlModalError=""}handleUrlInputKeydown(t){"Enter"===t.key&&(t.preventDefault(),this.handleUrlAttachFile())}handleUrlConfirm(){this.handleUrlModalClose()}handleUrlAttachFile(){return Pt(this,void 0,void 0,function*(){if(this.urlInput.trim()){this.isUrlLoading=!0,this.urlModalError="";try{const t=yield fetch(this.urlInput);if(!t.ok)throw new Error(`Failed to fetch file: ${t.statusText}`);const e=yield t.blob(),n=this.urlInput.split("/").pop()||"downloaded-file",i=new File([e],n,{type:e.type});this.selectedUrlFileName=n,this.controller&&(yield this.controller.uploadFiles([i])),this.isUrlLoading=!1,setTimeout(()=>{this.handleUrlModalClose()},1e3)}catch(t){this.isUrlLoading=!1,this.urlModalError=t instanceof Error?t.message:"Failed to load file from URL"}}else this.urlModalError="Please enter a URL"})}handleFileRemove(t){var e;null===(e=this.controller)||void 0===e||e.removeFile(t)}handleFilePreview(t){this.previewFile=t,this.isFilePreviewModalOpen=!0}handleArtifactClick(t){if(!this.enableArtifacts||!this.controller)return;const e=this.getArtifactPlugin();if(!e)return;const n=e.getArtifact(t);n&&(this.selectedArtifact=n,this.isArtifactPanelOpen=!0)}handleArtifactPanelClose(){this.isArtifactPanelOpen=!1,this.selectedArtifact=null}updateArtifactPanelResize(){var t,e,n;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".artifact-panel__resize-handle"),o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".artifact-panel");if(!i||!o)return null===(n=this._artifactResizeCleanup)||void 0===n||n.call(this),void(this._artifactResizeBound=!1);if(this._artifactResizeBound)return;this._artifactResizeBound=!0;let s=!1,r=0,a=0;const l=t=>{if(!s)return;const e=t.clientX-r,n=o.parentElement,i=n?.85*n.getBoundingClientRect().width:1200,l=Number.parseInt(getComputedStyle(o).minWidth,10)||300,c=Math.max(l,Math.min(a-e,i));o.style.width=`${c}px`},c=()=>{s&&(s=!1,i.classList.remove("artifact-panel__resize-handle--active"),document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c))},d=t=>{t.preventDefault(),s=!0,r=t.clientX,a=o.getBoundingClientRect().width,i.classList.add("artifact-panel__resize-handle--active"),document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};i.addEventListener("mousedown",d),this._artifactResizeCleanup=()=>{i.removeEventListener("mousedown",d),c()}}handleArtifactCopy(t){const e=t.content;e&&(navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{this.copyViaFallback(e,()=>{})}):this.copyViaFallback(e,()=>{}))}getArtifactPlugin(){var t;try{const e=null===(t=this.controller)||void 0===t?void 0:t.plugins;return e&&"function"==typeof e.get?e.get("artifact"):void 0}catch(t){return}}getPluginArtifactRenderer(){var t;try{const e=null===(t=this.controller)||void 0===t?void 0:t.plugins;if(!e||"function"!=typeof e.values)return;for(const t of e.values())if("function"==typeof t.renderArtifactContent)return e=>{const i=t.renderArtifactContent(e);if(i)return n`${l(i)}`};return}catch(t){return}}handleFilePreviewModalClose(){this.isFilePreviewModalOpen=!1,this.previewFile=null}addMessage(t){var e;const n=Object.assign({id:t.id||`msg-${Date.now()}`,sender:t.sender||q.User,text:t.text||"",timestamp:t.timestamp||(new Date).toISOString()},t);return null===(e=this.controller)||void 0===e||e.addMessage(n),this.chatStarted=!0,n}clearMessages(){this.messages=[],this.chatStarted=!1}};Mt.useShadowDom=!0,Mt.styles=D,St([o({type:Array})],Mt.prototype,"messages",void 0),St([o({type:String})],Mt.prototype,"currentInput",void 0),St([o({type:Boolean})],Mt.prototype,"isBotTyping",void 0),St([o({type:Boolean})],Mt.prototype,"isQueryRunning",void 0),St([o({type:Array})],Mt.prototype,"suggestions",void 0),St([o({type:Boolean})],Mt.prototype,"chatStarted",void 0),St([o({type:Boolean})],Mt.prototype,"isRTL",void 0),St([o({type:String})],Mt.prototype,"size",void 0),St([o({type:String})],Mt.prototype,"variant",void 0),St([o({type:String})],Mt.prototype,"loadingIndicator",void 0),St([o({type:String})],Mt.prototype,"loadingText",void 0),St([o({type:Boolean})],Mt.prototype,"disabled",void 0),St([o({type:String})],Mt.prototype,"placeholder",void 0),St([o({type:Boolean})],Mt.prototype,"showSendButton",void 0),St([o({type:Boolean})],Mt.prototype,"autoScroll",void 0),St([o({type:Boolean})],Mt.prototype,"showThreads",void 0),St([o({type:Boolean})],Mt.prototype,"enableThreadCreation",void 0),St([o({type:Array})],Mt.prototype,"threads",void 0),St([o({type:String})],Mt.prototype,"activeThreadId",void 0),St([o({type:String})],Mt.prototype,"mode",void 0),St([o({type:Boolean,reflect:!0})],Mt.prototype,"boxed",void 0),St([o({type:Boolean})],Mt.prototype,"enableUrlSync",void 0),St([o({type:Boolean})],Mt.prototype,"showMessages",void 0),St([o({type:Boolean})],Mt.prototype,"enableFileUpload",void 0),St([o({type:Array})],Mt.prototype,"uploadedFiles",void 0),St([o({type:Array})],Mt.prototype,"actionButtons",void 0),St([o({type:Boolean})],Mt.prototype,"enableModuleSelection",void 0),St([o({type:Array})],Mt.prototype,"modules",void 0),St([o({type:Array})],Mt.prototype,"selectedModules",void 0),St([o({type:String})],Mt.prototype,"moduleSelectionLabel",void 0),St([o({type:Boolean})],Mt.prototype,"enableArtifacts",void 0),St([o({type:Boolean,attribute:"show-audio-button"})],Mt.prototype,"showAudioButton",void 0),St([o({type:Function})],Mt.prototype,"onAudioRecorded",void 0),St([o({type:Function})],Mt.prototype,"renderArtifactContent",void 0),St([o({type:Object})],Mt.prototype,"controller",void 0),St([s()],Mt.prototype,"statusText",void 0),St([s()],Mt.prototype,"focused",void 0),St([s()],Mt.prototype,"isArtifactPanelOpen",void 0),St([s()],Mt.prototype,"selectedArtifact",void 0),St([s()],Mt.prototype,"isThreadSidebarOpen",void 0),St([s()],Mt.prototype,"_editingThreadId",void 0),St([s()],Mt.prototype,"isUrlModalOpen",void 0),St([s()],Mt.prototype,"urlInput",void 0),St([s()],Mt.prototype,"urlModalError",void 0),St([s()],Mt.prototype,"isUrlLoading",void 0),St([s()],Mt.prototype,"selectedUrlFileName",void 0),St([s()],Mt.prototype,"isFilePreviewModalOpen",void 0),St([s()],Mt.prototype,"previewFile",void 0),Mt=St([(t,e)=>(t.addInitializer(b),t),r("nr-chatbot")],Mt);
2618
2624
  /**
@@ -2701,7 +2707,7 @@ var Gt=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){
2701
2707
  * @license
2702
2708
  * Copyright 2024 Nuraly, Laabidi Aymen
2703
2709
  * SPDX-License-Identifier: MIT
2704
- */var ue=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})},pe=function(t){return this instanceof pe?(this.v=t,this):new pe(t)},fe=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,o=n.apply(t,e||[]),s=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),r("next"),r("throw"),r("return",function(t){return function(e){return Promise.resolve(e).then(t,c)}}),i[Symbol.asyncIterator]=function(){return this},i;function r(t,e){o[t]&&(i[t]=function(e){return new Promise(function(n,i){s.push([t,e,n,i])>1||a(t,e)})},e&&(i[t]=e(i[t])))}function a(t,e){try{(n=o[t](e)).value instanceof pe?Promise.resolve(n.value.v).then(l,c):d(s[0][2],n)}catch(t){d(s[0][3],t)}var n}function l(t){a("next",t)}function c(t){a("throw",t)}function d(t,e){t(e),s.shift(),s.length&&a(s[0][0],s[0][1])}};const ge={send:"message:send",response:"message:response",stream:"message:stream",error:"message:error",typingStart:"typing:start",typingEnd:"typing:end",toolCall:"tool:call",toolCallEnd:"tool:end"};class me{constructor(){this.id="socket",this.name="Socket.io Provider",this.capabilities={streaming:!0,fileUpload:!1,modules:!1,functions:!1},this.socket=null,this.config=null,this.connected=!1,this.responseResolvers=new Map}connect(t){return ue(this,void 0,void 0,function*(){var e,n,i;if(!t.url)throw new Error("Socket URL is required");this.config=Object.assign(Object.assign({},t),{events:Object.assign(Object.assign({},ge),t.events),autoReconnect:null===(e=t.autoReconnect)||void 0===e||e,reconnectionAttempts:null!==(n=t.reconnectionAttempts)&&void 0!==n?n:5,responseTimeout:null!==(i=t.responseTimeout)&&void 0!==i?i:3e4});const o=t.namespace?`${t.url}${t.namespace}`:t.url;return this.socket=h(o,{path:t.path||"/socket.io",transports:["websocket","polling"],autoConnect:!0,reconnection:this.config.autoReconnect,reconnectionAttempts:this.config.reconnectionAttempts,extraHeaders:t.headers}),new Promise((t,e)=>{const n=setTimeout(()=>{e(new Error("Socket connection timeout"))},1e4);this.socket.on("connect",()=>{clearTimeout(n),this.connected=!0,console.log("[SocketProvider] Connected:",this.socket.id),t()}),this.socket.on("connect_error",t=>{clearTimeout(n),console.error("[SocketProvider] Connection error:",t),e(t)}),this.socket.on("disconnect",t=>{this.connected=!1,console.log("[SocketProvider] Disconnected:",t)}),this.setupEventListeners()})})}setupEventListeners(){if(!this.socket||!this.config)return;const t=this.config.events;this.socket.on(t.response,t=>{console.log("[SocketProvider] Response received:",t);const e=this.extractMessageId(t),n=this.responseResolvers.get(e)||this.getLatestResolver();if(n){const i=this.extractMessage(t);n.resolve(i),this.responseResolvers.delete(e)}}),t.stream&&this.socket.on(t.stream,t=>{console.log("[SocketProvider] Stream chunk:",t);const e=this.extractMessageId(t),n=this.responseResolvers.get(e)||this.getLatestResolver();if(n){n.isStreaming=!0;const e=this.extractMessage(t);n.chunks.push(e)}}),t.error&&this.socket.on(t.error,t=>{console.error("[SocketProvider] Error event:",t);const e=this.extractMessageId(t),n=this.responseResolvers.get(e)||this.getLatestResolver();if(n){const i=t.error||t.message||"Unknown error";n.reject(new Error(i)),this.responseResolvers.delete(e)}}),t.toolCall&&this.socket.on(t.toolCall,t=>{var e;const n=t.name||t.toolName||t.function||"unknown";null===(e=this.onToolCall)||void 0===e||e.call(this,n)}),t.toolCallEnd&&this.socket.on(t.toolCallEnd,()=>{var t;null===(t=this.onToolCallEnd)||void 0===t||t.call(this)})}getLatestResolver(){const t=Array.from(this.responseResolvers.keys());return t.length>0?this.responseResolvers.get(t[t.length-1]):null}extractMessageId(t){return t.messageId||t.id||t.executionId||"default"}extractMessage(t){var e,n,i;return(null===(e=this.config)||void 0===e?void 0:e.extractMessage)?this.config.extractMessage(t):"string"==typeof t?t:t.message?t.message:t.text?t.text:t.response?t.response:t.content?t.content:(null===(n=t.data)||void 0===n?void 0:n.message)?t.data.message:(null===(i=t.data)||void 0===i?void 0:i.output)?JSON.stringify(t.data.output):JSON.stringify(t)}disconnect(){return ue(this,void 0,void 0,function*(){this.socket&&(this.socket.disconnect(),this.socket=null),this.connected=!1,this.responseResolvers.clear(),console.log("[SocketProvider] Disconnected")})}isConnected(){var t;return this.connected&&!0===(null===(t=this.socket)||void 0===t?void 0:t.connected)}sendMessage(t,e){return fe(this,arguments,function*(){if(!this.connected||!this.socket||!this.config)return yield yield pe(this.formatError("Not Connected","Socket is not connected. Please check your connection.")),yield pe(void 0);const n=`msg_${Date.now()}_${crypto.randomUUID().slice(0,9)}`,i=this.buildPayload(t,e,n);try{const t=new Promise((t,e)=>{this.responseResolvers.set(n,{resolve:t,reject:e,chunks:[],isStreaming:!1}),setTimeout(()=>{const i=this.responseResolvers.get(n);i&&(i.chunks.length>0?t(i.chunks.join("")):e(new Error("Response timeout")),this.responseResolvers.delete(n))},this.config.responseTimeout)});if(console.log("[SocketProvider] Sending message:",this.config.events.send,i),this.socket.emit(this.config.events.send,i),this.config.events.stream){const e=this.responseResolvers.get(n);let i=0;const o=setInterval(()=>{e&&e.chunks.length>i&&(i=e.chunks.length)},50);try{const e=yield pe(t);clearInterval(o),yield yield pe(e)}catch(t){throw clearInterval(o),t}}else{const e=yield pe(t);yield yield pe(e)}}catch(t){const e=t instanceof Error?t.message:String(t);yield yield pe(this.formatError("Socket Error",e)),this.onError(t instanceof Error?t:new Error(String(t)))}})}buildPayload(t,e,n){var i,o,s;if(null===(i=this.config)||void 0===i?void 0:i.buildPayload){const i=this.config.buildPayload(t,e);return Object.assign(Object.assign({},i),{messageId:n})}return{messageId:n,message:t,text:t,threadId:null===(o=e.currentThread)||void 0===o?void 0:o.id,modules:e.selectedModules,metadata:e.metadata,files:null===(s=e.uploadedFiles)||void 0===s?void 0:s.map(t=>({id:t.id,name:t.name,type:t.type,url:t.url}))}}emit(t,e){this.socket&&this.connected&&this.socket.emit(t,e)}on(t,e){this.socket&&this.socket.on(t,e)}off(t,e){this.socket&&this.socket.off(t,e)}getSocket(){return this.socket}formatError(t,e){return`[ERROR_START][ERROR_TITLE_START]${t}[ERROR_TITLE_END]${e}[ERROR_END]`}onError(t){console.error("[SocketProvider] Error:",t)}}
2710
+ */var ue=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})},pe=function(t){return this instanceof pe?(this.v=t,this):new pe(t)},fe=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,o=n.apply(t,e||[]),s=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),r("next"),r("throw"),r("return",function(t){return function(e){return Promise.resolve(e).then(t,c)}}),i[Symbol.asyncIterator]=function(){return this},i;function r(t,e){o[t]&&(i[t]=function(e){return new Promise(function(n,i){s.push([t,e,n,i])>1||a(t,e)})},e&&(i[t]=e(i[t])))}function a(t,e){try{(n=o[t](e)).value instanceof pe?Promise.resolve(n.value.v).then(l,c):d(s[0][2],n)}catch(t){d(s[0][3],t)}var n}function l(t){a("next",t)}function c(t){a("throw",t)}function d(t,e){t(e),s.shift(),s.length&&a(s[0][0],s[0][1])}};const me={send:"message:send",response:"message:response",stream:"message:stream",error:"message:error",typingStart:"typing:start",typingEnd:"typing:end",toolCall:"tool:call",toolCallEnd:"tool:end"};class ge{constructor(){this.id="socket",this.name="Socket.io Provider",this.capabilities={streaming:!0,fileUpload:!1,modules:!1,functions:!1},this.socket=null,this.config=null,this.connected=!1,this.responseResolvers=new Map}connect(t){return ue(this,void 0,void 0,function*(){var e,n,i;if(!t.url)throw new Error("Socket URL is required");this.config=Object.assign(Object.assign({},t),{events:Object.assign(Object.assign({},me),t.events),autoReconnect:null===(e=t.autoReconnect)||void 0===e||e,reconnectionAttempts:null!==(n=t.reconnectionAttempts)&&void 0!==n?n:5,responseTimeout:null!==(i=t.responseTimeout)&&void 0!==i?i:3e4});const o=t.namespace?`${t.url}${t.namespace}`:t.url;return this.socket=h(o,{path:t.path||"/socket.io",transports:["websocket","polling"],autoConnect:!0,reconnection:this.config.autoReconnect,reconnectionAttempts:this.config.reconnectionAttempts,extraHeaders:t.headers}),new Promise((t,e)=>{const n=setTimeout(()=>{e(new Error("Socket connection timeout"))},1e4);this.socket.on("connect",()=>{clearTimeout(n),this.connected=!0,console.log("[SocketProvider] Connected:",this.socket.id),t()}),this.socket.on("connect_error",t=>{clearTimeout(n),console.error("[SocketProvider] Connection error:",t),e(t)}),this.socket.on("disconnect",t=>{this.connected=!1,console.log("[SocketProvider] Disconnected:",t)}),this.setupEventListeners()})})}setupEventListeners(){if(!this.socket||!this.config)return;const t=this.config.events;this.socket.on(t.response,t=>{console.log("[SocketProvider] Response received:",t);const e=this.extractMessageId(t),n=this.responseResolvers.get(e)||this.getLatestResolver();if(n){const i=this.extractMessage(t);n.resolve(i),this.responseResolvers.delete(e)}}),t.stream&&this.socket.on(t.stream,t=>{console.log("[SocketProvider] Stream chunk:",t);const e=this.extractMessageId(t),n=this.responseResolvers.get(e)||this.getLatestResolver();if(n){n.isStreaming=!0;const e=this.extractMessage(t);n.chunks.push(e)}}),t.error&&this.socket.on(t.error,t=>{console.error("[SocketProvider] Error event:",t);const e=this.extractMessageId(t),n=this.responseResolvers.get(e)||this.getLatestResolver();if(n){const i=t.error||t.message||"Unknown error";n.reject(new Error(i)),this.responseResolvers.delete(e)}}),t.toolCall&&this.socket.on(t.toolCall,t=>{var e;const n=t.name||t.toolName||t.function||"unknown";null===(e=this.onToolCall)||void 0===e||e.call(this,n)}),t.toolCallEnd&&this.socket.on(t.toolCallEnd,()=>{var t;null===(t=this.onToolCallEnd)||void 0===t||t.call(this)})}getLatestResolver(){const t=Array.from(this.responseResolvers.keys());return t.length>0?this.responseResolvers.get(t[t.length-1]):null}extractMessageId(t){return t.messageId||t.id||t.executionId||"default"}extractMessage(t){var e,n,i;return(null===(e=this.config)||void 0===e?void 0:e.extractMessage)?this.config.extractMessage(t):"string"==typeof t?t:t.message?t.message:t.text?t.text:t.response?t.response:t.content?t.content:(null===(n=t.data)||void 0===n?void 0:n.message)?t.data.message:(null===(i=t.data)||void 0===i?void 0:i.output)?JSON.stringify(t.data.output):JSON.stringify(t)}disconnect(){return ue(this,void 0,void 0,function*(){this.socket&&(this.socket.disconnect(),this.socket=null),this.connected=!1,this.responseResolvers.clear(),console.log("[SocketProvider] Disconnected")})}isConnected(){var t;return this.connected&&!0===(null===(t=this.socket)||void 0===t?void 0:t.connected)}sendMessage(t,e){return fe(this,arguments,function*(){if(!this.connected||!this.socket||!this.config)return yield yield pe(this.formatError("Not Connected","Socket is not connected. Please check your connection.")),yield pe(void 0);const n=`msg_${Date.now()}_${crypto.randomUUID().slice(0,9)}`,i=this.buildPayload(t,e,n);try{const t=new Promise((t,e)=>{this.responseResolvers.set(n,{resolve:t,reject:e,chunks:[],isStreaming:!1}),setTimeout(()=>{const i=this.responseResolvers.get(n);i&&(i.chunks.length>0?t(i.chunks.join("")):e(new Error("Response timeout")),this.responseResolvers.delete(n))},this.config.responseTimeout)});if(console.log("[SocketProvider] Sending message:",this.config.events.send,i),this.socket.emit(this.config.events.send,i),this.config.events.stream){const e=this.responseResolvers.get(n);let i=0;const o=setInterval(()=>{e&&e.chunks.length>i&&(i=e.chunks.length)},50);try{const e=yield pe(t);clearInterval(o),yield yield pe(e)}catch(t){throw clearInterval(o),t}}else{const e=yield pe(t);yield yield pe(e)}}catch(t){const e=t instanceof Error?t.message:String(t);yield yield pe(this.formatError("Socket Error",e)),this.onError(t instanceof Error?t:new Error(String(t)))}})}buildPayload(t,e,n){var i,o,s;if(null===(i=this.config)||void 0===i?void 0:i.buildPayload){const i=this.config.buildPayload(t,e);return Object.assign(Object.assign({},i),{messageId:n})}return{messageId:n,message:t,text:t,threadId:null===(o=e.currentThread)||void 0===o?void 0:o.id,modules:e.selectedModules,metadata:e.metadata,files:null===(s=e.uploadedFiles)||void 0===s?void 0:s.map(t=>({id:t.id,name:t.name,type:t.type,url:t.url}))}}emit(t,e){this.socket&&this.connected&&this.socket.emit(t,e)}on(t,e){this.socket&&this.socket.on(t,e)}off(t,e){this.socket&&this.socket.off(t,e)}getSocket(){return this.socket}formatError(t,e){return`[ERROR_START][ERROR_TITLE_START]${t}[ERROR_TITLE_END]${e}[ERROR_END]`}onError(t){console.error("[SocketProvider] Error:",t)}}
2705
2711
  /**
2706
2712
  * @license
2707
2713
  * Copyright 2024 Nuraly, Laabidi Aymen
@@ -2736,7 +2742,7 @@ var Gt=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){
2736
2742
  * @license
2737
2743
  * Copyright 2023 Nuraly, Laabidi Aymen
2738
2744
  * SPDX-License-Identifier: MIT
2739
- */var Oe=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};class Ie extends Ee{constructor(){super(...arguments),this.id="flight-card",this.name="Flight Card Plugin",this.version="1.0.0",this.htmlTags=[{name:"flight",open:"[FLIGHT]",close:"[/FLIGHT]"}],this.cssPrefix="nr-flight-card"}renderHtmlBlockPlaceholder(t){if("flight"!==t.toLowerCase())return"";return`<div data-placeholder-id="${`flight-skeleton-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}"><nr-skeleton \n active \n style="min-width: 400px; max-width: 600px; margin: 16px 0;"\n ></nr-skeleton></div>`}onInit(){console.log("[FlightCardPlugin] Initialized")}afterReceive(t){return Oe(this,void 0,void 0,function*(){try{const e=JSON.parse(t);if("flight"===e.type||this.isFlightData(e))return this.renderFlightCard(e)}catch(t){}const e=/\[FLIGHT\]([\s\S]*?)\[\/FLIGHT\]/g;let n,i=t;for(;null!==(n=e.exec(t));)try{const t=JSON.parse(n[1]),e=this.renderFlightCard(t);i=i.replace(n[0],e)}catch(t){console.warn("[FlightCardPlugin] Failed to parse flight data:",t)}return i})}renderHtmlBlock(t,e){if("flight"!==t.toLowerCase())return"";try{const t=JSON.parse(e);return this.renderFlightCard(t)}catch(t){return console.warn("[FlightCardPlugin] renderHtmlBlock parse error:",t),""}}isFlightData(t){return t&&"object"==typeof t&&t.origin&&t.destination&&t.departureTime}renderFlightCard(t){const{origin:e,destination:n,departureTime:i,arrivalTime:o,departureDate:s,arrivalDate:r,terminal:a,gate:l,arrivalTerminal:c,arrivalGate:d,duration:h,flightNumber:u,airline:p,status:f,updated:g,source:m}=t;return`\n ${this.getOncePerConversationStyleTag(this.getStyles())}\n <div class="${this.cssPrefix}" data-nr-flight-card="true">\n <div class="${this.cssPrefix}__header">\n <div class="${this.cssPrefix}__route">\n <span class="${this.cssPrefix}__airport-code">${this.escapeHtml(e)}</span>\n <div class="${this.cssPrefix}__flight-line">\n <svg class="${this.cssPrefix}__plane-icon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z" fill="currentColor"/>\n </svg>\n ${h?`<span class="${this.cssPrefix}__duration">${this.escapeHtml(h)}</span>`:""}\n </div>\n <span class="${this.cssPrefix}__airport-code">${this.escapeHtml(n)}</span>\n </div>\n ${u||p?`\n <div class="${this.cssPrefix}__flight-info">\n ${p?`<span class="${this.cssPrefix}__airline">${this.escapeHtml(p)}</span>`:""}\n ${u?`<span class="${this.cssPrefix}__flight-number">${this.escapeHtml(u)}</span>`:""}\n </div>\n `:""}\n </div>\n\n <div class="${this.cssPrefix}__details">\n <div class="${this.cssPrefix}__section ${this.cssPrefix}__section--departure">\n <div class="${this.cssPrefix}__label">Infos sur l'aéroport</div>\n <div class="${this.cssPrefix}__location">\n <span class="${this.cssPrefix}__city">${this.getCityName(e)}</span>\n <span class="${this.cssPrefix}__date">${s?this.escapeHtml(s):""}</span>\n </div>\n <div class="${this.cssPrefix}__time-group">\n <div class="${this.cssPrefix}__time-label">Heure de départ prévue</div>\n <div class="${this.cssPrefix}__time-value">${this.escapeHtml(i)}</div>\n </div>\n <div class="${this.cssPrefix}__terminal-gate">\n ${a?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Terminal</span>\n <span class="${this.cssPrefix}__info-value">${this.escapeHtml(a)}</span>\n </div>\n `:""}\n ${l?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Porte</span>\n <span class="${this.cssPrefix}__info-value">${this.escapeHtml(l)}</span>\n </div>\n `:void 0===l?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Porte</span>\n <span class="${this.cssPrefix}__info-value">-</span>\n </div>\n `:""}\n </div>\n </div>\n\n <div class="${this.cssPrefix}__divider"></div>\n\n <div class="${this.cssPrefix}__section ${this.cssPrefix}__section--arrival">\n <div class="${this.cssPrefix}__label">Infos sur l'aéroport</div>\n <div class="${this.cssPrefix}__location">\n <span class="${this.cssPrefix}__city">${this.getCityName(n)}</span>\n <span class="${this.cssPrefix}__date">${r?this.escapeHtml(r):""}</span>\n </div>\n <div class="${this.cssPrefix}__time-group">\n <div class="${this.cssPrefix}__time-label">Heure d'arrivée prévue</div>\n <div class="${this.cssPrefix}__time-value">${this.escapeHtml(o)}</div>\n </div>\n <div class="${this.cssPrefix}__terminal-gate">\n ${c?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Terminal</span>\n <span class="${this.cssPrefix}__info-value">${this.escapeHtml(c)}</span>\n </div>\n `:""}\n ${d?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Porte</span>\n <span class="${this.cssPrefix}__info-value">${this.escapeHtml(d)}</span>\n </div>\n `:void 0===d?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Porte</span>\n <span class="${this.cssPrefix}__info-value">-</span>\n </div>\n `:""}\n </div>\n </div>\n </div>\n\n ${g||m||f?`\n <div class="${this.cssPrefix}__footer">\n ${g?`<span class="${this.cssPrefix}__updated">${this.escapeHtml(g)}</span>`:""}\n ${m?`<span class="${this.cssPrefix}__source">Source : ${this.escapeHtml(m)}</span>`:""}\n ${f?`<span class="${this.cssPrefix}__status">${this.escapeHtml(f)}</span>`:""}\n </div>\n `:""}\n </div>\n `}getCityName(t){return{JED:"Djeddah",TUN:"Tunis",CDG:"Paris",LHR:"London",JFK:"New York",DXB:"Dubai",LAX:"Los Angeles",ORD:"Chicago",ATL:"Atlanta",DFW:"Dallas",DEN:"Denver",SFO:"San Francisco",SEA:"Seattle",LAS:"Las Vegas",MCO:"Orlando",MIA:"Miami",IAH:"Houston",PHX:"Phoenix",BOS:"Boston",MSP:"Minneapolis",DTW:"Detroit",FLL:"Fort Lauderdale",PHL:"Philadelphia",LGA:"New York",BWI:"Baltimore",SLC:"Salt Lake City",SAN:"San Diego",DCA:"Washington",TPA:"Tampa",PDX:"Portland",STL:"St. Louis"}[t.toUpperCase()]||t}escapeHtml(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}getStyles(){return`\n .${this.cssPrefix} {\n background: #ffffff;\n border-radius: 12px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n padding: 24px;\n margin: 16px 0;\n font-family: system-ui, -apple-system, sans-serif;\n max-width: 600px;\n }\n\n .${this.cssPrefix}__header {\n margin-bottom: 24px;\n }\n\n .${this.cssPrefix}__route {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n margin-bottom: 8px;\n }\n\n .${this.cssPrefix}__airport-code {\n font-size: 32px;\n font-weight: 700;\n color: #1a1a1a;\n letter-spacing: 0.5px;\n }\n\n .${this.cssPrefix}__flight-line {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n padding: 0 16px;\n }\n\n .${this.cssPrefix}__flight-line::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n height: 2px;\n background: linear-gradient(to right, #e0e0e0 0%, #e0e0e0 100%);\n z-index: 0;\n }\n\n .${this.cssPrefix}__plane-icon {\n width: 24px;\n height: 24px;\n color: #666;\n background: white;\n padding: 4px;\n position: relative;\n z-index: 1;\n transform: rotate(90deg);\n }\n\n .${this.cssPrefix}__duration {\n position: absolute;\n top: -24px;\n background: white;\n padding: 2px 8px;\n font-size: 13px;\n color: #666;\n white-space: nowrap;\n }\n\n .${this.cssPrefix}__flight-info {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: 14px;\n color: #666;\n }\n\n .${this.cssPrefix}__airline {\n font-weight: 500;\n }\n\n .${this.cssPrefix}__flight-number {\n color: #999;\n }\n\n .${this.cssPrefix}__details {\n display: grid;\n grid-template-columns: 1fr auto 1fr;\n gap: 24px;\n }\n\n .${this.cssPrefix}__divider {\n width: 1px;\n background: #e0e0e0;\n }\n\n .${this.cssPrefix}__section {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .${this.cssPrefix}__label {\n font-size: 12px;\n color: #999;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n font-weight: 500;\n text-decoration: underline;\n }\n\n .${this.cssPrefix}__location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .${this.cssPrefix}__city {\n font-size: 16px;\n font-weight: 600;\n color: #1a1a1a;\n }\n\n .${this.cssPrefix}__date {\n font-size: 13px;\n color: #666;\n }\n\n .${this.cssPrefix}__time-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .${this.cssPrefix}__time-label {\n font-size: 12px;\n color: #666;\n }\n\n .${this.cssPrefix}__time-value {\n font-size: 24px;\n font-weight: 700;\n color: #2d6a3e;\n }\n\n .${this.cssPrefix}__terminal-gate {\n display: flex;\n gap: 16px;\n }\n\n .${this.cssPrefix}__info-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .${this.cssPrefix}__info-label {\n font-size: 11px;\n color: #999;\n }\n\n .${this.cssPrefix}__info-value {\n font-size: 18px;\n font-weight: 600;\n color: #1a1a1a;\n }\n\n .${this.cssPrefix}__footer {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid #e0e0e0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 12px;\n color: #666;\n gap: 12px;\n }\n\n .${this.cssPrefix}__updated {\n color: #999;\n }\n\n .${this.cssPrefix}__source {\n color: #666;\n }\n\n .${this.cssPrefix}__source::before {\n content: '';\n display: inline-block;\n width: 4px;\n height: 4px;\n background: #666;\n border-radius: 50%;\n margin-right: 8px;\n vertical-align: middle;\n }\n\n .${this.cssPrefix}__status {\n padding: 4px 8px;\n background: #e8f5e9;\n color: #2d6a3e;\n border-radius: 4px;\n font-weight: 500;\n }\n\n /* Share button styling */\n .${this.cssPrefix}__footer button {\n background: none;\n border: none;\n color: #666;\n cursor: pointer;\n padding: 4px;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .${this.cssPrefix}__footer button:hover {\n color: #1a1a1a;\n }\n\n /* Dark mode support */\n @media (prefers-color-scheme: dark) {\n .${this.cssPrefix} {\n background: #2a2a2a;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);\n }\n\n .${this.cssPrefix}__airport-code,\n .${this.cssPrefix}__city,\n .${this.cssPrefix}__info-value {\n color: #ffffff;\n }\n\n .${this.cssPrefix}__flight-line::before {\n background: linear-gradient(to right, #444 0%, #444 100%);\n }\n\n .${this.cssPrefix}__plane-icon {\n background: #2a2a2a;\n color: #999;\n }\n\n .${this.cssPrefix}__duration {\n background: #2a2a2a;\n }\n\n .${this.cssPrefix}__divider {\n background: #444;\n }\n\n .${this.cssPrefix}__footer {\n border-top-color: #444;\n }\n }\n\n /* Responsive design */\n @media (max-width: 640px) {\n .${this.cssPrefix} {\n padding: 16px;\n }\n\n .${this.cssPrefix}__details {\n grid-template-columns: 1fr;\n gap: 16px;\n }\n\n .${this.cssPrefix}__divider {\n height: 1px;\n width: 100%;\n }\n\n .${this.cssPrefix}__airport-code {\n font-size: 24px;\n }\n\n .${this.cssPrefix}__time-value {\n font-size: 20px;\n }\n\n .${this.cssPrefix}__footer {\n flex-direction: column;\n align-items: flex-start;\n }\n }\n `}}
2745
+ */var Oe=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};class Ie extends Ee{constructor(){super(...arguments),this.id="flight-card",this.name="Flight Card Plugin",this.version="1.0.0",this.htmlTags=[{name:"flight",open:"[FLIGHT]",close:"[/FLIGHT]"}],this.cssPrefix="nr-flight-card"}renderHtmlBlockPlaceholder(t){if("flight"!==t.toLowerCase())return"";return`<div data-placeholder-id="${`flight-skeleton-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}"><nr-skeleton \n active \n style="min-width: 400px; max-width: 600px; margin: 16px 0;"\n ></nr-skeleton></div>`}onInit(){console.log("[FlightCardPlugin] Initialized")}afterReceive(t){return Oe(this,void 0,void 0,function*(){try{const e=JSON.parse(t);if("flight"===e.type||this.isFlightData(e))return this.renderFlightCard(e)}catch(t){}const e=/\[FLIGHT\]([\s\S]*?)\[\/FLIGHT\]/g;let n,i=t;for(;null!==(n=e.exec(t));)try{const t=JSON.parse(n[1]),e=this.renderFlightCard(t);i=i.replace(n[0],e)}catch(t){console.warn("[FlightCardPlugin] Failed to parse flight data:",t)}return i})}renderHtmlBlock(t,e){if("flight"!==t.toLowerCase())return"";try{const t=JSON.parse(e);return this.renderFlightCard(t)}catch(t){return console.warn("[FlightCardPlugin] renderHtmlBlock parse error:",t),""}}isFlightData(t){return t&&"object"==typeof t&&t.origin&&t.destination&&t.departureTime}renderFlightCard(t){const{origin:e,destination:n,departureTime:i,arrivalTime:o,departureDate:s,arrivalDate:r,terminal:a,gate:l,arrivalTerminal:c,arrivalGate:d,duration:h,flightNumber:u,airline:p,status:f,updated:m,source:g}=t;return`\n ${this.getOncePerConversationStyleTag(this.getStyles())}\n <div class="${this.cssPrefix}" data-nr-flight-card="true">\n <div class="${this.cssPrefix}__header">\n <div class="${this.cssPrefix}__route">\n <span class="${this.cssPrefix}__airport-code">${this.escapeHtml(e)}</span>\n <div class="${this.cssPrefix}__flight-line">\n <svg class="${this.cssPrefix}__plane-icon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z" fill="currentColor"/>\n </svg>\n ${h?`<span class="${this.cssPrefix}__duration">${this.escapeHtml(h)}</span>`:""}\n </div>\n <span class="${this.cssPrefix}__airport-code">${this.escapeHtml(n)}</span>\n </div>\n ${u||p?`\n <div class="${this.cssPrefix}__flight-info">\n ${p?`<span class="${this.cssPrefix}__airline">${this.escapeHtml(p)}</span>`:""}\n ${u?`<span class="${this.cssPrefix}__flight-number">${this.escapeHtml(u)}</span>`:""}\n </div>\n `:""}\n </div>\n\n <div class="${this.cssPrefix}__details">\n <div class="${this.cssPrefix}__section ${this.cssPrefix}__section--departure">\n <div class="${this.cssPrefix}__label">Infos sur l'aéroport</div>\n <div class="${this.cssPrefix}__location">\n <span class="${this.cssPrefix}__city">${this.getCityName(e)}</span>\n <span class="${this.cssPrefix}__date">${s?this.escapeHtml(s):""}</span>\n </div>\n <div class="${this.cssPrefix}__time-group">\n <div class="${this.cssPrefix}__time-label">Heure de départ prévue</div>\n <div class="${this.cssPrefix}__time-value">${this.escapeHtml(i)}</div>\n </div>\n <div class="${this.cssPrefix}__terminal-gate">\n ${a?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Terminal</span>\n <span class="${this.cssPrefix}__info-value">${this.escapeHtml(a)}</span>\n </div>\n `:""}\n ${l?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Porte</span>\n <span class="${this.cssPrefix}__info-value">${this.escapeHtml(l)}</span>\n </div>\n `:void 0===l?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Porte</span>\n <span class="${this.cssPrefix}__info-value">-</span>\n </div>\n `:""}\n </div>\n </div>\n\n <div class="${this.cssPrefix}__divider"></div>\n\n <div class="${this.cssPrefix}__section ${this.cssPrefix}__section--arrival">\n <div class="${this.cssPrefix}__label">Infos sur l'aéroport</div>\n <div class="${this.cssPrefix}__location">\n <span class="${this.cssPrefix}__city">${this.getCityName(n)}</span>\n <span class="${this.cssPrefix}__date">${r?this.escapeHtml(r):""}</span>\n </div>\n <div class="${this.cssPrefix}__time-group">\n <div class="${this.cssPrefix}__time-label">Heure d'arrivée prévue</div>\n <div class="${this.cssPrefix}__time-value">${this.escapeHtml(o)}</div>\n </div>\n <div class="${this.cssPrefix}__terminal-gate">\n ${c?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Terminal</span>\n <span class="${this.cssPrefix}__info-value">${this.escapeHtml(c)}</span>\n </div>\n `:""}\n ${d?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Porte</span>\n <span class="${this.cssPrefix}__info-value">${this.escapeHtml(d)}</span>\n </div>\n `:void 0===d?`\n <div class="${this.cssPrefix}__info-item">\n <span class="${this.cssPrefix}__info-label">Porte</span>\n <span class="${this.cssPrefix}__info-value">-</span>\n </div>\n `:""}\n </div>\n </div>\n </div>\n\n ${m||g||f?`\n <div class="${this.cssPrefix}__footer">\n ${m?`<span class="${this.cssPrefix}__updated">${this.escapeHtml(m)}</span>`:""}\n ${g?`<span class="${this.cssPrefix}__source">Source : ${this.escapeHtml(g)}</span>`:""}\n ${f?`<span class="${this.cssPrefix}__status">${this.escapeHtml(f)}</span>`:""}\n </div>\n `:""}\n </div>\n `}getCityName(t){return{JED:"Djeddah",TUN:"Tunis",CDG:"Paris",LHR:"London",JFK:"New York",DXB:"Dubai",LAX:"Los Angeles",ORD:"Chicago",ATL:"Atlanta",DFW:"Dallas",DEN:"Denver",SFO:"San Francisco",SEA:"Seattle",LAS:"Las Vegas",MCO:"Orlando",MIA:"Miami",IAH:"Houston",PHX:"Phoenix",BOS:"Boston",MSP:"Minneapolis",DTW:"Detroit",FLL:"Fort Lauderdale",PHL:"Philadelphia",LGA:"New York",BWI:"Baltimore",SLC:"Salt Lake City",SAN:"San Diego",DCA:"Washington",TPA:"Tampa",PDX:"Portland",STL:"St. Louis"}[t.toUpperCase()]||t}escapeHtml(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}getStyles(){return`\n .${this.cssPrefix} {\n background: #ffffff;\n border-radius: 12px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n padding: 24px;\n margin: 16px 0;\n font-family: system-ui, -apple-system, sans-serif;\n max-width: 600px;\n }\n\n .${this.cssPrefix}__header {\n margin-bottom: 24px;\n }\n\n .${this.cssPrefix}__route {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n margin-bottom: 8px;\n }\n\n .${this.cssPrefix}__airport-code {\n font-size: 32px;\n font-weight: 700;\n color: #1a1a1a;\n letter-spacing: 0.5px;\n }\n\n .${this.cssPrefix}__flight-line {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n padding: 0 16px;\n }\n\n .${this.cssPrefix}__flight-line::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 0;\n right: 0;\n height: 2px;\n background: linear-gradient(to right, #e0e0e0 0%, #e0e0e0 100%);\n z-index: 0;\n }\n\n .${this.cssPrefix}__plane-icon {\n width: 24px;\n height: 24px;\n color: #666;\n background: white;\n padding: 4px;\n position: relative;\n z-index: 1;\n transform: rotate(90deg);\n }\n\n .${this.cssPrefix}__duration {\n position: absolute;\n top: -24px;\n background: white;\n padding: 2px 8px;\n font-size: 13px;\n color: #666;\n white-space: nowrap;\n }\n\n .${this.cssPrefix}__flight-info {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: 14px;\n color: #666;\n }\n\n .${this.cssPrefix}__airline {\n font-weight: 500;\n }\n\n .${this.cssPrefix}__flight-number {\n color: #999;\n }\n\n .${this.cssPrefix}__details {\n display: grid;\n grid-template-columns: 1fr auto 1fr;\n gap: 24px;\n }\n\n .${this.cssPrefix}__divider {\n width: 1px;\n background: #e0e0e0;\n }\n\n .${this.cssPrefix}__section {\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n .${this.cssPrefix}__label {\n font-size: 12px;\n color: #999;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n font-weight: 500;\n text-decoration: underline;\n }\n\n .${this.cssPrefix}__location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .${this.cssPrefix}__city {\n font-size: 16px;\n font-weight: 600;\n color: #1a1a1a;\n }\n\n .${this.cssPrefix}__date {\n font-size: 13px;\n color: #666;\n }\n\n .${this.cssPrefix}__time-group {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .${this.cssPrefix}__time-label {\n font-size: 12px;\n color: #666;\n }\n\n .${this.cssPrefix}__time-value {\n font-size: 24px;\n font-weight: 700;\n color: #2d6a3e;\n }\n\n .${this.cssPrefix}__terminal-gate {\n display: flex;\n gap: 16px;\n }\n\n .${this.cssPrefix}__info-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .${this.cssPrefix}__info-label {\n font-size: 11px;\n color: #999;\n }\n\n .${this.cssPrefix}__info-value {\n font-size: 18px;\n font-weight: 600;\n color: #1a1a1a;\n }\n\n .${this.cssPrefix}__footer {\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid #e0e0e0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 12px;\n color: #666;\n gap: 12px;\n }\n\n .${this.cssPrefix}__updated {\n color: #999;\n }\n\n .${this.cssPrefix}__source {\n color: #666;\n }\n\n .${this.cssPrefix}__source::before {\n content: '';\n display: inline-block;\n width: 4px;\n height: 4px;\n background: #666;\n border-radius: 50%;\n margin-right: 8px;\n vertical-align: middle;\n }\n\n .${this.cssPrefix}__status {\n padding: 4px 8px;\n background: #e8f5e9;\n color: #2d6a3e;\n border-radius: 4px;\n font-weight: 500;\n }\n\n /* Share button styling */\n .${this.cssPrefix}__footer button {\n background: none;\n border: none;\n color: #666;\n cursor: pointer;\n padding: 4px;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .${this.cssPrefix}__footer button:hover {\n color: #1a1a1a;\n }\n\n /* Dark mode support */\n @media (prefers-color-scheme: dark) {\n .${this.cssPrefix} {\n background: #2a2a2a;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);\n }\n\n .${this.cssPrefix}__airport-code,\n .${this.cssPrefix}__city,\n .${this.cssPrefix}__info-value {\n color: #ffffff;\n }\n\n .${this.cssPrefix}__flight-line::before {\n background: linear-gradient(to right, #444 0%, #444 100%);\n }\n\n .${this.cssPrefix}__plane-icon {\n background: #2a2a2a;\n color: #999;\n }\n\n .${this.cssPrefix}__duration {\n background: #2a2a2a;\n }\n\n .${this.cssPrefix}__divider {\n background: #444;\n }\n\n .${this.cssPrefix}__footer {\n border-top-color: #444;\n }\n }\n\n /* Responsive design */\n @media (max-width: 640px) {\n .${this.cssPrefix} {\n padding: 16px;\n }\n\n .${this.cssPrefix}__details {\n grid-template-columns: 1fr;\n gap: 16px;\n }\n\n .${this.cssPrefix}__divider {\n height: 1px;\n width: 100%;\n }\n\n .${this.cssPrefix}__airport-code {\n font-size: 24px;\n }\n\n .${this.cssPrefix}__time-value {\n font-size: 20px;\n }\n\n .${this.cssPrefix}__footer {\n flex-direction: column;\n align-items: flex-start;\n }\n }\n `}}
2740
2746
  /**
2741
2747
  * @license
2742
2748
  * Copyright 2023 Nuraly, Laabidi Aymen
@@ -2784,4 +2790,4 @@ var Gt=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){
2784
2790
  * Pipeline:
2785
2791
  * input blob → AudioContext.decodeAudioData → BufferSource → MediaStreamDestination
2786
2792
  * → MediaRecorder(ogg/opus, 32 kbps) → output blob
2787
- */var Ye=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};const Xe="audio/ogg;codecs=opus";function Qe(){try{return"undefined"!=typeof MediaRecorder&&MediaRecorder.isTypeSupported(Xe)}catch(t){return!1}}var Ze=Object.freeze({__proto__:null,canEncodeOgg:Qe,compressToOpus:function(t,e){return Ye(this,void 0,void 0,function*(){if(!Qe()){const n=e.includes("mp4")?"mp4":e.includes("aac")?"aac":"webm";return{blob:t,mimeType:e,ext:n}}const n=yield t.arrayBuffer(),i=new AudioContext;let o;try{o=yield i.decodeAudioData(n)}finally{i.close().catch(()=>{})}const s=new AudioContext({sampleRate:o.sampleRate}),r=s.createMediaStreamDestination(),a=new MediaRecorder(r.stream,{mimeType:Xe,audioBitsPerSecond:32e3}),l=[];a.ondataavailable=t=>{t.data.size>0&&l.push(t.data)};const c=new Promise((t,e)=>{a.onstop=()=>t(),a.onerror=t=>{var n;return e(null!==(n=t.error)&&void 0!==n?n:new Error("MediaRecorder error"))}});a.start(100);const d=s.createBufferSource();return d.buffer=o,d.connect(r),d.onended=()=>{setTimeout(()=>{"recording"===a.state&&a.stop()},120)},d.start(0),yield c,s.close().catch(()=>{}),{blob:new Blob(l,{type:Xe}),mimeType:Xe,ext:"ogg"}})}});export{Te as AnalyticsPlugin,je as ArtifactPlugin,Ee as ChatPluginBase,Q as ChatbotActionType,Kt as ChatbotCoreController,X as ChatbotFileType,V as ChatbotLoadingType,Y as ChatbotMessageState,Ke as ChatbotScrollController,q as ChatbotSender,G as ChatbotSize,K as ChatbotVariant,ie as CustomAPIProvider,ot as DEFAULT_ALLOWED_FILE_TYPES,it as DEFAULT_MAX_FILES,nt as DEFAULT_MAX_FILE_SIZE,et as DEFAULT_MAX_MESSAGES,tt as DEFAULT_TYPING_DELAY,Z as EMPTY_STRING,Tt as EventBus,st as FILE_TYPE_MAPPINGS,At as FileHandler,Ie as FlightCardPlugin,Ue as FlowDiagramPlugin,Ge as IndexedDBStorage,De as JsonGraphRendererPlugin,Ve as LocalStorageAdapter,ze as MarkdownPlugin,qe as MemoryStorage,zt as MessageHandler,de as MockProvider,he as MockProviders,jt as ModuleHandler,Se as NativeWebSocketProvider,Mt as NrChatbotElement,Zt as OpenAIProvider,Me as PersistencePlugin,Jt as PluginService,Re as PrintJobCardPlugin,Nt as ProviderService,He as SelectionCardPlugin,me as SocketProvider,Ct as StateHandler,Wt as StorageService,Dt as SuggestionHandler,It as ThreadHandler,Et as ValidationError,Lt as ValidationService,xe as WorkflowSocketProvider};
2793
+ */var Ye=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};const Xe="audio/ogg;codecs=opus";function Qe(){try{return"undefined"!=typeof MediaRecorder&&MediaRecorder.isTypeSupported(Xe)}catch(t){return!1}}var Ze=Object.freeze({__proto__:null,canEncodeOgg:Qe,compressToOpus:function(t,e){return Ye(this,void 0,void 0,function*(){if(!Qe()){const n=e.includes("mp4")?"mp4":e.includes("aac")?"aac":"webm";return{blob:t,mimeType:e,ext:n}}const n=yield t.arrayBuffer(),i=new AudioContext;let o;try{o=yield i.decodeAudioData(n)}finally{i.close().catch(()=>{})}const s=new AudioContext({sampleRate:o.sampleRate}),r=s.createMediaStreamDestination(),a=new MediaRecorder(r.stream,{mimeType:Xe,audioBitsPerSecond:32e3}),l=[];a.ondataavailable=t=>{t.data.size>0&&l.push(t.data)};const c=new Promise((t,e)=>{a.onstop=()=>t(),a.onerror=t=>{var n;return e(null!==(n=t.error)&&void 0!==n?n:new Error("MediaRecorder error"))}});a.start(100);const d=s.createBufferSource();return d.buffer=o,d.connect(r),d.onended=()=>{setTimeout(()=>{"recording"===a.state&&a.stop()},120)},d.start(0),yield c,s.close().catch(()=>{}),{blob:new Blob(l,{type:Xe}),mimeType:Xe,ext:"ogg"}})}});export{Te as AnalyticsPlugin,je as ArtifactPlugin,Ee as ChatPluginBase,Q as ChatbotActionType,Kt as ChatbotCoreController,X as ChatbotFileType,V as ChatbotLoadingType,Y as ChatbotMessageState,Ke as ChatbotScrollController,q as ChatbotSender,G as ChatbotSize,K as ChatbotVariant,ie as CustomAPIProvider,ot as DEFAULT_ALLOWED_FILE_TYPES,it as DEFAULT_MAX_FILES,nt as DEFAULT_MAX_FILE_SIZE,et as DEFAULT_MAX_MESSAGES,tt as DEFAULT_TYPING_DELAY,Z as EMPTY_STRING,Tt as EventBus,st as FILE_TYPE_MAPPINGS,At as FileHandler,Ie as FlightCardPlugin,Ue as FlowDiagramPlugin,Ge as IndexedDBStorage,De as JsonGraphRendererPlugin,Ve as LocalStorageAdapter,ze as MarkdownPlugin,qe as MemoryStorage,zt as MessageHandler,de as MockProvider,he as MockProviders,jt as ModuleHandler,Se as NativeWebSocketProvider,Mt as NrChatbotElement,Zt as OpenAIProvider,Me as PersistencePlugin,Jt as PluginService,Re as PrintJobCardPlugin,Nt as ProviderService,He as SelectionCardPlugin,ge as SocketProvider,Ct as StateHandler,Wt as StorageService,Dt as SuggestionHandler,It as ThreadHandler,Et as ValidationError,Lt as ValidationService,xe as WorkflowSocketProvider};
@@ -288,14 +288,20 @@ export default css `
288
288
  }
289
289
 
290
290
  .thread-item__actions {
291
- display: none;
291
+ display: flex;
292
292
  align-items: center;
293
293
  gap: 2px;
294
294
  flex-shrink: 0;
295
+ opacity: 0;
296
+ pointer-events: none;
297
+ transition: opacity 0.15s ease;
295
298
  }
296
299
 
297
- .thread-item:hover .thread-item__actions {
298
- display: flex;
300
+ .thread-item:hover .thread-item__actions,
301
+ .thread-item--active .thread-item__actions,
302
+ .thread-item:focus-within .thread-item__actions {
303
+ opacity: 1;
304
+ pointer-events: auto;
299
305
  }
300
306
 
301
307
  .thread-item__action-btn {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuraly/lumenui",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "A comprehensive collection of enterprise-class web components built with Lit and TypeScript",
5
5
  "type": "module",
6
6
  "main": "dist/nuralyui.bundle.js",