@helpai/elements 1.12.3 → 1.12.6

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/llms.txt CHANGED
@@ -1,11 +1,11 @@
1
1
  # Help AI Elements
2
2
 
3
- > Help AI's AI chat widget for any website: an AI agent that answers visitors from the customer's own help content, can hand the chat to a person, and shows Help articles and News. Install it with one script tag, the `<web-ai-chat>` element, the npm API or the React kit. These docs match @helpai/elements@1.12.3.
3
+ > Help AI's AI chat widget for any website: an AI agent that answers visitors from the customer's own help content, can hand the chat to a person, and shows Help articles and News. Install it with one script tag, the `<web-ai-chat>` element, the npm API or the React kit. These docs match @helpai/elements@1.12.6.
4
4
 
5
5
  What a coding agent needs to install it right the first time:
6
6
 
7
7
  - Two values come from the deployment's Install page in the Help AI dashboard: the public key (`agent_pk_…`) and the AI agent deployment id (a UUID). Both belong in browser code. The deployment's secret key never does.
8
- - Plain HTML, WordPress or any CMS: `<script src="https://cdn.help.ai/sdk/js/elements/1.12.3/elements.js" data-public-key="agent_pk_…" data-ai-agent-deployment-id="…" defer></script>`.
8
+ - Plain HTML, WordPress or any CMS: `<script src="https://cdn.help.ai/sdk/js/elements/1.12.6/elements.js" data-public-key="agent_pk_…" data-ai-agent-deployment-id="…" defer></script>`.
9
9
  - React, Next.js, Remix: install `@helpai/elements` and render `<HelpAI publicKey="…" aiAgentDeploymentId="…" />` from `@helpai/elements/react` once, in the root layout. `useHelpAI()` in any component returns `{ state, ask, open, close, reset }`. It is server-render safe; import everything from `@helpai/elements/react`.
10
10
  - Vue, Svelte, Angular and other bundlers: `import '@helpai/elements/web-component'`, then `<web-ai-chat public-key="…" ai-agent-deployment-id="…"></web-ai-chat>`. JSX typings: `@helpai/elements/jsx/react`, `/jsx/vue`, `/jsx/svelte`.
11
11
  - Site buttons need no JavaScript: `data-helpai-ask="Which plan fits a team of 10?"` puts the question in the chat, `data-helpai-open="help"` opens a tab (`home`, `chats`, `help`, `news`). In code, `ask(text)` fills the composer and sends only with `{ send: true }`.
@@ -18,23 +18,23 @@ What a coding agent needs to install it right the first time:
18
18
 
19
19
  ## Docs
20
20
 
