codicent-app-sdk 0.3.57 → 0.3.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +75 -43
  2. package/dist/cjs/components/Button.js +1 -1
  3. package/dist/cjs/components/MessageItem.js +1 -1
  4. package/dist/cjs/components/Profile.js +1 -1
  5. package/dist/cjs/config/index.d.ts +13 -0
  6. package/dist/cjs/config/index.d.ts.map +1 -1
  7. package/dist/cjs/config/index.js +1 -1
  8. package/dist/cjs/hooks/useAudioRecorder.d.ts.map +1 -1
  9. package/dist/cjs/hooks/useAudioRecorder.js +1 -1
  10. package/dist/cjs/hooks/useCodicentApp.d.ts.map +1 -1
  11. package/dist/cjs/hooks/useCodicentApp.js +1 -1
  12. package/dist/cjs/index.js +1 -1
  13. package/dist/cjs/node_modules/@fluentui/react-icons/lib/icons/chunk-0.js +1 -1
  14. package/dist/cjs/node_modules/@fluentui/react-icons/lib/icons/chunk-3.js +1 -1
  15. package/dist/cjs/node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-13.js +1 -1
  16. package/dist/cjs/node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-6.js +1 -1
  17. package/dist/cjs/node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-7.js +1 -1
  18. package/dist/cjs/node_modules/nosleep.js/src/index.js +1 -0
  19. package/dist/cjs/node_modules/nosleep.js/src/media.js +1 -0
  20. package/dist/cjs/pages/Login.d.ts +1 -0
  21. package/dist/cjs/pages/Login.d.ts.map +1 -1
  22. package/dist/cjs/pages/Login.js +1 -1
  23. package/dist/cjs/utils/withWakeLock.d.ts.map +1 -1
  24. package/dist/cjs/utils/withWakeLock.js +1 -1
  25. package/dist/esm/components/Button.js +1 -1
  26. package/dist/esm/components/MessageItem.js +1 -1
  27. package/dist/esm/components/Profile.js +1 -1
  28. package/dist/esm/config/index.d.ts +13 -0
  29. package/dist/esm/config/index.d.ts.map +1 -1
  30. package/dist/esm/config/index.js +1 -1
  31. package/dist/esm/hooks/useAudioRecorder.d.ts.map +1 -1
  32. package/dist/esm/hooks/useAudioRecorder.js +1 -1
  33. package/dist/esm/hooks/useCodicentApp.d.ts.map +1 -1
  34. package/dist/esm/hooks/useCodicentApp.js +1 -1
  35. package/dist/esm/index.js +1 -1
  36. package/dist/esm/node_modules/@fluentui/react-icons/lib/icons/chunk-0.js +1 -1
  37. package/dist/esm/node_modules/@fluentui/react-icons/lib/icons/chunk-3.js +1 -1
  38. package/dist/esm/node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-13.js +1 -1
  39. package/dist/esm/node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-6.js +1 -1
  40. package/dist/esm/node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-7.js +1 -1
  41. package/dist/esm/node_modules/nosleep.js/src/index.js +1 -0
  42. package/dist/esm/node_modules/nosleep.js/src/media.js +1 -0
  43. package/dist/esm/pages/Login.d.ts +1 -0
  44. package/dist/esm/pages/Login.d.ts.map +1 -1
  45. package/dist/esm/pages/Login.js +1 -1
  46. package/dist/esm/utils/withWakeLock.d.ts.map +1 -1
  47. package/dist/esm/utils/withWakeLock.js +1 -1
  48. package/dist/index.d.ts +15 -2
  49. package/package.json +7 -5
package/README.md CHANGED
@@ -1,84 +1,105 @@
1
+
1
2
  # Codicent App SDK
2
3
 
