@accurix/centrinfo-widget 4.0.0 → 5.1.0
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.
- package/README.md +195 -28
- package/dist/cdn/centrinfo-widget-charts.js +15826 -0
- package/dist/cdn/centrinfo-widget-dev.js +122 -0
- package/dist/cdn/centrinfo-widget.js +568 -641
- package/dist/cdn/manifest.json +20 -6
- package/dist/dev-transports-CuEqYhZT.cjs +1 -0
- package/dist/dev-transports-D6oaj_ri.mjs +1 -0
- package/dist/echarts-runtime-BfpVL8xu.cjs +24 -0
- package/dist/echarts-runtime-Bu1uy4oO.mjs +18 -0
- package/dist/index.cjs +1 -3519
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -3519
- package/dist/runtime.cjs +2 -1
- package/dist/runtime.d.cts +315 -59
- package/dist/runtime.d.mts +189 -142
- package/dist/runtime.mjs +2 -1
- package/dist/styles-BH7P8Q_3.cjs +3472 -0
- package/dist/styles-DwSTSmZb.mjs +3472 -0
- package/dist/{types-1ZJJY7Da.d.mts → types-CYFMH8yg.d.cts} +615 -12
- package/dist/{types-B0r4SXaT.d.cts → types-D82dr33R.d.mts} +824 -10
- package/package.json +5 -7
- package/dist/config-CkU4urQY.mjs +0 -30
- package/dist/config-DsNMbdKp.cjs +0 -36
package/dist/cdn/manifest.json
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "@accurix/centrinfo-widget",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"fileName": "centrinfo-widget.js",
|
|
5
|
-
"cdnPath": "centrinfo/js/sdk-centrinfo-widget-
|
|
6
|
-
"bytes":
|
|
7
|
-
"gzipBytes":
|
|
8
|
-
"sha256": "
|
|
9
|
-
"sri": "sha256-
|
|
5
|
+
"cdnPath": "centrinfo/js/sdk-centrinfo-widget-v5.1.0/centrinfo-widget.js",
|
|
6
|
+
"bytes": 389905,
|
|
7
|
+
"gzipBytes": 113120,
|
|
8
|
+
"sha256": "ada2da563e5af309b949a1771f2a1069b217216e7357fb67d199de43f80875f7",
|
|
9
|
+
"sri": "sha256-raLaVj5a8wm5SaF3HyoQabIXIW5zV/tn0ZneQ/gIdfc=",
|
|
10
|
+
"chunks": [
|
|
11
|
+
{
|
|
12
|
+
"fileName": "centrinfo-widget-charts.js",
|
|
13
|
+
"bytes": 695070,
|
|
14
|
+
"gzipBytes": 193255,
|
|
15
|
+
"sri": "sha256-7P4aXmqVrziD1xZsvcDUsa7Dm5LwSv3Mqzkkh9D2NWw="
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"fileName": "centrinfo-widget-dev.js",
|
|
19
|
+
"bytes": 15356,
|
|
20
|
+
"gzipBytes": 4983,
|
|
21
|
+
"sri": "sha256-7b2VcAN/5oc0rrBxp0Th9uIlF7D4HxsydV6vkZtLYGQ="
|
|
22
|
+
}
|
|
23
|
+
]
|
|
10
24
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>new Promise(t=>setTimeout(t,e)),t={agentName:`Accurix`,agentAvatarUrl:``,widgetModule:`assistant`,assistantMediaUrl:`https://images.unsplash.com/photo-1494790108377-be9c29b29330`,assistantMediaKind:`image`,assistantPrivacyUrl:`https://accurix.tech/privacy`,soundEnabled:!0,voiceOutputEnabled:!1,talkbackMode:`avatar`,avatarProvider:`demo`,avatarId:`accurix-demo`,greeting:`Hi! I'm Accurix, the AI assistant for Accurix. Ask me anything about products, pricing, or documentation — or book a demo.`,allowVoiceInput:!1,memoryEnabled:!0,memoryRetentionDays:30,memoryMessageCap:50,availableActions:[`public_book_demo`,`public_capture_contact`,`public_submit_inquiry`],agentDescription:`I help with Accurix products, pricing, and documentation.`,welcomeSubtitle:`Ask me anything — most answers are instant.`,disclaimerText:`Accurix is an AI assistant; answers may be imperfect.`,starterQuestions:[`What can Accurix help with?`,`How do I get started?`,`What's your pricing?`],featuredLinks:[{label:`Accurix founders`,url:`https://accurix.tech/about`},{label:`Pricing`,url:`https://accurix.tech/pricing`}]},n=[{match:/demo chart|monthly orders|orders by status/i,result:{answer:`Orders moved in different directions by status in the latest month. The chart below shows one line for submitted, approved, and fulfilled orders.`,sources:[],suggestedReplies:[`Show a demo KPI`,`Show a demo table`],handoffOffered:!1,visualization:{version:1,presentation:`chart`,type:`line`,title:`Monthly orders by status`,reportingPeriod:{label:`January–August 2025`,timezone:`Africa/Lagos`},timezone:`Africa/Lagos`,freshness:{status:`live`,answeredAt:`2026-10-09T10:00:00Z`},appliedFilters:[{field:`status`,operator:`in`,value:[`Submitted`,`Approved`,`Fulfilled`]}],columns:[`month`,`status`,`order_count`],rows:[{month:`2025-01-01`,status:`Submitted`,order_count:12},{month:`2025-01-01`,status:`Approved`,order_count:16},{month:`2025-01-01`,status:`Fulfilled`,order_count:14},{month:`2025-02-01`,status:`Submitted`,order_count:14},{month:`2025-02-01`,status:`Approved`,order_count:15},{month:`2025-02-01`,status:`Fulfilled`,order_count:15},{month:`2025-03-01`,status:`Submitted`,order_count:13},{month:`2025-03-01`,status:`Approved`,order_count:17},{month:`2025-03-01`,status:`Fulfilled`,order_count:16},{month:`2025-04-01`,status:`Submitted`,order_count:15},{month:`2025-04-01`,status:`Approved`,order_count:16},{month:`2025-04-01`,status:`Fulfilled`,order_count:17},{month:`2025-05-01`,status:`Submitted`,order_count:16},{month:`2025-05-01`,status:`Approved`,order_count:18},{month:`2025-05-01`,status:`Fulfilled`,order_count:17},{month:`2025-06-01`,status:`Submitted`,order_count:17},{month:`2025-06-01`,status:`Approved`,order_count:17},{month:`2025-06-01`,status:`Fulfilled`,order_count:18},{month:`2025-07-01`,status:`Submitted`,order_count:18},{month:`2025-07-01`,status:`Approved`,order_count:19},{month:`2025-07-01`,status:`Fulfilled`,order_count:18},{month:`2025-08-01`,status:`Submitted`,order_count:19},{month:`2025-08-01`,status:`Approved`,order_count:18},{month:`2025-08-01`,status:`Fulfilled`,order_count:19}],rowCount:24,columnMetadata:[{key:`month`,label:`Order month`,dataType:`date`,semanticRole:`date`},{key:`status`,label:`Status`,dataType:`text`,semanticRole:`dimension`},{key:`order_count`,label:`Distinct order count`,dataType:`number`,semanticRole:`measure`,aggregation:`count_distinct`}],chartRecommendation:{type:`line`,mode:`time_series`,categoryField:`month`,valueFields:[`order_count`],seriesField:`status`},expandable:!0,tableAvailable:!1,explanation:{headline:`The latest results moved in different directions by status.`,summary:`Submitted and fulfilled orders increased, while approved orders decreased.`,evidence:[`Submitted orders increased from 18 in July to 19 in August.`,`Approved orders decreased from 19 in July to 18 in August.`,`Fulfilled orders increased from 18 in July to 19 in August.`],businessMeaning:`Overall order activity is steady, but the small approval decline is worth watching if it continues.`,followUps:[`Which status changed the most?`,`How does this compare with the prior quarter?`],source:`governed_result`}}}},{match:/demo kpi|active accounts/i,result:{answer:`There are 5,632 active accounts in the current demo result.`,sources:[],suggestedReplies:[`Show a demo chart`,`Show a demo table`],handoffOffered:!1,visualization:{version:1,presentation:`kpi`,type:`kpi`,title:`Active accounts`,columns:[`active_accounts`],value:`active_accounts`,rows:[{active_accounts:5632}],rowCount:1,columnMetadata:[{key:`active_accounts`,label:`Active accounts`,dataType:`number`,semanticRole:`measure`,aggregation:`count_distinct`}],explanation:{headline:`Active accounts are 5,632.`,summary:`This is the latest value in the demo result.`,evidence:[`The displayed active-account count is 5,632.`],source:`governed_result`}}}},{match:/demo table|account health/i,result:{answer:`Nine accounts are included in this governed result. The table shows a compact preview and can be expanded to inspect every permitted row.`,sources:[],suggestedReplies:[`Show a demo chart`,`Test the hidden table response`],handoffOffered:!1,visualization:{version:1,presentation:`table`,type:`table`,title:`Account health`,columns:[`account_name`,`region`,`health_score`,`renewal_month`],rows:[{account_name:`Northstar Industries`,region:`West`,health_score:94,renewal_month:`August`},{account_name:`Apex Group`,region:`East`,health_score:91,renewal_month:`September`},{account_name:`Summit Retail`,region:`North`,health_score:88,renewal_month:`August`},{account_name:`Harbor Logistics`,region:`South`,health_score:86,renewal_month:`October`},{account_name:`Brightline Media`,region:`West`,health_score:84,renewal_month:`November`},{account_name:`Redwood Labs`,region:`East`,health_score:82,renewal_month:`September`},{account_name:`Atlas Foods`,region:`North`,health_score:79,renewal_month:`December`},{account_name:`Cedar Health`,region:`South`,health_score:77,renewal_month:`October`},{account_name:`Bluewave Energy`,region:`West`,health_score:74,renewal_month:`December`}],rowCount:9,columnMetadata:[{key:`account_name`,label:`Account`,dataType:`text`,semanticRole:`dimension`},{key:`region`,label:`Region`,dataType:`text`,semanticRole:`geography`},{key:`health_score`,label:`Health score`,dataType:`number`,semanticRole:`measure`},{key:`renewal_month`,label:`Renewal month`,dataType:`text`,semanticRole:`date`}],expandable:!0,tableAvailable:!0,downloadAvailable:!0,explanation:{headline:`Nine accounts are available for review.`,summary:`Health scores range from 74 to 94 across four regions.`,evidence:[`Northstar Industries has the highest health score at 94.`],source:`governed_result`}}}},{match:/hidden table|table response/i,result:{answer:`Three accounts need attention. The public widget explains the result without exposing its underlying rows.`,sources:[],suggestedReplies:[`Show a demo chart`,`Show a demo KPI`],handoffOffered:!1,visualization:{version:1,presentation:`table`,type:`table`,columns:[`account_name`,`risk_score`],rows:[{account_name:`Private account A`,risk_score:91},{account_name:`Private account B`,risk_score:87},{account_name:`Private account C`,risk_score:82}],rowCount:3,tableAvailable:!1,explanation:{headline:`Three accounts need attention.`,summary:`The written result is available without displaying a public data table.`,evidence:[`Three accounts matched the approved attention rule.`],source:`governed_result`}}}},{match:/^\s*(hi+|hey+|hello|yo|sup|howdy|hola|thanks|thank you|thx|good (morning|afternoon|evening))\b/i,result:{answer:`Hello! 👋 How can I help you today?`,sources:[],suggestedReplies:[`How do I track a shipment?`,`How does customs work?`],handoffOffered:!1}},{match:/track|shipment|where|status/i,result:{answer:`Centrinfo can answer from your indexed knowledge base, public website, connected files, and approved organization tools. It keeps answers grounded in your configured sources and can hand a conversation to your team when the AI is not enough.`,sources:[{title:`Centrinfo public widget`,url:`https://accurix.tech/centrinfo`}],suggestedReplies:[`How does the widget work?`,`Can a human take over?`],handoffOffered:!1}},{match:/custom|clear|duty|tariff|import/i,result:{answer:`Accurix connects your organization knowledge, channels, integrations, and public widget in one place. You can configure which sources the AI can use, which tools visitors can trigger, and when your team should take over live chat.`,sources:[{title:`Accurix documentation`,url:`https://accurix.tech/docs`}],suggestedReplies:[`Which tools can I connect?`,`How do permissions work?`],handoffOffered:!1}},{match:/price|cost|pricing|plan|quote/i,result:{answer:`Accurix uses a usage-based pricing model. Organizations keep an active subscription and spend credits as the AI answers, searches, and uses tools. Credit top-ups can extend usage when the subscription grant runs low.`,sources:[{title:`Pricing`,url:`https://accurix.tech/pricing`}],suggestedReplies:[`How do credits work?`,`Can I top up credits?`],handoffOffered:!1}}],r={answer:`That's a great question — I don't have a confident answer from Accurix's published docs yet. Want me to pass it to the team so a human can follow up? You can also book a quick demo.`,sources:[],suggestedReplies:[`What can you help with?`],handoffOffered:!0},i=e=>n.find(t=>t.match.test(e))?.result??r;var a=class{async history(){return{conversations:[]}}async bootstrap(){return await e(180),t}async stream(n,r,a){await e(550);let o=i(n),s=o.answer.split(/(\s+)/);for(let t of s){if(a.signal?.aborted)break;a.onChunk(t),await e(18+Math.min(40,t.length*6))}return{...o,availableActions:t.availableActions}}async liveEvents(){return{mode:`ai`,conversationEnded:!1,events:[]}}async presence(e){}async typing(){await e(20)}async action(t,n){return await e(450),{ok:!0,note:{"book-demo":`Demo requested — we'll email you a few times that work. 📅`,contact:`Got it — saved your details. ✅`,"contact-support":`Support request sent. The team can follow up from this chat. ✅`,inquiry:`Thanks! We'll get back to you shortly. ✉️`,"request-callback":`We'll call you back soon. 📞`,"schedule-callback":`Your callback has been scheduled.`,"subscribe-newsletter":`You're subscribed. 🎉`}[t]}}async speak(){return await e(120),{providerReady:!1,message:`Demo voice provider is not connected.`}}async transcribe(t,n,r,i){return await e(700),`How do I track a shipment?`}async uploadAttachment(e,t,n){return{id:`demo-${Date.now()}`,text:`Attached file: ${n}`,analysisFailed:!1}}async identify(t,n){await e(50)}async endConversation(t){await e(50)}async sendFeedback(){await e(50)}async sendExplanationFeedback(){await e(50)}async demoSlots(t,n){return await e(150),{taken:[[11,0],[15,0]].map(([e,t])=>{let n=new Date;return n.setHours(e,t,0,0),n.toISOString()}),busy:[]}}async searchGifs(t){await e(280);let n=t.trim().toLowerCase(),r=n?l.filter(e=>e.alt.includes(n)||e.tags.some(e=>e.includes(n)||n.includes(e))):l;return(r.length>0?r:l).map(e=>({id:e.id,url:c(e.emoji,e.anim),preview:c(e.emoji,e.anim),alt:e.alt}))}};const o=`<animateTransform attributeName='transform' attributeType='XML' type='translate' values='0 0;0 -16;0 0' dur='0.7s' repeatCount='indefinite'/>`,s=`<animateTransform attributeName='transform' attributeType='XML' type='rotate' values='-14 64 110;14 64 110;-14 64 110' dur='0.9s' repeatCount='indefinite'/>`,c=(e,t)=>{let n=`<svg xmlns='http://www.w3.org/2000/svg' width='128' height='128'><rect width='128' height='128' rx='14' fill='#eef1f4'/><text x='64' y='88' font-size='64' text-anchor='middle'>${e}${t}</text></svg>`;return`data:image/svg+xml,${encodeURIComponent(n)}`},l=[{id:`g1`,emoji:`👍`,alt:`thumbs up`,tags:[`thumbs`,`yes`,`ok`,`great`,`good`],anim:o},{id:`g2`,emoji:`🎉`,alt:`celebrate`,tags:[`party`,`yay`,`congrats`,`celebrate`],anim:s},{id:`g3`,emoji:`👋`,alt:`wave hello`,tags:[`hi`,`hello`,`hey`,`wave`,`bye`],anim:s},{id:`g4`,emoji:`❤️`,alt:`heart`,tags:[`love`,`thanks`,`heart`],anim:o},{id:`g5`,emoji:`🤔`,alt:`thinking`,tags:[`hmm`,`think`,`thinking`],anim:s},{id:`g6`,emoji:`😂`,alt:`laughing`,tags:[`lol`,`funny`,`haha`,`laugh`],anim:o},{id:`g7`,emoji:`🔥`,alt:`fire`,tags:[`fire`,`hot`,`lit`,`awesome`],anim:o},{id:`g8`,emoji:`🚀`,alt:`rocket`,tags:[`rocket`,`launch`,`fast`,`go`],anim:s}],u=e=>new Promise(t=>setTimeout(t,e));var d=class{constructor(e,t){this.real=e,this.strings=t}bootstrap(){return this.real.bootstrap()}async history(){return{conversations:[]}}async stream(e,t,n){await u(300);for(let e of this.strings.previewReply.split(/(\s+)/)){if(n.signal?.aborted)break;n.onChunk(e),await u(16)}return{answer:this.strings.previewReply,sources:[],suggestedReplies:[],availableActions:[],handoffOffered:!1}}async liveEvents(){return{mode:`ai`,conversationEnded:!1,events:[]}}async presence(e){}async typing(){}async action(){return await u(250),{ok:!0,note:this.strings.previewActionNote}}async speak(){return{providerReady:!1,message:`Preview voice provider is not connected.`}}async identify(){}async endConversation(){}async sendFeedback(){}async sendExplanationFeedback(){}async transcribe(e,t,n,r){return``}async uploadAttachment(e,t,n){return{id:`preview-${Date.now()}`,text:`Attached file: ${n}`,analysisFailed:!1}}async searchGifs(){return[]}async demoSlots(){return{taken:[],busy:[]}}};exports.MockTransport=a,exports.PreviewTransport=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>new Promise(t=>setTimeout(t,e)),t={agentName:`Accurix`,agentAvatarUrl:``,widgetModule:`assistant`,assistantMediaUrl:`https://images.unsplash.com/photo-1494790108377-be9c29b29330`,assistantMediaKind:`image`,assistantPrivacyUrl:`https://accurix.tech/privacy`,soundEnabled:!0,voiceOutputEnabled:!1,talkbackMode:`avatar`,avatarProvider:`demo`,avatarId:`accurix-demo`,greeting:`Hi! I'm Accurix, the AI assistant for Accurix. Ask me anything about products, pricing, or documentation — or book a demo.`,allowVoiceInput:!1,memoryEnabled:!0,memoryRetentionDays:30,memoryMessageCap:50,availableActions:[`public_book_demo`,`public_capture_contact`,`public_submit_inquiry`],agentDescription:`I help with Accurix products, pricing, and documentation.`,welcomeSubtitle:`Ask me anything — most answers are instant.`,disclaimerText:`Accurix is an AI assistant; answers may be imperfect.`,starterQuestions:[`What can Accurix help with?`,`How do I get started?`,`What's your pricing?`],featuredLinks:[{label:`Accurix founders`,url:`https://accurix.tech/about`},{label:`Pricing`,url:`https://accurix.tech/pricing`}]},n=[{match:/demo chart|monthly orders|orders by status/i,result:{answer:`Orders moved in different directions by status in the latest month. The chart below shows one line for submitted, approved, and fulfilled orders.`,sources:[],suggestedReplies:[`Show a demo KPI`,`Show a demo table`],handoffOffered:!1,visualization:{version:1,presentation:`chart`,type:`line`,title:`Monthly orders by status`,reportingPeriod:{label:`January–August 2025`,timezone:`Africa/Lagos`},timezone:`Africa/Lagos`,freshness:{status:`live`,answeredAt:`2026-10-09T10:00:00Z`},appliedFilters:[{field:`status`,operator:`in`,value:[`Submitted`,`Approved`,`Fulfilled`]}],columns:[`month`,`status`,`order_count`],rows:[{month:`2025-01-01`,status:`Submitted`,order_count:12},{month:`2025-01-01`,status:`Approved`,order_count:16},{month:`2025-01-01`,status:`Fulfilled`,order_count:14},{month:`2025-02-01`,status:`Submitted`,order_count:14},{month:`2025-02-01`,status:`Approved`,order_count:15},{month:`2025-02-01`,status:`Fulfilled`,order_count:15},{month:`2025-03-01`,status:`Submitted`,order_count:13},{month:`2025-03-01`,status:`Approved`,order_count:17},{month:`2025-03-01`,status:`Fulfilled`,order_count:16},{month:`2025-04-01`,status:`Submitted`,order_count:15},{month:`2025-04-01`,status:`Approved`,order_count:16},{month:`2025-04-01`,status:`Fulfilled`,order_count:17},{month:`2025-05-01`,status:`Submitted`,order_count:16},{month:`2025-05-01`,status:`Approved`,order_count:18},{month:`2025-05-01`,status:`Fulfilled`,order_count:17},{month:`2025-06-01`,status:`Submitted`,order_count:17},{month:`2025-06-01`,status:`Approved`,order_count:17},{month:`2025-06-01`,status:`Fulfilled`,order_count:18},{month:`2025-07-01`,status:`Submitted`,order_count:18},{month:`2025-07-01`,status:`Approved`,order_count:19},{month:`2025-07-01`,status:`Fulfilled`,order_count:18},{month:`2025-08-01`,status:`Submitted`,order_count:19},{month:`2025-08-01`,status:`Approved`,order_count:18},{month:`2025-08-01`,status:`Fulfilled`,order_count:19}],rowCount:24,columnMetadata:[{key:`month`,label:`Order month`,dataType:`date`,semanticRole:`date`},{key:`status`,label:`Status`,dataType:`text`,semanticRole:`dimension`},{key:`order_count`,label:`Distinct order count`,dataType:`number`,semanticRole:`measure`,aggregation:`count_distinct`}],chartRecommendation:{type:`line`,mode:`time_series`,categoryField:`month`,valueFields:[`order_count`],seriesField:`status`},expandable:!0,tableAvailable:!1,explanation:{headline:`The latest results moved in different directions by status.`,summary:`Submitted and fulfilled orders increased, while approved orders decreased.`,evidence:[`Submitted orders increased from 18 in July to 19 in August.`,`Approved orders decreased from 19 in July to 18 in August.`,`Fulfilled orders increased from 18 in July to 19 in August.`],businessMeaning:`Overall order activity is steady, but the small approval decline is worth watching if it continues.`,followUps:[`Which status changed the most?`,`How does this compare with the prior quarter?`],source:`governed_result`}}}},{match:/demo kpi|active accounts/i,result:{answer:`There are 5,632 active accounts in the current demo result.`,sources:[],suggestedReplies:[`Show a demo chart`,`Show a demo table`],handoffOffered:!1,visualization:{version:1,presentation:`kpi`,type:`kpi`,title:`Active accounts`,columns:[`active_accounts`],value:`active_accounts`,rows:[{active_accounts:5632}],rowCount:1,columnMetadata:[{key:`active_accounts`,label:`Active accounts`,dataType:`number`,semanticRole:`measure`,aggregation:`count_distinct`}],explanation:{headline:`Active accounts are 5,632.`,summary:`This is the latest value in the demo result.`,evidence:[`The displayed active-account count is 5,632.`],source:`governed_result`}}}},{match:/demo table|account health/i,result:{answer:`Nine accounts are included in this governed result. The table shows a compact preview and can be expanded to inspect every permitted row.`,sources:[],suggestedReplies:[`Show a demo chart`,`Test the hidden table response`],handoffOffered:!1,visualization:{version:1,presentation:`table`,type:`table`,title:`Account health`,columns:[`account_name`,`region`,`health_score`,`renewal_month`],rows:[{account_name:`Northstar Industries`,region:`West`,health_score:94,renewal_month:`August`},{account_name:`Apex Group`,region:`East`,health_score:91,renewal_month:`September`},{account_name:`Summit Retail`,region:`North`,health_score:88,renewal_month:`August`},{account_name:`Harbor Logistics`,region:`South`,health_score:86,renewal_month:`October`},{account_name:`Brightline Media`,region:`West`,health_score:84,renewal_month:`November`},{account_name:`Redwood Labs`,region:`East`,health_score:82,renewal_month:`September`},{account_name:`Atlas Foods`,region:`North`,health_score:79,renewal_month:`December`},{account_name:`Cedar Health`,region:`South`,health_score:77,renewal_month:`October`},{account_name:`Bluewave Energy`,region:`West`,health_score:74,renewal_month:`December`}],rowCount:9,columnMetadata:[{key:`account_name`,label:`Account`,dataType:`text`,semanticRole:`dimension`},{key:`region`,label:`Region`,dataType:`text`,semanticRole:`geography`},{key:`health_score`,label:`Health score`,dataType:`number`,semanticRole:`measure`},{key:`renewal_month`,label:`Renewal month`,dataType:`text`,semanticRole:`date`}],expandable:!0,tableAvailable:!0,downloadAvailable:!0,explanation:{headline:`Nine accounts are available for review.`,summary:`Health scores range from 74 to 94 across four regions.`,evidence:[`Northstar Industries has the highest health score at 94.`],source:`governed_result`}}}},{match:/hidden table|table response/i,result:{answer:`Three accounts need attention. The public widget explains the result without exposing its underlying rows.`,sources:[],suggestedReplies:[`Show a demo chart`,`Show a demo KPI`],handoffOffered:!1,visualization:{version:1,presentation:`table`,type:`table`,columns:[`account_name`,`risk_score`],rows:[{account_name:`Private account A`,risk_score:91},{account_name:`Private account B`,risk_score:87},{account_name:`Private account C`,risk_score:82}],rowCount:3,tableAvailable:!1,explanation:{headline:`Three accounts need attention.`,summary:`The written result is available without displaying a public data table.`,evidence:[`Three accounts matched the approved attention rule.`],source:`governed_result`}}}},{match:/^\s*(hi+|hey+|hello|yo|sup|howdy|hola|thanks|thank you|thx|good (morning|afternoon|evening))\b/i,result:{answer:`Hello! 👋 How can I help you today?`,sources:[],suggestedReplies:[`How do I track a shipment?`,`How does customs work?`],handoffOffered:!1}},{match:/track|shipment|where|status/i,result:{answer:`Centrinfo can answer from your indexed knowledge base, public website, connected files, and approved organization tools. It keeps answers grounded in your configured sources and can hand a conversation to your team when the AI is not enough.`,sources:[{title:`Centrinfo public widget`,url:`https://accurix.tech/centrinfo`}],suggestedReplies:[`How does the widget work?`,`Can a human take over?`],handoffOffered:!1}},{match:/custom|clear|duty|tariff|import/i,result:{answer:`Accurix connects your organization knowledge, channels, integrations, and public widget in one place. You can configure which sources the AI can use, which tools visitors can trigger, and when your team should take over live chat.`,sources:[{title:`Accurix documentation`,url:`https://accurix.tech/docs`}],suggestedReplies:[`Which tools can I connect?`,`How do permissions work?`],handoffOffered:!1}},{match:/price|cost|pricing|plan|quote/i,result:{answer:`Accurix uses a usage-based pricing model. Organizations keep an active subscription and spend credits as the AI answers, searches, and uses tools. Credit top-ups can extend usage when the subscription grant runs low.`,sources:[{title:`Pricing`,url:`https://accurix.tech/pricing`}],suggestedReplies:[`How do credits work?`,`Can I top up credits?`],handoffOffered:!1}}],r={answer:`That's a great question — I don't have a confident answer from Accurix's published docs yet. Want me to pass it to the team so a human can follow up? You can also book a quick demo.`,sources:[],suggestedReplies:[`What can you help with?`],handoffOffered:!0},i=e=>n.find(t=>t.match.test(e))?.result??r;var a=class{async history(){return{conversations:[]}}async bootstrap(){return await e(180),t}async stream(n,r,a){await e(550);let o=i(n),s=o.answer.split(/(\s+)/);for(let t of s){if(a.signal?.aborted)break;a.onChunk(t),await e(18+Math.min(40,t.length*6))}return{...o,availableActions:t.availableActions}}async liveEvents(){return{mode:`ai`,conversationEnded:!1,events:[]}}async presence(e){}async typing(){await e(20)}async action(t,n){return await e(450),{ok:!0,note:{"book-demo":`Demo requested — we'll email you a few times that work. 📅`,contact:`Got it — saved your details. ✅`,"contact-support":`Support request sent. The team can follow up from this chat. ✅`,inquiry:`Thanks! We'll get back to you shortly. ✉️`,"request-callback":`We'll call you back soon. 📞`,"schedule-callback":`Your callback has been scheduled.`,"subscribe-newsletter":`You're subscribed. 🎉`}[t]}}async speak(){return await e(120),{providerReady:!1,message:`Demo voice provider is not connected.`}}async transcribe(t,n,r,i){return await e(700),`How do I track a shipment?`}async uploadAttachment(e,t,n){return{id:`demo-${Date.now()}`,text:`Attached file: ${n}`,analysisFailed:!1}}async identify(t,n){await e(50)}async endConversation(t){await e(50)}async sendFeedback(){await e(50)}async sendExplanationFeedback(){await e(50)}async demoSlots(t,n){return await e(150),{taken:[[11,0],[15,0]].map(([e,t])=>{let n=new Date;return n.setHours(e,t,0,0),n.toISOString()}),busy:[]}}async searchGifs(t){await e(280);let n=t.trim().toLowerCase(),r=n?l.filter(e=>e.alt.includes(n)||e.tags.some(e=>e.includes(n)||n.includes(e))):l;return(r.length>0?r:l).map(e=>({id:e.id,url:c(e.emoji,e.anim),preview:c(e.emoji,e.anim),alt:e.alt}))}};const o=`<animateTransform attributeName='transform' attributeType='XML' type='translate' values='0 0;0 -16;0 0' dur='0.7s' repeatCount='indefinite'/>`,s=`<animateTransform attributeName='transform' attributeType='XML' type='rotate' values='-14 64 110;14 64 110;-14 64 110' dur='0.9s' repeatCount='indefinite'/>`,c=(e,t)=>{let n=`<svg xmlns='http://www.w3.org/2000/svg' width='128' height='128'><rect width='128' height='128' rx='14' fill='#eef1f4'/><text x='64' y='88' font-size='64' text-anchor='middle'>${e}${t}</text></svg>`;return`data:image/svg+xml,${encodeURIComponent(n)}`},l=[{id:`g1`,emoji:`👍`,alt:`thumbs up`,tags:[`thumbs`,`yes`,`ok`,`great`,`good`],anim:o},{id:`g2`,emoji:`🎉`,alt:`celebrate`,tags:[`party`,`yay`,`congrats`,`celebrate`],anim:s},{id:`g3`,emoji:`👋`,alt:`wave hello`,tags:[`hi`,`hello`,`hey`,`wave`,`bye`],anim:s},{id:`g4`,emoji:`❤️`,alt:`heart`,tags:[`love`,`thanks`,`heart`],anim:o},{id:`g5`,emoji:`🤔`,alt:`thinking`,tags:[`hmm`,`think`,`thinking`],anim:s},{id:`g6`,emoji:`😂`,alt:`laughing`,tags:[`lol`,`funny`,`haha`,`laugh`],anim:o},{id:`g7`,emoji:`🔥`,alt:`fire`,tags:[`fire`,`hot`,`lit`,`awesome`],anim:o},{id:`g8`,emoji:`🚀`,alt:`rocket`,tags:[`rocket`,`launch`,`fast`,`go`],anim:s}],u=e=>new Promise(t=>setTimeout(t,e));var d=class{constructor(e,t){this.real=e,this.strings=t}bootstrap(){return this.real.bootstrap()}async history(){return{conversations:[]}}async stream(e,t,n){await u(300);for(let e of this.strings.previewReply.split(/(\s+)/)){if(n.signal?.aborted)break;n.onChunk(e),await u(16)}return{answer:this.strings.previewReply,sources:[],suggestedReplies:[],availableActions:[],handoffOffered:!1}}async liveEvents(){return{mode:`ai`,conversationEnded:!1,events:[]}}async presence(e){}async typing(){}async action(){return await u(250),{ok:!0,note:this.strings.previewActionNote}}async speak(){return{providerReady:!1,message:`Preview voice provider is not connected.`}}async identify(){}async endConversation(){}async sendFeedback(){}async sendExplanationFeedback(){}async transcribe(e,t,n,r){return``}async uploadAttachment(e,t,n){return{id:`preview-${Date.now()}`,text:`Attached file: ${n}`,analysisFailed:!1}}async searchGifs(){return[]}async demoSlots(){return{taken:[],busy:[]}}};export{a as MockTransport,d as PreviewTransport};
|