21
- - [Quickstart](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/quickstart.md): credentials, the install paths and a first check, in five minutes
22
- - [Installation](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/installation.md): every install path in depth: script tag, async loader, npm, web component, CDN URLs and version pinning
23
- - [Frameworks](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/frameworks.md): the React kit (`<HelpAI />`, `useHelpAI()`), Next.js, Remix, Vue, Nuxt, Svelte, Astro, Angular, WordPress, Shopify, Webflow
24
- - [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/configuration.md): every option by group, with examples
25
- - [Option reference](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/options.md): the table of every option, generated from the schemas; authoritative
26
- - [API reference](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/api-reference.md): exports, instance methods (`ask`, `open`, `state`, `ready`, `reset`, …), the global API, no-script triggers, deep links, JSX typings
27
- - [Events and hooks](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/events-and-hooks.md): every event and its payload, `on()` and `hook()`
28
- - [Page tools](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/page-tools.md): WebMCP-shaped tools the AI agent calls on your page (`registerTool`, `tools`, `useHelpAITool`, `<form toolname>`), run once in the browser
29
- - [Theming](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/theming.md): colors, shapes, fonts, launcher styles, `theme: "host"` and `::part()` styling
30
- - [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/recipes.md): copy-paste solutions for common integrations
31
- - [Analytics](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/analytics.md): sending widget activity to Google Analytics, Segment, PostHog and other trackers
32
- - [Security and privacy](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/security-privacy.md): isolation, CSP, what the widget stores and sends
33
- - [Browser support](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/browser-support.md): supported browsers and fallbacks
34
- - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/troubleshooting.md): an install that does not show, connect or answer
35
- - [FAQ](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/faq.md): short answers to common questions
36
- - [Overview](https://cdn.help.ai/sdk/js/elements/1.12.3/docs/README.md): the whole SDK on one page
21
+ - [Quickstart](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/quickstart.md): credentials, the install paths and a first check, in five minutes
22
+ - [Installation](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/installation.md): every install path in depth: script tag, async loader, npm, web component, CDN URLs and version pinning
23
+ - [Frameworks](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/frameworks.md): the React kit (`<HelpAI />`, `useHelpAI()`), Next.js, Remix, Vue, Nuxt, Svelte, Astro, Angular, WordPress, Shopify, Webflow
24
+ - [Configuration](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/configuration.md): every option by group, with examples
25
+ - [Option reference](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/options.md): the table of every option, generated from the schemas; authoritative
26
+ - [API reference](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/api-reference.md): exports, instance methods (`ask`, `open`, `state`, `ready`, `reset`, …), the global API, no-script triggers, deep links, JSX typings
27
+ - [Events and hooks](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/events-and-hooks.md): every event and its payload, `on()` and `hook()`
28
+ - [Page tools](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/page-tools.md): WebMCP-shaped tools the AI agent calls on your page (`registerTool`, `tools`, `useHelpAITool`, `<form toolname>`), run once in the browser
29
+ - [Theming](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/theming.md): colors, shapes, fonts, launcher styles, `theme: "host"` and `::part()` styling
30
+ - [Recipes](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/recipes.md): copy-paste solutions for common integrations
31
+ - [Analytics](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/analytics.md): sending widget activity to Google Analytics, Segment, PostHog and other trackers
32
+ - [Security and privacy](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/security-privacy.md): isolation, CSP, what the widget stores and sends
33
+ - [Browser support](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/browser-support.md): supported browsers and fallbacks
34
+ - [Troubleshooting](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/troubleshooting.md): an install that does not show, connect or answer
35
+ - [FAQ](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/faq.md): short answers to common questions
36
+ - [Overview](https://cdn.help.ai/sdk/js/elements/1.12.6/docs/README.md): the whole SDK on one page
37
37
 
38
38
  ## Optional
39
39
 
40
- - [Every doc in one file](https://cdn.help.ai/sdk/js/elements/1.12.3/llms-full.txt): the docs above, concatenated
40
+ - [Every doc in one file](https://cdn.help.ai/sdk/js/elements/1.12.6/llms-full.txt): the docs above, concatenated
package/package.json CHANGED
@@ -117,5 +117,5 @@
117
117
  ],
118
118
  "type": "module",
119
119
  "types": "./index.d.ts",
120
- "version": "1.12.3"
120
+ "version": "1.12.6"
121
121
  }
package/react.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import{useEffect as e,useMemo as t,useRef as n,useSyncExternalStore as r}from"react";function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}function a(e,t){if(i(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(i(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function o(e){var t=a(e,`string`);return i(t)==`symbol`?t:t+``}function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c={open:!1,ready:!1,unread:0};var l=class{constructor(){s(this,`handlers`,/* @__PURE__ */ new Map)}on(e,t){let n=this.handlers.get(e);return n||(n=/* @__PURE__ */ new Set,this.handlers.set(e,n)),n.add(t),()=>this.handlers.get(e)?.delete(t)}emit(e,t){let n=this.handlers.get(e);if(n)for(let e of n)try{e(t)}catch{}}clear(){this.handlers.clear()}};const u={id:`help-ai`,name:`@helpai/elements`,global:`HelpAI`,tagName:`web-ai-chat`,cssPrefix:`helpai`,defaultBaseUrl:`https://help.ai`,displayName:`Help AI`,domain:`help.ai`,siteUrl:`https://help.ai`},d=[`off`,`error`,`warn`,`info`,`debug`,`trace`],f=u.cssPrefix,p=`${f}.debug`,m=`__${u.global}_DEBUG__`,h=`${f}-debug`;let g=2,_=null;function v(){if(typeof window>`u`)return 2;try{let e=new URLSearchParams(window.location.search).get(h);if(e!==null){let t=y(e);if(t>=0)return t}}catch{}try{let e=window.localStorage?.getItem(p);if(e){let t=y(e);if(t>=0)return t}}catch{}return Reflect.get(window,m)?4:2}function y(e){if(e===!0||e===`1`||e===`true`)return 4;if(e===!1||e===`0`||e===`false`||e===`off`)return 0;if(typeof e==`number`)return Math.max(0,Math.min(5,Math.floor(e)));if(typeof e==`string`){let t=d.findIndex(t=>t===e);if(t>=0)return t}return-1}function b(e){let t=y(e);if(!(t<0)){g=t;try{window.localStorage?.setItem(p,d[t]??`off`)}catch{}}}function x(){return d[g]??`warn`}g=v();function S(e){let t=`[${f}:${e}]`;function n(n,r,i){return(a,o)=>{if(!(g<n)&&(o===void 0?console[r](t,a):console[r](t,a,o),_))try{_({level:i,scope:e,message:a,payload:o})}catch{}}}return{error:n(1,`error`,`error`),warn:n(2,`warn`,`warn`),info:n(3,`info`,`info`),debug:n(4,`debug`,`debug`),trace:n(5,`debug`,`trace`),scope:t=>S(`${e}:${t}`)}}const C=S(`core`);function w(e){_=e}const T=/* @__PURE__ */ new Set([`hidden`,`submit`,`button`,`reset`,`image`,`file`,`password`]);function E(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement}function D(e){return!E(e)||e.name===``||e.disabled?!1:!(e instanceof HTMLInputElement&&T.has(e.type))}function O(e){let t=e.labels?.[0]?.textContent?.trim();return e.getAttribute(`toolparamdescription`)??(t||e.getAttribute(`aria-description`))??void 0}function ee(e,t){let n=O(e),r=n?{description:n}:{};return e instanceof HTMLSelectElement?{...r,type:`string`,enum:[...e.options].map(e=>e.value)}:e instanceof HTMLTextAreaElement?{...r,type:`string`}:e.type===`checkbox`?{...r,type:`boolean`}:e.type===`radio`?{...r,type:`string`,enum:t}:e.type===`number`||e.type===`range`?{...r,type:`number`}:{...r,type:`string`}}function k(e,t){Object.getOwnPropertyDescriptor(Reflect.getPrototypeOf(e)??e,`value`)?.set?.call(e,t),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}function te(e){return e==null?``:typeof e==`string`?e:JSON.stringify(e)}function ne(e,t){e instanceof HTMLInputElement&&e.type===`checkbox`?e.checked!==(t===!0||t===`true`)&&e.click():e instanceof HTMLInputElement&&e.type===`radio`?e.value===te(t)&&!e.checked&&e.click():k(e,te(t))}function A(e,t,n){let r=[...e.elements].filter(D),i={},a=/* @__PURE__ */ new Set;for(let e of r){var o;let t=r.flatMap(t=>t instanceof HTMLInputElement&&t.type===`radio`&&t.name===e.name?[t.value]:[]);i[o=e.name]??(i[o]=ee(e,t)),e.required&&a.add(e.name)}return{name:t,description:n,inputSchema:{type:`object`,properties:i,...a.size>0?{required:[...a]}:{}},execute(t){let n=typeof t==`object`&&t?Object.entries(t):[];for(let[e,t]of n)for(let n of r)n.name===e&&ne(n,t);if(!e.hasAttribute(`toolautosubmit`))return`Filled in the form. The visitor still needs to check it and press its submit button.`;let i=[...new Set([...e.elements].flatMap(e=>E(e)&&e.name&&!e.checkValidity()?[e.name]:[]))];return i.length>0?`Filled in the form, but it can't be submitted yet: ${i.join(`, `)} still needs the visitor. Ask them to complete it and press the submit button.`:(setTimeout(()=>e.requestSubmit(),0),`Filled in the form and submitted it.`)}}}function j(){return[...document.querySelectorAll(`form[toolname][tooldescription]`)].flatMap(e=>{let t=e.getAttribute(`toolname`)?.trim()??``,n=e.getAttribute(`tooldescription`)?.trim()??``;return t&&n?[A(e,t,n)]:[]})}const re=`${u.cssPrefix}.page-tools`;function ie(e){return typeof e==`object`&&!!e}function ae(e){return ie(e)&&(e.state===`running`||e.state===`stopped`||e.state===`finished`&&ie(e.outcome))}function oe(e){let t=e?JSON.parse(e):void 0;return ie(t)?{sent:Array.isArray(t.sent)?t.sent.filter(e=>typeof e==`string`):[],calls:Object.fromEntries(Object.entries(ie(t.calls)?t.calls:{}).filter(e=>ae(e[1])))}:{sent:[],calls:{}}}let se={sent:[],calls:{}};function ce(){try{se=oe(sessionStorage.getItem(re))}catch{}return se}function le(e){se=e;try{sessionStorage.setItem(re,JSON.stringify(e))}catch{}}const M={markSent(e){let t=ce();le({...t,sent:[...t.sent.filter(t=>t!==e),e].slice(-20)})},sentHere(e){return ce().sent.includes(e)},get(e){return ce().calls[e]},set(e,t){let n=ce(),r=Object.entries(n.calls).filter(([t])=>t!==e);le({...n,calls:Object.fromEntries([...r,[e,t]].slice(-50))})},clear(e){let t=ce();e.some(e=>e in t.calls)&&le({...t,calls:Object.fromEntries(Object.entries(t.calls).filter(([t])=>!e.includes(t)))})}};function ue(e,t){return new Promise(n=>{if(t?.aborted)return n();let r=setTimeout(a,e);function i(){return a()}t?.addEventListener(`abort`,i,{once:!0});function a(){clearTimeout(r),t?.removeEventListener(`abort`,i),n()}})}const de=C.scope(`page-tools`),fe=3e4,pe=Symbol.for(`${u.cssPrefix}.page-tools`),me={state:`output-error`,errorText:`The page reloaded before this finished, so it may or may not have taken effect. Check with the visitor before trying it again.`},he=`The visitor stopped this before it finished.`;function N(e){return typeof e==`object`&&!!e}function ge(e){return N(e)&&Array.isArray(e.registered)&&e.runs instanceof Map}function _e(){let e=Reflect.get(globalThis,pe);if(ge(e))return e;let t={registered:[],runs:/* @__PURE__ */ new Map};return Reflect.set(globalThis,pe,t),t}function ve(e,t){let n=N(t)&&t.signal instanceof AbortSignal?t.signal:void 0;if(n?.aborted)return;let r=_e().registered;r.push(e);function i(){let t=r.indexOf(e);t>=0&&r.splice(t,1)}n?.addEventListener(`abort`,i,{once:!0})}function ye(e){return e.replace(/[^A-Za-z0-9_-]/g,`_`).slice(0,58)}function be(e){if(!N(e)||typeof e.name!=`string`||!ye(e.name))return;let t=[e.description,e.title].find(e=>typeof e==`string`&&e.trim()!==``)??e.name;return{name:ye(e.name),description:t.trim().slice(0,1024),inputSchema:{properties:{},...N(e.inputSchema)?e.inputSchema:{},type:`object`},consequential:N(e.annotations)&&e.annotations.consequentialHint===!0}}function xe(e){return e.flatMap(e=>{let t=be(e),n=N(e)?e.execute:void 0;return!t||typeof n!=`function`?(de.warn(`skipped a tool without a name or an execute function`,e),[]):[{...t,run:(t,r)=>Reflect.apply(n,e,[t,{signal:r}])}]})}async function Se(){let e=Reflect.get(document,`modelContext`)??Reflect.get(navigator,`modelContext`);if(!N(e)||typeof e.getTools!=`function`||typeof e.executeTool!=`function`)return[];let t=e.getTools,n=e.executeTool,r=await Promise.race([Promise.resolve().then(()=>Reflect.apply(t,e,[])),ue(1e3).then(()=>[])]).catch(()=>[]);return(Array.isArray(r)?r:[]).flatMap(t=>{let r=be(t);return r?[{...r,run:(r,i)=>Reflect.apply(n,e,[t,r,{signal:i}])}]:[]})}async function Ce(e=[]){let t=xe(j()),n=new Set(t.map(e=>e.name)),r=[...(await Se()).filter(e=>!n.has(e.name)),...t,...xe(e),...xe(_e().registered)];return new Map(r.map(e=>[e.name,e]))}function we(e){return[...e.values()].map(({name:e,description:t,inputSchema:n,consequential:r})=>r?{name:e,description:t,inputSchema:n,annotations:{consequentialHint:!0}}:{name:e,description:t,inputSchema:n})}function Te(e){return e?.execution===`client`}function Ee(e){return e.startsWith(`site__`)?e.slice(6):e}function De(e){if(e===void 0||typeof e==`function`||typeof e==`symbol`)return null;let t=/* @__PURE__ */ new WeakSet,n=JSON.stringify(e,(e,n)=>{if(typeof n==`bigint`)return n.toString();if(typeof n!=`function`&&typeof n!=`symbol`)return n instanceof Node?`[${n.nodeName.toLowerCase()}]`:N(n)?t.has(n)?`[circular]`:(t.add(n),n):n});return n.length>fe?{truncated:!0,preview:n.slice(0,fe)}:JSON.parse(n)}async function Oe(e){let t=Ee(e.toolName),n=(await Ce(e.optionTools)).get(t);return n?Promise.resolve().then(()=>n.run(e.input,e.signal)).then(e=>({state:`output-available`,output:De(e)})).catch(e=>(de.warn(`a page tool failed`,{name:t,error:e}),{state:`output-error`,errorText:(e instanceof Error?e.message:String(e)).slice(0,1e3)||`The page tool failed.`})):{state:`output-error`,errorText:`This page doesn't offer "${t}" right now; the visitor may have moved on. Tell them, or continue without it.`}}function ke(e){let{toolCallId:t}=e,n=M.get(t);if(n?.state===`finished`)return Promise.resolve(n.outcome);let{runs:r}=_e(),i=r.get(t);if(i)return i.outcome;if(n?.state===`running`)return M.set(t,{state:`finished`,outcome:me}),e.onSettled(`interrupted`,0),Promise.resolve(me);let a=new AbortController,o=performance.now();M.set(t,{state:`running`});let s=Oe({...e,signal:a.signal}).then(n=>(r.delete(t),M.get(t)?.state===`running`&&(M.set(t,{state:`finished`,outcome:n}),e.onSettled(n.state===`output-available`?`completed`:`failed`,Math.round(performance.now()-o))),n));return r.set(t,{outcome:s,controller:a}),s}function Ae(e){return e===me.errorText||e===he}function je(e){return M.set(e,{state:`stopped`}),_e().runs.get(e)?.controller.abort(),he}function Me(e){M.clear([e]),_e().runs.get(e)?.controller.abort()}var P,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,F=Symbol.for(`pv`),Ue={},We=[],Ge=/^m(i|n|o|s|text|space)$/,Ke=Array.isArray,qe=We.slice,Je=Object.assign;function Ye(e){e&&e.parentNode&&e.remove()}function Xe(e,t,n){var r,i,a,o={},s=arguments.length;for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return s>2&&(o.children=s>3?qe.call(arguments,2):n),Ze(e,o,r,i,null)}function Ze(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:F,__v:i||++Ne,__i:-1,__u:0};return!i&&P.vnode&&P.vnode(a),a}function I(e){return e.children}function Qe(e,t){this.props=e,this.context=t,this.__g=0}function $e(e,t){if(t==null)return e.__&&$e(e.__,e.__i+1);for(var n;t<e.__k.length;t++)if((n=e.__k[t])&&n.__e)return n.__e;return typeof e.type!=`function`||e.props.__P?null:$e(e)}function et(e){if((e=e.__)&&e.__c&&!e.props.__P)return e.__e=null,e.__k.some(function(t){return t&&(e.__e=t.__e)}),et(e)}function tt(e){(8&e.__g||(e.__g|=8,Fe.push(e),Le++))&&Ie==P.debounceRendering||((Ie=P.debounceRendering)||queueMicrotask)(nt)}function nt(){var e,t,n,r,i,a,o,s,c;try{for(t=1;Fe.length;)Fe.length>t&&Fe.sort(Re),e=Fe.shift(),t=Fe.length,8&e.__g&&(r=void 0,i=void 0,a=(i=(n=e).__v).__e,o=[],s=[],(c=n.__P)&&((r=Je({constructor:F},i)).__v=i.__v+1,P.vnode&&P.vnode(r),dt(c,r,i,n.__n,c.namespaceURI,32&i.__u?[a]:null,o,a||$e(i),32&i.__u,s),r.__v=i.__v,r.__.__k[r.__i]=r,mt(o,r,s),i.__=i.__e=null,r.__e!=a&&et(r)))}finally{(Le=Fe.length)&&(Ie||queueMicrotask)(nt)}}function rt(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_=r.__k||We,v=t.length;for(c=it(n,t,_,c,v),d=0;d<v;d++)(p=n.__k[d])!=null&&(f=~p.__i&&_[p.__i]||Ue,p.__i=d,g=dt(e,p,f,i,a,o,s,c,l,u),m=p.__e,(f.ref!=p.ref||8&f.__u)&&(f.ref&&gt(f.ref,null,p,f),p.ref&&u.push(p.ref,p.__c||m,p)),h=h||m,4&p.__u?(c=at(p,c,e,!f.__v),f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-21);return n.__e=h,c}function it(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m=n.length,h=m,g=0,_=0,v=e.__k=Array(i);for(a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o!=`object`||o.constructor===String?o=v[a]=Ze(null,o):Ke(o)?o=v[a]=Ze(I,{children:o}):o.constructor===F&&o.__b?o=v[a]=Ze(o.type,o.props,o.key,o.ref,o.__v):v[a]=o,c=a+g,o.__=e,o.__b=e.__b+1,s=null,~(l=o.__i=st(o,n,c,h))&&(h--,(s=n[l])&&(s.__u|=2)),s&&s.__v?(o.__u|=16,l==c-1?g--:l==c+1?g++:l!=c&&(l>c?g--:g++,_=1)):(~l||(i>m?g--:i<m&&g++),typeof o.type!=`function`&&(o.__u|=4))):v[a]=null;if(_){for(u=[],d=[],a=0;a<i;a++)if((o=v[a])&&16&o.__u){for(g=0,f=u.length;g<f;)u[p=g+f>>1]<o.__i?g=p+1:f=p;u[g]=o.__i,d[a]=g+1}for(g=u.length;a--;)d[a]&&(d[a]==g?g--:v[a].__u|=4)}if(h)for(a=0;a<m;a++)!(s=n[a])||2&s.__u||(s.__e==r&&(r=$e(s)),_t(s,s));return r}function at(e,t,n,r){var i,a,o,s;if(typeof e.type==`function`){if(e.props.__P)return t;if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&(i[a].__=e,t=at(i[a],t,n,!1));return t}for(t&&!t.parentNode&&(t=$e(e))&&!t.parentNode&&(t=null),o=e.__e,s=t;s&&s.nodeType==8;)s=s.nextSibling;for(o!=s&&(!r&&n.moveBefore&&o.parentNode?n.moveBefore(o,t):n.insertBefore(o,t||null)),t=o;(t=t&&t.nextSibling)&&t.nodeType==8&&!t.data.startsWith(`$s`););return t}function ot(e,t){return t=t||[],e!=null&&typeof e!=`boolean`&&(Ke(e)?e.some(function(e){ot(e,t)}):t.push(e)),t}function st(e,t,n,r){var i,a=e.key,o=e.type,s=t[n],c=s&&!(2&s.__u);if(s===null&&a==null||c&&a==s.key&&o==s.type)return n;if(r>+!!c){for(i=n-1;i>=0;i--)if((s=t[i])&&!(2&s.__u)&&a==s.key&&o==s.type)return i;for(i=n+1;i<t.length;i++)if((s=t[i])&&!(2&s.__u)&&a==s.key&&o==s.type)return i}return-1}function ct(e,t,n){n??(n=``),t[0]==`-`?e.setProperty(t,n):e[t]=n}function lt(e,t,n,r,i){var a,o;if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||ct(e.style,t);if(n)for(t in n)r&&n[t]==r[t]||ct(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)(e.__e||(e.__e={}))[t]=n,n&&r||(o=He[t]||(He[t]=ut(t)),(e.__a||(e.__a={}))[t]=Ve,a=t!=(t=t.replace(Be,`$1`)),(t=t.slice(2))[0]<`a`&&(t=t.toLowerCase()),n?e.addEventListener(t,o,a):e.removeEventListener(t,o,a));else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;return}catch{}if(typeof n==`function`)return;n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n)}}function ut(e){return function(t){var n=this.__e;if(n){if(n=n[e],t[ze]==null)t[ze]=Ve++;else if(t[ze]<this.__a[e])return;return n(P.event?P.event(t):t)}}}function dt(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O=t.type;if(t.constructor!==F)return null;128&n.__u&&(c=32&n.__u,u=n.__c.__z)&&(t.__u|=c,d=a=[],u.nodeType==8?s=ft(u,a):a.push(u),s=a[0]||s),(u=P.__b)&&u(t);n:if(typeof O==`function`){f=o.length;try{if(_=t.props,v=(u=O.prototype)&&u.render,y=(u=O.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,(p=n.__c)?(t.__c=p,2&p.__g&&(p.__g|=1)):(v?t.__c=p=new O(_,b):(t.__c=p=new Qe(_,b),p.constructor=O,p.render=vt),y&&y.sub(p),p.state||(p.state={}),p.__n=r,p.__g|=8,p.__h=[],p.__k=[]),v&&(p.__s||(p.__s=p.state),O.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=Je({},p.__s)),Je(p.__s,O.getDerivedStateFromProps(_,p.__s)))),m=p.props,h=p.state,p.__v=t,n.__c){if(_!==m&&v&&!O.getDerivedStateFromProps&&p.componentWillReceiveProps&&p.componentWillReceiveProps(_,b),t.__v==n.__v&&!(8&p.__g)||!(4&p.__g)&&p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(_,p.__s,b)){t.__v!=n.__v&&(p.props=_,p.state=p.__s,p.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),We.push.apply(p.__h,p.__k),p.__k=[],p.__h.length&&o.push(p),s=$e(n);break n}p.componentWillUpdate&&p.componentWillUpdate(_,p.__s,b),v&&p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(m,h,g)})}else v&&!O.getDerivedStateFromProps&&p.componentWillMount&&p.componentWillMount(),v&&p.componentDidMount&&p.__h.push(p.componentDidMount);if(p.context=b,p.props=_,p.__P=e,p.__g&=-5,x=P.__r,S=0,v)p.state=p.__s,p.__g&=-9,x&&x(t),u=p.render(p.props,p.state,p.context),We.push.apply(p.__h,p.__k),p.__k=[];else do p.__g&=-9,x&&x(t),u=p.render(p.props,p.state,p.context),p.state=p.__s;while(8&p.__g&&++S<25);p.state=p.__s,p.getChildContext&&(r=Je({},r,p.getChildContext())),v&&n.__c&&p.getSnapshotBeforeUpdate&&(g=p.getSnapshotBeforeUpdate(m,h)),C=u&&u.type===I&&u.key==null?u.props.children:u,_.__P&&(u=s,i=(e=_.__P).namespaceURI,c=a=null,n.props&&n.props.__P!=e&&(n.__k.some(function(e){e&&_t(e,e)}),n.__k=null),s=n.__k?$e(n,0):null),s=rt(e,Ke(C)?C:[C],t,n,r,i,a,o,s,c,l),_.__P&&(t.__e=null,s=u),t.__u&=-161,d&&d.some(Ye),p.__h.length&&o.push(p),1&p.__g&&(p.__g&=-4)}catch(e){if(o.length=f,t.__v=null,c||a){if(e.then){if(w=0,t.__u|=128|c,a){for(~(E=a.indexOf(s||void 0))||(E=a.length);(D=a[E-1])&&D.nodeType==8;)E--;for(;E<a.length;E++)if(D=a[E]){if(a[E]=null,D.nodeType==8){if(D.data.startsWith(`$s`))w++||(T=D);else if(w&&D.data.startsWith(`/$s`)&&!--w)break}else if(!w)break}}if(!T){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;T=s}(u=ft(T=t.__c.__z||(t.__c.__z=T)))?(t.__e=T,s=u):t.__e=s,s=s&&s.nextSibling}else a&&a.some(Ye)}else t.__e=n.__e;t.__k||(t.__k=n.__k||[]),e.then||pt(t),P.__e(e,t,n)}}else s=t.__e=ht(n.__e,t,n,r,i,a,o,c,l,e);return(u=P.diffed)&&u(t),s}function ft(e,t){if(e&&e.nodeType==8&&e.data.startsWith(`$s`))for(var n=1;e=e.nextSibling;){if(e.nodeType==8){if(e.data.startsWith(`$s`))n++;else if(e.data.startsWith(`/$s`)&&!--n)return e}t&&t.push(e)}}function pt(e){e&&(e.__c&&(e.__c.__g|=4),e.__k&&e.__k.some(pt))}function mt(e,t,n){for(var r=0;r<n.length;)gt(n[r++],n[r++],n[r++]);P.__c&&P.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){P.__e(e,t.__v)}})}function ht(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y=n.props||Ue,b=t.props,x=t.type;if(x==`svg`?i=`http://www.w3.org/2000/svg`:x==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||(i=`http://www.w3.org/1999/xhtml`),a){for(u=0;u<a.length;u++)if((m=a[u])&&(x?m.localName==x:m.nodeType==3)){e=m,a[u]=null;break}}if(!e){if(_=l.ownerDocument||document,!x)return _.createTextNode(b);e=_.createElementNS(i,x,b.is&&b),s&&(P.__m&&P.__m(t,a),s=!1),a=null}if(x){if(l=x==`template`?e.content:e,a=x==`textarea`&&b.defaultValue!=null?null:a&&qe.call(l.childNodes),!s&&a)for(y={},u=0;u<e.attributes.length;u++)y[(m=e.attributes[u]).name]=m.value;for(u in y)m=y[u],u==`dangerouslySetInnerHTML`?f=m:u==`children`||u in b||u==`value`&&`defaultValue`in b||u==`checked`&&`defaultChecked`in b||lt(e,u,null,m,i);for(u in v=1&n.__u,b)m=b[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||!(y[u]!==m||v&&m!=null)||lt(e,u,m,y[u],i);d?(s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[]):(f&&(e.textContent=``),(x==`foreignObject`||i==`http://www.w3.org/1998/Math/MathML`&&Ge.test(x))&&(i=`http://www.w3.org/1999/xhtml`),rt(l,Ke(p)?p:[p],t,n,r,i,a,o,a?a[0]:n.__k&&$e(n,0),s,c),a&&a.some(Ye)),s&&x!=`textarea`||(u=`value`,x==`progress`&&h==null?e.removeAttribute(u):h==null||h===e[u]&&(x!=`progress`||h)||lt(e,u,h,y[u],i),u=`checked`,g!=null&&g!=e[u]&&lt(e,u,g,y[u],i))}else y===b||s&&e.data==b||(e.data=b);return e}function gt(e,t,n,r){try{typeof e==`function`?t?t.__x=e(t)||1:r&&(r=r.__c||r.__e)&&(t=r.__x)&&(r.__x=null,typeof t==`function`?t():e(null)):e.current=t}catch(e){P.__e(e,n)}}function _t(e,t,n){var r,i,a,o;if(P.unmount&&P.unmount(e),!(r=e.ref)||r.current&&r.current!=e.__e||gt(r,null,t,e),r=e.__c){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){P.__e(e,t)}r.__P=r.__n=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&_t(r[o],t,typeof e.type!=`function`||n&&!e.props.__P);!n&&(r=e.__c)&&(r=r.__z)&&(i=ft(r,a=[]))&&(r==e.__e&&a.some(Ye),Ye(i),Ye(r)),(r=e.__e)&&(n||Ye(r),r.__e&&(r.__e=null)),e.__e=e.__c=e.__=null}function vt(e,t,n){return this.constructor(e,n)}function yt(e,t){var n,r,i,a;P.__&&P.__(e,t),t.nodeType==9&&(t=t.documentElement),r=(n=e&&32&e.__u)?null:t.__k,t.__k=Ze(I,{children:[e]}),i=[],a=[],dt(t,t.__k,r||Ue,Ue,t.namespaceURI,r?null:t.firstChild?qe.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a),mt(i,t.__k,a),t.__k.props.children=null}P={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((o=(a=i.constructor)&&a.getDerivedStateFromError)&&i.setState(a.getDerivedStateFromError(e)),i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=1),o&&8&i.__g)return void(i.__g|=2)}catch(t){e=t}}throw Le=0,e}},Ne=0,Pe=function(e){return e!=null&&e.constructor===F},Qe.prototype.setState=function(e,t){var n=this.__s;n&&n!=this.state||(n=this.__s=Je({},this.state)),typeof e==`function`&&(e=e(Je({},n),this.props)),e&&(Je(n,e),this.__v&&(t&&this.__k.push(t),tt(this)))},Qe.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),tt(this))},Qe.prototype.render=I,Fe=[],Le=0,Re=function(e,t){return e.__v.__b-t.__v.__b},ze=Symbol(),Be=/(PointerCapture)$|Capture$/i,Ve=0,He={};function bt(e,t){if(e?.length&&t)return e.find(e=>e.locale===t)}function xt(e,t){let{translations:n,defaultLocale:r,...i}=e,a=bt(n,t);return a?{...i,title:a.title??i.title,description:a.description??i.description,content:a.content??i.content}:i}function St(e,t){let{translations:n,defaultLocale:r,...i}=e,a=bt(n,t);return a?{...i,title:a.title??i.title,description:a.description??i.description}:i}function Ct(e,t){let{translations:n,defaultLocale:r,...i}=e,a=bt(n,t);if(!a)return i;let o=new Map((a.fields??[]).map(e=>[e.name,e])),s=i.fields.map(e=>{let t=o.get(e.name);if(!t)return e;let n=new Map((t.options??[]).map(e=>[e.value,e]));return{...e,label:t.label??e.label,placeholder:t.placeholder??e.placeholder,validationHint:t.validationHint??e.validationHint,options:e.options?.map(e=>{let t=n.get(e.value);return t?{...e,label:t.label??e.label,description:t.description??e.description}:e})}});return{...i,title:a.title??i.title,description:a.description??i.description,submitLabel:a.submitLabel??i.submitLabel,fields:s}}const wt={attach:`Attach files`,attachmentMimeRejected:`File type not supported`,attachmentTooLarge:`File is too large`,attachmentTooMany:`Attachment limit reached`,conversationClosed:`This chat is closed`,conversationLoading:`Loading chat…`,loadPreviousMessages:`Load previous messages`,close:`Close`,collapse:`Collapse`,collapseSidebar:`Collapse sidebar`,composerPlaceholder:`Type a message…`,dateLastWeek:`Last 7 days`,dateOlder:`Older`,dateToday:`Today`,dateYesterday:`Yesterday`,dropZone:`Drop files to attach`,errorGeneric:`Something went wrong`,errorRateLimited:`Too many requests — please try again in a moment.`,errorRetry:`Retry`,expand:`Expand`,expandSidebar:`Expand sidebar`,exitFullscreen:`Exit fullscreen`,fullscreen:`Fullscreen`,history:`History`,historyBack:`Back to chat`,historyEmpty:`No previous chats yet`,historyLoading:`Loading your chats…`,historyContinue:`Continue the chat`,historyTitle:`Chat history`,loadMoreConversations:`Load more conversations`,language:`Language`,launcherOpen:`Open chat`,launcherLabel:`Chat with us`,micStart:`Start voice input`,micStop:`Stop voice input`,micUnsupported:`Voice input is not supported in this browser`,moreActions:`More actions`,newConversation:`New chat`,panelTitle:`Chat`,popOut:`Open in new tab`,resizeHandle:`Drag to resize`,scrollToBottom:`Scroll to latest`,send:`Send`,queueMessage:`Queue message`,removeQueuedMessage:`Remove queued message`,compactingContext:`Optimizing conversation context…`,soundOff:`Sound off`,soundOn:`Sound on`,startNewConversation:`Start a new chat`,talkToOperator:`Talk to a person`,connectingOperator:`Connecting you to a person…`,noOperatorAvailable:`No one's available right now — leave your details and we'll follow up.`,chattingWithOperator:`You're chatting with {operator}`,cancelOperatorRequest:`Keep chatting with the AI`,stop:`Stop`,theme:`Theme`,themeAuto:`Auto`,themeDark:`Dark`,themeLight:`Light`,textSize:`Text size`,textSizeSmall:`Small`,textSizeNormal:`Normal`,textSizeLarge:`Large`,loading:`Loading…`,visualPreparing:`Preparing visual…`,visualError:`This visual could not be displayed.`,visualPartial:`Some parts of this visual could not be displayed.`,thinking:`Thinking…`,thoughts:`Thoughts`,toolResult:`Result`,sources:`Sources`,feedbackUp:`Good response`,feedbackDown:`Bad response`,feedbackThanks:`Thanks for your feedback`,copy:`Copy`,copied:`Copied`,tabHome:`Home`,tabConversations:`Chats`,tabHelp:`Help`,tabNews:`News`,modulesEmpty:`Nothing here yet`,moduleBack:`Back`,contentLoading:`Loading…`,contentHelpful:`Was this helpful?`,homeGreeting:`How can we help?`,homeGreetingNamed:`Hi {name} 👋`,homeGreetingLead:`How can we help?`,homeSearchPlaceholder:`Search for help`,homeAskPlaceholder:`Ask a question…`,homeWhatsNew:`What's new`,homeContentTitle:`Popular articles`,homeStatus:`Status`,helpTitle:`Help`,helpSearchPlaceholder:`Search for help`,helpEmpty:`No help articles yet`,helpLoading:`Loading help…`,helpSearchEmpty:`No results for “{query}”`,helpShowMore:`Show more`,newsTitle:`News`,newsEmpty:`No news yet`,newsLoading:`Loading news…`,newsBack:`Back to news`,newsPublishedAt:`Published {date}`,newsShowMore:`Show more`,newsUnseen:`New post`,formSubmit:`Submit`,formSkip:`Maybe later`,formSubmitted:`Completed`,formSkipped:`Maybe later`,formFillOut:`Fill out`,formRequired:`This field is required`,formInvalidEmail:`Enter a valid email address`,formInvalidTel:`Enter a valid phone number`,formInvalidUrl:`Enter a valid URL`,formInvalidNumber:`Enter a valid number`,formTooShort:`Too short (min {min} characters)`,formTooLong:`Too long (max {max} characters)`,formNumberTooSmall:`Must be at least {min}`,formNumberTooLarge:`Must be at most {max}`,formPatternMismatch:`Please match the requested format`,formChooseAtLeast:`Choose at least {min}`,formChooseAtMost:`Choose at most {max}`,formOther:`Other`,formOtherPlaceholder:`Type your answer…`,inputRequired:`Questions for you`,inputBadge:`Questions`,inputAnswered:`Answered`,inputSkipped:`Skipped`,showOptions:`Show options`,hideOptions:`Hide options`,qtypeText:`Your answer`,qtypeEmail:`Email address`,qtypePhone:`Phone number`,qtypeNumber:`Number`,qtypeDate:`Date`,qtypeChooseOne:`Pick one`,qtypeChooseAny:`Pick any`,qtypeBoolean:`Yes / No`,inputSubmit:`Submit answers`,inputSubmitHint:`Enter to send · Shift+Enter = new line`,inputSkip:`Skip`,confirmYes:`Yes`,confirmNo:`No`,approve:`Approve`,reject:`Reject`,approvalPrompt:`{tool} requires your approval to execute.`,approvalBody:`Review the tool input above and decide whether to allow this action.`,approvalYourResponse:`Your response: {decision}`,approvalEditHint:`You can edit this response until this step continues.`,approvalSubmitting:`Response submitted. Request in progress…`,edit:`Edit`,toolParameters:`Parameters`,statusAwaiting:`Awaiting Approval`,statusResponded:`Submitted`,statusRunning:`Running`,statusCompleted:`Completed`,statusDenied:`Denied`,statusError:`Error`,statusSuperseded:`Skipped`,statusIncomplete:`Not completed`},Tt={en:wt,fr:{attach:`Joindre des fichiers`,attachmentMimeRejected:`Type de fichier non pris en charge`,attachmentTooLarge:`Le fichier est trop volumineux`,attachmentTooMany:`Limite de pièces jointes atteinte`,conversationClosed:`Ce chat est fermé`,conversationLoading:`Chargement du chat…`,loadPreviousMessages:`Charger les messages précédents`,close:`Fermer`,collapse:`Réduire`,collapseSidebar:`Réduire la barre latérale`,composerPlaceholder:`Écrivez un message…`,dateLastWeek:`7 derniers jours`,dateOlder:`Plus ancien`,dateToday:`Aujourd'hui`,dateYesterday:`Hier`,dropZone:`Déposez les fichiers à joindre`,errorGeneric:`Une erreur s'est produite`,errorRateLimited:`Trop de requêtes — veuillez réessayer dans un instant.`,errorRetry:`Réessayer`,expand:`Agrandir`,expandSidebar:`Développer la barre latérale`,exitFullscreen:`Quitter le plein écran`,fullscreen:`Plein écran`,history:`Historique`,historyBack:`Retour au chat`,historyEmpty:`Aucun chat pour le moment`,historyContinue:`Poursuivre le chat`,historyLoading:`Chargement de vos chats…`,historyTitle:`Historique des chats`,loadMoreConversations:`Charger plus de conversations`,language:`Langue`,launcherOpen:`Ouvrir le chat`,launcherLabel:`Discuter avec nous`,micStart:`Démarrer la saisie vocale`,micStop:`Arrêter la saisie vocale`,micUnsupported:`La saisie vocale n'est pas prise en charge par ce navigateur`,moreActions:`Plus d'actions`,newConversation:`Nouveau chat`,panelTitle:`Chat`,popOut:`Ouvrir dans un nouvel onglet`,resizeHandle:`Glisser pour redimensionner`,scrollToBottom:`Aller au plus récent`,send:`Envoyer`,queueMessage:`Mettre le message en attente`,removeQueuedMessage:`Retirer le message en attente`,compactingContext:`Optimisation du contexte de la conversation…`,soundOff:`Son désactivé`,soundOn:`Son activé`,startNewConversation:`Démarrer un nouveau chat`,talkToOperator:`Parler à une personne`,connectingOperator:`Mise en relation avec une personne…`,noOperatorAvailable:`Personne n'est disponible pour le moment — laissez vos coordonnées et nous reviendrons vers vous.`,chattingWithOperator:`Vous discutez avec {operator}`,cancelOperatorRequest:`Continuer avec l'IA`,stop:`Arrêter`,theme:`Thème`,themeAuto:`Auto`,themeDark:`Sombre`,themeLight:`Clair`,textSize:`Taille du texte`,textSizeSmall:`Petite`,textSizeNormal:`Normale`,textSizeLarge:`Grande`,loading:`Chargement…`,visualPreparing:`Préparation du visuel…`,visualError:`Ce visuel n’a pas pu être affiché.`,visualPartial:`Certaines parties de ce visuel n’ont pas pu être affichées.`,thinking:`Réflexion…`,thoughts:`Réflexions`,toolResult:`Résultat`,sources:`Sources`,feedbackUp:`Bonne réponse`,feedbackDown:`Mauvaise réponse`,feedbackThanks:`Merci pour votre retour`,copy:`Copier`,copied:`Copié`,tabHome:`Accueil`,tabConversations:`Chats`,tabHelp:`Aide`,tabNews:`Actualités`,modulesEmpty:`Rien pour le moment`,moduleBack:`Retour`,contentLoading:`Chargement…`,contentHelpful:`Cela vous a-t-il aidé ?`,homeGreeting:`Comment pouvons-nous vous aider ?`,homeGreetingNamed:`Bonjour {name} 👋`,homeGreetingLead:`Comment pouvons-nous vous aider ?`,homeSearchPlaceholder:`Rechercher de l'aide`,homeAskPlaceholder:`Posez une question…`,homeWhatsNew:`Nouveautés`,homeContentTitle:`Articles populaires`,homeStatus:`Statut`,helpTitle:`Aide`,helpSearchPlaceholder:`Rechercher de l'aide`,helpEmpty:`Aucun article d'aide pour le moment`,helpLoading:`Chargement de l'aide…`,helpSearchEmpty:`Aucun résultat pour «\xA0{query}\xA0»`,helpShowMore:`Afficher plus`,newsTitle:`Actualités`,newsEmpty:`Aucune actualité pour le moment`,newsLoading:`Chargement des actualités…`,newsBack:`Retour aux actualités`,newsPublishedAt:`Publié le {date}`,newsShowMore:`Afficher plus`,newsUnseen:`Nouvelle publication`,formSubmit:`Envoyer`,formSkip:`Plus tard`,formSubmitted:`Terminé`,formSkipped:`Plus tard`,formFillOut:`Remplir`,formRequired:`Ce champ est obligatoire`,formInvalidEmail:`Saisissez une adresse e-mail valide`,formInvalidTel:`Saisissez un numéro de téléphone valide`,formInvalidUrl:`Saisissez une URL valide`,formInvalidNumber:`Saisissez un nombre valide`,formTooShort:`Trop court (min. {min} caractères)`,formTooLong:`Trop long (max. {max} caractères)`,formNumberTooSmall:`Doit être au moins {min}`,formNumberTooLarge:`Doit être au plus {max}`,formPatternMismatch:`Veuillez respecter le format demandé`,formChooseAtLeast:`Choisissez au moins {min}`,formChooseAtMost:`Choisissez au plus {max}`,formOther:`Autre`,formOtherPlaceholder:`Saisissez votre réponse…`,inputRequired:`Questions pour vous`,inputBadge:`Questions`,inputAnswered:`Répondu`,inputSkipped:`Ignoré`,showOptions:`Afficher les options`,hideOptions:`Masquer les options`,qtypeText:`Votre réponse`,qtypeEmail:`Adresse e-mail`,qtypePhone:`Numéro de téléphone`,qtypeNumber:`Nombre`,qtypeDate:`Date`,qtypeChooseOne:`Choisir une`,qtypeChooseAny:`Choisir plusieurs`,qtypeBoolean:`Oui / Non`,inputSubmit:`Envoyer les réponses`,inputSubmitHint:`Entrée pour envoyer · Maj+Entrée = saut de ligne`,inputSkip:`Ignorer`,confirmYes:`Oui`,confirmNo:`Non`,approve:`Approuver`,reject:`Refuser`,approvalPrompt:`{tool} nécessite votre approbation pour s'exécuter.`,approvalBody:`Vérifiez les paramètres ci-dessus et décidez d'autoriser ou non cette action.`,approvalYourResponse:`Votre réponse : {decision}`,approvalEditHint:`Vous pouvez modifier votre réponse jusqu'à la reprise de cette étape.`,approvalSubmitting:`Réponse envoyée. Traitement en cours…`,edit:`Modifier`,toolParameters:`Paramètres`,statusAwaiting:`En attente d'approbation`,statusResponded:`Envoyé`,statusRunning:`En cours`,statusCompleted:`Terminé`,statusDenied:`Refusé`,statusError:`Erreur`,statusSuperseded:`Ignoré`,statusIncomplete:`Non terminé`},ar:{attach:`إرفاق ملفات`,attachmentMimeRejected:`نوع الملف غير مدعوم`,attachmentTooLarge:`حجم الملف كبير جدًا`,attachmentTooMany:`تم بلوغ الحد الأقصى للمرفقات`,conversationClosed:`تم إغلاق هذه الدردشة`,conversationLoading:`جارٍ تحميل الدردشة…`,loadPreviousMessages:`تحميل الرسائل السابقة`,close:`إغلاق`,collapse:`طيّ`,collapseSidebar:`طيّ الشريط الجانبي`,composerPlaceholder:`اكتب رسالة…`,dateLastWeek:`آخر ٧ أيام`,dateOlder:`أقدم`,dateToday:`اليوم`,dateYesterday:`أمس`,dropZone:`أفلت الملفات لإرفاقها`,errorGeneric:`حدث خطأ ما`,errorRateLimited:`طلبات كثيرة جدًا — يرجى المحاولة بعد لحظة.`,errorRetry:`إعادة المحاولة`,expand:`توسيع`,expandSidebar:`توسيع الشريط الجانبي`,exitFullscreen:`إنهاء ملء الشاشة`,fullscreen:`ملء الشاشة`,history:`السجل`,historyBack:`العودة إلى الدردشة`,historyEmpty:`لا توجد دردشات سابقة بعد`,historyContinue:`متابعة الدردشة`,historyLoading:`جارٍ تحميل دردشاتك…`,historyTitle:`سجل الدردشات`,loadMoreConversations:`تحميل المزيد من المحادثات`,language:`اللغة`,launcherOpen:`فتح الدردشة`,launcherLabel:`تحدث معنا`,micStart:`بدء الإدخال الصوتي`,micStop:`إيقاف الإدخال الصوتي`,micUnsupported:`الإدخال الصوتي غير مدعوم في هذا المتصفح`,moreActions:`إجراءات إضافية`,newConversation:`دردشة جديدة`,panelTitle:`الدردشة`,popOut:`فتح في علامة تبويب جديدة`,resizeHandle:`اسحب لتغيير الحجم`,scrollToBottom:`الانتقال إلى الأحدث`,send:`إرسال`,queueMessage:`إضافة الرسالة إلى قائمة الانتظار`,removeQueuedMessage:`إزالة الرسالة من قائمة الانتظار`,compactingContext:`جارٍ تحسين سياق المحادثة…`,soundOff:`كتم الصوت`,soundOn:`تشغيل الصوت`,startNewConversation:`بدء دردشة جديدة`,talkToOperator:`التحدث إلى شخص`,connectingOperator:`جارٍ توصيلك بشخص…`,noOperatorAvailable:`لا يوجد موظفون متاحون الآن — اترك بياناتك وسنتواصل معك.`,chattingWithOperator:`أنت تتحدث مع {operator}`,cancelOperatorRequest:`متابعة المحادثة مع الذكاء الاصطناعي`,stop:`إيقاف`,theme:`المظهر`,themeAuto:`تلقائي`,themeDark:`داكن`,themeLight:`فاتح`,textSize:`حجم النص`,textSizeSmall:`صغير`,textSizeNormal:`عادي`,textSizeLarge:`كبير`,loading:`جارٍ التحميل…`,visualPreparing:`جارٍ إعداد المحتوى المرئي…`,visualError:`تعذر عرض هذا المحتوى المرئي.`,visualPartial:`تعذر عرض بعض أجزاء هذا المحتوى المرئي.`,thinking:`يفكّر…`,thoughts:`الأفكار`,toolResult:`النتيجة`,sources:`المصادر`,feedbackUp:`رد جيد`,feedbackDown:`رد سيئ`,feedbackThanks:`شكرًا على ملاحظاتك`,copy:`نسخ`,copied:`تم النسخ`,tabHome:`الرئيسية`,tabConversations:`الدردشات`,tabHelp:`المساعدة`,tabNews:`الأخبار`,modulesEmpty:`لا شيء هنا بعد`,moduleBack:`رجوع`,contentLoading:`جارٍ التحميل…`,contentHelpful:`هل كان هذا مفيدًا؟`,homeGreeting:`كيف يمكننا مساعدتك؟`,homeGreetingNamed:`مرحبًا {name} 👋`,homeGreetingLead:`كيف يمكننا مساعدتك؟`,homeSearchPlaceholder:`ابحث عن مساعدة`,homeAskPlaceholder:`اطرح سؤالاً…`,homeWhatsNew:`ما الجديد`,homeContentTitle:`مقالات شائعة`,homeStatus:`الحالة`,helpTitle:`المساعدة`,helpSearchPlaceholder:`ابحث عن مساعدة`,helpEmpty:`لا توجد مقالات مساعدة بعد`,helpLoading:`جارٍ تحميل المساعدة…`,helpSearchEmpty:`لا نتائج لـ «{query}»`,helpShowMore:`عرض المزيد`,newsTitle:`الأخبار`,newsEmpty:`لا توجد أخبار بعد`,newsLoading:`جارٍ تحميل الأخبار…`,newsBack:`العودة إلى الأخبار`,newsPublishedAt:`نُشر في {date}`,newsShowMore:`عرض المزيد`,newsUnseen:`منشور جديد`,formSubmit:`إرسال`,formSkip:`لاحقًا`,formSubmitted:`تم`,formSkipped:`لاحقًا`,formFillOut:`تعبئة`,formRequired:`هذا الحقل مطلوب`,formInvalidEmail:`أدخل بريدًا إلكترونيًا صحيحًا`,formInvalidTel:`أدخل رقم هاتف صحيحًا`,formInvalidUrl:`أدخل رابطًا صحيحًا`,formInvalidNumber:`أدخل رقمًا صحيحًا`,formTooShort:`قصير جدًا (الحد الأدنى {min} حرفًا)`,formTooLong:`طويل جدًا (الحد الأقصى {max} حرفًا)`,formNumberTooSmall:`يجب ألا يقل عن {min}`,formNumberTooLarge:`يجب ألا يزيد عن {max}`,formPatternMismatch:`يرجى مطابقة الصيغة المطلوبة`,formChooseAtLeast:`اختر {min} على الأقل`,formChooseAtMost:`اختر {max} على الأكثر`,formOther:`أخرى`,formOtherPlaceholder:`اكتب إجابتك…`,inputRequired:`أسئلة لك`,inputBadge:`أسئلة`,inputAnswered:`تمت الإجابة`,inputSkipped:`تم التخطي`,showOptions:`إظهار الخيارات`,hideOptions:`إخفاء الخيارات`,qtypeText:`إجابتك`,qtypeEmail:`عنوان البريد الإلكتروني`,qtypePhone:`رقم الهاتف`,qtypeNumber:`رقم`,qtypeDate:`تاريخ`,qtypeChooseOne:`اختر واحدًا`,qtypeChooseAny:`اختر أيًا`,qtypeBoolean:`نعم / لا`,inputSubmit:`إرسال الإجابات`,inputSubmitHint:`Enter للإرسال · Shift+Enter = سطر جديد`,inputSkip:`تخطٍّ`,confirmYes:`نعم`,confirmNo:`لا`,approve:`موافقة`,reject:`رفض`,approvalPrompt:`تتطلب {tool} موافقتك للتنفيذ.`,approvalBody:`راجع مُعطيات الأداة أعلاه وقرّر السماح بهذا الإجراء أو رفضه.`,approvalYourResponse:`ردّك: {decision}`,approvalEditHint:`يمكنك تعديل ردّك حتى تستأنف هذه الخطوة.`,approvalSubmitting:`تم إرسال الرد. جارٍ التنفيذ…`,edit:`تعديل`,toolParameters:`المعطيات`,statusAwaiting:`بانتظار الموافقة`,statusResponded:`تم الإرسال`,statusRunning:`قيد التنفيذ`,statusCompleted:`مكتمل`,statusDenied:`مرفوض`,statusError:`خطأ`,statusSuperseded:`تم التخطي`,statusIncomplete:`لم يكتمل`},es:{attach:`Adjuntar archivos`,attachmentMimeRejected:`Tipo de archivo no admitido`,attachmentTooLarge:`El archivo es demasiado grande`,attachmentTooMany:`Se alcanzó el límite de adjuntos`,conversationClosed:`Este chat está cerrado`,conversationLoading:`Cargando chat…`,loadPreviousMessages:`Cargar mensajes anteriores`,close:`Cerrar`,collapse:`Contraer`,collapseSidebar:`Contraer la barra lateral`,composerPlaceholder:`Escribe un mensaje…`,dateLastWeek:`Últimos 7 días`,dateOlder:`Anteriores`,dateToday:`Hoy`,dateYesterday:`Ayer`,dropZone:`Suelta los archivos para adjuntarlos`,errorGeneric:`Algo salió mal`,errorRateLimited:`Demasiadas solicitudes: inténtalo de nuevo en un momento.`,errorRetry:`Reintentar`,expand:`Ampliar`,expandSidebar:`Expandir la barra lateral`,exitFullscreen:`Salir de pantalla completa`,fullscreen:`Pantalla completa`,history:`Historial`,historyBack:`Volver al chat`,historyEmpty:`Aún no tienes chats`,historyContinue:`Continuar el chat`,historyLoading:`Cargando tus chats…`,historyTitle:`Historial de chats`,loadMoreConversations:`Cargar más conversaciones`,language:`Idioma`,launcherOpen:`Abrir el chat`,launcherLabel:`Chatea con nosotros`,micStart:`Iniciar entrada de voz`,micStop:`Detener entrada de voz`,micUnsupported:`Este navegador no admite la entrada de voz`,moreActions:`Más acciones`,newConversation:`Nuevo chat`,panelTitle:`Chat`,popOut:`Abrir en una pestaña nueva`,resizeHandle:`Arrastra para cambiar el tamaño`,scrollToBottom:`Ir a lo más reciente`,send:`Enviar`,queueMessage:`Poner mensaje en cola`,removeQueuedMessage:`Quitar mensaje de la cola`,compactingContext:`Optimizando el contexto de la conversación…`,soundOff:`Sonido desactivado`,soundOn:`Sonido activado`,startNewConversation:`Iniciar un chat nuevo`,talkToOperator:`Hablar con una persona`,connectingOperator:`Conectándote con una persona…`,noOperatorAvailable:`Nadie está disponible ahora — deja tus datos y te contactaremos.`,chattingWithOperator:`Estás chateando con {operator}`,cancelOperatorRequest:`Seguir con la IA`,stop:`Detener`,theme:`Tema`,themeAuto:`Automático`,themeDark:`Oscuro`,themeLight:`Claro`,textSize:`Tamaño del texto`,textSizeSmall:`Pequeño`,textSizeNormal:`Normal`,textSizeLarge:`Grande`,loading:`Cargando…`,visualPreparing:`Preparando visualización…`,visualError:`No se pudo mostrar esta visualización.`,visualPartial:`No se pudieron mostrar algunas partes de esta visualización.`,thinking:`Pensando…`,thoughts:`Razonamiento`,toolResult:`Resultado`,sources:`Fuentes`,feedbackUp:`Buena respuesta`,feedbackDown:`Mala respuesta`,feedbackThanks:`Gracias por tu opinión`,copy:`Copiar`,copied:`Copiado`,tabHome:`Inicio`,tabConversations:`Chats`,tabHelp:`Ayuda`,tabNews:`Novedades`,modulesEmpty:`Aún no hay nada aquí`,moduleBack:`Atrás`,contentLoading:`Cargando…`,contentHelpful:`¿Te resultó útil?`,homeGreeting:`¿Cómo podemos ayudarte?`,homeGreetingNamed:`Hola, {name} 👋`,homeGreetingLead:`¿Cómo podemos ayudarte?`,homeSearchPlaceholder:`Buscar ayuda`,homeAskPlaceholder:`Haz una pregunta…`,homeWhatsNew:`Lo nuevo`,homeContentTitle:`Artículos populares`,homeStatus:`Estado`,helpTitle:`Ayuda`,helpSearchPlaceholder:`Buscar ayuda`,helpEmpty:`Aún no hay artículos de ayuda`,helpLoading:`Cargando la ayuda…`,helpSearchEmpty:`Sin resultados para «{query}»`,helpShowMore:`Mostrar más`,newsTitle:`Novedades`,newsEmpty:`Aún no hay novedades`,newsLoading:`Cargando novedades…`,newsBack:`Volver a novedades`,newsPublishedAt:`Publicado el {date}`,newsShowMore:`Mostrar más`,newsUnseen:`Publicación nueva`,formSubmit:`Enviar`,formSkip:`Quizá más tarde`,formSubmitted:`Completado`,formSkipped:`Quizá más tarde`,formFillOut:`Completar`,formRequired:`Este campo es obligatorio`,formInvalidEmail:`Introduce un correo electrónico válido`,formInvalidTel:`Introduce un número de teléfono válido`,formInvalidUrl:`Introduce una URL válida`,formInvalidNumber:`Introduce un número válido`,formTooShort:`Demasiado corto (mín. {min} caracteres)`,formTooLong:`Demasiado largo (máx. {max} caracteres)`,formNumberTooSmall:`Debe ser al menos {min}`,formNumberTooLarge:`Debe ser como máximo {max}`,formPatternMismatch:`Respeta el formato solicitado`,formChooseAtLeast:`Elige al menos {min}`,formChooseAtMost:`Elige como máximo {max}`,formOther:`Otro`,formOtherPlaceholder:`Escribe tu respuesta…`,inputRequired:`Preguntas para ti`,inputBadge:`Preguntas`,inputAnswered:`Respondido`,inputSkipped:`Omitido`,showOptions:`Mostrar opciones`,hideOptions:`Ocultar opciones`,qtypeText:`Tu respuesta`,qtypeEmail:`Correo electrónico`,qtypePhone:`Número de teléfono`,qtypeNumber:`Número`,qtypeDate:`Fecha`,qtypeChooseOne:`Elige una`,qtypeChooseAny:`Elige varias`,qtypeBoolean:`Sí / No`,inputSubmit:`Enviar respuestas`,inputSubmitHint:`Enter para enviar · Mayús+Enter = nueva línea`,inputSkip:`Omitir`,confirmYes:`Sí`,confirmNo:`No`,approve:`Aprobar`,reject:`Rechazar`,approvalPrompt:`{tool} requiere tu aprobación para ejecutarse.`,approvalBody:`Revisa los parámetros de arriba y decide si permites esta acción.`,approvalYourResponse:`Tu respuesta: {decision}`,approvalEditHint:`Puedes cambiar tu respuesta hasta que este paso continúe.`,approvalSubmitting:`Respuesta enviada. Procesando…`,edit:`Editar`,toolParameters:`Parámetros`,statusAwaiting:`Esperando aprobación`,statusResponded:`Enviado`,statusRunning:`En curso`,statusCompleted:`Completado`,statusDenied:`Denegado`,statusError:`Error`,statusSuperseded:`Omitido`,statusIncomplete:`No completado`},he:{attach:`צירוף קבצים`,attachmentMimeRejected:`סוג הקובץ אינו נתמך`,attachmentTooLarge:`הקובץ גדול מדי`,attachmentTooMany:`הגעת למספר המרבי של קבצים מצורפים`,conversationClosed:`הצ׳אט הזה נסגר`,conversationLoading:`טוען צ׳אט…`,loadPreviousMessages:`טעינת הודעות קודמות`,close:`סגירה`,collapse:`כיווץ`,collapseSidebar:`כיווץ סרגל הצד`,composerPlaceholder:`כתוב הודעה…`,dateLastWeek:`7 הימים האחרונים`,dateOlder:`ישן יותר`,dateToday:`היום`,dateYesterday:`אתמול`,dropZone:`שחרר קבצים כדי לצרף`,errorGeneric:`משהו השתבש`,errorRateLimited:`יותר מדי בקשות — נסה שוב בעוד רגע.`,errorRetry:`נסה שוב`,expand:`הרחבה`,expandSidebar:`הרחבת סרגל הצד`,exitFullscreen:`יציאה ממסך מלא`,fullscreen:`מסך מלא`,history:`היסטוריה`,historyBack:`חזרה לצ׳אט`,historyEmpty:`אין עדיין צ׳אטים קודמים`,historyContinue:`המשך צ׳אט`,historyLoading:`טוען את הצ׳אטים שלך…`,historyTitle:`היסטוריית צ׳אטים`,loadMoreConversations:`טעינת שיחות נוספות`,language:`שפה`,launcherOpen:`פתיחת צ׳אט`,launcherLabel:`דברו איתנו`,micStart:`התחלת קלט קולי`,micStop:`עצירת קלט קולי`,micUnsupported:`קלט קולי אינו נתמך בדפדפן זה`,moreActions:`פעולות נוספות`,newConversation:`צ׳אט חדש`,panelTitle:`צ׳אט`,popOut:`פתיחה בכרטיסייה חדשה`,resizeHandle:`גרור לשינוי הגודל`,scrollToBottom:`מעבר לחדש ביותר`,send:`שליחה`,queueMessage:`הוספת ההודעה לתור`,removeQueuedMessage:`הסרת ההודעה מהתור`,compactingContext:`מבצע אופטימיזציה להקשר השיחה…`,soundOff:`השתקת הצליל`,soundOn:`הפעלת הצליל`,startNewConversation:`התחלת צ׳אט חדש`,talkToOperator:`דברו עם אדם`,connectingOperator:`מחברים אותך לאדם…`,noOperatorAvailable:`אין נציגים זמינים כעת — השאר את הפרטים שלך ונחזור אליך.`,chattingWithOperator:`אתה מצ׳וטט עם {operator}`,cancelOperatorRequest:`המשך לשוחח עם ה-AI`,stop:`עצירה`,theme:`ערכת נושא`,themeAuto:`אוטומטי`,themeDark:`כהה`,themeLight:`בהיר`,textSize:`גודל טקסט`,textSizeSmall:`קטן`,textSizeNormal:`רגיל`,textSizeLarge:`גדול`,loading:`טוען…`,visualPreparing:`מכין תצוגה…`,visualError:`לא ניתן היה להציג תצוגה זו.`,visualPartial:`לא ניתן היה להציג חלקים מתצוגה זו.`,thinking:`חושב…`,thoughts:`מחשבות`,toolResult:`תוצאה`,sources:`מקורות`,feedbackUp:`תשובה טובה`,feedbackDown:`תשובה גרועה`,feedbackThanks:`תודה על המשוב`,copy:`העתק`,copied:`הועתק`,tabHome:`בית`,tabConversations:`צ׳אטים`,tabHelp:`עזרה`,tabNews:`חדשות`,modulesEmpty:`אין כאן עדיין כלום`,moduleBack:`חזרה`,contentLoading:`טוען…`,contentHelpful:`האם זה עזר?`,homeGreeting:`כיצד נוכל לעזור?`,homeGreetingNamed:`שלום {name} 👋`,homeGreetingLead:`כיצד נוכל לעזור?`,homeSearchPlaceholder:`חיפוש עזרה`,homeAskPlaceholder:`שאלו שאלה…`,homeWhatsNew:`מה חדש`,homeContentTitle:`מאמרים פופולריים`,homeStatus:`סטטוס`,helpTitle:`עזרה`,helpSearchPlaceholder:`חיפוש עזרה`,helpEmpty:`אין עדיין מאמרי עזרה`,helpLoading:`טוען עזרה…`,helpSearchEmpty:`אין תוצאות עבור „{query}”`,helpShowMore:`הצגת עוד`,newsTitle:`חדשות`,newsEmpty:`אין עדיין חדשות`,newsLoading:`טוען חדשות…`,newsBack:`חזרה לחדשות`,newsPublishedAt:`פורסם ב-{date}`,newsShowMore:`הצגת עוד`,newsUnseen:`פוסט חדש`,formSubmit:`שליחה`,formSkip:`אחר כך`,formSubmitted:`נשלח`,formSkipped:`דולג`,formFillOut:`מילוי`,formRequired:`שדה חובה`,formInvalidEmail:`הזן כתובת אימייל תקינה`,formInvalidTel:`הזן מספר טלפון תקין`,formInvalidUrl:`הזן כתובת URL תקינה`,formInvalidNumber:`הזן מספר תקין`,formTooShort:`קצר מדי (לפחות {min} תווים)`,formTooLong:`ארוך מדי (לכל היותר {max} תווים)`,formNumberTooSmall:`חייב להיות לפחות {min}`,formNumberTooLarge:`חייב להיות לכל היותר {max}`,formPatternMismatch:`התאם לתבנית הנדרשת`,formChooseAtLeast:`בחר לפחות {min}`,formChooseAtMost:`בחר לכל היותר {max}`,formOther:`אחר`,formOtherPlaceholder:`כתוב את תשובתך…`,inputRequired:`שאלות עבורך`,inputBadge:`שאלות`,inputAnswered:`נענה`,inputSkipped:`דולג`,showOptions:`הצג אפשרויות`,hideOptions:`הסתר אפשרויות`,qtypeText:`התשובה שלך`,qtypeEmail:`כתובת אימייל`,qtypePhone:`מספר טלפון`,qtypeNumber:`מספר`,qtypeDate:`תאריך`,qtypeChooseOne:`בחר אחת`,qtypeChooseAny:`בחר כמה`,qtypeBoolean:`כן / לא`,inputSubmit:`שליחת תשובות`,inputSubmitHint:`Enter לשליחה · Shift+Enter = שורה חדשה`,inputSkip:`דילוג`,confirmYes:`כן`,confirmNo:`לא`,approve:`אישור`,reject:`דחייה`,approvalPrompt:`הכלי {tool} דורש את אישורך כדי לפעול.`,approvalBody:`בדוק את פרמטרי הכלי שלמעלה והחלט אם לאשר פעולה זו.`,approvalYourResponse:`התגובה שלך: {decision}`,approvalEditHint:`ניתן לערוך את תגובתך עד שהשלב הזה יתחדש.`,approvalSubmitting:`התגובה נשלחה. מבצע…`,edit:`עריכה`,toolParameters:`פרמטרים`,statusAwaiting:`ממתין לאישור`,statusResponded:`נשלח`,statusRunning:`פועל`,statusCompleted:`הושלם`,statusDenied:`נדחה`,statusError:`שגיאה`,statusSuperseded:`דולג`,statusIncomplete:`לא הושלם`}};function Et(e,t){let n=Dt(e),r=jt(t),i=n===`en`?{}:Tt[n]??{},a=r?t[n]??{}:t??{},o=r?t.en??{}:{};return{...wt,...i,...o,...a}}function Dt(e){return(e.split(`-`)[0]??`en`).toLowerCase()}const Ot=/* @__PURE__ */ new Set([`ar`,`he`,`iw`,`fa`,`ur`,`ps`,`sd`,`ug`,`yi`,`dv`,`ckb`,`ks`,`nqo`,`prs`,`syr`]);function kt(e){return Ot.has(Dt(e))}function At(e,t){return e[t]??t}function jt(e){if(!e)return!1;for(let t of Object.values(e))if(t&&typeof t==`object`)return!0;return!1}const Mt=new class{get(e){try{return localStorage.getItem(e)}catch{return null}}set(e,t){try{localStorage.setItem(e,t)}catch{}}remove(e){try{localStorage.removeItem(e)}catch{}}},Nt={maxBytes:10485760,maxCount:10,accept:`*/*`},Pt={voice:`local`},Ft={list:[],byTrigger:{}},It={enabled:!0,sampleRate:1},Lt={upload:`/pai/upload-file`,transcribe:`/pai/transcribe-audio`,submitForm:`/pai/submit-form`},Rt={variant:`circle`,size:`md`,label:void 0,icon:`chat`,hidden:!1},zt={floating:[`theme`,`textSize`,`history`,`close`,`clear`,`expand`,`fullscreen`,`popOut`,`sound`,`language`],inline:[`theme`,`textSize`,`history`,`close`,`clear`,`fullscreen`,`popOut`,`sound`,`language`],standalone:[`theme`,`textSize`,`history`,`clear`,`sound`,`language`],page:[`theme`,`textSize`,`history`,`clear`,`sound`,`language`],modal:[`theme`,`textSize`,`history`,`close`,`clear`,`fullscreen`,`popOut`,`sound`,`language`],drawer:[`theme`,`textSize`,`history`,`close`,`clear`,`fullscreen`,`popOut`,`sound`,`language`]},Bt={enabled:!0,volume:.3,events:void 0},Vt={enabled:!0,events:void 0},Ht=[{label:`tabConversations`,layout:`chat`}],Ut=C.scope(`context`),Wt=/* @__PURE__ */ new Set([`visitorId`,`conversationId`,`jwt`,`token`,`authorization`,`password`]),Gt=1024,Kt=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function qt(e){return Yt(e,`userContext`,!0)}function Jt(e){return Yt(e,`pageContext`,!1)}function Yt(e,t,n){if(e==null)return;if(typeof e!=`object`||Array.isArray(e)){Ut.warn(`ignored ${t} — expected an object`,{type:Array.isArray(e)?`array`:typeof e});return}let r={},i=0;for(let[n,a]of Object.entries(e)){if(Wt.has(n)){Ut.warn(`dropped reserved ${t} key "${n}" — managed by the widget, not host-settable`);continue}if(a==null)continue;if(i>=50){Ut.warn(`${t} truncated at 50 keys — dropped "${n}"`);continue}let e=Xt(t,n,a);e!==void 0&&(r[n]=e,i++)}return n&&typeof r.email==`string`&&!Kt.test(r.email)&&(Ut.warn(`dropped malformed context field`,{field:`${t}.email`,reason:`invalid format`}),delete r.email),Object.keys(r).length>0?r:void 0}function Xt(e,t,n){if(typeof n==`boolean`)return n;if(typeof n==`number`){if(!Number.isFinite(n)){Ut.warn(`dropped non-finite ${e}.${t}`);return}return n}if(typeof n==`string`){let r=n.trim();return r===``?void 0:r.length>Gt?(Ut.warn(`truncated ${e}.${t} to ${Gt} chars`),r.slice(0,Gt)):r}Ut.warn(`dropped ${e}.${t} — only string/number/boolean values are allowed`,{type:typeof n})}function Zt(e){let t=typeof e==`object`&&e?e:{},n=t.presentation??{},r=t.behavior??{},i=t.i18n??{},a=t.feedback??{},o=t.footer??{},s=t.header??{},c={enabled:t.history?.enabled??!0},{themeMode:l,themeOverrides:d}=Qt(t.theme),f=n.mode??`floating`,p=$t(i.defaultLocale),m=i.availableLocales??[i.locale??p],h=en(i.locale??p,m,p),g=(t.baseUrl??u.defaultBaseUrl).replace(/\/$/,``),_=(t.agentApiBaseUrl??`${g}/api/agent`).replace(/\/$/,``),v=(t.dataApiBaseUrl??`${g}/api/data`).replace(/\/$/,``);return{widgetId:t.widgetId??`default`,publicKey:t.publicKey,aiAgentDeploymentId:t.aiAgentDeploymentId,baseUrl:g,agentApiBaseUrl:_,dataApiBaseUrl:v,userContext:qt(t.userContext),pageContext:Jt(t.pageContext),position:n.position??`bottom-right`,themeMode:l,textSize:`normal`,themeOverrides:d,mode:f,iframe:n.iframe??!1,responseMode:r.responseMode??`streaming`,showReasoning:r.showReasoning??!1,showToolCalls:r.showToolCalls??!1,showSources:r.showSources??!1,enableMessageFeedback:!(r.disableMessageFeedback??!1),autoSendSuggestions:r.autoSendSuggestions??!1,popOutUrl:r.popOutUrl,features:{voice:t.features?.voice??Pt.voice,fileUpload:!(t.features?.disableFileUpload??!1),humanInLoop:!(t.features?.disableHumanInLoop??!1),operatorRequest:t.features?.enableOperatorRequest===!0},forms:ln(t.forms,h),endpoints:{upload:t.endpoints?.upload??Lt.upload,transcribe:t.endpoints?.transcribe??Lt.transcribe,submitForm:t.endpoints?.submitForm??Lt.submitForm},attachments:{accept:t.composer?.attachments?.accept??Nt.accept,maxBytes:t.composer?.attachments?.maxBytes??Nt.maxBytes,maxCount:t.composer?.attachments?.maxCount??Nt.maxCount},locale:h,defaultLocale:p,availableLocales:m,startMinimized:r.startMinimized??!0,actions:tn(f,s.actions,c.enabled),size:n.size??{},launcher:dn(t.launcher),sound:nn(a.sound),haptics:rn(a.haptics),strings:Et(h,i.strings),stringsOverride:i.strings,composerDisclaimer:o.composerDisclaimer??``,poweredBy:on(o.poweredBy),composer:sn(t.composer),modules:cn(t.modules,c.enabled),tracking:an(t.tracking,v),history:c,storage:t.storage??Mt,userToken:t.userToken,tools:t.tools,onMessage:t.onMessage,onOpen:t.onOpen,onClose:t.onClose,onError:t.onError}}function Qt(e){if(typeof e==`string`)return{themeMode:e,themeOverrides:{}};if(!e||typeof e!=`object`)return{themeMode:`auto`,themeOverrides:{}};let{mode:t,...n}=e;return{themeMode:t??`auto`,themeOverrides:n}}function $t(e){return e&&e!==`auto`?e:globalThis.navigator?.language||`en`}function en(e,t,n){return t.length<=1||t.includes(e)?e:t.includes(n)?n:t[0]??e}function tn(e,t,n){let r=t??zt[e];return n?r:r.filter(e=>e!==`history`)}function nn(e){return{enabled:e?.enabled??Bt.enabled,volume:e?.volume??Bt.volume,events:e?.events}}function rn(e){return{enabled:e?.enabled??Vt.enabled,events:e?.events}}function an(e,t){let n=e?.sampleRate??It.sampleRate;return{enabled:e?.enabled??It.enabled,endpoint:e?.endpoint??`${t}/pai/elements-px.gif`,sampleRate:Math.min(1,Math.max(0,Number.isFinite(n)?n:1)),token:e?.token}}function on(e){let t={text:`Powered by ${u.displayName}`,href:u.siteUrl,...e};return t.text||t.logoUrl?t:null}function sn(e){let t=e?.sendButton;return{sendButton:{shape:t?.shape??`circle`,icon:t?.icon??`arrowUp`,variant:t?.variant??`filled`}}}function cn(e,t){let n=e??Ht,r=/* @__PURE__ */ new Set,i=[];for(let e of n.slice(0,4)){if(!e?.label||!e?.layout)continue;let n=e.contentCollectionIds?.filter(Boolean),a=e.id??n?.[0]??e.layout;for(;r.has(a);)a=`${a}-${i.length}`;r.add(a);let o={id:a,label:e.label,layout:e.layout};n?.length&&(o.contentCollectionIds=n),e.layout===`home`&&(o.brandName=e.brandName,o.greetingText=e.greetingText,o.showGreeting=!(e.hideGreeting??!1),o.showSearchBar=!(e.hideSearchBar??!1),o.showRecentConversations=t&&!(e.hideRecentConversations??!1),e.userAvatars?.length&&(o.userAvatars=e.userAvatars),e.status&&(o.status=e.status),o.contentBlockTitle=e.contentBlockTitle),i.push(o)}return{list:i,byId:Object.fromEntries(i.map(e=>[e.id,e]))}}function ln(e,t){if(!e?.length)return Ft;let n=[],r=/* @__PURE__ */ new Set;for(let i of e){if(!i?.id||r.has(i.id))continue;let e=Ct(i,t),a=(e.fields??[]).filter(e=>!!(e?.name&&e.label&&e.type)),o=(Array.isArray(e.on)?e.on:[e.on]).map(un).filter(e=>e!==null);a.length!==0&&o.length!==0&&(r.add(e.id),n.push({id:e.id,triggers:o,when:e.when,fields:a,title:e.title,description:e.description,submitLabel:e.submitLabel,skippable:e.skippable??!1,frequency:e.frequency??`once`,mirrorToContext:e.mirrorToContext??!0,reopenable:e.reopenable??!0,reviewable:e.reviewable??!0}))}let i={};for(let e of n){var a;for(let t of e.triggers)(i[a=t.kind]??(i[a]=[])).push(e)}return{list:n,byTrigger:i}}function un(e){if(typeof e!=`string`)return null;if(e===`pre-chat`||e===`conversation-closed`||e===`panel-close`||e===`manual`)return{kind:e};let[t,n]=e.split(`:`,2);if(t===`after-messages`){let e=Number(n);return Number.isFinite(e)&&e>0?{kind:`after-messages`,param:e}:null}if(t===`idle`){let e=Number(n);return Number.isFinite(e)&&e>0?{kind:`idle`,param:e}:null}return t===`page-area`&&n?{kind:`page-area`,param:n}:null}function dn(e){let t=e?.callout?.text?{shape:`pill`,position:`auto`,delayMs:1200,autoDismissMs:0,animated:!0,persistent:!0,...e.callout}:null;return{variant:e?.variant??Rt.variant,size:e?.size??Rt.size,label:e?.label??Rt.label,icon:e?.icon??Rt.icon,hidden:e?.hidden??Rt.hidden,callout:t}}function fn(e,t,n,r){let i=en(t,e.availableLocales,e.defaultLocale);if(i===e.locale&&n===e.themeMode&&r===e.textSize)return e;let a={...e};return i!==e.locale&&(a.locale=i,a.strings=Et(i,e.stringsOverride)),n!==e.themeMode&&(a.themeMode=n),r!==e.textSize&&(a.textSize=r),a}const pn=[`presentation`,`behavior`,`theme`,`launcher`,`header`,`composer`,`feedback`,`i18n`,`footer`,`features`,`tracking`,`endpoints`,`history`];function mn(e,t){if(!t)return e;let n={...e};for(let r of pn){let i=t[r];if(i===void 0)continue;let a=e[r];r===`theme`?a===void 0?n[r]=i:typeof a==`string`&&typeof i==`object`&&i&&(n[r]={...i,mode:a}):r!==`i18n`&&(n[r]=hn(i,a))}t.modules!==void 0&&e.modules===void 0&&(n.modules=t.modules),t.dataApiBaseUrl!==void 0&&e.dataApiBaseUrl===void 0&&(n.dataApiBaseUrl=t.dataApiBaseUrl);let r=e.i18n,i=t.i18n;if(r||i){let e=hn(i??{},r);i?.availableLocales!==void 0&&(e.availableLocales=i.availableLocales),i?.defaultLocale!==void 0&&(e.defaultLocale=i.defaultLocale);let t=r?.strings,a=i?.strings;(t||a)&&(e.strings=gn(a,t)),n.i18n=e}return n}function hn(e,t){if(!t)return e;let n={...e};for(let[e,r]of Object.entries(t))r!==void 0&&(n[e]=r);return n}function gn(e,t){if(!e)return t;if(!t)return e;let n=jt(e),r=jt(t);if(!n&&!r)return{...e,...t};let i={},a=n?e:{en:e},o=r?t:{en:t};for(let[e,t]of Object.entries(a))i[e]={...t};for(let[e,t]of Object.entries(o))i[e]={...i[e],...t};return i}const _n=[`clear`,`expand`,`fullscreen`,`popOut`,`sound`,`history`,`language`,`theme`,`textSize`,`close`];function vn(e){return e!==`false`}const yn=[[`public-key`,`publicKey`],[`ai-agent-deployment-id`,`aiAgentDeploymentId`],[`base-url`,`baseUrl`],[`agent-api-base-url`,`agentApiBaseUrl`],[`data-api-base-url`,`dataApiBaseUrl`],[`theme`,`theme`,e=>e]],bn=[[`mode`,`mode`,e=>e],[`position`,`position`,e=>e],[`iframe`,`iframe`,vn]],xn=[[`width`,`width`],[`height`,`height`]],Sn=[[`response-mode`,`responseMode`,e=>e],[`start-minimized`,`startMinimized`,vn],[`show-reasoning`,`showReasoning`,vn],[`show-tool-calls`,`showToolCalls`,vn],[`show-sources`,`showSources`,vn],[`disable-message-feedback`,`disableMessageFeedback`,vn],[`auto-send-suggestions`,`autoSendSuggestions`,vn],[`pop-out-url`,`popOutUrl`]],Cn=[[`locale`,`locale`]];new Set(_n);const wn=[[`launcher-variant`,`variant`,e=>e],[`launcher-size`,`size`,e=>e],[`launcher-icon`,`icon`],[`launcher-hidden`,`hidden`,vn]],Tn=[[`features-disable-file-upload`,`disableFileUpload`,vn],[`features-voice`,`voice`,e=>e]],En=[[`endpoint-upload`,`upload`],[`endpoint-transcribe`,`transcribe`]],Dn=[[`user-id`,`id`],[`user-email`,`email`],[`user-name`,`name`]],On=[[`page-area`,`area`],[`page-url`,`url`],[`page-path`,`path`],[`page-title`,`title`]],kn=[`launcher-label`,`callout-text`,`callout-delay`,`actions`,`user-context`,`page-context`],An=[yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On],jn=/* @__PURE__ */ new Set([`iframe`,`start-minimized`]);[...An.flatMap(e=>e.map(([e])=>e).filter(e=>!jn.has(e))),...kn];const Mn=C.scope(`track`);function Nn(e,t){let n=typeof e==`string`?e.trim():``;if(!n||n.length>64){Mn.warn(`track: ignored an event without a name of 1–64 characters`,{name:e});return}let r=Object.fromEntries(Object.entries(typeof t==`object`&&t?t:{}).filter(e=>typeof e[1]==`string`||typeof e[1]==`boolean`||Number.isFinite(e[1])));return JSON.stringify(r).length>256?(Mn.warn(`track: sent the event without its data, which is over 256 characters`,{name:n}),{name:n}):Object.keys(r).length>0?{name:n,data:r}:{name:n}}function Pn(e){let t=[];return e.on(`hostEvent`,e=>{t.push({...e,at:Date.now()}),t.length>10&&t.shift()}),t}function Fn(){let e=Date.now(),t=/* @__PURE__ */ new Uint8Array(16);t[0]=Math.floor(e/2**40)&255,t[1]=Math.floor(e/2**32)&255,t[2]=e>>>24&255,t[3]=e>>>16&255,t[4]=e>>>8&255,t[5]=e&255,In(t.subarray(6)),t[6]=t[6]&15|112,t[8]=t[8]&63|128;let n=Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``);return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function In(e){if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`)crypto.getRandomValues(e);else for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256)}const Ln=C.scope(`persistence`);function Rn(e,t=Mt,n){let r=n?`${e}.${n}`:e,i=`${u.cssPrefix}.storageVersion`,a=t.get(i)??void 0,o=a?`.v${a}`:``,s=`${u.cssPrefix}.${r}${o}`,c=`${u.cssPrefix}${o}.visitorId`,l=`${s}.conversationId`,d=`${s}.userPrefs`,f=`${s}.panelOpen`,p=`${s}.panelSize`,m=`${s}.calloutDismissed`,h=`${s}.sidebarCollapsed`,g=`${s}.activeModule`,_=`${s}.seenNewsId`,v=`${s}.historyCount`,y=`${s}.formsDone`,b={getVisitorId(){let e=t.get(c);if(e)return e;let n=Fn();return t.set(c,n),n},loadConversationId(){return t.get(l)??void 0},saveConversationId(e){Ln.trace(`saveConversationId`,{id:e,scope:r}),e?t.set(l,e):t.remove(l)},loadDraft(e){return t.get(`${s}.draft.${e}`)??``},saveDraft(e,n){let r=`${s}.draft.${e}`;n?t.set(r,n):t.remove(r)},loadMessageQueue(e){let n=t.get(`${s}.messageQueue.${e}`);if(!n)return[];try{let e=JSON.parse(n);return!Array.isArray(e)||!e.every(Bn)?[]:e}catch(e){return Ln.warn(`loadMessageQueue parse failed`,{error:e}),[]}},saveMessageQueue(e,n){let r=`${s}.messageQueue.${e}`;if(n.length===0)t.remove(r);else try{t.set(r,JSON.stringify(n))}catch(e){Ln.warn(`saveMessageQueue serialise failed`,{error:e})}},loadUserPrefs(){let e=t.get(d);if(!e)return{};try{return Vn(JSON.parse(e))}catch(e){return Ln.warn(`loadUserPrefs parse failed`,{error:e}),{}}},saveUserPrefs(e){try{t.set(d,JSON.stringify(e))}catch(e){Ln.warn(`saveUserPrefs serialise failed`,{error:e})}},patchUserPrefs(e){let t=b.loadUserPrefs();b.saveUserPrefs({...t,...e})},loadPanelOpen(){let e=t.get(f);return e===`1`||e!==`0`&&null},savePanelOpen(e){t.set(f,e?`1`:`0`)},loadPanelSize(){let e=t.get(p);return e===`normal`||e===`expanded`||e===`fullscreen`?e:null},savePanelSize(e){t.set(p,e)},loadCalloutDismissed(e){if(!e)return!1;let n=t.get(m);return!!n&&n===e},saveCalloutDismissed(e){e?t.set(m,e):t.remove(m)},loadSidebarCollapsed(){let e=t.get(h);return e===`1`||e!==`0`&&null},saveSidebarCollapsed(e){t.set(h,e?`1`:`0`)},loadActiveModule(){return t.get(g)||null},saveActiveModule(e){t.set(g,e)},loadSeenNewsId(){return t.get(_)||null},saveSeenNewsId(e){t.set(_,e)},loadHistoryCount(){let e=t.get(v);if(!e)return null;let n=Number.parseInt(e,10);return Number.isFinite(n)&&n>=0?n:null},saveHistoryCount(e){t.set(v,String(e))},loadFormsDone(){let e=t.get(y);if(!e)return{};try{let t=JSON.parse(e);return zn(t)?Object.fromEntries(Object.entries(t).filter(e=>typeof e[1]==`number`)):{}}catch(e){return Ln.warn(`loadFormsDone parse failed`,{error:e}),{}}},saveFormDone(e){try{let n=b.loadFormsDone();n[e]=Date.now(),t.set(y,JSON.stringify(n))}catch(e){Ln.warn(`saveFormDone serialise failed`,{error:e})}},rememberStorageVersion(e){e&&e!==t.get(i)&&(Ln.debug(`rememberStorageVersion (force-reset on next load)`,{version:e}),t.set(i,e))},clearConversation(){t.remove(l)},reset(){let e=t.get(l);e&&(t.remove(`${s}.draft.${e}`),t.remove(`${s}.messageQueue.${e}`));for(let e of[c,l,d,f,p,m,h,g,_,v,y])t.remove(e);Ln.info(`reset: forgot the visitor`,{scope:r})}};return b}function zn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Bn(e){return zn(e)&&typeof e.id==`string`&&e.id.length>0&&typeof e.text==`string`}function Vn(e){if(!zn(e))return{};let t={};return typeof e.locale==`string`&&(t.locale=e.locale),typeof e.soundMuted==`boolean`&&(t.soundMuted=e.soundMuted),(e.themeMode===`auto`||e.themeMode===`light`||e.themeMode===`dark`)&&(t.themeMode=e.themeMode),(e.textSize===`small`||e.textSize===`normal`||e.textSize===`large`)&&(t.textSize=e.textSize),zn(e.widgetSize)&&typeof e.widgetSize.width==`number`&&typeof e.widgetSize.height==`number`&&(t.widgetSize={width:e.widgetSize.width,height:e.widgetSize.height}),t}const Hn=`1.12.3`,Un={open:()=>void 0,close:()=>void 0,expand:e=>({on:e}),fullscreen:e=>({on:e}),send:e=>({attachments:e.attachmentCount}),message:e=>({role:e.role}),stop:()=>void 0,clear:()=>void 0,suggestion:()=>void 0,toggleHistory:e=>({view:e.view}),handshake:()=>void 0,formSubmit:e=>({formId:e.formId,skipped:e.skipped}),toolResult:()=>void 0,toolDecision:e=>({approved:e.approved}),hostEvent:e=>({name:e.name,data:e.data&&JSON.stringify(e.data)}),messageFeedback:e=>({value:e.value??`none`}),contentView:e=>({section:e.section,count:e.count}),contentOpen:e=>({contentId:e.contentId,contentCollectionId:e.contentCollectionId}),contentSearch:e=>({qlen:e.queryLength,hits:e.hitCount}),contentRead:e=>({contentId:e.contentId}),contentLinkClick:e=>({contentId:e.contentId}),attach:e=>({count:e.count,bytes:e.totalBytes}),voiceStart:()=>void 0,voiceStop:e=>({ms:e.durationMs}),voiceCancel:()=>void 0,localeChange:e=>({locale:e}),themeChange:e=>({theme:e}),textSizeChange:e=>({size:e}),soundToggle:e=>({muted:e.muted}),sidebarToggle:e=>({collapsed:e.collapsed}),calloutDismiss:()=>void 0,error:()=>void 0};function Wn(){let e=navigator;return e.globalPrivacyControl===!0||e.doNotTrack===`1`}function Gn(){return location.origin+location.pathname}function Kn(){try{return document.referrer?new URL(document.referrer).origin:``}catch{return``}}function qn(e,t){let n=Math.random(),r=0,i=0,a=/* @__PURE__ */ new Set;function o(e,o){let{tracking:s,publicKey:c,aiAgentDeploymentId:l,mode:u,themeMode:d}=t.getOptions();if(!s.enabled||Wn()||n>=s.sampleRate)return;let f=performance.now();if(f-r>6e4&&(r=f,i=0),++i>60)return;let p=new URLSearchParams;p.set(`v`,`1`),p.set(`_ev`,Hn),p.set(`e`,e),s.token&&p.set(`tk`,s.token),c&&p.set(`pk`,c),l&&p.set(`dep`,l),p.set(`vid`,t.getVisitorId());let m=t.getConversationId();m&&p.set(`cid`,m),p.set(`url`,Gn());let h=Kn();h&&p.set(`ref`,h),p.set(`sw`,String(screen.width)),p.set(`sh`,String(screen.height)),p.set(`vw`,String(innerWidth)),p.set(`vh`,String(innerHeight)),p.set(`dpr`,String(devicePixelRatio)),p.set(`lang`,navigator.language);try{p.set(`tz`,Intl.DateTimeFormat().resolvedOptions().timeZone)}catch{}if(p.set(`m`,u),p.set(`th`,d),o)for(let[e,t]of Object.entries(o))t!==void 0&&p.set(e,String(t));p.set(`ts`,String(Date.now()));let g=`${s.endpoint}?${p}`;if(g.length>2e3)return;let _=new Image(1,1);a.add(_);function v(){return a.delete(_)}_.addEventListener(`load`,v,{once:!0}),_.addEventListener(`error`,v,{once:!0}),_.src=g}let s=[];function c(e,t){if(s&&e!==`handshake`){s.length<60&&s.push([e,t]);return}let n=s??[];s=void 0;for(let[e,t]of n)o(e,t);o(e,t)}let l=Object.keys(Un).map(t=>e.on(t,e=>c(t,Un[t]?.(e))));return()=>{for(let e of l)e();a.clear()}}const Jn=`:host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent: var(--__P__-accent-user);--__P__-accent-text-user: __BRAND_ACCENT_TEXT__;--__P__-accent-text: var(--__P__-accent-text-user);--__P__-accent-fg: var(--__P__-accent);--__P__-radius: __BRAND_RADIUS__;--__P__-radius-sm: 8px;--__P__-radius-md: 10px;--__P__-radius-lg: 16px;--__P__-font: __BRAND_FONT__;--__P__-font-display: var(--__P__-font);--__P__-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--__P__-bg: oklch(1 0 0);--__P__-bg-elevated: oklch(.9789 .0029 278.3);--__P__-surface: var(--__P__-bg-elevated);--__P__-muted: var(--__P__-fg-muted);--__P__-hover: oklch(.1686 .011 278.3 / .06);--__P__-fg: oklch(.1686 .011 278.3);--__P__-fg-muted: oklch(.4932 .0301 278.3);--__P__-border: oklch(.9312 .0084 278.3);--__P__-border-strong: oklch(.8757 .0131 278.3);--__P__-bubble-user: var(--__P__-accent);--__P__-bubble-user-text: var(--__P__-accent-text);--__P__-bubble-assistant: oklch(.9638 .0058 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-on-accent: var(--__P__-accent-text);--__P__-success: oklch(.6456 .1654 151.53);--__P__-warning: oklch(.7135 .1494 74.05);--__P__-danger: oklch(.5966 .1818 24.51);--__P__-danger-text: oklch(.5054 .1905 27.52);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .1);--__P__-neutral: oklch(.7137 .0192 278.3);--__P__-pill-l-min: .3;--__P__-pill-l-max: .46;--__P__-focus: var(--__P__-accent);--__P__-shadow-panel: 0 8px 24px -8px rgba(13, 15, 20, .18), 0 24px 64px -24px rgba(13, 15, 20, .24);--__P__-shadow-card: 0 1px 2px rgba(13, 15, 20, .06), 0 4px 12px -6px rgba(13, 15, 20, .12);--__P__-backdrop: oklch(.1686 .011 278.3 / .55);--__P__-shadow-fab: 0 6px 16px -4px color-mix(in oklch, var(--__P__-accent) 45%, transparent), 0 12px 32px -12px rgba(13, 15, 20, .25);--__P__-z-fab: 2147483600;--__P__-z-panel: 2147483601;--__P__-panel-w: 380px;--__P__-panel-h: 600px;--__P__-fab-size: 56px;--__P__-conversation-max: 768px;--__P__-space-1: 4px;--__P__-space-2: 8px;--__P__-space-3: 12px;--__P__-space-4: 16px;--__P__-space-5: 20px;--__P__-space-6: 24px;--__P__-space-8: 32px;--__P__-text-scale: 1;--__P__-text-xs: calc(12px * var(--__P__-text-scale));--__P__-text-sm: calc(13px * var(--__P__-text-scale));--__P__-text-base: calc(15px * var(--__P__-text-scale));--__P__-text-md: calc(16px * var(--__P__-text-scale));--__P__-text-lg: calc(18px * var(--__P__-text-scale));--__P__-text-xl: calc(22px * var(--__P__-text-scale));--__P__-text-2xl: calc(30px * var(--__P__-text-scale))}:host([data-mode="modal"]),:host([data-mode="drawer"]){--__P__-conversation-max: 100%}:host([data-text-size="small"]){--__P__-text-scale: .9}:host([data-text-size="large"]){--__P__-text-scale: 1.15}:host{--__P__-ease: cubic-bezier(.2, .7, .2, 1);--__P__-ease-out: cubic-bezier(.2, .7, .2, 1);--__P__-ease-in: cubic-bezier(.4, 0, 1, 1);--__P__-ease-in-out: cubic-bezier(.65, 0, .35, 1);--__P__-dur-quick: .12s;--__P__-dur-base: .22s;--__P__-dur-slow: .32s;font-family:var(--__P__-font);color:var(--__P__-fg);color-scheme:light;--__P__-color-scheme: light}:host([data-theme="dark"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-danger-text: oklch(.8077 .1035 19.57);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .18);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);--__P__-shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -6px rgba(0, 0, 0, .5);--__P__-backdrop: rgba(0, 0, 0, .65);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;color-scheme:dark;--__P__-color-scheme: dark}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);color-scheme:dark;--__P__-color-scheme: dark}}@supports (color: oklch(from red l c h)){:host{--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.3, l, .62) c h);--__P__-accent-text: oklch(from var(--__P__-accent) clamp(0, (l / .623 - 1) * -infinity, 1) 0 h);--__P__-accent-fg: oklch(from var(--__P__-accent-user) clamp(.3, l, .46) c h)}:host([data-theme="dark"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}}}@media(prefers-reduced-motion:reduce){:host{--__P__-dur-quick: 1ms;--__P__-dur-base: 1ms;--__P__-dur-slow: 1ms}}
2
+ import{useEffect as e,useMemo as t,useRef as n,useSyncExternalStore as r}from"react";function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}function a(e,t){if(i(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(i(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function o(e){var t=a(e,`string`);return i(t)==`symbol`?t:t+``}function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c={open:!1,ready:!1,unread:0};var l=class{constructor(){s(this,`handlers`,/* @__PURE__ */ new Map)}on(e,t){let n=this.handlers.get(e);return n||(n=/* @__PURE__ */ new Set,this.handlers.set(e,n)),n.add(t),()=>this.handlers.get(e)?.delete(t)}emit(e,t){let n=this.handlers.get(e);if(n)for(let e of n)try{e(t)}catch{}}clear(){this.handlers.clear()}};const u={id:`help-ai`,name:`@helpai/elements`,global:`HelpAI`,tagName:`web-ai-chat`,cssPrefix:`helpai`,defaultBaseUrl:`https://help.ai`,displayName:`Help AI`,domain:`help.ai`,siteUrl:`https://help.ai`},d=[`off`,`error`,`warn`,`info`,`debug`,`trace`],f=u.cssPrefix,p=`${f}.debug`,m=`__${u.global}_DEBUG__`,h=`${f}-debug`;let g=2,_=null;function v(){if(typeof window>`u`)return 2;try{let e=new URLSearchParams(window.location.search).get(h);if(e!==null){let t=y(e);if(t>=0)return t}}catch{}try{let e=window.localStorage?.getItem(p);if(e){let t=y(e);if(t>=0)return t}}catch{}return Reflect.get(window,m)?4:2}function y(e){if(e===!0||e===`1`||e===`true`)return 4;if(e===!1||e===`0`||e===`false`||e===`off`)return 0;if(typeof e==`number`)return Math.max(0,Math.min(5,Math.floor(e)));if(typeof e==`string`){let t=d.findIndex(t=>t===e);if(t>=0)return t}return-1}function b(e){let t=y(e);if(!(t<0)){g=t;try{window.localStorage?.setItem(p,d[t]??`off`)}catch{}}}function x(){return d[g]??`warn`}g=v();function S(e){let t=`[${f}:${e}]`;function n(n,r,i){return(a,o)=>{if(!(g<n)&&(o===void 0?console[r](t,a):console[r](t,a,o),_))try{_({level:i,scope:e,message:a,payload:o})}catch{}}}return{error:n(1,`error`,`error`),warn:n(2,`warn`,`warn`),info:n(3,`info`,`info`),debug:n(4,`debug`,`debug`),trace:n(5,`debug`,`trace`),scope:t=>S(`${e}:${t}`)}}const C=S(`core`);function w(e){_=e}const T=/* @__PURE__ */ new Set([`hidden`,`submit`,`button`,`reset`,`image`,`file`,`password`]);function E(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement}function D(e){return!E(e)||e.name===``||e.disabled?!1:!(e instanceof HTMLInputElement&&T.has(e.type))}function O(e){let t=e.labels?.[0]?.textContent?.trim();return e.getAttribute(`toolparamdescription`)??(t||e.getAttribute(`aria-description`))??void 0}function ee(e,t){let n=O(e),r=n?{description:n}:{};return e instanceof HTMLSelectElement?{...r,type:`string`,enum:[...e.options].map(e=>e.value)}:e instanceof HTMLTextAreaElement?{...r,type:`string`}:e.type===`checkbox`?{...r,type:`boolean`}:e.type===`radio`?{...r,type:`string`,enum:t}:e.type===`number`||e.type===`range`?{...r,type:`number`}:{...r,type:`string`}}function k(e,t){Object.getOwnPropertyDescriptor(Reflect.getPrototypeOf(e)??e,`value`)?.set?.call(e,t),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}function te(e){return e==null?``:typeof e==`string`?e:JSON.stringify(e)}function ne(e,t){e instanceof HTMLInputElement&&e.type===`checkbox`?e.checked!==(t===!0||t===`true`)&&e.click():e instanceof HTMLInputElement&&e.type===`radio`?e.value===te(t)&&!e.checked&&e.click():k(e,te(t))}function A(e,t,n){let r=[...e.elements].filter(D),i={},a=/* @__PURE__ */ new Set;for(let e of r){var o;let t=r.flatMap(t=>t instanceof HTMLInputElement&&t.type===`radio`&&t.name===e.name?[t.value]:[]);i[o=e.name]??(i[o]=ee(e,t)),e.required&&a.add(e.name)}return{name:t,description:n,inputSchema:{type:`object`,properties:i,...a.size>0?{required:[...a]}:{}},execute(t){let n=typeof t==`object`&&t?Object.entries(t):[];for(let[e,t]of n)for(let n of r)n.name===e&&ne(n,t);if(!e.hasAttribute(`toolautosubmit`))return`Filled in the form. The visitor still needs to check it and press its submit button.`;let i=[...new Set([...e.elements].flatMap(e=>E(e)&&e.name&&!e.checkValidity()?[e.name]:[]))];return i.length>0?`Filled in the form, but it can't be submitted yet: ${i.join(`, `)} still needs the visitor. Ask them to complete it and press the submit button.`:(setTimeout(()=>e.requestSubmit(),0),`Filled in the form and submitted it.`)}}}function j(){return[...document.querySelectorAll(`form[toolname][tooldescription]`)].flatMap(e=>{let t=e.getAttribute(`toolname`)?.trim()??``,n=e.getAttribute(`tooldescription`)?.trim()??``;return t&&n?[A(e,t,n)]:[]})}const re=`${u.cssPrefix}.page-tools`;function ie(e){return typeof e==`object`&&!!e}function ae(e){return ie(e)&&(e.state===`running`||e.state===`stopped`||e.state===`finished`&&ie(e.outcome))}function oe(e){let t=e?JSON.parse(e):void 0;return ie(t)?{sent:Array.isArray(t.sent)?t.sent.filter(e=>typeof e==`string`):[],calls:Object.fromEntries(Object.entries(ie(t.calls)?t.calls:{}).filter(e=>ae(e[1])))}:{sent:[],calls:{}}}let se={sent:[],calls:{}};function ce(){try{se=oe(sessionStorage.getItem(re))}catch{}return se}function le(e){se=e;try{sessionStorage.setItem(re,JSON.stringify(e))}catch{}}const M={markSent(e){let t=ce();le({...t,sent:[...t.sent.filter(t=>t!==e),e].slice(-20)})},sentHere(e){return ce().sent.includes(e)},get(e){return ce().calls[e]},set(e,t){let n=ce(),r=Object.entries(n.calls).filter(([t])=>t!==e);le({...n,calls:Object.fromEntries([...r,[e,t]].slice(-50))})},clear(e){let t=ce();e.some(e=>e in t.calls)&&le({...t,calls:Object.fromEntries(Object.entries(t.calls).filter(([t])=>!e.includes(t)))})}};function ue(e,t){return new Promise(n=>{if(t?.aborted)return n();let r=setTimeout(a,e);function i(){return a()}t?.addEventListener(`abort`,i,{once:!0});function a(){clearTimeout(r),t?.removeEventListener(`abort`,i),n()}})}const de=C.scope(`page-tools`),fe=3e4,pe=Symbol.for(`${u.cssPrefix}.page-tools`),me={state:`output-error`,errorText:`The page reloaded before this finished, so it may or may not have taken effect. Check with the visitor before trying it again.`},he=`The visitor stopped this before it finished.`;function N(e){return typeof e==`object`&&!!e}function ge(e){return N(e)&&Array.isArray(e.registered)&&e.runs instanceof Map}function _e(){let e=Reflect.get(globalThis,pe);if(ge(e))return e;let t={registered:[],runs:/* @__PURE__ */ new Map};return Reflect.set(globalThis,pe,t),t}function ve(e,t){let n=N(t)&&t.signal instanceof AbortSignal?t.signal:void 0;if(n?.aborted)return;let r=_e().registered;r.push(e);function i(){let t=r.indexOf(e);t>=0&&r.splice(t,1)}n?.addEventListener(`abort`,i,{once:!0})}function ye(e){return e.replace(/[^A-Za-z0-9_-]/g,`_`).slice(0,58)}function be(e){if(!N(e)||typeof e.name!=`string`||!ye(e.name))return;let t=[e.description,e.title].find(e=>typeof e==`string`&&e.trim()!==``)??e.name;return{name:ye(e.name),description:t.trim().slice(0,1024),inputSchema:{properties:{},...N(e.inputSchema)?e.inputSchema:{},type:`object`},consequential:N(e.annotations)&&e.annotations.consequentialHint===!0}}function xe(e){return e.flatMap(e=>{let t=be(e),n=N(e)?e.execute:void 0;return!t||typeof n!=`function`?(de.warn(`skipped a tool without a name or an execute function`,e),[]):[{...t,run:(t,r)=>Reflect.apply(n,e,[t,{signal:r}])}]})}async function Se(){let e=Reflect.get(document,`modelContext`)??Reflect.get(navigator,`modelContext`);if(!N(e)||typeof e.getTools!=`function`||typeof e.executeTool!=`function`)return[];let t=e.getTools,n=e.executeTool,r=await Promise.race([Promise.resolve().then(()=>Reflect.apply(t,e,[])),ue(1e3).then(()=>[])]).catch(()=>[]);return(Array.isArray(r)?r:[]).flatMap(t=>{let r=be(t);return r?[{...r,run:(r,i)=>Reflect.apply(n,e,[t,r,{signal:i}])}]:[]})}async function Ce(e=[]){let t=xe(j()),n=new Set(t.map(e=>e.name)),r=[...(await Se()).filter(e=>!n.has(e.name)),...t,...xe(e),...xe(_e().registered)];return new Map(r.map(e=>[e.name,e]))}function we(e){return[...e.values()].map(({name:e,description:t,inputSchema:n,consequential:r})=>r?{name:e,description:t,inputSchema:n,annotations:{consequentialHint:!0}}:{name:e,description:t,inputSchema:n})}function Te(e){return e?.execution===`client`}function Ee(e){return e.startsWith(`site__`)?e.slice(6):e}function De(e){if(e===void 0||typeof e==`function`||typeof e==`symbol`)return null;let t=/* @__PURE__ */ new WeakSet,n=JSON.stringify(e,(e,n)=>{if(typeof n==`bigint`)return n.toString();if(typeof n!=`function`&&typeof n!=`symbol`)return n instanceof Node?`[${n.nodeName.toLowerCase()}]`:N(n)?t.has(n)?`[circular]`:(t.add(n),n):n});return n.length>fe?{truncated:!0,preview:n.slice(0,fe)}:JSON.parse(n)}async function Oe(e){let t=Ee(e.toolName),n=(await Ce(e.optionTools)).get(t);return n?Promise.resolve().then(()=>n.run(e.input,e.signal)).then(e=>({state:`output-available`,output:De(e)})).catch(e=>(de.warn(`a page tool failed`,{name:t,error:e}),{state:`output-error`,errorText:(e instanceof Error?e.message:String(e)).slice(0,1e3)||`The page tool failed.`})):{state:`output-error`,errorText:`This page doesn't offer "${t}" right now; the visitor may have moved on. Tell them, or continue without it.`}}function ke(e){let{toolCallId:t}=e,n=M.get(t);if(n?.state===`finished`)return Promise.resolve(n.outcome);let{runs:r}=_e(),i=r.get(t);if(i)return i.outcome;if(n?.state===`running`)return M.set(t,{state:`finished`,outcome:me}),e.onSettled(`interrupted`,0),Promise.resolve(me);let a=new AbortController,o=performance.now();M.set(t,{state:`running`});let s=Oe({...e,signal:a.signal}).then(n=>(r.delete(t),M.get(t)?.state===`running`&&(M.set(t,{state:`finished`,outcome:n}),e.onSettled(n.state===`output-available`?`completed`:`failed`,Math.round(performance.now()-o))),n));return r.set(t,{outcome:s,controller:a}),s}function Ae(e){return e===me.errorText||e===he}function je(e){return M.set(e,{state:`stopped`}),_e().runs.get(e)?.controller.abort(),he}function Me(e){M.clear([e]),_e().runs.get(e)?.controller.abort()}var P,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,F=Symbol.for(`pv`),Ue={},We=[],Ge=/^m(i|n|o|s|text|space)$/,Ke=Array.isArray,qe=We.slice,Je=Object.assign;function Ye(e){e&&e.parentNode&&e.remove()}function Xe(e,t,n){var r,i,a,o={},s=arguments.length;for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return s>2&&(o.children=s>3?qe.call(arguments,2):n),Ze(e,o,r,i,null)}function Ze(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:F,__v:i||++Ne,__i:-1,__u:0};return!i&&P.vnode&&P.vnode(a),a}function I(e){return e.children}function Qe(e,t){this.props=e,this.context=t,this.__g=0}function $e(e,t){if(t==null)return e.__&&$e(e.__,e.__i+1);for(var n;t<e.__k.length;t++)if((n=e.__k[t])&&n.__e)return n.__e;return typeof e.type!=`function`||e.props.__P?null:$e(e)}function et(e){if((e=e.__)&&e.__c&&!e.props.__P)return e.__e=null,e.__k.some(function(t){return t&&(e.__e=t.__e)}),et(e)}function tt(e){(8&e.__g||(e.__g|=8,Fe.push(e),Le++))&&Ie==P.debounceRendering||((Ie=P.debounceRendering)||queueMicrotask)(nt)}function nt(){var e,t,n,r,i,a,o,s,c;try{for(t=1;Fe.length;)Fe.length>t&&Fe.sort(Re),e=Fe.shift(),t=Fe.length,8&e.__g&&(r=void 0,i=void 0,a=(i=(n=e).__v).__e,o=[],s=[],(c=n.__P)&&((r=Je({constructor:F},i)).__v=i.__v+1,P.vnode&&P.vnode(r),dt(c,r,i,n.__n,c.namespaceURI,32&i.__u?[a]:null,o,a||$e(i),32&i.__u,s),r.__v=i.__v,r.__.__k[r.__i]=r,mt(o,r,s),i.__=i.__e=null,r.__e!=a&&et(r)))}finally{(Le=Fe.length)&&(Ie||queueMicrotask)(nt)}}function rt(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_=r.__k||We,v=t.length;for(c=it(n,t,_,c,v),d=0;d<v;d++)(p=n.__k[d])!=null&&(f=~p.__i&&_[p.__i]||Ue,p.__i=d,g=dt(e,p,f,i,a,o,s,c,l,u),m=p.__e,(f.ref!=p.ref||8&f.__u)&&(f.ref&&gt(f.ref,null,p,f),p.ref&&u.push(p.ref,p.__c||m,p)),h=h||m,4&p.__u?(c=at(p,c,e,!f.__v),f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-21);return n.__e=h,c}function it(e,t,n,r,i){var a,o,s,c,l,u,d,f,p,m=n.length,h=m,g=0,_=0,v=e.__k=Array(i);for(a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o!=`object`||o.constructor===String?o=v[a]=Ze(null,o):Ke(o)?o=v[a]=Ze(I,{children:o}):o.constructor===F&&o.__b?o=v[a]=Ze(o.type,o.props,o.key,o.ref,o.__v):v[a]=o,c=a+g,o.__=e,o.__b=e.__b+1,s=null,~(l=o.__i=st(o,n,c,h))&&(h--,(s=n[l])&&(s.__u|=2)),s&&s.__v?(o.__u|=16,l==c-1?g--:l==c+1?g++:l!=c&&(l>c?g--:g++,_=1)):(~l||(i>m?g--:i<m&&g++),typeof o.type!=`function`&&(o.__u|=4))):v[a]=null;if(_){for(u=[],d=[],a=0;a<i;a++)if((o=v[a])&&16&o.__u){for(g=0,f=u.length;g<f;)u[p=g+f>>1]<o.__i?g=p+1:f=p;u[g]=o.__i,d[a]=g+1}for(g=u.length;a--;)d[a]&&(d[a]==g?g--:v[a].__u|=4)}if(h)for(a=0;a<m;a++)!(s=n[a])||2&s.__u||(s.__e==r&&(r=$e(s)),_t(s,s));return r}function at(e,t,n,r){var i,a,o,s;if(typeof e.type==`function`){if(e.props.__P)return t;if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&(i[a].__=e,t=at(i[a],t,n,!1));return t}for(t&&!t.parentNode&&(t=$e(e))&&!t.parentNode&&(t=null),o=e.__e,s=t;s&&s.nodeType==8;)s=s.nextSibling;for(o!=s&&(!r&&n.moveBefore&&o.parentNode?n.moveBefore(o,t):n.insertBefore(o,t||null)),t=o;(t=t&&t.nextSibling)&&t.nodeType==8&&!t.data.startsWith(`$s`););return t}function ot(e,t){return t=t||[],e!=null&&typeof e!=`boolean`&&(Ke(e)?e.some(function(e){ot(e,t)}):t.push(e)),t}function st(e,t,n,r){var i,a=e.key,o=e.type,s=t[n],c=s&&!(2&s.__u);if(s===null&&a==null||c&&a==s.key&&o==s.type)return n;if(r>+!!c){for(i=n-1;i>=0;i--)if((s=t[i])&&!(2&s.__u)&&a==s.key&&o==s.type)return i;for(i=n+1;i<t.length;i++)if((s=t[i])&&!(2&s.__u)&&a==s.key&&o==s.type)return i}return-1}function ct(e,t,n){n??(n=``),t[0]==`-`?e.setProperty(t,n):e[t]=n}function lt(e,t,n,r,i){var a,o;if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||ct(e.style,t);if(n)for(t in n)r&&n[t]==r[t]||ct(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)(e.__e||(e.__e={}))[t]=n,n&&r||(o=He[t]||(He[t]=ut(t)),(e.__a||(e.__a={}))[t]=Ve,a=t!=(t=t.replace(Be,`$1`)),(t=t.slice(2))[0]<`a`&&(t=t.toLowerCase()),n?e.addEventListener(t,o,a):e.removeEventListener(t,o,a));else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;return}catch{}if(typeof n==`function`)return;n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n)}}function ut(e){return function(t){var n=this.__e;if(n){if(n=n[e],t[ze]==null)t[ze]=Ve++;else if(t[ze]<this.__a[e])return;return n(P.event?P.event(t):t)}}}function dt(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O=t.type;if(t.constructor!==F)return null;128&n.__u&&(c=32&n.__u,u=n.__c.__z)&&(t.__u|=c,d=a=[],u.nodeType==8?s=ft(u,a):a.push(u),s=a[0]||s),(u=P.__b)&&u(t);n:if(typeof O==`function`){f=o.length;try{if(_=t.props,v=(u=O.prototype)&&u.render,y=(u=O.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,(p=n.__c)?(t.__c=p,2&p.__g&&(p.__g|=1)):(v?t.__c=p=new O(_,b):(t.__c=p=new Qe(_,b),p.constructor=O,p.render=vt),y&&y.sub(p),p.state||(p.state={}),p.__n=r,p.__g|=8,p.__h=[],p.__k=[]),v&&(p.__s||(p.__s=p.state),O.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=Je({},p.__s)),Je(p.__s,O.getDerivedStateFromProps(_,p.__s)))),m=p.props,h=p.state,p.__v=t,n.__c){if(_!==m&&v&&!O.getDerivedStateFromProps&&p.componentWillReceiveProps&&p.componentWillReceiveProps(_,b),t.__v==n.__v&&!(8&p.__g)||!(4&p.__g)&&p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(_,p.__s,b)){t.__v!=n.__v&&(p.props=_,p.state=p.__s,p.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),We.push.apply(p.__h,p.__k),p.__k=[],p.__h.length&&o.push(p),s=$e(n);break n}p.componentWillUpdate&&p.componentWillUpdate(_,p.__s,b),v&&p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(m,h,g)})}else v&&!O.getDerivedStateFromProps&&p.componentWillMount&&p.componentWillMount(),v&&p.componentDidMount&&p.__h.push(p.componentDidMount);if(p.context=b,p.props=_,p.__P=e,p.__g&=-5,x=P.__r,S=0,v)p.state=p.__s,p.__g&=-9,x&&x(t),u=p.render(p.props,p.state,p.context),We.push.apply(p.__h,p.__k),p.__k=[];else do p.__g&=-9,x&&x(t),u=p.render(p.props,p.state,p.context),p.state=p.__s;while(8&p.__g&&++S<25);p.state=p.__s,p.getChildContext&&(r=Je({},r,p.getChildContext())),v&&n.__c&&p.getSnapshotBeforeUpdate&&(g=p.getSnapshotBeforeUpdate(m,h)),C=u&&u.type===I&&u.key==null?u.props.children:u,_.__P&&(u=s,i=(e=_.__P).namespaceURI,c=a=null,n.props&&n.props.__P!=e&&(n.__k.some(function(e){e&&_t(e,e)}),n.__k=null),s=n.__k?$e(n,0):null),s=rt(e,Ke(C)?C:[C],t,n,r,i,a,o,s,c,l),_.__P&&(t.__e=null,s=u),t.__u&=-161,d&&d.some(Ye),p.__h.length&&o.push(p),1&p.__g&&(p.__g&=-4)}catch(e){if(o.length=f,t.__v=null,c||a){if(e.then){if(w=0,t.__u|=128|c,a){for(~(E=a.indexOf(s||void 0))||(E=a.length);(D=a[E-1])&&D.nodeType==8;)E--;for(;E<a.length;E++)if(D=a[E]){if(a[E]=null,D.nodeType==8){if(D.data.startsWith(`$s`))w++||(T=D);else if(w&&D.data.startsWith(`/$s`)&&!--w)break}else if(!w)break}}if(!T){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;T=s}(u=ft(T=t.__c.__z||(t.__c.__z=T)))?(t.__e=T,s=u):t.__e=s,s=s&&s.nextSibling}else a&&a.some(Ye)}else t.__e=n.__e;t.__k||(t.__k=n.__k||[]),e.then||pt(t),P.__e(e,t,n)}}else s=t.__e=ht(n.__e,t,n,r,i,a,o,c,l,e);return(u=P.diffed)&&u(t),s}function ft(e,t){if(e&&e.nodeType==8&&e.data.startsWith(`$s`))for(var n=1;e=e.nextSibling;){if(e.nodeType==8){if(e.data.startsWith(`$s`))n++;else if(e.data.startsWith(`/$s`)&&!--n)return e}t&&t.push(e)}}function pt(e){e&&(e.__c&&(e.__c.__g|=4),e.__k&&e.__k.some(pt))}function mt(e,t,n){for(var r=0;r<n.length;)gt(n[r++],n[r++],n[r++]);P.__c&&P.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){P.__e(e,t.__v)}})}function ht(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y=n.props||Ue,b=t.props,x=t.type;if(x==`svg`?i=`http://www.w3.org/2000/svg`:x==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||(i=`http://www.w3.org/1999/xhtml`),a){for(u=0;u<a.length;u++)if((m=a[u])&&(x?m.localName==x:m.nodeType==3)){e=m,a[u]=null;break}}if(!e){if(_=l.ownerDocument||document,!x)return _.createTextNode(b);e=_.createElementNS(i,x,b.is&&b),s&&(P.__m&&P.__m(t,a),s=!1),a=null}if(x){if(l=x==`template`?e.content:e,a=x==`textarea`&&b.defaultValue!=null?null:a&&qe.call(l.childNodes),!s&&a)for(y={},u=0;u<e.attributes.length;u++)y[(m=e.attributes[u]).name]=m.value;for(u in y)m=y[u],u==`dangerouslySetInnerHTML`?f=m:u==`children`||u in b||u==`value`&&`defaultValue`in b||u==`checked`&&`defaultChecked`in b||lt(e,u,null,m,i);for(u in v=1&n.__u,b)m=b[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||!(y[u]!==m||v&&m!=null)||lt(e,u,m,y[u],i);d?(s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[]):(f&&(e.textContent=``),(x==`foreignObject`||i==`http://www.w3.org/1998/Math/MathML`&&Ge.test(x))&&(i=`http://www.w3.org/1999/xhtml`),rt(l,Ke(p)?p:[p],t,n,r,i,a,o,a?a[0]:n.__k&&$e(n,0),s,c),a&&a.some(Ye)),s&&x!=`textarea`||(u=`value`,x==`progress`&&h==null?e.removeAttribute(u):h==null||h===e[u]&&(x!=`progress`||h)||lt(e,u,h,y[u],i),u=`checked`,g!=null&&g!=e[u]&&lt(e,u,g,y[u],i))}else y===b||s&&e.data==b||(e.data=b);return e}function gt(e,t,n,r){try{typeof e==`function`?t?t.__x=e(t)||1:r&&(r=r.__c||r.__e)&&(t=r.__x)&&(r.__x=null,typeof t==`function`?t():e(null)):e.current=t}catch(e){P.__e(e,n)}}function _t(e,t,n){var r,i,a,o;if(P.unmount&&P.unmount(e),!(r=e.ref)||r.current&&r.current!=e.__e||gt(r,null,t,e),r=e.__c){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){P.__e(e,t)}r.__P=r.__n=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&_t(r[o],t,typeof e.type!=`function`||n&&!e.props.__P);!n&&(r=e.__c)&&(r=r.__z)&&(i=ft(r,a=[]))&&(r==e.__e&&a.some(Ye),Ye(i),Ye(r)),(r=e.__e)&&(n||Ye(r),r.__e&&(r.__e=null)),e.__e=e.__c=e.__=null}function vt(e,t,n){return this.constructor(e,n)}function yt(e,t){var n,r,i,a;P.__&&P.__(e,t),t.nodeType==9&&(t=t.documentElement),r=(n=e&&32&e.__u)?null:t.__k,t.__k=Ze(I,{children:[e]}),i=[],a=[],dt(t,t.__k,r||Ue,Ue,t.namespaceURI,r?null:t.firstChild?qe.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a),mt(i,t.__k,a),t.__k.props.children=null}P={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((o=(a=i.constructor)&&a.getDerivedStateFromError)&&i.setState(a.getDerivedStateFromError(e)),i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=1),o&&8&i.__g)return void(i.__g|=2)}catch(t){e=t}}throw Le=0,e}},Ne=0,Pe=function(e){return e!=null&&e.constructor===F},Qe.prototype.setState=function(e,t){var n=this.__s;n&&n!=this.state||(n=this.__s=Je({},this.state)),typeof e==`function`&&(e=e(Je({},n),this.props)),e&&(Je(n,e),this.__v&&(t&&this.__k.push(t),tt(this)))},Qe.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),tt(this))},Qe.prototype.render=I,Fe=[],Le=0,Re=function(e,t){return e.__v.__b-t.__v.__b},ze=Symbol(),Be=/(PointerCapture)$|Capture$/i,Ve=0,He={};function bt(e,t){if(e?.length&&t)return e.find(e=>e.locale===t)}function xt(e,t){let{translations:n,defaultLocale:r,...i}=e,a=bt(n,t);return a?{...i,title:a.title??i.title,description:a.description??i.description,content:a.content??i.content}:i}function St(e,t){let{translations:n,defaultLocale:r,...i}=e,a=bt(n,t);return a?{...i,title:a.title??i.title,description:a.description??i.description}:i}function Ct(e,t){let{translations:n,defaultLocale:r,...i}=e,a=bt(n,t);if(!a)return i;let o=new Map((a.fields??[]).map(e=>[e.name,e])),s=i.fields.map(e=>{let t=o.get(e.name);if(!t)return e;let n=new Map((t.options??[]).map(e=>[e.value,e]));return{...e,label:t.label??e.label,placeholder:t.placeholder??e.placeholder,validationHint:t.validationHint??e.validationHint,options:e.options?.map(e=>{let t=n.get(e.value);return t?{...e,label:t.label??e.label,description:t.description??e.description}:e})}});return{...i,title:a.title??i.title,description:a.description??i.description,submitLabel:a.submitLabel??i.submitLabel,fields:s}}const wt={attach:`Attach files`,attachmentMimeRejected:`File type not supported`,attachmentTooLarge:`File is too large`,attachmentTooMany:`Attachment limit reached`,conversationClosed:`This chat is closed`,conversationLoading:`Loading chat…`,loadPreviousMessages:`Load previous messages`,close:`Close`,collapse:`Collapse`,collapseSidebar:`Collapse sidebar`,composerPlaceholder:`Type a message…`,dateLastWeek:`Last 7 days`,dateOlder:`Older`,dateToday:`Today`,dateYesterday:`Yesterday`,dropZone:`Drop files to attach`,errorGeneric:`Something went wrong`,errorRateLimited:`Too many requests — please try again in a moment.`,errorRetry:`Retry`,expand:`Expand`,expandSidebar:`Expand sidebar`,exitFullscreen:`Exit fullscreen`,fullscreen:`Fullscreen`,history:`History`,historyBack:`Back to chat`,historyEmpty:`No previous chats yet`,historyLoading:`Loading your chats…`,historyContinue:`Continue the chat`,historyTitle:`Chat history`,loadMoreConversations:`Load more conversations`,language:`Language`,launcherOpen:`Open chat`,launcherLabel:`Chat with us`,micStart:`Start voice input`,micStop:`Stop voice input`,micUnsupported:`Voice input is not supported in this browser`,moreActions:`More actions`,newConversation:`New chat`,panelTitle:`Chat`,popOut:`Open in new tab`,resizeHandle:`Drag to resize`,scrollToBottom:`Scroll to latest`,send:`Send`,queueMessage:`Queue message`,removeQueuedMessage:`Remove queued message`,compactingContext:`Optimizing conversation context…`,soundOff:`Sound off`,soundOn:`Sound on`,startNewConversation:`Start a new chat`,talkToOperator:`Talk to a person`,connectingOperator:`Connecting you to a person…`,noOperatorAvailable:`No one's available right now — leave your details and we'll follow up.`,chattingWithOperator:`You're chatting with {operator}`,cancelOperatorRequest:`Keep chatting with the AI`,stop:`Stop`,theme:`Theme`,themeAuto:`Auto`,themeDark:`Dark`,themeLight:`Light`,textSize:`Text size`,textSizeSmall:`Small`,textSizeNormal:`Normal`,textSizeLarge:`Large`,loading:`Loading…`,visualPreparing:`Preparing visual…`,visualError:`This visual could not be displayed.`,visualPartial:`Some parts of this visual could not be displayed.`,thinking:`Thinking…`,thoughts:`Thoughts`,toolResult:`Result`,sources:`Sources`,feedbackUp:`Good response`,feedbackDown:`Bad response`,feedbackThanks:`Thanks for your feedback`,copy:`Copy`,copied:`Copied`,tabHome:`Home`,tabConversations:`Chats`,tabHelp:`Help`,tabNews:`News`,modulesEmpty:`Nothing here yet`,moduleBack:`Back`,contentLoading:`Loading…`,contentHelpful:`Was this helpful?`,homeGreeting:`How can we help?`,homeGreetingNamed:`Hi {name} 👋`,homeGreetingLead:`How can we help?`,homeSearchPlaceholder:`Search for help`,homeAskPlaceholder:`Ask a question…`,homeWhatsNew:`What's new`,homeContentTitle:`Popular articles`,homeStatus:`Status`,helpTitle:`Help`,helpSearchPlaceholder:`Search for help`,helpEmpty:`No help articles yet`,helpLoading:`Loading help…`,helpSearchEmpty:`No results for “{query}”`,helpShowMore:`Show more`,newsTitle:`News`,newsEmpty:`No news yet`,newsLoading:`Loading news…`,newsBack:`Back to news`,newsPublishedAt:`Published {date}`,newsShowMore:`Show more`,newsUnseen:`New post`,formSubmit:`Submit`,formSkip:`Maybe later`,formSubmitted:`Completed`,formSkipped:`Maybe later`,formFillOut:`Fill out`,formRequired:`This field is required`,formInvalidEmail:`Enter a valid email address`,formInvalidTel:`Enter a valid phone number`,formInvalidUrl:`Enter a valid URL`,formInvalidNumber:`Enter a valid number`,formTooShort:`Too short (min {min} characters)`,formTooLong:`Too long (max {max} characters)`,formNumberTooSmall:`Must be at least {min}`,formNumberTooLarge:`Must be at most {max}`,formPatternMismatch:`Please match the requested format`,formChooseAtLeast:`Choose at least {min}`,formChooseAtMost:`Choose at most {max}`,formOther:`Other`,formOtherPlaceholder:`Type your answer…`,inputRequired:`Questions for you`,inputBadge:`Questions`,inputAnswered:`Answered`,inputSkipped:`Skipped`,showOptions:`Show options`,hideOptions:`Hide options`,qtypeText:`Your answer`,qtypeEmail:`Email address`,qtypePhone:`Phone number`,qtypeNumber:`Number`,qtypeDate:`Date`,qtypeChooseOne:`Pick one`,qtypeChooseAny:`Pick any`,qtypeBoolean:`Yes / No`,inputSubmit:`Submit answers`,inputSubmitHint:`Enter to send · Shift+Enter = new line`,inputSkip:`Skip`,confirmYes:`Yes`,confirmNo:`No`,approve:`Approve`,reject:`Reject`,approvalPrompt:`{tool} requires your approval to execute.`,approvalBody:`Review the tool input above and decide whether to allow this action.`,approvalYourResponse:`Your response: {decision}`,approvalEditHint:`You can edit this response until this step continues.`,approvalSubmitting:`Response submitted. Request in progress…`,edit:`Edit`,toolParameters:`Parameters`,statusAwaiting:`Awaiting Approval`,statusResponded:`Submitted`,statusRunning:`Running`,statusCompleted:`Completed`,statusDenied:`Denied`,statusError:`Error`,statusSuperseded:`Skipped`,statusIncomplete:`Not completed`},Tt={en:wt,fr:{attach:`Joindre des fichiers`,attachmentMimeRejected:`Type de fichier non pris en charge`,attachmentTooLarge:`Le fichier est trop volumineux`,attachmentTooMany:`Limite de pièces jointes atteinte`,conversationClosed:`Ce chat est fermé`,conversationLoading:`Chargement du chat…`,loadPreviousMessages:`Charger les messages précédents`,close:`Fermer`,collapse:`Réduire`,collapseSidebar:`Réduire la barre latérale`,composerPlaceholder:`Écrivez un message…`,dateLastWeek:`7 derniers jours`,dateOlder:`Plus ancien`,dateToday:`Aujourd'hui`,dateYesterday:`Hier`,dropZone:`Déposez les fichiers à joindre`,errorGeneric:`Une erreur s'est produite`,errorRateLimited:`Trop de requêtes — veuillez réessayer dans un instant.`,errorRetry:`Réessayer`,expand:`Agrandir`,expandSidebar:`Développer la barre latérale`,exitFullscreen:`Quitter le plein écran`,fullscreen:`Plein écran`,history:`Historique`,historyBack:`Retour au chat`,historyEmpty:`Aucun chat pour le moment`,historyContinue:`Poursuivre le chat`,historyLoading:`Chargement de vos chats…`,historyTitle:`Historique des chats`,loadMoreConversations:`Charger plus de conversations`,language:`Langue`,launcherOpen:`Ouvrir le chat`,launcherLabel:`Discuter avec nous`,micStart:`Démarrer la saisie vocale`,micStop:`Arrêter la saisie vocale`,micUnsupported:`La saisie vocale n'est pas prise en charge par ce navigateur`,moreActions:`Plus d'actions`,newConversation:`Nouveau chat`,panelTitle:`Chat`,popOut:`Ouvrir dans un nouvel onglet`,resizeHandle:`Glisser pour redimensionner`,scrollToBottom:`Aller au plus récent`,send:`Envoyer`,queueMessage:`Mettre le message en attente`,removeQueuedMessage:`Retirer le message en attente`,compactingContext:`Optimisation du contexte de la conversation…`,soundOff:`Son désactivé`,soundOn:`Son activé`,startNewConversation:`Démarrer un nouveau chat`,talkToOperator:`Parler à une personne`,connectingOperator:`Mise en relation avec une personne…`,noOperatorAvailable:`Personne n'est disponible pour le moment — laissez vos coordonnées et nous reviendrons vers vous.`,chattingWithOperator:`Vous discutez avec {operator}`,cancelOperatorRequest:`Continuer avec l'IA`,stop:`Arrêter`,theme:`Thème`,themeAuto:`Auto`,themeDark:`Sombre`,themeLight:`Clair`,textSize:`Taille du texte`,textSizeSmall:`Petite`,textSizeNormal:`Normale`,textSizeLarge:`Grande`,loading:`Chargement…`,visualPreparing:`Préparation du visuel…`,visualError:`Ce visuel n’a pas pu être affiché.`,visualPartial:`Certaines parties de ce visuel n’ont pas pu être affichées.`,thinking:`Réflexion…`,thoughts:`Réflexions`,toolResult:`Résultat`,sources:`Sources`,feedbackUp:`Bonne réponse`,feedbackDown:`Mauvaise réponse`,feedbackThanks:`Merci pour votre retour`,copy:`Copier`,copied:`Copié`,tabHome:`Accueil`,tabConversations:`Chats`,tabHelp:`Aide`,tabNews:`Actualités`,modulesEmpty:`Rien pour le moment`,moduleBack:`Retour`,contentLoading:`Chargement…`,contentHelpful:`Cela vous a-t-il aidé ?`,homeGreeting:`Comment pouvons-nous vous aider ?`,homeGreetingNamed:`Bonjour {name} 👋`,homeGreetingLead:`Comment pouvons-nous vous aider ?`,homeSearchPlaceholder:`Rechercher de l'aide`,homeAskPlaceholder:`Posez une question…`,homeWhatsNew:`Nouveautés`,homeContentTitle:`Articles populaires`,homeStatus:`Statut`,helpTitle:`Aide`,helpSearchPlaceholder:`Rechercher de l'aide`,helpEmpty:`Aucun article d'aide pour le moment`,helpLoading:`Chargement de l'aide…`,helpSearchEmpty:`Aucun résultat pour «\xA0{query}\xA0»`,helpShowMore:`Afficher plus`,newsTitle:`Actualités`,newsEmpty:`Aucune actualité pour le moment`,newsLoading:`Chargement des actualités…`,newsBack:`Retour aux actualités`,newsPublishedAt:`Publié le {date}`,newsShowMore:`Afficher plus`,newsUnseen:`Nouvelle publication`,formSubmit:`Envoyer`,formSkip:`Plus tard`,formSubmitted:`Terminé`,formSkipped:`Plus tard`,formFillOut:`Remplir`,formRequired:`Ce champ est obligatoire`,formInvalidEmail:`Saisissez une adresse e-mail valide`,formInvalidTel:`Saisissez un numéro de téléphone valide`,formInvalidUrl:`Saisissez une URL valide`,formInvalidNumber:`Saisissez un nombre valide`,formTooShort:`Trop court (min. {min} caractères)`,formTooLong:`Trop long (max. {max} caractères)`,formNumberTooSmall:`Doit être au moins {min}`,formNumberTooLarge:`Doit être au plus {max}`,formPatternMismatch:`Veuillez respecter le format demandé`,formChooseAtLeast:`Choisissez au moins {min}`,formChooseAtMost:`Choisissez au plus {max}`,formOther:`Autre`,formOtherPlaceholder:`Saisissez votre réponse…`,inputRequired:`Questions pour vous`,inputBadge:`Questions`,inputAnswered:`Répondu`,inputSkipped:`Ignoré`,showOptions:`Afficher les options`,hideOptions:`Masquer les options`,qtypeText:`Votre réponse`,qtypeEmail:`Adresse e-mail`,qtypePhone:`Numéro de téléphone`,qtypeNumber:`Nombre`,qtypeDate:`Date`,qtypeChooseOne:`Choisir une`,qtypeChooseAny:`Choisir plusieurs`,qtypeBoolean:`Oui / Non`,inputSubmit:`Envoyer les réponses`,inputSubmitHint:`Entrée pour envoyer · Maj+Entrée = saut de ligne`,inputSkip:`Ignorer`,confirmYes:`Oui`,confirmNo:`Non`,approve:`Approuver`,reject:`Refuser`,approvalPrompt:`{tool} nécessite votre approbation pour s'exécuter.`,approvalBody:`Vérifiez les paramètres ci-dessus et décidez d'autoriser ou non cette action.`,approvalYourResponse:`Votre réponse : {decision}`,approvalEditHint:`Vous pouvez modifier votre réponse jusqu'à la reprise de cette étape.`,approvalSubmitting:`Réponse envoyée. Traitement en cours…`,edit:`Modifier`,toolParameters:`Paramètres`,statusAwaiting:`En attente d'approbation`,statusResponded:`Envoyé`,statusRunning:`En cours`,statusCompleted:`Terminé`,statusDenied:`Refusé`,statusError:`Erreur`,statusSuperseded:`Ignoré`,statusIncomplete:`Non terminé`},ar:{attach:`إرفاق ملفات`,attachmentMimeRejected:`نوع الملف غير مدعوم`,attachmentTooLarge:`حجم الملف كبير جدًا`,attachmentTooMany:`تم بلوغ الحد الأقصى للمرفقات`,conversationClosed:`تم إغلاق هذه الدردشة`,conversationLoading:`جارٍ تحميل الدردشة…`,loadPreviousMessages:`تحميل الرسائل السابقة`,close:`إغلاق`,collapse:`طيّ`,collapseSidebar:`طيّ الشريط الجانبي`,composerPlaceholder:`اكتب رسالة…`,dateLastWeek:`آخر ٧ أيام`,dateOlder:`أقدم`,dateToday:`اليوم`,dateYesterday:`أمس`,dropZone:`أفلت الملفات لإرفاقها`,errorGeneric:`حدث خطأ ما`,errorRateLimited:`طلبات كثيرة جدًا — يرجى المحاولة بعد لحظة.`,errorRetry:`إعادة المحاولة`,expand:`توسيع`,expandSidebar:`توسيع الشريط الجانبي`,exitFullscreen:`إنهاء ملء الشاشة`,fullscreen:`ملء الشاشة`,history:`السجل`,historyBack:`العودة إلى الدردشة`,historyEmpty:`لا توجد دردشات سابقة بعد`,historyContinue:`متابعة الدردشة`,historyLoading:`جارٍ تحميل دردشاتك…`,historyTitle:`سجل الدردشات`,loadMoreConversations:`تحميل المزيد من المحادثات`,language:`اللغة`,launcherOpen:`فتح الدردشة`,launcherLabel:`تحدث معنا`,micStart:`بدء الإدخال الصوتي`,micStop:`إيقاف الإدخال الصوتي`,micUnsupported:`الإدخال الصوتي غير مدعوم في هذا المتصفح`,moreActions:`إجراءات إضافية`,newConversation:`دردشة جديدة`,panelTitle:`الدردشة`,popOut:`فتح في علامة تبويب جديدة`,resizeHandle:`اسحب لتغيير الحجم`,scrollToBottom:`الانتقال إلى الأحدث`,send:`إرسال`,queueMessage:`إضافة الرسالة إلى قائمة الانتظار`,removeQueuedMessage:`إزالة الرسالة من قائمة الانتظار`,compactingContext:`جارٍ تحسين سياق المحادثة…`,soundOff:`كتم الصوت`,soundOn:`تشغيل الصوت`,startNewConversation:`بدء دردشة جديدة`,talkToOperator:`التحدث إلى شخص`,connectingOperator:`جارٍ توصيلك بشخص…`,noOperatorAvailable:`لا يوجد موظفون متاحون الآن — اترك بياناتك وسنتواصل معك.`,chattingWithOperator:`أنت تتحدث مع {operator}`,cancelOperatorRequest:`متابعة المحادثة مع الذكاء الاصطناعي`,stop:`إيقاف`,theme:`المظهر`,themeAuto:`تلقائي`,themeDark:`داكن`,themeLight:`فاتح`,textSize:`حجم النص`,textSizeSmall:`صغير`,textSizeNormal:`عادي`,textSizeLarge:`كبير`,loading:`جارٍ التحميل…`,visualPreparing:`جارٍ إعداد المحتوى المرئي…`,visualError:`تعذر عرض هذا المحتوى المرئي.`,visualPartial:`تعذر عرض بعض أجزاء هذا المحتوى المرئي.`,thinking:`يفكّر…`,thoughts:`الأفكار`,toolResult:`النتيجة`,sources:`المصادر`,feedbackUp:`رد جيد`,feedbackDown:`رد سيئ`,feedbackThanks:`شكرًا على ملاحظاتك`,copy:`نسخ`,copied:`تم النسخ`,tabHome:`الرئيسية`,tabConversations:`الدردشات`,tabHelp:`المساعدة`,tabNews:`الأخبار`,modulesEmpty:`لا شيء هنا بعد`,moduleBack:`رجوع`,contentLoading:`جارٍ التحميل…`,contentHelpful:`هل كان هذا مفيدًا؟`,homeGreeting:`كيف يمكننا مساعدتك؟`,homeGreetingNamed:`مرحبًا {name} 👋`,homeGreetingLead:`كيف يمكننا مساعدتك؟`,homeSearchPlaceholder:`ابحث عن مساعدة`,homeAskPlaceholder:`اطرح سؤالاً…`,homeWhatsNew:`ما الجديد`,homeContentTitle:`مقالات شائعة`,homeStatus:`الحالة`,helpTitle:`المساعدة`,helpSearchPlaceholder:`ابحث عن مساعدة`,helpEmpty:`لا توجد مقالات مساعدة بعد`,helpLoading:`جارٍ تحميل المساعدة…`,helpSearchEmpty:`لا نتائج لـ «{query}»`,helpShowMore:`عرض المزيد`,newsTitle:`الأخبار`,newsEmpty:`لا توجد أخبار بعد`,newsLoading:`جارٍ تحميل الأخبار…`,newsBack:`العودة إلى الأخبار`,newsPublishedAt:`نُشر في {date}`,newsShowMore:`عرض المزيد`,newsUnseen:`منشور جديد`,formSubmit:`إرسال`,formSkip:`لاحقًا`,formSubmitted:`تم`,formSkipped:`لاحقًا`,formFillOut:`تعبئة`,formRequired:`هذا الحقل مطلوب`,formInvalidEmail:`أدخل بريدًا إلكترونيًا صحيحًا`,formInvalidTel:`أدخل رقم هاتف صحيحًا`,formInvalidUrl:`أدخل رابطًا صحيحًا`,formInvalidNumber:`أدخل رقمًا صحيحًا`,formTooShort:`قصير جدًا (الحد الأدنى {min} حرفًا)`,formTooLong:`طويل جدًا (الحد الأقصى {max} حرفًا)`,formNumberTooSmall:`يجب ألا يقل عن {min}`,formNumberTooLarge:`يجب ألا يزيد عن {max}`,formPatternMismatch:`يرجى مطابقة الصيغة المطلوبة`,formChooseAtLeast:`اختر {min} على الأقل`,formChooseAtMost:`اختر {max} على الأكثر`,formOther:`أخرى`,formOtherPlaceholder:`اكتب إجابتك…`,inputRequired:`أسئلة لك`,inputBadge:`أسئلة`,inputAnswered:`تمت الإجابة`,inputSkipped:`تم التخطي`,showOptions:`إظهار الخيارات`,hideOptions:`إخفاء الخيارات`,qtypeText:`إجابتك`,qtypeEmail:`عنوان البريد الإلكتروني`,qtypePhone:`رقم الهاتف`,qtypeNumber:`رقم`,qtypeDate:`تاريخ`,qtypeChooseOne:`اختر واحدًا`,qtypeChooseAny:`اختر أيًا`,qtypeBoolean:`نعم / لا`,inputSubmit:`إرسال الإجابات`,inputSubmitHint:`Enter للإرسال · Shift+Enter = سطر جديد`,inputSkip:`تخطٍّ`,confirmYes:`نعم`,confirmNo:`لا`,approve:`موافقة`,reject:`رفض`,approvalPrompt:`تتطلب {tool} موافقتك للتنفيذ.`,approvalBody:`راجع مُعطيات الأداة أعلاه وقرّر السماح بهذا الإجراء أو رفضه.`,approvalYourResponse:`ردّك: {decision}`,approvalEditHint:`يمكنك تعديل ردّك حتى تستأنف هذه الخطوة.`,approvalSubmitting:`تم إرسال الرد. جارٍ التنفيذ…`,edit:`تعديل`,toolParameters:`المعطيات`,statusAwaiting:`بانتظار الموافقة`,statusResponded:`تم الإرسال`,statusRunning:`قيد التنفيذ`,statusCompleted:`مكتمل`,statusDenied:`مرفوض`,statusError:`خطأ`,statusSuperseded:`تم التخطي`,statusIncomplete:`لم يكتمل`},es:{attach:`Adjuntar archivos`,attachmentMimeRejected:`Tipo de archivo no admitido`,attachmentTooLarge:`El archivo es demasiado grande`,attachmentTooMany:`Se alcanzó el límite de adjuntos`,conversationClosed:`Este chat está cerrado`,conversationLoading:`Cargando chat…`,loadPreviousMessages:`Cargar mensajes anteriores`,close:`Cerrar`,collapse:`Contraer`,collapseSidebar:`Contraer la barra lateral`,composerPlaceholder:`Escribe un mensaje…`,dateLastWeek:`Últimos 7 días`,dateOlder:`Anteriores`,dateToday:`Hoy`,dateYesterday:`Ayer`,dropZone:`Suelta los archivos para adjuntarlos`,errorGeneric:`Algo salió mal`,errorRateLimited:`Demasiadas solicitudes: inténtalo de nuevo en un momento.`,errorRetry:`Reintentar`,expand:`Ampliar`,expandSidebar:`Expandir la barra lateral`,exitFullscreen:`Salir de pantalla completa`,fullscreen:`Pantalla completa`,history:`Historial`,historyBack:`Volver al chat`,historyEmpty:`Aún no tienes chats`,historyContinue:`Continuar el chat`,historyLoading:`Cargando tus chats…`,historyTitle:`Historial de chats`,loadMoreConversations:`Cargar más conversaciones`,language:`Idioma`,launcherOpen:`Abrir el chat`,launcherLabel:`Chatea con nosotros`,micStart:`Iniciar entrada de voz`,micStop:`Detener entrada de voz`,micUnsupported:`Este navegador no admite la entrada de voz`,moreActions:`Más acciones`,newConversation:`Nuevo chat`,panelTitle:`Chat`,popOut:`Abrir en una pestaña nueva`,resizeHandle:`Arrastra para cambiar el tamaño`,scrollToBottom:`Ir a lo más reciente`,send:`Enviar`,queueMessage:`Poner mensaje en cola`,removeQueuedMessage:`Quitar mensaje de la cola`,compactingContext:`Optimizando el contexto de la conversación…`,soundOff:`Sonido desactivado`,soundOn:`Sonido activado`,startNewConversation:`Iniciar un chat nuevo`,talkToOperator:`Hablar con una persona`,connectingOperator:`Conectándote con una persona…`,noOperatorAvailable:`Nadie está disponible ahora — deja tus datos y te contactaremos.`,chattingWithOperator:`Estás chateando con {operator}`,cancelOperatorRequest:`Seguir con la IA`,stop:`Detener`,theme:`Tema`,themeAuto:`Automático`,themeDark:`Oscuro`,themeLight:`Claro`,textSize:`Tamaño del texto`,textSizeSmall:`Pequeño`,textSizeNormal:`Normal`,textSizeLarge:`Grande`,loading:`Cargando…`,visualPreparing:`Preparando visualización…`,visualError:`No se pudo mostrar esta visualización.`,visualPartial:`No se pudieron mostrar algunas partes de esta visualización.`,thinking:`Pensando…`,thoughts:`Razonamiento`,toolResult:`Resultado`,sources:`Fuentes`,feedbackUp:`Buena respuesta`,feedbackDown:`Mala respuesta`,feedbackThanks:`Gracias por tu opinión`,copy:`Copiar`,copied:`Copiado`,tabHome:`Inicio`,tabConversations:`Chats`,tabHelp:`Ayuda`,tabNews:`Novedades`,modulesEmpty:`Aún no hay nada aquí`,moduleBack:`Atrás`,contentLoading:`Cargando…`,contentHelpful:`¿Te resultó útil?`,homeGreeting:`¿Cómo podemos ayudarte?`,homeGreetingNamed:`Hola, {name} 👋`,homeGreetingLead:`¿Cómo podemos ayudarte?`,homeSearchPlaceholder:`Buscar ayuda`,homeAskPlaceholder:`Haz una pregunta…`,homeWhatsNew:`Lo nuevo`,homeContentTitle:`Artículos populares`,homeStatus:`Estado`,helpTitle:`Ayuda`,helpSearchPlaceholder:`Buscar ayuda`,helpEmpty:`Aún no hay artículos de ayuda`,helpLoading:`Cargando la ayuda…`,helpSearchEmpty:`Sin resultados para «{query}»`,helpShowMore:`Mostrar más`,newsTitle:`Novedades`,newsEmpty:`Aún no hay novedades`,newsLoading:`Cargando novedades…`,newsBack:`Volver a novedades`,newsPublishedAt:`Publicado el {date}`,newsShowMore:`Mostrar más`,newsUnseen:`Publicación nueva`,formSubmit:`Enviar`,formSkip:`Quizá más tarde`,formSubmitted:`Completado`,formSkipped:`Quizá más tarde`,formFillOut:`Completar`,formRequired:`Este campo es obligatorio`,formInvalidEmail:`Introduce un correo electrónico válido`,formInvalidTel:`Introduce un número de teléfono válido`,formInvalidUrl:`Introduce una URL válida`,formInvalidNumber:`Introduce un número válido`,formTooShort:`Demasiado corto (mín. {min} caracteres)`,formTooLong:`Demasiado largo (máx. {max} caracteres)`,formNumberTooSmall:`Debe ser al menos {min}`,formNumberTooLarge:`Debe ser como máximo {max}`,formPatternMismatch:`Respeta el formato solicitado`,formChooseAtLeast:`Elige al menos {min}`,formChooseAtMost:`Elige como máximo {max}`,formOther:`Otro`,formOtherPlaceholder:`Escribe tu respuesta…`,inputRequired:`Preguntas para ti`,inputBadge:`Preguntas`,inputAnswered:`Respondido`,inputSkipped:`Omitido`,showOptions:`Mostrar opciones`,hideOptions:`Ocultar opciones`,qtypeText:`Tu respuesta`,qtypeEmail:`Correo electrónico`,qtypePhone:`Número de teléfono`,qtypeNumber:`Número`,qtypeDate:`Fecha`,qtypeChooseOne:`Elige una`,qtypeChooseAny:`Elige varias`,qtypeBoolean:`Sí / No`,inputSubmit:`Enviar respuestas`,inputSubmitHint:`Enter para enviar · Mayús+Enter = nueva línea`,inputSkip:`Omitir`,confirmYes:`Sí`,confirmNo:`No`,approve:`Aprobar`,reject:`Rechazar`,approvalPrompt:`{tool} requiere tu aprobación para ejecutarse.`,approvalBody:`Revisa los parámetros de arriba y decide si permites esta acción.`,approvalYourResponse:`Tu respuesta: {decision}`,approvalEditHint:`Puedes cambiar tu respuesta hasta que este paso continúe.`,approvalSubmitting:`Respuesta enviada. Procesando…`,edit:`Editar`,toolParameters:`Parámetros`,statusAwaiting:`Esperando aprobación`,statusResponded:`Enviado`,statusRunning:`En curso`,statusCompleted:`Completado`,statusDenied:`Denegado`,statusError:`Error`,statusSuperseded:`Omitido`,statusIncomplete:`No completado`},he:{attach:`צירוף קבצים`,attachmentMimeRejected:`סוג הקובץ אינו נתמך`,attachmentTooLarge:`הקובץ גדול מדי`,attachmentTooMany:`הגעת למספר המרבי של קבצים מצורפים`,conversationClosed:`הצ׳אט הזה נסגר`,conversationLoading:`טוען צ׳אט…`,loadPreviousMessages:`טעינת הודעות קודמות`,close:`סגירה`,collapse:`כיווץ`,collapseSidebar:`כיווץ סרגל הצד`,composerPlaceholder:`כתוב הודעה…`,dateLastWeek:`7 הימים האחרונים`,dateOlder:`ישן יותר`,dateToday:`היום`,dateYesterday:`אתמול`,dropZone:`שחרר קבצים כדי לצרף`,errorGeneric:`משהו השתבש`,errorRateLimited:`יותר מדי בקשות — נסה שוב בעוד רגע.`,errorRetry:`נסה שוב`,expand:`הרחבה`,expandSidebar:`הרחבת סרגל הצד`,exitFullscreen:`יציאה ממסך מלא`,fullscreen:`מסך מלא`,history:`היסטוריה`,historyBack:`חזרה לצ׳אט`,historyEmpty:`אין עדיין צ׳אטים קודמים`,historyContinue:`המשך צ׳אט`,historyLoading:`טוען את הצ׳אטים שלך…`,historyTitle:`היסטוריית צ׳אטים`,loadMoreConversations:`טעינת שיחות נוספות`,language:`שפה`,launcherOpen:`פתיחת צ׳אט`,launcherLabel:`דברו איתנו`,micStart:`התחלת קלט קולי`,micStop:`עצירת קלט קולי`,micUnsupported:`קלט קולי אינו נתמך בדפדפן זה`,moreActions:`פעולות נוספות`,newConversation:`צ׳אט חדש`,panelTitle:`צ׳אט`,popOut:`פתיחה בכרטיסייה חדשה`,resizeHandle:`גרור לשינוי הגודל`,scrollToBottom:`מעבר לחדש ביותר`,send:`שליחה`,queueMessage:`הוספת ההודעה לתור`,removeQueuedMessage:`הסרת ההודעה מהתור`,compactingContext:`מבצע אופטימיזציה להקשר השיחה…`,soundOff:`השתקת הצליל`,soundOn:`הפעלת הצליל`,startNewConversation:`התחלת צ׳אט חדש`,talkToOperator:`דברו עם אדם`,connectingOperator:`מחברים אותך לאדם…`,noOperatorAvailable:`אין נציגים זמינים כעת — השאר את הפרטים שלך ונחזור אליך.`,chattingWithOperator:`אתה מצ׳וטט עם {operator}`,cancelOperatorRequest:`המשך לשוחח עם ה-AI`,stop:`עצירה`,theme:`ערכת נושא`,themeAuto:`אוטומטי`,themeDark:`כהה`,themeLight:`בהיר`,textSize:`גודל טקסט`,textSizeSmall:`קטן`,textSizeNormal:`רגיל`,textSizeLarge:`גדול`,loading:`טוען…`,visualPreparing:`מכין תצוגה…`,visualError:`לא ניתן היה להציג תצוגה זו.`,visualPartial:`לא ניתן היה להציג חלקים מתצוגה זו.`,thinking:`חושב…`,thoughts:`מחשבות`,toolResult:`תוצאה`,sources:`מקורות`,feedbackUp:`תשובה טובה`,feedbackDown:`תשובה גרועה`,feedbackThanks:`תודה על המשוב`,copy:`העתק`,copied:`הועתק`,tabHome:`בית`,tabConversations:`צ׳אטים`,tabHelp:`עזרה`,tabNews:`חדשות`,modulesEmpty:`אין כאן עדיין כלום`,moduleBack:`חזרה`,contentLoading:`טוען…`,contentHelpful:`האם זה עזר?`,homeGreeting:`כיצד נוכל לעזור?`,homeGreetingNamed:`שלום {name} 👋`,homeGreetingLead:`כיצד נוכל לעזור?`,homeSearchPlaceholder:`חיפוש עזרה`,homeAskPlaceholder:`שאלו שאלה…`,homeWhatsNew:`מה חדש`,homeContentTitle:`מאמרים פופולריים`,homeStatus:`סטטוס`,helpTitle:`עזרה`,helpSearchPlaceholder:`חיפוש עזרה`,helpEmpty:`אין עדיין מאמרי עזרה`,helpLoading:`טוען עזרה…`,helpSearchEmpty:`אין תוצאות עבור „{query}”`,helpShowMore:`הצגת עוד`,newsTitle:`חדשות`,newsEmpty:`אין עדיין חדשות`,newsLoading:`טוען חדשות…`,newsBack:`חזרה לחדשות`,newsPublishedAt:`פורסם ב-{date}`,newsShowMore:`הצגת עוד`,newsUnseen:`פוסט חדש`,formSubmit:`שליחה`,formSkip:`אחר כך`,formSubmitted:`נשלח`,formSkipped:`דולג`,formFillOut:`מילוי`,formRequired:`שדה חובה`,formInvalidEmail:`הזן כתובת אימייל תקינה`,formInvalidTel:`הזן מספר טלפון תקין`,formInvalidUrl:`הזן כתובת URL תקינה`,formInvalidNumber:`הזן מספר תקין`,formTooShort:`קצר מדי (לפחות {min} תווים)`,formTooLong:`ארוך מדי (לכל היותר {max} תווים)`,formNumberTooSmall:`חייב להיות לפחות {min}`,formNumberTooLarge:`חייב להיות לכל היותר {max}`,formPatternMismatch:`התאם לתבנית הנדרשת`,formChooseAtLeast:`בחר לפחות {min}`,formChooseAtMost:`בחר לכל היותר {max}`,formOther:`אחר`,formOtherPlaceholder:`כתוב את תשובתך…`,inputRequired:`שאלות עבורך`,inputBadge:`שאלות`,inputAnswered:`נענה`,inputSkipped:`דולג`,showOptions:`הצג אפשרויות`,hideOptions:`הסתר אפשרויות`,qtypeText:`התשובה שלך`,qtypeEmail:`כתובת אימייל`,qtypePhone:`מספר טלפון`,qtypeNumber:`מספר`,qtypeDate:`תאריך`,qtypeChooseOne:`בחר אחת`,qtypeChooseAny:`בחר כמה`,qtypeBoolean:`כן / לא`,inputSubmit:`שליחת תשובות`,inputSubmitHint:`Enter לשליחה · Shift+Enter = שורה חדשה`,inputSkip:`דילוג`,confirmYes:`כן`,confirmNo:`לא`,approve:`אישור`,reject:`דחייה`,approvalPrompt:`הכלי {tool} דורש את אישורך כדי לפעול.`,approvalBody:`בדוק את פרמטרי הכלי שלמעלה והחלט אם לאשר פעולה זו.`,approvalYourResponse:`התגובה שלך: {decision}`,approvalEditHint:`ניתן לערוך את תגובתך עד שהשלב הזה יתחדש.`,approvalSubmitting:`התגובה נשלחה. מבצע…`,edit:`עריכה`,toolParameters:`פרמטרים`,statusAwaiting:`ממתין לאישור`,statusResponded:`נשלח`,statusRunning:`פועל`,statusCompleted:`הושלם`,statusDenied:`נדחה`,statusError:`שגיאה`,statusSuperseded:`דולג`,statusIncomplete:`לא הושלם`}};function Et(e,t){let n=Dt(e),r=jt(t),i=n===`en`?{}:Tt[n]??{},a=r?t[n]??{}:t??{},o=r?t.en??{}:{};return{...wt,...i,...o,...a}}function Dt(e){return(e.split(`-`)[0]??`en`).toLowerCase()}const Ot=/* @__PURE__ */ new Set([`ar`,`he`,`iw`,`fa`,`ur`,`ps`,`sd`,`ug`,`yi`,`dv`,`ckb`,`ks`,`nqo`,`prs`,`syr`]);function kt(e){return Ot.has(Dt(e))}function At(e,t){return e[t]??t}function jt(e){if(!e)return!1;for(let t of Object.values(e))if(t&&typeof t==`object`)return!0;return!1}const Mt=new class{get(e){try{return localStorage.getItem(e)}catch{return null}}set(e,t){try{localStorage.setItem(e,t)}catch{}}remove(e){try{localStorage.removeItem(e)}catch{}}},Nt={maxBytes:10485760,maxCount:10,accept:`*/*`},Pt={voice:`local`},Ft={list:[],byTrigger:{}},It={enabled:!0,sampleRate:1},Lt={upload:`/pai/upload-file`,transcribe:`/pai/transcribe-audio`,submitForm:`/pai/submit-form`},Rt={variant:`circle`,size:`md`,label:void 0,icon:`chat`,hidden:!1},zt={floating:[`theme`,`textSize`,`history`,`close`,`clear`,`expand`,`fullscreen`,`popOut`,`sound`,`language`],inline:[`theme`,`textSize`,`history`,`close`,`clear`,`fullscreen`,`popOut`,`sound`,`language`],standalone:[`theme`,`textSize`,`history`,`clear`,`sound`,`language`],page:[`theme`,`textSize`,`history`,`clear`,`sound`,`language`],modal:[`theme`,`textSize`,`history`,`close`,`clear`,`fullscreen`,`popOut`,`sound`,`language`],drawer:[`theme`,`textSize`,`history`,`close`,`clear`,`fullscreen`,`popOut`,`sound`,`language`]},Bt={enabled:!0,volume:.3,events:void 0},Vt={enabled:!0,events:void 0},Ht=[{label:`tabConversations`,layout:`chat`}],Ut=C.scope(`context`),Wt=/* @__PURE__ */ new Set([`visitorId`,`conversationId`,`jwt`,`token`,`authorization`,`password`]),Gt=1024,Kt=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function qt(e){return Yt(e,`userContext`,!0)}function Jt(e){return Yt(e,`pageContext`,!1)}function Yt(e,t,n){if(e==null)return;if(typeof e!=`object`||Array.isArray(e)){Ut.warn(`ignored ${t} — expected an object`,{type:Array.isArray(e)?`array`:typeof e});return}let r={},i=0;for(let[n,a]of Object.entries(e)){if(Wt.has(n)){Ut.warn(`dropped reserved ${t} key "${n}" — managed by the widget, not host-settable`);continue}if(a==null)continue;if(i>=50){Ut.warn(`${t} truncated at 50 keys — dropped "${n}"`);continue}let e=Xt(t,n,a);e!==void 0&&(r[n]=e,i++)}return n&&typeof r.email==`string`&&!Kt.test(r.email)&&(Ut.warn(`dropped malformed context field`,{field:`${t}.email`,reason:`invalid format`}),delete r.email),Object.keys(r).length>0?r:void 0}function Xt(e,t,n){if(typeof n==`boolean`)return n;if(typeof n==`number`){if(!Number.isFinite(n)){Ut.warn(`dropped non-finite ${e}.${t}`);return}return n}if(typeof n==`string`){let r=n.trim();return r===``?void 0:r.length>Gt?(Ut.warn(`truncated ${e}.${t} to ${Gt} chars`),r.slice(0,Gt)):r}Ut.warn(`dropped ${e}.${t} — only string/number/boolean values are allowed`,{type:typeof n})}function Zt(e){let t=typeof e==`object`&&e?e:{},n=t.presentation??{},r=t.behavior??{},i=t.i18n??{},a=t.feedback??{},o=t.footer??{},s=t.header??{},c={enabled:t.history?.enabled??!0},{themeMode:l,themeOverrides:d}=Qt(t.theme),f=n.mode??`floating`,p=$t(i.defaultLocale),m=i.availableLocales??[i.locale??p],h=en(i.locale??p,m,p),g=(t.baseUrl??u.defaultBaseUrl).replace(/\/$/,``),_=(t.agentApiBaseUrl??`${g}/api/agent`).replace(/\/$/,``),v=(t.dataApiBaseUrl??`${g}/api/data`).replace(/\/$/,``);return{widgetId:t.widgetId??`default`,publicKey:t.publicKey,aiAgentDeploymentId:t.aiAgentDeploymentId,baseUrl:g,agentApiBaseUrl:_,dataApiBaseUrl:v,userContext:qt(t.userContext),pageContext:Jt(t.pageContext),position:n.position??`bottom-right`,themeMode:l,textSize:`normal`,themeOverrides:d,mode:f,iframe:n.iframe??!1,responseMode:r.responseMode??`streaming`,showReasoning:r.showReasoning??!1,showToolCalls:r.showToolCalls??!1,showSources:r.showSources??!1,enableMessageFeedback:!(r.disableMessageFeedback??!1),autoSendSuggestions:r.autoSendSuggestions??!1,popOutUrl:r.popOutUrl,features:{voice:t.features?.voice??Pt.voice,fileUpload:!(t.features?.disableFileUpload??!1),humanInLoop:!(t.features?.disableHumanInLoop??!1),operatorRequest:t.features?.enableOperatorRequest===!0},forms:ln(t.forms,h),endpoints:{upload:t.endpoints?.upload??Lt.upload,transcribe:t.endpoints?.transcribe??Lt.transcribe,submitForm:t.endpoints?.submitForm??Lt.submitForm},attachments:{accept:t.composer?.attachments?.accept??Nt.accept,maxBytes:t.composer?.attachments?.maxBytes??Nt.maxBytes,maxCount:t.composer?.attachments?.maxCount??Nt.maxCount},locale:h,defaultLocale:p,availableLocales:m,startMinimized:r.startMinimized??!0,actions:tn(f,s.actions,c.enabled),size:n.size??{},launcher:dn(t.launcher),sound:nn(a.sound),haptics:rn(a.haptics),strings:Et(h,i.strings),stringsOverride:i.strings,composerDisclaimer:o.composerDisclaimer??``,poweredBy:on(o.poweredBy),composer:sn(t.composer),modules:cn(t.modules,c.enabled),tracking:an(t.tracking,v),history:c,storage:t.storage??Mt,userToken:t.userToken,tools:t.tools,onMessage:t.onMessage,onOpen:t.onOpen,onClose:t.onClose,onError:t.onError}}function Qt(e){if(typeof e==`string`)return{themeMode:e,themeOverrides:{}};if(!e||typeof e!=`object`)return{themeMode:`auto`,themeOverrides:{}};let{mode:t,...n}=e;return{themeMode:t??`auto`,themeOverrides:n}}function $t(e){return e&&e!==`auto`?e:globalThis.navigator?.language||`en`}function en(e,t,n){return t.length<=1||t.includes(e)?e:t.includes(n)?n:t[0]??e}function tn(e,t,n){let r=t??zt[e];return n?r:r.filter(e=>e!==`history`)}function nn(e){return{enabled:e?.enabled??Bt.enabled,volume:e?.volume??Bt.volume,events:e?.events}}function rn(e){return{enabled:e?.enabled??Vt.enabled,events:e?.events}}function an(e,t){let n=e?.sampleRate??It.sampleRate;return{enabled:e?.enabled??It.enabled,endpoint:e?.endpoint??`${t}/pai/elements-px.gif`,sampleRate:Math.min(1,Math.max(0,Number.isFinite(n)?n:1)),token:e?.token}}function on(e){let t={text:`Powered by ${u.displayName}`,href:u.siteUrl,...e};return t.text||t.logoUrl?t:null}function sn(e){let t=e?.sendButton;return{sendButton:{shape:t?.shape??`circle`,icon:t?.icon??`arrowUp`,variant:t?.variant??`filled`}}}function cn(e,t){let n=e??Ht,r=/* @__PURE__ */ new Set,i=[];for(let e of n.slice(0,4)){if(!e?.label||!e?.layout)continue;let n=e.contentCollectionIds?.filter(Boolean),a=e.id??n?.[0]??e.layout;for(;r.has(a);)a=`${a}-${i.length}`;r.add(a);let o={id:a,label:e.label,layout:e.layout};n?.length&&(o.contentCollectionIds=n),e.layout===`home`&&(o.brandName=e.brandName,o.greetingText=e.greetingText,o.showGreeting=!(e.hideGreeting??!1),o.showSearchBar=!(e.hideSearchBar??!1),o.showRecentConversations=t&&!(e.hideRecentConversations??!1),e.userAvatars?.length&&(o.userAvatars=e.userAvatars),e.status&&(o.status=e.status),o.contentBlockTitle=e.contentBlockTitle),i.push(o)}return{list:i,byId:Object.fromEntries(i.map(e=>[e.id,e]))}}function ln(e,t){if(!e?.length)return Ft;let n=[],r=/* @__PURE__ */ new Set;for(let i of e){if(!i?.id||r.has(i.id))continue;let e=Ct(i,t),a=(e.fields??[]).filter(e=>!!(e?.name&&e.label&&e.type)),o=(Array.isArray(e.on)?e.on:[e.on]).map(un).filter(e=>e!==null);a.length!==0&&o.length!==0&&(r.add(e.id),n.push({id:e.id,triggers:o,when:e.when,fields:a,title:e.title,description:e.description,submitLabel:e.submitLabel,skippable:e.skippable??!1,frequency:e.frequency??`once`,mirrorToContext:e.mirrorToContext??!0,reopenable:e.reopenable??!0,reviewable:e.reviewable??!0}))}let i={};for(let e of n){var a;for(let t of e.triggers)(i[a=t.kind]??(i[a]=[])).push(e)}return{list:n,byTrigger:i}}function un(e){if(typeof e!=`string`)return null;if(e===`pre-chat`||e===`conversation-closed`||e===`panel-close`||e===`manual`)return{kind:e};let[t,n]=e.split(`:`,2);if(t===`after-messages`){let e=Number(n);return Number.isFinite(e)&&e>0?{kind:`after-messages`,param:e}:null}if(t===`idle`){let e=Number(n);return Number.isFinite(e)&&e>0?{kind:`idle`,param:e}:null}return t===`page-area`&&n?{kind:`page-area`,param:n}:null}function dn(e){let t=e?.callout?.text?{shape:`pill`,position:`auto`,delayMs:1200,autoDismissMs:0,animated:!0,persistent:!0,...e.callout}:null;return{variant:e?.variant??Rt.variant,size:e?.size??Rt.size,label:e?.label??Rt.label,icon:e?.icon??Rt.icon,hidden:e?.hidden??Rt.hidden,callout:t}}function fn(e,t,n,r){let i=en(t,e.availableLocales,e.defaultLocale);if(i===e.locale&&n===e.themeMode&&r===e.textSize)return e;let a={...e};return i!==e.locale&&(a.locale=i,a.strings=Et(i,e.stringsOverride)),n!==e.themeMode&&(a.themeMode=n),r!==e.textSize&&(a.textSize=r),a}const pn=[`presentation`,`behavior`,`theme`,`launcher`,`header`,`composer`,`feedback`,`i18n`,`footer`,`features`,`tracking`,`endpoints`,`history`];function mn(e,t){if(!t)return e;let n={...e};for(let r of pn){let i=t[r];if(i===void 0)continue;let a=e[r];r===`theme`?a===void 0?n[r]=i:typeof a==`string`&&typeof i==`object`&&i&&(n[r]={...i,mode:a}):r!==`i18n`&&(n[r]=hn(i,a))}t.modules!==void 0&&e.modules===void 0&&(n.modules=t.modules),t.dataApiBaseUrl!==void 0&&e.dataApiBaseUrl===void 0&&(n.dataApiBaseUrl=t.dataApiBaseUrl);let r=e.i18n,i=t.i18n;if(r||i){let e=hn(i??{},r);i?.availableLocales!==void 0&&(e.availableLocales=i.availableLocales),i?.defaultLocale!==void 0&&(e.defaultLocale=i.defaultLocale);let t=r?.strings,a=i?.strings;(t||a)&&(e.strings=gn(a,t)),n.i18n=e}return n}function hn(e,t){if(!t)return e;let n={...e};for(let[e,r]of Object.entries(t))r!==void 0&&(n[e]=r);return n}function gn(e,t){if(!e)return t;if(!t)return e;let n=jt(e),r=jt(t);if(!n&&!r)return{...e,...t};let i={},a=n?e:{en:e},o=r?t:{en:t};for(let[e,t]of Object.entries(a))i[e]={...t};for(let[e,t]of Object.entries(o))i[e]={...i[e],...t};return i}const _n=[`clear`,`expand`,`fullscreen`,`popOut`,`sound`,`history`,`language`,`theme`,`textSize`,`close`];function vn(e){return e!==`false`}const yn=[[`public-key`,`publicKey`],[`ai-agent-deployment-id`,`aiAgentDeploymentId`],[`base-url`,`baseUrl`],[`agent-api-base-url`,`agentApiBaseUrl`],[`data-api-base-url`,`dataApiBaseUrl`],[`theme`,`theme`,e=>e]],bn=[[`mode`,`mode`,e=>e],[`position`,`position`,e=>e],[`iframe`,`iframe`,vn]],xn=[[`width`,`width`],[`height`,`height`]],Sn=[[`response-mode`,`responseMode`,e=>e],[`start-minimized`,`startMinimized`,vn],[`show-reasoning`,`showReasoning`,vn],[`show-tool-calls`,`showToolCalls`,vn],[`show-sources`,`showSources`,vn],[`disable-message-feedback`,`disableMessageFeedback`,vn],[`auto-send-suggestions`,`autoSendSuggestions`,vn],[`pop-out-url`,`popOutUrl`]],Cn=[[`locale`,`locale`]];new Set(_n);const wn=[[`launcher-variant`,`variant`,e=>e],[`launcher-size`,`size`,e=>e],[`launcher-icon`,`icon`],[`launcher-hidden`,`hidden`,vn]],Tn=[[`features-disable-file-upload`,`disableFileUpload`,vn],[`features-voice`,`voice`,e=>e]],En=[[`endpoint-upload`,`upload`],[`endpoint-transcribe`,`transcribe`]],Dn=[[`user-id`,`id`],[`user-email`,`email`],[`user-name`,`name`]],On=[[`page-area`,`area`],[`page-url`,`url`],[`page-path`,`path`],[`page-title`,`title`]],kn=[`launcher-label`,`callout-text`,`callout-delay`,`actions`,`user-context`,`page-context`],An=[yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On],jn=/* @__PURE__ */ new Set([`iframe`,`start-minimized`]);[...An.flatMap(e=>e.map(([e])=>e).filter(e=>!jn.has(e))),...kn];const Mn=C.scope(`track`);function Nn(e,t){let n=typeof e==`string`?e.trim():``;if(!n||n.length>64){Mn.warn(`track: ignored an event without a name of 1–64 characters`,{name:e});return}let r=Object.fromEntries(Object.entries(typeof t==`object`&&t?t:{}).filter(e=>typeof e[1]==`string`||typeof e[1]==`boolean`||Number.isFinite(e[1])));return JSON.stringify(r).length>256?(Mn.warn(`track: sent the event without its data, which is over 256 characters`,{name:n}),{name:n}):Object.keys(r).length>0?{name:n,data:r}:{name:n}}function Pn(e){let t=[];return e.on(`hostEvent`,e=>{t.push({...e,at:Date.now()}),t.length>10&&t.shift()}),t}function Fn(){let e=Date.now(),t=/* @__PURE__ */ new Uint8Array(16);t[0]=Math.floor(e/2**40)&255,t[1]=Math.floor(e/2**32)&255,t[2]=e>>>24&255,t[3]=e>>>16&255,t[4]=e>>>8&255,t[5]=e&255,In(t.subarray(6)),t[6]=t[6]&15|112,t[8]=t[8]&63|128;let n=Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``);return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function In(e){if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`)crypto.getRandomValues(e);else for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256)}const Ln=C.scope(`persistence`);function Rn(e,t=Mt,n){let r=n?`${e}.${n}`:e,i=`${u.cssPrefix}.storageVersion`,a=t.get(i)??void 0,o=a?`.v${a}`:``,s=`${u.cssPrefix}.${r}${o}`,c=`${u.cssPrefix}${o}.visitorId`,l=`${s}.conversationId`,d=`${s}.userPrefs`,f=`${s}.panelOpen`,p=`${s}.panelSize`,m=`${s}.calloutDismissed`,h=`${s}.sidebarCollapsed`,g=`${s}.activeModule`,_=`${s}.seenNewsId`,v=`${s}.historyCount`,y=`${s}.formsDone`,b={getVisitorId(){let e=t.get(c);if(e)return e;let n=Fn();return t.set(c,n),n},loadConversationId(){return t.get(l)??void 0},saveConversationId(e){Ln.trace(`saveConversationId`,{id:e,scope:r}),e?t.set(l,e):t.remove(l)},loadDraft(e){return t.get(`${s}.draft.${e}`)??``},saveDraft(e,n){let r=`${s}.draft.${e}`;n?t.set(r,n):t.remove(r)},loadMessageQueue(e){let n=t.get(`${s}.messageQueue.${e}`);if(!n)return[];try{let e=JSON.parse(n);return!Array.isArray(e)||!e.every(Bn)?[]:e}catch(e){return Ln.warn(`loadMessageQueue parse failed`,{error:e}),[]}},saveMessageQueue(e,n){let r=`${s}.messageQueue.${e}`;if(n.length===0)t.remove(r);else try{t.set(r,JSON.stringify(n))}catch(e){Ln.warn(`saveMessageQueue serialise failed`,{error:e})}},loadUserPrefs(){let e=t.get(d);if(!e)return{};try{return Vn(JSON.parse(e))}catch(e){return Ln.warn(`loadUserPrefs parse failed`,{error:e}),{}}},saveUserPrefs(e){try{t.set(d,JSON.stringify(e))}catch(e){Ln.warn(`saveUserPrefs serialise failed`,{error:e})}},patchUserPrefs(e){let t=b.loadUserPrefs();b.saveUserPrefs({...t,...e})},loadPanelOpen(){let e=t.get(f);return e===`1`||e!==`0`&&null},savePanelOpen(e){t.set(f,e?`1`:`0`)},loadPanelSize(){let e=t.get(p);return e===`normal`||e===`expanded`||e===`fullscreen`?e:null},savePanelSize(e){t.set(p,e)},loadCalloutDismissed(e){if(!e)return!1;let n=t.get(m);return!!n&&n===e},saveCalloutDismissed(e){e?t.set(m,e):t.remove(m)},loadSidebarCollapsed(){let e=t.get(h);return e===`1`||e!==`0`&&null},saveSidebarCollapsed(e){t.set(h,e?`1`:`0`)},loadActiveModule(){return t.get(g)||null},saveActiveModule(e){t.set(g,e)},loadSeenNewsId(){return t.get(_)||null},saveSeenNewsId(e){t.set(_,e)},loadHistoryCount(){let e=t.get(v);if(!e)return null;let n=Number.parseInt(e,10);return Number.isFinite(n)&&n>=0?n:null},saveHistoryCount(e){t.set(v,String(e))},loadFormsDone(){let e=t.get(y);if(!e)return{};try{let t=JSON.parse(e);return zn(t)?Object.fromEntries(Object.entries(t).filter(e=>typeof e[1]==`number`)):{}}catch(e){return Ln.warn(`loadFormsDone parse failed`,{error:e}),{}}},saveFormDone(e){try{let n=b.loadFormsDone();n[e]=Date.now(),t.set(y,JSON.stringify(n))}catch(e){Ln.warn(`saveFormDone serialise failed`,{error:e})}},rememberStorageVersion(e){e&&e!==t.get(i)&&(Ln.debug(`rememberStorageVersion (force-reset on next load)`,{version:e}),t.set(i,e))},clearConversation(){t.remove(l)},reset(){let e=t.get(l);e&&(t.remove(`${s}.draft.${e}`),t.remove(`${s}.messageQueue.${e}`));for(let e of[c,l,d,f,p,m,h,g,_,v,y])t.remove(e);Ln.info(`reset: forgot the visitor`,{scope:r})}};return b}function zn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Bn(e){return zn(e)&&typeof e.id==`string`&&e.id.length>0&&typeof e.text==`string`}function Vn(e){if(!zn(e))return{};let t={};return typeof e.locale==`string`&&(t.locale=e.locale),typeof e.soundMuted==`boolean`&&(t.soundMuted=e.soundMuted),(e.themeMode===`auto`||e.themeMode===`light`||e.themeMode===`dark`)&&(t.themeMode=e.themeMode),(e.textSize===`small`||e.textSize===`normal`||e.textSize===`large`)&&(t.textSize=e.textSize),zn(e.widgetSize)&&typeof e.widgetSize.width==`number`&&typeof e.widgetSize.height==`number`&&(t.widgetSize={width:e.widgetSize.width,height:e.widgetSize.height}),t}const Hn=`1.12.6`,Un={open:()=>void 0,close:()=>void 0,expand:e=>({on:e}),fullscreen:e=>({on:e}),send:e=>({attachments:e.attachmentCount}),message:e=>({role:e.role}),stop:()=>void 0,clear:()=>void 0,suggestion:()=>void 0,toggleHistory:e=>({view:e.view}),handshake:()=>void 0,formSubmit:e=>({formId:e.formId,skipped:e.skipped}),toolResult:()=>void 0,toolDecision:e=>({approved:e.approved}),hostEvent:e=>({name:e.name,data:e.data&&JSON.stringify(e.data)}),messageFeedback:e=>({value:e.value??`none`}),contentView:e=>({section:e.section,count:e.count}),contentOpen:e=>({contentId:e.contentId,contentCollectionId:e.contentCollectionId}),contentSearch:e=>({qlen:e.queryLength,hits:e.hitCount}),contentRead:e=>({contentId:e.contentId}),contentLinkClick:e=>({contentId:e.contentId}),attach:e=>({count:e.count,bytes:e.totalBytes}),voiceStart:()=>void 0,voiceStop:e=>({ms:e.durationMs}),voiceCancel:()=>void 0,localeChange:e=>({locale:e}),themeChange:e=>({theme:e}),textSizeChange:e=>({size:e}),soundToggle:e=>({muted:e.muted}),sidebarToggle:e=>({collapsed:e.collapsed}),calloutDismiss:()=>void 0,error:()=>void 0};function Wn(){let e=navigator;return e.globalPrivacyControl===!0||e.doNotTrack===`1`}function Gn(){return location.origin+location.pathname}function Kn(){try{return document.referrer?new URL(document.referrer).origin:``}catch{return``}}function qn(e,t){let n=Math.random(),r=0,i=0,a=/* @__PURE__ */ new Set;function o(e,o){let{tracking:s,publicKey:c,aiAgentDeploymentId:l,mode:u,themeMode:d}=t.getOptions();if(!s.enabled||Wn()||n>=s.sampleRate)return;let f=performance.now();if(f-r>6e4&&(r=f,i=0),++i>60)return;let p=new URLSearchParams;p.set(`v`,`1`),p.set(`_ev`,Hn),p.set(`e`,e),s.token&&p.set(`tk`,s.token),c&&p.set(`pk`,c),l&&p.set(`dep`,l),p.set(`vid`,t.getVisitorId());let m=t.getConversationId();m&&p.set(`cid`,m),p.set(`url`,Gn());let h=Kn();h&&p.set(`ref`,h),p.set(`sw`,String(screen.width)),p.set(`sh`,String(screen.height)),p.set(`vw`,String(innerWidth)),p.set(`vh`,String(innerHeight)),p.set(`dpr`,String(devicePixelRatio)),p.set(`lang`,navigator.language);try{p.set(`tz`,Intl.DateTimeFormat().resolvedOptions().timeZone)}catch{}if(p.set(`m`,u),p.set(`th`,d),o)for(let[e,t]of Object.entries(o))t!==void 0&&p.set(e,String(t));p.set(`ts`,String(Date.now()));let g=`${s.endpoint}?${p}`;if(g.length>2e3)return;let _=new Image(1,1);a.add(_);function v(){return a.delete(_)}_.addEventListener(`load`,v,{once:!0}),_.addEventListener(`error`,v,{once:!0}),_.src=g}let s=[];function c(e,t){if(s&&e!==`handshake`){s.length<60&&s.push([e,t]);return}let n=s??[];s=void 0;for(let[e,t]of n)o(e,t);o(e,t)}let l=Object.keys(Un).map(t=>e.on(t,e=>c(t,Un[t]?.(e))));return()=>{for(let e of l)e();a.clear()}}const Jn=`:host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent: var(--__P__-accent-user);--__P__-accent-text-user: __BRAND_ACCENT_TEXT__;--__P__-accent-text: var(--__P__-accent-text-user);--__P__-accent-fg: var(--__P__-accent);--__P__-radius: __BRAND_RADIUS__;--__P__-radius-sm: 8px;--__P__-radius-md: 10px;--__P__-radius-lg: 16px;--__P__-font: __BRAND_FONT__;--__P__-font-display: var(--__P__-font);--__P__-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--__P__-bg: oklch(1 0 0);--__P__-bg-elevated: oklch(.9789 .0029 278.3);--__P__-surface: var(--__P__-bg-elevated);--__P__-muted: var(--__P__-fg-muted);--__P__-hover: oklch(.1686 .011 278.3 / .06);--__P__-fg: oklch(.1686 .011 278.3);--__P__-fg-muted: oklch(.4932 .0301 278.3);--__P__-border: oklch(.9312 .0084 278.3);--__P__-border-strong: oklch(.8757 .0131 278.3);--__P__-bubble-user: var(--__P__-accent);--__P__-bubble-user-text: var(--__P__-accent-text);--__P__-bubble-assistant: oklch(.9638 .0058 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-on-accent: var(--__P__-accent-text);--__P__-success: oklch(.6456 .1654 151.53);--__P__-warning: oklch(.7135 .1494 74.05);--__P__-danger: oklch(.5966 .1818 24.51);--__P__-danger-text: oklch(.5054 .1905 27.52);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .1);--__P__-neutral: oklch(.7137 .0192 278.3);--__P__-pill-l-min: .3;--__P__-pill-l-max: .46;--__P__-focus: var(--__P__-accent);--__P__-shadow-panel: 0 8px 24px -8px rgba(13, 15, 20, .18), 0 24px 64px -24px rgba(13, 15, 20, .24);--__P__-shadow-card: 0 1px 2px rgba(13, 15, 20, .06), 0 4px 12px -6px rgba(13, 15, 20, .12);--__P__-backdrop: oklch(.1686 .011 278.3 / .55);--__P__-shadow-fab: 0 6px 16px -4px color-mix(in oklch, var(--__P__-accent) 45%, transparent), 0 12px 32px -12px rgba(13, 15, 20, .25);--__P__-z-fab: 2147483600;--__P__-z-panel: 2147483601;--__P__-panel-w: 380px;--__P__-panel-h: 600px;--__P__-fab-size: 56px;--__P__-conversation-max: 768px;--__P__-space-1: 4px;--__P__-space-2: 8px;--__P__-space-3: 12px;--__P__-space-4: 16px;--__P__-space-5: 20px;--__P__-space-6: 24px;--__P__-space-8: 32px;--__P__-text-scale: 1;--__P__-text-xs: calc(12px * var(--__P__-text-scale));--__P__-text-sm: calc(13px * var(--__P__-text-scale));--__P__-text-base: calc(15px * var(--__P__-text-scale));--__P__-text-md: calc(16px * var(--__P__-text-scale));--__P__-text-lg: calc(18px * var(--__P__-text-scale));--__P__-text-xl: calc(22px * var(--__P__-text-scale));--__P__-text-2xl: calc(30px * var(--__P__-text-scale))}:host([data-mode="modal"]),:host([data-mode="drawer"]){--__P__-conversation-max: 100%}:host([data-text-size="small"]){--__P__-text-scale: .9}:host([data-text-size="large"]){--__P__-text-scale: 1.15}:host{--__P__-ease: cubic-bezier(.2, .7, .2, 1);--__P__-ease-out: cubic-bezier(.2, .7, .2, 1);--__P__-ease-in: cubic-bezier(.4, 0, 1, 1);--__P__-ease-in-out: cubic-bezier(.65, 0, .35, 1);--__P__-dur-quick: .12s;--__P__-dur-base: .22s;--__P__-dur-slow: .32s;font-family:var(--__P__-font);color:var(--__P__-fg);color-scheme:light;--__P__-color-scheme: light}:host([data-theme="dark"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-danger-text: oklch(.8077 .1035 19.57);--__P__-danger-bg: oklch(.5966 .1818 24.51 / .18);--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);--__P__-shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px -6px rgba(0, 0, 0, .5);--__P__-backdrop: rgba(0, 0, 0, .65);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;color-scheme:dark;--__P__-color-scheme: dark}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-bg: oklch(.1783 .0128 278.3);--__P__-bg-elevated: oklch(.2232 .0182 278.3);--__P__-fg: oklch(.9368 .01 278.3);--__P__-fg-muted: oklch(.7048 .0296 278.3);--__P__-border: oklch(.2752 .0266 278.3);--__P__-border-strong: oklch(.335 .0291 278.3);--__P__-hover: oklch(.9368 .01 278.3 / .08);--__P__-bubble-assistant: oklch(.2474 .0311 278.3);--__P__-bubble-assistant-text: var(--__P__-fg);--__P__-pill-l-min: .75;--__P__-pill-l-max: .92;--__P__-shadow-panel: 0 8px 24px -8px rgba(0, 0, 0, .6), 0 24px 64px -24px rgba(0, 0, 0, .7);color-scheme:dark;--__P__-color-scheme: dark}}@supports (color: oklch(from red l c h)){:host{--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.3, l, .62) c h);--__P__-accent-text: oklch(from var(--__P__-accent) clamp(0, (l / .623 - 1) * -infinity, 1) 0 h);--__P__-accent-fg: oklch(from var(--__P__-accent-user) clamp(.3, l, .46) c h)}:host([data-theme="dark"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}@media(prefers-color-scheme:dark){:host([data-theme="auto"]){--__P__-accent: oklch(from var(--__P__-accent-user) clamp(.65, l, .85) c h);--__P__-accent-fg: var(--__P__-accent)}}}@media(prefers-reduced-motion:reduce){:host{--__P__-dur-quick: 1ms;--__P__-dur-base: 1ms;--__P__-dur-slow: 1ms}}
3
3
 
