@opencxh/domain 1.172.2 → 1.173.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/dist/entities/activity/types.d.ts +30 -1
- package/dist/entities/assignment/types.d.ts +2 -2
- package/dist/entities/playbook/trigger-vars.d.ts +3 -0
- package/dist/entities/playbook/types.d.ts +2 -1
- package/dist/entities/work/activity.d.ts +36 -0
- package/dist/entities/work/index.d.ts +1 -0
- package/dist/index.cjs +6 -6
- package/dist/index.js +184 -161
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { AIMessageInput, AIMessageOutput } from '../ai-message/types';
|
|
|
4
4
|
export type CallStatus = "new" | "connecting" | "ringing" | "connected" | "held" | "ended" | "failed";
|
|
5
5
|
export type CallDirection = "inbound" | "outbound";
|
|
6
6
|
export type CallType = "audio" | "video" | "data" | "screen-share";
|
|
7
|
-
export type ActivityType = "VOICE_CALL_STARTED" | "VOICE_CALL_ANSWERED" | "VOICE_CALL_HOLD" | "VOICE_CALL_UNHOLD" | "VOICE_CALL_ENDED" | "VOICE_CALL_MISSED" | "VOICE_CALL_VOICEMAIL" | "VIDEO_CALL_STARTED" | "VIDEO_CALL_ANSWERED" | "VIDEO_CALL_HOLD" | "VIDEO_CALL_UNHOLD" | "VIDEO_CALL_ENDED" | "VIDEO_CALL_MISSED" | "EMAIL_RECEIVED" | "EMAIL_SENT" | "CHAT_MESSAGE_SENT" | "CHAT_MESSAGE_RECEIVED" | "CHAT_MEMBER_JOINED" | "CHAT_MEMBER_LEFT" | "CHAT_RENAMED" | "CHAT_CALL_STARTED" | "CHAT_CALL_ENDED" | "CHAT_EVENT" | "AI_MESSAGE_ADDED" | "AI_ACTION_PROPOSED" | "PLAYBOOK_STARTED" | "PLAYBOOK_COMPLETED" | "PLAYBOOK_ESCALATED" | "MEETING_SCHEDULED" | "MEETING_STARTED" | "MEETING_ENDED" | "MEETING_PARTICIPANT_JOINED" | "MEETING_PARTICIPANT_LEFT" | "COMMENT_ADDED" | "FILE_UPLOADED" | "INTERACTION_CREATED" | "INTERACTION_STATUS_CHANGED" | "INTERACTION_ASSIGNED" | "VOICE_CALL_FAILED" | "VIDEO_CALL_FAILED" | "TRANSCRIPT_ADDED";
|
|
7
|
+
export type ActivityType = "VOICE_CALL_STARTED" | "VOICE_CALL_ANSWERED" | "VOICE_CALL_HOLD" | "VOICE_CALL_UNHOLD" | "VOICE_CALL_ENDED" | "VOICE_CALL_MISSED" | "VOICE_CALL_VOICEMAIL" | "VIDEO_CALL_STARTED" | "VIDEO_CALL_ANSWERED" | "VIDEO_CALL_HOLD" | "VIDEO_CALL_UNHOLD" | "VIDEO_CALL_ENDED" | "VIDEO_CALL_MISSED" | "EMAIL_RECEIVED" | "EMAIL_SENT" | "CHAT_MESSAGE_SENT" | "CHAT_MESSAGE_RECEIVED" | "CHAT_MEMBER_JOINED" | "CHAT_MEMBER_LEFT" | "CHAT_RENAMED" | "CHAT_CALL_STARTED" | "CHAT_CALL_ENDED" | "CHAT_EVENT" | "AI_MESSAGE_ADDED" | "AI_ACTION_PROPOSED" | "PLAYBOOK_STARTED" | "PLAYBOOK_COMPLETED" | "PLAYBOOK_ESCALATED" | "MEETING_SCHEDULED" | "MEETING_STARTED" | "MEETING_ENDED" | "MEETING_PARTICIPANT_JOINED" | "MEETING_PARTICIPANT_LEFT" | "COMMENT_ADDED" | "FILE_UPLOADED" | "INTERACTION_CREATED" | "INTERACTION_STATUS_CHANGED" | "INTERACTION_ASSIGNED" | "VOICE_CALL_FAILED" | "VIDEO_CALL_FAILED" | "TRANSCRIPT_ADDED" | "WORK_COMMENT_ADDED" | "WORK_ITEM_ASSIGNED";
|
|
8
8
|
export interface Attachment {
|
|
9
9
|
id: string;
|
|
10
10
|
filename: string;
|
|
@@ -46,6 +46,35 @@ export interface BaseActivity {
|
|
|
46
46
|
createdAt?: number;
|
|
47
47
|
updatedAt?: number;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* An activity as the automation spine reads it.
|
|
51
|
+
*
|
|
52
|
+
* `Activity` is conversation-shaped: `interactionId` is required on every arm. The trigger,
|
|
53
|
+
* assignment and wake machinery does not need that — it needs the type, who wrote it, which way
|
|
54
|
+
* it went, its payload, and *what* it hangs off. Both `Activity` and `WorkActivity` are
|
|
55
|
+
* assignable to this, which is what lets one wake path serve a conversation and a work item.
|
|
56
|
+
*
|
|
57
|
+
* Code that reads *into* a payload stays on `Activity` and narrows; this type is for the spine.
|
|
58
|
+
*/
|
|
59
|
+
export interface FeedActivity {
|
|
60
|
+
id: string;
|
|
61
|
+
organizationId: string;
|
|
62
|
+
type: string;
|
|
63
|
+
author?: {
|
|
64
|
+
type: string;
|
|
65
|
+
id?: string;
|
|
66
|
+
name: string;
|
|
67
|
+
};
|
|
68
|
+
direction: string;
|
|
69
|
+
payload?: unknown;
|
|
70
|
+
/** Set when this activity hangs off a conversation. */
|
|
71
|
+
interactionId?: string;
|
|
72
|
+
channelId?: string;
|
|
73
|
+
/** Set when it hangs off a work item. */
|
|
74
|
+
itemId?: string;
|
|
75
|
+
createdAt?: number;
|
|
76
|
+
updatedAt?: number;
|
|
77
|
+
}
|
|
49
78
|
export type VoiceCallPayload = {
|
|
50
79
|
from: string;
|
|
51
80
|
to: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResourceRef } from '../../platform/resource';
|
|
2
|
-
import {
|
|
2
|
+
import { FeedActivity } from '../activity/types';
|
|
3
3
|
import { WaitingOn } from '../playbook/types';
|
|
4
4
|
/**
|
|
5
5
|
* An **assignment**: work handed to an agent, living as long as the work does.
|
|
@@ -112,7 +112,7 @@ export interface Assignment {
|
|
|
112
112
|
* @param waitingOn What the assignment waits on. Omitted = rules 1-3 only, so a caller that does
|
|
113
113
|
* not know never wakes too eagerly.
|
|
114
114
|
*/
|
|
115
|
-
export declare function wakesAssignment(activity:
|
|
115
|
+
export declare function wakesAssignment(activity: FeedActivity, agentId: string, waitingOn?: WaitingOn["on"]): boolean;
|
|
116
116
|
/** The subject of an assignment as one reference, or `undefined`. */
|
|
117
117
|
export declare function assignmentSubject(assignment: {
|
|
118
118
|
subjectKind?: string;
|
|
@@ -302,9 +302,10 @@ export type WaitingOn = {
|
|
|
302
302
|
on: "approval";
|
|
303
303
|
}
|
|
304
304
|
/** The customer replies, or a colleague answers the run's internal question. */
|
|
305
|
+
/** `interactionId` only when the subject is a conversation; a work item waits without one. */
|
|
305
306
|
| {
|
|
306
307
|
on: "reply";
|
|
307
|
-
interactionId
|
|
308
|
+
interactionId?: string;
|
|
308
309
|
} | {
|
|
309
310
|
on: "task";
|
|
310
311
|
taskId: string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The activity feed under a work item.
|
|
3
|
+
*
|
|
4
|
+
* Its own entity, not comms' `Activity`: that one requires `interactionId` everywhere. The shape
|
|
5
|
+
* mirrors it minus `interactionId`/`providerId`/`channelId`, so `wakesAssignment` and
|
|
6
|
+
* `buildTriggerVars` work on it structurally.
|
|
7
|
+
*
|
|
8
|
+
* The type names are work's own, not comms' `COMMENT_ADDED` — otherwise every existing
|
|
9
|
+
* comms playbook trigger would also fire on a work comment.
|
|
10
|
+
*/
|
|
11
|
+
export declare const WORK_COMMENT_ADDED = "WORK_COMMENT_ADDED";
|
|
12
|
+
export declare const WORK_ITEM_ASSIGNED = "WORK_ITEM_ASSIGNED";
|
|
13
|
+
export type WorkActivityType = typeof WORK_COMMENT_ADDED | typeof WORK_ITEM_ASSIGNED;
|
|
14
|
+
export interface WorkActivity {
|
|
15
|
+
id: string;
|
|
16
|
+
organizationId: string;
|
|
17
|
+
itemId: string;
|
|
18
|
+
type: WorkActivityType;
|
|
19
|
+
author: {
|
|
20
|
+
type: "user" | "system" | "app";
|
|
21
|
+
id?: string;
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Always `"internal"`. Never `"inbound"`: rule 1 of `wakesAssignment` treats inbound as
|
|
26
|
+
* "the customer answered" and would wake every waiting assignment on the item.
|
|
27
|
+
*/
|
|
28
|
+
direction: "internal";
|
|
29
|
+
payload: {
|
|
30
|
+
text?: string;
|
|
31
|
+
mentions?: string[];
|
|
32
|
+
assigneeId?: string;
|
|
33
|
+
};
|
|
34
|
+
createdAt?: number;
|
|
35
|
+
updatedAt?: number;
|
|
36
|
+
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=10,_=10,T=10,b=5,zt=new Set(["header","section","context","divider","image","list","actions","attachments"]);function v(e){if(typeof e=="string")return e.length>0;if(!e||typeof e!="object")return!1;const t=e;return typeof t.key=="string"||typeof t.value=="string"}function Yt(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=D){t("more than "+D+" blocks; the rest was dropped");break}if(!r||typeof r!="object")continue;const i=r;if(!zt.has(i.type)){t("unknown block type "+String(i.type));continue}switch(i.type){case"header":if(!v(i.text)){t("a header without text");continue}break;case"context":if(!v(i.text)){t("a context block without text");continue}break;case"image":if(!i.url||!i.alt){t("an image without url or alt");continue}break;case"section":Array.isArray(i.fields)&&i.fields.length>_&&(t("more than "+_+" fields in a section"),i.fields=i.fields.slice(0,_));break;case"list":if(!Array.isArray(i.items)||i.items.length===0){t("a list without items");continue}i.items.length>T&&(t("more than "+T+" list items"),i.items=i.items.slice(0,T));break;case"actions":{const a=Array.isArray(i.elements)?i.elements:[],o=a.filter(s=>s&&s.action_id&&s.invoke&&v(s.text));if(o.length!==a.length&&t("an action without action_id, invoke or text"),o.length===0)continue;o.length>b&&t("more than "+b+" actions"),i.elements=o.slice(0,b);break}}n.push(i)}return n}function be(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/\s+/g," ").trim()}function y(e){if(!e||e<0)return"";const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function oe(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function L(e){return e?.split("@")?.[0]||e||""}function S(e){return e.map(t=>t.name).join(", ")}function se(e){return e==="meeting"?"Meeting":e==="video"?"Video call":"Audio call"}const m={VOICE_CALL_STARTED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek gestart",timeline:e=>e.direction==="inbound"?`Inbound call started — ${L(e.payload.from)}`:`Outbound call started — ${L(e.payload.to)}`},VOICE_CALL_ANSWERED:{shape:"event",channelKind:"voice",icon:"phone",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:(e,t)=>`Call answered — ${t}`},VOICE_CALL_HOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"In de wacht",timeline:(e,t)=>`Call on hold — ${t}`},VOICE_CALL_UNHOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Hervat"},VOICE_CALL_ENDED:{shape:"event",channelKind:"voice",icon:"phone",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${y(e.payload.duration)})`:""}`,timeline:e=>`Call ended${oe(e.payload.duration)}`},VOICE_CALL_MISSED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gemiste oproep",timeline:e=>`Missed call — ${L(e.payload.from)}`},VOICE_CALL_FAILED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek mislukt",timeline:()=>"Call failed"},VOICE_CALL_VOICEMAIL:{shape:"artifact",channelKind:"voice",icon:"phone",snippet:e=>e.payload.transcription?.trim()?e.payload.transcription:"Voicemail ontvangen"},VIDEO_CALL_STARTED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek gestart",timeline:()=>"Video call started"},VIDEO_CALL_ANSWERED:{shape:"event",channelKind:"video",icon:"video",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:()=>"Video call answered"},VIDEO_CALL_HOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"In de wacht"},VIDEO_CALL_UNHOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Hervat"},VIDEO_CALL_ENDED:{shape:"event",channelKind:"video",icon:"video",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${y(e.payload.duration)})`:""}`,timeline:()=>"Video call ended"},VIDEO_CALL_MISSED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gemiste oproep",timeline:()=>"Missed video call"},VIDEO_CALL_FAILED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek mislukt",timeline:()=>"Video call failed"},EMAIL_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.EMAIL_RECEIVED",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:ce},EMAIL_SENT:{shape:"message",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:ce},CHAT_MESSAGE_SENT:{shape:"message",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:e=>e.payload.text??""},CHAT_MESSAGE_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.CHAT_MESSAGE_RECEIVED",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:e=>e.payload.text??""},CHAT_MEMBER_JOINED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${S(e.payload.members)} toegevoegd`,timeline:e=>{const t=S(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · added by ${e.payload.initiator.name}`:"";return`${t} joined the chat${n}`}},CHAT_MEMBER_LEFT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${S(e.payload.members)} verlaten`,timeline:e=>{const t=S(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · removed by ${e.payload.initiator.name}`:"";return`${t} left the chat${n}`}},CHAT_RENAMED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Hernoemd naar "${e.payload.newName}"`,timeline:e=>`Chat renamed to "${e.payload.newName}"${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`},CHAT_CALL_STARTED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:()=>"Gesprek gestart",timeline:e=>`${se(e.payload.callType)} started${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`,joinUrl:e=>e.payload.joinUrl},CHAT_CALL_ENDED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${y(e.payload.duration)})`:""}`,timeline:e=>`${se(e.payload.callType)} ended${oe(e.payload.duration)}`,joinUrl:e=>e.payload.joinUrl},CHAT_EVENT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>e.payload.text??e.payload.eventType,timeline:e=>e.payload.text||e.payload.eventType},TRANSCRIPT_ADDED:{shape:"artifact",triggerable:!0,displayNameKey:"communication:activity.TRANSCRIPT_ADDED",component:"communication:TranscriptionActivity",icon:"captions",carriesText:!0,snippet:e=>(e.payload.segments??[]).map(t=>t.text).join(" ")},COMMENT_ADDED:{shape:"note",component:"communication:CommentActivity",icon:"sticky-note",carriesText:!0,snippet:e=>e.payload.text??""},FILE_UPLOADED:{shape:"artifact",component:"communication:FileActivity",icon:"paperclip",snippet:e=>`Bestand: ${e.payload.fileName}`},AI_MESSAGE_ADDED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.AI_MESSAGE_ADDED",icon:"circle",snippet:e=>e.payload.output?.text??e.payload.input?.text??"",timeline:()=>"AI message added"},AI_ACTION_PROPOSED:{shape:"event",component:"communication:ProposedActionCard",icon:"circle",playbookAuthored:!0,snippet:e=>`Voorstel wacht op goedkeuring (${e.payload.actions?.length??0} actie(s))`},PLAYBOOK_STARTED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:e=>`Playbook gestart${e.payload.playbookName?`: ${e.payload.playbookName}`:""}`,timeline:e=>`Playbook gestart${e.payload.playbookName?` — ${e.payload.playbookName}`:""}`},PLAYBOOK_COMPLETED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook afgerond",timeline:()=>"Playbook afgerond"},PLAYBOOK_ESCALATED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook geëscaleerd naar een mens",timeline:()=>"Playbook geëscaleerd naar een mens"},MEETING_SCHEDULED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering gepland: ${e.payload.title}`,timeline:()=>"Meeting scheduled",joinUrl:e=>e.payload.joinUrl},MEETING_STARTED:{shape:"event",icon:"calendar",connected:!0,snippet:e=>`Vergadering gestart: ${e.payload.title}`,timeline:()=>"Meeting started",joinUrl:e=>e.payload.joinUrl},MEETING_ENDED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering beëindigd${e.payload.duration?` (${y(e.payload.duration)})`:""}`,timeline:()=>"Meeting ended"},MEETING_PARTICIPANT_JOINED:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} deelgenomen`,timeline:(e,t)=>`${t} joined the meeting`},MEETING_PARTICIPANT_LEFT:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} verlaten`,timeline:(e,t)=>`${t} left the meeting`},INTERACTION_CREATED:{shape:"event",icon:"circle",snippet:()=>"Interactie aangemaakt",timeline:(e,t)=>`Interaction started by ${t}`},INTERACTION_STATUS_CHANGED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.INTERACTION_STATUS_CHANGED",icon:"circle-dot",snippet:e=>`Status: ${e.payload.fromStatus} → ${e.payload.toStatus}`,timeline:(e,t)=>`Status changed to ${e.payload.toStatus} by ${t}`},INTERACTION_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Interactie toegewezen",timeline:(e,t)=>`Assigned by ${t}`}};function ce(e){const t=e.payload,n=t.bodySnippet?.trim()||be(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function c(e){return m[e]}function qt(e){return c(e)?.icon??"circle"}function Jt(e){return c(e)?.channelKind}function W(e){return e==="message"||e==="note"}function Zt(e){return W(c(e)?.shape)}function Qt(e){return c(e)?.replyable===!0}function en(e){return c(e)?.carriesText===!0}function tn(e){return c(e)?.countsAs}function nn(e){return c(e)?.playbookAuthored===!0}function rn(e){return c(e)?.connected===!0}function an(e){const t=c(e);return t?.shape==="artifact"&&t?.carriesText===!0}function Ie(e){const t=c(e.type)?.snippet;return t?t(e):""}function on(e,t){const n=c(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function sn(e){const t=c(e.type)?.joinUrl;return t?t(e):void 0}function w(e,t){let n=e;for(const r of t.split(".")){if(n==null||typeof n!="object")return"";n=n[r]}return n==null?"":typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):""}function N(e,t,n){if(e===void 0)return null;if(typeof e=="string")return e||null;if("value"in e)return w(t,e.value)||null;const r={};for(const[a,o]of Object.entries(e.params??{}))r[a]=w(t,o);const i=n(e.key,r);return i===e.key?null:i}function Me(e,t){if(!e||typeof e=="string"||"value"in e)return null;const n={};for(const[r,i]of Object.entries(e.params??{}))n[r]=w(t,i);return{key:e.key,params:n}}const le=140;function cn(e){const t=e.trim();return t.length<=le?t:t.slice(0,le-1).trimEnd()+"…"}function ln(e,t){const n=Me(t?.text,e),r=t?N(t.text,e,i=>i):null;return{activityId:e.id,type:e.type,snippet:cn(r??Ie(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}const un=e=>e;function ue(e){const t=m[e];return{type:e,shape:t.shape,channelKind:t.channelKind,icon:t.icon,replyable:t.replyable===!0,countsAs:t.countsAs,carriesText:t.carriesText===!0,triggerable:t.triggerable===!0,component:t.component,builtIn:!0,displayNameKey:t.displayNameKey}}function de(e){return{type:e.type,shape:e.shape,channelKind:e.channelKind,icon:e.icon||"circle",replyable:e.replyable===!0,countsAs:e.countsAs,carriesText:e.carriesText===!0,triggerable:e.triggerable===!0,component:e.component,builtIn:!1,displayNameKey:e.displayNameKey}}class Ce{constructor(t=[],n=un){this.translate=n;for(const r of t)r?.type&&(r.type in m||this.declared.has(r.type)||this.declared.set(r.type,r))}declared=new Map;get(t){if(t in m)return ue(t);const n=this.declared.get(t);return n?de(n):void 0}triggerable(){const t=Object.keys(m).filter(r=>m[r].triggerable).map(ue),n=[...this.declared.values()].map(de).filter(r=>r.triggerable);return[...t,...n]}timelineText(t,n){const r=m[t.type];if(r?.timeline)return r.timeline(t,n);const i=this.declared.get(t.type);return N(i?.text,t,this.translate)??t.type.replace(/_/g," ").toLowerCase()}snippet(t){const n=m[t.type];if(n?.snippet)return n.snippet(t);const r=this.declared.get(t.type);return N(r?.text,t,this.translate)??""}descriptor(t){return this.declared.get(t)}blocks(t){const n=this.declared.get(t)?.render;return n?.length?n:void 0}isMessage(t){return W(this.get(t)?.shape)}isReplyable(t){return this.get(t)?.replyable===!0}carriesText(t){return this.get(t)?.carriesText===!0}countsAs(t){return this.get(t)?.countsAs}channelKind(t){return this.get(t)?.channelKind}isTranscript(t){const n=this.get(t);return n?.shape==="artifact"&&n.carriesText}get translator(){return this.translate}}const dn=new Ce;function pn(e,t,n=[]){const r=e.createdAt;if(!r)return[];const i=new Set(n);return e.author.type==="user"&&e.author.id&&i.add(e.author.id),Object.entries(t).filter(([a,o])=>o>=r&&!i.has(a)).map(([a])=>a)}function fn(e){return e.createdAt??0}function mn(e){return e.type==="EMAIL_RECEIVED"||e.type==="EMAIL_SENT"}function gn(e){return e.type==="CHAT_MESSAGE_SENT"||e.type==="CHAT_MESSAGE_RECEIVED"}const X=[{id:"openai",attachmentKinds:["image","pdf"],label:"OpenAI",capabilities:["chat","transcription","embedding"],defaultModel:"gpt-5-mini",baseUrl:"https://api.openai.com/v1"},{id:"gemini",attachmentKinds:["image","pdf"],label:"Google Gemini",capabilities:["chat","transcription","embedding"],defaultModel:"gemini-3.5-flash",baseUrl:"https://generativelanguage.googleapis.com/v1beta"},{id:"anthropic",attachmentKinds:["image","pdf"],label:"Anthropic",capabilities:["chat"],defaultModel:"claude-haiku-4-5",baseUrl:"https://api.anthropic.com/v1"},{id:"elevenlabs",label:"ElevenLabs",capabilities:["transcription"],baseUrl:"https://api.elevenlabs.io/v1"},{id:"moonshot",label:"Moonshot (Kimi)",capabilities:["chat"],defaultModel:"kimi-k3",baseUrl:"https://api.moonshot.ai/v1"},{id:"deepseek",label:"DeepSeek",capabilities:["chat"],defaultModel:"deepseek-v4-flash",baseUrl:"https://api.deepseek.com/v1"},{id:"groq",label:"Groq",capabilities:["chat"],defaultModel:"openai/gpt-oss-120b",baseUrl:"https://api.groq.com/openai/v1"},{id:"mistral",label:"Mistral",capabilities:["chat"],defaultModel:"mistral-large-latest",baseUrl:"https://api.mistral.ai/v1"},{id:"openrouter",label:"OpenRouter",capabilities:["chat"],defaultModel:"openrouter/auto",baseUrl:"https://openrouter.ai/api/v1"},{id:"ollama",label:"Ollama (self-hosted)",capabilities:["chat"],defaultModel:"llama3.3"},{id:"openai-compatible",label:"OpenAI-compatible (eigen endpoint)",capabilities:["chat"],defaultModel:"default"}];function E(e){return X.find(t=>t.id===e)}function hn(e){return E(e)?.label??e}function En(e,t="gpt-5-mini"){return E(e)?.defaultModel??t}function An(e){return X.filter(t=>t.capabilities.includes(e))}function yn(e){const t=E(e);return!!t&&!t.baseUrl}function Sn(e,t){return t==="text"?!0:E(e)?.attachmentKinds?.includes(t)===!0}function _n(e,t){if(!e.enabled)return"ok";const n=P(e.hardLimitNanos),r=P(e.softLimitNanos);return n!==void 0&&t>=n?"hard":r!==void 0&&t>=r?"soft":"ok"}function P(e){return typeof e=="number"?e:void 0}function we(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function Tn(e,t="month"){const n=new Date(we(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}function bn(e){return e?.listeningEnabled!==!1}function In(e){const t=[];for(const n of Object.keys(e))for(const r of Object.keys(e[n]))t.push({lang:n,key:r,value:e[n][r]});return t}const Mn=[{id:"agent",label:"Agent",labelSource:"user"},{id:"team",label:"Team",labelSource:"team"},{id:"inbox",label:"Inbox",labelSource:"inbox"},{id:"channel",label:"Kanaal",labelSource:"channel"},{id:"provider",label:"Provider",labelSource:"raw"},{id:"status",label:"Status",labelSource:"raw"},{id:"handledBy",label:"Afhandelaar",labelSource:"raw"},{id:"time",label:"Tijd",labelSource:"raw"}];function x(e){return e<10?`0${e}`:`${e}`}function Ne(e,t){const n=new Date(e),r=`${n.getUTCFullYear()}-${x(n.getUTCMonth()+1)}-${x(n.getUTCDate())}`;return t==="day"?r:`${r}T${x(n.getUTCHours())}`}function Oe(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const Cn=36e5,wn=864e5;function Nn(e,t,n){const r=n==="hour"?Cn:wn,i=[];for(let a=Oe(e,n);a<=t;a+=r)i.push(Ne(a,n));return i}const ke=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],Re=ke.map(e=>e.id);function ve(e,t){return`${e}.usage.${t}`}function On(e,t){return t.map(n=>({id:ve(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...Re,...n.extraDimensions??[],"time"]}))}const Le=new Set(["info","success","warning","destructive"]),$=200,K=100,U=200,B=12,F=4,z=4e3,I=500,kn=256*1024,Rn=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),xe=["http:","https:","mailto:","tel:"],vn=/^[a-z][a-z0-9+.-]*:/i;function De(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=vn.exec(t)?.[0];return n?xe.includes(n.toLowerCase()):!t.startsWith("//")}const Ln=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function xn(e){let t="",n=0;for(;n<e.length;){const r=e[n]==="!"&&e[n+1]==="[";if(e[n]!=="["&&!r){t+=e[n],n+=1;continue}const i=n+(r?2:1),a=pe(e,i,"[","]");if(a<0||e[a+1]!=="("){t+=e[n],n+=1;continue}const o=pe(e,a+2,"(",")");if(o<0){t+=e[n],n+=1;continue}const s=e.slice(i,a),l=e.slice(a+2,o).trim().split(/\s+/)[0]??"";t+=r||!De(l)?s:e.slice(n,o+1),n=o+1}return t}function pe(e,t,n,r){let i=1;for(let a=t;a<e.length;a+=1){if(e[a]==="\\"){a+=1;continue}if(e[a]===n)i+=1;else if(e[a]===r&&(i-=1,i===0))return a}return-1}function Pe(e){return xn(e).replace(Ln,(t,n,r)=>De(r)?t:"")}function d(e,t=z){return typeof e=="string"?Pe(e).slice(0,t):""}function Dn(e,t=z){return typeof e=="string"?e.slice(0,t):""}function Pn(e,t="info"){return typeof e=="string"&&Le.has(e)?e:t}function $n(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=$){t("more than "+$+" blocks; the rest was dropped");break}if(!r||typeof r!="object")continue;const i=r;if(!Rn.has(i.type)){t("unknown block type "+String(i.type));continue}const a=typeof i.block_id=="string"?{block_id:i.block_id}:{};switch(i.type){case"heading":{const o=d(i.text);if(!o){t("a heading without text");continue}const s=i.level===2||i.level===3?i.level:1;n.push({...a,type:"heading",level:s,text:o});break}case"paragraph":{const o=d(i.text);if(!o){t("a paragraph without text");continue}n.push({...a,type:"paragraph",text:o});break}case"quote":{const o=d(i.text);if(!o){t("a quote without text");continue}n.push({...a,type:"quote",text:o});break}case"code":{const o=Dn(i.text);if(!o){t("a code block without text");continue}const s=typeof i.lang=="string"?{lang:i.lang.slice(0,32)}:{};n.push({...a,type:"code",...s,text:o});break}case"divider":n.push({...a,type:"divider"});break;case"list":{const o=Array.isArray(i.items)?i.items:[],s=[];for(const p of o){if(s.length>=K){t("more than "+K+" list items");break}const f=d(p?.text);if(!f)continue;const u=d(p?.lead,200);s.push(u?{lead:u,text:f}:{text:f})}if(s.length===0){t("a list without usable items");continue}const l=i.style==="numbered"?"numbered":"bulleted";n.push({...a,type:"list",style:l,items:s});break}case"table":{const o=Array.isArray(i.columns)?i.columns:[],s=[];for(const u of o){if(s.length>=B){t("more than "+B+" table columns");break}const A=d(u?.label,I),R=u?.align==="right"?"right":void 0;s.push(R?{label:A,align:R}:{label:A})}if(s.length===0){t("a table without columns");continue}const l=Array.isArray(i.rows)?i.rows:[],p=[];for(const u of l){if(p.length>=U){t("more than "+U+" table rows");break}const A=Array.isArray(u)?u:[];p.push(s.map((R,Xt)=>d(A[Xt],I)))}const f=d(i.caption,I);n.push({...a,type:"table",columns:s,rows:p,...f?{caption:f}:{}});break}case"kpi":{const o=Array.isArray(i.items)?i.items:[],s=[];for(const l of o){if(s.length>=F){t("more than "+F+" kpi items");break}const p=d(l?.value,40),f=d(l?.label,80);if(!p||!f)continue;const u=l?.tone;s.push(typeof u=="string"&&Le.has(u)?{value:p,label:f,tone:u}:{value:p,label:f})}if(s.length===0){t("a kpi block without usable items");continue}n.push({...a,type:"kpi",items:s});break}case"callout":{const o=d(i.text);if(!o){t("a callout without text");continue}const s=d(i.title,200);n.push({...a,type:"callout",tone:Pn(i.tone),...s?{title:s}:{},text:o});break}}}return n}function Kn(e){return JSON.stringify(e).length}function Un(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function fe(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function me(e,t,n){const r=e.map((i,a)=>n?.[a]==="right"?"---:":"---");return[`| ${e.map(fe).join(" | ")} |`,`| ${r.join(" | ")} |`,...t.map(i=>`| ${i.map(fe).join(" | ")} |`)]}function Bn(e){switch(e.type){case"heading":return[`${"#".repeat(e.level)} ${e.text}`];case"paragraph":return[e.text];case"quote":return e.text.split(/\r?\n/).map(t=>`> ${t}`);case"code":return[`\`\`\`${e.lang??""}`,e.text,"```"];case"divider":return["---"];case"list":return e.items.map((t,n)=>{const r=e.style==="numbered"?`${n+1}.`:"-";return t.lead?`${r} **${t.lead}** ${t.text}`:`${r} ${t.text}`});case"table":{const t=me(e.columns.map(n=>n.label),e.rows,e.columns.map(n=>n.align??"left"));return e.caption?[...t,"",`*${e.caption}*`]:t}case"kpi":return me(e.items.map(t=>t.value),[e.items.map(t=>t.label)]);case"callout":return(e.title?`**${e.title}** ${e.text}`:e.text).split(/\r?\n/).map(n=>`> ${n}`)}}function Fn(e,t){const n=[],r=e.some(i=>i.type==="heading"&&i.level===1);t&&!r&&n.push(`# ${t}`);for(const i of e){const a=Bn(i);a.length>0&&n.push(a.join(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=10,_=10,T=10,b=5,zt=new Set(["header","section","context","divider","image","list","actions","attachments"]);function v(e){if(typeof e=="string")return e.length>0;if(!e||typeof e!="object")return!1;const t=e;return typeof t.key=="string"||typeof t.value=="string"}function Yt(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=D){t("more than "+D+" blocks; the rest was dropped");break}if(!r||typeof r!="object")continue;const i=r;if(!zt.has(i.type)){t("unknown block type "+String(i.type));continue}switch(i.type){case"header":if(!v(i.text)){t("a header without text");continue}break;case"context":if(!v(i.text)){t("a context block without text");continue}break;case"image":if(!i.url||!i.alt){t("an image without url or alt");continue}break;case"section":Array.isArray(i.fields)&&i.fields.length>_&&(t("more than "+_+" fields in a section"),i.fields=i.fields.slice(0,_));break;case"list":if(!Array.isArray(i.items)||i.items.length===0){t("a list without items");continue}i.items.length>T&&(t("more than "+T+" list items"),i.items=i.items.slice(0,T));break;case"actions":{const a=Array.isArray(i.elements)?i.elements:[],o=a.filter(s=>s&&s.action_id&&s.invoke&&v(s.text));if(o.length!==a.length&&t("an action without action_id, invoke or text"),o.length===0)continue;o.length>b&&t("more than "+b+" actions"),i.elements=o.slice(0,b);break}}n.push(i)}return n}function be(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/\s+/g," ").trim()}function y(e){if(!e||e<0)return"";const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function oe(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function L(e){return e?.split("@")?.[0]||e||""}function S(e){return e.map(t=>t.name).join(", ")}function se(e){return e==="meeting"?"Meeting":e==="video"?"Video call":"Audio call"}const m={VOICE_CALL_STARTED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek gestart",timeline:e=>e.direction==="inbound"?`Inbound call started — ${L(e.payload.from)}`:`Outbound call started — ${L(e.payload.to)}`},VOICE_CALL_ANSWERED:{shape:"event",channelKind:"voice",icon:"phone",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:(e,t)=>`Call answered — ${t}`},VOICE_CALL_HOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"In de wacht",timeline:(e,t)=>`Call on hold — ${t}`},VOICE_CALL_UNHOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Hervat"},VOICE_CALL_ENDED:{shape:"event",channelKind:"voice",icon:"phone",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${y(e.payload.duration)})`:""}`,timeline:e=>`Call ended${oe(e.payload.duration)}`},VOICE_CALL_MISSED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gemiste oproep",timeline:e=>`Missed call — ${L(e.payload.from)}`},VOICE_CALL_FAILED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek mislukt",timeline:()=>"Call failed"},VOICE_CALL_VOICEMAIL:{shape:"artifact",channelKind:"voice",icon:"phone",snippet:e=>e.payload.transcription?.trim()?e.payload.transcription:"Voicemail ontvangen"},VIDEO_CALL_STARTED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek gestart",timeline:()=>"Video call started"},VIDEO_CALL_ANSWERED:{shape:"event",channelKind:"video",icon:"video",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:()=>"Video call answered"},VIDEO_CALL_HOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"In de wacht"},VIDEO_CALL_UNHOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Hervat"},VIDEO_CALL_ENDED:{shape:"event",channelKind:"video",icon:"video",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${y(e.payload.duration)})`:""}`,timeline:()=>"Video call ended"},VIDEO_CALL_MISSED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gemiste oproep",timeline:()=>"Missed video call"},VIDEO_CALL_FAILED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek mislukt",timeline:()=>"Video call failed"},EMAIL_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.EMAIL_RECEIVED",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:ce},EMAIL_SENT:{shape:"message",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:ce},CHAT_MESSAGE_SENT:{shape:"message",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:e=>e.payload.text??""},CHAT_MESSAGE_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.CHAT_MESSAGE_RECEIVED",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:e=>e.payload.text??""},CHAT_MEMBER_JOINED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${S(e.payload.members)} toegevoegd`,timeline:e=>{const t=S(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · added by ${e.payload.initiator.name}`:"";return`${t} joined the chat${n}`}},CHAT_MEMBER_LEFT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${S(e.payload.members)} verlaten`,timeline:e=>{const t=S(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · removed by ${e.payload.initiator.name}`:"";return`${t} left the chat${n}`}},CHAT_RENAMED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Hernoemd naar "${e.payload.newName}"`,timeline:e=>`Chat renamed to "${e.payload.newName}"${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`},CHAT_CALL_STARTED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:()=>"Gesprek gestart",timeline:e=>`${se(e.payload.callType)} started${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`,joinUrl:e=>e.payload.joinUrl},CHAT_CALL_ENDED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${y(e.payload.duration)})`:""}`,timeline:e=>`${se(e.payload.callType)} ended${oe(e.payload.duration)}`,joinUrl:e=>e.payload.joinUrl},CHAT_EVENT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>e.payload.text??e.payload.eventType,timeline:e=>e.payload.text||e.payload.eventType},TRANSCRIPT_ADDED:{shape:"artifact",triggerable:!0,displayNameKey:"communication:activity.TRANSCRIPT_ADDED",component:"communication:TranscriptionActivity",icon:"captions",carriesText:!0,snippet:e=>(e.payload.segments??[]).map(t=>t.text).join(" ")},COMMENT_ADDED:{shape:"note",component:"communication:CommentActivity",icon:"sticky-note",carriesText:!0,snippet:e=>e.payload.text??""},FILE_UPLOADED:{shape:"artifact",component:"communication:FileActivity",icon:"paperclip",snippet:e=>`Bestand: ${e.payload.fileName}`},AI_MESSAGE_ADDED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.AI_MESSAGE_ADDED",icon:"circle",snippet:e=>e.payload.output?.text??e.payload.input?.text??"",timeline:()=>"AI message added"},AI_ACTION_PROPOSED:{shape:"event",component:"communication:ProposedActionCard",icon:"circle",playbookAuthored:!0,snippet:e=>`Voorstel wacht op goedkeuring (${e.payload.actions?.length??0} actie(s))`},PLAYBOOK_STARTED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:e=>`Playbook gestart${e.payload.playbookName?`: ${e.payload.playbookName}`:""}`,timeline:e=>`Playbook gestart${e.payload.playbookName?` — ${e.payload.playbookName}`:""}`},PLAYBOOK_COMPLETED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook afgerond",timeline:()=>"Playbook afgerond"},PLAYBOOK_ESCALATED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook geëscaleerd naar een mens",timeline:()=>"Playbook geëscaleerd naar een mens"},MEETING_SCHEDULED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering gepland: ${e.payload.title}`,timeline:()=>"Meeting scheduled",joinUrl:e=>e.payload.joinUrl},MEETING_STARTED:{shape:"event",icon:"calendar",connected:!0,snippet:e=>`Vergadering gestart: ${e.payload.title}`,timeline:()=>"Meeting started",joinUrl:e=>e.payload.joinUrl},MEETING_ENDED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering beëindigd${e.payload.duration?` (${y(e.payload.duration)})`:""}`,timeline:()=>"Meeting ended"},MEETING_PARTICIPANT_JOINED:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} deelgenomen`,timeline:(e,t)=>`${t} joined the meeting`},MEETING_PARTICIPANT_LEFT:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} verlaten`,timeline:(e,t)=>`${t} left the meeting`},INTERACTION_CREATED:{shape:"event",icon:"circle",snippet:()=>"Interactie aangemaakt",timeline:(e,t)=>`Interaction started by ${t}`},INTERACTION_STATUS_CHANGED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.INTERACTION_STATUS_CHANGED",icon:"circle-dot",snippet:e=>`Status: ${e.payload.fromStatus} → ${e.payload.toStatus}`,timeline:(e,t)=>`Status changed to ${e.payload.toStatus} by ${t}`},INTERACTION_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Interactie toegewezen",timeline:(e,t)=>`Assigned by ${t}`},WORK_COMMENT_ADDED:{shape:"note",icon:"sticky-note",carriesText:!0,snippet:()=>"Reactie"},WORK_ITEM_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Taak toegewezen",timeline:(e,t)=>`Assigned by ${t}`}};function ce(e){const t=e.payload,n=t.bodySnippet?.trim()||be(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function c(e){return m[e]}function qt(e){return c(e)?.icon??"circle"}function Jt(e){return c(e)?.channelKind}function H(e){return e==="message"||e==="note"}function Zt(e){return H(c(e)?.shape)}function Qt(e){return c(e)?.replyable===!0}function en(e){return c(e)?.carriesText===!0}function tn(e){return c(e)?.countsAs}function nn(e){return c(e)?.playbookAuthored===!0}function rn(e){return c(e)?.connected===!0}function an(e){const t=c(e);return t?.shape==="artifact"&&t?.carriesText===!0}function Ie(e){const t=c(e.type)?.snippet;return t?t(e):""}function on(e,t){const n=c(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function sn(e){const t=c(e.type)?.joinUrl;return t?t(e):void 0}function w(e,t){let n=e;for(const r of t.split(".")){if(n==null||typeof n!="object")return"";n=n[r]}return n==null?"":typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):""}function N(e,t,n){if(e===void 0)return null;if(typeof e=="string")return e||null;if("value"in e)return w(t,e.value)||null;const r={};for(const[a,o]of Object.entries(e.params??{}))r[a]=w(t,o);const i=n(e.key,r);return i===e.key?null:i}function Me(e,t){if(!e||typeof e=="string"||"value"in e)return null;const n={};for(const[r,i]of Object.entries(e.params??{}))n[r]=w(t,i);return{key:e.key,params:n}}const le=140;function cn(e){const t=e.trim();return t.length<=le?t:t.slice(0,le-1).trimEnd()+"…"}function ln(e,t){const n=Me(t?.text,e),r=t?N(t.text,e,i=>i):null;return{activityId:e.id,type:e.type,snippet:cn(r??Ie(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}const un=e=>e;function ue(e){const t=m[e];return{type:e,shape:t.shape,channelKind:t.channelKind,icon:t.icon,replyable:t.replyable===!0,countsAs:t.countsAs,carriesText:t.carriesText===!0,triggerable:t.triggerable===!0,component:t.component,builtIn:!0,displayNameKey:t.displayNameKey}}function de(e){return{type:e.type,shape:e.shape,channelKind:e.channelKind,icon:e.icon||"circle",replyable:e.replyable===!0,countsAs:e.countsAs,carriesText:e.carriesText===!0,triggerable:e.triggerable===!0,component:e.component,builtIn:!1,displayNameKey:e.displayNameKey}}class Ce{constructor(t=[],n=un){this.translate=n;for(const r of t)r?.type&&(r.type in m||this.declared.has(r.type)||this.declared.set(r.type,r))}declared=new Map;get(t){if(t in m)return ue(t);const n=this.declared.get(t);return n?de(n):void 0}triggerable(){const t=Object.keys(m).filter(r=>m[r].triggerable).map(ue),n=[...this.declared.values()].map(de).filter(r=>r.triggerable);return[...t,...n]}timelineText(t,n){const r=m[t.type];if(r?.timeline)return r.timeline(t,n);const i=this.declared.get(t.type);return N(i?.text,t,this.translate)??t.type.replace(/_/g," ").toLowerCase()}snippet(t){const n=m[t.type];if(n?.snippet)return n.snippet(t);const r=this.declared.get(t.type);return N(r?.text,t,this.translate)??""}descriptor(t){return this.declared.get(t)}blocks(t){const n=this.declared.get(t)?.render;return n?.length?n:void 0}isMessage(t){return H(this.get(t)?.shape)}isReplyable(t){return this.get(t)?.replyable===!0}carriesText(t){return this.get(t)?.carriesText===!0}countsAs(t){return this.get(t)?.countsAs}channelKind(t){return this.get(t)?.channelKind}isTranscript(t){const n=this.get(t);return n?.shape==="artifact"&&n.carriesText}get translator(){return this.translate}}const dn=new Ce;function pn(e,t,n=[]){const r=e.createdAt;if(!r)return[];const i=new Set(n);return e.author.type==="user"&&e.author.id&&i.add(e.author.id),Object.entries(t).filter(([a,o])=>o>=r&&!i.has(a)).map(([a])=>a)}function fn(e){return e.createdAt??0}function mn(e){return e.type==="EMAIL_RECEIVED"||e.type==="EMAIL_SENT"}function gn(e){return e.type==="CHAT_MESSAGE_SENT"||e.type==="CHAT_MESSAGE_RECEIVED"}const X=[{id:"openai",attachmentKinds:["image","pdf"],label:"OpenAI",capabilities:["chat","transcription","embedding"],defaultModel:"gpt-5-mini",baseUrl:"https://api.openai.com/v1"},{id:"gemini",attachmentKinds:["image","pdf"],label:"Google Gemini",capabilities:["chat","transcription","embedding"],defaultModel:"gemini-3.5-flash",baseUrl:"https://generativelanguage.googleapis.com/v1beta"},{id:"anthropic",attachmentKinds:["image","pdf"],label:"Anthropic",capabilities:["chat"],defaultModel:"claude-haiku-4-5",baseUrl:"https://api.anthropic.com/v1"},{id:"elevenlabs",label:"ElevenLabs",capabilities:["transcription"],baseUrl:"https://api.elevenlabs.io/v1"},{id:"moonshot",label:"Moonshot (Kimi)",capabilities:["chat"],defaultModel:"kimi-k3",baseUrl:"https://api.moonshot.ai/v1"},{id:"deepseek",label:"DeepSeek",capabilities:["chat"],defaultModel:"deepseek-v4-flash",baseUrl:"https://api.deepseek.com/v1"},{id:"groq",label:"Groq",capabilities:["chat"],defaultModel:"openai/gpt-oss-120b",baseUrl:"https://api.groq.com/openai/v1"},{id:"mistral",label:"Mistral",capabilities:["chat"],defaultModel:"mistral-large-latest",baseUrl:"https://api.mistral.ai/v1"},{id:"openrouter",label:"OpenRouter",capabilities:["chat"],defaultModel:"openrouter/auto",baseUrl:"https://openrouter.ai/api/v1"},{id:"ollama",label:"Ollama (self-hosted)",capabilities:["chat"],defaultModel:"llama3.3"},{id:"openai-compatible",label:"OpenAI-compatible (eigen endpoint)",capabilities:["chat"],defaultModel:"default"}];function E(e){return X.find(t=>t.id===e)}function hn(e){return E(e)?.label??e}function En(e,t="gpt-5-mini"){return E(e)?.defaultModel??t}function An(e){return X.filter(t=>t.capabilities.includes(e))}function yn(e){const t=E(e);return!!t&&!t.baseUrl}function Sn(e,t){return t==="text"?!0:E(e)?.attachmentKinds?.includes(t)===!0}function _n(e,t){if(!e.enabled)return"ok";const n=P(e.hardLimitNanos),r=P(e.softLimitNanos);return n!==void 0&&t>=n?"hard":r!==void 0&&t>=r?"soft":"ok"}function P(e){return typeof e=="number"?e:void 0}function we(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function Tn(e,t="month"){const n=new Date(we(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}function bn(e){return e?.listeningEnabled!==!1}function In(e){const t=[];for(const n of Object.keys(e))for(const r of Object.keys(e[n]))t.push({lang:n,key:r,value:e[n][r]});return t}const Mn=[{id:"agent",label:"Agent",labelSource:"user"},{id:"team",label:"Team",labelSource:"team"},{id:"inbox",label:"Inbox",labelSource:"inbox"},{id:"channel",label:"Kanaal",labelSource:"channel"},{id:"provider",label:"Provider",labelSource:"raw"},{id:"status",label:"Status",labelSource:"raw"},{id:"handledBy",label:"Afhandelaar",labelSource:"raw"},{id:"time",label:"Tijd",labelSource:"raw"}];function x(e){return e<10?`0${e}`:`${e}`}function Ne(e,t){const n=new Date(e),r=`${n.getUTCFullYear()}-${x(n.getUTCMonth()+1)}-${x(n.getUTCDate())}`;return t==="day"?r:`${r}T${x(n.getUTCHours())}`}function Oe(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const Cn=36e5,wn=864e5;function Nn(e,t,n){const r=n==="hour"?Cn:wn,i=[];for(let a=Oe(e,n);a<=t;a+=r)i.push(Ne(a,n));return i}const ke=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],Re=ke.map(e=>e.id);function ve(e,t){return`${e}.usage.${t}`}function On(e,t){return t.map(n=>({id:ve(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...Re,...n.extraDimensions??[],"time"]}))}const Le=new Set(["info","success","warning","destructive"]),K=200,$=100,U=200,B=12,F=4,z=4e3,I=500,kn=256*1024,Rn=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),xe=["http:","https:","mailto:","tel:"],vn=/^[a-z][a-z0-9+.-]*:/i;function De(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=vn.exec(t)?.[0];return n?xe.includes(n.toLowerCase()):!t.startsWith("//")}const Ln=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function xn(e){let t="",n=0;for(;n<e.length;){const r=e[n]==="!"&&e[n+1]==="[";if(e[n]!=="["&&!r){t+=e[n],n+=1;continue}const i=n+(r?2:1),a=pe(e,i,"[","]");if(a<0||e[a+1]!=="("){t+=e[n],n+=1;continue}const o=pe(e,a+2,"(",")");if(o<0){t+=e[n],n+=1;continue}const s=e.slice(i,a),l=e.slice(a+2,o).trim().split(/\s+/)[0]??"";t+=r||!De(l)?s:e.slice(n,o+1),n=o+1}return t}function pe(e,t,n,r){let i=1;for(let a=t;a<e.length;a+=1){if(e[a]==="\\"){a+=1;continue}if(e[a]===n)i+=1;else if(e[a]===r&&(i-=1,i===0))return a}return-1}function Pe(e){return xn(e).replace(Ln,(t,n,r)=>De(r)?t:"")}function d(e,t=z){return typeof e=="string"?Pe(e).slice(0,t):""}function Dn(e,t=z){return typeof e=="string"?e.slice(0,t):""}function Pn(e,t="info"){return typeof e=="string"&&Le.has(e)?e:t}function Kn(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=K){t("more than "+K+" blocks; the rest was dropped");break}if(!r||typeof r!="object")continue;const i=r;if(!Rn.has(i.type)){t("unknown block type "+String(i.type));continue}const a=typeof i.block_id=="string"?{block_id:i.block_id}:{};switch(i.type){case"heading":{const o=d(i.text);if(!o){t("a heading without text");continue}const s=i.level===2||i.level===3?i.level:1;n.push({...a,type:"heading",level:s,text:o});break}case"paragraph":{const o=d(i.text);if(!o){t("a paragraph without text");continue}n.push({...a,type:"paragraph",text:o});break}case"quote":{const o=d(i.text);if(!o){t("a quote without text");continue}n.push({...a,type:"quote",text:o});break}case"code":{const o=Dn(i.text);if(!o){t("a code block without text");continue}const s=typeof i.lang=="string"?{lang:i.lang.slice(0,32)}:{};n.push({...a,type:"code",...s,text:o});break}case"divider":n.push({...a,type:"divider"});break;case"list":{const o=Array.isArray(i.items)?i.items:[],s=[];for(const p of o){if(s.length>=$){t("more than "+$+" list items");break}const f=d(p?.text);if(!f)continue;const u=d(p?.lead,200);s.push(u?{lead:u,text:f}:{text:f})}if(s.length===0){t("a list without usable items");continue}const l=i.style==="numbered"?"numbered":"bulleted";n.push({...a,type:"list",style:l,items:s});break}case"table":{const o=Array.isArray(i.columns)?i.columns:[],s=[];for(const u of o){if(s.length>=B){t("more than "+B+" table columns");break}const A=d(u?.label,I),R=u?.align==="right"?"right":void 0;s.push(R?{label:A,align:R}:{label:A})}if(s.length===0){t("a table without columns");continue}const l=Array.isArray(i.rows)?i.rows:[],p=[];for(const u of l){if(p.length>=U){t("more than "+U+" table rows");break}const A=Array.isArray(u)?u:[];p.push(s.map((R,Xt)=>d(A[Xt],I)))}const f=d(i.caption,I);n.push({...a,type:"table",columns:s,rows:p,...f?{caption:f}:{}});break}case"kpi":{const o=Array.isArray(i.items)?i.items:[],s=[];for(const l of o){if(s.length>=F){t("more than "+F+" kpi items");break}const p=d(l?.value,40),f=d(l?.label,80);if(!p||!f)continue;const u=l?.tone;s.push(typeof u=="string"&&Le.has(u)?{value:p,label:f,tone:u}:{value:p,label:f})}if(s.length===0){t("a kpi block without usable items");continue}n.push({...a,type:"kpi",items:s});break}case"callout":{const o=d(i.text);if(!o){t("a callout without text");continue}const s=d(i.title,200);n.push({...a,type:"callout",tone:Pn(i.tone),...s?{title:s}:{},text:o});break}}}return n}function $n(e){return JSON.stringify(e).length}function Un(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function fe(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function me(e,t,n){const r=e.map((i,a)=>n?.[a]==="right"?"---:":"---");return[`| ${e.map(fe).join(" | ")} |`,`| ${r.join(" | ")} |`,...t.map(i=>`| ${i.map(fe).join(" | ")} |`)]}function Bn(e){switch(e.type){case"heading":return[`${"#".repeat(e.level)} ${e.text}`];case"paragraph":return[e.text];case"quote":return e.text.split(/\r?\n/).map(t=>`> ${t}`);case"code":return[`\`\`\`${e.lang??""}`,e.text,"```"];case"divider":return["---"];case"list":return e.items.map((t,n)=>{const r=e.style==="numbered"?`${n+1}.`:"-";return t.lead?`${r} **${t.lead}** ${t.text}`:`${r} ${t.text}`});case"table":{const t=me(e.columns.map(n=>n.label),e.rows,e.columns.map(n=>n.align??"left"));return e.caption?[...t,"",`*${e.caption}*`]:t}case"kpi":return me(e.items.map(t=>t.value),[e.items.map(t=>t.label)]);case"callout":return(e.title?`**${e.title}** ${e.text}`:e.text).split(/\r?\n/).map(n=>`> ${n}`)}}function Fn(e,t){const n=[],r=e.some(i=>i.type==="heading"&&i.level===1);t&&!r&&n.push(`# ${t}`);for(const i of e){const a=Bn(i);a.length>0&&n.push(a.join(`
|
|
2
2
|
`))}return`${n.join(`
|
|
3
3
|
|
|
4
4
|
`)}
|
|
5
|
-
`}const Y=e=>`user:${e}`,q=e=>`team:${e}`;function Gn(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(Y(n.id)),n.kind==="team"&&t.add(q(n.id)));return[...t].sort()}function jn(e,t){return[Y(e),...t.map(q)]}function
|
|
5
|
+
`}const Y=e=>`user:${e}`,q=e=>`team:${e}`;function Gn(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(Y(n.id)),n.kind==="team"&&t.add(q(n.id)));return[...t].sort()}function jn(e,t){return[Y(e),...t.map(q)]}function Wn(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}const Ke=["done","escalated"];function Vn(e){return Ke.includes(e)}const $e="assignment";function Hn(e){return`${$e}:${e}`}function Xn(e,t,n){if(e.direction==="inbound")return!0;if(e.author?.type==="user"&&e.author.id===t)return!1;const r=e.payload?.mentions;return Array.isArray(r)&&r.includes(t)?!0:n==="reply"}function zn(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}const Ue=12;function Yn(e,t,n=Ue){const r=t+1;return e?e.kind==="done"?{status:"done",waitingOn:null,turns:r,reason:e.note}:e.kind==="escalate"?{status:"escalated",waitingOn:null,turns:r,reason:e.reason}:r>=n?{status:"escalated",waitingOn:null,turns:r,reason:`na ${n} beurten nog niet afgerond, dus een mens neemt het over`}:{status:"waiting",waitingOn:e.on,turns:r}:{status:"escalated",waitingOn:null,turns:r,reason:"de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"}}const qn=new Set(["mail","message"]);function Be(e,t){const n=e.settings?.signatures?.[t];return!n||!n.enabled||!n.body||n.body.trim()===""?null:n}function Jn(e,t,n,r="html"){if(!e)return n;const i=Be(e,t);return i?`${n}${r==="text"?`
|
|
6
6
|
|
|
7
|
-
`:t==="mail"?"<br><br>-- <br>":"<br><br>"}${i.body}`:n}function Zn(e){return e.endpoints??[]}const Qn=e=>!!e.assignedUserId||!!e.assignedInboxId,er=e=>e.status==="closed",tr=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,nr=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function rr(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}function ir(e,t){const n=e.labels??[];return n.find(r=>r.locale===t)?.label??n[0]?.label??e.url}function ar(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)??(n?r.find(i=>i.locale===n):void 0)??{locale:t}}const G=[{code:"nl",label:"Nederlands",english:"Dutch"},{code:"en",label:"English",english:"English"},{code:"de",label:"Deutsch",english:"German"},{code:"fr",label:"Français",english:"French"},{code:"es",label:"Español",english:"Spanish"},{code:"it",label:"Italiano",english:"Italian"},{code:"pt",label:"Português",english:"Portuguese"},{code:"pl",label:"Polski",english:"Polish"},{code:"sv",label:"Svenska",english:"Swedish"},{code:"da",label:"Dansk",english:"Danish"},{code:"nb",label:"Norsk bokmål",english:"Norwegian Bokmål"},{code:"fi",label:"Suomi",english:"Finnish"},{code:"tr",label:"Türkçe",english:"Turkish"}];function Fe(e){const t=(e??"").toLowerCase();return G.find(n=>n.code===t)??G.find(n=>n.code===t.split("-")[0])}function or(e){return Fe(e)?.label??e}function sr(e){const t=Fe(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const J=3;function Ge(e,t){const n=new Set;let r=1,i=t.get(e)?.parentId;for(;i;){if(n.has(i)||(n.add(i),r++,r>J+1))return 1/0;i=t.get(i)?.parentId}return r}function cr(e,t,n){if(!e)return!0;if(e===t)return!1;const r=new Map(n.map(o=>[o.id,o]));if(!r.has(e)||t&&je(e,t,r))return!1;const i=Ge(e,r),a=t?Z(t,n):1;return i+a<=J}function je(e,t,n){const r=new Set;let i=n.get(e)?.parentId;for(;i;){if(i===t)return!0;if(r.has(i))return!1;r.add(i),i=n.get(i)?.parentId}return!1}function Z(e,t,n=new Set){if(n.has(e))return 1;n.add(e);const r=t.filter(i=>i.parentId===e);return r.length?1+Math.max(...r.map(i=>Z(i.id,t,n))):1}const Ve="en";function He(e){return e.defaultLocale||e.locale||Ve}function lr(e){const t=new Set,n=[];for(const r of[He(e),...e.locales??[]])!r||t.has(r)||(t.add(r),n.push(r));return n}function ur(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)?.name??(n?r.find(i=>i.locale===n)?.name:void 0)??e.name}const j=["lookup","condition","parallel","for-each"];function V(e){for(const t of e){if(!j.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${j.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const r=V(n);if(r)return r}if(t.type==="for-each"){const n=V(t.body??[]);if(n)return n}}return null}function dr(e,t){switch(e.kind){case"org":return!0;case"team":return!!t.teamId&&e.teamId===t.teamId;case"personal":return e.userId===t.userId}}function pr(e,t){return e.filter(n=>n.enabled&&dr(n.ownerScope,t))}function fr(e){return e.credentialScope?e.credentialScope:(e.authMode??"header")==="header"||e.oauth?.scope==="org"?"shared":"per-user"}function mr(e){return`mcp__${e}__`}const gr=1e3,hr=2e3,Er=500,Ar=12e3,yr=4e3,We=["contact","company"];function Sr(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return We.includes(t)}function Xe(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function _r(e){if(typeof e!="string")return;const t=e.trim();if(t==="org")return{kind:"org"};const n=t.indexOf(":");if(n<=0)return;const r=t.slice(0,n),i=t.slice(n+1).trim();if(i){if(r==="user")return{kind:"user",userId:i};if(r==="team")return{kind:"team",teamId:i}}}function ze(e){return Xe(e)}function Ye(e){switch(e.kind){case"personal":return{kind:"user",userId:e.userId};case"team":return{kind:"team",teamId:e.teamId};case"org":return{kind:"org"}}}const qe=Ye;function Tr(e){return e.agentId?{kind:"user",userId:e.agentId}:qe(e.ownerScope)}function br(e){return ze(e)}function Ir(e,t){if(!t)return;let n=e;for(const r of t.split(".")){if(n===null||typeof n!="object")return;n=n[r]}return n}function Mr(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function Cr(e,t){if(t)return e.targets.find(n=>n.id===t)}function Je(e){return e?.kind==="assignment"}function wr(e){const{trigger:t,agentId:n,target:r,activityType:i,assigneeUserId:a,authorUserId:o}=e;return Je(t)?n?r?r.activityTypes.includes(i)?a?a!==n?"assigned to someone else":o&&o===n?"the agent assigned this to itself, which would restart its own run":null:`no assignee found at ${r.assigneePath}`:`activity type ${i} does not announce an assignment for ${r.id}`:`assignment target kind "${t.targetKind}" is not declared by any installed app`:"this playbook has no agent, so an assignment can never be for it":"trigger is not an assignment trigger"}function Nr(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const Or=[{name:"text",type:"string"},{name:"subject",type:"string"},{name:"from",type:"string"},{name:"type",type:"string"},{name:"direction",type:"string"},{name:"channelId",type:"string"},{name:"interactionId",type:"string"},{name:"activityId",type:"string"},{name:"authorType",type:"string"},{name:"authorName",type:"string"},{name:"textRaw",type:"string"},{name:"fromStatus",type:"string"},{name:"toStatus",type:"string"},{name:"contactId",type:"string"},{name:"companyId",type:"string"},{name:"assigneeUserId",type:"string"}],kr={topics:[{name:"topicId",type:"string"},{name:"topic",type:"string"},{name:"confidence",type:"number"},{name:"reasoning",type:"string"}],question:[{name:"answer",type:"boolean"},{name:"reasoning",type:"string"}],extract:[]};function Ze(e){return`${e.type}:${e.id}`}const Qe="interaction";function et(e){return e?.type===Qe?e.id:void 0}const tt=64,nt=8e3;function Rr(e){const t=typeof e=="number"?e:Number(String(e??"").trim());if(!(!Number.isFinite(t)||t<=0))return Math.min(Math.max(Math.round(t),tt),nt)}const vr={kind:"workflow",steps:[]};function Lr(e){return e?.kind==="workflow"?e.steps:[]}function xr(e){return e?.kind==="procedure"?e.procedure:void 0}const rt=["done","escalated","failed","stopped"];function Dr(e){return rt.includes(e)}function it(e){return e==="waiting"}function Pr(e){return e==="running"||it(e)}function Q(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function $r(e){const t=Q(e);return t?Ze(t):void 0}function Kr(e){return et(Q(e))}function Ur(e,t){const n=e.accumulatedSeconds||0;return e.runningSince?n+Math.max(0,Math.floor((t-e.runningSince)/1e3)):n}function Br(e,t){const n=Math.max(1,Math.ceil(Math.max(0,e)/60));if(!t||t==="exact")return n*60;const r=Number(t);return!Number.isFinite(r)||r<=0?n*60:Math.ceil(n/r)*r*60}function Fr(e){const t=Math.max(0,Math.round(e/60));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Gr(e){const t=Math.max(0,Math.floor(e)),n=a=>String(a).padStart(2,"0"),r=Math.floor(t/60)%60,i=Math.floor(t/3600);return i>0?`${i}:${n(r)}:${n(t%60)}`:`${n(r)}:${n(t%60)}`}function at(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function jr(e,t){const n=at(e)||"werksoort",r=new Set(t);if(!r.has(n))return n;for(let i=2;i<500;i++){const a=`${n}-${i}`;if(!r.has(a))return a}return`${n}-${r.size+1}`}function Vr(e,t){const n=e.ownerScope;return!n||n.kind==="org"?!0:t.includes(n.teamId)}function Hr(e){return e.filter(t=>!t.archived).sort(ot)}function ot(e,t){const n=(e.order??0)-(t.order??0);return n!==0?n:(e.label||"").localeCompare(t.label||"")}const st=20,ct=20,M=300;function g(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function lt(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=M)return t;const n=t.slice(0,M),r=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return r>M*.6?n.slice(0,r+1):`${n.trimEnd()}…`}function Wr(e,t){const n=lt(t.text),r=g(n);if(!r||(e.examples??[]).some(o=>g(o)===r))return null;const i=e.exampleCandidates??[],a=i.findIndex(o=>g(o.text)===r);if(a>=0){if(i[a].corrected||!t.corrected)return null;const o=[...i];return o[a]={...o[a],corrected:!0,addedAt:t.addedAt},ge(o)}return ge([{...t,text:n},...i]).slice(0,ct)}function ge(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function Xr(e,t){const n=g(t),r=(e.examples??[]).filter(a=>a.trim());return{examples:r.some(a=>g(a)===n)?r:[...r,t].slice(-st),exampleCandidates:ut(e,t)}}function ut(e,t){const n=g(t);return(e.exampleCandidates??[]).filter(r=>g(r.text)!==n)}function dt(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function zr(e,t){return e.filter(n=>dt(n,t))}function Yr(e){return e.type==="agent"}const pt="work_item",ft="work_project";function mt(e){return`${pt}:${e}`}function ee(e){return`${ft}:${e}`}function qr(e,t,n){const r=`${e}-${t}`;return n?`${r}-${n}`:r}function Jr(e){const t=/^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e||"").trim());return t?{projectKey:t[1].toUpperCase(),sequenceNumber:Number(t[2]),...t[3]?{subSequence:Number(t[3])}:{}}:null}function Zr(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,3)||"PRJ"}function Qr(e,t=25){const n=new Set([mt(e.id)]);e.projectId&&n.add(ee(e.projectId));for(const r of e.ancestorKeys??[])n.add(r);for(const r of e.partyKeys??[])n.add(r);return Array.from(n).slice(0,t)}function ei(e){return[ee(e.id)]}const O=[{key:"open",label:"status_open",category:"todo",order:0},{key:"in_progress",label:"status_in_progress",category:"in_progress",order:1},{key:"done",label:"status_done",category:"done",order:2}],te=O.map(e=>e.key);function gt(e){return e?.statuses?.length?e.statuses:O}function ht(e,t){return t.find(n=>n.key===e)?.category??"todo"}function ti(e,t){return t.find(n=>n.key===e)}function ni(e){const t=gt(e),n=e?.defaultStatusKey;return n&&t.some(r=>r.key===n)?n:Et(t)[0]?.key??O[0].key}function Et(e){return[...e].sort((t,n)=>{const r=(t.order??0)-(n.order??0);return r!==0?r:(t.label||"").localeCompare(n.label||"")})}function ri(e,t){return ht(e,t)==="done"}function At(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function ii(e,t){const n=At(e)||"status",r=new Set([...t,...te]);if(!r.has(n))return n;for(let i=2;i<500;i++){const a=`${n}-${i}`;if(!r.has(a))return a}return`${n}-${r.size+1}`}function ai(e){const t=[];if(!e.length)return[{index:-1,reason:"empty"}];const n=new Set;return e.forEach((r,i)=>{if(!r.key){t.push({index:i,reason:"missing_key"});return}te.includes(r.key)&&t.push({index:i,reason:"reserved_key",key:r.key}),n.has(r.key)&&t.push({index:i,reason:"duplicate_key",key:r.key}),n.add(r.key)}),e.some(r=>r.category==="todo"||r.category==="in_progress")||t.push({index:-1,reason:"no_open"}),e.some(r=>r.category==="done")||t.push({index:-1,reason:"no_done"}),t}const oi=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),si=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function yt(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?oi.has(t)?"image":t==="application/pdf"?"pdf":si.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const h=1024*1024,St={image:5*h,pdf:20*h,text:1*h,audio:20*h},ci=25*h,li=5;function ui(e,t){const n=yt(e);return n==="unsupported"?"unsupported":t>St[n]?"too-large":null}function _t(e){return`${e.kind}:${e.id||e.url||e.title}`}function di(e,t=[]){const n=new Set(t),r=[],i=[];for(const a of e){const o=_t(a);n.has(o)||(n.add(o),r.push(a),i.push(o))}return{sources:r,keys:i}}function pi(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&e.canHold(t.providerId))}function fi(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&!e.canHold(t.providerId))}function mi(e){return e.sessions.some(n=>n.id!==e.exceptSessionId&&(n.state==="connected"||n.state==="on_hold"))?{admit:!1,reason:"busy"}:{admit:!0}}function Tt(e,t){const n=new Set(e.disabledIntents??[]),r=e.intentOverrides??{},i=t.intents.filter(o=>!n.has(o.intent)).map(o=>hi(o,r[o.intent]));if(!e.extraIntents||e.extraIntents.length===0)return i;const a=new Set(i.map(o=>o.intent));for(const o of e.extraIntents)a.has(o.intent)||(i.push(o),a.add(o.intent));return i}function bt(e,t){const n={};for(const r of e.intents){if(!r.togglable)continue;const i=t?.[r.intent];n[r.intent]=i??r.defaultEnabled??!0}return n}function gi(e,t){const n=bt(e,t);return Object.entries(n).filter(([,r])=>!r).map(([r])=>r)}function hi(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function Ei(e,t){const n=[];for(const r of e){if(!r.enabled)continue;const i=t[r.providerId];if(i)for(const a of Tt(r,i))n.push({channel:r,description:i,capability:a})}return n}function Ai(e,t){return t.filter(n=>n.capability.intent===e)}function It(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function yi(e,t){return It(e.scheme,t)}function Si(e,t,n){const r=[];for(const i of e)for(const a of n)a.capability.intent===t&&a.capability.targetSchemes.includes(i.scheme)&&r.push({channelIntent:a,endpoint:i});return r}var Mt=(e=>(e.MAILTO="mailto",e.SIP="sip",e.TEL="tel",e.WEBHOOK="webhook",e.USERNAME="username",e.ID="id",e.CUSTOM="custom",e.URL="url",e.TELEGRAM="telegram",e.WHATSAPP="whatsapp",e.MESSENGER="messenger",e.INSTAGRAM="instagram",e.VIBER="viber",e.SMS="sms",e.FAX="fax",e.TEAMS="teams",e.CALENDAR="calendar",e))(Mt||{});const _i={mailto:"mail",sip:"tel",tel:"tel",fax:"tel",sms:"chat",teams:"chat",telegram:"chat",messenger:"chat",instagram:"chat",viber:"chat",whatsapp:"wa",webhook:"note",url:"note",calendar:"note",username:"note",id:"note",custom:"note"};function Ti(e){return e?_i[e]??"note":"note"}const bi="message_window",Ii="message_templates",Mi={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},Ci=(e,t)=>({intent:e,...t}),wi="folder_management",Ni="remote_search",Oi={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},ki="installation-id",Ri={ai:["account.read","account.write","agent.read","agent.write","assignment.read","budget.read","budget.write","connector.read","connector.write","context.read","context.write","conversation.read","conversation.write","lens.read","lens.write","message.read","message.write","playbook.read","playbook.write","profile.read","profile.write","run.read","run.write","settings.read","settings.write","tool.read","transcript.write","usage.read"],analytics:["report.read"],"app-store":["app.publish","app.read","app.write","setting.read","setting.write"],automations:["sync.read","sync.write","webhook.read","webhook.write"],communication:["account.read","account.write","activity-type.read","activity.read","activity.write","attachment.read","attribute.read","attribute.write","calendar.read","calendar.write","channel.read","channel.write","custom-field.read","custom-field.write","folder.read","folder.write","inbox.read","inbox.write","interaction.read","interaction.write","reminder.read","task.read","task.write","template.read","template.write","topic.read","topic.write"],context:["kind.read","kind.write","memory.read","memory.write"],crm:["company.read","company.write","contact.read","contact.write"],"eylo-voip":["account.read","account.write","callflow.read","callflow.write","channel.read","channel.write","contact.read","contact.write","device.read","device.write","group.read","group.write","interaction.read","interaction.write","media.read","media.write","menu.read","menu.write","phone-number.read","phone-number.write","recording.read","recording.write","sip.read","temporal-rule.read","temporal-rule.write","user.read","user.write","vmbox.read","vmbox.write","webhook.read","webhook.write"],google:["account.read","account.write","contact.read"],kb:["article.read","article.write","category.read","category.write","help-center.read","help-center.write","kb.read","kb.write"],mail:["account.write"],meta:["account.read","account.write"],microsoft:["account.read","account.write","contact.read","sync.write"],organization:["billing.read","billing.write","settings.read","settings.write","team.read","team.write"],shopify:["account.read","account.write","order.read"],slack:["thread.read","thread.write"],storage:["artifact.read","artifact.write","file.read","file.write","mount.read","mount.write"],time:["entry.read","entry.write","work-type.read","work-type.write"],user:["user.read","user.write"],work:["item.read","item.write","project.read","project.write"]},ne=9e4,Ct=["out_of_office"],wt=e=>Ct.includes(e);function vi(e,t,n){const r=n-e<ne,i=t?.status&&(!t.expiresAt||t.expiresAt>n)?t:void 0;if(!i?.status)return{online:r,status:r?"available":"offline"};const a=i.status;return!r&&!wt(a)?{online:!1,status:"offline"}:{online:r,status:a,message:i.message}}function Li(e,t){const n=t-e.lastSeenAt<ne,r=n||wt(e.status)?e.status:"offline";return n===e.online&&r===e.status?e:{...e,online:n,status:r}}function xi(e,t){return e?.teamId&&t.includes(e.teamId)?{teamId:e.teamId,mustChoose:!1}:t.length===1?{teamId:t[0],mustChoose:!1}:{teamId:void 0,mustChoose:t.length>1}}function Di(e){return e.providerAvailable&&e.allowed}const Pi="resources.describe",$i="resources.search",Ki="resources.resolve";function Ui(e){const t=e.indexOf(":");return t===-1?e:e.slice(0,t)}const re="auth";function ie(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function Bi(e){const t=ie(e);return t?t!==re:typeof e=="string"&&e.startsWith("/wake")}function Fi(e){return typeof e!="string"||e===""||e==="/"?!0:ie(e)===re}function Gi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Nt(e){const n=e.split("/").filter(Boolean).map(r=>r.startsWith(":")?r.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":"/"+Gi(r)).join("");return new RegExp(`^${n}\\/?$`)}function Ot(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean),i={};return n.forEach((a,o)=>{if(a.startsWith(":")){const s=a.endsWith("?")?a.slice(1,-1):a.slice(1),l=r[o];l&&(i[s]=l)}}),i}function kt(e){return e.publicBasePath??`/apps/${e.name}`}function ji(e){const t=[];for(const n of e){if(!n?.name)continue;const r=kt(n);for(const i of n.routes??[]){if(!i.public)continue;const a=i.path==="/"?"":i.path;t.push({appName:n.name,resource:i.resource,pattern:`${r}${a}`,props:i.props})}}return t}function Rt(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);for(let i=0;i<Math.min(n.length,r.length);i++){const a=n[i].startsWith(":"),o=r[i].startsWith(":");if(a!==o)return o}return n.length>r.length}function vt(e,t){if(typeof e!="string")return null;let n=null;for(const r of t)Nt(r.pattern).test(e)&&(!n||Rt(r.pattern,n.pattern))&&(n=r);return n?{...n,params:{...n.props,...Ot(n.pattern,e)}}:null}function Vi(e,t){return vt(e,t)!==null}const Hi="sync-source",Wi="sync-target",Xi=20,zi={afrikaans:["[Muziek]","(C) TV GELDERLAND 2021","*Thomp thomp thomp*","www.youtube.com","ä n wood s","!.."],english:["[applause]","[APPLAUSE]","(claps)","(clapping)","(audience applauds)","(keyboard clicking)","(keyboard clacking)","(clicking)","[CLICK]","[BLANK_AUDIO]","(upbeat music)","(dramatic music)","[music playing]","(electronic music)","(audience cheering)","(audience cheers)","[MUSIC]","( ( ( ( ) ( ) ( ) ( )","(laughs)","(air whooshing)","<u>Transcribed</u> by https://otter.ai","All new tonight at 6... coming up. A new look at your forecast is A new look at your forecast is","www.mooji.org","KATHRYN A new forecast is coming up... A new forecast is coming up...","KATHRYN pandemic started. increasing since the The pandemic has been","A new look at your forecast this morning... A new look at your","We'll be right back.","We'll see you next week.","Thanks for watching!","❤️ Translated by Amara.org Communit"],flemish:["*clap*","TV GELDERLAND 2020","TV Gelderland 2021","(C) TV GELDERLAND 2021","[Muziek]","Kuman","Ondertitels ingediend door de Amara.org gemeenschap","Ondertiteld door de Amara.org gemeenschap","Dank u wel voor het kijken.","Ondertiteling door de Amara.org gemeenschap","GELUID VAN MAHIH U similarly"],french:["(applaudissements)","[Applaudissements]","Sous-titres réalisés par la communauté d'Amara.org","- Bonne journée. - Bonjour.","POP POP הי","Merci d'avoir regardé cette vidéo.","Merci d'avoir regardé cette vidéo!","Merci d'avoir regardé la vidéo.","J'espère que vous avez apprécié la vidéo.","Je vous remercie de vous abonner","Merci d'avoir regardé!","❤️ par SousTitreur.com","— Sous-titrage ST'501 —","Thanks for watching!","Sous-titres réalisés par l'Amara.org","Sous-titres réalisés para la communauté d'Amara.org","Sous-titres réalisés par la communauté d'Amara.org","Sous-titres fait par Sous-titres par Amara.org","Sous-titres réalisés par les SousTitres d'Amara.org","Sous-titres par Amara.org","Sous-titres par la communauté d'Amara.org","Sous-titres réalisés pour la communauté d'Amara.org","Sous-titres réalisés par la communauté de l'Amara.org","Sous-Titres faits par la communauté d'Amara.org","Sous-titres par l'Amara.org","Sous-titres fait par la communauté d'Amara.org","Sous-titrage ST' 501","Sous-titrage ST'501","Cliquez-vous sur les sous-titres et abonnez-vous à la chaîne d'Amara.org","❤️ par SousTitreur.com"],german:["[Klicken]","(Jubel)","*lacht*","[Anhaltender Beifall]","[Applaus]","(Applaus)","* Applaus *","[MUSIK]","* mustard ml Drumglöck und knack in einem Handbewerb *","Untertitelung aufgrund der Amara.org-Community","Untertitel im Auftrag des ZDF für funk, 2017","Untertitel von Stephanie Geiges","Untertitel der Amara.org-Community","Untertitel im Auftrag des ZDF, 2017","Untertitel im Auftrag des ZDF, 2020","Untertitel im Auftrag des ZDF, 2018","Untertitel im Auftrag des ZDF, 2021","Untertitelung im Auftrag des ZDF, 2021","Copyright WDR 2021","Copyright WDR 2020","Copyright WDR 2019","SWR 2021","SWR 2020"],italian:["Alla prossima!","*applauso*","[Musica]","[Musica]","[Applausi]","*Bip bip bip bip*","(musica del NS shore)","D' 1962 alle tribunte del Gulf","Sottotitoli creati dalla comunità Amara.org","Sottotitoli di Sottotitoli di Amara.org","Sottotitoli e revisione al canale di Amara.org","Sottotitoli e revisione a cura di Amara.org","Sottotitoli e revisione a cura di QTSS","Sottotitoli e revisione a cura di QTSS.","Sottotitoli a cura di QTSS","Sottotitoli a cura di Sottotitoli"],spanish:["[música]","[Música de cierre]","[Aplausos]","(Aplausos)","www.alimmenta.com","¡Gracias por ver el vídeo!","(sonidos del celular) (Inudible distorsión)","¡Suscríbete!","Subtítulos realizados por la comunidad de Amara.org","Subtitulado por la comunidad de Amara.org","Subtítulos por la comunidad de Amara.org","Subtítulos creados por la comunidad de Amara.org","Subtítulos en español de Amara.org","Subtítulos hechos por la comunidad de Amara.org","Subtitulos por la comunidad de Amara.org","Más información www.alimmenta.com","www.mooji.org","[MÚSICA]","[Music cuts in British]"]},Lt=e=>{let t=e;return Object.values(zi).forEach(n=>{n.forEach(r=>{t=t.replaceAll(r,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},xt=6e4,Dt=8e3,Pt=2,$t=.4,Yi=3,qi=new Set(["aan","als","ben","bent","bij","dan","dat","deze","die","dit","doen","door","dus","echt","een","eens","even","gaan","gaat","geen","geweest","goed","graag","had","heb","hebben","hebt","heeft","het","hier","hoe","hoor","iets","inderdaad","kan","klopt","kunnen","kunt","maar","mag","mee","meer","met","mij","mijn","misschien","moet","moeten","naar","net","niet","nog","nou","oke","ook","over","prima","toch","uhm","uit","van","veel","voor","wat","weer","weet","wel","wij","wil","wilt","worden","wordt","zeg","zeggen","zijn","zou","zult","about","and","are","been","but","can","does","for","have","just","know","like","not","okay","right","she","that","the","them","then","there","they","this","want","was","well","were","what","will","with","would","yeah","you","your"]);function Kt(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<Yi||qi.has(n)||t.add(n);return[...t]}function Ut(e,t){if(!e.length)return 0;if(!t.length)return 1;const n=new Set(t),r=new Set(e);let i=0;for(const a of r)n.has(a)||(i+=1);return i/r.size}function Bt(e,t=xt){const n=e.filter(o=>!o.partial&&typeof o.text=="string");if(!n.length)return{text:"",segmentCount:0};const i=n.reduce((o,s)=>Math.max(o,s.endedAt??0),0)-t;return{text:n.filter(o=>(o.endedAt??0)>=i).map(o=>Lt(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const Ft=60;function Ji(e,t,n=Ft){const r=new Set(e),i=[...e];for(const a of t)!a||r.has(a)||(r.add(a),i.push(a));return i.slice(-n)}function Zi(e){const{segments:t,now:n,state:r}=e;if(r.lastTriggerAt&&n-r.lastTriggerAt<Dt)return{trigger:!1,reason:"too_soon"};const i=Bt(t,e.windowMs);if(!i.text)return{trigger:!1,reason:"no_speech"};const a=i.segmentCount-(r.lastSegmentCount??0);if(r.lastQueryTerms&&a<Pt)return{trigger:!1,reason:"too_few_new"};const o=Kt(i.text);return o.length?r.lastQueryTerms?.length&&Ut(o,r.lastQueryTerms)<$t?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:i.text,terms:o,segmentCount:i.segmentCount}:{trigger:!1,reason:"no_speech"}}const k={NL:{callingCode:"31",trunkPrefix:"0",nsnMin:7,nsnMax:9},BE:{callingCode:"32",trunkPrefix:"0",nsnMin:8,nsnMax:9},LU:{callingCode:"352",nsnMin:6,nsnMax:9},DE:{callingCode:"49",trunkPrefix:"0",nsnMin:6,nsnMax:13},FR:{callingCode:"33",trunkPrefix:"0",nsnMin:9,nsnMax:9},GB:{callingCode:"44",trunkPrefix:"0",nsnMin:9,nsnMax:10},IE:{callingCode:"353",trunkPrefix:"0",nsnMin:7,nsnMax:9},ES:{callingCode:"34",nsnMin:9,nsnMax:9},PT:{callingCode:"351",nsnMin:9,nsnMax:9},IT:{callingCode:"39",nsnMin:6,nsnMax:11},AT:{callingCode:"43",trunkPrefix:"0",nsnMin:7,nsnMax:13},CH:{callingCode:"41",trunkPrefix:"0",nsnMin:9,nsnMax:9},DK:{callingCode:"45",nsnMin:8,nsnMax:8},SE:{callingCode:"46",trunkPrefix:"0",nsnMin:7,nsnMax:13},NO:{callingCode:"47",nsnMin:8,nsnMax:8},FI:{callingCode:"358",trunkPrefix:"0",nsnMin:5,nsnMax:12},PL:{callingCode:"48",nsnMin:9,nsnMax:9},US:{callingCode:"1",nsnMin:10,nsnMax:10},CA:{callingCode:"1",nsnMin:10,nsnMax:10}},Gt="NL",Qi=15,ea=8,ta=Array.from(new Set(Object.values(k).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function he(e){if(e)return k[e.trim().toUpperCase()]}function C(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function Ee(e){if(e.length>Qi)return null;for(const t of ta){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const r of Object.values(k)){if(r.callingCode!==t)continue;const i=r.trunkPrefix,a=i&&n.startsWith(i)?n.slice(i.length):n;if(C(a,r))return`+${t}${a}`}return null}return e.length<ea?null:`+${e}`}function na(e){let t=e.trim();const n=t.match(/^(sips?|tel|whatsapp):/i);n&&(t=t.slice(n[0].length));const r=t.indexOf("@");return r>=0&&(t=t.slice(0,r)),t.trim()}function ra(e){if(!e)return!1;const t=e.indexOf("@");if(t<=0)return!1;const n=e.slice(0,t).trim();return!/^[+\d\s().-]+$/.test(n)}function H(e,t){if(!e)return null;const n=na(e);if(!n)return null;const r=n.startsWith("+"),i=n.replace(/\D/g,"");if(!i)return null;if(r)return Ee(i);if(i.startsWith("00"))return Ee(i.slice(2));const a=he(t)??he(Gt);if(!a)return null;const o=a.trunkPrefix;if(o&&i.startsWith(o)){const s=i.slice(o.length);return C(s,a)?`+${a.callingCode}${s}`:null}if(i.startsWith(a.callingCode)){const s=i.slice(a.callingCode.length);if(C(s,a))return`+${a.callingCode}${s}`}return!o&&C(i,a)?`+${a.callingCode}${i}`:null}function ia(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function ae(e){if(!e)return null;const t=e.trim().toLowerCase(),n=t.lastIndexOf("@");if(n<=0||n===t.length-1)return null;const r=t.slice(0,n).split("+")[0],i=t.slice(n+1);return!r||!i.includes(".")?null:`${r}@${i}`}function aa(e){const t=ae(e);return t?t.slice(t.lastIndexOf("@")+1):null}const oa=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function jt(e){if(!e)return null;const t=e.trim().toLowerCase().replace(/\.$/,"").split(".").filter(Boolean);if(t.length<2)return null;const n=t.slice(-2).join(".");return oa.has(n)&&t.length>=3?t.slice(-3).join("."):n}const Vt=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","hotmail.nl","hotmail.be","hotmail.co.uk","live.com","live.nl","live.be","msn.com","yahoo.com","yahoo.co.uk","ymail.com","icloud.com","me.com","mac.com","aol.com","gmx.net","gmx.de","web.de","protonmail.com","proton.me","pm.me","tutanota.com","zoho.com","mail.com","ziggo.nl","kpnmail.nl","planet.nl","home.nl","casema.nl","chello.nl","xs4all.nl","telfort.nl","hetnet.nl","zonnet.nl","upcmail.nl","quicknet.nl","telenet.be","skynet.be","proximus.be","scarlet.be"]);function sa(e){const t=jt(e);return t?Vt.has(t):!1}function ca(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function la(e,t,n){if(!e||!t)return null;const r=e.trim().toLowerCase();if(r==="tel"||r==="sms"||r==="whatsapp"){const a=H(t,n);return a?`tel:${a}`:null}if(r==="fax"){const a=H(t,n);return a?`fax:${a}`:null}if(r==="mailto"||r==="email"){const a=ae(t);return a?`mailto:${a}`:null}const i=t.trim().toLowerCase();return i?`${r}:${i}`:null}const ua=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,da=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function pa(e){if(typeof e!="string"||!e)return"";let t=e;return t=t.replace(/```[a-z]*\n?/gi,"").replace(/~~~[a-z]*\n?/gi,""),t=t.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\[[^\]]*\]/g,"$1"),t=t.replace(/<((?:https?|mailto):[^>\s]+)>/gi,"$1"),t=t.split(`
|
|
7
|
+
`:t==="mail"?"<br><br>-- <br>":"<br><br>"}${i.body}`:n}function Zn(e){return e.endpoints??[]}const Qn=e=>!!e.assignedUserId||!!e.assignedInboxId,er=e=>e.status==="closed",tr=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,nr=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function rr(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}function ir(e,t){const n=e.labels??[];return n.find(r=>r.locale===t)?.label??n[0]?.label??e.url}function ar(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)??(n?r.find(i=>i.locale===n):void 0)??{locale:t}}const G=[{code:"nl",label:"Nederlands",english:"Dutch"},{code:"en",label:"English",english:"English"},{code:"de",label:"Deutsch",english:"German"},{code:"fr",label:"Français",english:"French"},{code:"es",label:"Español",english:"Spanish"},{code:"it",label:"Italiano",english:"Italian"},{code:"pt",label:"Português",english:"Portuguese"},{code:"pl",label:"Polski",english:"Polish"},{code:"sv",label:"Svenska",english:"Swedish"},{code:"da",label:"Dansk",english:"Danish"},{code:"nb",label:"Norsk bokmål",english:"Norwegian Bokmål"},{code:"fi",label:"Suomi",english:"Finnish"},{code:"tr",label:"Türkçe",english:"Turkish"}];function Fe(e){const t=(e??"").toLowerCase();return G.find(n=>n.code===t)??G.find(n=>n.code===t.split("-")[0])}function or(e){return Fe(e)?.label??e}function sr(e){const t=Fe(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const J=3;function Ge(e,t){const n=new Set;let r=1,i=t.get(e)?.parentId;for(;i;){if(n.has(i)||(n.add(i),r++,r>J+1))return 1/0;i=t.get(i)?.parentId}return r}function cr(e,t,n){if(!e)return!0;if(e===t)return!1;const r=new Map(n.map(o=>[o.id,o]));if(!r.has(e)||t&&je(e,t,r))return!1;const i=Ge(e,r),a=t?Z(t,n):1;return i+a<=J}function je(e,t,n){const r=new Set;let i=n.get(e)?.parentId;for(;i;){if(i===t)return!0;if(r.has(i))return!1;r.add(i),i=n.get(i)?.parentId}return!1}function Z(e,t,n=new Set){if(n.has(e))return 1;n.add(e);const r=t.filter(i=>i.parentId===e);return r.length?1+Math.max(...r.map(i=>Z(i.id,t,n))):1}const We="en";function Ve(e){return e.defaultLocale||e.locale||We}function lr(e){const t=new Set,n=[];for(const r of[Ve(e),...e.locales??[]])!r||t.has(r)||(t.add(r),n.push(r));return n}function ur(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)?.name??(n?r.find(i=>i.locale===n)?.name:void 0)??e.name}const j=["lookup","condition","parallel","for-each"];function W(e){for(const t of e){if(!j.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${j.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const r=W(n);if(r)return r}if(t.type==="for-each"){const n=W(t.body??[]);if(n)return n}}return null}function dr(e,t){switch(e.kind){case"org":return!0;case"team":return!!t.teamId&&e.teamId===t.teamId;case"personal":return e.userId===t.userId}}function pr(e,t){return e.filter(n=>n.enabled&&dr(n.ownerScope,t))}function fr(e){return e.credentialScope?e.credentialScope:(e.authMode??"header")==="header"||e.oauth?.scope==="org"?"shared":"per-user"}function mr(e){return`mcp__${e}__`}const gr=1e3,hr=2e3,Er=500,Ar=12e3,yr=4e3,He=["contact","company"];function Sr(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return He.includes(t)}function Xe(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function _r(e){if(typeof e!="string")return;const t=e.trim();if(t==="org")return{kind:"org"};const n=t.indexOf(":");if(n<=0)return;const r=t.slice(0,n),i=t.slice(n+1).trim();if(i){if(r==="user")return{kind:"user",userId:i};if(r==="team")return{kind:"team",teamId:i}}}function ze(e){return Xe(e)}function Ye(e){switch(e.kind){case"personal":return{kind:"user",userId:e.userId};case"team":return{kind:"team",teamId:e.teamId};case"org":return{kind:"org"}}}const qe=Ye;function Tr(e){return e.agentId?{kind:"user",userId:e.agentId}:qe(e.ownerScope)}function br(e){return ze(e)}function Ir(e,t){if(!t)return;let n=e;for(const r of t.split(".")){if(n===null||typeof n!="object")return;n=n[r]}return n}function Mr(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function Cr(e,t){if(t)return e.targets.find(n=>n.id===t)}function Je(e){return e?.kind==="assignment"}function wr(e){const{trigger:t,agentId:n,target:r,activityType:i,assigneeUserId:a,authorUserId:o}=e;return Je(t)?n?r?r.activityTypes.includes(i)?a?a!==n?"assigned to someone else":o&&o===n?"the agent assigned this to itself, which would restart its own run":null:`no assignee found at ${r.assigneePath}`:`activity type ${i} does not announce an assignment for ${r.id}`:`assignment target kind "${t.targetKind}" is not declared by any installed app`:"this playbook has no agent, so an assignment can never be for it":"trigger is not an assignment trigger"}function Nr(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const Or=[{name:"text",type:"string"},{name:"subject",type:"string"},{name:"from",type:"string"},{name:"type",type:"string"},{name:"direction",type:"string"},{name:"channelId",type:"string"},{name:"interactionId",type:"string"},{name:"itemId",type:"string"},{name:"activityId",type:"string"},{name:"authorType",type:"string"},{name:"authorName",type:"string"},{name:"textRaw",type:"string"},{name:"fromStatus",type:"string"},{name:"toStatus",type:"string"},{name:"contactId",type:"string"},{name:"companyId",type:"string"},{name:"assigneeUserId",type:"string"}],kr={topics:[{name:"topicId",type:"string"},{name:"topic",type:"string"},{name:"confidence",type:"number"},{name:"reasoning",type:"string"}],question:[{name:"answer",type:"boolean"},{name:"reasoning",type:"string"}],extract:[]};function Ze(e){return`${e.type}:${e.id}`}const Qe="interaction";function et(e){return e?.type===Qe?e.id:void 0}const tt=64,nt=8e3;function Rr(e){const t=typeof e=="number"?e:Number(String(e??"").trim());if(!(!Number.isFinite(t)||t<=0))return Math.min(Math.max(Math.round(t),tt),nt)}const vr={kind:"workflow",steps:[]};function Lr(e){return e?.kind==="workflow"?e.steps:[]}function xr(e){return e?.kind==="procedure"?e.procedure:void 0}const rt=["done","escalated","failed","stopped"];function Dr(e){return rt.includes(e)}function it(e){return e==="waiting"}function Pr(e){return e==="running"||it(e)}function Q(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function Kr(e){const t=Q(e);return t?Ze(t):void 0}function $r(e){return et(Q(e))}function Ur(e,t){const n=e.accumulatedSeconds||0;return e.runningSince?n+Math.max(0,Math.floor((t-e.runningSince)/1e3)):n}function Br(e,t){const n=Math.max(1,Math.ceil(Math.max(0,e)/60));if(!t||t==="exact")return n*60;const r=Number(t);return!Number.isFinite(r)||r<=0?n*60:Math.ceil(n/r)*r*60}function Fr(e){const t=Math.max(0,Math.round(e/60));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Gr(e){const t=Math.max(0,Math.floor(e)),n=a=>String(a).padStart(2,"0"),r=Math.floor(t/60)%60,i=Math.floor(t/3600);return i>0?`${i}:${n(r)}:${n(t%60)}`:`${n(r)}:${n(t%60)}`}function at(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function jr(e,t){const n=at(e)||"werksoort",r=new Set(t);if(!r.has(n))return n;for(let i=2;i<500;i++){const a=`${n}-${i}`;if(!r.has(a))return a}return`${n}-${r.size+1}`}function Wr(e,t){const n=e.ownerScope;return!n||n.kind==="org"?!0:t.includes(n.teamId)}function Vr(e){return e.filter(t=>!t.archived).sort(ot)}function ot(e,t){const n=(e.order??0)-(t.order??0);return n!==0?n:(e.label||"").localeCompare(t.label||"")}const st=20,ct=20,M=300;function g(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function lt(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=M)return t;const n=t.slice(0,M),r=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return r>M*.6?n.slice(0,r+1):`${n.trimEnd()}…`}function Hr(e,t){const n=lt(t.text),r=g(n);if(!r||(e.examples??[]).some(o=>g(o)===r))return null;const i=e.exampleCandidates??[],a=i.findIndex(o=>g(o.text)===r);if(a>=0){if(i[a].corrected||!t.corrected)return null;const o=[...i];return o[a]={...o[a],corrected:!0,addedAt:t.addedAt},ge(o)}return ge([{...t,text:n},...i]).slice(0,ct)}function ge(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function Xr(e,t){const n=g(t),r=(e.examples??[]).filter(a=>a.trim());return{examples:r.some(a=>g(a)===n)?r:[...r,t].slice(-st),exampleCandidates:ut(e,t)}}function ut(e,t){const n=g(t);return(e.exampleCandidates??[]).filter(r=>g(r.text)!==n)}function dt(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function zr(e,t){return e.filter(n=>dt(n,t))}function Yr(e){return e.type==="agent"}const qr="WORK_COMMENT_ADDED",Jr="WORK_ITEM_ASSIGNED",pt="work_item",ft="work_project";function mt(e){return`${pt}:${e}`}function ee(e){return`${ft}:${e}`}function Zr(e,t,n){const r=`${e}-${t}`;return n?`${r}-${n}`:r}function Qr(e){const t=/^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e||"").trim());return t?{projectKey:t[1].toUpperCase(),sequenceNumber:Number(t[2]),...t[3]?{subSequence:Number(t[3])}:{}}:null}function ei(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,3)||"PRJ"}function ti(e,t=25){const n=new Set([mt(e.id)]);e.projectId&&n.add(ee(e.projectId));for(const r of e.ancestorKeys??[])n.add(r);for(const r of e.partyKeys??[])n.add(r);return Array.from(n).slice(0,t)}function ni(e){return[ee(e.id)]}const O=[{key:"open",label:"status_open",category:"todo",order:0},{key:"in_progress",label:"status_in_progress",category:"in_progress",order:1},{key:"done",label:"status_done",category:"done",order:2}],te=O.map(e=>e.key);function gt(e){return e?.statuses?.length?e.statuses:O}function ht(e,t){return t.find(n=>n.key===e)?.category??"todo"}function ri(e,t){return t.find(n=>n.key===e)}function ii(e){const t=gt(e),n=e?.defaultStatusKey;return n&&t.some(r=>r.key===n)?n:Et(t)[0]?.key??O[0].key}function Et(e){return[...e].sort((t,n)=>{const r=(t.order??0)-(n.order??0);return r!==0?r:(t.label||"").localeCompare(n.label||"")})}function ai(e,t){return ht(e,t)==="done"}function At(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function oi(e,t){const n=At(e)||"status",r=new Set([...t,...te]);if(!r.has(n))return n;for(let i=2;i<500;i++){const a=`${n}-${i}`;if(!r.has(a))return a}return`${n}-${r.size+1}`}function si(e){const t=[];if(!e.length)return[{index:-1,reason:"empty"}];const n=new Set;return e.forEach((r,i)=>{if(!r.key){t.push({index:i,reason:"missing_key"});return}te.includes(r.key)&&t.push({index:i,reason:"reserved_key",key:r.key}),n.has(r.key)&&t.push({index:i,reason:"duplicate_key",key:r.key}),n.add(r.key)}),e.some(r=>r.category==="todo"||r.category==="in_progress")||t.push({index:-1,reason:"no_open"}),e.some(r=>r.category==="done")||t.push({index:-1,reason:"no_done"}),t}const ci=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),li=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function yt(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?ci.has(t)?"image":t==="application/pdf"?"pdf":li.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const h=1024*1024,St={image:5*h,pdf:20*h,text:1*h,audio:20*h},ui=25*h,di=5;function pi(e,t){const n=yt(e);return n==="unsupported"?"unsupported":t>St[n]?"too-large":null}function _t(e){return`${e.kind}:${e.id||e.url||e.title}`}function fi(e,t=[]){const n=new Set(t),r=[],i=[];for(const a of e){const o=_t(a);n.has(o)||(n.add(o),r.push(a),i.push(o))}return{sources:r,keys:i}}function mi(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&e.canHold(t.providerId))}function gi(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&!e.canHold(t.providerId))}function hi(e){return e.sessions.some(n=>n.id!==e.exceptSessionId&&(n.state==="connected"||n.state==="on_hold"))?{admit:!1,reason:"busy"}:{admit:!0}}function Tt(e,t){const n=new Set(e.disabledIntents??[]),r=e.intentOverrides??{},i=t.intents.filter(o=>!n.has(o.intent)).map(o=>Ai(o,r[o.intent]));if(!e.extraIntents||e.extraIntents.length===0)return i;const a=new Set(i.map(o=>o.intent));for(const o of e.extraIntents)a.has(o.intent)||(i.push(o),a.add(o.intent));return i}function bt(e,t){const n={};for(const r of e.intents){if(!r.togglable)continue;const i=t?.[r.intent];n[r.intent]=i??r.defaultEnabled??!0}return n}function Ei(e,t){const n=bt(e,t);return Object.entries(n).filter(([,r])=>!r).map(([r])=>r)}function Ai(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function yi(e,t){const n=[];for(const r of e){if(!r.enabled)continue;const i=t[r.providerId];if(i)for(const a of Tt(r,i))n.push({channel:r,description:i,capability:a})}return n}function Si(e,t){return t.filter(n=>n.capability.intent===e)}function It(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function _i(e,t){return It(e.scheme,t)}function Ti(e,t,n){const r=[];for(const i of e)for(const a of n)a.capability.intent===t&&a.capability.targetSchemes.includes(i.scheme)&&r.push({channelIntent:a,endpoint:i});return r}var Mt=(e=>(e.MAILTO="mailto",e.SIP="sip",e.TEL="tel",e.WEBHOOK="webhook",e.USERNAME="username",e.ID="id",e.CUSTOM="custom",e.URL="url",e.TELEGRAM="telegram",e.WHATSAPP="whatsapp",e.MESSENGER="messenger",e.INSTAGRAM="instagram",e.VIBER="viber",e.SMS="sms",e.FAX="fax",e.TEAMS="teams",e.CALENDAR="calendar",e))(Mt||{});const bi={mailto:"mail",sip:"tel",tel:"tel",fax:"tel",sms:"chat",teams:"chat",telegram:"chat",messenger:"chat",instagram:"chat",viber:"chat",whatsapp:"wa",webhook:"note",url:"note",calendar:"note",username:"note",id:"note",custom:"note"};function Ii(e){return e?bi[e]??"note":"note"}const Mi="message_window",Ci="message_templates",wi={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},Ni=(e,t)=>({intent:e,...t}),Oi="folder_management",ki="remote_search",Ri={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},vi="installation-id",Li={ai:["account.read","account.write","agent.read","agent.write","assignment.read","budget.read","budget.write","connector.read","connector.write","context.read","context.write","conversation.read","conversation.write","lens.read","lens.write","message.read","message.write","playbook.read","playbook.write","profile.read","profile.write","run.read","run.write","settings.read","settings.write","tool.read","transcript.write","usage.read"],analytics:["report.read"],"app-store":["app.publish","app.read","app.write","setting.read","setting.write"],automations:["sync.read","sync.write","webhook.read","webhook.write"],communication:["account.read","account.write","activity-type.read","activity.read","activity.write","attachment.read","attribute.read","attribute.write","calendar.read","calendar.write","channel.read","channel.write","custom-field.read","custom-field.write","folder.read","folder.write","inbox.read","inbox.write","interaction.read","interaction.write","reminder.read","task.read","task.write","template.read","template.write","topic.read","topic.write"],context:["kind.read","kind.write","memory.read","memory.write"],crm:["company.read","company.write","contact.read","contact.write"],"eylo-voip":["account.read","account.write","callflow.read","callflow.write","channel.read","channel.write","contact.read","contact.write","device.read","device.write","group.read","group.write","interaction.read","interaction.write","media.read","media.write","menu.read","menu.write","phone-number.read","phone-number.write","recording.read","recording.write","sip.read","temporal-rule.read","temporal-rule.write","user.read","user.write","vmbox.read","vmbox.write","webhook.read","webhook.write"],google:["account.read","account.write","contact.read"],kb:["article.read","article.write","category.read","category.write","help-center.read","help-center.write","kb.read","kb.write"],mail:["account.write"],meta:["account.read","account.write"],microsoft:["account.read","account.write","contact.read","sync.write"],organization:["billing.read","billing.write","settings.read","settings.write","team.read","team.write"],shopify:["account.read","account.write","order.read"],slack:["thread.read","thread.write"],storage:["artifact.read","artifact.write","file.read","file.write","mount.read","mount.write"],time:["entry.read","entry.write","work-type.read","work-type.write"],user:["user.read","user.write"],work:["item.read","item.write","project.read","project.write"]},ne=9e4,Ct=["out_of_office"],wt=e=>Ct.includes(e);function xi(e,t,n){const r=n-e<ne,i=t?.status&&(!t.expiresAt||t.expiresAt>n)?t:void 0;if(!i?.status)return{online:r,status:r?"available":"offline"};const a=i.status;return!r&&!wt(a)?{online:!1,status:"offline"}:{online:r,status:a,message:i.message}}function Di(e,t){const n=t-e.lastSeenAt<ne,r=n||wt(e.status)?e.status:"offline";return n===e.online&&r===e.status?e:{...e,online:n,status:r}}function Pi(e,t){return e?.teamId&&t.includes(e.teamId)?{teamId:e.teamId,mustChoose:!1}:t.length===1?{teamId:t[0],mustChoose:!1}:{teamId:void 0,mustChoose:t.length>1}}function Ki(e){return e.providerAvailable&&e.allowed}const $i="resources.describe",Ui="resources.search",Bi="resources.resolve";function Fi(e){const t=e.indexOf(":");return t===-1?e:e.slice(0,t)}const re="auth";function ie(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function Gi(e){const t=ie(e);return t?t!==re:typeof e=="string"&&e.startsWith("/wake")}function ji(e){return typeof e!="string"||e===""||e==="/"?!0:ie(e)===re}function Wi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Nt(e){const n=e.split("/").filter(Boolean).map(r=>r.startsWith(":")?r.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":"/"+Wi(r)).join("");return new RegExp(`^${n}\\/?$`)}function Ot(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean),i={};return n.forEach((a,o)=>{if(a.startsWith(":")){const s=a.endsWith("?")?a.slice(1,-1):a.slice(1),l=r[o];l&&(i[s]=l)}}),i}function kt(e){return e.publicBasePath??`/apps/${e.name}`}function Vi(e){const t=[];for(const n of e){if(!n?.name)continue;const r=kt(n);for(const i of n.routes??[]){if(!i.public)continue;const a=i.path==="/"?"":i.path;t.push({appName:n.name,resource:i.resource,pattern:`${r}${a}`,props:i.props})}}return t}function Rt(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);for(let i=0;i<Math.min(n.length,r.length);i++){const a=n[i].startsWith(":"),o=r[i].startsWith(":");if(a!==o)return o}return n.length>r.length}function vt(e,t){if(typeof e!="string")return null;let n=null;for(const r of t)Nt(r.pattern).test(e)&&(!n||Rt(r.pattern,n.pattern))&&(n=r);return n?{...n,params:{...n.props,...Ot(n.pattern,e)}}:null}function Hi(e,t){return vt(e,t)!==null}const Xi="sync-source",zi="sync-target",Yi=20,qi={afrikaans:["[Muziek]","(C) TV GELDERLAND 2021","*Thomp thomp thomp*","www.youtube.com","ä n wood s","!.."],english:["[applause]","[APPLAUSE]","(claps)","(clapping)","(audience applauds)","(keyboard clicking)","(keyboard clacking)","(clicking)","[CLICK]","[BLANK_AUDIO]","(upbeat music)","(dramatic music)","[music playing]","(electronic music)","(audience cheering)","(audience cheers)","[MUSIC]","( ( ( ( ) ( ) ( ) ( )","(laughs)","(air whooshing)","<u>Transcribed</u> by https://otter.ai","All new tonight at 6... coming up. A new look at your forecast is A new look at your forecast is","www.mooji.org","KATHRYN A new forecast is coming up... A new forecast is coming up...","KATHRYN pandemic started. increasing since the The pandemic has been","A new look at your forecast this morning... A new look at your","We'll be right back.","We'll see you next week.","Thanks for watching!","❤️ Translated by Amara.org Communit"],flemish:["*clap*","TV GELDERLAND 2020","TV Gelderland 2021","(C) TV GELDERLAND 2021","[Muziek]","Kuman","Ondertitels ingediend door de Amara.org gemeenschap","Ondertiteld door de Amara.org gemeenschap","Dank u wel voor het kijken.","Ondertiteling door de Amara.org gemeenschap","GELUID VAN MAHIH U similarly"],french:["(applaudissements)","[Applaudissements]","Sous-titres réalisés par la communauté d'Amara.org","- Bonne journée. - Bonjour.","POP POP הי","Merci d'avoir regardé cette vidéo.","Merci d'avoir regardé cette vidéo!","Merci d'avoir regardé la vidéo.","J'espère que vous avez apprécié la vidéo.","Je vous remercie de vous abonner","Merci d'avoir regardé!","❤️ par SousTitreur.com","— Sous-titrage ST'501 —","Thanks for watching!","Sous-titres réalisés par l'Amara.org","Sous-titres réalisés para la communauté d'Amara.org","Sous-titres réalisés par la communauté d'Amara.org","Sous-titres fait par Sous-titres par Amara.org","Sous-titres réalisés par les SousTitres d'Amara.org","Sous-titres par Amara.org","Sous-titres par la communauté d'Amara.org","Sous-titres réalisés pour la communauté d'Amara.org","Sous-titres réalisés par la communauté de l'Amara.org","Sous-Titres faits par la communauté d'Amara.org","Sous-titres par l'Amara.org","Sous-titres fait par la communauté d'Amara.org","Sous-titrage ST' 501","Sous-titrage ST'501","Cliquez-vous sur les sous-titres et abonnez-vous à la chaîne d'Amara.org","❤️ par SousTitreur.com"],german:["[Klicken]","(Jubel)","*lacht*","[Anhaltender Beifall]","[Applaus]","(Applaus)","* Applaus *","[MUSIK]","* mustard ml Drumglöck und knack in einem Handbewerb *","Untertitelung aufgrund der Amara.org-Community","Untertitel im Auftrag des ZDF für funk, 2017","Untertitel von Stephanie Geiges","Untertitel der Amara.org-Community","Untertitel im Auftrag des ZDF, 2017","Untertitel im Auftrag des ZDF, 2020","Untertitel im Auftrag des ZDF, 2018","Untertitel im Auftrag des ZDF, 2021","Untertitelung im Auftrag des ZDF, 2021","Copyright WDR 2021","Copyright WDR 2020","Copyright WDR 2019","SWR 2021","SWR 2020"],italian:["Alla prossima!","*applauso*","[Musica]","[Musica]","[Applausi]","*Bip bip bip bip*","(musica del NS shore)","D' 1962 alle tribunte del Gulf","Sottotitoli creati dalla comunità Amara.org","Sottotitoli di Sottotitoli di Amara.org","Sottotitoli e revisione al canale di Amara.org","Sottotitoli e revisione a cura di Amara.org","Sottotitoli e revisione a cura di QTSS","Sottotitoli e revisione a cura di QTSS.","Sottotitoli a cura di QTSS","Sottotitoli a cura di Sottotitoli"],spanish:["[música]","[Música de cierre]","[Aplausos]","(Aplausos)","www.alimmenta.com","¡Gracias por ver el vídeo!","(sonidos del celular) (Inudible distorsión)","¡Suscríbete!","Subtítulos realizados por la comunidad de Amara.org","Subtitulado por la comunidad de Amara.org","Subtítulos por la comunidad de Amara.org","Subtítulos creados por la comunidad de Amara.org","Subtítulos en español de Amara.org","Subtítulos hechos por la comunidad de Amara.org","Subtitulos por la comunidad de Amara.org","Más información www.alimmenta.com","www.mooji.org","[MÚSICA]","[Music cuts in British]"]},Lt=e=>{let t=e;return Object.values(qi).forEach(n=>{n.forEach(r=>{t=t.replaceAll(r,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},xt=6e4,Dt=8e3,Pt=2,Kt=.4,Ji=3,Zi=new Set(["aan","als","ben","bent","bij","dan","dat","deze","die","dit","doen","door","dus","echt","een","eens","even","gaan","gaat","geen","geweest","goed","graag","had","heb","hebben","hebt","heeft","het","hier","hoe","hoor","iets","inderdaad","kan","klopt","kunnen","kunt","maar","mag","mee","meer","met","mij","mijn","misschien","moet","moeten","naar","net","niet","nog","nou","oke","ook","over","prima","toch","uhm","uit","van","veel","voor","wat","weer","weet","wel","wij","wil","wilt","worden","wordt","zeg","zeggen","zijn","zou","zult","about","and","are","been","but","can","does","for","have","just","know","like","not","okay","right","she","that","the","them","then","there","they","this","want","was","well","were","what","will","with","would","yeah","you","your"]);function $t(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<Ji||Zi.has(n)||t.add(n);return[...t]}function Ut(e,t){if(!e.length)return 0;if(!t.length)return 1;const n=new Set(t),r=new Set(e);let i=0;for(const a of r)n.has(a)||(i+=1);return i/r.size}function Bt(e,t=xt){const n=e.filter(o=>!o.partial&&typeof o.text=="string");if(!n.length)return{text:"",segmentCount:0};const i=n.reduce((o,s)=>Math.max(o,s.endedAt??0),0)-t;return{text:n.filter(o=>(o.endedAt??0)>=i).map(o=>Lt(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const Ft=60;function Qi(e,t,n=Ft){const r=new Set(e),i=[...e];for(const a of t)!a||r.has(a)||(r.add(a),i.push(a));return i.slice(-n)}function ea(e){const{segments:t,now:n,state:r}=e;if(r.lastTriggerAt&&n-r.lastTriggerAt<Dt)return{trigger:!1,reason:"too_soon"};const i=Bt(t,e.windowMs);if(!i.text)return{trigger:!1,reason:"no_speech"};const a=i.segmentCount-(r.lastSegmentCount??0);if(r.lastQueryTerms&&a<Pt)return{trigger:!1,reason:"too_few_new"};const o=$t(i.text);return o.length?r.lastQueryTerms?.length&&Ut(o,r.lastQueryTerms)<Kt?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:i.text,terms:o,segmentCount:i.segmentCount}:{trigger:!1,reason:"no_speech"}}const k={NL:{callingCode:"31",trunkPrefix:"0",nsnMin:7,nsnMax:9},BE:{callingCode:"32",trunkPrefix:"0",nsnMin:8,nsnMax:9},LU:{callingCode:"352",nsnMin:6,nsnMax:9},DE:{callingCode:"49",trunkPrefix:"0",nsnMin:6,nsnMax:13},FR:{callingCode:"33",trunkPrefix:"0",nsnMin:9,nsnMax:9},GB:{callingCode:"44",trunkPrefix:"0",nsnMin:9,nsnMax:10},IE:{callingCode:"353",trunkPrefix:"0",nsnMin:7,nsnMax:9},ES:{callingCode:"34",nsnMin:9,nsnMax:9},PT:{callingCode:"351",nsnMin:9,nsnMax:9},IT:{callingCode:"39",nsnMin:6,nsnMax:11},AT:{callingCode:"43",trunkPrefix:"0",nsnMin:7,nsnMax:13},CH:{callingCode:"41",trunkPrefix:"0",nsnMin:9,nsnMax:9},DK:{callingCode:"45",nsnMin:8,nsnMax:8},SE:{callingCode:"46",trunkPrefix:"0",nsnMin:7,nsnMax:13},NO:{callingCode:"47",nsnMin:8,nsnMax:8},FI:{callingCode:"358",trunkPrefix:"0",nsnMin:5,nsnMax:12},PL:{callingCode:"48",nsnMin:9,nsnMax:9},US:{callingCode:"1",nsnMin:10,nsnMax:10},CA:{callingCode:"1",nsnMin:10,nsnMax:10}},Gt="NL",ta=15,na=8,ra=Array.from(new Set(Object.values(k).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function he(e){if(e)return k[e.trim().toUpperCase()]}function C(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function Ee(e){if(e.length>ta)return null;for(const t of ra){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const r of Object.values(k)){if(r.callingCode!==t)continue;const i=r.trunkPrefix,a=i&&n.startsWith(i)?n.slice(i.length):n;if(C(a,r))return`+${t}${a}`}return null}return e.length<na?null:`+${e}`}function ia(e){let t=e.trim();const n=t.match(/^(sips?|tel|whatsapp):/i);n&&(t=t.slice(n[0].length));const r=t.indexOf("@");return r>=0&&(t=t.slice(0,r)),t.trim()}function aa(e){if(!e)return!1;const t=e.indexOf("@");if(t<=0)return!1;const n=e.slice(0,t).trim();return!/^[+\d\s().-]+$/.test(n)}function V(e,t){if(!e)return null;const n=ia(e);if(!n)return null;const r=n.startsWith("+"),i=n.replace(/\D/g,"");if(!i)return null;if(r)return Ee(i);if(i.startsWith("00"))return Ee(i.slice(2));const a=he(t)??he(Gt);if(!a)return null;const o=a.trunkPrefix;if(o&&i.startsWith(o)){const s=i.slice(o.length);return C(s,a)?`+${a.callingCode}${s}`:null}if(i.startsWith(a.callingCode)){const s=i.slice(a.callingCode.length);if(C(s,a))return`+${a.callingCode}${s}`}return!o&&C(i,a)?`+${a.callingCode}${i}`:null}function oa(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function ae(e){if(!e)return null;const t=e.trim().toLowerCase(),n=t.lastIndexOf("@");if(n<=0||n===t.length-1)return null;const r=t.slice(0,n).split("+")[0],i=t.slice(n+1);return!r||!i.includes(".")?null:`${r}@${i}`}function sa(e){const t=ae(e);return t?t.slice(t.lastIndexOf("@")+1):null}const ca=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function jt(e){if(!e)return null;const t=e.trim().toLowerCase().replace(/\.$/,"").split(".").filter(Boolean);if(t.length<2)return null;const n=t.slice(-2).join(".");return ca.has(n)&&t.length>=3?t.slice(-3).join("."):n}const Wt=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","hotmail.nl","hotmail.be","hotmail.co.uk","live.com","live.nl","live.be","msn.com","yahoo.com","yahoo.co.uk","ymail.com","icloud.com","me.com","mac.com","aol.com","gmx.net","gmx.de","web.de","protonmail.com","proton.me","pm.me","tutanota.com","zoho.com","mail.com","ziggo.nl","kpnmail.nl","planet.nl","home.nl","casema.nl","chello.nl","xs4all.nl","telfort.nl","hetnet.nl","zonnet.nl","upcmail.nl","quicknet.nl","telenet.be","skynet.be","proximus.be","scarlet.be"]);function la(e){const t=jt(e);return t?Wt.has(t):!1}function ua(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function da(e,t,n){if(!e||!t)return null;const r=e.trim().toLowerCase();if(r==="tel"||r==="sms"||r==="whatsapp"){const a=V(t,n);return a?`tel:${a}`:null}if(r==="fax"){const a=V(t,n);return a?`fax:${a}`:null}if(r==="mailto"||r==="email"){const a=ae(t);return a?`mailto:${a}`:null}const i=t.trim().toLowerCase();return i?`${r}:${i}`:null}const pa=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,fa=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function ma(e){if(typeof e!="string"||!e)return"";let t=e;return t=t.replace(/```[a-z]*\n?/gi,"").replace(/~~~[a-z]*\n?/gi,""),t=t.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\[[^\]]*\]/g,"$1"),t=t.replace(/<((?:https?|mailto):[^>\s]+)>/gi,"$1"),t=t.split(`
|
|
8
8
|
`).map(n=>n.replace(/^\s{0,3}#{1,6}\s+/,"").replace(/^\s{0,3}>\s?/,"").replace(/^\s*[-*+]\s+/,"").replace(/^\s*\d+[.)]\s+/,"").replace(/^\s*(?:[-*_]\s*){3,}$/,"")).join(`
|
|
9
|
-
`),t=t.replace(
|
|
10
|
-
`);for(let n=0;n<t.length;n++)if(
|
|
9
|
+
`),t=t.replace(pa,"$2"),t=t.replace(fa,"$2"),t=t.replace(/~~(?=\S)([\s\S]*?\S)~~/g,"$1"),t=t.replace(/`([^`\n]+)`/g,"$1"),t.replace(/\s+/g," ").trim()}const ga=[/<blockquote/i,/class="?gmail_quote/i,/id="?[^"]*divRplyFwdMsg/i,/id="?[^"]*mail-editor-reference-message-container/i,/-{3,}\s*Original Message\s*-{3,}/i,/\n_{5,}\s*\n/,/\bOn\b[\s\S]{0,200}?\bwrote:/i],Ae=/^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,ha=/^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;function Ea(e){const t=e.split(`
|
|
10
|
+
`);for(let n=0;n<t.length;n++)if(ha.test(t[n])||Ae.test(t[n])&&t.slice(n+1,n+4).some(r=>Ae.test(r)))return t.slice(0,n).join(`
|
|
11
11
|
`).trim();return e}function ye(e){let t=e;return t=t.replace(/<(script|style)[\s\S]*?<\/\1>/gi,""),t=t.replace(/<br\s*\/?>/gi,`
|
|
12
12
|
`),t=t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi,`
|
|
13
13
|
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
`),t=t.replace(/<\/(td|th)>/gi," "),t=t.replace(/<[^>]+>/g,""),t=t.replace(/<[^>]*$/,""),t}function Se(e){return!Number.isInteger(e)||e<0||e>1114111?null:String.fromCodePoint(e)}function _e(e){return e.replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/&#(\d+);/g,(t,n)=>Se(Number(n))??t).replace(/&#x([0-9a-f]+);/gi,(t,n)=>Se(parseInt(n,16))??t).replace(/&/gi,"&")}function Te(e){return e.replace(/\r/g,"").replace(/[ \t]+/g," ").replace(/ *\n */g,`
|
|
16
16
|
`).replace(/\n{3,}/g,`
|
|
17
17
|
|
|
18
|
-
`).trim()}function
|
|
18
|
+
`).trim()}function Aa(e){if(typeof e!="string"||!e)return"";let t=e.length;for(const a of ga){const o=e.search(a);o>=0&&o<t&&(t=o)}const n=e.slice(0,t);let r=Te(_e(ye(n)));return r||(r=Te(_e(ye(e)))),Ea(r)||r}const ya=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,Sa=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function _a(e,t){return!!(e&&ya.test(e)||t&&Sa.test(t))}const Vt=3,Ht=600;function Ta(e,t){return e>=Vt||t>=Ht}exports.ACTIVITY_CATALOG=m;exports.AI_ATTACHMENT_LIMITS=St;exports.AI_ATTACHMENT_MAX_PER_TURN=di;exports.AI_ATTACHMENT_TURN_BUDGET=ui;exports.AI_VENDORS=X;exports.ALLOWED_LINK_SCHEMES=xe;exports.APP_PERMISSIONS=Li;exports.ARTIFACT_MAX_BLOCKS=K;exports.ARTIFACT_MAX_BODY_BYTES=kn;exports.ARTIFACT_MAX_CELL_LEN=I;exports.ARTIFACT_MAX_KPI_ITEMS=F;exports.ARTIFACT_MAX_LIST_ITEMS=$;exports.ARTIFACT_MAX_TABLE_COLUMNS=B;exports.ARTIFACT_MAX_TABLE_ROWS=U;exports.ARTIFACT_MAX_TEXT_LEN=z;exports.ASSIGNMENT_SCOPE_KIND=$e;exports.AUTH_APP_NAME=re;exports.ActivityTypeRegistry=Ce;exports.BUILT_IN_ONLY=dn;exports.CADENCE_FLOOR_MS=Dt;exports.CADENCE_MIN_NEW_SEGMENTS=Pt;exports.CADENCE_MIN_NOVELTY=Kt;exports.CADENCE_WINDOW_MS=xt;exports.CLASSIFY_VARS=kr;exports.CORE_DIMENSIONS=Mn;exports.CommunicationScheme=Mt;exports.DEFAULT_MEMORY_BUDGET=yr;exports.DEFAULT_PHONE_REGION=Gt;exports.EMPTY_WORKFLOW=vr;exports.FEATURE_FOLDER_MANAGEMENT=Oi;exports.FEATURE_REMOTE_SEARCH=ki;exports.INSTALLATION_HEADER=vi;exports.INTERACTION_KIND=Qe;exports.InteractionParticipantRole=wi;exports.KB_FALLBACK_LOCALE=We;exports.KB_LOCALES=G;exports.LOOSE_STATUSES=O;exports.MAX_ACTIONS=b;exports.MAX_ASSIGNMENT_TURNS=Ue;exports.MAX_BLOCKS=D;exports.MAX_COLLECTION_DEPTH=J;exports.MAX_FIELDS=_;exports.MAX_LIST_ITEMS=T;exports.MAX_MEMORY_BROWSE=gr;exports.MAX_MEMORY_BUDGET=Ar;exports.MAX_MEMORY_CHARS=hr;exports.MAX_SHOWN_KEYS=Ft;exports.MAX_TOPIC_CANDIDATES=ct;exports.MAX_TOPIC_EXAMPLES=st;exports.MAX_TOPIC_EXAMPLE_CHARS=M;exports.MIN_MEMORY_BUDGET=Er;exports.PHONE_REGIONS=k;exports.PRESENCE_ONLINE_WINDOW_MS=ne;exports.PRESENCE_SURVIVES_OFFLINE=Ct;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=Ci;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=Mi;exports.PUBLIC_EMAIL_DOMAINS=Wt;exports.READ_STEP_TYPES=j;exports.RELATED_SUBJECT_KINDS=He;exports.RESERVED_STATUS_KEYS=te;exports.RESOURCE_DESCRIBE_SERVICE=$i;exports.RESOURCE_RESOLVE_SERVICE=Bi;exports.RESOURCE_SEARCH_SERVICE=Ui;exports.SIGNATURE_INTENTS=qn;exports.STEP_MAX_TOKENS_MAX=nt;exports.STEP_MAX_TOKENS_MIN=tt;exports.SUMMARY_MIN_LAST_CHARS=Ht;exports.SUMMARY_MIN_MESSAGES=Vt;exports.SYNC_RUN_MAX_ERRORS=Yi;exports.SYNC_SOURCE_PROVIDER_GROUP=Xi;exports.SYNC_TARGET_PROVIDER_GROUP=zi;exports.TERMINAL_ASSIGNMENT_STATUSES=Ke;exports.TERMINAL_RUN_STATUSES=rt;exports.TRIGGER_VARS=Or;exports.UNSUPPORTED=Ri;exports.USAGE_DIMENSIONS=ke;exports.USAGE_DIMENSION_IDS=Re;exports.WORK_COMMENT_ADDED=qr;exports.WORK_ITEM_ASSIGNED=Jr;exports.WORK_ITEM_SCOPE_KIND=pt;exports.WORK_PROJECT_SCOPE_KIND=ft;exports.acceptExampleCandidate=Xr;exports.actingIdentityKey=ze;exports.activeWorkTypes=Vr;exports.activityIconOf=qt;exports.activityJoinUrl=sn;exports.activitySnippet=Ie;exports.activityTextParams=Me;exports.activityTimelineText=on;exports.activityTimestamp=fn;exports.activityTypeInfo=c;exports.actorKey=br;exports.addExampleCandidate=Hr;exports.agePresenceEntry=Di;exports.aiAttachmentKind=yt;exports.aiAttachmentRejection=pi;exports.aiBudgetLimit=P;exports.aiBudgetPeriodKey=Tn;exports.aiBudgetPeriodStart=we;exports.aiBudgetState=_n;exports.aiVendorAcceptsAttachment=Sn;exports.aiVendorDefaultModel=En;exports.aiVendorLabel=hn;exports.aiVendorNeedsBaseUrl=yn;exports.aiVendorsWith=An;exports.appNameFromPath=ie;exports.applyRounding=Br;exports.applySignature=Jn;exports.artifactBodyBytes=$n;exports.artifactOutline=Un;exports.artifactToMarkdown=Fn;exports.assignmentMismatch=wr;exports.assignmentScopeKey=Hn;exports.assignmentSubject=zn;exports.buildActivityPreview=ln;exports.buildChannelIntents=yi;exports.buildShareKeys=Gn;exports.buildWindow=Bt;exports.canNestUnder=cr;exports.carriesText=en;exports.categoryLabel=ur;exports.categoryOf=ht;exports.channelKindForScheme=Ii;exports.channelKindOf=Jt;exports.clampStepMaxTokens=Rr;exports.cleanMessageText=Aa;exports.compareWorkTypes=ot;exports.decideAssignmentState=Yn;exports.decideCadence=ea;exports.decideIncomingCall=hi;exports.defaultLocaleOf=Ve;exports.defaultStatusKey=ii;exports.defineIntent=Ni;exports.depthOf=Ge;exports.derivePresence=xi;exports.disabledIntentsFromCapabilities=Ei;exports.elapsedSeconds=Ur;exports.emailDomain=sa;exports.endpointKey=da;exports.extractParams=Ot;exports.extractTerms=$t;exports.filterByEndpoint=_i;exports.filterByIntent=Si;exports.filterByTargetScheme=It;exports.findAiVendor=E;exports.flattenLocales=In;exports.floorToPeriod=Oe;exports.formatActingIdentity=Xe;exports.formatClock=Gr;exports.formatHm=Fr;exports.formatItemKey=Zr;exports.formatPeriod=Ne;exports.freshSources=fi;exports.getActivitySeenUserIds=pn;exports.getContactEndpoints=Zn;exports.getShortTitle=nr;exports.getUrgencyScore=tr;exports.heightOf=Z;exports.helpCenterText=ar;exports.humanizeAction=Nr;exports.interactionIdOf=et;exports.isAgentUser=Yr;exports.isAssigned=Qn;exports.isAssignmentTerminal=Vn;exports.isAssignmentTrigger=Je;exports.isChatMessageActivity=gn;exports.isClosed=er;exports.isConnectedType=rn;exports.isDeepLink=Gi;exports.isDescendant=je;exports.isEmailActivity=mn;exports.isInFlight=Pr;exports.isInteractionUnseen=rr;exports.isLandingPath=ji;exports.isLikelyBulk=_a;exports.isMessageShape=H;exports.isMessageType=Zt;exports.isMoreSpecificPattern=Rt;exports.isPaused=it;exports.isPlaybookAuthoredType=nn;exports.isPublicEmailDomain=la;exports.isPublicPath=Hi;exports.isReplyableType=Qt;exports.isTerminal=Dr;exports.isThreadLongEnough=Ta;exports.isTranscriptType=an;exports.isWorkClosed=ai;exports.isWorkTypeVisible=Wr;exports.itemDossierKeys=ti;exports.ladderFor=gt;exports.linkLabel=ir;exports.listeningAllowed=bn;exports.localeInstruction=sr;exports.localeName=or;exports.localesOf=lr;exports.looksLikeEmail=aa;exports.matchContactToIntents=Ti;exports.matchPublicRoute=vt;exports.mcpCredentialScope=fr;exports.mcpToolPrefix=mr;exports.mergeShownKeys=Qi;exports.messageCountsAs=tn;exports.needsPhoneRegion=ua;exports.normalizeArtifactBlocks=Kn;exports.normalizeBlocks=Yt;exports.normalizeEmail=ae;exports.normalizeExample=g;exports.novelty=Ut;exports.parseActingIdentity=_r;exports.parseItemKey=Qr;exports.pathToRegex=Nt;exports.periodsInRange=Nn;exports.phoneSuffix=oa;exports.plainTextFromMarkdown=ma;exports.playbookActor=qe;exports.procedureOf=xr;exports.projectDossierKeys=ni;exports.publicBasePathFor=kt;exports.publicRoutePatterns=Vi;exports.readPath=w;exports.readStepError=W;exports.refKey=Ze;exports.registrableDomain=jt;exports.rejectExampleCandidate=ut;exports.relatedByDefault=Sr;exports.resolveAccountCapabilities=bt;exports.resolveActivityText=N;exports.resolveChannelIntents=Tt;exports.resolveSignature=Be;exports.resolveWorkMode=Pi;exports.resourceKindOf=Fi;exports.runActor=Tr;exports.runInteractionId=$r;exports.sanitizeInline=Pe;exports.sanitizeTranscript=Lt;exports.selectLenses=pr;exports.sessionsHoldCannotReach=gi;exports.sessionsToHold=mi;exports.shareKeyForTeam=q;exports.shareKeyForUser=Y;exports.shareKeysForViewer=jn;exports.shouldRunAudioPipeline=Ki;exports.sortStatuses=Et;exports.sourceKey=_t;exports.statusIn=ri;exports.stepsOf=Lr;exports.stripHtml=be;exports.subjectKeyOf=Kr;exports.subjectOf=Q;exports.suggestProjectKey=ei;exports.targetById=Cr;exports.targetForActivityType=Mr;exports.toActingIdentity=Ye;exports.toE164=V;exports.toolSourceKinds=Wn;exports.topicOfferedForTeam=dt;exports.topicsForTeam=zr;exports.truncateExample=lt;exports.uniqueWorkStatusKey=oi;exports.uniqueWorkTypeKey=jr;exports.usageMetricId=ve;exports.usageMetrics=On;exports.validateStatuses=si;exports.valueAtPath=Ir;exports.wakesAssignment=Xn;exports.workItemScopeKey=mt;exports.workProjectScopeKey=ee;exports.workStatusKey=At;exports.workTypeKey=at;
|