3
- A comprehensive SDK for building AI-powered applications with Codicent.
4
+ ![Build Status](https://img.shields.io/github/actions/workflow/status/izaxon/codicent-app-sdk/main.yml?branch=main)
5
+ ![License](https://img.shields.io/github/license/izaxon/codicent-app-sdk)
6
+
7
+ **A comprehensive SDK for building AI-powered, chat-centric web applications with Codicent.**
8
+
9
+ Codicent App SDK provides React components, hooks, and utilities to help you quickly build, customize, and deploy modern AI-powered apps. It is designed for rapid prototyping and production use, with built-in support for chat, markdown rendering, file uploads, and more.
10
+
11
+ ---
12
+
13
+ ## 🚀 Quick Start
14
+
15
+ 1. **Install the SDK**
16
+ ```bash
17
+ npm install codicent-app-sdk
18
+ # or
19
+ yarn add codicent-app-sdk
20
+ ```
21
+
22
+ 2. **Initialize the SDK**
23
+ ```tsx
24
+ import { initCodicentApp } from 'codicent-app-sdk';
25
+
26
+ initCodicentApp({
27
+ API_BASE_URL: 'https://codicent.com/',
28
+ APP_NAME: 'my-app',
29
+ // ...other config
30
+ });
31
+ ```
32
+
33
+ 3. **Use Components and Hooks**
34
+ ```tsx
35
+ import { useChat, Markdown } from 'codicent-app-sdk';
36
+ // ...
37
+ ```
38
+
39
+ ---
4
40
 
5
- ## Installation
6
41
 
7
- ### Install from GitHub (Recommended for now)
42
+ ## Installation
8
43
 
44
+ ### From GitHub (Recommended)
9
45
  ```bash
10
46
  npm install github:izaxon/codicent-app-sdk
11
47
  # or
12
48
  yarn add github:izaxon/codicent-app-sdk
13
49
  ```
14
50
 
15
- ### Install from NPM (Coming soon)
16
-
51
+ ### From npm (Coming soon)
17
52
  ```bash
18
53
  npm install @izaxon/codicent-app-sdk
19
54
  # or
20
55
  yarn add @izaxon/codicent-app-sdk
21
56
  ```
22
57
 
23
- ## Usage
24
-
25
- Import components and utilities:
26
58
 
27
- ```tsx
28
- import { CodicentService, useChat, Markdown } from 'codicent-app-sdk';
29
- ```
59
+ ## Usage
30
60
 
31
- ### Configuration
61
+ ### Initialization & Configuration
32
62
 
33
- Before using the SDK, you need to initialize it with your configuration settings:
63
+ Before using the SDK, initialize it with your app’s settings:
34
64
 
35
65
  ```tsx
36
66
  import { initCodicentApp } from 'codicent-app-sdk';
37
67
 
38
- // Initialize with your configuration
39
68
  initCodicentApp({
40
69
  API_BASE_URL: 'https://codicent.com/',
41
70
  APP_NAME: 'my-app',
42
- // Add other required settings
71
+ // ...other config
43
72
  });
44
73
  ```
45
74
 
46
- #### Configuration Options
47
-
48
- The SDK supports the following configuration options:
49
75
 
50
- ```tsx
51
- // Required configuration
52
- const requiredConfig = {
53
- API_BASE_URL: 'https://codicent.com/',
54
- APP_NAME: 'my-app',
55
- APP_PREFIX: 'myapp',
56
- USER_PREFIX: 'users',
57
- };
76
+ #### Configuration Options
58
77
 
59
- // Optional configuration with defaults
60
- const optionalConfig = {
61
- BUTTON_BORDER_RADIUS: '4px',
62
- BUTTON_BACKGROUND_COLOR: '#0078D4',
63
- DEFAULT_LANGUAGE: 'en',
64
- SUBSCRIPTION_NEEDED: false,
65
- // ...other options
66
- };
78
+ **Required:**
79
+ ```js
80
+ API_BASE_URL: string // e.g. 'https://codicent.com/'
81
+ APP_NAME: string // e.g. 'my-app'
82
+ APP_PREFIX: string // e.g. 'myapp'
83
+ USER_PREFIX: string // e.g. 'users'
84
+ ```
67
85
 
68
- initCodicentApp({
69
- ...requiredConfig,
70
- ...optionalConfig
71
- });
86
+ **Optional:**
87
+ ```js
88
+ BUTTON_BORDER_RADIUS: string
89
+ BUTTON_BACKGROUND_COLOR: string
90
+ DEFAULT_LANGUAGE: string
91
+ SUBSCRIPTION_NEEDED: boolean
92
+ // ...and more
72
93
  ```
73
94
 
74
- ### Basic Example
95
+
96
+ ### Example: Simple Chat App
75
97
 
76
98
  ```tsx
77
99
  import React from 'react';
78
- import { CodicentService, useChat, Markdown, init } from 'codicent-app-sdk';
100
+ import { CodicentService, useChat, Markdown, initCodicentApp } from 'codicent-app-sdk';
79
101
 
80
- // Initialize SDK first
81
- init({
102
+ initCodicentApp({
82
103
  API_BASE_URL: 'https://codicent.com/',
83
104
  APP_NAME: 'my-app',
84
105
  APP_PREFIX: 'myapp',
@@ -87,7 +108,6 @@ init({
87
108
 
88
109
  const App = () => {
89
110
  const codicentService = new CodicentService();
90
-
91
111
  const { messages, sendMessage } = useChat(codicentService);
92
112
 
93
113
  return (
@@ -103,6 +123,18 @@ const App = () => {
103
123
  };
104
124
  ```
105
125
 
126
+ ---
127
+
128
+ ## Features
129
+
130
+ - **React Components:** Chat UI, Markdown, File Upload, Audio, and more
131
+ - **Hooks:** Chat state, authentication, localization, theme, and more
132
+ - **Utilities:** Helpers for app state, device, logging, and more
133
+ - **TypeScript Support:** Full typings for all exports
134
+ - **Customizable:** Theming and configuration options
135
+
136
+ ---
137
+
106
138
  ## Development
107
139
 
108
140
  ### Building and Publishing
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),u=require("../config/index.js"),r=require("../node_modules/@griffel/react/makeStyles.esm.js"),s=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-1.js"),i=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-4.js"),l=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-14.js"),n=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-11.js"),o=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-12.js"),a=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-3.js"),t=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js"),c=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js"),d=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-5.js"),g=require("../node_modules/@fluentui/react-button/lib/components/Button/Button.js"),R=require("../node_modules/@griffel/core/mergeClasses.esm.js");const j=r.makeStyles({button:{borderRadius:u.getConfigValue("BUTTON_BORDER_RADIUS")||void 0}}),m={DismissRegular:e.jsx(s.DismissRegular,{}),CopyRegular:e.jsx(s.CopyRegular,{}),ShareRegular:e.jsx(i.ShareRegular,{}),SignOut24Regular:e.jsx(l.SignOut24Regular,{}),Payment24Regular:e.jsx(n.Payment24Regular,{}),SlideText24Regular:e.jsx(l.SlideText24Regular,{}),QuestionCircle24Regular:e.jsx(o.QuestionCircle24Regular,{}),SendFilled:e.jsx(a.SendFilled,{}),AttachRegular:e.jsx(t.AttachRegular,{}),ImageRegular:e.jsx(c.ImageRegular,{}),CameraRegular:e.jsx(t.CameraRegular,{}),LocationRegular:e.jsx(c.LocationRegular,{}),LocationFilled:e.jsx(c.LocationFilled,{}),AddRegular:e.jsx(t.AddRegular,{}),ChevronRightFilled:e.jsx(s.ChevronRightFilled,{}),ArrowClockwiseRegular:e.jsx(t.ArrowClockwiseRegular,{}),WandRegular:e.jsx(d.WandRegular,{})};exports.Button=({children:u,className:r,icon:s,image:i,...l})=>{const n=j();return e.jsx(g.Button,{className:R.mergeClasses(r,n.button),icon:s?{children:m[s]}:i?{children:i}:void 0,...l,children:u})};
1
+ "use strict";var e=require("react/jsx-runtime"),u=require("../config/index.js"),r=require("../node_modules/@griffel/react/makeStyles.esm.js"),s=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-1.js"),i=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-4.js"),l=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-14.js"),n=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-11.js"),o=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-13.js"),a=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-3.js"),t=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js"),c=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js"),d=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-5.js"),g=require("../node_modules/@fluentui/react-button/lib/components/Button/Button.js"),R=require("../node_modules/@griffel/core/mergeClasses.esm.js");const j=r.makeStyles({button:{borderRadius:u.getConfigValue("BUTTON_BORDER_RADIUS")||void 0}}),m={DismissRegular:e.jsx(s.DismissRegular,{}),CopyRegular:e.jsx(s.CopyRegular,{}),ShareRegular:e.jsx(i.ShareRegular,{}),SignOut24Regular:e.jsx(l.SignOut24Regular,{}),Payment24Regular:e.jsx(n.Payment24Regular,{}),SlideText24Regular:e.jsx(l.SlideText24Regular,{}),QuestionCircle24Regular:e.jsx(o.QuestionCircle24Regular,{}),SendFilled:e.jsx(a.SendFilled,{}),AttachRegular:e.jsx(t.AttachRegular,{}),ImageRegular:e.jsx(c.ImageRegular,{}),CameraRegular:e.jsx(t.CameraRegular,{}),LocationRegular:e.jsx(c.LocationRegular,{}),LocationFilled:e.jsx(c.LocationFilled,{}),AddRegular:e.jsx(t.AddRegular,{}),ChevronRightFilled:e.jsx(s.ChevronRightFilled,{}),ArrowClockwiseRegular:e.jsx(t.ArrowClockwiseRegular,{}),WandRegular:e.jsx(d.WandRegular,{})};exports.Button=({children:u,className:r,icon:s,image:i,...l})=>{const n=j();return e.jsx(g.Button,{className:R.mergeClasses(r,n.button),icon:s?{children:m[s]}:i?{children:i}:void 0,...l,children:u})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("react-router-dom"),i=require("../services/codicent.js"),s=require("./Markdown.js");require("./Textarea.js"),require("./Button.js");var n=require("./Text.js");require("./Spinner.js"),require("./TextHeader.js"),require("./TypingIndicator.js"),require("./Dialog.js"),require("./ChatInput.js"),require("./CombinedPlaceholderDialog.js"),require("./ChatMessage.js"),require("./Header.js");var o=require("../utils/MessageContent.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js");var a=require("../config/index.js");require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("../pages/AppFrame.js"),require("../pages/Snap.js"),require("../pages/Search.js"),require("../pages/Login.js"),require("../pages/CrmPage.js"),require("../pages/ImageView.js"),require("../pages/FormInvite.js"),require("../pages/FormAccept.js"),require("../pages/Sales.js"),require("../stores/chatStore.js");var l=require("../hooks/useLocalization.js");require("../hooks/useAppStyles.js");var u=require("./FileThumbnail.js");require("./MessageInput.js"),require("./UploadFile.js"),require("./SnapFooter.js"),require("./Profile.js"),require("./Content.js"),require("./AiInput.js"),require("./SearchBox.js"),require("./HtmlView.js"),require("./Footer.js"),require("./Page.js");var d=require("../node_modules/@griffel/react/makeStyles.esm.js"),c=require("../node_modules/@fluentui/react-card/lib/components/Card/Card.js"),m=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js"),g=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js"),p=require("../node_modules/@fluentui/react-card/lib/components/CardHeader/CardHeader.js"),h=require("../node_modules/@fluentui/react-skeleton/lib/components/Skeleton/Skeleton.js"),j=require("../node_modules/@fluentui/react-skeleton/lib/components/SkeletonItem/SkeletonItem.js"),x=require("../node_modules/@fluentui/react-text/lib/components/presets/Caption1/Caption1.js"),f=require("../node_modules/@fluentui/tokens/lib/tokens.js"),q=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-6.js");const S=d.makeStyles({iframe:{border:"none",width:"100%",height:"100%"},main:{gap:"36px",display:"flex",flexDirection:"column",flexWrap:"wrap"},card:{minWidth:"300px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",maxHeight:"11em",borderRadius:"10px",position:"relative"},expandedCard:{minWidth:"320px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",borderRadius:"10px",position:"relative"},text:{margin:"0.5em",whiteSpace:"normal",fontSize:"larger"},caption:{color:f.tokens.colorNeutralForeground3},headerImage:{borderRadius:"4px",maxWidth:"44px",maxHeight:"44px"},rectangle:{margin:0,top:"-5px",left:"-2px",width:"5px",position:"absolute",height:"100%"},fileList:{display:"flex",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin",msOverflowStyle:"none",padding:"4px",margin:"0 -4px",maxWidth:"100%",boxSizing:"border-box","&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:f.tokens.colorNeutralStroke1,borderRadius:"3px"}},htmlButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},headerButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},iconButtonRow:{position:"absolute",top:"0.5em",right:"0.5em",display:"flex",alignItems:"center",gap:"0.5em",zIndex:2},content:{overflow:"hidden",transition:"max-height 0.3s ease-out",userSelect:"text"},truncated:{maxHeight:"10em"},header:{display:"flex",flexDirection:"row",gap:"0.5em"}});exports.default=({header:d,description:f,timestamp:b,text:k,image:C,tags:I,id:v,fileIds:O,codicentService:_,busy:w,onEdit:E,onShowHtmlPreview:N})=>{const T=S(),A=t.useNavigate(),[y,R]=r.useState(!1),[F,B]=r.useState(!1),L=r.useRef(null),H=Object.keys(a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")),P=H.find((e=>I.includes(e)))||(O.length>0?H.find((e=>"file"===e)):void 0),[D,G]=r.useState([]),{t:M}=l.default(),z=["TYPE","CUSTOMER","CONTACT","SALESPERSON","MESSAGE","COMPANY","PHONE","EMAIL","WEBSITE","INFO","FÖRETAG","ROLE","KONTAKT"],V=[M("Typ"),M("Kund"),M("Kontakt"),M("Säljare"),M("Meddelande"),M("Företag"),M("Telefon"),M("E-post"),M("Hemsida"),M("Info"),M("Företag"),M("Roll"),M("Kontakt")];r.useEffect((()=>{Promise.all(O.map((e=>_.getFileInfo(e)))).then((e=>{G(e)}))}),[_,G,O]),r.useEffect((()=>{const e=()=>{if(L.current){const e=L.current.scrollHeight>100+(D.length>0?-72:0);B(e)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[k,D]);const K=()=>R(!y),W=I.includes("chat")&&(k.includes("#function_result")||k.includes("#finish_reason_function_call")),$=e=>{const r=e.indexOf("```html");if(-1===r)return e;const t=e.indexOf("```",r+7);if(-1===t)return e.substring(r+7);return e.substring(r+7,t)},U=new o.default(k).data,Y=P&&a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].editable,X=P&&a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].imageSize||void 0;return e.jsxs(c.Card,{className:y?T.expandedCard:T.card,style:{backgroundColor:a.getConfigValue("MESSAGE_HIDE_BAR")?P?a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].color:a.getConfigValue("APP_HEADER_COLOR")||"#eee":"#eee"},onClick:I.includes("chat")?e=>{I.includes("chat")&&(e&&e.stopPropagation(),A("/chat?id="+v))}:void 0,children:[!a.getConfigValue("MESSAGE_HIDE_BAR")&&e.jsx("div",{className:T.rectangle,style:{backgroundColor:P?a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].color:a.getConfigValue("APP_HEADER_COLOR")||void 0}}),e.jsxs("div",{className:T.iconButtonRow,children:[Y&&E&&e.jsx(q.Edit20Regular,{className:T.htmlButton,onClick:()=>E()}),N&&!Y&&I.includes("html")&&e.jsx(m.FullScreenMaximizeRegular,{className:T.htmlButton,onClick:e=>{e.stopPropagation(),N($(k))}}),F&&!I.includes("chat")&&y&&e.jsx(g.ArrowCollapseAllRegular,{className:T.headerButton,onClick:K}),F&&!I.includes("chat")&&!y&&e.jsx(g.ArrowExpandAllRegular,{className:T.headerButton,onClick:K})]}),e.jsx(p.CardHeader,{image:C?e.jsx("img",{className:T.headerImage,src:"app_logo.svg",alt:"User"}):null,header:w?e.jsx(h.Skeleton,{style:{width:"50%"},children:e.jsx(j.SkeletonItem,{})}):e.jsxs("div",{className:T.header,children:[e.jsx(n.Text,{weight:"semibold",children:d}),b&&e.jsx(n.Text,{weight:"regular",children:b})]}),description:e.jsx(x.Caption1,{className:T.caption,children:f})}),e.jsxs("div",{ref:L,className:`${T.content} ${y?"":T.truncated}`,children:[D.length>0&&e.jsx("div",{className:T.fileList,children:D.map((r=>e.jsx(u.FileThumbnail,{file:r,thumbnailSize:X,getImageUrl:i.CodicentService.getImageUrl,onClick:()=>{r.contentType.startsWith("image")?A(`/image?id=${v}&file=${r.id}`):i.CodicentService.downloadFile(r)}},r.id)))}),w?e.jsxs(h.Skeleton,{style:{width:"100%"},children:[e.jsx(j.SkeletonItem,{}),e.jsx(j.SkeletonItem,{}),e.jsx(j.SkeletonItem,{}),e.jsx(j.SkeletonItem,{}),e.jsx(j.SkeletonItem,{})]}):e.jsx("div",{className:T.text,children:I.includes("html")?e.jsx("iframe",{className:T.iframe,title:"html",srcDoc:$(k),sandbox:"allow-same-origin allow-scripts"}):I.includes("crm")&&0===Object.keys(U).length?e.jsx(s.default,{content:W?"*Tänker...*":U?(()=>{const e=new RegExp(`(${z.join("|")})\\s*:\\s*`,"gi"),r=k.replace(e,((e,r)=>{const t=z.indexOf(r.toUpperCase());-1===t&&console.log("Field not found:",r);return`\n**${-1!==t?V[t]:r}:** `}));return r.trim()})():k}):e.jsx(s.default,{content:W?"*Tänker...*":U&&U&&Object.keys(U).length>0?Object.keys(U).map((e=>{const r=z.indexOf(e.toUpperCase());return`**${-1!==r?V[r]:e}:** ${U[e]}\n`})).join("\n"):k})})]})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("react-router-dom"),i=require("../services/codicent.js"),s=require("./Markdown.js");require("./Textarea.js"),require("./Button.js");var n=require("./Text.js");require("./Spinner.js"),require("./TextHeader.js"),require("./TypingIndicator.js"),require("./Dialog.js"),require("./ChatInput.js"),require("./CombinedPlaceholderDialog.js"),require("./ChatMessage.js"),require("./Header.js");var o=require("../utils/MessageContent.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js");var a=require("../config/index.js");require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("../pages/AppFrame.js"),require("../pages/Snap.js"),require("../pages/Search.js"),require("../pages/Login.js"),require("../pages/CrmPage.js"),require("../pages/ImageView.js"),require("../pages/FormInvite.js"),require("../pages/FormAccept.js"),require("../pages/Sales.js"),require("../stores/chatStore.js");var l=require("../hooks/useLocalization.js");require("../hooks/useAppStyles.js");var u=require("./FileThumbnail.js");require("./MessageInput.js"),require("./UploadFile.js"),require("./SnapFooter.js"),require("./Profile.js"),require("./Content.js"),require("./AiInput.js"),require("./SearchBox.js"),require("./HtmlView.js"),require("./Footer.js"),require("./Page.js");var d=require("../node_modules/@griffel/react/makeStyles.esm.js"),c=require("../node_modules/@fluentui/react-card/lib/components/Card/Card.js"),m=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js"),g=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js"),p=require("../node_modules/@fluentui/react-card/lib/components/CardHeader/CardHeader.js"),h=require("../node_modules/@fluentui/react-skeleton/lib/components/Skeleton/Skeleton.js"),j=require("../node_modules/@fluentui/react-skeleton/lib/components/SkeletonItem/SkeletonItem.js"),x=require("../node_modules/@fluentui/react-text/lib/components/presets/Caption1/Caption1.js"),f=require("../node_modules/@fluentui/tokens/lib/tokens.js"),q=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-7.js");const S=d.makeStyles({iframe:{border:"none",width:"100%",height:"100%"},main:{gap:"36px",display:"flex",flexDirection:"column",flexWrap:"wrap"},card:{minWidth:"300px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",maxHeight:"11em",borderRadius:"10px",position:"relative"},expandedCard:{minWidth:"320px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",borderRadius:"10px",position:"relative"},text:{margin:"0.5em",whiteSpace:"normal",fontSize:"larger"},caption:{color:f.tokens.colorNeutralForeground3},headerImage:{borderRadius:"4px",maxWidth:"44px",maxHeight:"44px"},rectangle:{margin:0,top:"-5px",left:"-2px",width:"5px",position:"absolute",height:"100%"},fileList:{display:"flex",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin",msOverflowStyle:"none",padding:"4px",margin:"0 -4px",maxWidth:"100%",boxSizing:"border-box","&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:f.tokens.colorNeutralStroke1,borderRadius:"3px"}},htmlButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},headerButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},iconButtonRow:{position:"absolute",top:"0.5em",right:"0.5em",display:"flex",alignItems:"center",gap:"0.5em",zIndex:2},content:{overflow:"hidden",transition:"max-height 0.3s ease-out",userSelect:"text"},truncated:{maxHeight:"10em"},header:{display:"flex",flexDirection:"row",gap:"0.5em"}});exports.default=({header:d,description:f,timestamp:b,text:k,image:C,tags:I,id:v,fileIds:O,codicentService:_,busy:w,onEdit:E,onShowHtmlPreview:N})=>{const T=S(),A=t.useNavigate(),[y,R]=r.useState(!1),[F,B]=r.useState(!1),L=r.useRef(null),H=Object.keys(a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")),P=H.find((e=>I.includes(e)))||(O.length>0?H.find((e=>"file"===e)):void 0),[D,G]=r.useState([]),{t:M}=l.default(),z=["TYPE","CUSTOMER","CONTACT","SALESPERSON","MESSAGE","COMPANY","PHONE","EMAIL","WEBSITE","INFO","FÖRETAG","ROLE","KONTAKT"],V=[M("Typ"),M("Kund"),M("Kontakt"),M("Säljare"),M("Meddelande"),M("Företag"),M("Telefon"),M("E-post"),M("Hemsida"),M("Info"),M("Företag"),M("Roll"),M("Kontakt")];r.useEffect((()=>{Promise.all(O.map((e=>_.getFileInfo(e)))).then((e=>{G(e)}))}),[_,G,O]),r.useEffect((()=>{const e=()=>{if(L.current){const e=L.current.scrollHeight>100+(D.length>0?-72:0);B(e)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[k,D]);const K=()=>R(!y),W=I.includes("chat")&&(k.includes("#function_result")||k.includes("#finish_reason_function_call")),$=e=>{const r=e.indexOf("```html");if(-1===r)return e;const t=e.indexOf("```",r+7);if(-1===t)return e.substring(r+7);return e.substring(r+7,t)},U=new o.default(k).data,Y=P&&a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].editable,X=P&&a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].imageSize||void 0;return e.jsxs(c.Card,{className:y?T.expandedCard:T.card,style:{backgroundColor:a.getConfigValue("MESSAGE_HIDE_BAR")?P?a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].color:a.getConfigValue("APP_HEADER_COLOR")||"#eee":"#eee"},onClick:I.includes("chat")?e=>{I.includes("chat")&&(e&&e.stopPropagation(),A("/chat?id="+v))}:void 0,children:[!a.getConfigValue("MESSAGE_HIDE_BAR")&&e.jsx("div",{className:T.rectangle,style:{backgroundColor:P?a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].color:a.getConfigValue("APP_HEADER_COLOR")||void 0}}),e.jsxs("div",{className:T.iconButtonRow,children:[Y&&E&&e.jsx(q.Edit20Regular,{className:T.htmlButton,onClick:()=>E()}),N&&!Y&&I.includes("html")&&e.jsx(m.FullScreenMaximizeRegular,{className:T.htmlButton,onClick:e=>{e.stopPropagation(),N($(k))}}),F&&!I.includes("chat")&&y&&e.jsx(g.ArrowCollapseAllRegular,{className:T.headerButton,onClick:K}),F&&!I.includes("chat")&&!y&&e.jsx(g.ArrowExpandAllRegular,{className:T.headerButton,onClick:K})]}),e.jsx(p.CardHeader,{image:C?e.jsx("img",{className:T.headerImage,src:"app_logo.svg",alt:"User"}):null,header:w?e.jsx(h.Skeleton,{style:{width:"50%"},children:e.jsx(j.SkeletonItem,{})}):e.jsxs("div",{className:T.header,children:[e.jsx(n.Text,{weight:"semibold",children:d}),b&&e.jsx(n.Text,{weight:"regular",children:b})]}),description:e.jsx(x.Caption1,{className:T.caption,children:f})}),e.jsxs("div",{ref:L,className:`${T.content} ${y?"":T.truncated}`,children:[D.length>0&&e.jsx("div",{className:T.fileList,children:D.map((r=>e.jsx(u.FileThumbnail,{file:r,thumbnailSize:X,getImageUrl:i.CodicentService.getImageUrl,onClick:()=>{r.contentType.startsWith("image")?A(`/image?id=${v}&file=${r.id}`):i.CodicentService.downloadFile(r)}},r.id)))}),w?e.jsxs(h.Skeleton,{style:{width:"100%"},children:[e.jsx(j.SkeletonItem,{}),e.jsx(j.SkeletonItem,{}),e.jsx(j.SkeletonItem,{}),e.jsx(j.SkeletonItem,{}),e.jsx(j.SkeletonItem,{})]}):e.jsx("div",{className:T.text,children:I.includes("html")?e.jsx("iframe",{className:T.iframe,title:"html",srcDoc:$(k),sandbox:"allow-same-origin allow-scripts"}):I.includes("crm")&&0===Object.keys(U).length?e.jsx(s.default,{content:W?"*Tänker...*":U?(()=>{const e=new RegExp(`(${z.join("|")})\\s*:\\s*`,"gi"),r=k.replace(e,((e,r)=>{const t=z.indexOf(r.toUpperCase());-1===t&&console.log("Field not found:",r);return`\n**${-1!==t?V[t]:r}:** `}));return r.trim()})():k}):e.jsx(s.default,{content:W?"*Tänker...*":U&&U&&Object.keys(U).length>0?Object.keys(U).map((e=>{const r=z.indexOf(e.toUpperCase());return`**${-1!==r?V[r]:e}:** ${U[e]}\n`})).join("\n"):k})})]})]})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");require("../services/codicent.js"),require("./Markdown.js"),require("./Textarea.js"),require("./Button.js"),require("./Spinner.js"),require("./TextHeader.js"),require("./TypingIndicator.js"),require("./Dialog.js"),require("./ChatInput.js"),require("./CombinedPlaceholderDialog.js"),require("./ChatMessage.js"),require("./Header.js"),require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js"),require("../config/index.js"),require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("./FileThumbnail.js"),require("./MessageInput.js"),require("./UploadFile.js"),require("./SnapFooter.js"),require("./MessageItem.js"),require("./Content.js"),require("./AiInput.js"),require("./SearchBox.js"),require("./HtmlView.js"),require("./Footer.js"),require("./Page.js"),require("../pages/AppFrame.js"),require("../pages/Snap.js"),require("../pages/Search.js"),require("../pages/Login.js"),require("../pages/CrmPage.js"),require("../pages/ImageView.js"),require("../pages/FormInvite.js"),require("../pages/FormAccept.js"),require("../pages/Sales.js"),require("../stores/chatStore.js");var s=require("../hooks/useLocalization.js");require("../hooks/useAppStyles.js");var i=require("../node_modules/@griffel/react/makeStyles.esm.js"),t=require("../node_modules/@fluentui/react-image/lib/components/Image/Image.js"),a=require("../node_modules/@fluentui/react-input/lib/components/Input/Input.js"),n=require("../node_modules/@fluentui/react-button/lib/components/Button/Button.js"),u=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-1.js"),o=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-6.js"),l=require("../node_modules/@fluentui/react-text/lib/components/Text/Text.js");const c=i.makeStyles({container:{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"start",gap:"1rem",marginBottom:"1rem"},properties:{display:"flex",flexDirection:"column",alignItems:"start",justifyContent:"center",gap:"0.5rem",width:"100%"},editButton:{marginLeft:"0.5rem"},saveButton:{marginTop:"0.3rem"}});exports.default=({state:i})=>{const m=c(),{isAuthenticated:j,isLoading:d,user:p,nickname:q}=i.auth,[g,x]=r.useState(),[h,v]=r.useState(!1),[f,I]=r.useState(!1),[b,y]=r.useState(""),[w,S]=r.useState(""),{t:_}=s.default();r.useEffect((()=>{i.service.getUserInfo(q).then(x)}),[i.service,q]);const k=()=>{y(g?.name||p?.name||""),S(g?.email||p?.email||""),v(!1),I(!1)},C=async e=>{const r=await i.service.updateUserInfo({nickname:q,name:e.name,email:e.email||""});x(r)};return d?e.jsx("div",{children:_("Laddar...")}):j&&p&&e.jsxs("div",{className:m.container,children:[e.jsx(t.Image,{shape:"circular",width:100,src:g?.picture||p.picture,alt:p.name}),e.jsxs("div",{className:m.properties,children:[e.jsx("h2",{children:h?e.jsx(e.Fragment,{children:e.jsx(a.Input,{type:"text",value:b,onChange:e=>{y(e.target.value)},contentAfter:e.jsx(n.Button,{icon:e.jsx(u.ArrowUndo20Regular,{}),size:"small",onClick:k})})}):e.jsxs(e.Fragment,{children:[g?.name||p.name,e.jsx(n.Button,{className:m.editButton,icon:e.jsx(o.Edit20Regular,{}),size:"small",onClick:()=>{v(!0),y(g?.name||p?.name||"")}})]})}),e.jsxs(l.Text,{children:[f?e.jsx(e.Fragment,{children:e.jsx(a.Input,{type:"text",value:w,onChange:e=>{S(e.target.value)},contentAfter:e.jsx(n.Button,{icon:e.jsx(u.ArrowUndo20Regular,{}),size:"small",onClick:k})})}):e.jsx(e.Fragment,{children:g?.email||p.email}),(h||f)&&e.jsx("div",{children:e.jsx(n.Button,{className:m.saveButton,appearance:"primary",size:"small",onClick:()=>{v(!1),I(!1),C({...g,name:b,email:w})},children:"Spara"})})]})]})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");require("../services/codicent.js"),require("./Markdown.js"),require("./Textarea.js"),require("./Button.js"),require("./Spinner.js"),require("./TextHeader.js"),require("./TypingIndicator.js"),require("./Dialog.js"),require("./ChatInput.js"),require("./CombinedPlaceholderDialog.js"),require("./ChatMessage.js"),require("./Header.js"),require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js"),require("../config/index.js"),require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("./FileThumbnail.js"),require("./MessageInput.js"),require("./UploadFile.js"),require("./SnapFooter.js"),require("./MessageItem.js"),require("./Content.js"),require("./AiInput.js"),require("./SearchBox.js"),require("./HtmlView.js"),require("./Footer.js"),require("./Page.js"),require("../pages/AppFrame.js"),require("../pages/Snap.js"),require("../pages/Search.js"),require("../pages/Login.js"),require("../pages/CrmPage.js"),require("../pages/ImageView.js"),require("../pages/FormInvite.js"),require("../pages/FormAccept.js"),require("../pages/Sales.js"),require("../stores/chatStore.js");var s=require("../hooks/useLocalization.js");require("../hooks/useAppStyles.js");var i=require("../node_modules/@griffel/react/makeStyles.esm.js"),t=require("../node_modules/@fluentui/react-image/lib/components/Image/Image.js"),a=require("../node_modules/@fluentui/react-input/lib/components/Input/Input.js"),n=require("../node_modules/@fluentui/react-button/lib/components/Button/Button.js"),u=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-1.js"),o=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-7.js"),l=require("../node_modules/@fluentui/react-text/lib/components/Text/Text.js");const c=i.makeStyles({container:{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"start",gap:"1rem",marginBottom:"1rem"},properties:{display:"flex",flexDirection:"column",alignItems:"start",justifyContent:"center",gap:"0.5rem",width:"100%"},editButton:{marginLeft:"0.5rem"},saveButton:{marginTop:"0.3rem"}});exports.default=({state:i})=>{const m=c(),{isAuthenticated:j,isLoading:d,user:p,nickname:q}=i.auth,[g,x]=r.useState(),[h,v]=r.useState(!1),[f,I]=r.useState(!1),[b,y]=r.useState(""),[w,S]=r.useState(""),{t:_}=s.default();r.useEffect((()=>{i.service.getUserInfo(q).then(x)}),[i.service,q]);const k=()=>{y(g?.name||p?.name||""),S(g?.email||p?.email||""),v(!1),I(!1)},C=async e=>{const r=await i.service.updateUserInfo({nickname:q,name:e.name,email:e.email||""});x(r)};return d?e.jsx("div",{children:_("Laddar...")}):j&&p&&e.jsxs("div",{className:m.container,children:[e.jsx(t.Image,{shape:"circular",width:100,src:g?.picture||p.picture,alt:p.name}),e.jsxs("div",{className:m.properties,children:[e.jsx("h2",{children:h?e.jsx(e.Fragment,{children:e.jsx(a.Input,{type:"text",value:b,onChange:e=>{y(e.target.value)},contentAfter:e.jsx(n.Button,{icon:e.jsx(u.ArrowUndo20Regular,{}),size:"small",onClick:k})})}):e.jsxs(e.Fragment,{children:[g?.name||p.name,e.jsx(n.Button,{className:m.editButton,icon:e.jsx(o.Edit20Regular,{}),size:"small",onClick:()=>{v(!0),y(g?.name||p?.name||"")}})]})}),e.jsxs(l.Text,{children:[f?e.jsx(e.Fragment,{children:e.jsx(a.Input,{type:"text",value:w,onChange:e=>{S(e.target.value)},contentAfter:e.jsx(n.Button,{icon:e.jsx(u.ArrowUndo20Regular,{}),size:"small",onClick:k})})}):e.jsx(e.Fragment,{children:g?.email||p.email}),(h||f)&&e.jsx("div",{children:e.jsx(n.Button,{className:m.saveButton,appearance:"primary",size:"small",onClick:()=>{v(!1),I(!1),C({...g,name:b,email:w})},children:"Spara"})})]})]})]})};
@@ -21,6 +21,7 @@ export declare class AppConfig {
21
21
  };
22
22
  }
23
23
  export interface AppConfigOptions {
24
+ LOGIN_REDIRECT: boolean;
24
25
  ABOUT_TEXT: string;
25
26
  ANONYMOUS_CODICENT: string | undefined;
26
27
  ANONYMOUS_TOKEN: string | undefined;
@@ -119,4 +120,16 @@ export declare function getConfigValue<K extends keyof AppConfigOptions>(key: K)
119
120
  * Initialize the Codicent App SDK with configuration options
120
121
  */
121
122
  export declare function initCodicentApp(options?: Partial<AppConfigOptions>): void;
123
+ declare global {
124
+ interface Window {
125
+ updateCodicentConfig: (config: Record<string, any>) => void;
126
+ }
127
+ }
128
+ /**
129
+ * Updates the existing configuration object with new values from the provided `newConfig` object.
130
+ * Only properties that already exist on the original `config` object will be updated.
131
+ *
132
+ * @param newConfig - An object containing configuration properties to update.
133
+ */
134
+ export declare const updateConfig: (newConfig: Record<string, any>) => void;
122
135
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;;IAKpB,iBAAiB,EAAE,MAAM,CAAM;IAC/B,2BAA2B,EAAE,MAAM,CAAM;IACzC,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,OAAO,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,GAAG,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YAC1C,KAAK,EAAE;gBAAE,EAAE,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YACxD,iBAAiB,EAAE,MAAM,CAAC;YAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;YACvB,g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AAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,SAAS,GAAG,MAAM,CAAC;IAClC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,SAAS,GAAG,MAAM,CAAC;IAC9C,cAAc,EAAE,OAAO,CAAC;IAIxB,iBAAiB,EAAE,SAAS,GAAG,MAAM,CAAC;CACvC;AA+GD,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,gBAAgB,EAAE,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAG5F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,QAUtE;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;KAC7D;CACF;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,cAAe,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,SAM1D,CAAC"}
@@ -1 +1 @@
1
- "use strict";var _=require("../node_modules/mermaid/dist/mermaid.core.js");class T{constructor(){this.CHAT_INSTRUCTIONS="",this.REALTIME_VOICE_INSTRUCTIONS="",this.apps={}}}const O={ABOUT_TEXT:"Codicent APP SDK",ANONYMOUS_CODICENT:void 0,ANONYMOUS_TOKEN:void 0,API_BASE_URL:"https://codicent.com/",APP_BUTTONS:void 0,APP_CHAT_TEXT_PLACEHOLDER:void 0,APP_CHAT_TITLE:void 0,APP_CONFIG:new T,APP_FOOTER_COLOR:void 0,APP_FOOTER_SELECTED_COLOR:void 0,APP_FOOTER_TEXT_COLOR:void 0,APP_HEADER_COLOR:void 0,APP_HEADER_ICON_URL:void 0,APP_HEADER_TEXT_COLOR:void 0,APP_ICON_URL:void 0,APP_LOG_CODICENT:"",APP_LOG_TOKEN:"",APP_LOGBOOK_TITLE:void 0,APP_MENU_TITLE:void 0,APP_NAME:void 0,APP_PREFIX:void 0,APP_SAVE_TITLE:void 0,APP_SEARCH_TITLE:void 0,APP_SLOGAN:void 0,APP_SPLASH_TEXT:void 0,APP_SPLASH_URL:void 0,APP_TEMPLATE:"",APP_TITLE:void 0,AUTH_REDIRECT_URL:void 0,AUTH0_AUDIENCE:"https://codicent.com/api",AUTH0_CLIENT_ID:"80STzWmmzN3Tgf76HgFRyv54keYmvnaw",AUTH0_DOMAIN:"auth.codicent.com",AUTH0_PROVIDER_SCOPE:"read:current_user update:current_user_metadata openid profile email",AUTH0_SCOPE:"read:current_user",AUTH0_USER_DOMAIN:void 0,BUTTON_ACTIVE_COLOR:void 0,BUTTON_BACKGROUND_COLOR:void 0,BUTTON_BORDER_RADIUS:void 0,BUTTON_HOVER_COLOR:void 0,BUTTON_TAG:"app-button",BUTTON_TEXT_COLOR:void 0,CHAT_BACKGROUND_IMAGE_URL:void 0,CHAT_BOT_BACKGROUND_COLOR:void 0,CHAT_BOT_TEXT_COLOR:void 0,CHAT_INSTRUCTIONS:void 0,CHAT_USER_BACKGROUND_COLOR:void 0,CHAT_USER_TEXT_COLOR:void 0,CHAT_WELCOME:"Welcome",COMPOSE_BACKGROUND_IMAGE_URL:void 0,COMPOSE_HIDE_LOCATION:void 0,COMPOSE_SIMPLE_ATTACH_FILE:void 0,DEFAULT_LANGUAGE:"en",HIDE_CHAT_BUTTON:!1,HIDE_MENU_BUTTON:!1,HIDE_REGISTER_BUTTON:!1,HIDE_SAVE_BUTTON:!1,HOME_BACKGROUND_IMAGE_URL:void 0,INDEX_TITLE:void 0,LOGBOOK_TAG_DEFINITIONS:{},LOGBOOK_TAGS:"[]",MENU_BACKGROUND_IMAGE_URL:void 0,MESSAGE_HIDE_BAR:!1,MODULE_VOICE:!1,PUBLIC_FLOW_CODICENT:void 0,REALTIME_VOICE_API_KEY:"",SEND_BUTTON_ROUND_BACKGROUND:!1,SHOW_CANVAS_BUTTON:!1,SHOW_CHAT_PROMPTS:!1,SHOW_HELP_BUTTON:!1,SHOW_LOGBOOK_BUTTON:!1,SHOW_MICROPHONE_BUTTON:!1,SHOW_SETTINGS_BUTTON:!1,SHOW_SNAP_BUTTON:!1,SHOW_VOICE_BUTTON:!1,STRIP_CUSTOMER_PORTAL:"",STRIPE_PRICE_ID:"",STRIPE_PUBLIC_KEY:"",SUBSCRIPTION_NEEDED:!1,THEME_WELCOME:void 0,USER_PREFIX:void 0,WELCOME_STATUS_PROMPT:"",SHOW_SEND_BUTTON_TEXT:!1,SHOW_SAVE_BUTTON_TEXT:!1,FORM_BACKGROUND_IMAGE_URL:void 0,AUTO_TRANSLATE:!0};const E=function(_){return new Proxy(_,{get:(_,T,O)=>Reflect.get(_,T,O)})}(O);exports.AppConfig=T,exports.getConfigValue=function(_){return E[_]},exports.initCodicentApp=function(T={}){for(const[_,E]of Object.entries(T))void 0!==E&&(O[_]=E);_.default.initialize({startOnLoad:!1})};
1
+ "use strict";var _=require("../node_modules/mermaid/dist/mermaid.core.js");class T{constructor(){this.CHAT_INSTRUCTIONS="",this.REALTIME_VOICE_INSTRUCTIONS="",this.apps={}}}const O={LOGIN_REDIRECT:!1,ABOUT_TEXT:"Codicent APP SDK",ANONYMOUS_CODICENT:void 0,ANONYMOUS_TOKEN:void 0,API_BASE_URL:"https://codicent.com/",APP_BUTTONS:void 0,APP_CHAT_TEXT_PLACEHOLDER:void 0,APP_CHAT_TITLE:void 0,APP_CONFIG:new T,APP_FOOTER_COLOR:void 0,APP_FOOTER_SELECTED_COLOR:void 0,APP_FOOTER_TEXT_COLOR:void 0,APP_HEADER_COLOR:void 0,APP_HEADER_ICON_URL:void 0,APP_HEADER_TEXT_COLOR:void 0,APP_ICON_URL:void 0,APP_LOG_CODICENT:"",APP_LOG_TOKEN:"",APP_LOGBOOK_TITLE:void 0,APP_MENU_TITLE:void 0,APP_NAME:void 0,APP_PREFIX:void 0,APP_SAVE_TITLE:void 0,APP_SEARCH_TITLE:void 0,APP_SLOGAN:void 0,APP_SPLASH_TEXT:void 0,APP_SPLASH_URL:void 0,APP_TEMPLATE:"",APP_TITLE:void 0,AUTH_REDIRECT_URL:void 0,AUTH0_AUDIENCE:"https://codicent.com/api",AUTH0_CLIENT_ID:"80STzWmmzN3Tgf76HgFRyv54keYmvnaw",AUTH0_DOMAIN:"auth.codicent.com",AUTH0_PROVIDER_SCOPE:"read:current_user update:current_user_metadata openid profile email",AUTH0_SCOPE:"read:current_user",AUTH0_USER_DOMAIN:void 0,BUTTON_ACTIVE_COLOR:void 0,BUTTON_BACKGROUND_COLOR:void 0,BUTTON_BORDER_RADIUS:void 0,BUTTON_HOVER_COLOR:void 0,BUTTON_TAG:"app-button",BUTTON_TEXT_COLOR:void 0,CHAT_BACKGROUND_IMAGE_URL:void 0,CHAT_BOT_BACKGROUND_COLOR:void 0,CHAT_BOT_TEXT_COLOR:void 0,CHAT_INSTRUCTIONS:void 0,CHAT_USER_BACKGROUND_COLOR:void 0,CHAT_USER_TEXT_COLOR:void 0,CHAT_WELCOME:"Welcome",COMPOSE_BACKGROUND_IMAGE_URL:void 0,COMPOSE_HIDE_LOCATION:void 0,COMPOSE_SIMPLE_ATTACH_FILE:void 0,DEFAULT_LANGUAGE:"en",HIDE_CHAT_BUTTON:!1,HIDE_MENU_BUTTON:!1,HIDE_REGISTER_BUTTON:!1,HIDE_SAVE_BUTTON:!1,HOME_BACKGROUND_IMAGE_URL:void 0,INDEX_TITLE:void 0,LOGBOOK_TAG_DEFINITIONS:{},LOGBOOK_TAGS:"[]",MENU_BACKGROUND_IMAGE_URL:void 0,MESSAGE_HIDE_BAR:!1,MODULE_VOICE:!1,PUBLIC_FLOW_CODICENT:void 0,REALTIME_VOICE_API_KEY:"",SEND_BUTTON_ROUND_BACKGROUND:!1,SHOW_CANVAS_BUTTON:!1,SHOW_CHAT_PROMPTS:!1,SHOW_HELP_BUTTON:!1,SHOW_LOGBOOK_BUTTON:!1,SHOW_MICROPHONE_BUTTON:!1,SHOW_SETTINGS_BUTTON:!1,SHOW_SNAP_BUTTON:!1,SHOW_VOICE_BUTTON:!1,STRIP_CUSTOMER_PORTAL:"",STRIPE_PRICE_ID:"",STRIPE_PUBLIC_KEY:"",SUBSCRIPTION_NEEDED:!1,THEME_WELCOME:void 0,USER_PREFIX:void 0,WELCOME_STATUS_PROMPT:"",SHOW_SEND_BUTTON_TEXT:!1,SHOW_SAVE_BUTTON_TEXT:!1,FORM_BACKGROUND_IMAGE_URL:void 0,AUTO_TRANSLATE:!0};const E=function(_){return new Proxy(_,{get:(_,T,O)=>Reflect.get(_,T,O)})}(O);const A=_=>{Object.keys(_).forEach((T=>{E.hasOwnProperty(T)&&(E[T]=_[T])}))};"undefined"!=typeof window&&(window.updateCodicentConfig=A),exports.AppConfig=T,exports.getConfigValue=function(_){return E[_]},exports.initCodicentApp=function(T={}){for(const[_,E]of Object.entries(T))void 0!==E&&(O[_]=E);_.default.initialize({startOnLoad:!1})},exports.updateConfig=A;
@@ -1 +1 @@
1
- {"version":3,"file":"useAudioRecorder.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAudioRecorder.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,E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M,IAAI,CAAC;CAC7B;AAED,UAAU,cAAc;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,gBAAgB,mBAAoB,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,KA2Q/E,kBACN,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");const r=r=>{const[t,n]=e.useState({isRecording:!1,isPaused:!1,recordingTime:0,mediaURL:null,isSoundCaptured:!1,error:null}),c=e.useRef(!1),u=e.useRef(null),a=e.useRef(null),s=e.useRef(null),o=e.useRef([]),i=e.useRef(),d=e.useRef(null),l=e.useRef(""),p=e.useCallback((async e=>{l.current=e;try{const e=await navigator.mediaDevices.getUserMedia({audio:!0});o.current=[],s.current=new MediaRecorder(e,{mimeType:f()}),s.current.ondataavailable=e=>{e.data.size>0&&o.current.push(e.data)},s.current.onstop=()=>{const r=new Blob(o.current,{type:f()}),t=URL.createObjectURL(r);n((e=>({...e,mediaURL:t}))),e.getTracks().forEach((e=>e.stop()))};const r=new(window.AudioContext||window.webkitAudioContext);a.current=r;const t=r.createMediaStreamSource(e),l=r.createAnalyser();l.fftSize=256;const p=new Uint8Array(l.frequencyBinCount);t.connect(l);const A=()=>{l.getByteFrequencyData(p);const e=p.reduce(((e,r)=>e+r))/p.length>10;e!==c.current&&(c.current=e,n((r=>({...r,isSoundCaptured:e}))))};d.current=setInterval(A,100),u.current||(u.current=new Audio("data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQAAAAA="),u.current.loop=!0,u.current.volume=0),u.current.play().catch((()=>{})),s.current.start(10),i.current=setInterval((()=>{n((e=>({...e,recordingTime:e.recordingTime+1})))}),1e3),n((e=>({...e,isRecording:!0,isPaused:!1})))}catch(e){const r=e instanceof Error?e.message:String(e);n((e=>({...e,error:r}))),console.error("Error accessing microphone:",e)}}),[]),A=e.useCallback((()=>{s.current&&t.isRecording&&(s.current.stop(),s.current.stream.getTracks().forEach((e=>e.stop())),i.current&&clearInterval(i.current),d.current&&(clearInterval(d.current),d.current=null),u.current&&(u.current.pause(),u.current.currentTime=0),n((e=>({...e,isRecording:!1,isPaused:!1,isSoundCaptured:!1}))))}),[t.isRecording]);e.useEffect((()=>{let e=null;return t.isRecording&&a.current&&(e=setInterval((()=>{a.current&&"suspended"===a.current.state&&a.current.resume()}),1e3)),()=>{e&&clearInterval(e)}}),[t.isRecording]);const g=e.useCallback((()=>{"recording"===s.current?.state&&(s.current.pause(),i.current&&clearInterval(i.current),n((e=>({...e,isPaused:!0}))))}),[]),R=e.useCallback((()=>{"paused"===s.current?.state&&(s.current.resume(),i.current=setInterval((()=>{n((e=>({...e,recordingTime:e.recordingTime+1})))}),1e3),n((e=>({...e,isPaused:!1}))))}),[]),f=()=>["audio/webm","audio/mp4","audio/ogg","audio/wav"].find((e=>MediaRecorder.isTypeSupported(e)))||"audio/webm";return e.useEffect((()=>{if(t.mediaURL){const e=`audio.${f().split("/")[1]}`;fetch(t.mediaURL).then((e=>e.blob())).then((t=>{const n=new FormData;n.append("file",t,e),r(n,l.current)}))}}),[t.mediaURL,r]),e.useEffect((()=>()=>{s.current&&s.current.stream.getTracks().forEach((e=>e.stop())),i.current&&clearInterval(i.current),d.current&&clearInterval(d.current)}),[]),{...t,startRecording:p,stopRecording:A,pauseRecording:g,resumeRecording:R}};exports.default=r,exports.useAudioRecorder=r;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");const r=r=>{const[t,n]=e.useState({isRecording:!1,isPaused:!1,recordingTime:0,mediaURL:null,isSoundCaptured:!1,error:null}),c=e.useRef(!1),u=e.useRef(null),a=e.useRef(null),o=e.useRef(null),s=e.useRef(!1),i=e.useRef(null),l=e.useRef([]),d=e.useRef(),g=e.useRef(null),p=e.useRef(""),f=e.useCallback((async e=>{p.current=e;try{if(a.current&&"suspended"===a.current.state)try{await a.current.resume(),console.log("Resumed existing audio context")}catch(e){console.warn("Could not resume existing audio context:",e)}const e=await navigator.mediaDevices.getUserMedia({audio:!0});l.current=[],i.current=new MediaRecorder(e,{mimeType:v()}),i.current.ondataavailable=e=>{e.data.size>0&&l.current.push(e.data)},i.current.onstop=()=>{const r=new Blob(l.current,{type:v()}),t=URL.createObjectURL(r);n((e=>({...e,mediaURL:t}))),e.getTracks().forEach((e=>e.stop()))};const r=new(window.AudioContext||window.webkitAudioContext);a.current=r;try{if(a.current&&!o.current){o.current=a.current.createOscillator();const e=a.current.createGain();e.gain.value=.001,o.current.connect(e),e.connect(a.current.destination),o.current.frequency.value=20,o.current.start(),s.current=!0,console.log("Started audio session keeper")}}catch(e){console.warn("Failed to create audio session keeper:",e)}const t=r.createMediaStreamSource(e),p=r.createAnalyser();p.fftSize=256;const f=new Uint8Array(p.frequencyBinCount);t.connect(p);const R=()=>{p.getByteFrequencyData(f);const e=f.reduce(((e,r)=>e+r))/f.length>10;e!==c.current&&(c.current=e,n((r=>({...r,isSoundCaptured:e}))))};g.current=setInterval(R,100),u.current||(u.current=new Audio,u.current.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQQAAAAAAA==",u.current.loop=!0,u.current.volume=.01,u.current.setAttribute("playsinline",""),u.current.setAttribute("webkit-playsinline","")),u.current.play().catch((e=>{console.log("Silent audio playback failed, retrying:",e),document.addEventListener("click",(function e(){u.current?.play(),document.removeEventListener("click",e)}),{once:!0})})),i.current.start(10),d.current=setInterval((()=>{n((e=>({...e,recordingTime:e.recordingTime+1})))}),1e3),n((e=>({...e,isRecording:!0,isPaused:!1})))}catch(e){const r=e instanceof Error?e.message:String(e);n((e=>({...e,error:r}))),console.error("Error accessing microphone:",e)}}),[]),R=e.useCallback((()=>{if(i.current&&t.isRecording){if(i.current.stop(),i.current.stream.getTracks().forEach((e=>e.stop())),d.current&&clearInterval(d.current),g.current&&(clearInterval(g.current),g.current=null),u.current&&(u.current.pause(),u.current.currentTime=0),o.current)try{o.current.stop(),o.current.disconnect(),o.current=null,s.current=!1,console.log("Stopped audio session keeper")}catch(e){console.warn("Error stopping oscillator:",e)}n((e=>({...e,isRecording:!1,isPaused:!1,isSoundCaptured:!1})))}}),[t.isRecording]);e.useEffect((()=>{let e=null;return t.isRecording&&a.current&&(e=setInterval((()=>{if(a.current&&"suspended"===a.current.state&&(console.log("Resuming suspended audio context"),a.current.resume().catch((e=>console.warn("Failed to resume context:",e)))),u.current&&u.current.paused&&t.isRecording&&(console.log("Restarting silent audio"),u.current.play().catch((e=>console.warn("Failed to restart silent audio:",e)))),!o.current&&a.current&&s.current)try{console.log("Restarting audio oscillator"),o.current=a.current.createOscillator();const e=a.current.createGain();e.gain.value=.001,o.current.connect(e),e.connect(a.current.destination),o.current.frequency.value=20,o.current.start()}catch(e){console.warn("Failed to restart oscillator:",e)}}),500)),()=>{e&&clearInterval(e)}}),[t.isRecording]);const m=e.useCallback((()=>{"recording"===i.current?.state&&(i.current.pause(),d.current&&clearInterval(d.current),n((e=>({...e,isPaused:!0}))))}),[]),A=e.useCallback((()=>{"paused"===i.current?.state&&(i.current.resume(),d.current=setInterval((()=>{n((e=>({...e,recordingTime:e.recordingTime+1})))}),1e3),n((e=>({...e,isPaused:!1}))))}),[]),v=()=>["audio/webm","audio/mp4","audio/ogg","audio/wav"].find((e=>MediaRecorder.isTypeSupported(e)))||"audio/webm";return e.useEffect((()=>{if(t.mediaURL){const e=`audio.${v().split("/")[1]}`;fetch(t.mediaURL).then((e=>e.blob())).then((t=>{const n=new FormData;n.append("file",t,e),r(n,p.current)}))}}),[t.mediaURL,r]),e.useEffect((()=>()=>{i.current&&i.current.stream.getTracks().forEach((e=>e.stop())),d.current&&clearInterval(d.current),g.current&&clearInterval(g.current)}),[]),{...t,startRecording:f,stopRecording:R,pauseRecording:m,resumeRecording:A}};exports.default=r,exports.useAudioRecorder=r;
@@ -1 +1 @@
1
- {"version":3,"file":"useCodicentApp.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCodicentApp.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAyB,MAAM,UAAU,CAAC;AACpG,OAAyB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAqB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAA2B,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIzE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,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KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,cAAe;IAAE,KAAK,EAAE,qBAAqB,CAAA;CAAE,KAiInE,gBACN,CAAC"}
@@ -1 +1 @@
1
- "use strict";var e=require("react");require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("react/jsx-runtime");var t=require("../utils/appState.js");require("../_virtual/index.js"),require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js");var r=require("./useAudioRecorder.js"),s=require("./useAuthState.js"),n=require("./useRealtimeVoiceAI.js"),a=require("./useTools.js"),u=require("../config/index.js");exports.useCodicentApp=({auth0:c})=>{const i=s.default(c),o=e.useRef(t.createAppStateMachine(i.codicentService,(()=>{}))),[l,d]=e.useState(),{service:p,context:m}=o.current,{nickname:f,name:v,error:A,errorType:k,selectedApp:h}=m,q=e.useCallback(((e,t)=>{const r=e.get("file").name;p.uploadFile(r,e).then((e=>{p.sendMessage(`#transcribe ${""!==t?(t.startsWith("#")?"":"#")+t+" ":""}#file:${e}`).then((()=>{})).catch(console.warn)}))}),[p]),S=r.useAudioRecorder(q),[j,b]=e.useState(),[w,y]=e.useState(),[C,x]=e.useState(!1),_=e.useMemo((()=>new Audio("./notification.mp3")),[]),T=a.default(p,b,y,_,j,(()=>x(!0))),E=n.default(u.getConfigValue("REALTIME_VOICE_API_KEY")||"",T);e.useEffect((()=>{C&&(E?.disconnectConversation(),x(!1))}),[C,E]),e.useEffect((()=>{i.isAuthenticated&&i.user&&i.accessToken&&o.current.updateContext({isAuthenticated:i.isAuthenticated,user:{sub:i.user.sub,email:i.user.email},accessToken:i.accessToken})}),[i.isAuthenticated,i.user,i.accessToken]),e.useEffect((()=>o.current.updateContext({nickname:i.nickname})),[i.nickname]),e.useEffect((()=>{o.current.update();let e=o.current;const t=setInterval((()=>{"hasAccess"===o.current.currentStateName&&e.currentStateName===o.current.currentStateName||(o.current.update(),d(o.current.getCurrentStateName()),e=o.current)}),50);return()=>clearInterval(t)}),[]);return{audio:S,auth:i,currentStateName:l,stateMachine:o.current,service:p,context:m,state:l,nickname:f,name:v,error:A,errorType:k,fixAppUrl:e=>e.replace("{nickname}",f||"unknown").replace("{token}",encodeURIComponent(i.accessToken||"unknown")).replace("{app}",h||"unknown"),setAnonymous:e=>{o.current.updateContext({isAnonymous:e})},allStates:o.current.allStates,isBusy:()=>o.current.isBusy(),voice:E,html:j,setHtml:b,script:w}};
1
+ "use strict";var e=require("react");require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("react/jsx-runtime");var t=require("../utils/appState.js");require("../_virtual/index.js"),require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js");var r=require("./useAudioRecorder.js"),a=require("./useAuthState.js"),s=require("./useRealtimeVoiceAI.js"),n=require("./useTools.js"),c=require("../config/index.js");exports.useCodicentApp=({auth0:u})=>{const i=a.default(u),o=e.useRef(t.createAppStateMachine(i.codicentService,(()=>{}))),[l,d]=e.useState(),{service:p,context:f}=o.current,{nickname:m,name:w,error:A,errorType:h,selectedApp:v}=f,k=e.useCallback(((e,t)=>{const r=e.get("file").name;p.uploadFile(r,e).then((e=>{p.sendMessage(`#transcribe ${""!==t?(t.startsWith("#")?"":"#")+t+" ":""}#file:${e}`).then((()=>{})).catch(console.warn)}))}),[p]),S=r.useAudioRecorder(k),[q,C]=e.useState(),[j,y]=e.useState(),[g,b]=e.useState(!1),x=e.useMemo((()=>new Audio("./notification.mp3")),[]),E=n.default(p,C,y,x,q,(()=>b(!0))),_=s.default(c.getConfigValue("REALTIME_VOICE_API_KEY")||"",E),[T,I]=e.useState(!1);e.useEffect((()=>{g&&(_?.disconnectConversation(),b(!1))}),[g,_]),e.useEffect((()=>{i.isAuthenticated&&i.user&&i.accessToken&&o.current.updateContext({isAuthenticated:i.isAuthenticated,user:{sub:i.user.sub,email:i.user.email},accessToken:i.accessToken})}),[i.isAuthenticated,i.user,i.accessToken]),e.useEffect((()=>o.current.updateContext({nickname:i.nickname})),[i.nickname]),e.useEffect((()=>{o.current.update();let e=o.current;const t=setInterval((()=>{"hasAccess"===o.current.currentStateName&&e.currentStateName===o.current.currentStateName||(o.current.update(),d(o.current.getCurrentStateName()),e=o.current)}),50);return()=>clearInterval(t)}),[]),e.useEffect((()=>{(async()=>{if("hasAccess"===l&&!T)try{const e=await p.readDataMessages("appconfig");if(e.length>0){const t=e[0].data;"undefined"!=typeof window&&window.updateCodicentConfig&&window.updateCodicentConfig(t)}I(!0)}catch(e){console.warn("Failed to load app config:",e)}})()}),[l,p,T]),e.useEffect((()=>{"hasAccess"!==l&&I(!1)}),[l]);return{audio:S,auth:i,currentStateName:l,stateMachine:o.current,service:p,context:f,state:l,nickname:m,name:w,error:A,errorType:h,fixAppUrl:e=>e.replace("{nickname}",m||"unknown").replace("{token}",encodeURIComponent(i.accessToken||"unknown")).replace("{app}",v||"unknown"),setAnonymous:e=>{o.current.updateContext({isAnonymous:e})},allStates:o.current.allStates,isBusy:()=>o.current.isBusy(),voice:_,html:q,setHtml:C,script:j}};
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("./services/codicent.js"),r=require("./components/Markdown.js"),t=require("./components/Textarea.js"),o=require("./components/Button.js"),s=require("./components/Title.js"),a=require("./components/Text.js"),i=require("./components/Spinner.js"),p=require("./components/Label.js"),u=require("./components/Input.js"),n=require("./components/TextHeader.js"),l=require("./components/TypingIndicator.js"),c=require("./components/Prompt.js"),x=require("./components/ChatInput.js"),d=require("./components/CombinedPlaceholderDialog.js"),j=require("./components/ChatMessage.js"),q=require("./components/Header.js"),m=require("./components/VoiceIcon.js"),g=require("./components/AudioIcon.js"),f=require("./components/FileThumbnail.js"),h=require("./components/MessageInput.js"),S=require("./components/UploadFile.js"),C=require("./components/SnapFooter.js"),A=require("./components/Profile.js"),T=require("./components/MessageItem.js"),I=require("./components/Content.js"),b=require("./components/AiInput.js"),v=require("./components/SearchBox.js"),k=require("./components/HtmlView.js"),M=require("./components/Footer.js"),P=require("./components/Page.js"),F=require("./components/UrlProcessor.js"),L=require("./hooks/useStateWithLocalStorage.js"),w=require("./hooks/useAuthState.js"),V=require("./hooks/useChat.js"),y=require("./hooks/useCodicentState.js"),W=require("./hooks/useAudioRecorder.js"),H=require("./hooks/useTools.js"),R=require("./hooks/useRealtimeVoiceAI.js"),B=require("./hooks/useLocalization.js"),_=require("./hooks/useTemplateVariables.js"),D=require("./hooks/useCodicentApp.js"),U=require("./hooks/useAppStyles.js"),z=require("./hooks/useToaster.js"),G=require("./utils/MessageContent.js"),E=require("./utils/theme.js"),J=require("./utils/logging.js"),K=require("./utils/withWakeLock.js"),N=require("./utils/appState.js"),O=require("./_virtual/index.js");require("./lib/wavtools/lib/wav_packer.js"),require("./lib/wavtools/lib/analysis/audio_analysis.js");var Q=require("./lib/wavtools/lib/wav_stream_player.js"),X=require("./lib/wavtools/lib/wav_recorder.js"),Y=require("./utils/device.js"),Z=require("./utils/helpers.js"),$=require("./config/index.js"),ee=require("./pages/AppFrame.js"),re=require("./pages/Snap.js"),te=require("./pages/Search.js"),oe=require("./pages/Login.js"),se=require("./pages/Logout.js"),ae=require("./pages/CrmPage.js"),ie=require("./pages/ImageView.js"),pe=require("./pages/FormInvite.js"),ue=require("./pages/FormAccept.js"),ne=require("./pages/Sales.js");exports.CodicentService=e.CodicentService,exports.Markdown=r.default,exports.Textarea=t.Textarea,exports.Button=o.Button,exports.Title=s.Title,exports.Text=a.Text,exports.Spinner=i.Spinner,exports.Label=p.Label,exports.Input=u.Input,exports.TextHeader=n.default,exports.TypingIndicator=l.default,exports.Prompt=c.default,exports.ChatInput=x.default,exports.CombinedPlaceholderDialog=d.CombinedPlaceholderDialog,exports.ChatMessage=j.default,exports.Header=q.Header,exports.VoiceIcon=m.default,exports.AudioIcon=g.default,exports.FileThumbnail=f.FileThumbnail,exports.MessageInput=h.default,exports.UploadFile=S.default,exports.SnapFooter=C.default,exports.Profile=A.default,exports.MessageItem=T.default,exports.Content=I.default,exports.AiInput=b.default,exports.SearchBox=v.default,exports.HtmlView=k.default,exports.Footer=M.Footer,exports.Page=P.Page,exports.UrlProcessor=F.UrlProcessor,exports.useStateWithLocalStorage=L.default,exports.useAuthState=w.default,exports.useChat=V.useChat,exports.useCodicentState=y.default,exports.useAudioRecorder=W.useAudioRecorder,exports.useTools=H.default,exports.useRealtimeVoiceAI=R.default,exports.useLocalization=B.default,exports.useTemplateVariables=_.useTemplateVariables,exports.useCodicentApp=D.useCodicentApp,exports.useAppStyles=U.default,exports.useToaster=z.default,exports.MessageContent=G.default,exports.generateBrandVariants=E.default,exports.log=J.default,exports.withWakeLock=K.default,exports.AppStateMachine=N.AppStateMachine,exports.createAppStateMachine=N.createAppStateMachine,exports.WavStreamPlayer=Q.WavStreamPlayer,exports.WavRecorder=X.WavRecorder,exports.getGpsLocation=Y.getGpsLocation,exports.isMobileDevice=Y.isMobileDevice,exports.getTimeString=Z.getTimeString,exports.AppConfig=$.AppConfig,exports.getConfigValue=$.getConfigValue,exports.initCodicentApp=$.initCodicentApp,exports.AppFrame=ee.default,exports.Snap=re.default,exports.Search=te.default,exports.Login=oe.default,exports.Logout=se.Logout,exports.CrmPage=ae.CrmPage,exports.ImageView=ie.default,exports.FormInvite=pe.default,exports.FormAccept=ue.default,exports.Sales=ne.Sales,exports.StateMachine=O.distExports.StateMachine;
1
+ "use strict";var e=require("./services/codicent.js"),r=require("./components/Markdown.js"),t=require("./components/Textarea.js"),o=require("./components/Button.js"),s=require("./components/Title.js"),a=require("./components/Text.js"),i=require("./components/Spinner.js"),p=require("./components/Label.js"),u=require("./components/Input.js"),n=require("./components/TextHeader.js"),l=require("./components/TypingIndicator.js"),c=require("./components/Prompt.js"),d=require("./components/ChatInput.js"),x=require("./components/CombinedPlaceholderDialog.js"),j=require("./components/ChatMessage.js"),q=require("./components/Header.js"),m=require("./components/VoiceIcon.js"),g=require("./components/AudioIcon.js"),f=require("./components/FileThumbnail.js"),h=require("./components/MessageInput.js"),S=require("./components/UploadFile.js"),C=require("./components/SnapFooter.js"),A=require("./components/Profile.js"),T=require("./components/MessageItem.js"),I=require("./components/Content.js"),b=require("./components/AiInput.js"),v=require("./components/SearchBox.js"),k=require("./components/HtmlView.js"),M=require("./components/Footer.js"),P=require("./components/Page.js"),F=require("./components/UrlProcessor.js"),L=require("./hooks/useStateWithLocalStorage.js"),w=require("./hooks/useAuthState.js"),V=require("./hooks/useChat.js"),y=require("./hooks/useCodicentState.js"),W=require("./hooks/useAudioRecorder.js"),H=require("./hooks/useTools.js"),R=require("./hooks/useRealtimeVoiceAI.js"),B=require("./hooks/useLocalization.js"),_=require("./hooks/useTemplateVariables.js"),D=require("./hooks/useCodicentApp.js"),U=require("./hooks/useAppStyles.js"),z=require("./hooks/useToaster.js"),G=require("./utils/MessageContent.js"),E=require("./utils/theme.js"),J=require("./utils/logging.js"),K=require("./utils/withWakeLock.js"),N=require("./utils/appState.js"),O=require("./_virtual/index.js");require("./lib/wavtools/lib/wav_packer.js"),require("./lib/wavtools/lib/analysis/audio_analysis.js");var Q=require("./lib/wavtools/lib/wav_stream_player.js"),X=require("./lib/wavtools/lib/wav_recorder.js"),Y=require("./utils/device.js"),Z=require("./utils/helpers.js"),$=require("./config/index.js"),ee=require("./pages/AppFrame.js"),re=require("./pages/Snap.js"),te=require("./pages/Search.js"),oe=require("./pages/Login.js"),se=require("./pages/Logout.js"),ae=require("./pages/CrmPage.js"),ie=require("./pages/ImageView.js"),pe=require("./pages/FormInvite.js"),ue=require("./pages/FormAccept.js"),ne=require("./pages/Sales.js");exports.CodicentService=e.CodicentService,exports.Markdown=r.default,exports.Textarea=t.Textarea,exports.Button=o.Button,exports.Title=s.Title,exports.Text=a.Text,exports.Spinner=i.Spinner,exports.Label=p.Label,exports.Input=u.Input,exports.TextHeader=n.default,exports.TypingIndicator=l.default,exports.Prompt=c.default,exports.ChatInput=d.default,exports.CombinedPlaceholderDialog=x.CombinedPlaceholderDialog,exports.ChatMessage=j.default,exports.Header=q.Header,exports.VoiceIcon=m.default,exports.AudioIcon=g.default,exports.FileThumbnail=f.FileThumbnail,exports.MessageInput=h.default,exports.UploadFile=S.default,exports.SnapFooter=C.default,exports.Profile=A.default,exports.MessageItem=T.default,exports.Content=I.default,exports.AiInput=b.default,exports.SearchBox=v.default,exports.HtmlView=k.default,exports.Footer=M.Footer,exports.Page=P.Page,exports.UrlProcessor=F.UrlProcessor,exports.useStateWithLocalStorage=L.default,exports.useAuthState=w.default,exports.useChat=V.useChat,exports.useCodicentState=y.default,exports.useAudioRecorder=W.useAudioRecorder,exports.useTools=H.default,exports.useRealtimeVoiceAI=R.default,exports.useLocalization=B.default,exports.useTemplateVariables=_.useTemplateVariables,exports.useCodicentApp=D.useCodicentApp,exports.useAppStyles=U.default,exports.useToaster=z.default,exports.MessageContent=G.default,exports.generateBrandVariants=E.default,exports.log=J.default,exports.withWakeLock=K.default,exports.AppStateMachine=N.AppStateMachine,exports.createAppStateMachine=N.createAppStateMachine,exports.WavStreamPlayer=Q.WavStreamPlayer,exports.WavRecorder=X.WavRecorder,exports.getGpsLocation=Y.getGpsLocation,exports.isMobileDevice=Y.isMobileDevice,exports.getTimeString=Z.getTimeString,exports.AppConfig=$.AppConfig,exports.getConfigValue=$.getConfigValue,exports.initCodicentApp=$.initCodicentApp,exports.updateConfig=$.updateConfig,exports.AppFrame=ee.default,exports.Snap=re.default,exports.Search=te.default,exports.Login=oe.default,exports.Logout=se.Logout,exports.CrmPage=ae.CrmPage,exports.ImageView=ie.default,exports.FormInvite=pe.default,exports.FormAccept=ue.default,exports.Sales=ne.Sales,exports.StateMachine=O.distExports.StateMachine;
@@ -1 +1 @@
1
- "use strict";var a=require("../utils/createFluentIcon.js");const e=a.createFluentIcon("AddRegular","1em",["M10 2.5a.5.5 0 0 0-1 0V9H2.5a.5.5 0 0 0 0 1H9v6.5a.5.5 0 0 0 1 0V10h6.5a.5.5 0 0 0 0-1H10V2.5Z"]),l=a.createFluentIcon("ArrowClockwiseRegular","1em",["M4 10a6 6 0 0 1 10.47-4H12.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-1 0v1.6a7 7 0 1 0 1.98 4.36.5.5 0 1 0-1 .08L16 10a6 6 0 0 1-12 0Z"]),r=a.createFluentIcon("ArrowCollapseAllRegular","1em",["M2 4.5c0-.28.22-.5.5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5Zm3.15 2.65c.2-.2.5-.2.7 0l2.5 2.5a.5.5 0 0 1-.7.7L6 8.71v6.79a.5.5 0 0 1-1 0V8.7l-1.65 1.65a.5.5 0 0 1-.7-.7l2.5-2.5ZM17.5 8h-7a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1Z"],{flipInRtl:!0}),t=a.createFluentIcon("ArrowExpandAllRegular","1em",["M2 4.5c0-.28.22-.5.5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5Zm3.15 11.35c.2.2.5.2.7 0l2.5-2.5a.5.5 0 0 0-.7-.7L6 14.29V7.5a.5.5 0 0 0-1 0v6.8l-1.65-1.65a.5.5 0 0 0-.7.7l2.5 2.5ZM17.5 8h-7a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1Z"],{flipInRtl:!0}),c=a.createFluentIcon("AttachRegular","1em",["m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z"]),o=a.createFluentIcon("CameraRegular","1em",["M10 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-3 4a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm1.12-8a1.5 1.5 0 0 0-1.34.83L6.2 4H4.5A2.5 2.5 0 0 0 2 6.5v8A2.5 2.5 0 0 0 4.5 17h11a2.5 2.5 0 0 0 2.5-2.5v-8A2.5 2.5 0 0 0 15.5 4h-1.69l-.58-1.17A1.5 1.5 0 0 0 11.89 2H8.12Zm-.44 1.28A.5.5 0 0 1 8.12 3h3.77c.19 0 .36.1.45.28l.72 1.44a.5.5 0 0 0 .45.28h2c.82 0 1.5.67 1.5 1.5v8c0 .83-.68 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 3 14.5v-8C3 5.67 3.67 5 4.5 5h2a.5.5 0 0 0 .44-.28l.73-1.44Z"]);exports.AddRegular=e,exports.ArrowClockwiseRegular=l,exports.ArrowCollapseAllRegular=r,exports.ArrowExpandAllRegular=t,exports.AttachRegular=c,exports.CameraRegular=o;
1
+ "use strict";var a=require("../utils/createFluentIcon.js");const e=a.createFluentIcon("AddRegular","1em",["M10 2.5c.28 0 .5.22.5.5v6.5H17a.5.5 0 0 1 0 1h-6.5V17a.5.5 0 0 1-1 0v-6.5H3a.5.5 0 0 1 0-1h6.5V3c0-.28.22-.5.5-.5Z"]),l=a.createFluentIcon("ArrowClockwiseRegular","1em",["M4 10a6 6 0 0 1 10.47-4H12.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-1 0v1.6a7 7 0 1 0 1.98 4.36.5.5 0 1 0-1 .08L16 10a6 6 0 0 1-12 0Z"]),r=a.createFluentIcon("ArrowCollapseAllRegular","1em",["M2 4.5c0-.28.22-.5.5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5Zm3.15 2.65c.2-.2.5-.2.7 0l2.5 2.5a.5.5 0 0 1-.7.7L6 8.71v6.79a.5.5 0 0 1-1 0V8.7l-1.65 1.65a.5.5 0 0 1-.7-.7l2.5-2.5ZM17.5 8h-7a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1Z"],{flipInRtl:!0}),t=a.createFluentIcon("ArrowExpandAllRegular","1em",["M2 4.5c0-.28.22-.5.5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5Zm3.15 11.35c.2.2.5.2.7 0l2.5-2.5a.5.5 0 0 0-.7-.7L6 14.29V7.5a.5.5 0 0 0-1 0v6.8l-1.65-1.65a.5.5 0 0 0-.7.7l2.5 2.5ZM17.5 8h-7a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1Z"],{flipInRtl:!0}),c=a.createFluentIcon("AttachRegular","1em",["m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z"]),o=a.createFluentIcon("CameraRegular","1em",["M10 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-3 4a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm1.12-8a1.5 1.5 0 0 0-1.34.83L6.2 4H4.5A2.5 2.5 0 0 0 2 6.5v8A2.5 2.5 0 0 0 4.5 17h11a2.5 2.5 0 0 0 2.5-2.5v-8A2.5 2.5 0 0 0 15.5 4h-1.69l-.58-1.17A1.5 1.5 0 0 0 11.89 2H8.12Zm-.44 1.28A.5.5 0 0 1 8.12 3h3.77c.19 0 .36.1.45.28l.72 1.44a.5.5 0 0 0 .45.28h2c.82 0 1.5.67 1.5 1.5v8c0 .83-.68 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 3 14.5v-8C3 5.67 3.67 5 4.5 5h2a.5.5 0 0 0 .44-.28l.73-1.44Z"]);exports.AddRegular=e,exports.ArrowClockwiseRegular=l,exports.ArrowCollapseAllRegular=r,exports.ArrowExpandAllRegular=t,exports.AttachRegular=c,exports.CameraRegular=o;
@@ -1 +1 @@
1
- "use strict";var e=require("../utils/createFluentIcon.js");const a=e.createFluentIcon("PrintRegular","1em",["M5 4.5C5 3.67 5.67 3 6.5 3h7c.83 0 1.5.67 1.5 1.5V5h.5A2.5 2.5 0 0 1 18 7.5v5c0 .83-.67 1.5-1.5 1.5H15v1.5c0 .83-.67 1.5-1.5 1.5h-7A1.5 1.5 0 0 1 5 15.5V14H3.5A1.5 1.5 0 0 1 2 12.5v-5A2.5 2.5 0 0 1 4.5 5H5v-.5ZM6 5h8v-.5a.5.5 0 0 0-.5-.5h-7a.5.5 0 0 0-.5.5V5Zm-1 8v-1.5c0-.83.67-1.5 1.5-1.5h7c.83 0 1.5.67 1.5 1.5V13h1.5a.5.5 0 0 0 .5-.5v-5c0-.83-.67-1.5-1.5-1.5h-11C3.67 6 3 6.67 3 7.5v5c0 .28.22.5.5.5H5Zm1.5-2a.5.5 0 0 0-.5.5v4c0 .28.22.5.5.5h7a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-7Z"]),l=e.createFluentIcon("SearchRegular","1em",["M8.5 3a5.5 5.5 0 0 1 4.23 9.02l4.12 4.13a.5.5 0 0 1-.63.76l-.07-.06-4.13-4.12A5.5 5.5 0 1 1 8.5 3Zm0 1a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z"]),c=e.createFluentIcon("SendFilled","1em",["M2.72 2.05a.5.5 0 0 0-.7.58l1.5 5.62c.05.19.2.33.4.36l6.85 1.14c.28.05.28.45 0 .5l-6.85 1.14a.5.5 0 0 0-.4.36l-1.5 5.62a.5.5 0 0 0 .7.58l15-7.5a.5.5 0 0 0 0-.9l-15-7.5Z"],{flipInRtl:!0}),r=e.createFluentIcon("SendRegular","1em",["M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z"],{flipInRtl:!0});exports.PrintRegular=a,exports.SearchRegular=l,exports.SendFilled=c,exports.SendRegular=r;
1
+ "use strict";var e=require("../utils/createFluentIcon.js");const a=e.createFluentIcon("PrintRegular","1em",["M5 4.5C5 3.67 5.67 3 6.5 3h7c.83 0 1.5.67 1.5 1.5V5h.5A2.5 2.5 0 0 1 18 7.5v5c0 .83-.67 1.5-1.5 1.5H15v1.5c0 .83-.67 1.5-1.5 1.5h-7A1.5 1.5 0 0 1 5 15.5V14H3.5A1.5 1.5 0 0 1 2 12.5v-5A2.5 2.5 0 0 1 4.5 5H5v-.5ZM6 5h8v-.5a.5.5 0 0 0-.5-.5h-7a.5.5 0 0 0-.5.5V5Zm-1 8v-1.5c0-.83.67-1.5 1.5-1.5h7c.83 0 1.5.67 1.5 1.5V13h1.5a.5.5 0 0 0 .5-.5v-5c0-.83-.67-1.5-1.5-1.5h-11C3.67 6 3 6.67 3 7.5v5c0 .28.22.5.5.5H5Zm1.5-2a.5.5 0 0 0-.5.5v4c0 .28.22.5.5.5h7a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-7Z"]),l=e.createFluentIcon("SearchRegular","1em",["M12.73 13.44a6.5 6.5 0 1 1 .7-.7l3.42 3.4a.5.5 0 0 1-.63.77l-.07-.06-3.42-3.41Zm-.71-.71A5.54 5.54 0 0 0 14 8.5a5.5 5.5 0 1 0-1.98 4.23Z"]),c=e.createFluentIcon("SendFilled","1em",["M2.72 2.05a.5.5 0 0 0-.7.58l1.5 5.62c.05.19.2.33.4.36l6.85 1.14c.28.05.28.45 0 .5l-6.85 1.14a.5.5 0 0 0-.4.36l-1.5 5.62a.5.5 0 0 0 .7.58l15-7.5a.5.5 0 0 0 0-.9l-15-7.5Z"],{flipInRtl:!0}),r=e.createFluentIcon("SendRegular","1em",["M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z"],{flipInRtl:!0});exports.PrintRegular=a,exports.SearchRegular=l,exports.SendFilled=c,exports.SendRegular=r;
@@ -1 +1 @@
1
- "use strict";const l=require("../utils/createFluentIcon.js").createFluentIcon("Settings24Regular","24",["M12.01 2.25c.74 0 1.47.1 2.18.25.32.07.55.33.59.65l.17 1.53a1.38 1.38 0 0 0 1.92 1.11l1.4-.61c.3-.13.64-.06.85.17a9.8 9.8 0 0 1 2.2 3.8c.1.3 0 .63-.26.82l-1.25.92a1.38 1.38 0 0 0 0 2.22l1.25.92c.26.19.36.52.27.82a9.8 9.8 0 0 1-2.2 3.8.75.75 0 0 1-.85.17l-1.4-.62a1.38 1.38 0 0 0-1.93 1.12l-.17 1.52a.75.75 0 0 1-.58.65 9.52 9.52 0 0 1-4.4 0 .75.75 0 0 1-.57-.65l-.17-1.52a1.38 1.38 0 0 0-1.93-1.11l-1.4.62a.75.75 0 0 1-.85-.18 9.8 9.8 0 0 1-2.2-3.8c-.1-.3 0-.63.26-.82l1.25-.92a1.38 1.38 0 0 0 0-2.22l-1.24-.92a.75.75 0 0 1-.28-.82 9.8 9.8 0 0 1 2.2-3.8c.23-.23.57-.3.86-.17l1.4.62c.4.17.86.15 1.25-.08.38-.22.63-.6.68-1.04l.17-1.53a.75.75 0 0 1 .58-.65c.72-.16 1.45-.24 2.2-.25Zm0 1.5c-.45 0-.9.04-1.35.12l-.11.97a2.89 2.89 0 0 1-4.03 2.33l-.9-.4A8.3 8.3 0 0 0 4.29 9.1l.8.59a2.88 2.88 0 0 1 0 4.64l-.8.59a8.3 8.3 0 0 0 1.35 2.32l.9-.4a2.88 2.88 0 0 1 4.02 2.32l.1.99c.9.15 1.8.15 2.7 0l.1-.99a2.88 2.88 0 0 1 4.02-2.32l.9.4a8.3 8.3 0 0 0 1.35-2.32l-.8-.59a2.88 2.88 0 0 1 0-4.64l.8-.59a8.3 8.3 0 0 0-1.35-2.32l-.9.4a2.88 2.88 0 0 1-4.02-2.32l-.1-.98c-.45-.08-.9-.11-1.34-.12ZM12 8.25a3.75 3.75 0 1 1 0 7.5 3.75 3.75 0 0 1 0-7.5Zm0 1.5a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Z"]);exports.Settings24Regular=l;
1
+ "use strict";var a=require("../utils/createFluentIcon.js");const l=a.createFluentIcon("QuestionCircle24Regular","24",["M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 1.67a8.34 8.34 0 0 0 0 16.66 8.34 8.34 0 0 0 0-16.66Zm0 11.83a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8.75a2.75 2.75 0 0 1 2.75 2.75c0 1.01-.3 1.57-1.05 2.36l-.17.17c-.62.62-.78.89-.78 1.47a.75.75 0 0 1-1.5 0c0-1.01.3-1.57 1.05-2.36l.17-.17c.62-.62.78-.89.78-1.47a1.25 1.25 0 0 0-2.5-.13v.13a.75.75 0 0 1-1.5 0A2.75 2.75 0 0 1 12 6.75Z"]),c=a.createFluentIcon("Settings24Regular","24",["M12.01 2.25c.74 0 1.47.1 2.18.25.32.07.55.33.59.65l.17 1.53a1.38 1.38 0 0 0 1.92 1.11l1.4-.61c.3-.13.64-.06.85.17a9.8 9.8 0 0 1 2.2 3.8c.1.3 0 .63-.26.82l-1.25.92a1.38 1.38 0 0 0 0 2.22l1.25.92c.26.19.36.52.27.82a9.8 9.8 0 0 1-2.2 3.8.75.75 0 0 1-.85.17l-1.4-.62a1.38 1.38 0 0 0-1.93 1.12l-.17 1.52a.75.75 0 0 1-.58.65 9.52 9.52 0 0 1-4.4 0 .75.75 0 0 1-.57-.65l-.17-1.52a1.38 1.38 0 0 0-1.93-1.11l-1.4.62a.75.75 0 0 1-.85-.18 9.8 9.8 0 0 1-2.2-3.8c-.1-.3 0-.63.26-.82l1.25-.92a1.38 1.38 0 0 0 0-2.22l-1.24-.92a.75.75 0 0 1-.28-.82 9.8 9.8 0 0 1 2.2-3.8c.23-.23.57-.3.86-.17l1.4.62c.4.17.86.15 1.25-.08.38-.22.63-.6.68-1.04l.17-1.53a.75.75 0 0 1 .58-.65c.72-.16 1.45-.24 2.2-.25Zm0 1.5c-.45 0-.9.04-1.35.12l-.11.97a2.89 2.89 0 0 1-4.03 2.33l-.9-.4A8.3 8.3 0 0 0 4.29 9.1l.8.59a2.88 2.88 0 0 1 0 4.64l-.8.59a8.3 8.3 0 0 0 1.35 2.32l.9-.4a2.88 2.88 0 0 1 4.02 2.32l.1.99c.9.15 1.8.15 2.7 0l.1-.99a2.88 2.88 0 0 1 4.02-2.32l.9.4a8.3 8.3 0 0 0 1.35-2.32l-.8-.59a2.88 2.88 0 0 1 0-4.64l.8-.59a8.3 8.3 0 0 0-1.35-2.32l-.9.4a2.88 2.88 0 0 1-4.02-2.32l-.1-.98c-.45-.08-.9-.11-1.34-.12ZM12 8.25a3.75 3.75 0 1 1 0 7.5 3.75 3.75 0 0 1 0-7.5Zm0 1.5a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Z"]);exports.QuestionCircle24Regular=l,exports.Settings24Regular=c;
@@ -1 +1 @@
1
- "use strict";var a=require("../utils/createFluentIcon.js");const e=a.createFluentIcon("DocumentData32Regular","32",["M8 2a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V10.83a3 3 0 0 0-.88-2.12L20.3 2.88A3 3 0 0 0 18.17 2H8ZM7 5a1 1 0 0 1 1-1h9v5a3 3 0 0 0 3 3h5v15a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V5Zm17.59 5H20a1 1 0 0 1-1-1V4.41L24.59 10ZM12 13a1 1 0 1 0-2 0v12a1 1 0 1 0 2 0V13Zm5 8a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0v-4Zm4-5a1 1 0 0 1 1 1v8a1 1 0 1 1-2 0v-8a1 1 0 0 1 1-1Z"]),t=a.createFluentIcon("Edit20Regular","20",["M17.18 2.93a2.97 2.97 0 0 0-4.26-.06l-9.37 9.38c-.33.33-.56.74-.66 1.2l-.88 3.94a.5.5 0 0 0 .6.6l3.93-.87c.46-.1.9-.34 1.23-.68l9.36-9.36a2.97 2.97 0 0 0 .05-4.15Zm-3.55.65a1.97 1.97 0 1 1 2.8 2.8l-.68.66-2.8-2.79.68-.67Zm-1.38 1.38 2.8 2.8-7.99 7.97c-.2.2-.46.35-.74.41l-3.16.7.7-3.18c.07-.27.2-.51.4-.7l8-8Z"]);exports.DocumentData32Regular=e,exports.Edit20Regular=t;
1
+ "use strict";const a=require("../utils/createFluentIcon.js").createFluentIcon("DocumentData32Regular","32",["M8 2a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V10.83a3 3 0 0 0-.88-2.12L20.3 2.88A3 3 0 0 0 18.17 2H8ZM7 5a1 1 0 0 1 1-1h9v5a3 3 0 0 0 3 3h5v15a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V5Zm17.59 5H20a1 1 0 0 1-1-1V4.41L24.59 10ZM12 13a1 1 0 1 0-2 0v12a1 1 0 1 0 2 0V13Zm5 8a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0v-4Zm4-5a1 1 0 0 1 1 1v8a1 1 0 1 1-2 0v-8a1 1 0 0 1 1-1Z"]);exports.DocumentData32Regular=a;
@@ -1 +1 @@
1
- "use strict";const e=require("../utils/createFluentIcon.js").createFluentIcon("ErrorCircle12Filled","12",["M6 11A5 5 0 1 0 6 1a5 5 0 0 0 0 10Zm-.75-2.75a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0Zm.26-4.84a.5.5 0 0 1 .98 0l.01.09v2.59a.5.5 0 0 1-1 0V3.41Z"]);exports.ErrorCircle12Filled=e;
1
+ "use strict";var e=require("../utils/createFluentIcon.js");const l=e.createFluentIcon("Edit20Regular","20",["M17.18 2.93a2.97 2.97 0 0 0-4.26-.06l-9.37 9.38c-.33.33-.56.74-.66 1.2l-.88 3.94a.5.5 0 0 0 .6.6l3.93-.87c.46-.1.9-.34 1.23-.68l9.36-9.36a2.97 2.97 0 0 0 .05-4.15Zm-3.55.65a1.97 1.97 0 1 1 2.8 2.8l-.68.66-2.8-2.79.68-.67Zm-1.38 1.38 2.8 2.8-7.99 7.97c-.2.2-.46.35-.74.41l-3.16.7.7-3.18c.07-.27.2-.51.4-.7l8-8Z"]),r=e.createFluentIcon("ErrorCircle12Filled","12",["M6 11A5 5 0 1 0 6 1a5 5 0 0 0 0 10Zm-.75-2.75a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0Zm.26-4.84a.5.5 0 0 1 .98 0l.01.09v2.59a.5.5 0 0 1-1 0V3.41Z"]);exports.Edit20Regular=l,exports.ErrorCircle12Filled=r;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_commonjsHelpers.js"),t=require("./media.js");const{webm:i,mp4:o}=t.media,n=()=>"undefined"!=typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,s=()=>"wakeLock"in navigator;var l=class{constructor(){if(this.enabled=!1,s()){this._wakeLock=null;const e=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",e),document.addEventListener("fullscreenchange",e)}else n()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",i),this._addSourceToVideo(this.noSleepVideo,"mp4",o),this.noSleepVideo.addEventListener("loadedmetadata",(()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",(()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())}))})))}_addSourceToVideo(e,t,i){var o=document.createElement("source");o.src=i,o.type=`video/${t}`,e.appendChild(o)}get isEnabled(){return this.enabled}enable(){if(s())return navigator.wakeLock.request("screen").then((e=>{this._wakeLock=e,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",(()=>{console.log("Wake Lock released.")}))})).catch((e=>{throw this.enabled=!1,console.error(`${e.name}, ${e.message}`),e}));if(n())return this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=window.setInterval((()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve();return this.noSleepVideo.play().then((e=>(this.enabled=!0,e))).catch((e=>{throw this.enabled=!1,e}))}disable(){s()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):n()?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}},r=e.getDefaultExportFromCjs(l);exports.default=r;
@@ -0,0 +1 @@
1
+ "use strict";exports.media={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHF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FVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGU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kAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { CodicentAppState } from "../hooks";
2
3
  declare const Login: React.FC<{
3
4
  state: CodicentAppState;
@@ -1 +1 @@
1
- {"version":3,"file":"Login.d.ts","sourceRoot":"","sources":["../../../src/pages/Login.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAA2D,MAAM,UAAU,CAAC;AAuBrG,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,CA8BhD,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Login.d.ts","sourceRoot":"","sources":["../../../src/pages/Login.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAA2D,MAAM,UAAU,CAAC;AAuBrG,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAwDhD,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react"),require("../services/codicent.js"),require("../components/Markdown.js"),require("../components/Textarea.js");var r=require("../components/Button.js"),s=require("../components/Title.js"),o=require("../components/Text.js");require("../components/Spinner.js"),require("../components/TextHeader.js"),require("../components/TypingIndicator.js"),require("../components/Dialog.js"),require("../components/ChatInput.js"),require("../components/CombinedPlaceholderDialog.js"),require("../components/ChatMessage.js"),require("../components/Header.js"),require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js");var i=require("../config/index.js");require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("../components/FileThumbnail.js"),require("../components/MessageInput.js"),require("../components/UploadFile.js"),require("../components/SnapFooter.js"),require("../components/Profile.js"),require("../components/MessageItem.js"),require("../components/Content.js"),require("../components/AiInput.js"),require("../components/SearchBox.js"),require("../components/HtmlView.js"),require("../components/Footer.js"),require("../components/Page.js"),require("./AppFrame.js"),require("./Snap.js"),require("./Search.js"),require("./CrmPage.js"),require("./ImageView.js"),require("./FormInvite.js"),require("./FormAccept.js"),require("./Sales.js"),require("../stores/chatStore.js");var n=require("../hooks/useLocalization.js"),t=require("../hooks/useAppStyles.js"),a=require("../node_modules/@griffel/react/makeStyles.esm.js"),u=require("../node_modules/@griffel/core/mergeClasses.esm.js");const l=a.makeStyles({container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundPosition:"calc(50% - 100px) center",backgroundRepeat:"no-repeat",backgroundSize:"contain",gap:"20px",padding:"0 20px"},button:{minWidth:"15rem"}});exports.default=({state:a})=>{const{loginWithRedirect:c}=a.auth,m=l(),p=t.default(),{t:j}=n.default();return e.jsxs("div",{className:m.container,style:{backgroundImage:`url(${i.getConfigValue("HOME_BACKGROUND_IMAGE_URL")})`},children:[e.jsx(s.Title,{children:`${j("Välkommen till")} ${i.getConfigValue("INDEX_TITLE")}!`}),e.jsx(o.Text,{size:400,children:j("Logga in, eller registrera ett konto, för att komma igång.")}),e.jsx(r.Button,{className:u.mergeClasses(p.button,m.button),size:"large",appearance:"primary",onClick:()=>c(),children:j("Logga in")}),!i.getConfigValue("HIDE_REGISTER_BUTTON")&&e.jsx(r.Button,{className:u.mergeClasses(p.button,m.button),size:"large",appearance:"primary",onClick:()=>c({authorizationParams:{screen_hint:"signup"}}),children:j("Registrera")})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");require("../services/codicent.js"),require("../components/Markdown.js"),require("../components/Textarea.js");var s=require("../components/Button.js"),i=require("../components/Title.js"),n=require("../components/Text.js");require("../components/Spinner.js"),require("../components/TextHeader.js"),require("../components/TypingIndicator.js"),require("../components/Dialog.js"),require("../components/ChatInput.js"),require("../components/CombinedPlaceholderDialog.js"),require("../components/ChatMessage.js"),require("../components/Header.js"),require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js");var o=require("../config/index.js");require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("../components/FileThumbnail.js"),require("../components/MessageInput.js"),require("../components/UploadFile.js"),require("../components/SnapFooter.js"),require("../components/Profile.js"),require("../components/MessageItem.js"),require("../components/Content.js"),require("../components/AiInput.js"),require("../components/SearchBox.js"),require("../components/HtmlView.js"),require("../components/Footer.js"),require("../components/Page.js"),require("./AppFrame.js"),require("./Snap.js"),require("./Search.js"),require("./CrmPage.js"),require("./ImageView.js"),require("./FormInvite.js"),require("./FormAccept.js"),require("./Sales.js"),require("../stores/chatStore.js");var t=require("../hooks/useLocalization.js"),a=require("../hooks/useAppStyles.js"),u=require("../node_modules/@griffel/react/makeStyles.esm.js"),l=require("../node_modules/@griffel/core/mergeClasses.esm.js");const c=u.makeStyles({container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundPosition:"calc(50% - 100px) center",backgroundRepeat:"no-repeat",backgroundSize:"contain",gap:"20px",padding:"0 20px"},button:{minWidth:"15rem"}});exports.default=({state:u})=>{const{loginWithRedirect:m}=u.auth,j=c(),p=a.default(),{t:g}=t.default(),q=o.getConfigValue("LOGIN_REDIRECT");return r.useEffect((()=>{q&&m()}),[q]),q?e.jsxs("div",{className:j.container,style:{backgroundImage:`url(${o.getConfigValue("HOME_BACKGROUND_IMAGE_URL")})`},children:[e.jsx(i.Title,{children:`${g("Välkommen till")} ${o.getConfigValue("INDEX_TITLE")}!`}),e.jsx(n.Text,{size:400,children:g("Omdirigerar till inloggning...")})]}):e.jsxs("div",{className:j.container,style:{backgroundImage:`url(${o.getConfigValue("HOME_BACKGROUND_IMAGE_URL")})`},children:[e.jsx(i.Title,{children:`${g("Välkommen till")} ${o.getConfigValue("INDEX_TITLE")}!`}),e.jsx(n.Text,{size:400,children:g("Logga in, eller registrera ett konto, för att komma igång.")}),e.jsx(s.Button,{className:l.mergeClasses(p.button,j.button),size:"large",appearance:"primary",onClick:()=>m(),children:g("Logga in")}),!o.getConfigValue("HIDE_REGISTER_BUTTON")&&e.jsx(s.Button,{className:l.mergeClasses(p.button,j.button),size:"large",appearance:"primary",onClick:()=>m({authorizationParams:{screen_hint:"signup"}}),children:g("Registrera")})]})};
@@ -1 +1 @@
1
- {"version":3,"file":"withWakeLock.d.ts","sourceRoot":"","sources":["../../../src/utils/withWakeLock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAE9E,iBAAS,YAAY,CAAC,CAAC,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,WAClB,iBAAiB,CAAC,CAAC,CAAC,6CAwC5D;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"withWakeLock.d.ts","sourceRoot":"","sources":["../../../src/utils/withWakeLock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAG9E,iBAAS,YAAY,CAAC,CAAC,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,WAClB,iBAAiB,CAAC,CAAC,CAAC,6CA8D5D;AAED,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");exports.default=function(o){return function(c){const[t,a]=r.useState(null);return r.useEffect((()=>{!async function(){if("wakeLock"in navigator)try{const e=await navigator.wakeLock.request("screen");a(e),console.log("Wake Lock acquired!")}catch(e){console.error(`Error acquiring wake lock: ${e}`)}else console.error("Wake Lock API not supported!")}()}),[]),r.useEffect((()=>()=>{t&&t.release().then((()=>{console.log("Wake Lock released!")})).catch((e=>{console.error("Error releasing wake lock:",e)}))}),[t]),e.jsx(o,{...c})}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react"),r=require("../node_modules/nosleep.js/src/index.js");exports.default=function(l){return function(s){const[n,c]=o.useState(null),[a]=o.useState((()=>new r.default));return o.useEffect((()=>{!async function(){if("wakeLock"in navigator)try{const e=await navigator.wakeLock.request("screen");c(e),console.log("Wake Lock API acquired!")}catch(e){console.error(`Error acquiring wake lock API: ${e}`);try{a.enable(),console.log("NoSleep.js enabled as fallback!")}catch(e){console.error(`Error enabling NoSleep.js: ${e}`)}}else{console.log("Wake Lock API not supported, using NoSleep.js");try{a.enable(),console.log("NoSleep.js enabled!")}catch(e){console.error(`Error enabling NoSleep.js: ${e}`)}}}()}),[]),o.useEffect((()=>()=>{n&&n.release().then((()=>{console.log("Wake Lock released!")})).catch((e=>{console.error("Error releasing wake lock:",e)}));try{a.disable(),console.log("NoSleep.js disabled!")}catch(e){console.error("Error disabling NoSleep.js:",e)}}),[n,a]),e.jsx(l,{...s})}};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{getConfigValue as o}from"../config/index.js";import{makeStyles as i}from"../node_modules/@griffel/react/makeStyles.esm.js";import{DismissRegular as n,CopyRegular as r,ChevronRightFilled as s}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-1.js";import{ShareRegular as u}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-4.js";import{SignOut24Regular as l,SlideText24Regular as t}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-14.js";import{Payment24Regular as c}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-11.js";import{QuestionCircle24Regular as m}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-12.js";import{SendFilled as a}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-3.js";import{AttachRegular as d,CameraRegular as f,AddRegular as g,ArrowClockwiseRegular as R}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js";import{ImageRegular as h,LocationRegular as p,LocationFilled as b}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js";import{WandRegular as j}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-5.js";import{Button as _}from"../node_modules/@fluentui/react-button/lib/components/Button/Button.js";import{mergeClasses as k}from"../node_modules/@griffel/core/mergeClasses.esm.js";const C=i({button:{borderRadius:o("BUTTON_BORDER_RADIUS")||void 0}}),S={DismissRegular:e(n,{}),CopyRegular:e(r,{}),ShareRegular:e(u,{}),SignOut24Regular:e(l,{}),Payment24Regular:e(c,{}),SlideText24Regular:e(t,{}),QuestionCircle24Regular:e(m,{}),SendFilled:e(a,{}),AttachRegular:e(d,{}),ImageRegular:e(h,{}),CameraRegular:e(f,{}),LocationRegular:e(p,{}),LocationFilled:e(b,{}),AddRegular:e(g,{}),ChevronRightFilled:e(s,{}),ArrowClockwiseRegular:e(R,{}),WandRegular:e(j,{})},B=({children:o,className:i,icon:n,image:r,...s})=>{const u=C();return e(_,{className:k(i,u.button),icon:n?{children:S[n]}:r?{children:r}:void 0,...s,children:o})};export{B as Button};
1
+ import{jsx as e}from"react/jsx-runtime";import{getConfigValue as o}from"../config/index.js";import{makeStyles as i}from"../node_modules/@griffel/react/makeStyles.esm.js";import{DismissRegular as n,CopyRegular as r,ChevronRightFilled as s}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-1.js";import{ShareRegular as u}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-4.js";import{SignOut24Regular as l,SlideText24Regular as t}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-14.js";import{Payment24Regular as c}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-11.js";import{QuestionCircle24Regular as m}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-13.js";import{SendFilled as a}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-3.js";import{AttachRegular as d,CameraRegular as f,AddRegular as g,ArrowClockwiseRegular as R}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js";import{ImageRegular as h,LocationRegular as p,LocationFilled as b}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js";import{WandRegular as j}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-5.js";import{Button as _}from"../node_modules/@fluentui/react-button/lib/components/Button/Button.js";import{mergeClasses as k}from"../node_modules/@griffel/core/mergeClasses.esm.js";const C=i({button:{borderRadius:o("BUTTON_BORDER_RADIUS")||void 0}}),S={DismissRegular:e(n,{}),CopyRegular:e(r,{}),ShareRegular:e(u,{}),SignOut24Regular:e(l,{}),Payment24Regular:e(c,{}),SlideText24Regular:e(t,{}),QuestionCircle24Regular:e(m,{}),SendFilled:e(a,{}),AttachRegular:e(d,{}),ImageRegular:e(h,{}),CameraRegular:e(f,{}),LocationRegular:e(p,{}),LocationFilled:e(b,{}),AddRegular:e(g,{}),ChevronRightFilled:e(s,{}),ArrowClockwiseRegular:e(R,{}),WandRegular:e(j,{})},B=({children:o,className:i,icon:n,image:r,...s})=>{const u=C();return e(_,{className:k(i,u.button),icon:n?{children:S[n]}:r?{children:r}:void 0,...s,children:o})};export{B as Button};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as r}from"react";import{useNavigate as n}from"react-router-dom";import{CodicentService as s}from"../services/codicent.js";import a from"./Markdown.js";import"./Textarea.js";import"./Button.js";import{Text as l}from"./Text.js";import"./Spinner.js";import"./TextHeader.js";import"./TypingIndicator.js";import"./Dialog.js";import"./ChatInput.js";import"./CombinedPlaceholderDialog.js";import"./ChatMessage.js";import"./Header.js";import m from"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import{getConfigValue as d}from"../config/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import"../pages/AppFrame.js";import"../pages/Snap.js";import"../pages/Search.js";import"../pages/Login.js";import"../pages/CrmPage.js";import"../pages/ImageView.js";import"../pages/FormInvite.js";import"../pages/FormAccept.js";import"../pages/Sales.js";import"../stores/chatStore.js";import c from"../hooks/useLocalization.js";import"../hooks/useAppStyles.js";import{FileThumbnail as p}from"./FileThumbnail.js";import"./MessageInput.js";import"./UploadFile.js";import"./SnapFooter.js";import"./Profile.js";import"./Content.js";import"./AiInput.js";import"./SearchBox.js";import"./HtmlView.js";import"./Footer.js";import"./Page.js";import{makeStyles as u}from"../node_modules/@griffel/react/makeStyles.esm.js";import{Card as h}from"../node_modules/@fluentui/react-card/lib/components/Card/Card.js";import{FullScreenMaximizeRegular as g}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js";import{ArrowCollapseAllRegular as f,ArrowExpandAllRegular as j}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js";import{CardHeader as x}from"../node_modules/@fluentui/react-card/lib/components/CardHeader/CardHeader.js";import{Skeleton as b}from"../node_modules/@fluentui/react-skeleton/lib/components/Skeleton/Skeleton.js";import{SkeletonItem as S}from"../node_modules/@fluentui/react-skeleton/lib/components/SkeletonItem/SkeletonItem.js";import{Caption1 as O}from"../node_modules/@fluentui/react-text/lib/components/presets/Caption1/Caption1.js";import{tokens as _}from"../node_modules/@fluentui/tokens/lib/tokens.js";import{Edit20Regular as k}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-6.js";const w=u({iframe:{border:"none",width:"100%",height:"100%"},main:{gap:"36px",display:"flex",flexDirection:"column",flexWrap:"wrap"},card:{minWidth:"300px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",maxHeight:"11em",borderRadius:"10px",position:"relative"},expandedCard:{minWidth:"320px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",borderRadius:"10px",position:"relative"},text:{margin:"0.5em",whiteSpace:"normal",fontSize:"larger"},caption:{color:_.colorNeutralForeground3},headerImage:{borderRadius:"4px",maxWidth:"44px",maxHeight:"44px"},rectangle:{margin:0,top:"-5px",left:"-2px",width:"5px",position:"absolute",height:"100%"},fileList:{display:"flex",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin",msOverflowStyle:"none",padding:"4px",margin:"0 -4px",maxWidth:"100%",boxSizing:"border-box","&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:_.colorNeutralStroke1,borderRadius:"3px"}},htmlButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},headerButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},iconButtonRow:{position:"absolute",top:"0.5em",right:"0.5em",display:"flex",alignItems:"center",gap:"0.5em",zIndex:2},content:{overflow:"hidden",transition:"max-height 0.3s ease-out",userSelect:"text"},truncated:{maxHeight:"10em"},header:{display:"flex",flexDirection:"row",gap:"0.5em"}}),I=({header:u,description:_,timestamp:I,text:v,image:E,tags:N,id:C,fileIds:T,codicentService:y,busy:A,onEdit:B,onShowHtmlPreview:F})=>{const L=w(),R=n(),[H,P]=o(!1),[D,G]=o(!1),z=i(null),M=Object.keys(d("LOGBOOK_TAG_DEFINITIONS")),K=M.find((e=>N.includes(e)))||(T.length>0?M.find((e=>"file"===e)):void 0),[W,$]=o([]),{t:U}=c(),Y=["TYPE","CUSTOMER","CONTACT","SALESPERSON","MESSAGE","COMPANY","PHONE","EMAIL","WEBSITE","INFO","FÖRETAG","ROLE","KONTAKT"],V=[U("Typ"),U("Kund"),U("Kontakt"),U("Säljare"),U("Meddelande"),U("Företag"),U("Telefon"),U("E-post"),U("Hemsida"),U("Info"),U("Företag"),U("Roll"),U("Kontakt")];r((()=>{Promise.all(T.map((e=>y.getFileInfo(e)))).then((e=>{$(e)}))}),[y,$,T]),r((()=>{const e=()=>{if(z.current){const e=z.current.scrollHeight>100+(W.length>0?-72:0);G(e)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[v,W]);const X=()=>P(!H),q=N.includes("chat")&&(v.includes("#function_result")||v.includes("#finish_reason_function_call")),J=e=>{const t=e.indexOf("```html");if(-1===t)return e;const o=e.indexOf("```",t+7);if(-1===o)return e.substring(t+7);return e.substring(t+7,o)},Q=new m(v).data,Z=K&&d("LOGBOOK_TAG_DEFINITIONS")[K].editable,ee=K&&d("LOGBOOK_TAG_DEFINITIONS")[K].imageSize||void 0;return e(h,{className:H?L.expandedCard:L.card,style:{backgroundColor:d("MESSAGE_HIDE_BAR")?K?d("LOGBOOK_TAG_DEFINITIONS")[K].color:d("APP_HEADER_COLOR")||"#eee":"#eee"},onClick:N.includes("chat")?e=>{N.includes("chat")&&(e&&e.stopPropagation(),R("/chat?id="+C))}:void 0,children:[!d("MESSAGE_HIDE_BAR")&&t("div",{className:L.rectangle,style:{backgroundColor:K?d("LOGBOOK_TAG_DEFINITIONS")[K].color:d("APP_HEADER_COLOR")||void 0}}),e("div",{className:L.iconButtonRow,children:[Z&&B&&t(k,{className:L.htmlButton,onClick:()=>B()}),F&&!Z&&N.includes("html")&&t(g,{className:L.htmlButton,onClick:e=>{e.stopPropagation(),F(J(v))}}),D&&!N.includes("chat")&&H&&t(f,{className:L.headerButton,onClick:X}),D&&!N.includes("chat")&&!H&&t(j,{className:L.headerButton,onClick:X})]}),t(x,{image:E?t("img",{className:L.headerImage,src:"app_logo.svg",alt:"User"}):null,header:A?t(b,{style:{width:"50%"},children:t(S,{})}):e("div",{className:L.header,children:[t(l,{weight:"semibold",children:u}),I&&t(l,{weight:"regular",children:I})]}),description:t(O,{className:L.caption,children:_})}),e("div",{ref:z,className:`${L.content} ${H?"":L.truncated}`,children:[W.length>0&&t("div",{className:L.fileList,children:W.map((e=>t(p,{file:e,thumbnailSize:ee,getImageUrl:s.getImageUrl,onClick:()=>{e.contentType.startsWith("image")?R(`/image?id=${C}&file=${e.id}`):s.downloadFile(e)}},e.id)))}),A?e(b,{style:{width:"100%"},children:[t(S,{}),t(S,{}),t(S,{}),t(S,{}),t(S,{})]}):t("div",{className:L.text,children:N.includes("html")?t("iframe",{className:L.iframe,title:"html",srcDoc:J(v),sandbox:"allow-same-origin allow-scripts"}):N.includes("crm")&&0===Object.keys(Q).length?t(a,{content:q?"*Tänker...*":Q?(()=>{const e=new RegExp(`(${Y.join("|")})\\s*:\\s*`,"gi");return v.replace(e,((e,t)=>{const o=Y.indexOf(t.toUpperCase());-1===o&&console.log("Field not found:",t);return`\n**${-1!==o?V[o]:t}:** `})).trim()})():v}):t(a,{content:q?"*Tänker...*":Q&&Q&&Object.keys(Q).length>0?Object.keys(Q).map((e=>{const t=Y.indexOf(e.toUpperCase());return`**${-1!==t?V[t]:e}:** ${Q[e]}\n`})).join("\n"):v})})]})]})};export{I as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as r}from"react";import{useNavigate as n}from"react-router-dom";import{CodicentService as s}from"../services/codicent.js";import a from"./Markdown.js";import"./Textarea.js";import"./Button.js";import{Text as l}from"./Text.js";import"./Spinner.js";import"./TextHeader.js";import"./TypingIndicator.js";import"./Dialog.js";import"./ChatInput.js";import"./CombinedPlaceholderDialog.js";import"./ChatMessage.js";import"./Header.js";import m from"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import{getConfigValue as d}from"../config/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import"../pages/AppFrame.js";import"../pages/Snap.js";import"../pages/Search.js";import"../pages/Login.js";import"../pages/CrmPage.js";import"../pages/ImageView.js";import"../pages/FormInvite.js";import"../pages/FormAccept.js";import"../pages/Sales.js";import"../stores/chatStore.js";import c from"../hooks/useLocalization.js";import"../hooks/useAppStyles.js";import{FileThumbnail as p}from"./FileThumbnail.js";import"./MessageInput.js";import"./UploadFile.js";import"./SnapFooter.js";import"./Profile.js";import"./Content.js";import"./AiInput.js";import"./SearchBox.js";import"./HtmlView.js";import"./Footer.js";import"./Page.js";import{makeStyles as u}from"../node_modules/@griffel/react/makeStyles.esm.js";import{Card as h}from"../node_modules/@fluentui/react-card/lib/components/Card/Card.js";import{FullScreenMaximizeRegular as g}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js";import{ArrowCollapseAllRegular as f,ArrowExpandAllRegular as j}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js";import{CardHeader as x}from"../node_modules/@fluentui/react-card/lib/components/CardHeader/CardHeader.js";import{Skeleton as b}from"../node_modules/@fluentui/react-skeleton/lib/components/Skeleton/Skeleton.js";import{SkeletonItem as S}from"../node_modules/@fluentui/react-skeleton/lib/components/SkeletonItem/SkeletonItem.js";import{Caption1 as O}from"../node_modules/@fluentui/react-text/lib/components/presets/Caption1/Caption1.js";import{tokens as _}from"../node_modules/@fluentui/tokens/lib/tokens.js";import{Edit20Regular as k}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-7.js";const w=u({iframe:{border:"none",width:"100%",height:"100%"},main:{gap:"36px",display:"flex",flexDirection:"column",flexWrap:"wrap"},card:{minWidth:"300px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",maxHeight:"11em",borderRadius:"10px",position:"relative"},expandedCard:{minWidth:"320px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",borderRadius:"10px",position:"relative"},text:{margin:"0.5em",whiteSpace:"normal",fontSize:"larger"},caption:{color:_.colorNeutralForeground3},headerImage:{borderRadius:"4px",maxWidth:"44px",maxHeight:"44px"},rectangle:{margin:0,top:"-5px",left:"-2px",width:"5px",position:"absolute",height:"100%"},fileList:{display:"flex",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin",msOverflowStyle:"none",padding:"4px",margin:"0 -4px",maxWidth:"100%",boxSizing:"border-box","&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:_.colorNeutralStroke1,borderRadius:"3px"}},htmlButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},headerButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},iconButtonRow:{position:"absolute",top:"0.5em",right:"0.5em",display:"flex",alignItems:"center",gap:"0.5em",zIndex:2},content:{overflow:"hidden",transition:"max-height 0.3s ease-out",userSelect:"text"},truncated:{maxHeight:"10em"},header:{display:"flex",flexDirection:"row",gap:"0.5em"}}),I=({header:u,description:_,timestamp:I,text:v,image:E,tags:N,id:C,fileIds:T,codicentService:y,busy:A,onEdit:B,onShowHtmlPreview:F})=>{const L=w(),R=n(),[H,P]=o(!1),[D,G]=o(!1),z=i(null),M=Object.keys(d("LOGBOOK_TAG_DEFINITIONS")),K=M.find((e=>N.includes(e)))||(T.length>0?M.find((e=>"file"===e)):void 0),[W,$]=o([]),{t:U}=c(),Y=["TYPE","CUSTOMER","CONTACT","SALESPERSON","MESSAGE","COMPANY","PHONE","EMAIL","WEBSITE","INFO","FÖRETAG","ROLE","KONTAKT"],V=[U("Typ"),U("Kund"),U("Kontakt"),U("Säljare"),U("Meddelande"),U("Företag"),U("Telefon"),U("E-post"),U("Hemsida"),U("Info"),U("Företag"),U("Roll"),U("Kontakt")];r((()=>{Promise.all(T.map((e=>y.getFileInfo(e)))).then((e=>{$(e)}))}),[y,$,T]),r((()=>{const e=()=>{if(z.current){const e=z.current.scrollHeight>100+(W.length>0?-72:0);G(e)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[v,W]);const X=()=>P(!H),q=N.includes("chat")&&(v.includes("#function_result")||v.includes("#finish_reason_function_call")),J=e=>{const t=e.indexOf("```html");if(-1===t)return e;const o=e.indexOf("```",t+7);if(-1===o)return e.substring(t+7);return e.substring(t+7,o)},Q=new m(v).data,Z=K&&d("LOGBOOK_TAG_DEFINITIONS")[K].editable,ee=K&&d("LOGBOOK_TAG_DEFINITIONS")[K].imageSize||void 0;return e(h,{className:H?L.expandedCard:L.card,style:{backgroundColor:d("MESSAGE_HIDE_BAR")?K?d("LOGBOOK_TAG_DEFINITIONS")[K].color:d("APP_HEADER_COLOR")||"#eee":"#eee"},onClick:N.includes("chat")?e=>{N.includes("chat")&&(e&&e.stopPropagation(),R("/chat?id="+C))}:void 0,children:[!d("MESSAGE_HIDE_BAR")&&t("div",{className:L.rectangle,style:{backgroundColor:K?d("LOGBOOK_TAG_DEFINITIONS")[K].color:d("APP_HEADER_COLOR")||void 0}}),e("div",{className:L.iconButtonRow,children:[Z&&B&&t(k,{className:L.htmlButton,onClick:()=>B()}),F&&!Z&&N.includes("html")&&t(g,{className:L.htmlButton,onClick:e=>{e.stopPropagation(),F(J(v))}}),D&&!N.includes("chat")&&H&&t(f,{className:L.headerButton,onClick:X}),D&&!N.includes("chat")&&!H&&t(j,{className:L.headerButton,onClick:X})]}),t(x,{image:E?t("img",{className:L.headerImage,src:"app_logo.svg",alt:"User"}):null,header:A?t(b,{style:{width:"50%"},children:t(S,{})}):e("div",{className:L.header,children:[t(l,{weight:"semibold",children:u}),I&&t(l,{weight:"regular",children:I})]}),description:t(O,{className:L.caption,children:_})}),e("div",{ref:z,className:`${L.content} ${H?"":L.truncated}`,children:[W.length>0&&t("div",{className:L.fileList,children:W.map((e=>t(p,{file:e,thumbnailSize:ee,getImageUrl:s.getImageUrl,onClick:()=>{e.contentType.startsWith("image")?R(`/image?id=${C}&file=${e.id}`):s.downloadFile(e)}},e.id)))}),A?e(b,{style:{width:"100%"},children:[t(S,{}),t(S,{}),t(S,{}),t(S,{}),t(S,{})]}):t("div",{className:L.text,children:N.includes("html")?t("iframe",{className:L.iframe,title:"html",srcDoc:J(v),sandbox:"allow-same-origin allow-scripts"}):N.includes("crm")&&0===Object.keys(Q).length?t(a,{content:q?"*Tänker...*":Q?(()=>{const e=new RegExp(`(${Y.join("|")})\\s*:\\s*`,"gi");return v.replace(e,((e,t)=>{const o=Y.indexOf(t.toUpperCase());-1===o&&console.log("Field not found:",t);return`\n**${-1!==o?V[o]:t}:** `})).trim()})():v}):t(a,{content:q?"*Tänker...*":Q&&Q&&Object.keys(Q).length>0?Object.keys(Q).map((e=>{const t=Y.indexOf(e.toUpperCase());return`**${-1!==t?V[t]:e}:** ${Q[e]}\n`})).join("\n"):v})})]})]})};export{I as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import"../services/codicent.js";import"./Markdown.js";import"./Textarea.js";import"./Button.js";import"./Spinner.js";import"./TextHeader.js";import"./TypingIndicator.js";import"./Dialog.js";import"./ChatInput.js";import"./CombinedPlaceholderDialog.js";import"./ChatMessage.js";import"./Header.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import"../config/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import"./FileThumbnail.js";import"./MessageInput.js";import"./UploadFile.js";import"./SnapFooter.js";import"./MessageItem.js";import"./Content.js";import"./AiInput.js";import"./SearchBox.js";import"./HtmlView.js";import"./Footer.js";import"./Page.js";import"../pages/AppFrame.js";import"../pages/Snap.js";import"../pages/Search.js";import"../pages/Login.js";import"../pages/CrmPage.js";import"../pages/ImageView.js";import"../pages/FormInvite.js";import"../pages/FormAccept.js";import"../pages/Sales.js";import"../stores/chatStore.js";import s from"../hooks/useLocalization.js";import"../hooks/useAppStyles.js";import{makeStyles as a}from"../node_modules/@griffel/react/makeStyles.esm.js";import{Image as n}from"../node_modules/@fluentui/react-image/lib/components/Image/Image.js";import{Input as m}from"../node_modules/@fluentui/react-input/lib/components/Input/Input.js";import{Button as l}from"../node_modules/@fluentui/react-button/lib/components/Button/Button.js";import{ArrowUndo20Regular as p}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-1.js";import{Edit20Regular as c}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-6.js";import{Text as u}from"../node_modules/@fluentui/react-text/lib/components/Text/Text.js";const d=a({container:{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"start",gap:"1rem",marginBottom:"1rem"},properties:{display:"flex",flexDirection:"column",alignItems:"start",justifyContent:"center",gap:"0.5rem",width:"100%"},editButton:{marginLeft:"0.5rem"},saveButton:{marginTop:"0.3rem"}}),j=({state:a})=>{const j=d(),{isAuthenticated:g,isLoading:f,user:h,nickname:v}=a.auth,[b,I]=o(),[x,y]=o(!1),[w,C]=o(!1),[_,k]=o(""),[S,B]=o(""),{t:z}=s();r((()=>{a.service.getUserInfo(v).then(I)}),[a.service,v]);const A=()=>{k(b?.name||h?.name||""),B(b?.email||h?.email||""),y(!1),C(!1)},F=async e=>{const t=await a.service.updateUserInfo({nickname:v,name:e.name,email:e.email||""});I(t)};return f?e("div",{children:z("Laddar...")}):g&&h&&t("div",{className:j.container,children:[e(n,{shape:"circular",width:100,src:b?.picture||h.picture,alt:h.name}),t("div",{className:j.properties,children:[e("h2",{children:x?e(i,{children:e(m,{type:"text",value:_,onChange:e=>{k(e.target.value)},contentAfter:e(l,{icon:e(p,{}),size:"small",onClick:A})})}):t(i,{children:[b?.name||h.name,e(l,{className:j.editButton,icon:e(c,{}),size:"small",onClick:()=>{y(!0),k(b?.name||h?.name||"")}})]})}),t(u,{children:[e(i,w?{children:e(m,{type:"text",value:S,onChange:e=>{B(e.target.value)},contentAfter:e(l,{icon:e(p,{}),size:"small",onClick:A})})}:{children:b?.email||h.email}),(x||w)&&e("div",{children:e(l,{className:j.saveButton,appearance:"primary",size:"small",onClick:()=>{y(!1),C(!1),F({...b,name:_,email:S})},children:"Spara"})})]})]})]})};export{j as default};
1
+ import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import"../services/codicent.js";import"./Markdown.js";import"./Textarea.js";import"./Button.js";import"./Spinner.js";import"./TextHeader.js";import"./TypingIndicator.js";import"./Dialog.js";import"./ChatInput.js";import"./CombinedPlaceholderDialog.js";import"./ChatMessage.js";import"./Header.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import"../config/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import"./FileThumbnail.js";import"./MessageInput.js";import"./UploadFile.js";import"./SnapFooter.js";import"./MessageItem.js";import"./Content.js";import"./AiInput.js";import"./SearchBox.js";import"./HtmlView.js";import"./Footer.js";import"./Page.js";import"../pages/AppFrame.js";import"../pages/Snap.js";import"../pages/Search.js";import"../pages/Login.js";import"../pages/CrmPage.js";import"../pages/ImageView.js";import"../pages/FormInvite.js";import"../pages/FormAccept.js";import"../pages/Sales.js";import"../stores/chatStore.js";import s from"../hooks/useLocalization.js";import"../hooks/useAppStyles.js";import{makeStyles as a}from"../node_modules/@griffel/react/makeStyles.esm.js";import{Image as n}from"../node_modules/@fluentui/react-image/lib/components/Image/Image.js";import{Input as m}from"../node_modules/@fluentui/react-input/lib/components/Input/Input.js";import{Button as l}from"../node_modules/@fluentui/react-button/lib/components/Button/Button.js";import{ArrowUndo20Regular as p}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-1.js";import{Edit20Regular as c}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-7.js";import{Text as u}from"../node_modules/@fluentui/react-text/lib/components/Text/Text.js";const d=a({container:{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"start",gap:"1rem",marginBottom:"1rem"},properties:{display:"flex",flexDirection:"column",alignItems:"start",justifyContent:"center",gap:"0.5rem",width:"100%"},editButton:{marginLeft:"0.5rem"},saveButton:{marginTop:"0.3rem"}}),j=({state:a})=>{const j=d(),{isAuthenticated:g,isLoading:f,user:h,nickname:v}=a.auth,[b,I]=o(),[x,y]=o(!1),[w,C]=o(!1),[_,k]=o(""),[S,B]=o(""),{t:z}=s();r((()=>{a.service.getUserInfo(v).then(I)}),[a.service,v]);const A=()=>{k(b?.name||h?.name||""),B(b?.email||h?.email||""),y(!1),C(!1)},F=async e=>{const t=await a.service.updateUserInfo({nickname:v,name:e.name,email:e.email||""});I(t)};return f?e("div",{children:z("Laddar...")}):g&&h&&t("div",{className:j.container,children:[e(n,{shape:"circular",width:100,src:b?.picture||h.picture,alt:h.name}),t("div",{className:j.properties,children:[e("h2",{children:x?e(i,{children:e(m,{type:"text",value:_,onChange:e=>{k(e.target.value)},contentAfter:e(l,{icon:e(p,{}),size:"small",onClick:A})})}):t(i,{children:[b?.name||h.name,e(l,{className:j.editButton,icon:e(c,{}),size:"small",onClick:()=>{y(!0),k(b?.name||h?.name||"")}})]})}),t(u,{children:[e(i,w?{children:e(m,{type:"text",value:S,onChange:e=>{B(e.target.value)},contentAfter:e(l,{icon:e(p,{}),size:"small",onClick:A})})}:{children:b?.email||h.email}),(x||w)&&e("div",{children:e(l,{className:j.saveButton,appearance:"primary",size:"small",onClick:()=>{y(!1),C(!1),F({...b,name:_,email:S})},children:"Spara"})})]})]})]})};export{j as default};
@@ -21,6 +21,7 @@ export declare class AppConfig {
21
21
  };
22
22
  }
23
23
  export interface AppConfigOptions {
24
+ LOGIN_REDIRECT: boolean;
24
25
  ABOUT_TEXT: string;
25
26
  ANONYMOUS_CODICENT: string | undefined;
26
27
  ANONYMOUS_TOKEN: string | undefined;
@@ -119,4 +120,16 @@ export declare function getConfigValue<K extends keyof AppConfigOptions>(key: K)
119
120
  * Initialize the Codicent App SDK with configuration options
120
121
  */
121
122
  export declare function initCodicentApp(options?: Partial<AppConfigOptions>): void;
123
+ declare global {
124
+ interface Window {
125
+ updateCodicentConfig: (config: Record<string, any>) => void;
126
+ }
127
+ }
128
+ /**
129
+ * Updates the existing configuration object with new values from the provided `newConfig` object.
130
+ * Only properties that already exist on the original `config` object will be updated.
131
+ *
132
+ * @param newConfig - An object containing configuration properties to update.
133
+ */
134
+ export declare const updateConfig: (newConfig: Record<string, any>) => void;
122
135
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;;IAKpB,iBAAiB,EAAE,MAAM,CAAM;IAC/B,2BAA2B,EAAE,MAAM,CAAM;IACzC,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,OAAO,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,GAAG,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YAC1C,KAAK,EAAE;gBAAE,EAAE,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YACxD,iBAAiB,EAAE,MAAM,CAAC;YAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;YACvB,gBAAgB,EAAE,MAAM,CAAC;YACzB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;SACtB,CAAC;KACH,CAAC;CAyBH;AAED,M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qB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,SAAS,GAAG,MAAM,CAAC;IAClC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,SAAS,GAAG,MAAM,CAAC;IAC9C,cAAc,EAAE,OAAO,CAAC;IAIxB,iBAAiB,EAAE,SAAS,GAAG,MAAM,CAAC;CACvC;AA+GD,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,gBAAgB,EAAE,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAG5F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,QAUtE;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;KAC7D;CACF;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,cAAe,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,SAM1D,CAAC"}
@@ -1 +1 @@
1
- import _ from"../node_modules/mermaid/dist/mermaid.core.js";class T{constructor(){this.CHAT_INSTRUCTIONS="",this.REALTIME_VOICE_INSTRUCTIONS="",this.apps={}}}const O={ABOUT_TEXT:"Codicent APP SDK",ANONYMOUS_CODICENT:void 0,ANONYMOUS_TOKEN:void 0,API_BASE_URL:"https://codicent.com/",APP_BUTTONS:void 0,APP_CHAT_TEXT_PLACEHOLDER:void 0,APP_CHAT_TITLE:void 0,APP_CONFIG:new T,APP_FOOTER_COLOR:void 0,APP_FOOTER_SELECTED_COLOR:void 0,APP_FOOTER_TEXT_COLOR:void 0,APP_HEADER_COLOR:void 0,APP_HEADER_ICON_URL:void 0,APP_HEADER_TEXT_COLOR:void 0,APP_ICON_URL:void 0,APP_LOG_CODICENT:"",APP_LOG_TOKEN:"",APP_LOGBOOK_TITLE:void 0,APP_MENU_TITLE:void 0,APP_NAME:void 0,APP_PREFIX:void 0,APP_SAVE_TITLE:void 0,APP_SEARCH_TITLE:void 0,APP_SLOGAN:void 0,APP_SPLASH_TEXT:void 0,APP_SPLASH_URL:void 0,APP_TEMPLATE:"",APP_TITLE:void 0,AUTH_REDIRECT_URL:void 0,AUTH0_AUDIENCE:"https://codicent.com/api",AUTH0_CLIENT_ID:"80STzWmmzN3Tgf76HgFRyv54keYmvnaw",AUTH0_DOMAIN:"auth.codicent.com",AUTH0_PROVIDER_SCOPE:"read:current_user update:current_user_metadata openid profile email",AUTH0_SCOPE:"read:current_user",AUTH0_USER_DOMAIN:void 0,BUTTON_ACTIVE_COLOR:void 0,BUTTON_BACKGROUND_COLOR:void 0,BUTTON_BORDER_RADIUS:void 0,BUTTON_HOVER_COLOR:void 0,BUTTON_TAG:"app-button",BUTTON_TEXT_COLOR:void 0,CHAT_BACKGROUND_IMAGE_URL:void 0,CHAT_BOT_BACKGROUND_COLOR:void 0,CHAT_BOT_TEXT_COLOR:void 0,CHAT_INSTRUCTIONS:void 0,CHAT_USER_BACKGROUND_COLOR:void 0,CHAT_USER_TEXT_COLOR:void 0,CHAT_WELCOME:"Welcome",COMPOSE_BACKGROUND_IMAGE_URL:void 0,COMPOSE_HIDE_LOCATION:void 0,COMPOSE_SIMPLE_ATTACH_FILE:void 0,DEFAULT_LANGUAGE:"en",HIDE_CHAT_BUTTON:!1,HIDE_MENU_BUTTON:!1,HIDE_REGISTER_BUTTON:!1,HIDE_SAVE_BUTTON:!1,HOME_BACKGROUND_IMAGE_URL:void 0,INDEX_TITLE:void 0,LOGBOOK_TAG_DEFINITIONS:{},LOGBOOK_TAGS:"[]",MENU_BACKGROUND_IMAGE_URL:void 0,MESSAGE_HIDE_BAR:!1,MODULE_VOICE:!1,PUBLIC_FLOW_CODICENT:void 0,REALTIME_VOICE_API_KEY:"",SEND_BUTTON_ROUND_BACKGROUND:!1,SHOW_CANVAS_BUTTON:!1,SHOW_CHAT_PROMPTS:!1,SHOW_HELP_BUTTON:!1,SHOW_LOGBOOK_BUTTON:!1,SHOW_MICROPHONE_BUTTON:!1,SHOW_SETTINGS_BUTTON:!1,SHOW_SNAP_BUTTON:!1,SHOW_VOICE_BUTTON:!1,STRIP_CUSTOMER_PORTAL:"",STRIPE_PRICE_ID:"",STRIPE_PUBLIC_KEY:"",SUBSCRIPTION_NEEDED:!1,THEME_WELCOME:void 0,USER_PREFIX:void 0,WELCOME_STATUS_PROMPT:"",SHOW_SEND_BUTTON_TEXT:!1,SHOW_SAVE_BUTTON_TEXT:!1,FORM_BACKGROUND_IMAGE_URL:void 0,AUTO_TRANSLATE:!0};const E=function(_){return new Proxy(_,{get:(_,T,O)=>Reflect.get(_,T,O)})}(O);function A(_){return E[_]}function P(T={}){for(const[_,E]of Object.entries(T))void 0!==E&&(O[_]=E);_.initialize({startOnLoad:!1})}export{T as AppConfig,A as getConfigValue,P as initCodicentApp};
1
+ import _ from"../node_modules/mermaid/dist/mermaid.core.js";class T{constructor(){this.CHAT_INSTRUCTIONS="",this.REALTIME_VOICE_INSTRUCTIONS="",this.apps={}}}const O={LOGIN_REDIRECT:!1,ABOUT_TEXT:"Codicent APP SDK",ANONYMOUS_CODICENT:void 0,ANONYMOUS_TOKEN:void 0,API_BASE_URL:"https://codicent.com/",APP_BUTTONS:void 0,APP_CHAT_TEXT_PLACEHOLDER:void 0,APP_CHAT_TITLE:void 0,APP_CONFIG:new T,APP_FOOTER_COLOR:void 0,APP_FOOTER_SELECTED_COLOR:void 0,APP_FOOTER_TEXT_COLOR:void 0,APP_HEADER_COLOR:void 0,APP_HEADER_ICON_URL:void 0,APP_HEADER_TEXT_COLOR:void 0,APP_ICON_URL:void 0,APP_LOG_CODICENT:"",APP_LOG_TOKEN:"",APP_LOGBOOK_TITLE:void 0,APP_MENU_TITLE:void 0,APP_NAME:void 0,APP_PREFIX:void 0,APP_SAVE_TITLE:void 0,APP_SEARCH_TITLE:void 0,APP_SLOGAN:void 0,APP_SPLASH_TEXT:void 0,APP_SPLASH_URL:void 0,APP_TEMPLATE:"",APP_TITLE:void 0,AUTH_REDIRECT_URL:void 0,AUTH0_AUDIENCE:"https://codicent.com/api",AUTH0_CLIENT_ID:"80STzWmmzN3Tgf76HgFRyv54keYmvnaw",AUTH0_DOMAIN:"auth.codicent.com",AUTH0_PROVIDER_SCOPE:"read:current_user update:current_user_metadata openid profile email",AUTH0_SCOPE:"read:current_user",AUTH0_USER_DOMAIN:void 0,BUTTON_ACTIVE_COLOR:void 0,BUTTON_BACKGROUND_COLOR:void 0,BUTTON_BORDER_RADIUS:void 0,BUTTON_HOVER_COLOR:void 0,BUTTON_TAG:"app-button",BUTTON_TEXT_COLOR:void 0,CHAT_BACKGROUND_IMAGE_URL:void 0,CHAT_BOT_BACKGROUND_COLOR:void 0,CHAT_BOT_TEXT_COLOR:void 0,CHAT_INSTRUCTIONS:void 0,CHAT_USER_BACKGROUND_COLOR:void 0,CHAT_USER_TEXT_COLOR:void 0,CHAT_WELCOME:"Welcome",COMPOSE_BACKGROUND_IMAGE_URL:void 0,COMPOSE_HIDE_LOCATION:void 0,COMPOSE_SIMPLE_ATTACH_FILE:void 0,DEFAULT_LANGUAGE:"en",HIDE_CHAT_BUTTON:!1,HIDE_MENU_BUTTON:!1,HIDE_REGISTER_BUTTON:!1,HIDE_SAVE_BUTTON:!1,HOME_BACKGROUND_IMAGE_URL:void 0,INDEX_TITLE:void 0,LOGBOOK_TAG_DEFINITIONS:{},LOGBOOK_TAGS:"[]",MENU_BACKGROUND_IMAGE_URL:void 0,MESSAGE_HIDE_BAR:!1,MODULE_VOICE:!1,PUBLIC_FLOW_CODICENT:void 0,REALTIME_VOICE_API_KEY:"",SEND_BUTTON_ROUND_BACKGROUND:!1,SHOW_CANVAS_BUTTON:!1,SHOW_CHAT_PROMPTS:!1,SHOW_HELP_BUTTON:!1,SHOW_LOGBOOK_BUTTON:!1,SHOW_MICROPHONE_BUTTON:!1,SHOW_SETTINGS_BUTTON:!1,SHOW_SNAP_BUTTON:!1,SHOW_VOICE_BUTTON:!1,STRIP_CUSTOMER_PORTAL:"",STRIPE_PRICE_ID:"",STRIPE_PUBLIC_KEY:"",SUBSCRIPTION_NEEDED:!1,THEME_WELCOME:void 0,USER_PREFIX:void 0,WELCOME_STATUS_PROMPT:"",SHOW_SEND_BUTTON_TEXT:!1,SHOW_SAVE_BUTTON_TEXT:!1,FORM_BACKGROUND_IMAGE_URL:void 0,AUTO_TRANSLATE:!0};const E=function(_){return new Proxy(_,{get:(_,T,O)=>Reflect.get(_,T,O)})}(O);function A(_){return E[_]}function o(T={}){for(const[_,E]of Object.entries(T))void 0!==E&&(O[_]=E);_.initialize({startOnLoad:!1})}const P=_=>{Object.keys(_).forEach((T=>{E.hasOwnProperty(T)&&(E[T]=_[T])}))};"undefined"!=typeof window&&(window.updateCodicentConfig=P);export{T as AppConfig,A as getConfigValue,o as initCodicentApp,P as updateConfig};
@@ -1 +1 @@
1
- {"version":3,"file":"useAudioRecorder.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAudioRecorder.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B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AC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,gBAAgB,mBAAoB,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,KA2Q/E,kBACN,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- import{useState as e,useRef as r,useCallback as t,useEffect as n}from"react";const c=c=>{const[a,u]=e({isRecording:!1,isPaused:!1,recordingTime:0,mediaURL:null,isSoundCaptured:!1,error:null}),o=r(!1),i=r(null),s=r(null),d=r(null),l=r([]),g=r(),m=r(null),A=r(""),p=t((async e=>{A.current=e;try{const e=await navigator.mediaDevices.getUserMedia({audio:!0});l.current=[],d.current=new MediaRecorder(e,{mimeType:f()}),d.current.ondataavailable=e=>{e.data.size>0&&l.current.push(e.data)},d.current.onstop=()=>{const r=new Blob(l.current,{type:f()}),t=URL.createObjectURL(r);u((e=>({...e,mediaURL:t}))),e.getTracks().forEach((e=>e.stop()))};const r=new(window.AudioContext||window.webkitAudioContext);s.current=r;const t=r.createMediaStreamSource(e),n=r.createAnalyser();n.fftSize=256;const c=new Uint8Array(n.frequencyBinCount);t.connect(n);const a=()=>{n.getByteFrequencyData(c);const e=c.reduce(((e,r)=>e+r))/c.length>10;e!==o.current&&(o.current=e,u((r=>({...r,isSoundCaptured:e}))))};m.current=setInterval(a,100),i.current||(i.current=new Audio("data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQAAAAA="),i.current.loop=!0,i.current.volume=0),i.current.play().catch((()=>{})),d.current.start(10),g.current=setInterval((()=>{u((e=>({...e,recordingTime:e.recordingTime+1})))}),1e3),u((e=>({...e,isRecording:!0,isPaused:!1})))}catch(e){const r=e instanceof Error?e.message:String(e);u((e=>({...e,error:r}))),console.error("Error accessing microphone:",e)}}),[]),R=t((()=>{d.current&&a.isRecording&&(d.current.stop(),d.current.stream.getTracks().forEach((e=>e.stop())),g.current&&clearInterval(g.current),m.current&&(clearInterval(m.current),m.current=null),i.current&&(i.current.pause(),i.current.currentTime=0),u((e=>({...e,isRecording:!1,isPaused:!1,isSoundCaptured:!1}))))}),[a.isRecording]);n((()=>{let e=null;return a.isRecording&&s.current&&(e=setInterval((()=>{s.current&&"suspended"===s.current.state&&s.current.resume()}),1e3)),()=>{e&&clearInterval(e)}}),[a.isRecording]);const v=t((()=>{"recording"===d.current?.state&&(d.current.pause(),g.current&&clearInterval(g.current),u((e=>({...e,isPaused:!0}))))}),[]),w=t((()=>{"paused"===d.current?.state&&(d.current.resume(),g.current=setInterval((()=>{u((e=>({...e,recordingTime:e.recordingTime+1})))}),1e3),u((e=>({...e,isPaused:!1}))))}),[]),f=()=>["audio/webm","audio/mp4","audio/ogg","audio/wav"].find((e=>MediaRecorder.isTypeSupported(e)))||"audio/webm";return n((()=>{if(a.mediaURL){const e=`audio.${f().split("/")[1]}`;fetch(a.mediaURL).then((e=>e.blob())).then((r=>{const t=new FormData;t.append("file",r,e),c(t,A.current)}))}}),[a.mediaURL,c]),n((()=>()=>{d.current&&d.current.stream.getTracks().forEach((e=>e.stop())),g.current&&clearInterval(g.current),m.current&&clearInterval(m.current)}),[]),{...a,startRecording:p,stopRecording:R,pauseRecording:v,resumeRecording:w}};export{c as default,c as useAudioRecorder};
1
+ import{useState as e,useRef as r,useCallback as t,useEffect as n}from"react";const c=c=>{const[o,u]=e({isRecording:!1,isPaused:!1,recordingTime:0,mediaURL:null,isSoundCaptured:!1,error:null}),a=r(!1),i=r(null),s=r(null),l=r(null),d=r(!1),g=r(null),p=r([]),m=r(),A=r(null),R=r(""),w=t((async e=>{R.current=e;try{if(s.current&&"suspended"===s.current.state)try{await s.current.resume(),console.log("Resumed existing audio context")}catch(e){console.warn("Could not resume existing audio context:",e)}const e=await navigator.mediaDevices.getUserMedia({audio:!0});p.current=[],g.current=new MediaRecorder(e,{mimeType:h()}),g.current.ondataavailable=e=>{e.data.size>0&&p.current.push(e.data)},g.current.onstop=()=>{const r=new Blob(p.current,{type:h()}),t=URL.createObjectURL(r);u((e=>({...e,mediaURL:t}))),e.getTracks().forEach((e=>e.stop()))};const r=new(window.AudioContext||window.webkitAudioContext);s.current=r;try{if(s.current&&!l.current){l.current=s.current.createOscillator();const e=s.current.createGain();e.gain.value=.001,l.current.connect(e),e.connect(s.current.destination),l.current.frequency.value=20,l.current.start(),d.current=!0,console.log("Started audio session keeper")}}catch(e){console.warn("Failed to create audio session keeper:",e)}const t=r.createMediaStreamSource(e),n=r.createAnalyser();n.fftSize=256;const c=new Uint8Array(n.frequencyBinCount);t.connect(n);const o=()=>{n.getByteFrequencyData(c);const e=c.reduce(((e,r)=>e+r))/c.length>10;e!==a.current&&(a.current=e,u((r=>({...r,isSoundCaptured:e}))))};A.current=setInterval(o,100),i.current||(i.current=new Audio,i.current.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQQAAAAAAA==",i.current.loop=!0,i.current.volume=.01,i.current.setAttribute("playsinline",""),i.current.setAttribute("webkit-playsinline","")),i.current.play().catch((e=>{console.log("Silent audio playback failed, retrying:",e),document.addEventListener("click",(function e(){i.current?.play(),document.removeEventListener("click",e)}),{once:!0})})),g.current.start(10),m.current=setInterval((()=>{u((e=>({...e,recordingTime:e.recordingTime+1})))}),1e3),u((e=>({...e,isRecording:!0,isPaused:!1})))}catch(e){const r=e instanceof Error?e.message:String(e);u((e=>({...e,error:r}))),console.error("Error accessing microphone:",e)}}),[]),v=t((()=>{if(g.current&&o.isRecording){if(g.current.stop(),g.current.stream.getTracks().forEach((e=>e.stop())),m.current&&clearInterval(m.current),A.current&&(clearInterval(A.current),A.current=null),i.current&&(i.current.pause(),i.current.currentTime=0),l.current)try{l.current.stop(),l.current.disconnect(),l.current=null,d.current=!1,console.log("Stopped audio session keeper")}catch(e){console.warn("Error stopping oscillator:",e)}u((e=>({...e,isRecording:!1,isPaused:!1,isSoundCaptured:!1})))}}),[o.isRecording]);n((()=>{let e=null;return o.isRecording&&s.current&&(e=setInterval((()=>{if(s.current&&"suspended"===s.current.state&&(console.log("Resuming suspended audio context"),s.current.resume().catch((e=>console.warn("Failed to resume context:",e)))),i.current&&i.current.paused&&o.isRecording&&(console.log("Restarting silent audio"),i.current.play().catch((e=>console.warn("Failed to restart silent audio:",e)))),!l.current&&s.current&&d.current)try{console.log("Restarting audio oscillator"),l.current=s.current.createOscillator();const e=s.current.createGain();e.gain.value=.001,l.current.connect(e),e.connect(s.current.destination),l.current.frequency.value=20,l.current.start()}catch(e){console.warn("Failed to restart oscillator:",e)}}),500)),()=>{e&&clearInterval(e)}}),[o.isRecording]);const y=t((()=>{"recording"===g.current?.state&&(g.current.pause(),m.current&&clearInterval(m.current),u((e=>({...e,isPaused:!0}))))}),[]),f=t((()=>{"paused"===g.current?.state&&(g.current.resume(),m.current=setInterval((()=>{u((e=>({...e,recordingTime:e.recordingTime+1})))}),1e3),u((e=>({...e,isPaused:!1}))))}),[]),h=()=>["audio/webm","audio/mp4","audio/ogg","audio/wav"].find((e=>MediaRecorder.isTypeSupported(e)))||"audio/webm";return n((()=>{if(o.mediaURL){const e=`audio.${h().split("/")[1]}`;fetch(o.mediaURL).then((e=>e.blob())).then((r=>{const t=new FormData;t.append("file",r,e),c(t,R.current)}))}}),[o.mediaURL,c]),n((()=>()=>{g.current&&g.current.stream.getTracks().forEach((e=>e.stop())),m.current&&clearInterval(m.current),A.current&&clearInterval(A.current)}),[]),{...o,startRecording:w,stopRecording:v,pauseRecording:y,resumeRecording:f}};export{c as default,c as useAudioRecorder};
@@ -1 +1 @@
1
- {"version":3,"file":"useCodicentApp.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCodicentApp.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAyB,MAAM,UAAU,CAAC;AACpG,OAAyB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAqB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAA2B,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIzE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,cAAe;IAAE,KAAK,EAA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AqB,CAAA;CAAE,KAiInE,gBACN,CAAC"}
@@ -1 +1 @@
1
- import{useRef as e,useState as t,useCallback as r,useMemo as n,useEffect as s}from"react";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"react/jsx-runtime";import{createAppStateMachine as o}from"../utils/appState.js";import"../_virtual/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import{useAudioRecorder as a}from"./useAudioRecorder.js";import i from"./useAuthState.js";import c from"./useRealtimeVoiceAI.js";import u from"./useTools.js";import{getConfigValue as m}from"../config/index.js";const l=({auth0:l})=>{const p=i(l),d=e(o(p.codicentService,(()=>{}))),[k,v]=t(),{service:A,context:h}=d.current,{nickname:j,name:f,error:w,errorType:b,selectedApp:y}=h,x=r(((e,t)=>{const r=e.get("file").name;A.uploadFile(r,e).then((e=>{A.sendMessage(`#transcribe ${""!==t?(t.startsWith("#")?"":"#")+t+" ":""}#file:${e}`).then((()=>{})).catch(console.warn)}))}),[A]),S=a(x),[_,T]=t(),[C,I]=t(),[g,N]=t(!1),E=n((()=>new Audio("./notification.mp3")),[]),M=u(A,T,I,E,_,(()=>N(!0))),R=c(m("REALTIME_VOICE_API_KEY")||"",M);s((()=>{g&&(R?.disconnectConversation(),N(!1))}),[g,R]),s((()=>{p.isAuthenticated&&p.user&&p.accessToken&&d.current.updateContext({isAuthenticated:p.isAuthenticated,user:{sub:p.user.sub,email:p.user.email},accessToken:p.accessToken})}),[p.isAuthenticated,p.user,p.accessToken]),s((()=>d.current.updateContext({nickname:p.nickname})),[p.nickname]),s((()=>{d.current.update();let e=d.current;const t=setInterval((()=>{"hasAccess"===d.current.currentStateName&&e.currentStateName===d.current.currentStateName||(d.current.update(),v(d.current.getCurrentStateName()),e=d.current)}),50);return()=>clearInterval(t)}),[]);return{audio:S,auth:p,currentStateName:k,stateMachine:d.current,service:A,context:h,state:k,nickname:j,name:f,error:w,errorType:b,fixAppUrl:e=>e.replace("{nickname}",j||"unknown").replace("{token}",encodeURIComponent(p.accessToken||"unknown")).replace("{app}",y||"unknown"),setAnonymous:e=>{d.current.updateContext({isAnonymous:e})},allStates:d.current.allStates,isBusy:()=>d.current.isBusy(),voice:R,html:_,setHtml:T,script:C}};export{l as useCodicentApp};
1
+ import{useRef as e,useState as t,useCallback as n,useMemo as r,useEffect as a}from"react";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"react/jsx-runtime";import{createAppStateMachine as o}from"../utils/appState.js";import"../_virtual/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import{useAudioRecorder as s}from"./useAudioRecorder.js";import i from"./useAuthState.js";import c from"./useRealtimeVoiceAI.js";import u from"./useTools.js";import{getConfigValue as l}from"../config/index.js";const m=({auth0:m})=>{const p=i(m),d=e(o(p.codicentService,(()=>{}))),[f,w]=t(),{service:h,context:A}=d.current,{nickname:k,name:v,error:j,errorType:y,selectedApp:C}=A,b=n(((e,t)=>{const n=e.get("file").name;h.uploadFile(n,e).then((e=>{h.sendMessage(`#transcribe ${""!==t?(t.startsWith("#")?"":"#")+t+" ":""}#file:${e}`).then((()=>{})).catch(console.warn)}))}),[h]),g=s(b),[x,S]=t(),[_,T]=t(),[I,M]=t(!1),N=r((()=>new Audio("./notification.mp3")),[]),E=u(h,S,T,N,x,(()=>M(!0))),R=c(l("REALTIME_VOICE_API_KEY")||"",E),[B,F]=t(!1);a((()=>{I&&(R?.disconnectConversation(),M(!1))}),[I,R]),a((()=>{p.isAuthenticated&&p.user&&p.accessToken&&d.current.updateContext({isAuthenticated:p.isAuthenticated,user:{sub:p.user.sub,email:p.user.email},accessToken:p.accessToken})}),[p.isAuthenticated,p.user,p.accessToken]),a((()=>d.current.updateContext({nickname:p.nickname})),[p.nickname]),a((()=>{d.current.update();let e=d.current;const t=setInterval((()=>{"hasAccess"===d.current.currentStateName&&e.currentStateName===d.current.currentStateName||(d.current.update(),w(d.current.getCurrentStateName()),e=d.current)}),50);return()=>clearInterval(t)}),[]),a((()=>{(async()=>{if("hasAccess"===f&&!B)try{const e=await h.readDataMessages("appconfig");if(e.length>0){const t=e[0].data;"undefined"!=typeof window&&window.updateCodicentConfig&&window.updateCodicentConfig(t)}F(!0)}catch(e){console.warn("Failed to load app config:",e)}})()}),[f,h,B]),a((()=>{"hasAccess"!==f&&F(!1)}),[f]);return{audio:g,auth:p,currentStateName:f,stateMachine:d.current,service:h,context:A,state:f,nickname:k,name:v,error:j,errorType:y,fixAppUrl:e=>e.replace("{nickname}",k||"unknown").replace("{token}",encodeURIComponent(p.accessToken||"unknown")).replace("{app}",C||"unknown"),setAnonymous:e=>{d.current.updateContext({isAnonymous:e})},allStates:d.current.allStates,isBusy:()=>d.current.isBusy(),voice:R,html:x,setHtml:S,script:_}};export{m as useCodicentApp};
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export{CodicentService}from"./services/codicent.js";export{default as Markdown}from"./components/Markdown.js";export{Textarea}from"./components/Textarea.js";export{Button}from"./components/Button.js";export{Title}from"./components/Title.js";export{Text}from"./components/Text.js";export{Spinner}from"./components/Spinner.js";export{Label}from"./components/Label.js";export{Input}from"./components/Input.js";export{default as TextHeader}from"./components/TextHeader.js";export{default as TypingIndicator}from"./components/TypingIndicator.js";export{default as Prompt}from"./components/Prompt.js";export{default as ChatInput}from"./components/ChatInput.js";export{CombinedPlaceholderDialog}from"./components/CombinedPlaceholderDialog.js";export{default as ChatMessage}from"./components/ChatMessage.js";export{Header}from"./components/Header.js";export{default as VoiceIcon}from"./components/VoiceIcon.js";export{default as AudioIcon}from"./components/AudioIcon.js";export{FileThumbnail}from"./components/FileThumbnail.js";export{default as MessageInput}from"./components/MessageInput.js";export{default as UploadFile}from"./components/UploadFile.js";export{default as SnapFooter}from"./components/SnapFooter.js";export{default as Profile}from"./components/Profile.js";export{default as MessageItem}from"./components/MessageItem.js";export{default as Content}from"./components/Content.js";export{default as AiInput}from"./components/AiInput.js";export{default as SearchBox}from"./components/SearchBox.js";export{default as HtmlView}from"./components/HtmlView.js";export{Footer}from"./components/Footer.js";export{Page}from"./components/Page.js";export{UrlProcessor}from"./components/UrlProcessor.js";export{default as useStateWithLocalStorage}from"./hooks/useStateWithLocalStorage.js";export{default as useAuthState}from"./hooks/useAuthState.js";export{useChat}from"./hooks/useChat.js";export{default as useCodicentState}from"./hooks/useCodicentState.js";export{useAudioRecorder}from"./hooks/useAudioRecorder.js";export{default as useTools}from"./hooks/useTools.js";export{default as useRealtimeVoiceAI}from"./hooks/useRealtimeVoiceAI.js";export{default as useLocalization}from"./hooks/useLocalization.js";export{useTemplateVariables}from"./hooks/useTemplateVariables.js";export{useCodicentApp}from"./hooks/useCodicentApp.js";export{default as useAppStyles}from"./hooks/useAppStyles.js";export{default as useToaster}from"./hooks/useToaster.js";export{default as MessageContent}from"./utils/MessageContent.js";export{default as generateBrandVariants}from"./utils/theme.js";export{default as log}from"./utils/logging.js";export{default as withWakeLock}from"./utils/withWakeLock.js";export{AppStateMachine,createAppStateMachine}from"./utils/appState.js";import{d as e}from"./_virtual/index.js";import"./lib/wavtools/lib/wav_packer.js";import"./lib/wavtools/lib/analysis/audio_analysis.js";export{WavStreamPlayer}from"./lib/wavtools/lib/wav_stream_player.js";export{WavRecorder}from"./lib/wavtools/lib/wav_recorder.js";export{getGpsLocation,isMobileDevice}from"./utils/device.js";export{getTimeString}from"./utils/helpers.js";export{AppConfig,getConfigValue,initCodicentApp}from"./config/index.js";export{default as AppFrame}from"./pages/AppFrame.js";export{default as Snap}from"./pages/Snap.js";export{default as Search}from"./pages/Search.js";export{default as Login}from"./pages/Login.js";export{Logout}from"./pages/Logout.js";export{CrmPage}from"./pages/CrmPage.js";export{default as ImageView}from"./pages/ImageView.js";export{default as FormInvite}from"./pages/FormInvite.js";export{default as FormAccept}from"./pages/FormAccept.js";export{Sales}from"./pages/Sales.js";var o=e.StateMachine;export{o as StateMachine};
1
+ export{CodicentService}from"./services/codicent.js";export{default as Markdown}from"./components/Markdown.js";export{Textarea}from"./components/Textarea.js";export{Button}from"./components/Button.js";export{Title}from"./components/Title.js";export{Text}from"./components/Text.js";export{Spinner}from"./components/Spinner.js";export{Label}from"./components/Label.js";export{Input}from"./components/Input.js";export{default as TextHeader}from"./components/TextHeader.js";export{default as TypingIndicator}from"./components/TypingIndicator.js";export{default as Prompt}from"./components/Prompt.js";export{default as ChatInput}from"./components/ChatInput.js";export{CombinedPlaceholderDialog}from"./components/CombinedPlaceholderDialog.js";export{default as ChatMessage}from"./components/ChatMessage.js";export{Header}from"./components/Header.js";export{default as VoiceIcon}from"./components/VoiceIcon.js";export{default as AudioIcon}from"./components/AudioIcon.js";export{FileThumbnail}from"./components/FileThumbnail.js";export{default as MessageInput}from"./components/MessageInput.js";export{default as UploadFile}from"./components/UploadFile.js";export{default as SnapFooter}from"./components/SnapFooter.js";export{default as Profile}from"./components/Profile.js";export{default as MessageItem}from"./components/MessageItem.js";export{default as Content}from"./components/Content.js";export{default as AiInput}from"./components/AiInput.js";export{default as SearchBox}from"./components/SearchBox.js";export{default as HtmlView}from"./components/HtmlView.js";export{Footer}from"./components/Footer.js";export{Page}from"./components/Page.js";export{UrlProcessor}from"./components/UrlProcessor.js";export{default as useStateWithLocalStorage}from"./hooks/useStateWithLocalStorage.js";export{default as useAuthState}from"./hooks/useAuthState.js";export{useChat}from"./hooks/useChat.js";export{default as useCodicentState}from"./hooks/useCodicentState.js";export{useAudioRecorder}from"./hooks/useAudioRecorder.js";export{default as useTools}from"./hooks/useTools.js";export{default as useRealtimeVoiceAI}from"./hooks/useRealtimeVoiceAI.js";export{default as useLocalization}from"./hooks/useLocalization.js";export{useTemplateVariables}from"./hooks/useTemplateVariables.js";export{useCodicentApp}from"./hooks/useCodicentApp.js";export{default as useAppStyles}from"./hooks/useAppStyles.js";export{default as useToaster}from"./hooks/useToaster.js";export{default as MessageContent}from"./utils/MessageContent.js";export{default as generateBrandVariants}from"./utils/theme.js";export{default as log}from"./utils/logging.js";export{default as withWakeLock}from"./utils/withWakeLock.js";export{AppStateMachine,createAppStateMachine}from"./utils/appState.js";import{d as e}from"./_virtual/index.js";import"./lib/wavtools/lib/wav_packer.js";import"./lib/wavtools/lib/analysis/audio_analysis.js";export{WavStreamPlayer}from"./lib/wavtools/lib/wav_stream_player.js";export{WavRecorder}from"./lib/wavtools/lib/wav_recorder.js";export{getGpsLocation,isMobileDevice}from"./utils/device.js";export{getTimeString}from"./utils/helpers.js";export{AppConfig,getConfigValue,initCodicentApp,updateConfig}from"./config/index.js";export{default as AppFrame}from"./pages/AppFrame.js";export{default as Snap}from"./pages/Snap.js";export{default as Search}from"./pages/Search.js";export{default as Login}from"./pages/Login.js";export{Logout}from"./pages/Logout.js";export{CrmPage}from"./pages/CrmPage.js";export{default as ImageView}from"./pages/ImageView.js";export{default as FormInvite}from"./pages/FormInvite.js";export{default as FormAccept}from"./pages/FormAccept.js";export{Sales}from"./pages/Sales.js";var o=e.StateMachine;export{o as StateMachine};
@@ -1 +1 @@
1
- import{createFluentIcon as a}from"../utils/createFluentIcon.js";const l=a("AddRegular","1em",["M10 2.5a.5.5 0 0 0-1 0V9H2.5a.5.5 0 0 0 0 1H9v6.5a.5.5 0 0 0 1 0V10h6.5a.5.5 0 0 0 0-1H10V2.5Z"]),e=a("ArrowClockwiseRegular","1em",["M4 10a6 6 0 0 1 10.47-4H12.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-1 0v1.6a7 7 0 1 0 1.98 4.36.5.5 0 1 0-1 .08L16 10a6 6 0 0 1-12 0Z"]),h=a("ArrowCollapseAllRegular","1em",["M2 4.5c0-.28.22-.5.5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5Zm3.15 2.65c.2-.2.5-.2.7 0l2.5 2.5a.5.5 0 0 1-.7.7L6 8.71v6.79a.5.5 0 0 1-1 0V8.7l-1.65 1.65a.5.5 0 0 1-.7-.7l2.5-2.5ZM17.5 8h-7a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1Z"],{flipInRtl:!0}),r=a("ArrowExpandAllRegular","1em",["M2 4.5c0-.28.22-.5.5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5Zm3.15 11.35c.2.2.5.2.7 0l2.5-2.5a.5.5 0 0 0-.7-.7L6 14.29V7.5a.5.5 0 0 0-1 0v6.8l-1.65-1.65a.5.5 0 0 0-.7.7l2.5 2.5ZM17.5 8h-7a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1Z"],{flipInRtl:!0}),m=a("AttachRegular","1em",["m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z"]),A=a("CameraRegular","1em",["M10 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-3 4a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm1.12-8a1.5 1.5 0 0 0-1.34.83L6.2 4H4.5A2.5 2.5 0 0 0 2 6.5v8A2.5 2.5 0 0 0 4.5 17h11a2.5 2.5 0 0 0 2.5-2.5v-8A2.5 2.5 0 0 0 15.5 4h-1.69l-.58-1.17A1.5 1.5 0 0 0 11.89 2H8.12Zm-.44 1.28A.5.5 0 0 1 8.12 3h3.77c.19 0 .36.1.45.28l.72 1.44a.5.5 0 0 0 .45.28h2c.82 0 1.5.67 1.5 1.5v8c0 .83-.68 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 3 14.5v-8C3 5.67 3.67 5 4.5 5h2a.5.5 0 0 0 .44-.28l.73-1.44Z"]);export{l as AddRegular,e as ArrowClockwiseRegular,h as ArrowCollapseAllRegular,r as ArrowExpandAllRegular,m as AttachRegular,A as CameraRegular};
1
+ import{createFluentIcon as a}from"../utils/createFluentIcon.js";const l=a("AddRegular","1em",["M10 2.5c.28 0 .5.22.5.5v6.5H17a.5.5 0 0 1 0 1h-6.5V17a.5.5 0 0 1-1 0v-6.5H3a.5.5 0 0 1 0-1h6.5V3c0-.28.22-.5.5-.5Z"]),e=a("ArrowClockwiseRegular","1em",["M4 10a6 6 0 0 1 10.47-4H12.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-1 0v1.6a7 7 0 1 0 1.98 4.36.5.5 0 1 0-1 .08L16 10a6 6 0 0 1-12 0Z"]),h=a("ArrowCollapseAllRegular","1em",["M2 4.5c0-.28.22-.5.5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5Zm3.15 2.65c.2-.2.5-.2.7 0l2.5 2.5a.5.5 0 0 1-.7.7L6 8.71v6.79a.5.5 0 0 1-1 0V8.7l-1.65 1.65a.5.5 0 0 1-.7-.7l2.5-2.5ZM17.5 8h-7a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1Z"],{flipInRtl:!0}),r=a("ArrowExpandAllRegular","1em",["M2 4.5c0-.28.22-.5.5-.5h15a.5.5 0 0 1 0 1h-15a.5.5 0 0 1-.5-.5Zm3.15 11.35c.2.2.5.2.7 0l2.5-2.5a.5.5 0 0 0-.7-.7L6 14.29V7.5a.5.5 0 0 0-1 0v6.8l-1.65-1.65a.5.5 0 0 0-.7.7l2.5 2.5ZM17.5 8h-7a.5.5 0 0 1 0-1h7a.5.5 0 0 1 0 1Z"],{flipInRtl:!0}),m=a("AttachRegular","1em",["m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z"]),c=a("CameraRegular","1em",["M10 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-3 4a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm1.12-8a1.5 1.5 0 0 0-1.34.83L6.2 4H4.5A2.5 2.5 0 0 0 2 6.5v8A2.5 2.5 0 0 0 4.5 17h11a2.5 2.5 0 0 0 2.5-2.5v-8A2.5 2.5 0 0 0 15.5 4h-1.69l-.58-1.17A1.5 1.5 0 0 0 11.89 2H8.12Zm-.44 1.28A.5.5 0 0 1 8.12 3h3.77c.19 0 .36.1.45.28l.72 1.44a.5.5 0 0 0 .45.28h2c.82 0 1.5.67 1.5 1.5v8c0 .83-.68 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 3 14.5v-8C3 5.67 3.67 5 4.5 5h2a.5.5 0 0 0 .44-.28l.73-1.44Z"]);export{l as AddRegular,e as ArrowClockwiseRegular,h as ArrowCollapseAllRegular,r as ArrowExpandAllRegular,m as AttachRegular,c as CameraRegular};
@@ -1 +1 @@
1
- import{createFluentIcon as a}from"../utils/createFluentIcon.js";const l=a("PrintRegular","1em",["M5 4.5C5 3.67 5.67 3 6.5 3h7c.83 0 1.5.67 1.5 1.5V5h.5A2.5 2.5 0 0 1 18 7.5v5c0 .83-.67 1.5-1.5 1.5H15v1.5c0 .83-.67 1.5-1.5 1.5h-7A1.5 1.5 0 0 1 5 15.5V14H3.5A1.5 1.5 0 0 1 2 12.5v-5A2.5 2.5 0 0 1 4.5 5H5v-.5ZM6 5h8v-.5a.5.5 0 0 0-.5-.5h-7a.5.5 0 0 0-.5.5V5Zm-1 8v-1.5c0-.83.67-1.5 1.5-1.5h7c.83 0 1.5.67 1.5 1.5V13h1.5a.5.5 0 0 0 .5-.5v-5c0-.83-.67-1.5-1.5-1.5h-11C3.67 6 3 6.67 3 7.5v5c0 .28.22.5.5.5H5Zm1.5-2a.5.5 0 0 0-.5.5v4c0 .28.22.5.5.5h7a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-7Z"]),e=a("SearchRegular","1em",["M8.5 3a5.5 5.5 0 0 1 4.23 9.02l4.12 4.13a.5.5 0 0 1-.63.76l-.07-.06-4.13-4.12A5.5 5.5 0 1 1 8.5 3Zm0 1a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z"]),c=a("SendFilled","1em",["M2.72 2.05a.5.5 0 0 0-.7.58l1.5 5.62c.05.19.2.33.4.36l6.85 1.14c.28.05.28.45 0 .5l-6.85 1.14a.5.5 0 0 0-.4.36l-1.5 5.62a.5.5 0 0 0 .7.58l15-7.5a.5.5 0 0 0 0-.9l-15-7.5Z"],{flipInRtl:!0}),h=a("SendRegular","1em",["M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z"],{flipInRtl:!0});export{l as PrintRegular,e as SearchRegular,c as SendFilled,h as SendRegular};
1
+ import{createFluentIcon as a}from"../utils/createFluentIcon.js";const l=a("PrintRegular","1em",["M5 4.5C5 3.67 5.67 3 6.5 3h7c.83 0 1.5.67 1.5 1.5V5h.5A2.5 2.5 0 0 1 18 7.5v5c0 .83-.67 1.5-1.5 1.5H15v1.5c0 .83-.67 1.5-1.5 1.5h-7A1.5 1.5 0 0 1 5 15.5V14H3.5A1.5 1.5 0 0 1 2 12.5v-5A2.5 2.5 0 0 1 4.5 5H5v-.5ZM6 5h8v-.5a.5.5 0 0 0-.5-.5h-7a.5.5 0 0 0-.5.5V5Zm-1 8v-1.5c0-.83.67-1.5 1.5-1.5h7c.83 0 1.5.67 1.5 1.5V13h1.5a.5.5 0 0 0 .5-.5v-5c0-.83-.67-1.5-1.5-1.5h-11C3.67 6 3 6.67 3 7.5v5c0 .28.22.5.5.5H5Zm1.5-2a.5.5 0 0 0-.5.5v4c0 .28.22.5.5.5h7a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-7Z"]),e=a("SearchRegular","1em",["M12.73 13.44a6.5 6.5 0 1 1 .7-.7l3.42 3.4a.5.5 0 0 1-.63.77l-.07-.06-3.42-3.41Zm-.71-.71A5.54 5.54 0 0 0 14 8.5a5.5 5.5 0 1 0-1.98 4.23Z"]),c=a("SendFilled","1em",["M2.72 2.05a.5.5 0 0 0-.7.58l1.5 5.62c.05.19.2.33.4.36l6.85 1.14c.28.05.28.45 0 .5l-6.85 1.14a.5.5 0 0 0-.4.36l-1.5 5.62a.5.5 0 0 0 .7.58l15-7.5a.5.5 0 0 0 0-.9l-15-7.5Z"],{flipInRtl:!0}),h=a("SendRegular","1em",["M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z"],{flipInRtl:!0});export{l as PrintRegular,e as SearchRegular,c as SendFilled,h as SendRegular};
@@ -1 +1 @@
1
- import{createFluentIcon as l}from"../utils/createFluentIcon.js";const a=l("Settings24Regular","24",["M12.01 2.25c.74 0 1.47.1 2.18.25.32.07.55.33.59.65l.17 1.53a1.38 1.38 0 0 0 1.92 1.11l1.4-.61c.3-.13.64-.06.85.17a9.8 9.8 0 0 1 2.2 3.8c.1.3 0 .63-.26.82l-1.25.92a1.38 1.38 0 0 0 0 2.22l1.25.92c.26.19.36.52.27.82a9.8 9.8 0 0 1-2.2 3.8.75.75 0 0 1-.85.17l-1.4-.62a1.38 1.38 0 0 0-1.93 1.12l-.17 1.52a.75.75 0 0 1-.58.65 9.52 9.52 0 0 1-4.4 0 .75.75 0 0 1-.57-.65l-.17-1.52a1.38 1.38 0 0 0-1.93-1.11l-1.4.62a.75.75 0 0 1-.85-.18 9.8 9.8 0 0 1-2.2-3.8c-.1-.3 0-.63.26-.82l1.25-.92a1.38 1.38 0 0 0 0-2.22l-1.24-.92a.75.75 0 0 1-.28-.82 9.8 9.8 0 0 1 2.2-3.8c.23-.23.57-.3.86-.17l1.4.62c.4.17.86.15 1.25-.08.38-.22.63-.6.68-1.04l.17-1.53a.75.75 0 0 1 .58-.65c.72-.16 1.45-.24 2.2-.25Zm0 1.5c-.45 0-.9.04-1.35.12l-.11.97a2.89 2.89 0 0 1-4.03 2.33l-.9-.4A8.3 8.3 0 0 0 4.29 9.1l.8.59a2.88 2.88 0 0 1 0 4.64l-.8.59a8.3 8.3 0 0 0 1.35 2.32l.9-.4a2.88 2.88 0 0 1 4.02 2.32l.1.99c.9.15 1.8.15 2.7 0l.1-.99a2.88 2.88 0 0 1 4.02-2.32l.9.4a8.3 8.3 0 0 0 1.35-2.32l-.8-.59a2.88 2.88 0 0 1 0-4.64l.8-.59a8.3 8.3 0 0 0-1.35-2.32l-.9.4a2.88 2.88 0 0 1-4.02-2.32l-.1-.98c-.45-.08-.9-.11-1.34-.12ZM12 8.25a3.75 3.75 0 1 1 0 7.5 3.75 3.75 0 0 1 0-7.5Zm0 1.5a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Z"]);export{a as Settings24Regular};
1
+ import{createFluentIcon as a}from"../utils/createFluentIcon.js";const l=a("QuestionCircle24Regular","24",["M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 1.67a8.34 8.34 0 0 0 0 16.66 8.34 8.34 0 0 0 0-16.66Zm0 11.83a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8.75a2.75 2.75 0 0 1 2.75 2.75c0 1.01-.3 1.57-1.05 2.36l-.17.17c-.62.62-.78.89-.78 1.47a.75.75 0 0 1-1.5 0c0-1.01.3-1.57 1.05-2.36l.17-.17c.62-.62.78-.89.78-1.47a1.25 1.25 0 0 0-2.5-.13v.13a.75.75 0 0 1-1.5 0A2.75 2.75 0 0 1 12 6.75Z"]),c=a("Settings24Regular","24",["M12.01 2.25c.74 0 1.47.1 2.18.25.32.07.55.33.59.65l.17 1.53a1.38 1.38 0 0 0 1.92 1.11l1.4-.61c.3-.13.64-.06.85.17a9.8 9.8 0 0 1 2.2 3.8c.1.3 0 .63-.26.82l-1.25.92a1.38 1.38 0 0 0 0 2.22l1.25.92c.26.19.36.52.27.82a9.8 9.8 0 0 1-2.2 3.8.75.75 0 0 1-.85.17l-1.4-.62a1.38 1.38 0 0 0-1.93 1.12l-.17 1.52a.75.75 0 0 1-.58.65 9.52 9.52 0 0 1-4.4 0 .75.75 0 0 1-.57-.65l-.17-1.52a1.38 1.38 0 0 0-1.93-1.11l-1.4.62a.75.75 0 0 1-.85-.18 9.8 9.8 0 0 1-2.2-3.8c-.1-.3 0-.63.26-.82l1.25-.92a1.38 1.38 0 0 0 0-2.22l-1.24-.92a.75.75 0 0 1-.28-.82 9.8 9.8 0 0 1 2.2-3.8c.23-.23.57-.3.86-.17l1.4.62c.4.17.86.15 1.25-.08.38-.22.63-.6.68-1.04l.17-1.53a.75.75 0 0 1 .58-.65c.72-.16 1.45-.24 2.2-.25Zm0 1.5c-.45 0-.9.04-1.35.12l-.11.97a2.89 2.89 0 0 1-4.03 2.33l-.9-.4A8.3 8.3 0 0 0 4.29 9.1l.8.59a2.88 2.88 0 0 1 0 4.64l-.8.59a8.3 8.3 0 0 0 1.35 2.32l.9-.4a2.88 2.88 0 0 1 4.02 2.32l.1.99c.9.15 1.8.15 2.7 0l.1-.99a2.88 2.88 0 0 1 4.02-2.32l.9.4a8.3 8.3 0 0 0 1.35-2.32l-.8-.59a2.88 2.88 0 0 1 0-4.64l.8-.59a8.3 8.3 0 0 0-1.35-2.32l-.9.4a2.88 2.88 0 0 1-4.02-2.32l-.1-.98c-.45-.08-.9-.11-1.34-.12ZM12 8.25a3.75 3.75 0 1 1 0 7.5 3.75 3.75 0 0 1 0-7.5Zm0 1.5a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Z"]);export{l as QuestionCircle24Regular,c as Settings24Regular};
@@ -1 +1 @@
1
- import{createFluentIcon as a}from"../utils/createFluentIcon.js";const l=a("DocumentData32Regular","32",["M8 2a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V10.83a3 3 0 0 0-.88-2.12L20.3 2.88A3 3 0 0 0 18.17 2H8ZM7 5a1 1 0 0 1 1-1h9v5a3 3 0 0 0 3 3h5v15a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V5Zm17.59 5H20a1 1 0 0 1-1-1V4.41L24.59 10ZM12 13a1 1 0 1 0-2 0v12a1 1 0 1 0 2 0V13Zm5 8a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0v-4Zm4-5a1 1 0 0 1 1 1v8a1 1 0 1 1-2 0v-8a1 1 0 0 1 1-1Z"]),t=a("Edit20Regular","20",["M17.18 2.93a2.97 2.97 0 0 0-4.26-.06l-9.37 9.38c-.33.33-.56.74-.66 1.2l-.88 3.94a.5.5 0 0 0 .6.6l3.93-.87c.46-.1.9-.34 1.23-.68l9.36-9.36a2.97 2.97 0 0 0 .05-4.15Zm-3.55.65a1.97 1.97 0 1 1 2.8 2.8l-.68.66-2.8-2.79.68-.67Zm-1.38 1.38 2.8 2.8-7.99 7.97c-.2.2-.46.35-.74.41l-3.16.7.7-3.18c.07-.27.2-.51.4-.7l8-8Z"]);export{l as DocumentData32Regular,t as Edit20Regular};
1
+ import{createFluentIcon as a}from"../utils/createFluentIcon.js";const t=a("DocumentData32Regular","32",["M8 2a3 3 0 0 0-3 3v22a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V10.83a3 3 0 0 0-.88-2.12L20.3 2.88A3 3 0 0 0 18.17 2H8ZM7 5a1 1 0 0 1 1-1h9v5a3 3 0 0 0 3 3h5v15a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V5Zm17.59 5H20a1 1 0 0 1-1-1V4.41L24.59 10ZM12 13a1 1 0 1 0-2 0v12a1 1 0 1 0 2 0V13Zm5 8a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0v-4Zm4-5a1 1 0 0 1 1 1v8a1 1 0 1 1-2 0v-8a1 1 0 0 1 1-1Z"]);export{t as DocumentData32Regular};
@@ -1 +1 @@
1
- import{createFluentIcon as r}from"../utils/createFluentIcon.js";const e=r("ErrorCircle12Filled","12",["M6 11A5 5 0 1 0 6 1a5 5 0 0 0 0 10Zm-.75-2.75a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0Zm.26-4.84a.5.5 0 0 1 .98 0l.01.09v2.59a.5.5 0 0 1-1 0V3.41Z"]);export{e as ErrorCircle12Filled};
1
+ import{createFluentIcon as l}from"../utils/createFluentIcon.js";const a=l("Edit20Regular","20",["M17.18 2.93a2.97 2.97 0 0 0-4.26-.06l-9.37 9.38c-.33.33-.56.74-.66 1.2l-.88 3.94a.5.5 0 0 0 .6.6l3.93-.87c.46-.1.9-.34 1.23-.68l9.36-9.36a2.97 2.97 0 0 0 .05-4.15Zm-3.55.65a1.97 1.97 0 1 1 2.8 2.8l-.68.66-2.8-2.79.68-.67Zm-1.38 1.38 2.8 2.8-7.99 7.97c-.2.2-.46.35-.74.41l-3.16.7.7-3.18c.07-.27.2-.51.4-.7l8-8Z"]),r=l("ErrorCircle12Filled","12",["M6 11A5 5 0 1 0 6 1a5 5 0 0 0 0 10Zm-.75-2.75a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0Zm.26-4.84a.5.5 0 0 1 .98 0l.01.09v2.59a.5.5 0 0 1-1 0V3.41Z"]);export{a as Edit20Regular,r as ErrorCircle12Filled};
@@ -0,0 +1 @@
1
+ import{getDefaultExportFromCjs as e}from"../../../_virtual/_commonjsHelpers.js";import{m as i}from"./media.js";const{webm:t,mp4:o}=i,n=()=>"undefined"!=typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,s=()=>"wakeLock"in navigator;var l=e(class{constructor(){if(this.enabled=!1,s()){this._wakeLock=null;const e=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",e),document.addEventListener("fullscreenchange",e)}else n()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",t),this._addSourceToVideo(this.noSleepVideo,"mp4",o),this.noSleepVideo.addEventListener("loadedmetadata",(()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",(()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())}))})))}_addSourceToVideo(e,i,t){var o=document.createElement("source");o.src=t,o.type=`video/${i}`,e.appendChild(o)}get isEnabled(){return this.enabled}enable(){if(s())return navigator.wakeLock.request("screen").then((e=>{this._wakeLock=e,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",(()=>{console.log("Wake Lock released.")}))})).catch((e=>{throw this.enabled=!1,console.error(`${e.name}, ${e.message}`),e}));if(n())return this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=window.setInterval((()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve();return this.noSleepVideo.play().then((e=>(this.enabled=!0,e))).catch((e=>{throw this.enabled=!1,e}))}disable(){s()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):n()?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleep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FhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxh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QAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"};export{A as m};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { CodicentAppState } from "../hooks";
2
3
  declare const Login: React.FC<{
3
4
  state: CodicentAppState;
@@ -1 +1 @@
1
- {"version":3,"file":"Login.d.ts","sourceRoot":"","sources":["../../../src/pages/Login.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAA2D,MAAM,UAAU,CAAC;AAuBrG,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,CA8BhD,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Login.d.ts","sourceRoot":"","sources":["../../../src/pages/Login.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAA2D,MAAM,UAAU,CAAC;AAuBrG,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAwDhD,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1 +1 @@
1
- import{jsxs as o,jsx as t}from"react/jsx-runtime";import"react";import"../services/codicent.js";import"../components/Markdown.js";import"../components/Textarea.js";import{Button as e}from"../components/Button.js";import{Title as r}from"../components/Title.js";import{Text as s}from"../components/Text.js";import"../components/Spinner.js";import"../components/TextHeader.js";import"../components/TypingIndicator.js";import"../components/Dialog.js";import"../components/ChatInput.js";import"../components/CombinedPlaceholderDialog.js";import"../components/ChatMessage.js";import"../components/Header.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import{getConfigValue as i}from"../config/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import"../components/FileThumbnail.js";import"../components/MessageInput.js";import"../components/UploadFile.js";import"../components/SnapFooter.js";import"../components/Profile.js";import"../components/MessageItem.js";import"../components/Content.js";import"../components/AiInput.js";import"../components/SearchBox.js";import"../components/HtmlView.js";import"../components/Footer.js";import"../components/Page.js";import"./AppFrame.js";import"./Snap.js";import"./Search.js";import"./CrmPage.js";import"./ImageView.js";import"./FormInvite.js";import"./FormAccept.js";import"./Sales.js";import"../stores/chatStore.js";import n from"../hooks/useLocalization.js";import m from"../hooks/useAppStyles.js";import{makeStyles as p}from"../node_modules/@griffel/react/makeStyles.esm.js";import{mergeClasses as a}from"../node_modules/@griffel/core/mergeClasses.esm.js";const c=p({container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundPosition:"calc(50% - 100px) center",backgroundRepeat:"no-repeat",backgroundSize:"contain",gap:"20px",padding:"0 20px"},button:{minWidth:"15rem"}}),l=({state:p})=>{const{loginWithRedirect:l}=p.auth,j=c(),g=m(),{t:d}=n();return o("div",{className:j.container,style:{backgroundImage:`url(${i("HOME_BACKGROUND_IMAGE_URL")})`},children:[t(r,{children:`${d("Välkommen till")} ${i("INDEX_TITLE")}!`}),t(s,{size:400,children:d("Logga in, eller registrera ett konto, för att komma igång.")}),t(e,{className:a(g.button,j.button),size:"large",appearance:"primary",onClick:()=>l(),children:d("Logga in")}),!i("HIDE_REGISTER_BUTTON")&&t(e,{className:a(g.button,j.button),size:"large",appearance:"primary",onClick:()=>l({authorizationParams:{screen_hint:"signup"}}),children:d("Registrera")})]})};export{l as default};
1
+ import{jsxs as o,jsx as t}from"react/jsx-runtime";import e from"react";import"../services/codicent.js";import"../components/Markdown.js";import"../components/Textarea.js";import{Button as r}from"../components/Button.js";import{Title as i}from"../components/Title.js";import{Text as n}from"../components/Text.js";import"../components/Spinner.js";import"../components/TextHeader.js";import"../components/TypingIndicator.js";import"../components/Dialog.js";import"../components/ChatInput.js";import"../components/CombinedPlaceholderDialog.js";import"../components/ChatMessage.js";import"../components/Header.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import{getConfigValue as s}from"../config/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import"../components/FileThumbnail.js";import"../components/MessageInput.js";import"../components/UploadFile.js";import"../components/SnapFooter.js";import"../components/Profile.js";import"../components/MessageItem.js";import"../components/Content.js";import"../components/AiInput.js";import"../components/SearchBox.js";import"../components/HtmlView.js";import"../components/Footer.js";import"../components/Page.js";import"./AppFrame.js";import"./Snap.js";import"./Search.js";import"./CrmPage.js";import"./ImageView.js";import"./FormInvite.js";import"./FormAccept.js";import"./Sales.js";import"../stores/chatStore.js";import m from"../hooks/useLocalization.js";import p from"../hooks/useAppStyles.js";import{makeStyles as a}from"../node_modules/@griffel/react/makeStyles.esm.js";import{mergeClasses as c}from"../node_modules/@griffel/core/mergeClasses.esm.js";const l=a({container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundPosition:"calc(50% - 100px) center",backgroundRepeat:"no-repeat",backgroundSize:"contain",gap:"20px",padding:"0 20px"},button:{minWidth:"15rem"}}),j=({state:a})=>{const{loginWithRedirect:j}=a.auth,g=l(),d=p(),{t:u}=m(),h=s("LOGIN_REDIRECT");return e.useEffect((()=>{h&&j()}),[h]),o("div",h?{className:g.container,style:{backgroundImage:`url(${s("HOME_BACKGROUND_IMAGE_URL")})`},children:[t(i,{children:`${u("Välkommen till")} ${s("INDEX_TITLE")}!`}),t(n,{size:400,children:u("Omdirigerar till inloggning...")})]}:{className:g.container,style:{backgroundImage:`url(${s("HOME_BACKGROUND_IMAGE_URL")})`},children:[t(i,{children:`${u("Välkommen till")} ${s("INDEX_TITLE")}!`}),t(n,{size:400,children:u("Logga in, eller registrera ett konto, för att komma igång.")}),t(r,{className:c(d.button,g.button),size:"large",appearance:"primary",onClick:()=>j(),children:u("Logga in")}),!s("HIDE_REGISTER_BUTTON")&&t(r,{className:c(d.button,g.button),size:"large",appearance:"primary",onClick:()=>j({authorizationParams:{screen_hint:"signup"}}),children:u("Registrera")})]})};export{j as default};
@@ -1 +1 @@
1
- {"version":3,"file":"withWakeLock.d.ts","sourceRoot":"","sources":["../../../src/utils/withWakeLock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAE9E,iBAAS,YAAY,CAAC,CAAC,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,WAClB,iBAAiB,CAAC,CAAC,CAAC,6CAwC5D;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"withWakeLock.d.ts","sourceRoot":"","sources":["../../../src/utils/withWakeLock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAG9E,iBAAS,YAAY,CAAC,CAAC,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,WAClB,iBAAiB,CAAC,CAAC,CAAC,6CA8D5D;AAED,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";function c(c){return function(n){const[a,t]=o(null);return r((()=>{!async function(){if("wakeLock"in navigator)try{const e=await navigator.wakeLock.request("screen");t(e),console.log("Wake Lock acquired!")}catch(e){console.error(`Error acquiring wake lock: ${e}`)}else console.error("Wake Lock API not supported!")}()}),[]),r((()=>()=>{a&&a.release().then((()=>{console.log("Wake Lock released!")})).catch((e=>{console.error("Error releasing wake lock:",e)}))}),[a]),e(c,{...n})}}export{c as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import l from"../node_modules/nosleep.js/src/index.js";function n(n){return function(c){const[a,s]=o(null),[t]=o((()=>new l));return r((()=>{!async function(){if("wakeLock"in navigator)try{const e=await navigator.wakeLock.request("screen");s(e),console.log("Wake Lock API acquired!")}catch(e){console.error(`Error acquiring wake lock API: ${e}`);try{t.enable(),console.log("NoSleep.js enabled as fallback!")}catch(e){console.error(`Error enabling NoSleep.js: ${e}`)}}else{console.log("Wake Lock API not supported, using NoSleep.js");try{t.enable(),console.log("NoSleep.js enabled!")}catch(e){console.error(`Error enabling NoSleep.js: ${e}`)}}}()}),[]),r((()=>()=>{a&&a.release().then((()=>{console.log("Wake Lock released!")})).catch((e=>{console.error("Error releasing wake lock:",e)}));try{t.disable(),console.log("NoSleep.js disabled!")}catch(e){console.error("Error disabling NoSleep.js:",e)}}),[a,t]),e(n,{...c})}}export{n as default};
package/dist/index.d.ts CHANGED
@@ -697,6 +697,7 @@ declare class AppConfig {
697
697
  };
698
698
  }
699
699
  interface AppConfigOptions {
700
+ LOGIN_REDIRECT: boolean;
700
701
  ABOUT_TEXT: string;
701
702
  ANONYMOUS_CODICENT: string | undefined;
702
703
  ANONYMOUS_TOKEN: string | undefined;
@@ -795,6 +796,18 @@ declare function getConfigValue<K extends keyof AppConfigOptions>(key: K): AppCo
795
796
  * Initialize the Codicent App SDK with configuration options
796
797
  */
797
798
  declare function initCodicentApp(options?: Partial<AppConfigOptions>): void;
799
+ declare global {
800
+ interface Window {
801
+ updateCodicentConfig: (config: Record<string, any>) => void;
802
+ }
803
+ }
804
+ /**
805
+ * Updates the existing configuration object with new values from the provided `newConfig` object.
806
+ * Only properties that already exist on the original `config` object will be updated.
807
+ *
808
+ * @param newConfig - An object containing configuration properties to update.
809
+ */
810
+ declare const updateConfig: (newConfig: Record<string, any>) => void;
798
811
 
799
812
  declare const AppFrame: ({ src, showFooter, title, }: {
800
813
  src: string;
@@ -812,7 +825,7 @@ declare const Search: React__default.FC<{
812
825
  state: CodicentAppState;
813
826
  }>;
814
827
 
815
- declare const Login: React.FC<{
828
+ declare const Login: React__default.FC<{
816
829
  state: CodicentAppState;
817
830
  }>;
818
831
 
@@ -838,4 +851,4 @@ declare const Sales: React__default.FC<{
838
851
  state: CodicentAppState;
839
852
  }>;
840
853
 
841
- export { AiInput, AppConfig, AppConfigOptions, AppFrame, AppInfo, AppStateDefinition, AppStateMachine, AudioIcon, AudioRecorder, AudioRecorderState, Button, ChatInput, ChatMessage, CodicentAppState, CodicentService, CodicentServiceOptions, CombinedPlaceholderDialog, Content, CrmPage, FilePlaceholder, FileThumbnail, Footer, FormAccept, FormInvite, Header, HtmlView, ImageViewer as ImageView, Input, Label, Login, Logout, Markdown, Message$1 as Message, Content$1 as MessageContent, MessageInput, MessageItem, Page, Profile, Prompt, RealtimeVoice, Sales, Search, SearchBox, Snap, SnapFooter, Spinner, StateContext, TemplateVariable, Text, TextHeader, Textarea, Title, TypingIndicator, UploadFile, UploadFileProps, UploadFileRef, UrlProcessor, UseAuthState, UserInfo, VoiceIcon, WavRecorder, WavStreamPlayer, createAppStateMachine, generateBrandVariants, getConfigValue, getGpsLocation, getTimeString, initCodicentApp, isMobileDevice, log, useAppStyles, useAudioRecorder, useAuthState, useChat, useCodicentApp, useCodicentState, useLocalization, useRealtimeVoiceAI, useStateWithLocalStorage, useTemplateVariables, useToaster, useTools, withWakeLock };
854
+ export { AiInput, AppConfig, AppConfigOptions, AppFrame, AppInfo, AppStateDefinition, AppStateMachine, AudioIcon, AudioRecorder, AudioRecorderState, Button, ChatInput, ChatMessage, CodicentAppState, CodicentService, CodicentServiceOptions, CombinedPlaceholderDialog, Content, CrmPage, FilePlaceholder, FileThumbnail, Footer, FormAccept, FormInvite, Header, HtmlView, ImageViewer as ImageView, Input, Label, Login, Logout, Markdown, Message$1 as Message, Content$1 as MessageContent, MessageInput, MessageItem, Page, Profile, Prompt, RealtimeVoice, Sales, Search, SearchBox, Snap, SnapFooter, Spinner, StateContext, TemplateVariable, Text, TextHeader, Textarea, Title, TypingIndicator, UploadFile, UploadFileProps, UploadFileRef, UrlProcessor, UseAuthState, UserInfo, VoiceIcon, WavRecorder, WavStreamPlayer, createAppStateMachine, generateBrandVariants, getConfigValue, getGpsLocation, getTimeString, initCodicentApp, isMobileDevice, log, updateConfig, useAppStyles, useAudioRecorder, useAuthState, useChat, useCodicentApp, useCodicentState, useLocalization, useRealtimeVoiceAI, useStateWithLocalStorage, useTemplateVariables, useToaster, useTools, withWakeLock };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codicent-app-sdk",
3
- "version": "0.3.57",
3
+ "version": "0.3.60",
4
4
  "description": "SDK for building AI-powered applications with Codicent",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",
@@ -46,9 +46,10 @@
46
46
  "react-router-dom": "^6.27.0"
47
47
  },
48
48
  "dependencies": {
49
- "remark-gfm": "^4.0.0",
50
49
  "lodash": "^4.17.21",
51
- "react-json-editor-ajrm": "^2.5.14"
50
+ "nosleep.js": "^0.12.0",
51
+ "react-json-editor-ajrm": "^2.5.14",
52
+ "remark-gfm": "^4.0.0"
52
53
  },
53
54
  "devDependencies": {
54
55
  "@auth0/auth0-react": "^2.2.4",
@@ -56,18 +57,19 @@
56
57
  "@babel/preset-env": "^7.20.2",
57
58
  "@babel/preset-react": "^7.18.6",
58
59
  "@babel/preset-typescript": "^7.21.0",
60
+ "@fluentui/react-components": "^9.60.0",
61
+ "@fluentui/react-icons": "^2.0.292",
59
62
  "@openai/realtime-api-beta": "github:izaxon/openai-realtime-api-beta",
60
63
  "@rollup/plugin-commonjs": "^24.0.1",
61
64
  "@rollup/plugin-json": "^6.0.0",
62
65
  "@rollup/plugin-node-resolve": "^15.0.1",
63
66
  "@rollup/plugin-terser": "^0.4.0",
64
67
  "@rollup/plugin-typescript": "^11.0.0",
65
- "@fluentui/react-components": "^9.60.0",
66
- "@fluentui/react-icons": "^2.0.292",
67
68
  "@stripe/stripe-js": "^5.2.0",
68
69
  "@types/jest": "^29.4.0",
69
70
  "@types/lodash": "^4.17.15",
70
71
  "@types/node": "^18.14.1",
72
+ "@types/nosleep.js": "^0.9.0",
71
73
  "@types/react": "^18.0.28",
72
74
  "@types/react-dom": "^18.0.11",
73
75
  "@types/react-json-editor-ajrm": "^2.5.6",