4
4
  *,*:before,*:after{box-sizing:border-box;margin:0;padding:0;border:0}button{font:inherit;color:inherit;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;line-height:1}button:focus-visible,[tabindex]:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}textarea,input{font:inherit;color:inherit;background:none;border:0;outline:0;resize:none}a{color:var(--__P__-accent-fg);text-decoration:underline;text-underline-offset:2px}img,svg{display:block;max-width:100%}ul,ol{list-style:none}.__P__-app{display:block;width:100%;height:100%;font-family:var(--__P__-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","ss03"}.__P__-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
5
5
 
@@ -7,7 +7,7 @@ import{useEffect as e,useMemo as t,useRef as n,useSyncExternalStore as r}from"re
7
7
 
8
8
  .__P__-generative-ui{display:grid;gap:var(--__P__-space-3);overflow-wrap:anywhere;white-space:pre-wrap}.__P__-generative-ui p{margin:0}.__P__-generative-ui-grid-container{container:__P__-generative-ui-grid / inline-size;min-width:0}.__P__-generative-ui-grid{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:16px}.__P__-generative-ui-cell{display:grid;align-content:start;min-width:0;gap:16px}@container __P__-generative-ui-grid (min-width: 496px){.__P__-generative-ui-grid:is([data-columns="2"],[data-columns="3"],[data-columns="4"]){grid-template-columns:repeat(2,minmax(0,1fr))}.__P__-generative-ui-grid:is([data-columns="2"],[data-columns="3"],[data-columns="4"])>.__P__-generative-ui-cell:is([data-span="2"],[data-span="3"],[data-span="4"]){grid-column:span 2}}@container __P__-generative-ui-grid (min-width: 752px){.__P__-generative-ui-grid:is([data-columns="3"],[data-columns="4"]){grid-template-columns:repeat(3,minmax(0,1fr))}.__P__-generative-ui-grid:is([data-columns="3"],[data-columns="4"])>.__P__-generative-ui-cell:is([data-span="3"],[data-span="4"]){grid-column:span 3}}@container __P__-generative-ui-grid (min-width: 1008px){.__P__-generative-ui-grid[data-columns="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}.__P__-generative-ui-grid[data-columns="4"]>.__P__-generative-ui-cell[data-span="4"]{grid-column:span 4}}.__P__-generative-ui section{display:grid;gap:var(--__P__-space-2);padding:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);min-width:0}.__P__-generative-ui-metric{font-size:1.6em;font-weight:700}.__P__-generative-ui-table{overflow-x:auto}.__P__-generative-ui table{width:100%;border-collapse:collapse;white-space:normal}.__P__-generative-ui caption{text-align:start;font-weight:600;padding-bottom:var(--__P__-space-2)}.__P__-generative-ui th,.__P__-generative-ui td{text-align:start;padding:var(--__P__-space-2);border-bottom:1px solid var(--__P__-border)}.__P__-generative-ui-chart{display:block;width:100%;color:var(--__P__-accent)}.__P__-generative-ui-axis{stroke:var(--__P__-border)}.__P__-generative-ui-data{display:flex;flex-wrap:wrap;gap:var(--__P__-space-2);font-size:.85em}
9
9
 
10
- :host([data-mode="page"]){min-height:0}:host([data-mode="page"]) .__P__-page-shell{display:grid;grid-template-columns:280px 1fr;width:100%;height:100%;min-height:0;background:var(--__P__-bg);color:var(--__P__-fg);transition:grid-template-columns var(--__P__-dur-base) var(--__P__-ease-in-out)}:host([data-mode="page"]) .__P__-page-shell[data-sidebar-collapsed=true]{grid-template-columns:48px 1fr}:host([data-mode="page"]) .__P__-page-chat{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}:host([data-mode="page"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 0}:host([data-mode="page"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;border-radius:0;border:0;box-shadow:none;animation:none}:host([data-mode="page"]) .__P__-sidebar{border-inline-end:1px solid var(--__P__-border);display:flex;flex-direction:column;overflow:hidden;background:var(--__P__-surface)}:host([data-mode="page"]) .__P__-sidebar-header{padding:var(--__P__-space-4) var(--__P__-space-5);border-bottom:1px solid var(--__P__-border);display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2);min-height:56px;box-sizing:border-box}:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-header{padding:var(--__P__-space-4) var(--__P__-space-2);justify-content:center}:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-logo,:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-title{display:none}:host([data-mode="page"]) .__P__-sidebar-toggle{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--__P__-border);border-radius:6px;background:transparent;color:var(--__P__-fg);cursor:pointer;transition:background .12s,border-color .12s}:host([data-mode="page"]) .__P__-sidebar-toggle:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}:host([data-mode="page"]) .__P__-sidebar-toggle:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}:host([data-mode="page"]) .__P__-sidebar-logo{height:32px;display:block}:host([data-mode="page"]) .__P__-sidebar-title{font-size:var(--__P__-text-md);font-weight:600}:host([data-mode="page"]) .__P__-sidebar-section{padding:var(--__P__-space-3) var(--__P__-space-4);border-bottom:1px solid var(--__P__-border)}:host([data-mode="page"]) .__P__-sidebar-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}:host([data-mode="page"]) .__P__-sidebar-nav-item{display:flex;align-items:center;gap:10px;padding:var(--__P__-space-2) var(--__P__-space-3);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);text-decoration:none;font-size:calc(14px * var(--__P__-text-scale));transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}:host([data-mode="page"]) .__P__-sidebar-nav-item:hover{background:var(--__P__-hover)}:host([data-mode="page"]) .__P__-sidebar-nav-item:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}:host([data-mode="page"]) .__P__-sidebar-cards{display:grid;grid-template-columns:1fr;gap:var(--__P__-space-2)}:host([data-mode="page"]) .__P__-sidebar-card{display:block;padding:10px 12px;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-sm);text-decoration:none;color:var(--__P__-fg);transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}:host([data-mode="page"]) .__P__-sidebar-card:hover{border-color:var(--__P__-accent)}:host([data-mode="page"]) .__P__-sidebar-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}:host([data-mode="page"]) .__P__-sidebar-card-label{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}:host([data-mode="page"]) .__P__-sidebar-card-desc{font-size:var(--__P__-text-xs);color:var(--__P__-muted);margin-top:2px}:host([data-mode="page"]) .__P__-sidebar-conversations{flex:1 1 auto;overflow-y:auto;padding:var(--__P__-space-3) var(--__P__-space-4)}:host([data-mode="page"]) .__P__-page-chat{display:flex;flex-direction:column;overflow:hidden}@media(max-width:768px){:host([data-mode="page"]) .__P__-page-shell{grid-template-columns:1fr}:host([data-mode="page"]) .__P__-sidebar{display:none}}
10
+ :host([data-mode="page"]){min-height:0}:host([data-mode="page"]) .__P__-page-shell{display:grid;grid-template-columns:280px 1fr;width:100%;height:100%;min-height:0;background:var(--__P__-bg);color:var(--__P__-fg);transition:grid-template-columns var(--__P__-dur-base) var(--__P__-ease-in-out)}:host([data-mode="page"]) .__P__-page-shell[data-sidebar-collapsed=true]{grid-template-columns:48px 1fr}:host([data-mode="page"]) .__P__-page-chat{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}:host([data-mode="page"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 0}:host([data-mode="page"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;border-radius:0;border:0;box-shadow:none;animation:none}:host([data-mode="page"]) .__P__-sidebar{border-inline-end:1px solid var(--__P__-border);display:flex;flex-direction:column;overflow:hidden;background:var(--__P__-surface)}:host([data-mode="page"]) .__P__-sidebar-header{padding:var(--__P__-space-4) var(--__P__-space-5);border-bottom:1px solid var(--__P__-border);display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2);min-height:56px;box-sizing:border-box}:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-header{padding:var(--__P__-space-4) var(--__P__-space-2);justify-content:center}:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-logo,:host([data-mode="page"]) .__P__-sidebar[data-collapsed=true] .__P__-sidebar-title{display:none}:host([data-mode="page"]) .__P__-sidebar-toggle{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--__P__-border);border-radius:6px;background:transparent;color:var(--__P__-fg);cursor:pointer;transition:background .12s,border-color .12s}:host([data-mode="page"]) .__P__-sidebar-toggle:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}:host([data-mode="page"]) .__P__-sidebar-toggle:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}:host([data-mode="page"]) .__P__-sidebar-logo{height:32px;display:block;border-radius:var(--__P__-radius-md)}:host([data-mode="page"]) .__P__-sidebar-title{font-size:var(--__P__-text-md);font-weight:600}:host([data-mode="page"]) .__P__-sidebar-section{padding:var(--__P__-space-3) var(--__P__-space-4);border-bottom:1px solid var(--__P__-border)}:host([data-mode="page"]) .__P__-sidebar-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}:host([data-mode="page"]) .__P__-sidebar-nav-item{display:flex;align-items:center;gap:10px;padding:var(--__P__-space-2) var(--__P__-space-3);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);text-decoration:none;font-size:calc(14px * var(--__P__-text-scale));transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}:host([data-mode="page"]) .__P__-sidebar-nav-item:hover{background:var(--__P__-hover)}:host([data-mode="page"]) .__P__-sidebar-nav-item:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}:host([data-mode="page"]) .__P__-sidebar-cards{display:grid;grid-template-columns:1fr;gap:var(--__P__-space-2)}:host([data-mode="page"]) .__P__-sidebar-card{display:block;padding:10px 12px;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-sm);text-decoration:none;color:var(--__P__-fg);transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}:host([data-mode="page"]) .__P__-sidebar-card:hover{border-color:var(--__P__-accent)}:host([data-mode="page"]) .__P__-sidebar-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}:host([data-mode="page"]) .__P__-sidebar-card-label{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}:host([data-mode="page"]) .__P__-sidebar-card-desc{font-size:var(--__P__-text-xs);color:var(--__P__-muted);margin-top:2px}:host([data-mode="page"]) .__P__-sidebar-conversations{flex:1 1 auto;overflow-y:auto;padding:var(--__P__-space-3) var(--__P__-space-4)}:host([data-mode="page"]) .__P__-page-chat{display:flex;flex-direction:column;overflow:hidden}@media(max-width:768px){:host([data-mode="page"]) .__P__-page-shell{grid-template-columns:1fr}:host([data-mode="page"]) .__P__-sidebar{display:none}}
11
11
  `.replace(/__P__/g,`helpai`).replaceAll(`__BRAND_ACCENT_TEXT__`,`#FFFFFF`).replaceAll(`__BRAND_ACCENT__`,`#5B5BD6`).replaceAll(`__BRAND_RADIUS__`,`12px`).replaceAll(`__BRAND_FONT__`,`Inter, system-ui, -apple-system, 'Segoe UI', sans-serif`),Yn=[`data-theme`,`data-color-scheme`,`data-mode`,`data-bs-theme`];function Xn(e){if(e){if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of Yn){let n=e.getAttribute(t);if(n===`dark`||n===`light`)return n}}}function Zn(e=document){let t=Xn(e.documentElement)??Xn(e.body);if(t)return t;let n=getComputedStyle(e.documentElement).colorScheme.trim();return n===`dark`||n===`light`?n:typeof matchMedia==`function`&&matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function Qn(e,t=document){let n=Zn(t);e(n);function r(){let r=Zn(t);r!==n&&(n=r,e(r))}let i=new MutationObserver(r),a={attributes:!0,attributeFilter:[`class`,`style`,...Yn]};i.observe(t.documentElement,a),t.body&&i.observe(t.body,a);let o=typeof matchMedia==`function`?matchMedia(`(prefers-color-scheme: dark)`):void 0;return o?.addEventListener(`change`,r),()=>{i.disconnect(),o?.removeEventListener(`change`,r)}}const $n=C.scope(`mount`),er=/* @__PURE__ */ new WeakMap,tr={floating:`all: initial; position: fixed; z-index: 2147483600;`,flow:`all: initial; display: block; position: relative; width: 100%; height: 100%; z-index: 1; contain: size;`,viewport:`all: initial; display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;`};function nr(e,t){e.style.cssText=tr[t]}function rr(e){return e===`floating`||e===`modal`||e===`drawer`?`floating`:e===`standalone`||e===`page`?`viewport`:`flow`}function ir(e={}){let t=e.position??`flow`;$n.debug(`createShadowMount`,{position:t,hasTarget:!!e.target,hasHost:!!e.existingHost});let n=`${u.cssPrefix}-chat-host`;typeof customElements<`u`&&!customElements.get(n)&&customElements.define(n,class extends HTMLElement{});let r;e.existingHost?r=e.existingHost:(r=document.createElement(n),(e.target??document.body).appendChild(r)),r.setAttribute(`data-brand`,u.id),r.style.cssText=tr[t];let i=r.shadowRoot??r.attachShadow({mode:`open`}),a=r.ownerDocument;if(!ar(i,a)){let e=a.createElement(`style`);e.textContent=Jn,i.appendChild(e)}let o=document.createElement(`div`);return o.className=`${u.cssPrefix}-app`,i.appendChild(o),{appRoot:o,destroy:()=>r.remove(),hostElement:r,shadowRoot:i}}function ar(e,t){if(!(`adoptedStyleSheets`in e))return!1;let n=t.defaultView;if(!n||typeof n.CSSStyleSheet!=`function`)return!1;let r=er.get(t);if(!r)try{r=new n.CSSStyleSheet,r.replaceSync(Jn),er.set(t,r)}catch{return!1}try{return e.adoptedStyleSheets=[r],!0}catch{return!1}}function or(e,t){let n=u.cssPrefix;t.accent&&e.style.setProperty(`--${n}-accent-user`,t.accent),t.accentText&&e.style.setProperty(`--${n}-accent-text-user`,t.accentText),t.radius&&e.style.setProperty(`--${n}-radius`,t.radius),t.fontFamily&&e.style.setProperty(`--${n}-font`,t.fontFamily),t.contentMaxWidth&&e.style.setProperty(`--${n}-conversation-max`,t.contentMaxWidth)}function sr(e,t){e.dataset.theme=t===`host`?Zn():t}function cr(e,t){let n=u.cssPrefix;t.width!==void 0&&e.style.setProperty(`--${n}-panel-w`,t.width),t.height!==void 0&&e.style.setProperty(`--${n}-panel-h`,t.height),t.expanded?.width!==void 0&&e.style.setProperty(`--${n}-expanded-w`,t.expanded.width),t.expanded?.height!==void 0&&e.style.setProperty(`--${n}-expanded-h`,t.expanded.height),t.inset!==void 0&&e.style.setProperty(`--${n}-panel-inset`,t.inset)}function lr(e,t){e.dataset.position=t}function ur(e,t){e.dataset.mode=t}function dr(e,t){sr(e,t.themeMode),or(e,t.themeOverrides),lr(e,t.position),cr(e,t.size)}var fr,pr,mr,hr,gr=Object.is,_r=0,vr=[],yr=[],br=P,xr=br.__b,Sr=br.__r,Cr=br.diffed,wr=br.__c,Tr=br.unmount,Er=br.__;function Dr(e,t){br.__h&&br.__h(pr,e,_r||t),_r=0;var n=pr.__H||(pr.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function L(e){return _r=1,Or(Lr,e)}function Or(e,t,n){var r=Dr(fr++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Lr(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);gr(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=pr,!pr.__f)){pr.__f=!0;var i=pr.shouldComponentUpdate;pr.shouldComponentUpdate=function(e,t,n){var r=this.__H;if(!r)return!0;var a=!1,o=this.props!=e;if(r.__.some(function(e){e.__N&&(a=!0,gr(e.__[0],e.__N[0])||(o=!0))}),i){var s=i.call(this,e,t,n);return a?s||o:s}return!a||o}}return r.__}function R(e,t){var n=Dr(fr++,3);!br.__s&&Ir(n.__H,t)&&(n.__P=!0,n.__=e,n.u=t,pr.__H.__h.push(n))}function kr(e,t){var n=Dr(fr++,4);!br.__s&&Ir(n.__H,t)&&(n.__P=!1,n.__=e,n.u=t,pr.__h.push(n))}function z(e){return _r=5,B(function(){return{current:e}},[])}function B(e,t){var n=Dr(fr++,7);return Ir(n.__H,t)&&(n.__=e(),n.__H=t),n.__}function V(e,t){return _r=8,B(function(){return e},t)}function Ar(){var e;do{for(;e=yr.shift();)try{Pr(e)}catch(t){br.__e(t,{__:(e=e.__P)&&e.__v})}for(;e=vr.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Pr),t.__h.some(Fr),t.__h=[]}catch(n){t.__h=[],br.__e(n,e.__v)}}}while(yr.length)}br.__b=function(e){pr=null,xr&&xr(e)},br.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Er&&Er(e,t)},br.__r=function(e){Sr&&Sr(e),fr=0;var t=(pr=e.__c).__H;t&&(mr==pr?pr.__h=[]:(t.__h.some(Pr),t.__h.some(Fr),fr=0),t.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})),mr=pr},br.diffed=function(e){Cr&&Cr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&Nr(vr.push(t)),t.__H.__.some(function(e){e.u&&(e.__H=e.u)})),mr=pr=null},br.__c=function(e,t){t.some(function(e){try{e.__h.some(Pr),e.__h=e.__h.filter(function(e){return!e.__||Fr(e)})}catch(t){e.__h=[function(){throw t}]}}),wr&&wr(e,t)},br.unmount=function(e){Tr&&Tr(e);var t,n,r=e.__c;r&&r.__H&&(r.__H.__.some(function(r){try{if(r.__P&&r.__c){if(n===void 0){for(n=e.__;n&&(!n.__c||!n.__c.__P);)n=n.__;n=n&&n.__c}r.__P=n,Nr(yr.push(r))}else Pr(r)}catch(e){t=e}}),r.__H=void 0,t&&br.__e(t,r.__v))};var jr=typeof requestAnimationFrame==`function`;function Mr(e){var t,n=function(){clearTimeout(r),jr&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);jr&&(t=requestAnimationFrame(n))}function Nr(e){e!=1&&hr==br.requestAnimationFrame||((hr=br.requestAnimationFrame)||Mr)(Ar)}function Pr(e){var t=pr,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),pr=t}function Fr(e){var t=pr;e.__c=e.__(),pr=t}function Ir(e,t){return!e||e.length!=t.length||t.some(function(t,n){return!gr(t,e[n])})}function Lr(e,t){return typeof t==`function`?t(e):t}var Rr=Symbol.for(`preact-signals`);function zr(){if(Gr>1)Gr--;else{var e,t=!1;for((function(){var e=Yr;for(Yr=void 0;e!==void 0;){var t=e.S;if(t.v===e.v)for(var n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();Wr!==void 0;){var n=Wr;for(Wr=void 0,Kr++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&$r(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(Kr=0,Gr--,t)throw e}}function Br(e){if(Gr>0)return e();Jr=++qr,Gr++;try{return e()}finally{zr()}}var Vr,Hr=void 0;function Ur(e){var t=Hr,n=Vr;Hr=void 0,Vr=void 0;try{return e()}finally{Hr=t,Vr=n}}var Wr=void 0,Gr=0,Kr=0,qr=0,Jr=0,Yr=void 0,Xr=0;function Zr(e){if(Hr!==void 0){var t=e.n;if(t===void 0||t.t!==Hr)return t={i:0,S:e,p:Hr.s,n:void 0,t:Hr,e:void 0,x:void 0,r:t},Hr.s!==void 0&&(Hr.s.n=t),Hr.s=t,e.n=t,32&Hr.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Hr.s,t.n=void 0,Hr.s.n=t,Hr.s=t),t}}function Qr(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Qr.prototype.brand=Rr,Qr.prototype.h=function(){return!0},Qr.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?Ur(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},Qr.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&Ur(function(){var e;(e=t.Z)==null||e.call(t)}))}},Qr.prototype.subscribe=function(e){var t=this;return ci(function(){var n=t.value;Ur(function(){return e(n)})},{name:`sub`})},Qr.prototype.valueOf=function(){return this.value},Qr.prototype.toString=function(){return this.value+``},Qr.prototype.toJSON=function(){return this.value},Qr.prototype.peek=function(){var e=this;return Ur(function(){return e.value})},Object.defineProperty(Qr.prototype,"value",{get:function(){var e=Zr(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Kr>100)throw Error(`Cycle detected`);(function(e){Gr!==0&&Kr===0&&e.l!==Jr&&(e.l=Jr,Yr={S:e,v:e.v,i:e.i,o:Yr})})(this),this.v=e,this.i++,Xr++,Gr++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{zr()}}}});function H(e,t){return new Qr(e,t)}function $r(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ei(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ti(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function ni(e,t){Qr.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Xr-1,this.f=4}ni.prototype=new Qr,ni.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Xr))return!0;if(this.g=Xr,this.f|=1,this.i>0&&!$r(this))return this.f&=-2,!0;var e=Hr;try{ei(this),Hr=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return Hr=e,ti(this),this.f&=-2,!0},ni.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Qr.prototype.S.call(this,e)},ni.prototype.U=function(e){if(this.t!==void 0&&(Qr.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},ni.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(ni.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=Zr(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ri(e,t){return new ni(e,t)}function ii(e){var t=e.j;if(e.j=void 0,typeof t==`function`){Gr++;var n=Hr;Hr=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,ai(e),t}finally{Hr=n,zr()}}}function ai(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ii(e)}function oi(e){if(Hr!==this)throw Error(`Out-of-order effect`);ti(this),Hr=e,this.f&=-2;try{8&this.f&&ai(this)}finally{zr()}}function si(e,t){this.x=e,this.j=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Vr&&Vr.push(this)}si.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.j=t)}finally{e()}},si.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,ii(this),ei(this),Gr++;var e=Hr;return Hr=this,oi.bind(this,e)},si.prototype.N=function(){2&this.f||(this.f|=2,this.u=Wr,Wr=this)},si.prototype.d=function(){this.f|=8,1&this.f||ai(this)},si.prototype.dispose=function(){this.d()};function ci(e,t){var n=new si(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var li,ui,di,fi=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,pi=[];ci(function(){li=this.N})();function mi(e,t){P[e]=t.bind(null,P[e]||function(){})}function hi(e){if(di){var t=di;di=void 0,t()}di=e&&e.S()}function gi(e){var t=this,n=e.data,r=vi(n);r.name=`ReactiveDom`,r.value=n;var i=B(function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var i=ri(function(){var e=r.value.value;return e===0?0:!0===e?``:e||``}),a=ri(function(){return!Array.isArray(i.value)&&!Pe(i.value)}),o=ci(function(){if(this.N=Si,a.value){var t=i.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),s=t.__$u.d;return t.__$u.d=function(){o(),s.call(this)},[a,i]},[]),a=i[0],o=i[1];return a.value?o.peek():o.value}gi.displayName=`ReactiveTextNode`,Object.defineProperties(Qr.prototype,{constructor:{configurable:!0,value:Xe(I,null).constructor},type:{configurable:!0,value:gi},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),mi(`__b`,function(e,t){if(hi(),ui=void 0,typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof Qr&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),mi(`__r`,function(e,t){if(e(t),t.type!==I){hi();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(e,t){var n;return ci(function(){n=this},{name:t}),n.c=e,n}(function(e){return function(){var t;fi&&((t=this.y)==null||t.call(this)),e.__$f|=1,e.setState({})}}(r),typeof t.type==`function`?t.type.displayName||t.type.name:``))),ui=r,hi(n)}}),mi(`__e`,function(e,t,n,r){hi(),ui=void 0,e(t,n,r)}),mi(`diffed`,function(e,t){hi(),ui=void 0;var n;if(typeof t.type==`string`&&(n=t.__e)){var r=t.__np,i=t.props,a=n.U;if(a)for(var o in a){var s=a[o];s===void 0||r&&o in r||(s.d(),a[o]=void 0)}if(r)for(var c in a||(a={},n.U=a),r){var l=a[c],u=r[c];l===void 0?(l=_i(n,c,u,i),a[c]=l):l.o(u,i)}}e(t)});function _i(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=H(n);return{o:function(e,t){a.value=e,r=t},d:ci(function(){this.N=Si;var n=a.value.value;r[t]!==n&&(r[t]=n,i?e[t]=n:n!=null&&(!1!==n||t[4]===`-`)?e.setAttribute(t,n):e.removeAttribute(t))})}}mi(`unmount`,function(e,t){if(typeof t.type==`string`){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var a=r[i];a&&a.d()}}var o=t.__np;if(o){var s=t.props;for(var c in o)s[c]=o[c]}t.__np=void 0}else{var l=t.__c;if(l){l.__$f|=8;var u=l.__$u;u&&(l.__$u=void 0,u.d())}}e(t)}),mi(`__h`,function(e,t,n,r){r<3&&(t.__$f|=2),e(t,n,r)}),Qe.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u==`boolean`&&!0===this.u){var a=2&this.__$f;if(!(r||a||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!==`__source`&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function vi(e,t){return B(function(){return H(e,t)},[])}function yi(e,t){var n=z(e);return n.current=e,ui.__$f|=4,B(function(){return ri(function(){return n.current()},t)},[])}var bi=function(e){queueMicrotask(function(){queueMicrotask(e)})};function xi(){Br(function(){for(var e;e=pi.shift();)li.call(e)})}function Si(){pi.push(this)===1&&(P.requestAnimationFrame||bi)(xi)}function Ci(e){if(!e.aiAgentDeploymentId)throw Error(`aiAgentDeploymentId is required`);return{headers(){let t={"x-ai-agent-deployment-id":e.aiAgentDeploymentId};return e.publicKey&&(t[e.publicKeyHeader??`x-public-key`]=e.publicKey),t}}}const wi=/* @__PURE__ */ new Set([`home`,`chats`,`help`,`news`]);function Ti(e){return typeof e!=`object`||!e||!(`to`in e)||typeof e.to!=`string`||!wi.has(e.to)?!1:!(`id`in e)||e.id===void 0||typeof e.id==`string`}function Ei(e){let[t=``,...n]=e.trim().split(`/`);if(t===``||t===`open`)return;let r=n.join(`/`);return r?{to:t,id:r}:{to:t}}function Di(e,t){return{text:e,send:typeof t==`object`&&!!t&&`send`in t&&t.send===!0}}function Oi(e){if(typeof e!=`object`||!e||!(`text`in e)||typeof e.text!=`string`)return;let t=e.text.trim();return t?{text:t,send:`send`in e&&e.send===!0}:void 0}function ki(e){return`${u.cssPrefix}:${e}`}function Ai(e,t,n){e.dispatchEvent(new CustomEvent(ki(t),{detail:n}))}function ji(e,t){let n=Object.entries(t).map(([t,n])=>{let r=ki(t);function i(e){return n(e.detail)}return e.addEventListener(r,i),[r,i]});return()=>{for(let[t,r]of n)e.removeEventListener(t,r)}}function Mi(e,t){let n=[],r;for(let i of e){let e=new URLSearchParams(i);e.has(t)?r??(r=e.get(t)??``):n.push(i)}return{value:r,rest:n}}function Ni(e){let t=new URL(e),n=u.cssPrefix,r=`${u.cssPrefix}-ask`,i=t.search.slice(1).split(`&`).filter(Boolean),a=t.hash.slice(1).split(`&`).filter(Boolean),o=Mi(i,n),s=Mi(o.rest,r),c=Mi(a,n),l=Mi(c.rest,r),d=o.value??c.value,f=(s.value??l.value)?.trim()||void 0;if(d!==void 0||f!==void 0)return t.search=s.rest.join(`&`),t.hash=l.rest.join(`&`),{target:d===void 0?void 0:Ei(d),...f?{ask:f}:{},url:t.toString()}}const Pi=C.scope(`feedback:audio`);var Fi=class{constructor(){s(this,`ctx`,null),s(this,`master`,null),s(this,`buffers`,/* @__PURE__ */ new Map)}unlock(){if(this.ctx){this.ctx.state===`suspended`&&this.ctx.resume();return}let e=globalThis.AudioContext??globalThis.webkitAudioContext;if(e)try{this.ctx=new e,this.master=this.ctx.createGain(),this.master.gain.value=1,this.master.connect(this.ctx.destination)}catch(e){Pi.warn(`AudioContext init failed`,{err:e})}}setVolume(e){if(!this.master||!this.ctx)return;let t=Math.max(0,Math.min(1,e));this.master.gain.setTargetAtTime(t,this.ctx.currentTime,.01)}playTone(e){let t=this.ctx,n=this.master;if(!t||!n||t.state!==`running`)return;let r=t.currentTime,i=e.noteMs/1e3;e.notes.forEach((a,o)=>{let s=t.createOscillator();s.type=e.type,s.frequency.value=a;let c=t.createGain(),l=r+o*i;c.gain.setValueAtTime(1e-4,l),c.gain.exponentialRampToValueAtTime(e.peakGain,l+.005),c.gain.exponentialRampToValueAtTime(1e-4,l+i),s.connect(c).connect(n),s.start(l),s.stop(l+i+.01)})}async playUrl(e){let t=this.ctx,n=this.master;if(!t||!n||t.state!==`running`)return;let r=await this.getBuffer(e);if(!r)return;let i=t.createBufferSource();i.buffer=r,i.connect(n),i.start()}destroy(){this.ctx&&this.ctx.close().catch(()=>void 0),this.ctx=null,this.master=null,this.buffers.clear()}async getBuffer(e){if(!this.ctx)return null;let t=this.buffers.get(e);if(t)return t instanceof Promise,t;let n=this.ctx,r=fetch(e).then(e=>e.ok?e.arrayBuffer():Promise.reject(/* @__PURE__ */ Error(`fetch ${e.status}`))).then(e=>n.decodeAudioData(e)).then(t=>(this.buffers.set(e,t),t)).catch(t=>(Pi.warn(`audio fetch/decode failed`,{url:e,err:t}),this.buffers.delete(e),null));return this.buffers.set(e,r),r}};const Ii={messageReceived:10,messageSent:0,error:[20,40,20],voiceStart:10,voiceStop:0},Li={messageReceived:{notes:[880,1318.51],noteMs:90,type:`sine`,peakGain:.45},messageSent:{notes:[1568],noteMs:60,type:`sine`,peakGain:.25},error:{notes:[523.25,392],noteMs:120,type:`triangle`,peakGain:.55},voiceStart:{notes:[1318.51],noteMs:50,type:`sine`,peakGain:.3},voiceStop:{notes:[880],noteMs:50,type:`sine`,peakGain:.3}};let Ri=null,zi=0;function Bi(){return typeof navigator<`u`&&typeof navigator.vibrate==`function`}function Vi(){if(typeof document>`u`)return null;let e=document.createElement(`input`);e.type=`checkbox`,e.setAttribute(`switch`,``),e.setAttribute(`aria-hidden`,`true`),e.tabIndex=-1,e.id=`__${u.cssPrefix}_haptic_${Math.random().toString(36).slice(2)}`;let t=document.createElement(`label`);t.htmlFor=e.id,t.setAttribute(`aria-hidden`,`true`);let n=`position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;opacity:0!important;pointer-events:none!important;`;return e.style.cssText=n,t.style.cssText=n,document.body.append(e,t),{input:e,label:t}}function Hi(e){if(!(e===0||Array.isArray(e)&&e.every(e=>e===0))){if(Bi())try{navigator.vibrate(e);return}catch{}if(Ri??(Ri=Vi()),Ri)try{Ri.label.click()}catch{}}}function Ui(){zi++;let e=!1;return()=>{e||(e=!0,zi=Math.max(0,zi-1),zi===0&&Ri&&(Ri.input.remove(),Ri.label.remove(),Ri=null))}}const Wi=C.scope(`feedback`);var Gi=class{constructor(e,t){s(this,`mutedSig`,H(!1)),s(this,`audio`,new Fi),s(this,`releaseHaptics`,void 0),s(this,`sound`,void 0),s(this,`haptics`,void 0),s(this,`lastPlayed`,/* @__PURE__ */ new Map),s(this,`reducedMotionMq`,null),this.sound=e,this.haptics=t,this.releaseHaptics=Ui(),this.audio.setVolume(this.effectiveVolume()),typeof matchMedia<`u`&&(this.reducedMotionMq=matchMedia(`(prefers-reduced-motion: reduce)`))}unlock(){this.audio.unlock(),this.audio.setVolume(this.effectiveVolume())}update(e,t){this.sound=e,this.haptics=t,this.audio.setVolume(this.effectiveVolume())}setMuted(e){this.mutedSig.value!==e&&(this.mutedSig.value=e)}toggleMuted(){this.mutedSig.value=!this.mutedSig.value}play(e){this.mutedSig.value||this.isDeduped(e)||(this.lastPlayed.set(e,performance.now()),this.sound.enabled&&this.playSound(e),this.haptics.enabled&&this.isTouchDevice()&&this.playHaptic(e))}destroy(){this.audio.destroy(),this.releaseHaptics()}isDeduped(e){let t=this.lastPlayed.get(e);return t!==void 0&&performance.now()-t<100}playSound(e){let t=this.sound.events?.[e];if(t===!1)return;if(typeof t==`string`){this.audio.playUrl(t).catch(e=>Wi.warn(`audio play failed`,{err:e,url:t}));return}let n=Li[e];n&&this.audio.playTone(n)}playHaptic(e){if(this.reducedMotionMq?.matches)return;let t=this.haptics.events?.[e];t!==!1&&Hi(t===!0||t===void 0?Ii[e]:t)}effectiveVolume(){let e=this.sound.volume??.3;return this.reducedMotionMq?.matches?e*.5:e}isTouchDevice(){return typeof window>`u`?!1:matchMedia(`(hover: none) and (pointer: coarse)`).matches}};function Ki(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function qi(e){return Ki(e)}function Ji(e){return!(!Ki(e)||e.navigation!==void 0&&!Array.isArray(e.navigation)||e.linkCards!==void 0&&!Array.isArray(e.linkCards))}var Yi=Symbol.for(`pv`),Xi=0;Array.isArray;function U(e,t,n,r,i,a){t||(t={});var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:Yi,__v:--Xi,__i:-1,__u:0};return(i||a)&&(l.__source=i,l.__self=a),P.vnode&&P.vnode(l),l}function Zi(e){switch(e){case 1:return`href`;case 2:return`src`;case 4:return`class`;case 8:return`checked`;case 16:return`start`}}const Qi=e=>{switch(e){case 1:return 3;case 2:return 4;case 3:return 5;case 4:return 6;case 5:return 7;default:return 8}};function $i(e){let t=/* @__PURE__ */ new Uint32Array(24);return t[0]=1,{renderer:e,text:``,pending:``,tokens:t,len:0,token:1,fence_end:0,blockquote_idx:0,hr_char:``,hr_chars:0,fence_start:0,spaces:/* @__PURE__ */ new Uint8Array(24),indent:``,indent_len:0,table_state:0}}function ea(e){e.pending.length>0&&da(e,`
12
12
  `)}function W(e){e.text.length!==0&&(console.assert(e.len>0,`Never adding text to root`),e.renderer.add_text(e.renderer.data,e.text),e.text=``)}function ta(e){console.assert(e.len>0,`No nodes to end`),--e.len,e.token=e.tokens[e.len],e.renderer.end_token(e.renderer.data)}function G(e,t){(e.tokens[e.len]===24||e.tokens[e.len]===23)&&t!==25&&ta(e),e.len+=1,e.tokens[e.len]=t,e.token=t,e.renderer.add_token(e.renderer.data,t)}function na(e,t,n){for(;n<=e.len;){if(e.tokens[n]===t)return n;n+=1}return-1}function ra(e,t){for(e.fence_start=0;e.len>t;)ta(e)}function ia(e,t){let n=0;for(let r=0;r<=e.len&&(t-=e.spaces[r],!(t<0));r+=1)switch(e.tokens[r]){case 9:case 10:case 20:case 25:n=r}for(;e.len>n;)ta(e);return t}function aa(e,t){let n=-1,r=-1;for(let i=e.blockquote_idx+1;i<=e.len;i+=1)if(e.tokens[i]===25){if(e.indent_len<e.spaces[i]){r=-1;break}r=i}else e.tokens[i]===t&&(n=i);return r===-1?n===-1?(ra(e,e.blockquote_idx),G(e,t),!0):(ra(e,n),!1):(ra(e,r),G(e,t),!0)}function oa(e,t){G(e,25),e.spaces[e.len]=e.indent_len+t,sa(e),e.token=103}function sa(e){e.indent=``,e.indent_len=0,e.pending=``}function ca(e){switch(e){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return!0;default:return!1}}function la(e){switch(e){case 32:case 58:case 59:case 41:case 44:case 33:case 46:case 63:case 93:case 10:return!0;default:return!1}}function ua(e){return ca(e)||la(e)}function da(e,t){for(let n of t){if(e.token===101){switch(n){case` `:e.indent_len+=1;continue;case` `:e.indent_len+=4;continue}let t=ia(e,e.indent_len);e.indent_len=0,e.token=e.tokens[e.len],t>0&&da(e,` `.repeat(t))}let t=e.pending+n;switch(e.token){case 21:case 1:case 20:case 24:case 23:switch(console.assert(e.text.length===0,`Root should not have any text`),e.pending[0]){case void 0:e.pending=n;continue;case` `:console.assert(e.pending.length===1),e.pending=n,e.indent+=` `,e.indent_len+=1;continue;case` `:console.assert(e.pending.length===1),e.pending=n,e.indent+=` `,e.indent_len+=4;continue;case`
13
13
  `:if(console.assert(e.pending.length===1),e.tokens[e.len]===25&&e.token===21){ta(e),sa(e),e.pending=n;continue}ra(e,e.blockquote_idx),sa(e),e.blockquote_idx=0,e.fence_start=0,e.pending=n;continue;case`#`:switch(n){case`#`:if(e.pending.length<6){e.pending=t;continue}break;case` `:ia(e,e.indent_len),G(e,Qi(e.pending.length)),sa(e);continue}break;case`>`:{let t=na(e,20,e.blockquote_idx+1);t===-1?(ra(e,e.blockquote_idx),e.blockquote_idx+=1,e.fence_start=0,G(e,20)):e.blockquote_idx=t,sa(e),e.pending=n;continue}case`-`:case`*`:case`_`:if(e.hr_chars===0&&(console.assert(e.pending.length===1,`Pending should be one character`),e.hr_chars=1,e.hr_char=e.pending),e.hr_chars>0){switch(n){case e.hr_char:e.hr_chars+=1,e.pending=t;continue;case` `:e.pending=t;continue;case`
package/style.css CHANGED
@@ -8,5 +8,5 @@
8
8
 
9
9
  .helpai-standalone-page{margin:0;height:100vh;background:var(--helpai-bg, #fff);display:grid;place-items:stretch}
10
10
 
11
- :host([data-mode="page"]){min-height:0}:host([data-mode="page"]) .helpai-page-shell{display:grid;grid-template-columns:280px 1fr;width:100%;height:100%;min-height:0;background:var(--helpai-bg);color:var(--helpai-fg);transition:grid-template-columns var(--helpai-dur-base) var(--helpai-ease-in-out)}:host([data-mode="page"]) .helpai-page-shell[data-sidebar-collapsed=true]{grid-template-columns:48px 1fr}:host([data-mode="page"]) .helpai-page-chat{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}:host([data-mode="page"]) .helpai-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 0}:host([data-mode="page"]) .helpai-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;border-radius:0;border:0;box-shadow:none;animation:none}:host([data-mode="page"]) .helpai-sidebar{border-inline-end:1px solid var(--helpai-border);display:flex;flex-direction:column;overflow:hidden;background:var(--helpai-surface)}:host([data-mode="page"]) .helpai-sidebar-header{padding:var(--helpai-space-4) var(--helpai-space-5);border-bottom:1px solid var(--helpai-border);display:flex;align-items:center;justify-content:space-between;gap:var(--helpai-space-2);min-height:56px;box-sizing:border-box}:host([data-mode="page"]) .helpai-sidebar[data-collapsed=true] .helpai-sidebar-header{padding:var(--helpai-space-4) var(--helpai-space-2);justify-content:center}:host([data-mode="page"]) .helpai-sidebar[data-collapsed=true] .helpai-sidebar-logo,:host([data-mode="page"]) .helpai-sidebar[data-collapsed=true] .helpai-sidebar-title{display:none}:host([data-mode="page"]) .helpai-sidebar-toggle{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--helpai-border);border-radius:6px;background:transparent;color:var(--helpai-fg);cursor:pointer;transition:background .12s,border-color .12s}:host([data-mode="page"]) .helpai-sidebar-toggle:hover{background:var(--helpai-hover);border-color:var(--helpai-accent)}:host([data-mode="page"]) .helpai-sidebar-toggle:focus-visible{outline:2px solid var(--helpai-accent);outline-offset:2px}:host([data-mode="page"]) .helpai-sidebar-logo{height:32px;display:block}:host([data-mode="page"]) .helpai-sidebar-title{font-size:var(--helpai-text-md);font-weight:600}:host([data-mode="page"]) .helpai-sidebar-section{padding:var(--helpai-space-3) var(--helpai-space-4);border-bottom:1px solid var(--helpai-border)}:host([data-mode="page"]) .helpai-sidebar-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}:host([data-mode="page"]) .helpai-sidebar-nav-item{display:flex;align-items:center;gap:10px;padding:var(--helpai-space-2) var(--helpai-space-3);border-radius:var(--helpai-radius-sm);color:var(--helpai-fg);text-decoration:none;font-size:calc(14px * var(--helpai-text-scale));transition:background var(--helpai-dur-quick) var(--helpai-ease-out)}:host([data-mode="page"]) .helpai-sidebar-nav-item:hover{background:var(--helpai-hover)}:host([data-mode="page"]) .helpai-sidebar-nav-item:focus-visible{outline:2px solid var(--helpai-focus);outline-offset:-2px}:host([data-mode="page"]) .helpai-sidebar-cards{display:grid;grid-template-columns:1fr;gap:var(--helpai-space-2)}:host([data-mode="page"]) .helpai-sidebar-card{display:block;padding:10px 12px;border:1px solid var(--helpai-border);border-radius:var(--helpai-radius-sm);text-decoration:none;color:var(--helpai-fg);transition:border-color var(--helpai-dur-quick) var(--helpai-ease-out)}:host([data-mode="page"]) .helpai-sidebar-card:hover{border-color:var(--helpai-accent)}:host([data-mode="page"]) .helpai-sidebar-card:focus-visible{outline:2px solid var(--helpai-focus);outline-offset:2px}:host([data-mode="page"]) .helpai-sidebar-card-label{font-weight:600;font-size:calc(14px * var(--helpai-text-scale))}:host([data-mode="page"]) .helpai-sidebar-card-desc{font-size:var(--helpai-text-xs);color:var(--helpai-muted);margin-top:2px}:host([data-mode="page"]) .helpai-sidebar-conversations{flex:1 1 auto;overflow-y:auto;padding:var(--helpai-space-3) var(--helpai-space-4)}:host([data-mode="page"]) .helpai-page-chat{display:flex;flex-direction:column;overflow:hidden}@media(max-width:768px){:host([data-mode="page"]) .helpai-page-shell{grid-template-columns:1fr}:host([data-mode="page"]) .helpai-sidebar{display:none}}
11
+ :host([data-mode="page"]){min-height:0}:host([data-mode="page"]) .helpai-page-shell{display:grid;grid-template-columns:280px 1fr;width:100%;height:100%;min-height:0;background:var(--helpai-bg);color:var(--helpai-fg);transition:grid-template-columns var(--helpai-dur-base) var(--helpai-ease-in-out)}:host([data-mode="page"]) .helpai-page-shell[data-sidebar-collapsed=true]{grid-template-columns:48px 1fr}:host([data-mode="page"]) .helpai-page-chat{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}:host([data-mode="page"]) .helpai-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-width:0;min-height:0;flex:1 1 0}:host([data-mode="page"]) .helpai-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;border-radius:0;border:0;box-shadow:none;animation:none}:host([data-mode="page"]) .helpai-sidebar{border-inline-end:1px solid var(--helpai-border);display:flex;flex-direction:column;overflow:hidden;background:var(--helpai-surface)}:host([data-mode="page"]) .helpai-sidebar-header{padding:var(--helpai-space-4) var(--helpai-space-5);border-bottom:1px solid var(--helpai-border);display:flex;align-items:center;justify-content:space-between;gap:var(--helpai-space-2);min-height:56px;box-sizing:border-box}:host([data-mode="page"]) .helpai-sidebar[data-collapsed=true] .helpai-sidebar-header{padding:var(--helpai-space-4) var(--helpai-space-2);justify-content:center}:host([data-mode="page"]) .helpai-sidebar[data-collapsed=true] .helpai-sidebar-logo,:host([data-mode="page"]) .helpai-sidebar[data-collapsed=true] .helpai-sidebar-title{display:none}:host([data-mode="page"]) .helpai-sidebar-toggle{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--helpai-border);border-radius:6px;background:transparent;color:var(--helpai-fg);cursor:pointer;transition:background .12s,border-color .12s}:host([data-mode="page"]) .helpai-sidebar-toggle:hover{background:var(--helpai-hover);border-color:var(--helpai-accent)}:host([data-mode="page"]) .helpai-sidebar-toggle:focus-visible{outline:2px solid var(--helpai-accent);outline-offset:2px}:host([data-mode="page"]) .helpai-sidebar-logo{height:32px;display:block;border-radius:var(--helpai-radius-md)}:host([data-mode="page"]) .helpai-sidebar-title{font-size:var(--helpai-text-md);font-weight:600}:host([data-mode="page"]) .helpai-sidebar-section{padding:var(--helpai-space-3) var(--helpai-space-4);border-bottom:1px solid var(--helpai-border)}:host([data-mode="page"]) .helpai-sidebar-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}:host([data-mode="page"]) .helpai-sidebar-nav-item{display:flex;align-items:center;gap:10px;padding:var(--helpai-space-2) var(--helpai-space-3);border-radius:var(--helpai-radius-sm);color:var(--helpai-fg);text-decoration:none;font-size:calc(14px * var(--helpai-text-scale));transition:background var(--helpai-dur-quick) var(--helpai-ease-out)}:host([data-mode="page"]) .helpai-sidebar-nav-item:hover{background:var(--helpai-hover)}:host([data-mode="page"]) .helpai-sidebar-nav-item:focus-visible{outline:2px solid var(--helpai-focus);outline-offset:-2px}:host([data-mode="page"]) .helpai-sidebar-cards{display:grid;grid-template-columns:1fr;gap:var(--helpai-space-2)}:host([data-mode="page"]) .helpai-sidebar-card{display:block;padding:10px 12px;border:1px solid var(--helpai-border);border-radius:var(--helpai-radius-sm);text-decoration:none;color:var(--helpai-fg);transition:border-color var(--helpai-dur-quick) var(--helpai-ease-out)}:host([data-mode="page"]) .helpai-sidebar-card:hover{border-color:var(--helpai-accent)}:host([data-mode="page"]) .helpai-sidebar-card:focus-visible{outline:2px solid var(--helpai-focus);outline-offset:2px}:host([data-mode="page"]) .helpai-sidebar-card-label{font-weight:600;font-size:calc(14px * var(--helpai-text-scale))}:host([data-mode="page"]) .helpai-sidebar-card-desc{font-size:var(--helpai-text-xs);color:var(--helpai-muted);margin-top:2px}:host([data-mode="page"]) .helpai-sidebar-conversations{flex:1 1 auto;overflow-y:auto;padding:var(--helpai-space-3) var(--helpai-space-4)}:host([data-mode="page"]) .helpai-page-chat{display:flex;flex-direction:column;overflow:hidden}@media(max-width:768px){:host([data-mode="page"]) .helpai-page-shell{grid-template-columns:1fr}:host([data-mode="page"]) .helpai-sidebar{display:none}}
12
12