import{v as e,a8 as t,a9 as r,aa as n,ab as a,ac as i,ad as o,ae as l,w as s,J as c,I as u,V as d,af as m,ag as p,ah as h,F as g,A as f,H as b,R as v,O as x,ai as C,aj as y,ak as w,al as L,am as E,an as k,ao as S,P as z,N as T,ap as M,E as R,S as _,W as A,aq as I,ar as P,i as B,X as j,Y as O,as as F,at as H,g as V,T as D,au as q,av as W,aw as N,ax as Z,ay as U,az as K,aA as Y,D as G,$ as Q,aB as X,aC as J,aD as $,aE as ee,aF as te,aG as re,aH as ne,aI as ae,aJ as ie,aK as oe,K as le,aL as se,aM as ce,aN as ue,aO as de,aP as me,aQ as pe,aR as he,aS as ge,aT as fe,aU as be,aV as ve,aW as xe,aX as Ce,aY as ye,aZ as we,_ as Le,a_ as Ee,a$ as ke,b0 as Se,b1 as ze,b2 as Te,b3 as Me,b4 as Re,b5 as _e,b6 as Ae,b7 as Ie,b8 as Pe,b9 as Be,ba as je,L as Oe,bb as Fe,p as He}from"./2.1K4W5B1m.chunk.js";import{r as Ve,n as De,R as qe,x as We}from"./5.D_uKc_ak.chunk.js";import{U as Ne,bP as Ze,dj as Ue,dk as Ke,dl as Ye,cr as Ge,bp as Qe,X as Xe,dm as Je,L as $e,dg as et,dh as tt,bN as rt,c2 as nt,ao as at,dn as it,co as ot,dp as lt,cg as st,dq as ct,dr as ut,B as dt,bZ as mt,ds as pt,dt as ht,du as gt,dv as ft,bl as bt,dw as vt,dx as xt,ce as Ct,cz as yt,dy as wt,aj as Lt,dz as Et,aF as kt,dA as St,dB as zt,V as Tt,de as Mt,aK as Rt,dC as _t,dD as At,dE as It,dF as Pt,dG as Bt,dH as jt,ag as Ot,dI as Ft,dJ as Ht,P as Vt,dK as Dt,dL as qt,dM as Wt,dN as Nt,dO as Zt,dP as Ut,cU as Kt,dQ as Yt,cf as Gt,dR as Qt,Q as Xt,dS as Jt,cu as $t,aH as er,dT as tr,dU as rr,dV as nr,ct as ar,dW as ir}from"./3.DGuSL2Mg.chunk.js";import{_ as or}from"./13.Du4z9uvj.chunk.js";import{t as lr,I as sr,R as cr,E as ur,F as dr,C as mr,a as pr,M as hr,A as gr,u as fr,b as br,S as vr,V as xr,c as Cr,d as yr,e as wr,f as Lr,g as Er,h as kr,L as Sr,T as zr,i as Tr,j as Mr,k as Rr,l as _r,m as Ar,n as Ir,o as Pr,H as Br,p as jr,q as Or,r as Fr,s as Hr,v as Vr}from"./24.CW-EwJ_u.chunk.js";import{g as Dr,b as qr}from"./6.D_CKFAbE.chunk.js";import{T as Wr,u as Nr}from"./19.CD6tJ_A6.chunk.js";import{b as Zr,g as Ur,L as Kr}from"./18.wuJHqzJS.chunk.js";const Yr=e=>t.useSubscription({getCurrentValue:e.get,subscribe:e.subscribe});function Gr(e){let{mainElementRef:t,itemsCount:n,startAt:a="last",tableEdgeReached:i=De}=e;const[o,l]=Ve.useState(n),s=Ve.useRef(!1),c=Ve.useRef(!1),u=Ve.useRef(null),d=Ve.useRef(null),m=Ve.useRef(null);r("keydown",e=>{"Tab"===e.key&&(s.current=!0)}),r("keyup",e=>{"Tab"===e.key&&(s.current=!1)});const p=e=>e?lr(e.querySelectorAll("a, button, input, textarea, select")):[],h=Ve.useCallback(e=>"first"===a?e[0]:Ne(e),[a]),g=Ve.useCallback(()=>{const e=(t,r)=>{const n=t[r+"Sibling"];return n?n.querySelector('[role="gridcell"]')?n:e(n,r):null},r=window.MutationObserver||window.WebKitMutationObserver,n=new r(()=>{if(!c.current&&!m.current.contains(document.activeElement))return;v(m.current);const e=p(m.current);e.forEach(e=>{e.tabIndex=0,e.addEventListener("blur",o)}),b(m.current,!1),e.length&&!m.current.contains(document.activeElement)&&e[0].focus()}),a=new r(r=>{for(const o of r)for(const r of lr(o.removedNodes))if(r===m.current||r.contains(m.current)){var a,i;const r=e(o,"next")||e(o,"previous")||(null==(a=Ne(lr((null==(i=t.current)?void 0:i.querySelectorAll('[role="row"]'))||[])))?void 0:a.parentElement);return void(r&&(n.disconnect(),u.current=r,d.current=r.querySelector('[role="row"]'),m.current=r.querySelector('[role="gridcell"]'),b(m.current)))}}),o=e=>{const t=e.target===m.current,r=e.relatedTarget===m.current,n=m.current.contains(e.target),a=m.current.contains(e.relatedTarget);if(s.current&&e.relatedTarget&&!t&&(!a||r))return e.preventDefault(),void requestAnimationFrame(()=>e.target.focus());n&&!a&&l()},l=()=>{p(m.current).forEach(e=>{e.tabIndex=-1,e.removeEventListener("blur",o)})},g=e=>{" "===e.key&&e.target===m.current&&e.preventDefault()},f=e=>{switch(e.key){case" ":case"Enter":return void(e.target===m.current&&(e.preventDefault(),(()=>{const e=p(m.current).filter(e=>!e.disabled);e.forEach(e=>{e.tabIndex=0,e.addEventListener("blur",o)}),e.length&&e[0].focus(),c.current=!0})()));case"Escape":return e.preventDefault(),l(),void requestAnimationFrame(()=>m.current.focus())}},b=function(e,t){void 0===t&&(t=!0),e.tabIndex=0,t&&e.focus(),e.addEventListener("keyup",f),e.addEventListener("keydown",g),e.addEventListener("blur",o),n.observe(e,{childList:!0,subtree:!0})},v=e=>{e.tabIndex=-1,e.removeEventListener("keyup",f),e.removeEventListener("keydown",g),e.removeEventListener("blur",o),n.disconnect()},x=e=>{const t=e+"ElementSibling";if(!d.current||!u.current||!d.current[t]&&!u.current[t])return void i(e);let r=null,n=d.current,a=u.current;for(;!r;)if(n&&n[t])n=n[t],r=n.querySelector('[role="gridcell"]');else{if(!a||!a[t])return void i(e);if(a=a[t],a.attributes.role&&"row"===a.attributes.role.value)n=a;else{const t=a.querySelectorAll('[role="row"]');n="previous"===e?h(t):t[0]}r=n?n.querySelector('[role="gridcell"]'):null}a!==u.current&&(u.current=a),n!==d.current&&(d.current=n),r!==m.current&&(v(m.current),b(r),m.current=r)},C=e=>{if((e=>{var t,r;const n=e.target;return"TEXTAREA"===n.tagName||"INPUT"===n.tagName&&"text"===(null==(t=n.attributes.type)?void 0:t.value)||"INPUT"===n.tagName&&"email"===(null==(r=n.attributes.type)?void 0:r.value)})(e))e.stopPropagation();else if(!(e=>{var t;return["menu","menuitem"].includes(null==(t=e.target.attributes.getNamedItem("role"))?void 0:t.value)})(e))switch(e.key){case"ArrowUp":case"ArrowLeft":return e.preventDefault(),void x("previous");case"ArrowDown":case"ArrowRight":return e.preventDefault(),void x("next");default:return}};m.current&&b(m.current,!1);const y=t.current;return y.addEventListener("keydown",C),a.observe(y,{childList:!0,subtree:!0}),()=>{n.disconnect(),y.removeEventListener("keydown",C),a.disconnect()}},[m,t,d,u,i,h]);Ve.useEffect(()=>{const e=setTimeout(()=>l(n),100);return()=>clearTimeout(e)},[n]),Ve.useEffect(()=>{if(!t.current||!t.current.children.length)return;t.current.tabIndex=-1;const e=t.current.contains(document.activeElement);p(t.current).forEach(e=>{e.tabIndex=-1}),lr(t.current.querySelectorAll('[role="gridcell"]')).forEach(t=>{e&&t===m.current||(t.tabIndex=-1)});const r=h(lr(t.current.children)),n=r?r.querySelector('[role="gridcell"]'):null,a=p(n),i=n&&n!==document.activeElement&&n.contains(document.activeElement),o=()=>a.forEach(e=>{e.tabIndex=0});if(i?o():a.forEach(e=>{e.addEventListener("focus",o)}),!e||i){if(u.current=h(lr(t.current.children)),!u.current)return;const e=u.current.attributes.role;if(d.current=e&&"row"===e.value?u.current:h(lr(u.current.querySelectorAll('[role="row"]'))),u.current.attributes.role&&"row"===u.current.attributes.role.value?d.current=u.current:d.current=h(lr(u.current.querySelectorAll('[role="row"]'))),!d.current)return;if(m.current=d.current.querySelector('[role="gridcell"]'),!m.current)return}const l=g();return()=>{l(),a.forEach(e=>{e.removeEventListener("focus",o)})}},[m,d,u,t,g,o,h])}const Qr=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=1e3);const[r,n]=Ve.useState(!1);return Ve.useEffect(()=>{let r;const a=()=>{e||(n(!0),r=window.setTimeout(()=>{n(!1)},t))};return window.addEventListener("beforeunload",a),()=>{window.removeEventListener("beforeunload",a),r&&window.clearTimeout(r)}},[e,t]),r},Xr=e=>{const[t,r]=qe.useState(window.matchMedia(e).matches);return qe.useEffect(()=>{const t=window.matchMedia(e),n=()=>{r(t.matches)};try{t.addEventListener("change",n)}catch{t.addListener&&t.addListener(n)}return n(),()=>{try{t.removeEventListener("change",n)}catch{t.removeListener&&t.removeListener(n)}}},[e]),t};function Jr(){return(Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;tVe.createElement("svg",Jr({height:"18px",viewBox:"0 0 21 18",width:"21px"},e),Ve.createElement("path",{d:"M9.05674797,7.10056554 L9.13703813,7.13553157 L25.4390381,15.1015316 L25.5284558,15.1506535 L25.6286153,15.2222405 C25.7452987,15.313793 25.8339182,15.4266828 25.895416,15.5505399 L25.9423517,15.6622033 L25.9751927,15.7773803 L25.9891204,15.8509608 L25.998657,15.9475578 L25.9972397,16.0748669 L25.9800642,16.201216 L25.9701282,16.2435678 C25.9550365,16.3071288 25.9331784,16.3694784 25.9050831,16.4294253 L25.8937351,16.4490792 C25.8488724,16.5422577 25.7878083,16.6290528 25.7112518,16.7055442 L25.609137,16.7931281 L25.539527,16.8424479 L25.4390381,16.8984684 L9.05674797,24.8994345 C8.4880852,25.1179893 7.84373932,24.9716543 7.42618713,24.5298922 C7.02348961,24.1049956 6.89354829,23.48994 7.08502271,22.9526995 L9.44381329,15.9994998 L7.08997091,9.06153122 C6.90991684,8.5560159 7.00409914,7.99707209 7.33051276,7.58090053 L7.4252609,7.47108641 C7.84373932,7.02834566 8.4880852,6.8820107 9.05674797,7.10056554 Z M20.6761421,16.9994644 L11.2161421,16.9994644 L9.33681329,22.5404998 L20.6761421,16.9994644 Z M9.33581329,9.45749977 L11.2161421,14.9994644 L20.6761421,14.9994644 L9.33581329,9.45749977 Z"})),en=e=>Ve.createElement(n,e,Ve.createElement($r,null));function tn(){return(tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l&&(s(e),r(e))}}),t?Ve.createElement(n,{"aria-hidden":!0},t):Ve.createElement(en,null))}var nn={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},an=function(e){Object.keys(nn).forEach((function(t){e.style.setProperty(t,nn[t],"important")}))},on=null;var ln=function(){},sn=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],cn=!!document.documentElement.currentStyle,un=function(t,r){var n,a=t.cacheMeasurements,i=t.maxRows,s=t.minRows,c=t.onChange,u=void 0===c?ln:c,d=t.onHeightChange,m=void 0===d?ln:d,p=o(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),h=void 0!==p.value,g=Ve.useRef(null),f=l(g,r),b=Ve.useRef(0),v=Ve.useRef(),x=function(){var e=g.current,t=a&&v.current?v.current:function(e){var t=e.ownerDocument.defaultView.getComputedStyle(e);if(null===t)return null;var r,n=(r=t,sn.reduce((function(e,t){return e[t]=r[t],e}),{})),a=n.boxSizing;return""===a?null:(cn&&"border-box"===a&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px"),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})}(e);if(t){v.current=t;var r=function(e,t,r,n,a){void 0===r&&(r=1),void 0===n&&(n=1/0),on||((on=a.createElement("textarea")).setAttribute("tab-index","-1"),on.setAttribute("aria-hidden","true"),an(on)),null===on.parentNode&&a.body.appendChild(on);var i=e.paddingSize,o=e.borderSize,l=e.sizingStyle,s=l.boxSizing;Object.keys(l).forEach((function(e){var t=e;on.style[t]=l[t]})),an(on),on.value=t;var c=function(e,t){var r=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?r+t.borderSize:r-t.paddingSize}(on,e);on.value="x";var u=on.scrollHeight-i,d=u*r;"border-box"===s&&(d=d+i+o),c=Math.max(d,c);var m=u*n;return"border-box"===s&&(m=m+i+o),[c=Math.min(m,c),u]}(t,e.value||e.placeholder||"x",s,i,p.document||document),n=r[0],o=r[1];b.current!==n&&(b.current=n,e.style.setProperty("height",n+"px","important"),m(n,{rowHeight:o}))}};return Ve.useLayoutEffect(x),n=e(x),Ve.useLayoutEffect((function(){var e=function(e){n.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),Ve.createElement("textarea",Ze({},p,{onChange:function(e){h||x(),u(e)},ref:f}))},dn=Ve.forwardRef(un);function mn(){return(mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{m(e),i.onChange&&i.onChange(e)},onKeyDown:e=>{p(e),i.onKeyDown&&i.onKeyDown(e)},value:u,maxRows:r,placeholder:n,ref:e=>{c(e),d(e)},document:h}))})),gn=u(Ve.createElement("path",{d:"M12,18c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1s1,0.4,1,1C13,17.6,12.6,18,12,18z M10.5,7.1 C10.5,6.5,11.2,6,12,6s1.5,0.5,1.5,1.1c0.1,5.2-0.4,7.9-1.5,7.9S10.4,12.4,10.5,7.1z"}),{size:32,viewBox:"0 0 24 24"}),fn=u(Ve.createElement("path",{d:"M 10 0 C 15.523 0 20 4.477 20 10 C 20 15.523 15.523 20 10 20 C 4.477 20 0 15.523 0 10 C 0 4.477 4.477 0 10 0 Z M 10 2 C 5.582 2 2 5.582 2 10 C 2 14.418 5.582 18 10 18 C 14.418 18 18 14.418 18 10 C 18 5.582 14.418 2 10 2 Z M 9.45 10.836 L 9.375 10.78 L 9.305 10.72 L 9.232 10.641 L 9.161 10.544 L 9.121 10.478 L 9.082 10.398 L 9.052 10.318 L 9.024 10.217 L 9.004 10.087 L 9 10 L 9 5 C 9 4.448 9.448 4 10 4 C 10.552 4 11 4.448 11 5 L 11 9.422 L 13.964 11.134 C 14.438 11.412 14.599 12.021 14.324 12.497 C 14.049 12.973 13.442 13.138 12.964 12.866 L 9.451 10.836 Z"}),{size:32,viewBox:"0 0 20 20"}),bn=u(Ve.createElement(Ve.Fragment,null,Ve.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),Ve.createElement("path",{d:"M12 18l.01 0"}),Ve.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),Ve.createElement("path",{d:"M6.343 12.343a7.963 7.963 0 0 1 3.864 -2.14m4.163 .155a7.965 7.965 0 0 1 3.287 2"}),Ve.createElement("path",{d:"M3.515 9.515a12 12 0 0 1 3.544 -2.455m3.101 -.92a12 12 0 0 1 10.325 3.374"}),Ve.createElement("path",{d:"M3 3l18 18"})),{size:24,viewBox:"0 0 24 24",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),vn=u(Ve.createElement("path",{d:"M8,18c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S9.1,18,8,18z M16,18c-1.1,0-2-0.9-2-2s0.9-2,2-2\ns2,0.9,2,2S17.1,18,16,18z M24,18c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S25.1,18,24,18z"}),{size:32,viewBox:"0 0 32 32"}),xn=u(Ve.createElement("path",{d:"M15.9848633,4 C16.522739,4 17.1781945,4.3003544 17.5680352,4.66177175 L25.4660634,12.6060564 C25.7269724,12.8930221 26,13.2900391 26,13.999939 L26,26 C26,27.5976809 24.75108,28.9036609 23.1762728,28.9949073 L23,29 L8,29 C6.40231912,29 5.09633912,27.75108 5.00509269,26.1762728 L5,26 L5,7 C5,5.40231912 6.24891996,4.09633912 7.82372721,4.00509269 L8,4 L15.9848633,4 Z M15.9848633,6 L8,6 C7.48716416,6 7.06449284,6.38604019 7.00672773,6.88337887 L7,7 L7,26 C7,26.5128358 7.38604019,26.9355072 7.88337887,26.9932723 L8,27 L23,27 C23.5128358,27 23.9355072,26.6139598 23.9932723,26.1166211 L24,26 L24,13.9748535 L16.9848633,13.9748535 C16.4720274,13.9748535 16.0493561,13.5888133 15.991591,13.0914746 L15.9848633,12.9748535 L15.9848633,6 Z M15,15 C15.5128358,15 15.9355072,15.3860402 15.9932723,15.8833789 L16,16 L16,21.584 L17.2926358,20.290965 L17.3868128,20.207742 C17.7789929,19.9025743 18.346234,19.9300973 18.7068492,20.2904499 C19.0674644,20.6508026 19.0954005,21.2180235 18.7905185,21.6104258 L18.7073642,21.7046634 L15.7073642,24.7068492 L15.6131376,24.790111 C15.2534469,25.069963 14.7465531,25.069963 14.3868624,24.790111 L14.2926358,24.7068492 L11.2926358,21.7046634 L11.2094815,21.6104258 C10.9300063,21.2507237 10.9301908,20.7441254 11.2099279,20.384627 L11.2931508,20.2904499 L11.3873884,20.2072956 C11.7470905,19.9278205 12.2536888,19.928005 12.6131872,20.207742 L12.7073642,20.290965 L14,21.584 L14,16 C14,15.4477153 14.4477153,15 15,15 Z M17.984,7.991 L17.984,11.974 L21.993,11.974 L17.984,7.991 Z"}),{size:32,viewBox:"0 0 32 32"}),Cn=u(Ve.createElement("g",{id:"emoji-smile",stroke:"none",strokeWidth:"2",fill:"none",fillRule:"evenodd",transform:"translate(7, 7)"},Ve.createElement("path",{stroke:"currentColor",id:"changeable",strokeLinecap:"round",strokeLinejoin:"round",d:"M0,9 C0,12.2153905 1.71539025,15.1865338 4.5,16.7942289 C7.28460967,18.4019241 10.7153903,18.4019241 13.5,16.7942289 C16.2846097,15.1865338 18,12.2153905 18,9 C18,5.78460984 16.2846098,2.81346659 13.5,1.2057714 C10.7153903,-0.401923799 7.28460966,-0.401923799 4.5,1.2057714 C1.71539023,2.81346659 0,5.78460984 0,9"}),Ve.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M6,7.00000019 L6.01,7.00000019 M12,7.00000019 L12.01,7.00000019"}),Ve.createElement("path",{d:"M6.5,12.0000002 C7.15831134,12.6718864 8.05935933,13.0505104 9,13.0505104 C9.94064067,13.0505104 10.8416887,12.6718864 11.5,12.0000002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{size:32,viewBox:"0 0 32 32"}),yn=u(Ve.createElement("path",{d:"M17.6,17H7c-0.6,0-1-0.4-1-1s0.4-1,1-1h10.6l-2.3-2.3c-0.4-0.4-0.4-1,0-1.4c0.4-0.4,1-0.4,1.4,0l4,4 c0.4,0.4,0.4,1,0,1.4l-4,4c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L17.6,17L17.6,17z M8,12c0,0.6-0.4,1-1,1s-1-0.4-1-1V8.1 C6,7,7,6,8.1,6h15.8C25,6,26,7,26,8.1v15.8c0,1.2-1,2.1-2.1,2.1H8.1C7,26,6,25,6,23.9V20c0-0.6,0.4-1,1-1s1,0.4,1,1v3.9 C8,23.9,8.1,24,8.1,24h15.8c0.1,0,0.1-0.1,0.1-0.1V8.1C24,8.1,23.9,8,23.9,8H8.1C8.1,8,8,8.1,8,8.1V12z"}),{size:32,viewBox:"0 0 32 32"}),wn=c("div",{target:"e1ykiqc40"})("display:inline-block;",e=>{let{size:t}=e;return{width:t,height:t}}," &:hover{background-color:",e=>{let{theme:t}=e;return t.colors.surfaceVariant},";border-radius:",e=>{let{theme:t}=e;return t.borderRadius.sm},";}"),Ln=u(Ve.createElement("path",{d:"M18,10.6l1.3-1.3c0.4-0.4,1-0.4,1.4,0c0.4,0.4,0.4,1,0,1.4L19.4,12l1.3,1.3c0.4,0.4,0.4,1,0,1.4 c-0.4,0.4-1,0.4-1.4,0L18,13.4l-1.3,1.3c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4l1.3-1.3l-1.3-1.3c-0.4-0.4-0.4-1,0-1.4 c0.4-0.4,1-0.4,1.4,0L18,10.6L18,10.6z M7,8l4.3-3.7C11.9,3.7,13,4.1,13,5v14c0,0.9-1.1,1.3-1.7,0.7L7.2,16H4c-0.6,0-1-0.4-1-1V9 c0-0.6,0.4-1,1-1H7z M11,7.4L8.3,9.7C8.1,9.9,7.9,10,7.6,10H5v4h2.6c0.3,0,0.5,0.1,0.7,0.3l2.7,2.3V7.4z"}),{size:24,viewBox:"0 0 24 24"}),En=u(Ve.createElement("path",{d:"M3.70710678,2.29289322 L21.7071068,20.2928932 C22.0976311,20.6834175 22.0976311,21.3165825 21.7071068,21.7071068 C21.3165825,22.0976311 20.6834175,22.0976311 20.2928932,21.7071068 L17.8653998,19.2810174 C14.9733847,21.158541 11.150589,21.5158267 7.8679506,20.1699457 L7.582,20.0469327 L3.20810764,20.9781059 C2.48958727,21.1309826 1.87156475,20.4873185 2.02121148,19.7936119 L2.0513167,19.6837722 L3.201,16.2329327 L3.1743888,16.1896809 C1.20372183,12.8416347 1.79141329,8.75589549 4.56054396,5.9751985 L2.29289322,3.70710678 C1.90236893,3.31658249 1.90236893,2.68341751 2.29289322,2.29289322 C2.68341751,1.90236893 3.31658249,1.90236893 3.70710678,2.29289322 Z M5.12835888,15.5398022 C5.30253383,15.797353 5.34700385,16.1212661 5.2486833,16.4162278 L4.501,18.6569327 L7.49189236,18.0218941 C7.66602417,17.9848447 7.84606249,17.995109 8.0136155,18.0504484 L8.13665189,18.1003695 C10.7801625,19.383445 13.9672412,19.2357972 16.4117673,17.8266808 L5.97494188,7.38919267 C3.73685028,9.63863541 3.35913123,12.923663 5.12835888,15.5398022 Z M18.8938771,5.44610676 C22.2269073,8.2884595 22.974724,12.8118387 20.7284667,16.3978486 C20.4352871,16.8658915 19.8181943,17.0076463 19.3501514,16.7144667 C18.8821085,16.4212871 18.7403537,15.8041943 19.0335333,15.3361514 C20.7481194,12.5989216 20.1817107,9.17283947 17.5958807,6.96768665 C15.2896471,4.99970064 11.8795841,4.44301774 8.93777259,5.51641841 C8.41894613,5.70572649 7.84488966,5.43859905 7.65558159,4.91977259 C7.46627351,4.40094613 7.73340095,3.82688966 8.25222741,3.63758159 C11.8599246,2.32121427 16.0295683,3.00189653 18.8938771,5.44610676 Z"}),{size:24,viewBox:"0 0 24 24"}),kn=u(Ve.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},Ve.createElement("path",{d:"M14.0133809,20.6336646 L10.4932068,16.0607791 C10.1786388,15.7553679 10,15.3343805 10,14.8969225 L10,6.65082041 C10,5.74286919 10.7652552,5 11.7005883,5 L16.4621977,5 C17.142414,5 17.7546182,5.39623455 18.0182008,5.99877459 L20.7901465,12.2802686 C21.5128823,13.9146185 20.2799129,15.730615 18.4518613,15.730615 L15.3483209,15.730615 L16.1560956,19.5111256 C16.2411345,19.9238307 16.1135761,20.3448181 15.807474,20.641947 C15.3058014,21.1207225 14.5064925,21.1207225 14.0133809,20.6336646 Z M5.49995805,5 C6.32498951,5 7,5.74997862 7,6.66661916 L7,13.3332858 C7,14.2500214 6.32498951,15 5.49995805,15 C4.67501049,15 4,14.2500214 4,13.3332858 L4,6.66661916 C4,5.74997862 4.67501049,5 5.49995805,5 Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",id:"changeable"})),{size:24,viewBox:"0 0 24 24"}),Sn=u(Ve.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},Ve.createElement("path",{d:"M14.0133809,4.36633538 L10.4932068,8.93922087 C10.1786388,9.24463206 10,9.6656195 10,10.1030775 L10,18.3491796 C10,19.2571308 10.7652552,20 11.7005883,20 L16.4621977,20 C17.142414,20 17.7546182,19.6037655 18.0182008,19.0012254 L20.7901465,12.7197314 C21.5128823,11.0853815 20.2799129,9.26938495 18.4518613,9.26938495 L15.3483209,9.26938495 L16.1560956,5.48887444 C16.2411345,5.07616933 16.1135761,4.65518189 15.807474,4.35805304 C15.3058014,3.87927747 14.5064925,3.87927747 14.0133809,4.36633538 Z M5.49995805,10 C6.32498951,10 7,10.7499786 7,11.6666192 L7,18.3332858 C7,19.2500214 6.32498951,20 5.49995805,20 C4.67501049,20 4,19.2500214 4,18.3332858 L4,11.6666192 C4,10.7499786 4.67501049,10 5.49995805,10 Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",id:"changeable"})),{size:24,viewBox:"0 0 24 24"}),zn=u(Ve.createElement("path",{d:"M15,19v-2c2.8,0,5-2.2,5-5s-2.2-5-5-5V5c3.9,0,7,3.1,7,7S18.9,19,15,19z M15,16v-2c1.1,0,2-0.9,2-2s-0.9-2-2-2 V8c2.2,0,4,1.8,4,4S17.2,16,15,16z M7,8l4.3-3.7C11.9,3.7,13,4.1,13,5v14c0,0.9-1.1,1.3-1.7,0.7L7.2,16H4c-0.6,0-1-0.4-1-1V9 c0-0.6,0.4-1,1-1H7z M11,7.4L8.3,9.7C8.1,9.9,7.9,10,7.6,10H5v4h2.6c0.3,0,0.5,0.1,0.7,0.3l2.7,2.3V7.4z"}),{size:24,viewBox:"0 0 24 24"}),Tn=u(Ve.createElement("path",{d:"M20,7 C21.5976809,7 22.9036609,8.24891996 22.9949073,9.82372721 L23,10 L23,13.928 L27.292478,9.63704135 C27.8950531,9.03446626 28.9067656,9.41648044 28.9936015,10.2305172 L28.9995848,10.3441481 L28.9995848,21.6578566 C28.9995848,22.5100265 28.0140712,22.9552904 27.377058,22.4410818 L27.292478,22.3649634 L23,18.073 L23,22 C23,23.5976809 21.75108,24.9036609 20.1762728,24.9949073 L20,25 L6,25 C4.40231912,25 3.09633912,23.75108 3.00509269,22.1762728 L3,22 L3,10 C3,8.40231912 4.24891996,7.09633912 5.82372721,7.00509269 L6,7 L20,7 Z M20,9 L6,9 C5.48716416,9 5.06449284,9.38604019 5.00672773,9.88337887 L5,10 L5,22 C5,22.5128358 5.38604019,22.9355072 5.88337887,22.9932723 L6,23 L20,23 C20.5128358,23 20.9355072,22.6139598 20.9932723,22.1166211 L21,22 L21,10 C21,9.48716416 20.6139598,9.06449284 20.1166211,9.00672773 L20,9 Z M13,11 C14.6568542,11 16,12.3431458 16,14 C16,14.5467286 15.8537493,15.0592984 15.5982359,15.5007215 C16.9548251,16.0711623 17.9059057,17.090655 17.9934086,18.3542924 L18,18.5456435 L18,19.5002598 C18,20.6194095 17.0786223,20.9135858 14.6819503,20.981557 L13.8901786,20.9960521 L13,21 L12.1098214,20.9960521 C9.21524131,20.9665724 8.07193908,20.7493906 8.00330943,19.6131156 L8,19.5002598 L8,18.5456435 C8,17.1937269 8.97734547,16.0996844 10.4021695,15.5004954 C10.1462507,15.0592984 10,14.5467286 10,14 C10,12.3431458 11.3431458,11 13,11 Z M26.9983216,12.7596249 L23.7569441,16.0010024 L26.9983216,19.2423799 L26.9983216,12.7596249 Z M13,17 C11.3462727,17 10.1069811,17.7448466 10.0065778,18.4534823 L10,18.5456435 L10,18.833 L10.1239193,18.8521038 L10.3603748,18.8811749 C11.0486755,18.957613 12.0028781,19 13,19 C13.9971219,19 14.9513245,18.957613 15.6396252,18.8811749 L15.8006868,18.8620278 L15.8006868,18.8620278 L16,18.833 L16,18.5456435 C16,17.8722422 14.9291739,17.1346401 13.4215296,17.0163828 L13.2132937,17.0041599 L13,17 Z M13,13 C12.4477153,13 12,13.4477153 12,14 C12,14.5522847 12.4477153,15 13,15 C13.5522847,15 14,14.5522847 14,14 C14,13.4477153 13.5522847,13 13,13 Z"}),{size:32,viewBox:"0 0 32 32"}),Mn=c(i,{target:"eed86ay0"})("padding:0;flex-shrink:0;display:flex;align-items:center;justify-content:center;",e=>{let{size:t}=e;return{width:t,height:t}},";"),Rn=e=>{let{buttonSize:t=32,iconSize:r=24,...n}=e;return Ve.createElement(Mn,or({size:t},n),Ve.createElement(wn,{size:r},Ve.createElement(d,{size:r})))},_n=c("div",{target:"e1viqdiv0"})("margin:8px 16px;background:",e=>{let{theme:t}=e;return t.colors.surface},";box-shadow:",e=>{let{theme:t}=e;return t.boxShadow.sm},";",e=>{let{stickToEdge:t=!1,theme:r}=e;return{borderRadius:t?r.borderRadius.md+" "+r.borderRadius.md+" "+r.borderRadius.none+" "+r.borderRadius.none:r.borderRadius.md,width:"calc(100% - 30px)",maxWidth:"400px",margin:t?"0 auto":"0 auto 8px"}},";"),An=c(i,{target:"e1l1ek6a1"})("padding:0;flex-shrink:0;display:flex;align-items:center;justify-content:center;",e=>{let{size:t}=e;return{width:t,height:t}},";"),In=c(m,{target:"e1l1ek6a0"})({name:"jbgpyq",styles:"transform:rotate(90deg)"}),Pn=e=>{let{buttonSize:t=32,iconSize:r=24,...n}=e;return Ve.createElement(An,or({size:t},n),Ve.createElement(wn,{size:r},Ve.createElement(In,{size:r})))},Bn=c("span",{target:"e1tnd1n32"})({name:"2h1wr3",styles:"flex-grow:1;flex-shrink:1"}),jn=c("div",{target:"e1tnd1n31"})("display:flex;cursor:pointer;justify-content:flex-start;align-items:center;flex-wrap:wrap;color:",e=>{let{theme:t}=e;return t.colors.primaryTextColor},";",e=>{let{theme:t}=e;return t.typography.basic},";"),On=c(h,{target:"e1tnd1n30"})({name:"1oi6uwp",styles:"margin:0 6px;flex-shrink:0;box-shadow:none"}),Fn=e=>{let{unseenCount:t,text:r,stickToEdge:n,onClose:a,onClick:i,...o}=e;return Ve.createElement(_n,or({stickToEdge:n},o),Ve.createElement(jn,{onClick:i},Ve.createElement(On,null,t<100?t:"99+"),Ve.createElement(Bn,{ellipsis:!1},Ve.createElement(p,null,r)),Ve.createElement(Pn,{onClick:i,"aria-label":"scroll to latest "+(t>1?t+" messages":"message")}),Ve.createElement(Rn,{"aria-label":"close notification",onClick:e=>{e.stopPropagation(),a()}})))};var Hn;const Vn={enter:300,exit:300},Dn=(e,t)=>e(Hn||(Hn=b(["\n\t&-enter {\n\t\ttransform: translate(-50%, 20%);\n\t\topacity: 0;\n\t}\n\n\t&-enter-active,\n\t&-enter-done {\n\t\ttransition: transform ","ms ",",\n\t\t\topacity ","ms ",";\n\t\ttransform: translate(-50%, 0%);\n\t\topacity: 1;\n\t}\n\n\t&-exit {\n\t\ttransform: translate(-50%, 0%);\n\t\topacity: 1;\n\t}\n\n\t&-exit-active,\n\t&-exit-done {\n\t\ttransform: translate(-50%, 20%);\n\t\topacity: 0;\n\t\ttransition: transform ","ms ",",\n\t\t\topacity ","ms ease-out 50ms;\n\t}\n"])),300,t.transitions.easings.swift,300,t.transitions.easings.swift,300,t.transitions.easings.swift,150),qn=e=>{let{nodeRef:t,...r}=e;return Ve.createElement(g,null,e=>{let{css:n,theme:a}=e;return Ve.createElement(f,or({},r,{nodeRef:t,classNames:Dn(n,a),timeout:Vn}))})},Wn={name:"xr9539",styles:"overflow:hidden;margin-bottom:0"},Nn=e=>{let{avatar:t}=e;const r=v();return x(E,{avatar:t,css:Wn},x(C,null,x(y,null,x(w,null,x(L,{height:"16px",width:"24px",color:r.colors.agentMessageText})))))},Zn=e=>{const t=v().Maximized.css.background;return Ve.createElement(k,or({},e,{adjustToColor:t,ariaLabel:"Loading previous messages"}))},Un=c("p",{target:"eprg9im5"})("margin-bottom:",e=>{let{theme:t,mobile:r}=e;return"modern"!==t.name&&r?0:4},"px;",e=>{let{theme:t}=e;return t.typography.caption}," ",S(),";color:",e=>{let{theme:t}=e;return t.colors.primaryTextColor},";margin:0;padding:0 12px;max-width:100%;max-height:50px;"),Kn=c("div",{target:"eprg9im4"})(e=>{let{theme:t,mobile:r}=e;return!r&&"modern"===t.name&&"max-height: 230px; overflow-y: auto;"},";"),Yn=c("div",{target:"eprg9im3"})("height:",e=>{let{theme:t,mobile:r}=e;return r||"modern"!==t.name?145:140},"px;overflow:hidden;display:flex;align-items:center;justify-content:center;width:100%;"),Gn=c("div",{target:"eprg9im2"})("padding:",e=>{let{theme:t}=e;return t.spaces.space3+" "+t.spaces.space5},";display:flex;flex-direction:row;justify-content:center;align-items:center;max-width:100%;"),Qn=c(sr,{target:"eprg9im1"})("height:34px;",e=>{let{theme:t}=e;const r=t.isRtl?"left":"right";return R("border-",r,":none;border-top-",r,"-radius:0;border-bottom-",r,"-radius:0;")},";"),Xn=c(_,{target:"eprg9im0"})("color:",e=>{let{theme:t,highlighted:r}=e;return r?t.colors.ctaText:t.colors.disabledContrast},";background-color:",e=>{let{theme:t,highlighted:r}=e;return r?t.colors.cta:t.colors.disabled},";height:34px;width:34px;justify-content:center;align-items:center;display:flex;padding:6px 8px;",e=>{let{theme:t}=e;const r=t.isRtl?"left":"right",n=t.isRtl?"right":"left";return R("border-top-",n,"-radius:0;border-bottom-",n,"-radius:0;border-top-",r,"-radius:6px;")}," transition:background 100ms linear;"),Jn={name:"q4dzvk",styles:"width:100%;height:auto"},$n=e=>{let{url:t,alternativeText:r,name:n,onAlternativeTextChanged:a,mobile:i,titleId:o}=e;const[l,s]=Ve.useState(r||""),{isFocusVisible:c}=z(),u=T();return x(M,null,e=>x(Kn,{mobile:i},x(Yn,{mobile:i},x("img",{src:t,css:Jn,alt:r||n})),x(Gn,null,x(Qn,{autoFocus:!0,"aria-labelledby":o,"aria-describedby":u,maxLength:16384,value:l,placeholder:e("describe_image"),onChange:e=>{let{target:t}=e;return s(t.value)}}),x(Xn,{"aria-label":"save the image's alternative text",highlighted:l!==r||c,disabled:l===r,onPress:()=>{a(l)}},x(m,{size:24}))),x(Un,{id:u,mobile:i},e("alternative_text_description"))))},ea=c("span",{target:"e1oq7ugp9"})(e=>{let{failed:t,theme:r}=e;return{color:t?r.colors.error:r.colors.primaryTextColor}},";"),ta=c("div",{target:"e1oq7ugp8"})("flex:1;display:flex;flex-direction:column;margin:2px;min-width:calc(50% - 4px);max-width:100%;height:",e=>{let{theme:t,mobile:r}=e;return r||"modern"!==t.name?140:100},"px;"),ra=c("div",{target:"e1oq7ugp7"})("border-radius:",e=>{let{theme:t}=e;return t.borderRadius.xl},";flex:1;width:100%;height:100%;display:flex;overflow:hidden;position:relative;align-items:center;justify-content:center;"),na=c("div",{target:"e1oq7ugp6"})("color:",e=>{let{theme:t}=e;return t.colors.secondaryTextColor},";background-color:",e=>{let{theme:t}=e;return t.colors.surfaceDecorative},";width:100%;height:100%;display:flex;align-items:center;justify-content:center;"),aa=c("img",{target:"e1oq7ugp5"})({name:"q4dzvk",styles:"width:100%;height:auto"}),ia=c("div",{target:"e1oq7ugp4"})({name:"1uja423",styles:"position:absolute;top:6px;right:6px;z-index:1"}),oa=c("div",{target:"e1oq7ugp3"})("height:24px;width:24px;display:flex;border-radius:50%;align-items:center;justify-content:center;",e=>{let{theme:t,success:r,error:n}=e;return r?{backgroundColor:t.colors.success,color:t.colors.successContrast}:n?{backgroundColor:t.colors.error,color:t.colors.errorContrast}:void 0},";"),la=c("div",{target:"e1oq7ugp2"})("opacity:",e=>{let{visible:t}=e;return t?1:0},";transition:opacity 100ms ",e=>{let{theme:t}=e;return t.transitions.easings.smooth},";position:absolute;left:6px;right:6px;bottom:6px;display:flex;flex-direction:row-reverse;align-items:center;justify-content:space-between;z-index:1;",_,"{width:20px;height:20px;}"),sa=c("div",{target:"e1oq7ugp1"})("border-radius:",e=>{let{theme:t}=e;return t.borderRadius.md},";color:",e=>{let{theme:t}=e;return t.colors.grayscale[0]},";padding:2px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:rgba(0, 0, 0, 0.6);"),ca=c("span",{target:"e1oq7ugp0"})(e=>{let{theme:t}=e;return t.typography.caption},";color:",e=>{let{theme:t}=e;return t.colors.grayscale[0]},";cursor:pointer;margin-right:4px;"),ua={name:"e0dnmk",styles:"cursor:pointer"},da=e=>{let{failReason:t}=e;const r=Ve.useRef(null),{focusableProps:n}=P({},r);return x(oa,or({"aria-label":t,error:!0},n,{ref:r,tabIndex:0}),x(gn,{css:ua,size:24,"aria-hidden":!0}))};var ma={name:"1nq59d9",styles:"transition:opacity 100ms linear"};const pa=e=>{const{name:t,failed:r,finished:n,url:a,fileType:i,mobile:o,alternativeText:l,onCancel:s,onAlternativeTextEdit:c,progress:u=0,failReason:d="",insistHover:m,onHoverChange:p}=e,{hoverProps:h,isHovered:g}=A({onHoverChange:p}),{isFocusVisible:f}=z();return x(M,null,e=>x(ta,null,x(ra,h,x(ia,null,n&&x(oa,{success:!0},x(Wr,{size:24,"aria-hidden":!0})),r&&x(I,{description:d,allowTouch:!0},x(da,{failReason:d})),!n&&!r&&x(k,{size:"medium",progress:u,"aria-hidden":!0})),(s||c)&&x(la,{visible:m||g||f||o},s&&x(sa,null,x(_,{onPress:s,"aria-label":"remove the "+t+" file"},x(cr,{size:20,"aria-hidden":!0}))),"image"===i&&c&&x(sa,null,x(_,{onPress:c,"aria-label":"alt text: add alternative text to the "+t+" image"},x(ur,{size:20,"aria-hidden":!0})),x(ca,{onClick:c,"aria-hidden":"true"},e("alt_text")))),"image"===i&&x(aa,{src:a,alt:l||t,style:{opacity:n?1:.25},css:ma}),"other"===i&&x(na,null,x(dr,{size:56}))),x(ea,{ellipsis:!0,failed:r,finished:n},t)))},ha=c("h2",{target:"e1k6tlos7"})(e=>{let{failed:t,theme:r}=e;return t&&{color:r.typography.errorCaption.color}}," padding:0 6px;font-size:14px;font-weight:normal;align-self:center;margin:0;"),ga=c("div",{target:"e1k6tlos6"})({name:"189qznn",styles:"display:flex;cursor:pointer"}),fa=c("div",{target:"e1k6tlos5"})("transition:max-height ",e=>{let{longAnimation:t}=e;return t?600:400},"ms ",e=>{let{theme:t}=e;return t.transitions.easings.swift},";overflow:hidden;max-height:249px;"),ba=c("div",{target:"e1k6tlos4"})("height:auto;",e=>{let{edit:t}=e;return t&&{margin:"0 -8px"}},";@media (max-height: 400px){overflow-y:auto;max-height:80px;}"),va=c("div",{target:"e1k6tlos3"})("max-height:",e=>{let{theme:t,mobile:r}=e;return r||"modern"!==t.name?200:125},"px;overflow:auto;display:flex;flex-direction:row;flex-wrap:wrap;padding:4px 0;"),xa=c("hr",{target:"e1k6tlos2"})("margin:",8,"px -",8,"px 0;border:0;border-bottom:1px solid rgba(0, 0, 0, 0.1);"),Ca=c(mr,{target:"e1k6tlos1"})(e=>{let{direction:t}=e;return"up"===t&&{transform:"scaleY(-1)"}},";"),ya={name:"gc6sdx",styles:"padding-left:4px"},wa=c(_n,{target:"e1k6tlos0"})("padding:",e=>{let{theme:t,isEdit:r,expanded:n,mobile:a}=e;return!a&&"modern"===t.name&&r&&n?"8px 8px 0":"8px"},";",e=>{let{theme:t}=e;return t.typography.basic},";color:",e=>{let{theme:t}=e;return t.colors.primaryTextColor},";overflow:hidden;"),La={name:"x4j9dr",styles:"margin-top:6px;max-width:100%"},Ea={name:"13fmgtn",styles:"transform:scaleX(-1)"},ka=Ue([B],e=>e.map(e=>({id:e.id,...e.properties}))),Sa=e=>{let{scrollToBottom:t,uploadEnabled:r,uploadEntries:n,localize:a}=e;const{chatId:i,uploadEntries:o,mobile:l,persistKey:s,isSendingFileEvents:c,themeName:u}=j(e=>((e,t)=>{const{isSendingFileEvents:r,mobile:n,config:a,organizationId:i,group:o,requestedGroup:l}=e.getApplicationState(),s=null!=t?t:ka(Ye(e)),c=V({organizationId:i,group:o,requestedGroup:l});return{chatId:Ge(e),mobile:n,persistKey:c,isSendingFileEvents:r,uploadEntries:s,themeName:a.theme.name}})(e,n)),d=O(),p=null!=a?a:d.localize,h=T(),g=T(),[f,b]=Ve.useState(!0),[v,C]=Ve.useState(!1),[y,w]=Ve.useState(!1),[L,E]=Ve.useState(null),[S,z]=Ve.useState(""),M=Ve.useRef(null),R=Ve.useRef(null),A=((e,t)=>{const r=e.filter(e=>e.failed),n=e.filter(e=>e.finished).length,a=r.length,i=e.length,o=t("file_upload_status").replace("%finishedCount%",String(n)).replace("%totalCount%",String(i));switch(!0){case a>0:return{failedCount:a,uploadStatus:"error",title:a>1?t("files_failed_to_upload").replace("%files%",String(a)):r[0].failReason};case n===i:return{uploadStatus:"success",title:o};default:return{uploadStatus:"pending",title:o}}})(o,p),I="error"===A.uploadStatus&&o.length===A.failedCount,P=Ve.useCallback(e=>{d.emit("cancel_upload",{eventId:e})},[d]),B=Ve.useCallback((e,t)=>{d.updateEvent(i,e,{properties:{alternativeText:t}})},[d,i]),D=Ve.useCallback(()=>{d.emit("send_file_events")},[d]),q=()=>{S&&z("")},W=Ve.useCallback(()=>l||"modern"!==u?249:228,[u,l]),N=Ve.useCallback(e=>(o.length>2||e?W():201)+"px",[o,W]),Z=Ve.useCallback(e=>{K(e)&&(M.current.style.maxHeight=e)},[]),U=e=>R.current.style.height=e,K=e=>M.current.style.maxHeight!==e,Y=Ve.useCallback(()=>{f?(C(!0),Z("0px")):b(!0)},[f,Z]);Ve.useEffect(()=>{const e=e=>{"Escape"===e.code&&f&&Y()};return document.addEventListener("keyup",e),()=>document.removeEventListener("keyup",e)},[f,Y]);const G=e=>{if(!f)return void E(e);const t=N(!!e);!e&&K(t)?(E(null),w(!0),U(R.current.clientHeight+"px"),Z(t)):(Z(W()+"px"),E(e))},Q=Ve.useCallback(e=>{"max-height"===e.propertyName&&(v?(b(!1),C(!1)):y&&(U("auto"),w(!1)))},[v,y]);return Ve.useEffect(()=>{o.length&&f&&!v&&Z(N(!!L))},[o.length,f,v,Z,N,L]),Ve.useEffect(()=>{if(!Ke("session"))return;const e=()=>{Xe(o)||((e,t)=>{const r=e.filter(e=>e.finished).map(e=>({...e,url:e.serverUrl}));Xe(r)||window.sessionStorage.setItem(t,JSON.stringify(r))})(o,s)};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[o,s]),x(wa,{isEdit:L,expanded:!v&&f,mobile:l},x(H,{message:A.title,clearOnUnmount:!0,"aria-live":"error"===A.uploadStatus?"assertive":"polite"}),x(ga,{onClick:e=>{e.stopPropagation(),Y()}},L?x(_,{"aria-label":"go back to upload list",onPress:()=>{G(null)}},x(m,{size:24,css:Ea,"aria-hidden":!0})):x(Ve.Fragment,null,"pending"===A.uploadStatus?x(k,{size:"medium","aria-hidden":!0}):"success"===A.uploadStatus?x(oa,{success:!0},x(Wr,{size:24,"aria-label":"Upload success"})):x(oa,{error:!0},x(gn,{size:24,"aria-label":"Upload error"}))),x(ha,or({id:g,flexFill:!0,ellipsis:!0},"error"===A.uploadStatus&&{failed:!0,title:A.title}),L?p("add_alternative_text"):A.title),x(_,{css:ya,"aria-label":"Toggle upload list","aria-controls":h,"aria-expanded":f,onPress:Y,autoFocus:!0},x(wn,{size:24,"aria-hidden":!0},x(Ca,{direction:f&&!v?"down":"up",size:24})))),f&&!v&&x(xa,null),x(fa,{ref:M,onTransitionEnd:Q,longAnimation:!f||v},f&&x(ba,{id:h,edit:!!L,ref:R},L?x($n,or({titleId:g},o.find(e=>{let{id:t}=e;return t===L}),{onAlternativeTextChanged:e=>{G(null),B(L,e)},mobile:l})):x(Ve.Fragment,null,x(va,{mobile:l},o.map(e=>x(pa,or({},e,{key:e.id,mobile:l,failed:!!e.failed,insistHover:S===e.id,onHoverChange:q,onCancel:!c||e.failed?()=>(e=>{if(!l&&o.length>1){const t=Qe(t=>t.id===e,o),r=t===o.length-1;z(o[t+(r?-1:1)].id)}P(e)})(e.id):null,onAlternativeTextEdit:c?null:()=>G(e.id)})))),x(F,{onClick:()=>{D(),t({duration:0})},disabled:I||!r,pending:c||"pending"===A.uploadStatus,css:La},p("send_files"))))))},za=c("div",{target:"ezpiwsd0"})({name:"1u57r43",styles:"position:absolute;bottom:0;left:0;right:0;z-index:100"}),Ta=e=>{const t=!Xe(Ye(e)),r=e.getApplicationState("mobile"),n=e.getUnseenCount($e);return{isFileUploadAllowed:et(e),isFileUploadPossible:tt(e),isUploadingFiles:t,unseenCount:n,mobile:r}},Ma=e=>{let{scrollToBottom:t,isOnBottomSource:r,isScrollable:n,markAsSeen:a}=e;const i=O(),{isFileUploadAllowed:o,isFileUploadPossible:l,isUploadingFiles:s,unseenCount:c,mobile:u}=j(Ta),d=Yr(r),m=c>0&&!d&&n,p=i.localize,[h,g]=Ve.useState(m),f=p(c>1?"new_messages":"new_message"),b=Ve.useCallback(()=>{Je($e,Date.now(),i).reverse().forEach(e=>a(e.id))},[i,a]);return!m&&h&&g(!1),Ve.useEffect(()=>{if(!m)return;const e=setTimeout(()=>g(!0),300);return()=>clearTimeout(e)},[m]),Ve.createElement(za,null,Ve.createElement(D,{appear:!0,component:null},o&&s&&Ve.createElement(q,{key:"upload"},Ve.createElement(Sa,{scrollToBottom:t,uploadEnabled:l})),h&&Ve.createElement(q,{key:"unseen"},Ve.createElement(Fn,{text:f,stickToEdge:u,unseenCount:c,onClick:t,onClose:b}))),h&&Ve.createElement(H,{message:f,clearOnUnmount:!0,"aria-live":"assertive"}))},Ra=e=>{let{theme:t,disabled:r,active:n}=e;return R("&:hover{background-color:",n?t.colors.pressedElement:t.colors.surfaceVariantHover,";",r&&"background-color: transparent",";}")},_a=function(e,t){const r=[];for(let n=0;n{let{theme:t,disabled:r}=e;return r?t.colors.tertiaryTextColor:t.colors.primaryTextColor},";will-change:background-color;background-color:",e=>{let{theme:t,active:r}=e;return r?t.colors.pressedElement:"transparent"},";transition:background-color 150ms ease-in-out;opacity:1;",e=>{let{active:t,theme:r}=e;return t&&R("path#changeable{fill:",r.colors.primaryTextColor,";stroke:none;}g#emoji-smile path:not(#changeable){stroke:",nt(.15,r.colors.surface),";}")}," ",Ra,";"),Ia=c("div",{target:"e1lbsxys0"})({name:"frpnj0",styles:"display:flex;flex-direction:row;align-items:center;justify-content:flex-start"}),Pa=e=>{let{onEmojiPicked:t,disabled:r,isRtl:n}=e;const a=T(),[i,o]=Ve.useState(!1),l=Ve.useRef(null),s="emoji-picker-"+a;return 0===_a.length||rt()?null:x(Ve.Fragment,null,x(Aa,{active:i,disabled:r,ref:l,"aria-expanded":i,"aria-controls":s,"aria-label":"open emoji picker",onPress:()=>o(e=>!e)},x(Cn,null)),i&&x(pr,{id:s,"aria-label":"emoji picker",onSelect:e=>{o(!1),t(e),Math.random()<.1&&at("Emoji_inserted_from_picker",{emoji:e})},onClose:()=>o(!1),menuButtonRef:l,css:R("bottom:3.5em;right:",n?0:"3em",";")},_a.map((e,t)=>x(Ia,{key:t},e.map(e=>x(hr,{key:e,value:e,text:e,"aria-label":"insert "+e},e))))))},Ba=c("label",{target:"e1e9gyrb2"})("color:",e=>{let{theme:t}=e;return t.colors.textPrimaryColor},";cursor:",e=>{let{disabled:t}=e;return t?"not-allowed":"pointer"},";display:flex;align-items:center;"),ja=c("span",{target:"e1e9gyrb1"})("display:flex;align-items:center;justify-content:center;&:focus{outline-style:",e=>e.focusVisible?"auto":"none",";}"),Oa=c("span",{target:"e1e9gyrb0"})("display:inline-block;",e=>{let{theme:t}=e;return R("margin-",t.isRtl?"right":"left",":5px;")},";"),Fa=e=>{let{disabled:t,icon:r,label:n,fileInputRef:a}=e;const i=v(),o=(l=()=>a.current.click(),{onKeyPress:Ve.useCallback(e=>{let{key:t}=e;"Enter"!==t&&" "!==t||l()},[l])});var l;const s=z(),c=(e=>e||gr)(r);return Ve.createElement(Ba,{flexFit:!0,htmlFor:"fileupload",disabled:t},Ve.createElement(ja,or({role:"button","aria-label":"Send a file",tabIndex:"0"},o,s),Ve.createElement(c,{color:t?i.colors.tertiaryTextColor:"currentColor","aria-hidden":!0}),n?Ve.createElement(Oa,null,n):null))},Ha=e=>R("padding:0;color:",e.colors.tertiaryTextColor,";border-radius:",e.borderRadius.md,";transition:background-color 100ms ease-in-out;margin-left:",e.spaces.space1,";opacity:1;&:disabled{svg *{fill:",e.colors.tertiaryTextColor,";}}svg *{transition:fill 100ms ease-in-out;will-change:fill;}"),Va=c("div",{target:"e1jhn5ln3"})("position:absolute;top:0;height:100%;display:flex;align-items:flex-end;padding-bottom:",e=>{let{theme:t}=e;return t.spaces.space4},";",e=>{let{position:t,dense:r}=e;return t+": "+(r?"0.75em":"10px")},";color:",e=>{let{theme:t}=e;return t.colors.primaryTextColor},";"),Da=c(Y,{target:"e1jhn5ln2"})({name:"bjn8wh",styles:"position:relative"}),qa=c(_,{target:"e1jhn5ln1"})("display:flex;color:",e=>{let{theme:t,disabled:r}=e;return r?t.colors.tertiaryTextColor:t.colors.primaryTextColor},";will-change:background-color;background-color:",e=>{let{theme:t,active:r}=e;return r?t.colors.pressedElement:"transparent"},";transition:background-color 150ms ease-in-out;opacity:1;svg{display:block;}",e=>{let{active:t,theme:r}=e;return t&&R("path#changeable{fill:",r.colors.primaryTextColor,";stroke:none;}g#attachment-squircle path:not(#changeable){stroke:",nt(.15,r.colors.surface),";}")}," ",Ra,";"),Wa=c("input",{target:"e1jhn5ln0"})({name:"eivff4",styles:"display:none"}),Na=e=>{const{messageDraft:t,initialMessageDraft:r,mobile:n,rtl:a,textInputMaxLength:i}=e.getApplicationState();return{rtl:a,messageDraft:t,initialMessageDraft:r,mobile:n,textInputMaxLength:i,chatId:Ge(e),reconnecting:pt(e),allowInput:ht(e),allowFileUpload:et(e),isFileUploadPossible:tt(e),videoCallButtonState:gt(e),showAlternativeUploadOption:!n&&et(e),showEmojiPicker:ft(e)}};function Za(e){let{onSendMessage:t,onHeightChange:r,onFocusChange:n,...a}=e;const i=O(),{chatId:o,messageDraft:l,initialMessageDraft:c,reconnecting:u,allowInput:d,allowFileUpload:m,isFileUploadPossible:p,mobile:h,videoCallButtonState:g,rtl:f,showAlternativeUploadOption:b,showEmojiPicker:v,textInputMaxLength:C}=j(Na),y=Ve.useRef(null),w=Ve.useRef(null),L=Ve.useRef([0,0]),E=Ve.useRef(null),k=W("text-composer"),S=k.get(),[z,A]=Ve.useState(S||l||c||""),[P,B]=Ve.useState(!1),[F,H]=Ve.useState(!1),V=Qr(u),D=N(),q="attachment-menu-"+T(),Y=f?"rtl":"ltr",{document:G}=s.useFrame(),Q=Ve.useCallback((e,t)=>{it(i,e,t)},[i]),X=Ve.useCallback(e=>{ot(i,o,e)},[i,o]),J=Ve.useCallback(e=>{lt(i,o,e)},[i,o]),$=Ve.useCallback(()=>{st(i,{source:"message_box",...ct(i)})},[i]),ee=Ve.useCallback(e=>{ut(i,o,{text:e})},[i,o]),te=Ve.useCallback(()=>ee(i.localize("screenshot_permission_error")),[i,ee]),re=Ve.useCallback(()=>{i.emit(dt)},[i]),ne=Ve.useCallback((e,t)=>e.forEach(e=>Q(e,t)),[Q]),ae=fr({handleScreenshotUpload:e=>{ne([e],"screenshot"),at("snapshot_selected",{})},handleAttachmentAdd:()=>E.current.click(),handleMenuClose:()=>B(!1),handlePermissionDenied:te,handleError:e=>at("snapshot_cancel",{reason:e})}),ie=Ve.useCallback(()=>{H(!0),n&&n(!0)},[n]),oe=Ve.useCallback(()=>{H(!1),n&&n(!1)},[n]),le=Ve.useCallback(e=>{A(""),X(e),J(null),k.clear(),t&&t()},[X,t,J,k]),se=Ve.useCallback(e=>{ne(lr(e.target.files))},[ne]);Ve.useEffect(()=>{const e=y.current,t=()=>{L.current=[e.selectionStart,e.selectionEnd]};return e.addEventListener("blur",t),()=>e.removeEventListener("blur",t)},[]),Ve.useEffect(()=>{const e=e=>{const t=Array.from(e.clipboardData.items);if(t.some(e=>{let{type:t}=e;return"text/plain"===t}))return;const r=t.reduce((e,t)=>{const r=t.getAsFile();return r&&e.push(r),e},[]);r.length&&(e.preventDefault(),ne(r,"clipboard"))};return m&&F&&p&&G.addEventListener("paste",e),()=>G.removeEventListener("paste",e)},[m,F,p,G,Q,ne]);const ce=e=>{const[t,r]=L.current;We.flushSync(()=>{A(n=>{const a=n.slice(0,t)+e+n.slice(r,n.length);return k.set(a),a})}),We.flushSync(()=>{y.current.focus();const r=t+e.length;y.current.setSelectionRange(r,r)})},ue=D?{id:"chat-widget-text-input"}:{};return x(M,null,e=>x(Z,or({},a,{value:z,active:d,disabled:u&&!V,mobile:h,defaultValue:S,onSend:le,onBeforeSend:re,onValueChange:e=>{A(e),k.set(e),J(e)}}),x(Da,{verticalAlign:"center"},g.visible&&x(Va,{position:"left",dense:g.visible},x(I,{placement:"top",description:"Start a video call"},x(_,{onPress:$,disabled:g.disabled,css:e=>({opacity:1,color:g.disabled?e.colors.tertiaryTextColor:e.colors.primaryTextColor}),"aria-label":"Start a video call"},x(Tn,null)))),x(hn,or({ref:y,autoFocus:U(D),css:e=>(e=>{let{disabled:t,leftIcons:r,mobile:n,theme:a}=e;return R("font-family:inherit;padding:14px ",a.isRtl&&!n&&"modern"!==a.name?"125px":"115px"," 14px ",r?"3.75em":"10px",";overflow-y:auto;margin:0;transition:box-shadow 0.1s ease-in-out;color:",t?a.colors.tertiaryTextColor:a.colors.primaryTextColor,";background-color:",t?a.colors.disabled:mt(.012,a.colors.surface),";border-radius:","modern"!==a.name?"12px":"0",";border:1px solid ",a.colors.borderSubtle,";box-shadow:",a.boxShadow.xl,";&:focus{background-color:",a.colors.surface,";border-color:",a.colors.cta,";}&:disabled{cursor:not-allowed;}&::placeholder{color:",a.colors.secondaryTextColor,";}")})({theme:e,mobile:h,disabled:u&&!V,leftIcons:g.visible}),disabled:u&&!V,flexFill:!0,minRows:1,onClick:()=>{F||y.current.focus()},onBlur:oe,onFocus:ie,onHeightChange:r,placeholder:e("embedded_textarea_placeholder"),"aria-label":e("embedded_textarea_placeholder"),enterKeyHint:"send",dir:z?"auto":Y},"number"==typeof C&&{maxLength:C},ue)),x(Va,{position:"right",dense:g.visible},v&&x(Pa,{onEmojiPicked:ce,disabled:u&&!V,isRtl:f}),m&&!b&&x(Fa,{disabled:!p,handleFileChange:se,fileInputRef:E}),b&&x(qa,{"aria-label":"Add an attachment","aria-expanded":P,"aria-controls":q,ref:w,onPress:()=>B(!P),disabled:!p,active:P},x(gr,{"aria-hidden":"true"})),P&&x(br,{localize:e,setOpenAttachMenu:B,handleSelected:ae,inputRef:y,isRtl:f}),x(rn,{flexFit:!0,icon:x(K,null),css:Ha,"aria-label":"Send a message"}),!D&&x(Wa,{multiple:!0,onChange:se,type:"file",value:"",id:"fileupload",ref:E,disabled:!p})))))}const Ua=c("span",{displayName:"DividerLabel",target:"eceo2x80"})({name:"1rpc86p",styles:"padding:4px 8px;font-size:12px;position:relative;padding:0 8px;&:before,&:after{content:'';width:50vw;height:0;border-top:1px solid;border-top-color:inherit;position:absolute;top:50%;}&:before{right:100%;}&:after{left:100%;}"}),Ka=(e,t)=>{const r=new Date(e);return r.toLocaleDateString()===(new Date).toLocaleDateString()?t.today(r):(e=>{const t=new Date;return t.setDate(t.getDate()-1),e.toLocaleDateString()===t.toLocaleDateString()})(r)?t.yesterday(r):r.toLocaleDateString([],{year:"numeric",month:"2-digit",day:"2-digit"})},Ya=t=>{let{rootRef:r,rootMargin:n,threshold:a,intersectionHandler:i}=t;if(!("IntersectionObserver"in window)||!("IntersectionObserverEntry"in window))return;const o=Ve.useRef(null),l=Ve.useRef([]),s=e(i);return Ve.useEffect(()=>(o.current=new IntersectionObserver((e,t)=>{s.current&&s.current(e,t)},{root:r.current,rootMargin:n,threshold:a}),l.current.forEach(e=>o.current.observe(e)),l.current=[],()=>o.current.disconnect()),[n,a,r,s]),G(()=>({add(e){o.current?o.current.observe(e):l.current.push(e)},remove(e){o.current?o.current.unobserve(e):l.current=l.current.filter(t=>t!==e)}}))},Ga=(e,t,r)=>{const n=bt(t).sort((e,t)=>e.timestamp-t.timestamp),a=Qe(t=>t.node===e,n);if(a>-1)return{currentTimestamp:n[a].timestamp,previousTimestamp:a>0?n[a-1].timestamp:r}},Qa=(e,t)=>{const r=Ve.useRef({beginingOfTime:t,currentTimestamp:0,subscribers:[],dividers:{}}),n=e=>{const t={timestamp:e,direction:e>r.current.currentTimestamp?"down":"up"};r.current.currentTimestamp=e,r.current.subscribers.forEach(e=>e(t))},a=Ya({rootRef:e,intersectionHandler:e=>{const t=((e,t,r)=>{const[n]=e.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top);if(n){const e=Ga(n.target,t,r);return e&&e.previousTimestamp}{const[n]=e.filter(e=>e.boundingClientRect.top<=e.rootBounds.top).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top).reverse();if(n){const e=Ga(n.target,t,r);return e&&e.currentTimestamp}}})(e,r.current.dividers,r.current.beginingOfTime);t&&n(t)},threshold:.2});return Ve.useEffect(()=>{const e=bt(r.current.dividers).map(e=>e.timestamp),t=Math.max.apply(Math,e.concat([r.current.beginingOfTime]));r.current.currentTimestamp=t,r.current.subscribers.forEach(e=>e({timestamp:t,direction:"up"}))},[]),G(()=>({add:e=>{r.current.dividers[e.timestamp]=e,a&&a.add(e.node)},remove:e=>{a&&a.remove(e.node),delete r.current.dividers[e.timestamp]},subscribe:e=>{r.current.subscribers.push(e)},unsubscribe:e=>{r.current.subscribers=r.current.subscribers.filter(t=>t!==e)},setBeginingOfTime:e=>{r.current.beginingOfTime=e},currentTimestamp:()=>r.current.currentTimestamp,setToNewestTimestamp:()=>{const[e]=Object.keys(r.current.dividers).map(Number).sort((e,t)=>t-e);n(e)}}))},Xa=Ve.createContext(null),Ja=e=>{let{children:t,rootRef:r,beginingOfTime:n,isOnBottomSource:a}=e;const i=Qa(r,null!=n?n:0);return Ve.useEffect(()=>{i.setBeginingOfTime(null!=n?n:0)}),Ve.useEffect(()=>a.subscribe(e=>{e&&i.setToNewestTimestamp()}),[a,i]),Ve.createElement(Xa.Provider,{value:i},t)},$a=e=>{const t=Ve.useContext(Xa);Ve.useEffect(()=>{const r={timestamp:e.timestamp,node:e.nodeRef.current};return t.add(r),()=>{t.remove(r)}},[])},ei=c("div",{target:"ehmqpie0"})({name:"1wai6wj",styles:"height:20px;margin:16px -0.5em;text-align:center;overflow:hidden"}),ti=e=>{let{timestamp:t}=e;const r=Ve.useRef(null);return $a({timestamp:t,nodeRef:r}),Ve.createElement(M,null,e=>Ve.createElement(ei,{ref:r},Ve.createElement(Ua,null,Ka(t,{today:e=>e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),yesterday:()=>e("yesterday")}))))},ri=c("div",{displayName:"NewMessageHorizontalDivider",target:"eacid5n1"})({name:"gbe43y",styles:"height:27px;margin:16px -0.5em;text-align:center;overflow:hidden"}),ni=c(h,{target:"eacid5n0"})({name:"1c0l2b2",styles:"display:inline-flex;padding:2px 12px;font-weight:normal;box-shadow:none;height:auto;&:before,&:after{border-top:0;}"}),ai=e=>{let{unseenCount:t,setScrollTargetNode:r}=e;const n=Ve.useRef(null),[a,i]=Ve.useState(!0);return Q(()=>{n.current&&r(n.current)}),Ve.useEffect(()=>{const e=setTimeout(()=>i(!1),625);return()=>clearTimeout(e)},[]),Ve.createElement(M,null,e=>Ve.createElement(ri,{ref:n},Ve.createElement(ni,{animated:a,minScale:.9,maxScale:1.05},e(1===t?"new_message":"new_messages"))))},ii=c("div",{target:"e5cxvfk0"})({name:"iwp08z",styles:"display:flex;justify-content:center;font-size:0.9em"}),oi=c("div",{target:"e1lbo1s41"})({name:"175oc9c",styles:"display:flex;justify-content:center;flex-shrink:0"}),li=c("div",{displayName:"IconLabel",target:"e1lbo1s40"})("display:flex;justify-content:center;align-items:center;",e=>{let{size:t,theme:r}=e;return{width:t,height:t,borderRadius:r.borderRadius.round,backgroundColor:r.colors.surfaceDecorative}},";"),si=e=>{let{size:t="64px",children:r,...n}=e;return Ve.createElement(oi,null,Ve.createElement(li,or({size:t},n),r))};const ci={name:"jubs0u",styles:"margin:0;background:transparent"},ui=e=>R("position:absolute;z-index:1500;width:calc(100% - 2rem);max-width:290px;max-height:calc(100% - 2rem);top:1em;left:50%;color:",e.colors.primaryTextColor,";background:",e.colors.surface,";box-shadow:",e.boxShadow.lg,";padding:",1*e.spaceBase,"px;border-radius:",e.borderRadius.xl,";overflow-y:auto;"),di=c("div",{target:"e1yhh5l71"})({name:"4hray5",styles:"display:flex;flex-direction:row-reverse"}),mi=c("div",{target:"e1yhh5l70"})("padding:",e=>{let{theme:t}=e;return 1*t.spaceBase},"px;padding-top:0;"),pi=Ve.forwardRef((function(e,t){let{onClose:r=De,children:n,"aria-label":a,"aria-labelledby":i,isPreview:o,...l}=e;ae({isDisabled:o});const{overlayProps:s}=ie({isOpen:!0,isDismissable:!0,onClose:r},t),{modalProps:c}=oe(),{dialogProps:u}=function(e,t){let{role:r="dialog"}=e,n=X();n=e["aria-label"]?void 0:n;const{document:a}=J();return Ve.useEffect(()=>{if(t.current&&!t.current.contains(a.activeElement)){$(t.current);let e=setTimeout(()=>{a.activeElement===t.current&&(t.current.blur(),$(t.current))},500);return()=>{clearTimeout(e)}}},[t]),{dialogProps:Ze({},ee(e,{labelable:!0}),{role:r,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||n}),titleProps:{id:n}}}({"aria-label":a,"aria-labelledby":i},t);return x(ce,{contain:!0,autoFocus:!0,restoreFocus:!0},x("div",or({},le(l,s,c,u),{ref:t,css:ui,id:se}),x(di,null,x(_,{css:ci,onPress:r,"aria-label":"Close modal"},x(d,{"aria-hidden":!0}))),x(mi,null,n)))})),hi=e=>{let{onClose:t=De,shown:r,children:n,...a}=e;const i=Ve.useRef(null),o=N(),l=te();return Ve.useEffect(()=>l.setModalOpen(r),[r,l]),x(ne,null,x(re,{shown:r,onPress:t,exitDelay:25}),x(D,{component:null},r&&x(qn,{nodeRef:i},x(pi,or({onClose:t,ref:i,isPreview:o},a),n))))},gi=c("p",{target:"ev8wfi81"})({name:"1azakc",styles:"text-align:center"}),fi=c(_,{target:"ev8wfi80"})(e=>{let{size:t}=e;return t&&R("width:",t,"px;height:",t,"px;")}," border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";background-color:transparent;&:hover{background-color:",e=>{let{theme:t}=e;return t.colors.lighterOppositeTitleBarColor},";}"),bi=e=>{let{localize:t,closeChat:r,onModalStateChange:n,iconButtonSize:a}=e;const[i,o]=Ve.useState(!1),[l,s]=Ve.useState(!1),c=N(),u=()=>{o(!1),n({isOpen:!1})};return Ve.createElement(Ve.Fragment,null,Ve.createElement(I,{description:t("close_chat")},Ve.createElement(fi,{onPress:()=>{o(!0),n({isOpen:!0})},"aria-label":t("close_chat"),size:a},Ve.createElement(d,{"aria-hidden":!0}))),Ve.createElement(hi,{shown:i,onClose:u,"aria-labelledby":"close_chat_confirm_label"},Ve.createElement(si,{"aria-hidden":!0},Ve.createElement(yn,null)),Ve.createElement(gi,{id:"close_chat_confirm_label"},t("leave_chat_confirm")),Ve.createElement(ii,null,Ve.createElement(vr,{destructive:!0,label:t("close_chat"),submitting:l,onClick:()=>{c?u():(s(!0),r().then(()=>{s(!1),u()}).catch(()=>{s(!1)}))}}))))},vi=c("div",{target:"e8t2lg23"})("width:",e=>{let{isVisible:t}=e;return t?100:0},"%;height:",e=>{let{isVisible:t}=e;return t?100:0},"%;position:absolute;top:0;left:0;z-index:101;"),xi=c("div",{target:"e8t2lg22"})("position:relative;top:",e=>{let{topOffset:t}=e;return t},"px;left:0;width:100%;height:",e=>{let{topOffset:t}=e;return"calc(100% - "+t+"px)"},";background-color:",e=>{let{theme:t}=e;return vt(t.colors.surface,.93)},";padding:",e=>{let{theme:t}=e;return t.spaces.space3},";pointer-events:none;"),Ci=c("div",{target:"e8t2lg21"})("display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;border:2px dashed ",e=>{let{theme:t}=e;return t.colors.border},";border-radius:",e=>{let{theme:t}=e;return t.borderRadius.lg},";color:",e=>{let{theme:t}=e;return t.colors.primaryTextColor},";"),yi=c("h1",{target:"e8t2lg20"})(e=>{let{theme:t}=e;return t.typography.subheading},";"),wi=e=>{let{topOffset:t}=e;const r=O(),n=j(e=>e.getApplicationState("dropAreaVisible")),[a,i]=Ve.useState(!1),o=Ve.useCallback(e=>it(r,e,"drag"),[r]),l=Ve.useCallback(()=>r.setApplicationState({dropAreaVisible:!1}),[r]),s=e=>{e.preventDefault(),e.stopPropagation()};return Ve.createElement(ne,null,Ve.createElement(vi,{onDragLeave:()=>{l()},onDragOver:s,onDrop:e=>{var t;s(e);const r=null==(t=e.dataTransfer)?void 0:t.files;r&&Array.prototype.forEach.call(r,o),l()},isVisible:n||a},Ve.createElement(D,{appear:!0,component:null},n&&Ve.createElement(xr,{length:300,onEnter:()=>i(!0),onExited:()=>i(!1)},Ve.createElement(xi,{topOffset:t},Ve.createElement(Ci,null,Ve.createElement(xn,null),Ve.createElement(M,null,e=>Ve.createElement(yi,null,e("drop_files_here")))))))))},Li=c("h2",{target:"emwx8nd0"})({name:"xvo3ou",styles:"text-align:center;font-size:16px;font-weight:normal"}),Ei=e=>{let{email:t,localize:r,sent:n,open:a,onClose:i,onSubmit:o,mobile:l}=e;const s=W("email-transcript"),[c,u]=Ve.useState(()=>({email:t}));return Ve.useEffect(()=>{if(a){const e=s.get();u(e||{email:t})}},[s,t,a]),Ve.createElement(hi,{shown:a,onClose:i,"aria-labelledby":n?"email-transcript-sent-label":"email-transcript-not-sent-label"},a&&(n?Ve.createElement(Ve.Fragment,null,Ve.createElement(si,{"aria-hidden":!0},Ve.createElement(Cr,null)),Ve.createElement(Li,{id:"email-transcript-sent-label","aria-live":"assertive",textWrap:!0},r("chat_transcript_sent").replace(/%s/g,t||"")),Ve.createElement(ii,null,Ve.createElement(F,{autoFocus:!0,capitalize:!0,onClick:i},r("hide")))):Ve.createElement(Ve.Fragment,null,Ve.createElement(si,{"aria-hidden":!0},Ve.createElement(Cr,null)),Ve.createElement(Li,{id:"email-transcript-not-sent-label"},r("send_transcript_to_email")),Ve.createElement(yr,{id:"email_transcript",initialValues:c,mobile:l,onSubmit:e=>(Math.random()<.01&&at("chat_transcript_ordered",{}),o(e.email).then(()=>s.destroy()).catch(()=>({[Er]:r("lost_connection")}))),submitLabel:r("send"),validate:e=>e.email?{}:{email:r("survey_fill_in_required_fields")}},Ve.createElement(Y,null,Ve.createElement(wr,{onChange:e=>{let{values:t,dirty:r}=e;r&&s.set(t)}}),Ve.createElement(Lr,{ariaLabel:"Enter your email address",name:"email",required:!0,serverName:"",label:"",type:"email",localize:B}))))))},ki=c("div",{target:"eleibs71"})("display:flex;position:relative;width:44px;height:24px;border-radius:24px;background-color:",e=>{let{theme:t}=e;return t.colors.inactiveElement},";will-change:background-color;transition:background-color 0.2s linear;cursor:pointer;outline-offset:2px;&::after{content:'';position:absolute;height:16px;width:16px;border-radius:16px;top:4px;left:4px;background-color:",e=>{let{theme:t}=e;return t.colors.grayscale[0]},";will-change:left;transition:left 0.2s ease-in;}",e=>{let{highlighted:t,theme:r}=e;return t&&R("background-color:",r.colors.inactiveElementHover,";")},";"),Si=c("input",{target:"eleibs70"})("position:absolute;left:2137px;&:checked+div{background-color:",e=>{let{theme:t}=e;return t.colors.success},";",e=>{let{highlighted:t,theme:r}=e;return t&&R("background-color:",r.colors.successHover,";")},";&::after{left:24px;}}"),zi=e=>{let{checked:t,highlighted:r,...n}=e;return Ve.createElement(Ve.Fragment,null,Ve.createElement(Si,or({type:"checkbox",checked:t,highlighted:r},n)),Ve.createElement(ki,{highlighted:r}))};var Ti,Mi;const Ri=e=>R("margin-"+(e.isRtl?"left":"right")+": 8px;",""),_i=c("div",{target:"e1s5h2c82"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),Ai=c(hr,{target:"e1s5h2c81"})({name:"mmvz9h",styles:"font-weight:400"}),Ii=c(Ai,{target:"e1s5h2c80"})({name:"2o6p8u",styles:"justify-content:space-between"}),Pi=e=>e(Ti||(Ti=b(["\n\t&-enter {\n\t\topacity: ",";\n\n\t\t[role='menuitem'],\n\t\t[role='switch'] {\n\t\t\ttransform: translate3d(0, 20%, 0);\n\t\t}\n\t}\n\n\t&-enter-active {\n\t\topacity: 1;\n\t\ttransition: opacity 100ms ease-in-out;\n\t\t[role='menuitem'],\n\t\t[role='switch'] {\n\t\t\ttransform: translate3d(0, 0%, 0);\n\t\t\ttransition: transform 200ms;\n\t\t}\n\t}\n\n\t&-exit {\n\t\topacity: 1;\n\t}\n\n\t&-exit-active {\n\t\topacity: 0;\n\t\ttransition: opacity 100ms ease-in-out;\n\t}\n"])),"0.00001"),Bi=e=>{var t;const r=Ge(e),{active:n,properties:a}=e.getChat(r),{transcriptSentTo:i}=a,{isPreview:o,rtl:l,muted:s,pendingOpenAIRunId:c}=e.getApplicationState(),u=de(e,"floating-menu"),d=r===wt||r===Lt,m="connected"===e.getConnectionState();return{chatId:r,isPreview:o,muted:s,transcriptSentTo:i,isRtl:l,enableTranscript:!o&&(n||a.ended),showTranscript:yt("emailTranscript",e).enabled,chatTransfer:u,customerEmail:null!=(t=e.getSessionUser().email)?t:"",showClearChat:d,isClearChatDisabled:!(n||a.ended)||!m||!!c}},ji=e=>{let{alignedToSide:t,onMenuToggle:r,iconButtonSize:n}=e;const a=O(),{chatId:i,isPreview:o,customerEmail:l,enableTranscript:c,muted:u,showTranscript:d,chatTransfer:m,transcriptSentTo:p,isRtl:h,showClearChat:C,isClearChatDisabled:y}=j(Bi),w=a.localize,[L,E]=Ve.useState(!1),[k,S]=Ve.useState(!1),z=s.useFrame(),M=v(),A=te(),P="floating-menu-"+T();Nr(z);const B=Ve.useRef(null),F=!!p,H=Ve.useCallback(()=>{o||(a.requestUpdateChat(i,{active:!1}),xt(a))},[a,i,o]),V=Ve.useCallback(e=>a.requestUpdateChat(i,{properties:{transcriptSentTo:e}}),[a,i]),q=Ve.useCallback(()=>{a.setApplicationState({muted:!a.getApplicationState("muted")})},[a]),W=Ve.useCallback(e=>{switch(e){case"sounds":return void q();case"transcript":return E(!1),void S(!0);case"identityTransfer":return at("chat_app_button_clicked",{ui_source:"menu"}),E(!1),void m.showMoment();case"clearChat":return E(!1),void H()}},[q,m,H]);return ue(()=>{L&&Math.random()<.01&&at("meatballs_menu_opened",{})},[L]),Ve.useEffect(()=>A.setMenuOpen(L),[L,A]),Ve.useEffect(()=>{null==r||r(L)},[L,r]),x(Ve.Fragment,null,x(I,{isDisabled:L,description:w("theme_options")},x(_,{css:R("padding:0;border-radius:",M.borderRadius.round,";background-color:",L?M.colors.lighterOppositeTitleBarColor:"transparent",";",n&&R("width:",n,"px;height:",n,"px;")," &:hover{background-color:",M.colors.lighterOppositeTitleBarColor,";}"),ref:B,onPress:()=>E(e=>!e),active:L,"aria-label":L?"Close menu":"Open menu","aria-expanded":L,"aria-controls":P,"aria-haspopup":"menu"},x(vn,{"aria-hidden":!0}))),x(g,null,e=>{let{css:r}=e;return x(D,{component:null},L&&x(f,{classNames:Pi(r),timeout:200},x(pr,{id:P,menuButtonRef:B,onClose:()=>E(!1),onSelect:W,css:r(Mi||(Mi=b(["\n\t\t\t\t\t\t\t\t\t\ttop: 3em;\n\t\t\t\t\t\t\t\t\t\t",": ",";\n\t\t\t\t\t\t\t\t\t"])),h?"right":"left",t?"0.5em":"2em")},C&&x(Ai,{text:w("clear_chat"),value:"clearChat",disabled:y},x(En,{css:Ri(M),"aria-hidden":!0}),w("clear_chat")),d&&x(Ai,{disabled:!c,text:w("send_transcript"),value:"transcript"},x(Cr,{css:Ri(M),"aria-hidden":!0}),w("send_transcript")),m.available&&x(Ai,{text:Ct,value:"identityTransfer",disabled:m.disabled},x(kr,{css:Ri(M),"aria-hidden":!0}),Ct),x(Ii,{role:"menuitemcheckbox",text:w(u?"unmute":"mute"),"aria-label":u?w("sounds")+" "+w("unmute"):w("sounds")+" "+w("mute"),value:"sounds","aria-checked":!u},e=>{let{highlighted:t}=e;return x(Ve.Fragment,null,x(_i,null,x(u?Ln:zn,{css:Ri(M),"aria-hidden":!0}),x("span",{"aria-hidden":!0},w("sounds"))),x(zi,{checked:!u,highlighted:t,onChange:()=>!u,"aria-hidden":!0,tabIndex:-1}))}))))}),x(Ei,{email:F?p:l,localize:w,onClose:()=>S(!1),onSubmit:V,sent:F,open:k}))};var Oi;const Fi=me(Oi||(Oi=b(["\n 0%, 100% { opacity: 0; }\n 12.5%, 18.75% { opacity: 1; }\n 25% { opacity: 0; }\n"]))),Hi=pe("path",{target:"e16rhf7m5"})("opacity:0;fill-rule:nonzero;fill:",e=>{let{theme:t}=e;return t.colors.caution},";animation:",Fi," ",4e3,"ms infinite;animation-delay:",e=>{let{index:t}=e;return 500*t},"ms;"),Vi=pe("path",{target:"e16rhf7m4"})("fill:",e=>{let{theme:t}=e;return t.colors.cautionDesaturated},";fill-rule:nonzero;"),Di=pe("svg",{target:"e16rhf7m3"})("width:",e=>{let{size:t}=e;return t},"px;height:",e=>{let{size:t}=e;return t},"px;background-color:",e=>{let{theme:t}=e;return t.colors.cautionDimmed},";border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";transition-property:height,width;transition-duration:200ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.easings.smooth},";"),qi=pe("span",{target:"e16rhf7m2"})("position:absolute;font-size:",e=>{let{size:t}=e;return t},";font-weight:bold;color:",e=>{let{theme:t}=e;return t.colors.primaryTextColor},";"),Wi=pe(fn,{target:"e16rhf7m1"})("border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";height:65%;width:65%;color:",e=>{let{theme:t}=e;return t.colors.caution},";position:absolute;"),Ni=pe("div",{target:"e16rhf7m0"})({name:"12a04nj",styles:"display:flex;align-items:center;justify-content:center;height:100%"}),Zi=["M19.5705468,3.45623442 C19.7620907,2.93822923 20.3372939,2.67358006 20.8552991,2.86512396 C22.9038337,3.62261502 24.7451041,4.85246011 26.2335271,6.44613909 C26.6104949,6.84976478 26.5888845,7.48256086 26.1852588,7.8595287 C25.7816331,8.23649654 25.148837,8.21488609 24.7718692,7.81126041 C23.4952259,6.44433746 21.9165812,5.38990871 20.1616573,4.7409867 C19.6436521,4.5494428 19.3790029,3.97423961 19.5705468,3.45623442 Z","M27.3207289,9.52679446 C27.8196172,9.28987905 28.416104,9.50225003 28.6530194,10.0011383 C29.5360597,11.860614 29.9999989,13.8987744 29.9999989,16.0054814 C29.9999587,16.1102462 29.998766,16.2148849 29.9964236,16.3193849 C29.9840472,16.8715309 29.5264113,17.3091007 28.9742652,17.2967242 C28.4221192,17.2843478 27.9845494,16.8267119 27.9969259,16.2745658 C27.9989392,16.1847469 27.9999645,16.094793 27.999999,16.0050972 C27.9999999,14.1970335 27.6027314,12.451773 26.8463851,10.8590849 C26.6094697,10.3601966 26.8218406,9.76370987 27.3207289,9.52679446 Z","M27.3511714,19.903315 C27.5307268,19.3810332 28.0996783,19.1031985 28.6219601,19.2827539 C29.144242,19.4623094 29.4220766,20.0312609 29.2425212,20.5535427 C28.5321344,22.6198802 27.3446267,24.4882501 25.7852445,26.0124492 C25.3902901,26.3984926 24.7571663,26.3912688 24.371123,25.9963144 C23.9850796,25.60136 23.9923035,24.9682362 24.3872579,24.5821928 C25.7246897,23.2749364 26.7426703,21.6732926 27.3511714,19.903315 Z","M21.3889964,26.7250402 C21.882275,26.476656 22.4835114,26.6751821 22.7318956,27.1684606 C22.9802798,27.6617392 22.7817537,28.2629757 22.2884751,28.5113599 C20.3538999,29.4854908 18.2127015,30 16,30 L15.98,29.999 C15.6967775,29.9995354 15.4172429,29.9908266 15.1389094,29.9739194 L14.722341,29.9424178 C14.1723067,29.8926106 13.7667926,29.4063429 13.8165999,28.8563087 C13.8664072,28.3062744 14.3526748,27.9007603 14.902709,27.9505676 C15.2594229,27.9828691 15.6188902,27.9994089 15.980449,27.9999844 L15.998,28 C17.7629055,28 19.4696394,27.6201462 21.0312431,26.8977985 L21.3889964,26.7250402 Z","M5.4534611,23.6674336 C5.87377631,23.3091689 6.50494,23.3594708 6.86320467,23.779786 C8.07655851,25.2032897 9.60667954,26.3287063 11.3290945,27.0572765 C11.8377459,27.2724327 12.0756707,27.8591947 11.8605145,28.3678461 C11.6453583,28.8764975 11.0585963,29.1144224 10.5499449,28.8992662 C8.53985515,28.0490114 6.75565081,26.7367144 5.34110868,25.0771772 C4.98284401,24.656862 5.0331459,24.0256983 5.4534611,23.6674336 Z","M2.98079926,14.1099821 L3.09760847,14.1111469 C3.64863196,14.1484505 4.06508417,14.6253839 4.02778051,15.1764074 C4.00961959,15.4446678 4.00033484,15.7143633 4.00001034,15.9840207 C4.00001034,17.6123539 4.31765848,19.1807157 4.92865473,20.6375041 C5.14226324,21.1468074 4.90255525,21.7328432 4.39325195,21.9464517 C3.88394865,22.1600602 3.29791284,21.9203522 3.08430433,21.4110489 C2.37090322,19.7100983 2.00001034,17.8788457 2.00001034,15.9828119 C2.00038956,15.6676818 2.01119776,15.3537347 2.03234795,15.0413189 C2.06965161,14.4902954 2.54658499,14.0738432 3.09760847,14.1111469 L2.98079926,14.1099821 Z","M6.68154653,5.55155085 C7.0936036,5.18381804 7.72574819,5.21974995 8.093481,5.63180702 C8.46121381,6.04386408 8.4252819,6.67600868 8.01322484,7.04374149 C6.61779916,8.28906366 5.52771117,9.84378217 4.83885934,11.5827305 C4.63545954,12.0961961 4.05432527,12.3475542 3.54085963,12.1441544 C3.02739399,11.9407545 2.77603596,11.3596203 2.97943577,10.8461546 C3.78344026,8.81651314 5.05470247,7.00339814 6.68154653,5.55155085 Z","M16.0114299,2.00000457 C16.2212418,2.00017247 16.4305386,2.00496318 16.6392183,2.01435214 C17.1909449,2.03917555 17.6180843,2.50656167 17.5932609,3.05828828 C17.5684375,3.61001488 17.1010514,4.03715432 16.5493248,4.01233091 C16.3700546,4.00426515 16.1901961,4.00014826 16.0106274,4.00000457 C14.2927016,4.00000457 12.6360156,4.356196 11.1103105,5.03785934 C10.6060655,5.26314886 10.0146609,5.03701072 9.78937133,4.53276567 C9.56408181,4.02852061 9.79021996,3.43711598 10.294465,3.21182646 C12.0758241,2.41594054 14.0103883,2.00000457 16.0114299,2.00000457 Z"],Ui=e=>{let{size:t,waitingTime:r}=e;const n=qe.useMemo(()=>!r||r<10?"1rem":r<100?"0.8rem":"0.6rem",[r]),a=Number.isFinite(r);return qe.createElement(Ni,null,qe.createElement(Di,{size:t,viewBox:"0 0 32 32"},qe.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},Zi.map((e,t)=>qe.createElement(qe.Fragment,{key:"segment-"+t},qe.createElement(Vi,{d:e}),qe.createElement(Hi,{d:e,index:t}))))),a?qe.createElement(qi,{size:n},r):qe.createElement(Wi,null))},Ki=qe.memo(Ui),Yi=c("div",{target:"eysggsy6"})("height:fit-content;width:fit-content;z-index:2;&.enter,&.appear{opacity:0;transform:translate(",e=>{let{theme:t}=e;return t.isRtl?"-":""},20,"px, 0px);filter:blur(12px);max-width:0;}&.enter-active,&.enter-done,&.appear-active,&.appear-done{opacity:1;filter:blur(0px);transform:translate(0px, 0px);max-width:",42,"px;transition-property:opacity,filter,transform,max-width;transition-duration:",300,"ms,",300,"ms,",400,"ms,",400,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";}&.exit{opacity:1;filter:blur(0px);transform:translate(0px, 0px);max-width:",42,"px;max-height:",42,"px;}&.exit-active,&.exit-done{opacity:0;filter:blur(12px);transform:translate(",e=>{let{theme:t}=e;return t.isRtl?"-":""},20,"px, 0px);max-width:0;max-height:",30,"px;transition-property:opacity,filter,transform,max-width,max-height;transition-duration:",300,"ms,",300,"ms,",400,"ms,",400,"ms,",400,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";}"),Gi=c("div",{target:"eysggsy5"})("transform:",e=>{let{withOffsetY:t}=e;return t?"translateY(-6px)":"translateY(0)"},";transition-property:transform;transition-duration:",200,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";"),Qi=c("img",{target:"eysggsy4"})("position:relative;height:",e=>{let{avatarSize:t}=e;return t},"px;width:",e=>{let{avatarSize:t}=e;return t},"px;object-fit:contain;flex-shrink:0;display:block;border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";border:0.5px solid ",e=>{let{theme:t}=e;return t.colors.borderSubtle},";background-color:",e=>{let{theme:t}=e;return t.colors.surface},";transform:",e=>{let{withOffsetY:t}=e;return t?"translateY(-6px)":"translateY(0)"},";transition-property:height,width,transform;transition-duration:",200,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";"),Xi=c(he,{target:"eysggsy3"})("height:",e=>{let{avatarSize:t}=e;return t},"px;width:",e=>{let{avatarSize:t}=e;return t},"px;position:relative;overflow:visible;border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";border:0.5px solid ",e=>{let{theme:t}=e;return t.colors.borderSubtle},";",e=>{let{withOffsetX:t,theme:r}=e;return"margin-"+(r.isRtl?"right":"left")+": "+(t?-12:0)+"px;"}," transition-property:height,width,margin-left,margin-right;transition-duration:",200,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";&::after{position:absolute;content:'';background:",e=>{let{availability:t,theme:r}=e;return"online"===t?r.colors.success:r.colors.grayscale[500]},";border:2px solid ",e=>{let{theme:t}=e;return t.colors.surface},";border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";width:",e=>{let{avatarSize:t,theme:r}=e;return 30===t?r.spaces.space3:r.spaces.space4},";height:",e=>{let{avatarSize:t,theme:r}=e;return 30===t?r.spaces.space3:r.spaces.space4},";top:",e=>{let{avatarSize:t}=e;return 30===t?-1:-2},"px;right:",e=>{let{theme:t}=e;return t.isRtl?"auto":-2},"px;left:",e=>{let{theme:t}=e;return t.isRtl?-2:"auto"},"px;transition-property:width,height,top;transition-duration:",200,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";}"),Ji=c(fn,{shouldForwardProp:e=>"isIslandExpanded"!==e&&"isLogoVisible"!==e,target:"eysggsy2"})("padding:6px;border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";z-index:2;color:",e=>{let{theme:t}=e;return t.colors.caution},";background-color:",e=>{let{theme:t}=e;return t.colors.cautionDimmed},";",e=>{let{isIslandExpanded:t,isLogoVisible:r,theme:n}=e;return"margin-"+(n.isRtl?"right":"left")+": "+(t&&r?-15:0)+"px;"}," margin-top:",e=>{let{isIslandExpanded:t,isLogoVisible:r}=e;return t&&r?28:0},"px;",e=>{let{isLogoVisible:t}=e;return!t&&"align-self: flex-start;"}," transition-property:margin-left,margin-right,margin-top;transition-duration:",200,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";"),$i=c("div",{target:"eysggsy1"})("position:relative;flex-shrink:0;display:flex;flex-direction:column;margin-bottom:",e=>{let{showLabel:t,theme:r}=e;return t?r.spaces.space6:0},";transition:margin-bottom ",400,"ms ",e=>{let{theme:t}=e;return t.transitions.smooth},";&::after{position:absolute;content:'min';color:",e=>{let{theme:t}=e;return t.colors.secondaryTextColor},";bottom:-",e=>{let{theme:t}=e;return t.spaces.space5},";left:50%;transform:translateX(-50%);font-size:",ge(10),";font-weight:bold;opacity:",e=>{let{showLabel:t}=e;return t?1:0},";transition:opacity ",400,"ms ",e=>{let{theme:t}=e;return t.transitions.smooth},";}"),eo=c(bn,{target:"eysggsy0"})("margin-left:",e=>{let{theme:t}=e;return t.isRtl?0:t.spaces.space3},";margin-right:",e=>{let{theme:t}=e;return t.isRtl?t.spaces.space3:0},";"),to=e=>{let{isIslandExpanded:t,showAgentAvatar:r,showClock:n,showCompanyLogo:a,showDisconnectedIcon:i,showWaitingTime:o,showWaitingTimeLabel:l,queueWaitingTime:s,agentAvatarPath:c,logoPath:u,availability:d}=e;const m=v(),p=u&&Et(u),h=n?42:36,g=t?36:30;return qe.createElement(qe.Fragment,null,qe.createElement(f,{appear:!0,mountOnEnter:!0,unmountOnExit:!0,in:a,timeout:400},qe.createElement(Yi,null,p?qe.createElement(Gi,{withOffsetY:n},qe.createElement(Sr,{height:h,width:h,fill:m.colors.ctaText,backgroundColor:m.colors.cta,display:"block",roundedLogo:!0})):qe.createElement(Qi,{alt:"Company logo",src:u,avatarSize:h,imgUrl:u,imgAlt:"Organization's logo",withOffsetY:n}))),r&&qe.createElement(Xi,{avatarSize:g,imgUrl:c,imgAlt:"Current agent's avatar",withOffsetX:a,availability:d}),n&&qe.createElement(Ji,{isIslandExpanded:t,isLogoVisible:a}),o&&qe.createElement($i,{showLabel:l},qe.createElement(Ki,{size:g,activeColor:m.colors.caution,bgColor:m.colors.cautionDimmed,segmentBgColor:m.colors.cautionDesaturated,textColor:m.colors.primaryTextColor,waitingTime:null!=s?s:void 0})),i&&qe.createElement(eo,null))},ro=c("span",{target:"e32txdd4"})("font-size:",ge(13),";font-weight:bold;width:min-content;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;&.enter,&.appear{opacity:0;max-height:0rem;transform:translate(0px, -",50,");filter:blur(12px);}&.enter-active,&.appear-active,&.appear-done,&.enter-done{opacity:1;max-height:1.25rem;transform:translate(0px, 0px);filter:blur(0px);transition-property:opacity,max-height,transform,filter;transition-duration:",300,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";}&.exit{opacity:1;max-height:1.25rem;transform:translate(0px, 0px);filter:blur(0px);}&.exit-active,&.exit-done{opacity:0;max-height:0rem;transform:translate(0px, -",50,");filter:blur(12px);transition-property:opacity,max-height,transform,filter;transition-duration:",300,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";}"),no=c("span",{target:"e32txdd3"})("font-size:",ge(13),";color:",e=>{let{theme:t}=e;return t.colors.secondaryTextColor},";width:min-content;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;&.enter,&.appear{opacity:0;max-height:0rem;margin-top:0px;}&.enter-active,&.enter-done,&.appear-active,&.appear-done{opacity:0.7;max-height:1.2rem;margin-top:",e=>{let{theme:t}=e;return t.spaces.space1},";transition-property:opacity,max-height,margin-top;transition-duration:",300,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";}&.exit{opacity:0.7;max-height:1.2rem;margin-top:",e=>{let{theme:t}=e;return t.spaces.space1},";}&.exit-active,&.exit-done{opacity:0;max-height:0rem;margin-top:0px;transition-property:opacity,max-height,margin-top;transition-duration:",300,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";}"),ao=c("div",{target:"e32txdd2"})(e=>{let{isIslandExpanded:t,isVariantWithSubtitle:r,theme:n}=e;const a=t?r?220:180:140,i=t?n.spaces.space5:n.spaces.space3,o=n.spaces.space3;return"\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\theight: max-content;\n\t\tmax-width: "+a+"px;\n\t\tmargin-left: "+(n.isRtl?o:i)+";\n\t\tmargin-right: "+(n.isRtl?i:o)+";\n\n\t\ttransition-property: margin-left, margin-right, width, max-width;\n\t\ttransition-duration: 300ms;\n\t\ttransition-timing-function: "+n.transitions.smooth+";\n\t\twill-change: transform; // hacky, prevents emojis from flickering\n\n\t\t& > "+ro+", & > "+no+" {\n\t\t\tmax-width: "+a+"px;\n\t\t}\n\t"},""),io=c("div",{target:"e32txdd1"})({name:"d3v9zr",styles:"overflow:hidden"}),oo=c("div",{target:"e32txdd0"})("font-size:",ge(13),";line-height:1.2;width:",180,"px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:",7,";&.enter,&.appear{opacity:0;max-height:0rem;transform:translate(0px, ",50,"px);filter:blur(12px);}&.enter-active,&.enter-done,&.appear-active,&.appear-done{opacity:1;max-height:",7,"rem;transform:translate(0px, 0px);filter:blur(0px);transition-property:opacity,max-height,max-width,transform,filter;transition-duration:",300,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";}&.exit{opacity:1;max-height:",7,"rem;transform:translate(0px, 0px);filter:blur(0px);}&.exit-active,&.exit-done{opacity:0;max-height:0rem;transform:translate(0px, ",50,"px);filter:blur(12px);transition-property:opacity,max-height,transform,filter;transition-duration:",300,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.smooth},";}");function lo(e){var t;const r=window.getComputedStyle(e),n=null!=(t=e.textContent)?t:"",a=r.fontWeight+" "+r.fontStyle+" "+r.fontSize+" "+r.fontFamily,i=document.createElement("canvas").getContext("2d");if(!i)return 0;i.font=a;return i.measureText(n).width}const so=e=>{let{isIslandExpanded:t,showTitle:r,showSubtitle:n,showMessage:a,title:i,subtitle:o,message:l,shouldTitleSupportMarkdown:s}=e;const c=qe.useRef(null),u=qe.useRef(null),d=qe.useRef(null),m=qe.useRef(null),h=qe.useMemo(()=>i.replace(//gi,""),[i]),g=qe.useCallback(()=>{const e=t?o?220:180:140;if(a)return e;const i=u.current,l=d.current,s=i?lo(i):0,c=l?lo(l):0;return n&&r?Math.min(e,Math.max(s,c)):r?Math.min(e,s):Math.min(e,c)},[t,a,n,r,i]);return qe.useLayoutEffect(()=>{if(!c.current)return;const e=g();c.current.style.width=e+"px"},[g]),qe.createElement(ao,{isIslandExpanded:t,isVariantWithSubtitle:!!o,ref:c},qe.createElement(f,{in:r,mountOnEnter:!0,appear:!0,timeout:300,nodeRef:u},qe.createElement(ro,{ref:u},s?qe.createElement(kt,{template:h,root:{component:p}}):qe.createElement(p,null,h))),qe.createElement(f,{in:n,mountOnEnter:!0,appear:!0,timeout:300,nodeRef:d},qe.createElement(no,{ref:d},qe.createElement(p,null,o))),qe.createElement(f,{in:a,mountOnEnter:!0,appear:!0,timeout:300,nodeRef:m},qe.createElement(io,null,qe.createElement(oo,{ref:m},qe.createElement(kt,{template:l,root:{component:p}})))))},co={name:"1azakc",styles:"text-align:center"},uo=e=>{let{selectedRate:t,show:r,onClose:n,onSubmit:a}=e;const i=O(),{isPreview:o,mobile:l}=j(e=>e.getApplicationState()),s=j(Ge),c=i.localize,u=qe.useCallback(e=>{let{comment:t}=e;if(o)return Promise.resolve();const r={};return void 0!==t&&(r.rateComment=t),i.requestUpdateChat(s,{properties:r})},[i,s,o]);return x(hi,{shown:r,onClose:n},x(si,null,"good"===t?x(Tr,{label:c("rate_me_confirmation_good")}):x(Mr,{label:c("rate_me_confirmation_bad")})),x("p",{id:"add_rate_comment_label",css:co},c("rate_me_add_comment")),x(yr,{id:"rate_comment",mobile:l,onSubmit:e=>{u({comment:e.comment}),a()},submitLabel:c("button_add_feedback"),validate:e=>e.comment?{}:{comment:c("survey_fill_in_required_fields")},disabled:o},x(Y,null,x(zr,{label:"",serverName:"",type:"textarea",name:"comment",localize:()=>c("rate_me_placeholder"),ariaLabelledBy:"add_rate_comment_label",required:!0}))))},mo={name:"870gjp",styles:"font-size:inherit"},po=c(_,{target:"e1mt5al70"})("&:hover{background-color:",e=>{let{theme:t}=e;return t.colors.lighterOppositeTitleBarColor},";}",e=>{let{active:t,theme:r}=e;return t&&R("path#changeable{fill:",r.colors.primaryTextColor,";}")},";"),ho=e=>{const t=Ge(e),{active:r,properties:{ended:n,rate:a}}=e.getChat(t),i=e.getApplicationState("isPreview");return{isPreview:i,chatRate:a,disabled:!i&&(!n&&!r),chatId:t}},go=e=>{let{source:t,onRatingCommentModalStateChange:r,variant:n="normal"}=e;const a=O(),{chatId:i,chatRate:o,disabled:l,isPreview:s}=j(ho),c=a.localize,[u,d]=Ve.useState(!1),[m,p]=Ve.useState(o),h=Ve.useCallback(e=>{let{rate:r}=e;if(s)return Promise.resolve();const n={};return void 0!==r&&(n.rate=r),a.requestUpdateChat(i,{properties:n},{source:t})},[a,i,t,s]),g=Ve.useCallback(e=>{d(e),null==r||r(e)},[r]),f=Ve.useCallback(e=>()=>{const t=m===e,r=t?null:e;h({rate:r}).catch(()=>p(o)),p(r),t||g(!0)},[m,h,o,g]);Ve.useEffect(()=>{p(o)},[o]);const b=e=>({disabled:l,active:o===e,onPress:f(e),"aria-label":c(o===e?"cancel_"+e+"_rating":"rate_"+e+"_and_open_modal"),id:"good"===e?fe:be}),v=c("good"===o?"rate_me_cancel_tooltip":"rate_me_good_tooltip"),C=c("bad"===o?"rate_me_cancel_tooltip":"rate_me_bad_tooltip");return x(Ve.Fragment,null,x(I,{isDisabled:l,description:v},x(po,b("good"),x("small"===n?Sn:Tr,{css:mo,"aria-hidden":!0}))),x(I,{isDisabled:l,description:C},x(po,b("bad"),x("small"===n?kn:Mr,{css:mo,"aria-hidden":!0}))),x(uo,{show:u,onClose:()=>g(!1),onSubmit:()=>g(!1),selectedRate:m}))},fo=qe.lazy(()=>Le(()=>import("./23.BnFn-x9p.chunk.js"),[])),bo=c("div",{displayName:"TitleBar",target:"e10g0hdx7"})("position:relative;display:flex;justify-content:space-between;z-index:2;padding-left:",e=>{let{theme:t}=e;return t.spaces.space3},";padding-right:",e=>{let{theme:t}=e;return t.spaces.space3},";padding-top:",8,"px;padding-bottom:",40,"px;"),vo=c("div",{target:"e10g0hdx6"})({name:"1q8i72p",styles:"position:absolute;top:0;left:0;width:100%;height:100%;mask:linear-gradient(to bottom, black 70%, rgba(0, 0, 0, 0) 100%);-webkit-mask:linear-gradient(to bottom, black 70%, rgba(0, 0, 0, 0) 100%);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)"}),xo=c(m,{target:"e10g0hdx5"})({name:"21xn5r",styles:"transform:rotate(180deg)"}),Co=c("div",{target:"e10g0hdx4"})("height:",32,"px;display:flex;gap:",e=>{let{theme:t}=e;return t.spaces.space3},";z-index:3;"),yo=c(_,{target:"e10g0hdx3"})("width:",32,"px;height:",32,"px;border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";background-color:transparent;&:hover{background-color:",e=>{let{theme:t}=e;return t.colors.lighterOppositeTitleBarColor},";}"),wo=c("div",{target:"e10g0hdx2"})("display:flex;flex-direction:",e=>{let{isRatingPromptVisible:t}=e;return t?"row":"column"},";align-items:center;color:",e=>{let{theme:t,variant:r}=e;return"reconnecting"===r?t.colors.grayscale[900]:t.colors.primaryTextColor},";width:fit-content;height:fit-content;"),Lo=c("div",{target:"e10g0hdx1"})("position:absolute;z-index:",e=>{let{isExpanded:t,isRatingPromptVisible:r}=e;return r||t?4:2},";left:50%;transform:",e=>{let{isExpanded:t,variant:r,isRatingPromptVisible:n}=e;return t&&"reconnecting"!==r||n?"translate(-50%, 36px)":"translate(-50%, 8px)"},";display:flex;align-items:center;justify-content:center;overflow:hidden;cursor:",e=>{let{canBeToggled:t}=e;return t?"pointer":"default"},";border-radius:24px;background-color:",e=>{let{theme:t,variant:r}=e;return"reconnecting"===r?t.colors.caution:t.colors.surface},";box-shadow:",e=>{let{theme:t}=e;return t.boxShadow.floating},";border:",e=>{let{theme:t,variant:r}=e;return"reconnecting"!==r?"1px solid "+t.colors.borderSubtle:"none"},";transition:width 30ms linear,height 30ms linear,transform 700ms ","linear( 0, -0.00576, 0.00553, 0.0304, 0.0674, 0.115, 0.171, 0.233, 0.301, 0.373, 0.447, 0.522, 0.596, 0.669, 0.739, 0.807, 0.871, 0.93, 0.984, 1.03, 1.08, 1.12, 1.15, 1.17, 1.2, 1.21, 1.23, 1.23, 1.24, 1.23, 1.23, 1.22, 1.21, 1.2, 1.19, 1.17, 1.16, 1.14, 1.12, 1.1, 1.09, 1.07, 1.05, 1.04, 1.02, 1.01, 0.998, 0.987, 0.977, 0.969, 0.962, 0.956, 0.952, 0.948, 0.946, 0.945, 0.945, 0.945, 0.947, 0.949, 0.951, 0.954, 0.958, 0.962, 0.966, 0.97, 0.974, 0.978, 0.982, 0.986, 0.989, 0.993, 0.996, 0.999, 1, 1, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1.01, 1, 1, 1, 1, 1, 1, 1)",",background-color ",300,"ms ",e=>{let{theme:t}=e;return t.transitions.smooth},";&.appear>",wo,"{opacity:0;filter:blur(8px);}&.appear-active>",wo,"{opacity:1;filter:blur(0px);transition-property:opacity,filter;transition-duration:",300,"ms;transition-timing-function:",e=>{let{theme:t}=e;return t.transitions.easeOutStrong},";}"),Eo=c("div",{target:"e10g0hdx0"})("display:flex;align-items:center;min-height:",30,"px;"),ko=e=>{const t=Ge(e),r=t===Lt,n=t===wt,a=t===$e,i=e.getApplicationState("pipMode"),o=yt("logo",e),l=e.getChat(t).active,s=pt(e),c=St(e),u=e.getApplicationState().availability,d=zt(e);return{chatId:t,backButtonTarget:Rr(e),showBackButton:Tt(e)&&!i,showCloseButton:!r&&!n&&e.getChat(t).active&&!i&&!d,agent:Mt(t,e),logoPath:o.enabled?Rt(o.path):void 0,showRatingPrompt:_t(e),isRatingEnabled:yt("rating",e).enabled&&l,showOfflineInformation:At(e),offlineInformation:a?It(e):"",queueInformation:a?c.message:"",showQueueInformation:Pt(e),queueWaitingTime:c.waitingTime,isReconnecting:s,isAvatarEnabled:yt("agentAvatar",e).enabled,hasNoVisibleUserEvents:Bt(e),shouldShowIsland:!jt(e,"ticket")||s,availability:u,isChatActive:l,showMeatballsMenu:!e.getApplicationState().hideMeatballsMenu}},So=e=>{var t,r;let{onMinimize:n,showMinimizedButton:a}=e;const i=O(),o=i.localize,{showCloseButton:l,showBackButton:c,showRatingPrompt:u,showOfflineInformation:d,showQueueInformation:m,isRatingEnabled:p,backButtonTarget:h,chatId:g,agent:b,logoPath:x,offlineInformation:C,queueInformation:y,queueWaitingTime:w,isReconnecting:L,isAvatarEnabled:E,hasNoVisibleUserEvents:k,shouldShowIsland:S,isChatActive:z,availability:T,showMeatballsMenu:M}=j(ko),R=Qr(L),_=s.useFrame(),{focusProps:A}=ve(),I=v(),[P,B]=qe.useState(!1),[F,V]=qe.useState(!1),[D,q]=qe.useState("default"),[W,Z]=qe.useState(!1),[U,K]=qe.useState(""),[Y,G]=qe.useState(""),Q=qe.useRef(null),X=qe.useRef(null),J=qe.useRef(null),$=qe.useRef(null),ee=qe.useRef(void 0),{isAgentBarExpandedSource:te,dynamicIslandAbsoluteTopSource:re}=xe(),ne=Yr(te),ae=N(),ie=Xr("(max-height: 330px)");Ce(X,e=>{var t,r;if(!ne&&!pe||!Be||"no-rating"===oe&&!z)return;const n=e.target,a=e instanceof MouseEvent&&(null==(t=$.current)?void 0:t.contains(e.relatedTarget))||e instanceof TouchEvent&&(null==(r=$.current)?void 0:r.contains(n)),i=e instanceof MouseEvent&&e.relatedTarget instanceof HTMLButtonElement&&Ee===e.relatedTarget.id||e instanceof TouchEvent&&n instanceof Element&&!(null==n||!n.closest("#"+Ee)),o=e instanceof MouseEvent&&e.relatedTarget instanceof HTMLButtonElement&&[fe,be].includes(e.relatedTarget.id),l=n instanceof HTMLElement&&n.id===ke,s=n instanceof HTMLElement&&!!n.closest("#"+se),c=n instanceof Element&&!!n.closest("#"+Se);a||o||s||l||c||i||(pe?q("collapsing"):te.next(!1))},_);const oe=qe.useMemo(()=>L&&!R?"reconnecting":m?"waiting":d?"offline":b?p?"rating":"no-rating":"none",[b,p,L,R,d,m]),le="offline"===oe,ce="waiting"===oe,ue="reconnecting"===oe,de="reconnecting"===oe,me="rating"===oe||"no-rating"===oe,pe=u&&!ne&&"default"===D,he=qe.useMemo(()=>F||"rating"===oe&&(ne||pe),[F,oe,ne,pe]),ge=!!x&&ne&&["no-rating","offline","rating"].includes(oe),Le=["rating","no-rating","reconnecting"].includes(oe)||!ne&&["waiting","offline"].includes(oe),ze=ne&&["rating","no-rating"].includes(oe)&&!(null==b||!b.properties.jobTitle),Te=ne&&["offline","waiting"].includes(oe),Me=ne&&"waiting"===oe&&Number.isFinite(w),Re=null!=(t=null==b?void 0:b.properties.jobTitle)?t:"",_e=E&&null!=(r=null==b?void 0:b.avatar)?r:void 0,Ae="no-rating"===oe&&!Re&&!x,Ie=!ae&&ie||Ae||"reconnecting"===oe,Pe="offline"===oe||"waiting"===oe,Be=qe.useMemo(()=>!Ae&&"reconnecting"!==oe&&!(k&&ne)||"rating"===oe,[k,ne,Ae,oe]),je=qe.useCallback(()=>{i.setCurrentView(h)},[i,h]),Oe=qe.useCallback(()=>i.requestUpdateChat(g,{active:!1}),[i,g]),Fe=qe.useCallback((e,t)=>{if((!Be||F)&&!t)return;if(pe)return q("collapsing"),void Z(!0);const r="boolean"==typeof e?e:!ne;te.next(r)},[Be,ne,te,F,pe]),He=qe.useCallback(e=>{var t;const r=null==(t=window.getSelection())?void 0:t.toString();r&&r.length?e.stopPropagation():Fe()},[Fe]),Ve=qe.useCallback(e=>{"Enter"===e.key||" "===e.key?Fe():"Escape"===e.key&&ne&&Fe(!1)},[ne,Fe]),De=qe.useCallback(e=>{e&&Fe(!1),X.current&&(X.current.style.zIndex=e?"2":"4")},[Fe]),We=qe.useCallback(e=>{V(()=>e),e||Fe(!1,!0)},[Fe]),Ne=qe.useCallback(()=>{q("dismissed"),W&&(Fe(!0),Z(!1))},[W,Fe]),Ze=qe.useCallback(e=>{if(!X.current)return e;return e/(X.current.getBoundingClientRect().height/X.current.offsetHeight)},[X]);return qe.useEffect(()=>()=>{ee.current=oe},[oe]),qe.useEffect(()=>{"waiting"===oe?G(y):"offline"===oe&&G(C)},[C,y,oe]),qe.useEffect(()=>{var e,t;switch(oe){case"reconnecting":K(o("reconnecting")+"...");break;case"no-rating":K(null!=(e=null==b?void 0:b.name)?e:"");break;case"rating":K(pe?o("rate_agent"):null!=(t=null==b?void 0:b.name)?t:"");break;case"waiting":K(y);break;case"offline":K(C);break;default:K("")}},[null==b?void 0:b.name,g,pe,o,C,y,oe]),qe.useEffect(()=>{if(!J.current||!X.current)return;let e=null;const t=new ResizeObserver(t=>{if(e&&cancelAnimationFrame(e),0===t.length||!t[0].target)return;const r=t[0].target,n=ne?24:10;e=requestAnimationFrame(()=>{r.offsetWidth>0&&r.offsetHeight>0&&X.current&&(X.current.style.width=r.offsetWidth+n+"px",X.current.style.height=r.offsetHeight+n+"px"),(()=>{const e=Q.current,t=X.current;if(!e||!t)return;const r=e.getBoundingClientRect(),n=t.getBoundingClientRect(),a=Ze(n.top-r.top);re.next(a+t.offsetHeight)})(),e=null})});return t.observe(J.current),()=>{t.disconnect(),e&&cancelAnimationFrame(e)}},[re,ne,oe,S,Ze]),qe.useEffect(()=>{Be&&!Ae&&te.next(!0)},[Be,te,Ae,oe]),qe.useEffect(()=>{Ie&&te.next(!1)},[Ie,te]),qe.useEffect(()=>{const e=J.current,t=X.current;if(ae||!e||null!=t&&t.classList.contains("appear")||null!=t&&t.classList.contains("appear-active")||"no-rating"===ee.current&&"rating"===oe||"rating"===ee.current&&"no-rating"===oe)return;e.style.opacity="0",e.style.filter="blur(8px)",e.style.transition="filter 300ms "+I.transitions.easings.easeOutStrong+", opacity 300ms "+I.transitions.easings.easeOutStrong;const r=setTimeout(()=>{e.style.filter="",e.style.opacity=""},300);return()=>{r&&clearTimeout(r)}},[oe,J,I,ae]),qe.createElement(bo,{ref:Q},qe.createElement(vo,null),qe.createElement(Co,null,c&&qe.createElement(yo,{"aria-label":o("go_back_to_homescreen")||o("back"),key:"back",onPress:je,ref:$},qe.createElement(xo,{"aria-hidden":!0})),M&&qe.createElement(ji,{key:"menu",alignedToSide:!c,onMenuToggle:De,iconButtonSize:32})),S&&"none"!==oe&&qe.createElement(f,{in:S,appear:!ae,timeout:300,nodeRef:X},qe.createElement(Lo,or({ref:X,isExpanded:ne,variant:oe,isRatingPromptVisible:pe||"collapsing"===D,canBeToggled:Be,onClick:He,onKeyDown:Ve,"aria-labelledby":"dynamic-island-aria-label",tabIndex:0,id:ye,role:"button"},A),qe.createElement(wo,{variant:oe,isRatingPromptVisible:pe||"collapsing"===D,ref:J},qe.createElement(Eo,{isIslandExpanded:ne,variant:oe},qe.createElement(to,{isIslandExpanded:ne,showAgentAvatar:me,showClock:le,showCompanyLogo:ge,showDisconnectedIcon:ue,showWaitingTime:ce,showWaitingTimeLabel:Me,queueWaitingTime:w,agentAvatarPath:_e,logoPath:x,availability:T}),qe.createElement(so,{isIslandExpanded:ne,showTitle:Le,showSubtitle:ze,showMessage:Te,title:U,subtitle:Re,message:Y,shouldTitleSupportMarkdown:Pe})),p&&qe.createElement(qe.Suspense,{fallback:null},qe.createElement(fo,{shouldShow:he,isIslandExpanded:ne,showRatingPrompt:u,ratingPromptState:D,onRatingCommentModalStateChange:We,onPromptExitDone:Ne})),de&&qe.createElement(H,{message:o("reconnecting"),clearOnUnmount:!0,"aria-live":"assertive"})),Be&&qe.createElement("span",{id:"dynamic-island-aria-label","aria-live":"polite",style:{position:"absolute",visibility:"hidden"}},U+", "+(ne?"Press to collapse details":"Press to expand details")))),qe.createElement(Co,null,a&&qe.createElement(we,{key:"minimize",onPress:n,size:32}),(l||P)&&qe.createElement(bi,{key:"close",closeChat:Oe,localize:o,onModalStateChange:e=>{let{isOpen:t}=e;return B(t)},iconButtonSize:32})),qe.createElement(wi,{topOffset:0}))},zo=c("div",{target:"e1fh44if0"})({name:"1f0bicm",styles:"padding:1em;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:0.9em"}),To=e=>Ve.createElement(zo,null,Ve.createElement(F,e)),Mo=e=>{const t=Ge(e),r="startChatAgain"===Ft(e,t),{starting:n,startChatAgainPending:a}=e.getChat(t).properties;return{isStartingAgain:r,buttonLabel:e.localize(r?"embedded_start_chat_again":"embedded_greeting_accept"),isPending:n||a}},Ro=e=>{let{buttonLabel:t,isPending:r,startAction:n,onClick:a}=e;return Ve.createElement(To,{disabled:r,pending:r,onClick:e=>{n(),null==a||a(e)},id:ke},t)},_o=e=>{let{onClick:t=De}=e;const r=O(),{isPending:n,isStartingAgain:a,buttonLabel:i}=j(Mo),o=Ve.useCallback(()=>a?xt(r):Ot(r),[r,a]);return Ve.createElement(Ro,{startAction:o,isPending:n,buttonLabel:i,onClick:t})},Ao=pe("div",{target:"e37bwg63"})("display:flex;width:calc(100% - 30px);align-items:center;gap:6px;position:absolute;bottom:12px;background-color:",e=>{let{theme:t}=e;return t.colors.surfaceDimmed},";padding:",e=>{let{theme:t}=e;return t.spaces.space3},";border-radius:",e=>{let{theme:t}=e;return t.borderRadius.xl},";margin:0 15px;"),Io=pe("div",{target:"e37bwg62"})("flex-shrink:0;width:2rem;height:2rem;display:flex;justify-content:center;align-items:center;background-color:",e=>{let{theme:t}=e;return t.colors.cautionDimmed},";border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";"),Po=pe(En,{target:"e37bwg61"})("color:",e=>{let{theme:t}=e;return t.colors.caution},";"),Bo=pe("p",{target:"e37bwg60"})("color:",e=>{let{theme:t}=e;return t.colors.primaryTextColor},";font-size:0.875rem;margin:0;"),jo=()=>{const{localize:e}=O();return qe.createElement(Ao,null,qe.createElement(Io,null,qe.createElement(Po,null)),qe.createElement(Bo,null,e("chat_preview_warning")))},Oo=qe.memo(jo),Fo=48+_e,Ho=c("div",{target:"ei7go8f1"})({name:"1qn0375",styles:"flex-grow:1;height:100%;position:relative;min-height:5em;-webkit-overflow-scrolling:touch"}),Vo=c("div",{target:"ei7go8f0"})({name:"1n7hqux",styles:"transition:height 0.05s ease-out"}),Do=e=>({margin:"auto",..."modern"!==e&&{marginBottom:"12px",transform:"translateY(12px)"}}),qo=e=>e.events[0].id,Wo=e=>0!==e.length?qo(e[0]):void 0,No=e=>{const t=Ne(e);if(!t)return;const r=Ne(t.events);return r?r.id:void 0},Zo=Ht([(e,t)=>e.getTimeline(t),B,(e,t)=>Mt(t,e)],(e,t)=>{const r=Vt(t);return e.map((e,n)=>{const a=0===n,i=e.showDate&&!a&&r;return{...e,isThreadBoundary:i,authorData:Dt(t,e.author)}})})((e,t)=>t),Uo=e=>{var t,r;const n=Ge(e),{active:a,properties:{agentIsTyping:i,loadingHistory:o}}=e.getChat(n),l=Mt(n,e),s=null!=(t=Xt(e,n))&&t,c=e.getUnseenCount(n),u=!0===(null==(r=e.getView("Moment"))?void 0:r.show),d=e.getApplicationState("isPreview"),m="openwidget"===e.getApplicationState("defaultWidget");return{mobile:e.getApplicationState("mobile"),chatId:n,active:a,hasMoreHistory:s,isMomentVisible:u,unseenCount:c,activeQuickReply:Jt(n,e),agentIsTyping:i&&!!l,shouldLoadHistory:s&&!o,showAvatar:yt("agentAvatar",e).enabled,pageFocused:e.getApplicationState("pageFocused"),inputMode:Ft(e,n),lastSeenEvent:c>0&&e.getLastSeenAgentEvent(n),isLoadingHistory:o,isPreview:d,displaySendingDisabled:"reconnecting"===e.getConnectionState(),preventSendingMessages:e.getApplicationState("disableSendingMessage")&&m,showChatPreviewWarningBanner:e.getApplicationState("showChatPreviewWarningBanner")}},Ko=(e,t)=>JSON.stringify(e)===JSON.stringify(t),Yo=e=>{const t=Ge(e);return{agent:Mt(t,e),timeline:Zo(e,t,e.getState())}};function Go(){const t=O(),{activeQuickReply:r,hasMoreHistory:n,pageFocused:a,chatId:i,inputMode:o,shouldLoadHistory:l,isLoadingHistory:s,showAvatar:c,agentIsTyping:u,mobile:d,unseenCount:m,lastSeenEvent:p,isMomentVisible:h,isPreview:g,active:f,displaySendingDisabled:b,preventSendingMessages:C,showChatPreviewWarningBanner:y}=j(Uo),{timeline:w,agent:L}=j(Yo,Ko),k=Ve.useRef(null),S=Ve.useRef(null),z=Ve.useRef(null),T=Ve.useRef(!1),[M,_]=Ve.useState(m),[A,I]=Ve.useState("hidden"),[P,B]=Ve.useState(a),[F]=Ve.useState(p),V=G(()=>((e,t)=>e.some(e=>{let{type:t}=e;return t===Qt})?"draft":t?"newMessageDivider":"form")(w,M)),{name:W}=v(),N="modern"===W?"above":"within",Z="modern"!==W&&c,U=Ve.useRef(null),{isAgentBarExpandedSource:K,isOnBottomSource:Q,dynamicIslandAbsoluteTopSource:X}=xe(),J=ze(!1),$=t.localize,ee=Ve.useCallback(()=>{t.emit(dt)},[t]),te=Ve.useCallback((e,r)=>{if(g)return De;ee(),C||qt(t,i,e,r)},[t,i,C,g,ee]),re=Ve.useCallback(()=>{if(g)return De;Wt(t)},[g,t]),ne=Ve.useCallback(()=>t.updateChat(i,{properties:{loadingHistory:!0}}),[t,i]),ae=Ve.useCallback(e=>{Nt()&&t.getApplicationState("embedded")&&t.emit("open_phone_number",e)},[t]),ie=Ve.useCallback(e=>t.requestUpdateEvent(i,e,{seen:!0}).catch(De),[t,i]),oe=Ve.useCallback((e,r)=>{ee(),C||ot(t,i,e,r)},[t,i,C,ee]),le=Ve.useCallback(e=>{let{eventId:r,buttonId:n}=e;const a=Zt(t);t.sendEvent(i,{type:"rich_message_postback",thread:a,properties:{eventId:r,postback:{id:n,toggled:!0}}},void 0)},[t,i]),se=Ve.useCallback(e=>Ut(t,e),[t]),ce=Ve.useCallback(e=>st(t,e),[t]),ue=Ve.useCallback(e=>{let{event:r,button:n}=e;return Kt(t,r,n)},[t]);Ve.useEffect(()=>{a&&!h||!P?!a||h||P||B(!0):B(!1)},[a,P,h]);const de=Ve.useCallback(e=>{e&&l&&ne()},[l,ne]),me=Ve.useCallback(e=>{Q.next(e),B(!0)},[Q]),pe=Ve.useCallback(e=>{let{deltaY:t}=e;t>5&&K.next(!1)},[K]),{scrollToTop:he,scrollToBottom:ge,getIsOnBottom:fe,onWheel:be,onTouchStart:ve,getIsScrollable:Ce,setScrollTargetNode:ye}=Te(k,{firstItemKey:Wo(w),lastItemKey:No(w),onIsScrolledToTopChanged:de,onIsScrolledToBottomChanged:me,onIsUserScrollingChanged:J.next,onScrollDeltaChanged:pe}),we=Ve.useCallback(e=>{fe()&&ge(e)},[fe,ge]),Le=Ve.useCallback(()=>{we({duration:0})},[we]),Ee=function(e){return void 0===e&&(e=De),()=>{ge({duration:0}),e()}},ke=(t=>{const r=Ve.useRef(!1),n=e(t);return Ve.useEffect(()=>{r.current&&(r.current=!1,n.current())}),Ve.useCallback(()=>{r.current=!0},[])})(()=>{fe()?ge():ge({duration:0}),(f||"modern"===W)&&K.next(!1),_(0)}),_e=(e=>{const t=Ve.useRef(e);return Ve.useEffect(()=>{t.current=e}),Ve.useMemo(()=>({handleActionButtonClick:e=>{let{button:r,event:n,browserEvent:a}=e;const{active:i,showMoment:o,sendPostback:l,sendMessage:s,handleSendMessage:c,isGreeting:u,handleRichGreetingButtonClicked:d,handlePhoneNumberClick:m}=t.current;if(u(n))return d({event:n,button:r}),void("message"===r.type&&c());if("phone"===r.type&&m(r.value),i)switch(r.type){case"webview":return l({eventId:n,buttonId:r.postbackId}),void o({url:r.value,source:"rich_message",triggeredTarget:Gt(a)});case"message":return s(r.text,{type:"action_button",event:n,button:r}),void c();case"copy":return void Yt(r.value);default:return void l({eventId:n,buttonId:r.postbackId})}},markAsSeen:e=>t.current.markAsSeen(e)}),[])})({active:f,handleSendMessage:ke,showMoment:ce,sendPostback:le,sendMessage:oe,isGreeting:se,handleRichGreetingButtonClicked:ue,markAsSeen:ie,handlePhoneNumberClick:ae}),Ae=Ve.useCallback(e=>{T.current=e},[]),Ie=!(!u&&!r),Pe=Ve.useCallback(e=>{var t;K.get()&&U.current&&(U.current.contains(e.target)||e.target===window.document||null!=(t=e.target)&&t.closest('button, label, input, [role="menuitem"], textarea')||k.current&&k.current.contains(e.target)&&K.next(!1))},[K]);return Ve.useEffect(()=>{if("modern"!==W)return;const e=K.subscribe(e=>{e&&requestAnimationFrame(()=>{we({duration:0})})});return()=>e()},[K,we,W]),Ve.useEffect(()=>{Ie&&we()},[Ie,we]),Ve.useEffect(()=>{if(!d)return;const e=()=>{T.current&&ge({duration:0})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[d,ge]),Ve.useEffect(()=>I("auto"),[]),Ve.useEffect(()=>{t.on("scroll_to_bottom",e=>{(fe()||null!=e&&e.force)&&ge()})},[t,ge,fe]),Gr({mainElementRef:S,itemsCount:w.reduce((e,t)=>{let{events:r}=t;return e+r.length},0),tableEdgeReached:e=>{"previous"===e&&he({duration:0})}}),Ve.useEffect(()=>{const e=k.current,t=z.current;if("modern"===W||!e||!t)return;let r=null;const n=X.subscribe(n=>{if(e.scrollHeight>e.clientHeight&&t.clientHeight<=16)return void(t.style.height="8px");const a=Math.max(0,n-Fo+16);r=requestAnimationFrame(()=>{t.style.height=a+"px"})});return()=>{r&&cancelAnimationFrame(r),n()}},[X,d,W]),x(Ja,{isOnBottomSource:Q,beginingOfTime:w.length>0?w[0].timestamp:null,rootRef:k},x(D,{appear:!0,component:null},x(xr,null,x(Ho,{onClick:Pe},x(Ma,{isScrollable:Ce(),isOnBottomSource:Q,scrollToBottom:ge,markAsSeen:_e.markAsSeen}),x(Me,{active:P,css:e=>(e=>{let{theme:t,overflow:r,hasMoreHistory:n}=e;const a="modern"===t.name;return R("background:transparent;overscroll-behavior:contain;overflow-y:",t.isRtl?r:"auto",";position:absolute;top:",a?0:-32,"px;bottom:0;left:0;right:0;",!a&&R(n&&"padding-top: 0px;"," height:calc(100% + ",32,"px);"),";")})({theme:e,overflow:A,hasMoreHistory:n}),onWheel:be,onTouchStart:ve,ref:k,gridRef:S,preList:x(Ve.Fragment,null,x(Vo,{ref:z}),n&&x(Y,null,x(Zn,{size:"medium",style:Do(W)})),s&&x(H,{message:"loading more history",clearOnUnmount:!0,"aria-live":"assertive"}))},w.map(e=>x(Ve.Fragment,{key:qo(e)},e.isThreadBoundary&&x(ti,{timestamp:e.timestamp}),F&&M>0&&e.events.some(e=>{let{id:t}=e;return t===F.id})&&x(ai,{unseenCount:M,setScrollTargetNode:ye}),x(_r,null,x(E,or({isOwn:e.own,onlyFirstWithMeta:!0},Z&&"carousel"!==e.type&&e.authorData.avatar&&{avatar:e.authorData.avatar}),e.events.map((t,r)=>x(Ar,or({chatId:i,id:t.id,key:t.id,radiusType:e.radiusType,listItemHandlers:_e,scrollTarget:V,scrollToBottom:ge,messageMetadataPosition:N,index:r},!M&&{setScrollTargetNode:ye}))))))),r&&x("div",{role:"row"},x("div",{role:"gridcell",id:Se},x(Re,{disabled:b,"aria-labelledby":r.id,onSelect:e=>{te(r,e),ke()},replies:r.properties.quickReplies}))),u&&x(Ve.Fragment,null,x(H,{clearOnUnmount:!0,"aria-live":"polite",message:$("operator_is_typing",{operator:L.name}).replace("...","")}),x(D,{appear:!0,component:null},x(q,{exit:!1},x(Nn,{avatar:Z?L.avatar:null}))))),y&&x(Oo,null)))),"requestPrechat"===o?x(To,{onClick:Ee(re)},$("embedded_greeting_accept")):"startChat"===o||"startChatAgain"===o?x(_o,{onClick:Ee()}):"text"===o?x(Za,{onSendMessage:ke,onHeightChange:Le,onFocusChange:Ae}):null)}var Qo;const Xo=c("div",{displayName:"View",section:!0,target:"e11yr3w31"})({name:"73jfg1",styles:"flex-grow:1;display:flex;height:100%;min-height:0;padding-bottom:1em"}),Jo=c("div",{displayType:"ViewContent",target:"e11yr3w30"})("overflow-y:auto;height:100%;flex-grow:1;padding:",e=>{let{full:t}=e;return t?"0 !important":"1em 1em 0 1em"},";"),$o=(e,t)=>e(Qo||(Qo=b(["\n\t&-enter,\n\t&-appear {\n\t\topacity: 0;\n\t}\n\n\t&-enter&-enter-active,\n\t&-appear&-appear-active {\n\t\topacity: 1;\n\t\ttransition: opacity ","ms ",";\n\t}\n\n\t&-exit {\n\t\topacity: 1;\n\t}\n\n\t&-exit&-exit-active {\n\t\topacity: 0;\n\t\ttransition: opacity ","ms ",";\n\t}\n"])),200,t.transitions.easings.sharp,200,t.transitions.easings.sharp),el={name:"1d3w5wq",styles:"width:100%"},tl=e=>{let{children:t,full:r=!1}=e;return x(Xo,null,x(g,null,e=>{let{css:n,theme:a}=e;return x(D,{css:el},x(f,{appear:!0,classNames:$o(n,a),timeout:200},x(Jo,{full:r},t)))}))},rl=pe(Ae,{target:"ea4v29u3"})("margin:0 0 ",e=>{let{theme:t}=e;return t.spaces.space5},";color:",e=>{let{theme:t}=e;return t.colors.secondaryTextColor},";",e=>{let{theme:t}=e;return t.typography.basic},";"),nl=pe("div",{target:"ea4v29u2"})("position:relative;width:100%;display:flex;justify-content:flex-end;padding:",e=>{let{theme:t}=e;return t.spaces.space3},";background-color:",e=>{let{theme:t}=e;return t.colors.surface},";color:",e=>{let{theme:t}=e;return t.colors.primaryTextColor},";"),al=pe("div",{target:"ea4v29u1"})("position:absolute;bottom:",e=>{let{theme:t}=e;return t.spaces.space6},";width:100%;"),il=pe(jr,{target:"ea4v29u0"})({name:"66u5jz",styles:"padding:1em"}),ol=()=>{const e=O(),t=e.localize,r=j(e=>$t(e));return Ve.createElement(Ve.Fragment,null,r&&Ve.createElement(nl,null,Ve.createElement(we,{key:"minimize",onPress:()=>er(e)})),Ve.createElement(tl,null,Ve.createElement(Ir,null,Ve.createElement(Pr,null,Ve.createElement(d,null)),Ve.createElement(il,null,Ve.createElement(Br,null,t("something_went_wrong")),Ve.createElement(rl,null,t("error_refresh_message"))),Ve.createElement(al,null,Ve.createElement(To,{onClick:()=>{e.emit("refresh-page")}},t("refresh"))))))};var ll;const sl=me(ll||(ll=b(["\n\t50% {\n\t\topacity: 0.0;\n\t}\n"]))),cl=R("background:currentColor;opacity:0.3;animation:",sl," 1.5s linear 0s infinite;"),ul=R(cl,";"),dl=c(Ie,{target:"e1uut4cd5"})({name:"2o6p8u",styles:"justify-content:space-between"}),ml=c("div",{target:"e1uut4cd4"})("width:",e=>e.width||"10em",";height:1em;margin:0.3em;border-radius:",e=>{let{theme:t}=e;return t.borderRadius.sm},";",cl,";"),pl=c("div",{target:"e1uut4cd3"})({name:"1d3w5wq",styles:"width:100%"}),hl=c("div",{target:"e1uut4cd2"})({name:"66u5jz",styles:"padding:1em"}),gl=c("div",{target:"e1uut4cd1"})({name:"10qv9sv",styles:"width:100%;margin-top:0.5em"}),fl=c("div",{displayName:"Message",section:!0,target:"e1uut4cd0"})(""),bl=()=>{const e=j(e=>$t(e));return x(tl,{full:!0},x(pl,null,x(dl,null,x(he,{css:ul,letter:" "}),e&&x(we,null)),x(hl,null,x(gl,null,x(Y,null,x(fl,null,x(y,null,x(w,null,x(ml,null),x(ml,{width:"7em"})))))),x(gl,null,x(Y,{reverse:!0},x(fl,null,x(y,null,x(w,null,x(ml,null)))))),x(gl,null,x(Y,null,x(fl,null,x(y,null,x(w,null,x(ml,null)))))))))},vl=e=>({small:"24px",large:"56px"}[e]),xl=c("div",{target:"eo3d8c11"})({name:"v2yezz",styles:"display:flex;flex-grow:0;align-items:center;position:relative"}),Cl=c("div",{target:"eo3d8c10"})("position:absolute;",e=>{let{availability:t,size:r,theme:n}=e;return{width:"small"===r?n.spaces.space4:n.spaces.space5,height:"small"===r?n.spaces.space4:n.spaces.space5,background:"online"===t?n.colors.success:n.colors.grayscale[500],border:"2px solid "+n.colors.surface,borderRadius:n.borderRadius.round,top:"large"===r&&"modern"!==n.name?"0":"-2px",left:"large"===r&&"modern"!==n.name?"0":"-2px"}},";"),yl=e=>{let{avatarUrl:t,availability:r,size:n="normal",...a}=e;return x(xl,a,x(he,{imgUrl:t,imgAlt:"Current agent's avatar",size:vl(n)}),r&&x(Cl,{availability:r,size:n}))},wl=c("div",{target:"e1yuenxz0"})(e=>{let{theme:t}=e;return t.typography.basic}," color:",e=>{let{theme:t}=e;return t.colors.textPrimary},";line-height:1.2;color:inherit;display:flex;width:100%;flex-direction:",e=>e.row?"row":"column",";"),Ll=c("div",{target:"eqrl17l3"})("display:flex;align-items:center;justify-content:center;padding-left:",e=>{let{logoWithoutShift:t}=e;return t?"0":"25px"},";margin-bottom:",e=>{let{modernDowngrade:t}=e;return t?"0":"10px"},";&>*{margin-left:",e=>{let{logoWithoutShift:t}=e;return t?"0":"-15px"},";}"),El=c("div",{target:"eqrl17l2"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),kl=c(si,{target:"eqrl17l1"})("background-color:",e=>{let{theme:t}=e;return t.colors.surfaceDecorative},";color:",e=>{let{theme:t}=e;return t.colors.primaryTextColor},";margin-top:-25px;margin-left:",e=>{let{withoutShift:t}=e;return t?"0":"-25px"},";position:absolute;z-index:2000;"),Sl=c("div",{target:"eqrl17l0"})("width:56px;height:56px;border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";overflow:hidden;display:flex;align-items:center;justify-content:center;position:relative;z-index:2;background-color:",e=>{let{theme:t}=e;return t.colors.surface},";box-shadow:0 0 0 2px ",e=>{let{theme:t}=e;return t.colors.agentBarBackground},";img{width:100%;height:100%;object-fit:contain;}svg{background-color:",e=>{let{theme:t}=e;return t.colors.cta},";width:100%;height:100%;object-fit:contain;}&::after{top:0;left:0;right:0;bottom:0;content:'';position:absolute;width:100%;height:100%;border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";box-shadow:inset 0px 0px 0px 1px rgba(143, 143, 143, 0.15);}"),zl=e=>{let{avatarUrl:t,icon:r,logoUrl:n,showAvatar:a=!0}=e;const i=v(),o="modern"===i.name,[l,s]=Ve.useState(!o&&Boolean(n)),c=Boolean(n&&Et(n));return Ve.useEffect(()=>{s(!o&&Boolean(n))},[o,n]),x(Ll,{modernDowngrade:o,logoWithoutShift:o||!n||!a},r&&x(El,{"aria-hidden":!0},x(kl,{size:"24px",isLight:!0,withoutShift:!n},r)),a&&x(yl,{size:"large",avatarUrl:t,availability:r?void 0:"online"}),l&&x(Sl,null,c?x(Sr,{width:50,height:50,fill:i.colors.ctaText}):x("img",{alt:"Company logo",src:n,onError:()=>s(!1)})))},Tl={name:"f7ay7b",styles:"justify-content:center"},Ml=c("div",{target:"e16txa833"})({name:"zov8s0",styles:"width:100%;display:flex;justify-content:center"}),Rl=c("div",{target:"e16txa832"})("display:flex;flex-direction:",e=>{let{verticalLayout:t}=e;return t?"row":"column"},";justify-content:",e=>{let{verticalLayout:t}=e;return t?"flex-start":"center"},";align-items:center;width:",e=>{let{verticalLayout:t}=e;return t?"100%":"auto"},";max-width:100%;");var _l={name:"xyzkeb",styles:"align-self:flex-start"};const Al=c(je,{target:"e16txa831"})({name:"172op4w",styles:"margin-top:0;margin-bottom:0"}),Il=R(Tl," min-width:auto;"),Pl=c("img",{target:"e16txa830"})({name:"1lnnphj",styles:"height:auto;max-height:50px"}),Bl=e=>{let{agent:t,showAvatar:r,logoPath:n,isRatingEnabled:a}=e;const i="modern"===v().name;return x(Ml,null,x(Rl,{verticalLayout:i},x(zl,or({logoUrl:n,showAvatar:r},r&&t.avatar&&{avatarUrl:t.avatar})),x("div",{css:(o=i,R("margin-top:0;margin-bottom:",o?"0":"10px",";text-align:",o?"left":"center",";width:",o?"100%":"auto",";max-width:100%;min-width:0;",o&&_l,";"))},x(Al,{as:"h1",ellipsis:!0},x(p,null,t.name)),t.properties.jobTitle&&x(Pe,{ellipsis:!0},x(p,null,t.properties.jobTitle)),a&&i&&x(Y,null,x(go,{variant:"normal",source:"agent_bar"}))),a&&!i&&x(Y,null,x(go,{variant:"normal",source:"agent_bar"})),!!n&&i&&x(Be,{css:Il},x(Pl,{alt:"",src:n,draggable:!1}))));var o};var jl={name:"l3iapi",styles:"margin-right:6px;margin-left:0"};const Ol=c(_,{target:"e1d75qwe6"})("width:24px;height:24px;opacity:1;background-color:",e=>{let{theme:t}=e;return"modern"===t.name?"transparent":t.colors.lighterOppositeAgentBarColor},";",e=>{let{theme:t}=e;return t.isRtl&&jl},";"),Fl=c(mr,{target:"e1d75qwe5"})(e=>{let{direction:t}=e;return"up"===t&&{transform:"rotate(180deg)"}}," transition:transform 0.3s ",e=>{let{theme:t}=e;return t.transitions.easings.swift},";"),Hl=c(wl,{target:"e1d75qwe4"})("display:flex;text-align:left;overflow:hidden;height:auto;width:100%;align-items:",e=>{let{veritcallyCenter:t}=e;return t?"center":"flex-start"},";transition:height 0.3s ",e=>{let{theme:t}=e;return t.transitions.easings.swift},";will-change:height;line-height:1.5;justify-content:center;"),Vl=c("div",{target:"e1d75qwe3"})({name:"1kjhtaf",styles:"display:flex;align-items:flex-start;margin-top:10px"}),Dl=c("div",{target:"e1d75qwe2"})({name:"zjik7",styles:"display:flex"}),ql=c("div",{target:"e1d75qwe1"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),Wl=c("span",{target:"e1d75qwe0"})(e=>{let{shouldClamp:t}=e;return t&&S(2)},";"),Nl=e=>{let{text:t,icon:r,isLoadingHistory:n,forceExpanded:a,forceCollapsed:i,isUploadDrawerVisible:o,logoPath:l}=e;const[s,c]=Ve.useState(!0),[u,d]=Ve.useState(!1),[m,h]=Ve.useState(!1),[g,f]=Ve.useState(null),[b,C]=Ve.useState(!1),y=Ve.useRef(null),w=T(),{name:L}=v(),E=Ve.useCallback((function(e){let{shouldKeepPrevious:t=!1}=void 0===e?{}:e;if(s){const e=y.current.clientHeight;e!==g&&f(e),y.current.style.height=e+"px",y.current.scrollTop}y.current.style.height=(s?45:Number(g))+"px",t&&d(s),c(e=>!e)}),[s,g]),k=()=>{s&&(y.current.style.height="auto")},S=n&&s,z=i&&s,R=u&&!i&&!s&&!o;Ve.useEffect(()=>{if(y&&!a){const e=y.current.clientHeight>45;h(e)}y&&a&&(y.current.style.height="auto",h(!1))},[y,a]),Ve.useEffect(()=>{m&&(f(y.current.clientHeight),y.current.style.height="45px",C(!0),c(!1))},[m]),Ve.useEffect(()=>{(S||z)&&E({shouldKeepPrevious:z})},[E,S,z]),Ve.useEffect(()=>{R&&(d(!1),E())},[E,R]);const _=s||!m;return x(M,null,e=>x(Hl,{ref:y,row:!0,veritcallyCenter:!m,onTransitionEnd:k,textWrap:!0},x(ql,{id:w},"modern"!==L&&x(zl,{logoUrl:l,icon:r}),x(Dl,null,x(Wl,{shouldClamp:!_},x(kt,or({template:t,root:{component:p},linkComponent:Oe},!s&&{limit:120}))),m&&x(Vl,null,x(Ol,{onPress:E,"aria-expanded":s,"aria-controls":w,"aria-label":e(s?"show_less":"show_more")},x(Fl,{size:24,direction:b&&s?"up":"down","aria-hidden":!0})))))))};var Zl;const Ul=c("div",{target:"e1dvmwj513"})("position:absolute;bottom:0;left:0;right:0;background:",e=>{let{theme:t}=e;return t.colors.caution},";z-index:2;color:",e=>{let{theme:t}=e;return t.colors.cautionContrast},";text-align:center;font-size:0.9em;line-height:2.8em;transform:translateY(100%);"),Kl=c(Ie,{target:"e1dvmwj512"})({name:"n97p7p",styles:"width:100%;position:relative;padding-top:0.6em;padding-bottom:0.6em"}),Yl=c("div",{displayName:"TitleBar",section:!0,target:"e1dvmwj511"})("position:relative;height:auto;bottom:0;z-index:",e=>{let{elevate:t}=e;return t?103:3},";pointer-events:",e=>{let{elevate:t}=e;return t?"none":"all"},";text-align:left;font-weight:700;transition:0.3s background-color;box-shadow:",e=>{let{ratingPromptVisible:t,collapsibleInfoVisible:r,theme:n}=e;return r?"none":t?n.boxShadow.enormous:n.boxShadow.md},";transition:box-shadow 200ms ",e=>{let{theme:t}=e;return t.transitions.easings.smooth},";display:grid;grid-template-columns:1fr minmax(0, auto) 1fr;grid-template-rows:auto;grid-template-areas:'left-icons title right-icons' 'agent-content agent-content agent-content';");var Gl={name:"m7jyvv",styles:"padding-right:0.8em;padding-left:3px;justify-content:flex-end"},Ql={name:"1gev2oe",styles:"padding-left:0.8em;padding-right:3px;justify-content:flex-start"};const Xl=c("div",{target:"e1dvmwj510"})("grid-area:",e=>{let{areaName:t}=e;return t},";background:inherit;display:flex;align-items:center;justify-content:center;gap:",e=>{let{theme:t}=e;return t.spaces.space2},";width:100%;min-height:",42,"px;",e=>{let{areaName:t}=e;return"left-icons"===t?Ql:"right-icons"===t?Gl:void 0},";"),Jl=c("div",{target:"e1dvmwj59"})({name:"1a39d7z",styles:"grid-area:agent-content;width:100%;z-index:-1"}),$l=c("div",{target:"e1dvmwj58"})("min-height:",40,"px;");var es={name:"1pc9iid",styles:"position:relative;box-shadow:none;padding:0"};const ts=c(Ie,{target:"e1dvmwj57"})("position:",e=>{let{forceExpanded:t}=e;return t?"relative":"absolute"},";top:0;left:0;width:100%;padding-top:0.6em;box-shadow:",e=>{let{theme:t}=e;return t.boxShadow.sm},";",e=>{let{collapsed:t}=e;return t&&es},";"),rs=c("div",{target:"e1dvmwj56"})("position:relative;width:100%;z-index:",e=>{let{collapsed:t,elevate:r}=e;return r?102:t?2:1},";pointer-events:",e=>{let{elevate:t}=e;return t?"none":"all"},";"),ns={enter:150,exit:150},as=e=>e(Zl||(Zl=b(["\n\t&-enter,\n\t&-appear {\n\t\ttransform: translateY(-100%);\n\t}\n\n\t&-enter-active,\n\t&-appear-active,\n\t&-enter-done,\n\t&-appear-done {\n\t\ttransform: translateY(0);\n\t\ttransition: transform ","ms ",";\n\t}\n\n\t&-exit {\n\t\ttransform: translateY(0);\n\t\tposition: absolute;\n\t\tright: 0;\n\t\tleft: 0;\n\t}\n\n\t&-exit-active {\n\t\ttransform: translateY(-100%);\n\t\ttransition: transform ","ms ",";\n\t}\n"])),150,"cubic-bezier(0.14, 0, 0, 1)",150,"cubic-bezier(0.14, 0, 0, 1)"),is={name:"kul0w8",styles:"transition:opacity 100ms ease-in-out;position:relative"},os=c("div",{displayName:"IconPlaceholder",target:"e1dvmwj55"})({name:"febvbf",styles:"width:25px;flex-shrink:0"}),ls=e=>R("font-size:inherit;font-weight:700;margin-top:0;margin-bottom:0;transition:opacity 100ms ",e.transitions.easings.smooth,";"),ss=c(yl,{target:"e1dvmwj54"})({name:"1693thf",styles:"margin-right:5px"}),cs=c("h1",{target:"e1dvmwj53"})(e=>{let{theme:t}=e;return ls(t)},";");var us={name:"1l53zi",styles:"pointer-events:none;opacity:0;cursor:auto"},ds={name:"4uq5vb",styles:"pointer-events:all;opacity:1;cursor:pointer"};const ms=c("button",{target:"e1dvmwj52"})(e=>{let{theme:t}=e;return ls(t)}," margin:0 auto;padding:6px;border-radius:",e=>{let{theme:t}=e;return t.borderRadius.def},";display:flex;flex-direction:row;justify-content:center;align-items:center;position:relative;color:inherit;background:none;border:none;appearance:none;max-width:100%;transition:none;",e=>{let{show:t}=e;return t?ds:us},";&:hover{background-color:",e=>{let{theme:t}=e;return t.colors.lighterOppositeTitleBarColor},";}"),ps=c(_,{target:"e1dvmwj51"})("&:hover{background-color:",e=>{let{theme:t}=e;return t.colors.lighterOppositeTitleBarColor},";border-radius:",e=>{let{theme:t}=e;return t.borderRadius.round},";}"),hs=c("div",{displayName:"TitleBarTitle",target:"e1dvmwj50"})({name:"1tr5ip6",styles:"width:100%;margin:0;padding:2px;text-align:center;font-size:0.9em;flex-grow:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden"}),gs=e=>function(e){const t=[];let r=0;for(;r<=e;)t.push(r++);return t}(e-1).map(e=>x(os,{key:"placeholder_"+e})),fs=e=>{const t=Ge(e),r=Mt(t,e),n=tr(e),a=(o=n,(i=r)&&i.name&&o?i.name:null);var i,o;const l=At(e),s=Pt(e),c=Boolean(!(s||l)&&a),u=yt("logo",e),d=u.enabled,m=t===Lt,p=t===$e,h=t===wt,g=e.getApplicationState("pipMode");return{chatId:t,title:m?"Welcome to OpenAI Chat":e.localize("welcome_title"),titleWithAgentData:a,agent:r,shouldShowTitleWithAgentData:c,showCloseButton:!m&&!h&&e.getChat(t).active&&!g,showAgentBar:n,showAvatar:yt("agentAvatar",e).enabled,isDropAreaVisible:e.getApplicationState("dropAreaVisible"),showBackButton:Tt(e)&&!g,showRatingPrompt:_t(e),chatActive:e.getChat(t).active,isRatingEnabled:yt("rating",e).enabled,logoPath:d?Rt(u.path):void 0,showOfflineInformation:l,showQueueInformation:s,offlineInformation:p?It(e):"",queueText:p?St(e).message:"",hasNoVisibleUserEvents:Bt(e),isUploadingFiles:!!Ye(e).length,reconnecting:pt(e),isLoadingHistory:e.getChat(t).properties.loadingHistory,backButtonTarget:Rr(e)}};var bs={name:"21xn5r",styles:"transform:rotate(180deg)"};const vs=e=>{let{onMinimize:t,showMinimizedButton:r}=e;const{chatId:n,showCloseButton:a,title:i,titleWithAgentData:o,showAgentBar:l,shouldShowTitleWithAgentData:s,agent:c,showAvatar:u,isDropAreaVisible:d,showBackButton:h,showRatingPrompt:b,chatActive:v,isRatingEnabled:C,logoPath:y,showOfflineInformation:w,showQueueInformation:L,offlineInformation:E,queueText:k,hasNoVisibleUserEvents:S,isUploadingFiles:z,isLoadingHistory:T,reconnecting:M,backButtonTarget:R}=j(fs),_=O(),A=_.localize,I=Ve.useRef(null),P=Ve.useRef(null),B=Ve.useRef(null),[F,V]=Ve.useState(!1),[q,W]=Ve.useState(0),{isFocusVisible:Z,focusProps:U}=ve(),K=Qr(M),{isAgentBarExpandedSource:G}=xe(),Q=Yr(G),X=N(),J=Xr("(max-height: 330px)"),$=b&&!Q,ee=!X&&J,te=Ve.useCallback(()=>_.requestUpdateChat(n,{active:!1}),[_,n]),re=Ve.useCallback(()=>{_.setCurrentView(R)},[_,R]);Ve.useEffect(()=>{ee&&G.next(!1)},[ee,G]);const ne=Ve.useCallback(()=>{G.next(!Q)},[s,G,Q]);Ve.useEffect(()=>{if(!P.current||!I.current)return;const e=new ResizeObserver(()=>{if(P.current&&I.current){const e=I.current.clientHeight,t=P.current.clientHeight+42;W(t>e?t:e)}});return e.observe(P.current),e.observe(I.current),()=>e.disconnect()},[]);const{leftIcons:ae,rightIcons:ie}=((e,t)=>{const r=e.filter(Boolean),n=t.filter(Boolean);return r.length===n.length?{leftIcons:r,rightIcons:n}:r.length>n.length?{leftIcons:r,rightIcons:gs(r.length-n.length).concat(n)}:{leftIcons:r.concat(gs(n.length-r.length)),rightIcons:n}})([h&&x(ps,{"aria-label":A("go_back_to_homescreen")||A("back"),key:"back",onPress:re},x(m,{"aria-hidden":!0,css:bs})),x(ji,{key:"menu",alignedToSide:!h})],[r&&x(we,{key:"minimize",onPress:t}),(a||F)&&x(bi,{key:"close",closeChat:te,localize:A,onModalStateChange:e=>{let{isOpen:t}=e;return V(t)}})]);return x("div",{ref:I},x(Yl,{id:ye,elevate:d,isDropAreaVisible:d,collapsibleInfoVisible:L||w,ratingPromptVisible:$},x(Xl,{areaName:"left-icons"},ae),x(Xl,{areaName:"title"},x(hs,null,!s&&!l&&i&&x(cs,null,i),s&&x(ms,or({show:!Q||Z},U,{onClick:ne,"aria-expanded":Q,"aria-controls":ye,"aria-label":Q?void 0:o+" details"}),!(Q&&l)&&x(Ve.Fragment,null,!Q&&c&&l&&u&&x(ss,{avatarUrl:c.avatar,size:"small",availability:"online"}),!Q&&c&&!u&&x(ss,{size:"small",availability:"online"}),x(cs,{ellipsis:!0},x(p,null,o))),Q&&x("span",null,"Collapse details")))),x(g,null,e=>{let{css:t}=e;return x(D,{appear:!0,component:null,exit:Q},l&&Q&&c&&x(f,{timeout:ns,classNames:as(t),nodeRef:B},x(Jl,{ref:B},x(Kl,{noShrink:!0},x(Y,{flexFill:!0,css:is},x(Bl,{agent:c,chatId:n,showAvatar:u,logoPath:y,isRatingEnabled:C&&v}))))))}),x(Xl,{areaName:"right-icons"},ie)),x(rs,{collapsed:!(L||w),elevate:d},(L||w)&&!S&&x($l,null),x(g,null,e=>{let{css:t}=e;return x(D,{appear:L||w,component:null},x(f,{timeout:ns,classNames:as(t)},x(ts,{ref:P,collapsed:!(L||w),forceExpanded:S},L&&x(Nl,{logoPath:y,text:k,icon:x(Fe,{size:24}),isLoadingHistory:T,forceExpanded:S,forceCollapsed:d,isUploadDrawerVisible:z}),w&&x(Nl,{logoPath:y,text:E,icon:x(fn,{size:16}),isLoadingHistory:T,forceExpanded:S,forceCollapsed:d,isUploadDrawerVisible:z}),M&&!K&&x(Ve.Fragment,null,x(H,{message:A("reconnecting"),clearOnUnmount:!0,"aria-live":"assertive"}),x(Ul,null,A("reconnecting")+"…")))))})),x(wi,{topOffset:q}))},xs=e=>{let{fill:t,maxWidth:r,height:n,className:a}=e;return Ve.createElement(Zr,{fill:"none",width:r,height:n,viewBox:"0 0 160 160",maxWidth:r,className:a},Ve.createElement("path",{d:"M35.7456021,1.53601172 C64.2568137,-0.511998205 95.8777154,-0.512005929 124.388706,1.53600068 C142.54061,2.83986826 157.41875,17.0089937 158.905019,35.5119454 C160.387978,53.9744005 160.322878,80.9824003 158.962396,99.4327175 C157.468403,119.698759 140.208039,134.042483 120.933985,134.042483 L100.142216,134.028138 L59.9969477,160 L59.9969477,134.000552 L38.9871476,133.985104 C19.713535,133.985104 2.41363717,119.698759 0.919254708,99.4327175 C-0.441234423,80.9824003 -0.253326741,53.9744005 1.22978567,35.5119454 C2.71613212,17.0089937 17.5939187,2.8398793 35.7456021,1.53601172 Z M122.52618,27.469242 C95.2551815,25.5102902 64.8793476,25.5102902 37.6082384,27.469242 C31.8996185,27.8792833 27.5742109,32.2505937 27.1449914,37.5939316 C25.7683994,54.7297108 25.5852363,80.4024279 26.8475169,97.520552 C27.2644888,103.174731 32.2285397,108.028248 38.9442256,108.028248 L59.9969477,108.028248 L59.9969477,134.000552 L100.141885,108.028248 L120.937296,108.028248 C127.653644,108.028248 132.617805,103.174731 133.034887,97.520552 C134.297168,80.4023176 134.365578,54.7297108 132.989648,37.5939316 C132.560428,32.2505937 128.235131,27.8792833 122.52618,27.469242 Z M111.847551,58.9209384 C114.657891,57.7246901 117.993445,59.7626487 117.993445,62.8168832 L117.993445,78.4793383 C117.993445,80.6531314 116.817229,82.6535727 114.849881,83.5783727 L111.821429,84.9321033 C104.883971,87.8828772 92.8935125,92.0000003 79.9959302,92.0000003 C64.9486406,92.0000003 51.1362674,86.3961382 45.1420896,83.5783727 C43.1749621,82.6535727 41.9978634,80.6531314 41.9978634,78.4793383 L41.9978634,62.8168832 C41.9978634,59.7626487 45.3343005,57.7246901 48.1443093,58.9209384 C55.0775841,61.8724418 67.0820493,66.0000004 79.9959302,66.0000004 C92.9098112,66.0000004 104.914166,61.8724418 111.847551,58.9209384 Z",fill:t}))},Cs=e=>{let{fill:t,maxWidth:r,height:n,className:a}=e;return Ve.createElement(Zr,{width:r,height:n,viewBox:"0 0 460 80",className:a},Ve.createElement("g",{stroke:"none",strokeWidth:"1"},Ve.createElement("path",{d:"M32.6948136,80 C51.606052,80 63.2518726,67.1431476 64,51.8216941 L50.1106641,51.8216941 C49.1484145,60.2859741 43.806629,67.6789077 32.6948136,67.6789077 C20.1942379,67.6789077 14.8515855,59.1074409 14.8515855,47.1073874 L14.8515855,34.8930472 C14.8515855,22.8929937 20.1942379,14.321527 32.6948136,14.321527 C43.806629,14.321527 49.1484145,21.7143736 50.1106641,30.1787405 L64,30.1787405 C63.2518726,14.8572002 51.606052,2 32.6948136,2 C10.1504328,2 0,16.4643937 0,35.6430071 L0,46.3573406 C0,65.536041 10.1504328,80 32.6948136,80 Z M72,78 L86.2697453,78 L86.2697453,45.0903608 C86.2697453,37.6109171 90.3620174,33.764346 96.7622051,33.764346 C103.686803,33.764346 106.730255,38.3589048 106.730255,44.7698566 L106.730255,78 L121,78 L121,42.4191743 C121,29.2766798 113.550141,21.1561409 101.693874,21.1561409 C94.6637131,21.1561409 89.1029223,24.2548109 86.2697453,29.0629814 L86.2697453,0 L72,0 L72,78 Z M150.019299,79 C156.420919,79 163.462267,76.3347791 166.022915,72.6028642 L166.022915,77.7205901 L180,77.7205901 L180,42.3234976 C180,29.4228248 170.504481,21 156.633873,21 C144.684184,21 136.042214,26.7573444 132.840972,37.5257539 L146.284805,37.5257539 C147.778083,34.5404642 150.872849,32.3014537 155.886801,32.3014537 C161.861646,32.3014537 165.489663,36.1396833 165.489663,41.2573227 L165.489663,48.8272076 C162.929015,46.6948579 158.020674,44.1360382 151.4061,44.1360382 C138.06961,44.1360382 129,49.6801475 129,61.7278804 C129,72.49629 137.535492,79 150.019299,79 Z M152.952169,69 C146.709655,69 142,66.0133333 142,60.8933333 C142,55.7733333 146.380868,53 153.390256,53 C160.071746,53 165,55.8800433 165,60.7867099 C165,65.4800433 159.523471,69 152.952169,69 Z M207.021821,78 L217.2389,78 L217.2389,66.2023444 L211.261226,66.2023444 C207.348133,66.2023444 205.93441,64.7008356 205.93441,61.0543144 L205.93441,34.0271572 L218,34.0271572 L218,22.2295886 L205.93441,22.2295886 L205.93441,7 L191.043139,7 L191.043139,22.2295886 L183,22.2295886 L183,34.0271572 L191.043139,34.0271572 L191.043139,62.1268207 C191.043139,71.993878 196.152119,78 207.021821,78 Z M224,78 L257.850074,78 C272.706189,78 283,69.4284944 283,56.8928381 C283,46.714235 276.844893,40.8214282 269.204605,39.2142437 C274.404031,36.2142472 278.542735,30.5357258 278.542735,21.9643072 C278.542735,10.7142768 270.372087,3 257.319713,3 L224,3 L224,78 Z M239,66 L239,45 L257.749674,45 C264.821332,45 269,49.0680269 269,55.4450038 C269,61.9319731 265.035177,66 257.857466,66 L239,66 Z M239,35 L239,15 L254.949751,15 C261.286221,15 265,18.7777778 265,24.6667117 C265,30.6667117 261.504261,35 255.058771,35 L239,35 Z M312.999569,79 C329.554534,79 339,68.1249297 339,53.9448471 L339,46.0551529 C339,31.8749838 329.554534,21 312.999569,21 C296.444605,21 287,31.8749838 287,46.0551529 L287,53.9448471 C287,68.1249297 296.444605,79 312.999569,79 Z M325,55.0181376 C325,62.4363194 321.17706,68 312.999569,68 C304.82294,68 301,62.4363194 301,55.0181376 L301,44.9817739 C301,37.5635921 304.82294,32 312.999569,32 C321.17706,32 325,37.5635921 325,44.9817739 L325,55.0181376 Z M365.021821,78 L375.2389,78 L375.2389,66.2023444 L369.261226,66.2023444 C365.348133,66.2023444 363.935292,64.7008356 363.935292,61.0543144 L363.935292,34.0271572 L376,34.0271572 L376,22.2295886 L363.935292,22.2295886 L363.935292,7 L349.043139,7 L349.043139,22.2295886 L341,22.2295886 L341,34.0271572 L349.043139,34.0271572 L349.043139,62.1268207 C349.043139,71.993878 354.152119,78 365.021821,78 Z",fill:t})))},ys=c("span",{target:"e11crs6s0"})("display:inline-flex;position:relative;height:",e=>{let{height:t}=e;return t},"px;gap:",e=>{let{horizontalGap:t}=e;return t},"px;"),ws=e=>{let{maxWidth:t=58,colors:r,className:n}=e;const a=v(),i=(null==r?void 0:r.signet)||"#0066FF",o=(null==r?void 0:r.letters)||a.colors.primaryTextColor,l=Math.round(t/5),s=Math.round(t/15),c=Math.round(l/12),u=Math.round(t-(l+s)),d=Math.round(l+c);return Ve.createElement(ys,{horizontalGap:s,verticalGap:c,height:d,className:n,"aria-label":"ChatBot",role:"img"},Ve.createElement(xs,{maxWidth:l,height:l,fill:i}),Ve.createElement(Cs,{maxWidth:u,height:l,fill:o}))},Ls=e=>{let{fill:t,maxWidth:r,height:n,className:a}=e;return Ve.createElement(Zr,{fill:"none",width:r,height:n,viewBox:"0 0 12 12",maxWidth:r,className:a},Ve.createElement("path",{d:"M6.00016621,0 C7.12163402,0 8.28315426,0.0427726124 9.32451723,0.128317837 C10.6862996,0.256635674 11.8077674,1.3687236 11.9279247,2.86576503 L11.9419904,3.12420162 L11.956542,3.45232027 C11.9709443,3.81219896 11.9854303,4.62906207 12,5.90290962 L11.9924956,6.31600096 C11.977667,7.03775237 11.9551008,7.68450676 11.9279247,8.13434446 C11.8077674,9.63138589 10.6862996,10.7434738 9.32451723,10.8717916 C8.37782362,10.94956 7.33182648,10.9919792 6.30689373,10.999049 L5.99764151,11 C4.87617369,11 3.71465345,10.9572274 2.67329048,10.8716822 C1.31150814,10.7433643 0.190040321,9.6312764 0.0698830554,8.13423497 L0.0558172934,7.87579838 L0.0457550959,7.6562875 C0.0262329791,7.1991234 0.0104183521,6.63676231 5.68434189e-14,6.03503125 L5.68434189e-14,4.96507823 L0.00805921385,4.55536166 C0.0228604772,3.88569725 0.0443346891,3.28876881 0.0698830554,2.86587451 C0.190040321,1.36883308 1.31150814,0.256745158 2.67329048,0.128427321 C3.61998409,0.050658935 4.66598123,0.00823981533 5.69091398,0.00116996205 L6.00016621,0 Z M5.99890396,2.09625899 L5.63224138,2.09797246 L5.27783939,2.1030162 C4.45156521,2.11836672 3.6307937,2.15878976 2.83350017,2.22428533 C2.39292353,2.26705794 2.07250415,2.60923884 2.03245173,3.03696496 L2.01890621,3.19047439 C1.98206093,3.64763807 1.95813669,4.28893573 1.94419461,4.99353581 L1.94419461,6.00657368 L1.95304386,6.39295036 C1.96958774,7.02332583 1.99526556,7.57926478 2.03245173,7.96314452 C2.07250415,8.39087065 2.39292353,8.73305155 2.83350017,8.77582416 C3.6307937,8.84131972 4.45156521,8.88174276 5.27783939,8.89709329 L5.63224138,8.90213703 L6.02318064,8.9038505 L6.36556633,8.90224651 C7.31125721,8.89289 8.25311494,8.85078571 9.16430754,8.77593364 C9.60488418,8.73316103 9.92530356,8.39098013 9.96535598,7.96325401 L9.9789015,7.80974458 C10.0240037,7.25013189 10.0497448,6.41461035 10.0615154,5.52480966 L10.0536131,4.99342632 L10.0447639,4.60704964 C10.02822,3.97667417 10.0025422,3.42073522 9.96535598,3.03685548 C9.92530356,2.60912935 9.60488418,2.26694845 9.16430754,2.22417584 C8.36701402,2.15868028 7.5462425,2.11825724 6.71996832,2.10290671 L6.36556633,2.09786297 L5.99890396,2.09625899 Z",fill:t}))},Es=e=>{let{fill:t,maxWidth:r,height:n,className:a}=e;return Ve.createElement(Zr,{width:r,height:n,viewBox:"0 0 60 10",className:a},Ve.createElement("g",{stroke:"none",strokeWidth:"1"},Ve.createElement("path",{d:"M3.22641509,8.14814815 C5.35667634,8.14814815 6.45283019,6.6714998 6.45283019,4.7245116 L6.45283019,3.60882173 C6.45283019,1.66183354 5.35667634,0.185185185 3.22641509,0.185185185 C1.10649492,0.185185185 2.03836947e-13,1.66183354 2.03836947e-13,3.60882173 L2.03836947e-13,4.7245116 C2.03836947e-13,6.6714998 1.10649492,8.14814815 3.22641509,8.14814815 Z M3.22641509,6.85185185 C2.00713032,6.85185185 1.43396226,5.99649044 1.43396226,4.79465352 L1.43396226,3.53867981 C1.43396226,2.33684289 2.00713032,1.48148148 3.22641509,1.48148148 C4.44569987,1.48148148 5.01886792,2.33684289 5.01886792,3.53867981 L5.01886792,4.79465352 C5.01886792,5.99649044 4.44569987,6.85185185 3.22641509,6.85185185 Z M8.75451067,9.81481481 L8.75451067,7.34130731 C9.03353464,7.77148253 9.58124836,8.07260518 10.2943096,8.07260518 C11.7411006,8.07260518 12.5471698,6.95414962 12.5471698,5.60985206 L12.5471698,4.68497534 C12.5471698,3.36218655 11.761769,2.22222222 10.2839754,2.22222222 C9.50890881,2.22222222 8.96119509,2.58787116 8.69250535,3.01804637 L8.69250535,2.35127479 L7.3490566,2.35127479 L7.3490566,9.81481481 L8.75451067,9.81481481 Z M9.93298211,6.85185185 C9.30756351,6.85185185 8.78301887,6.37402835 8.78301887,5.51611797 L8.78301887,4.69078647 C8.78301887,3.89803384 9.24703912,3.33333333 9.94306951,3.33333333 C10.7399739,3.33333333 11.1132075,3.94147234 11.1132075,4.69078647 L11.1132075,5.49439872 C11.1132075,6.28715135 10.7097117,6.85185185 9.93298211,6.85185185 Z M15.5662376,7.96296296 C16.745383,7.96296296 17.6989527,7.21132898 17.8835146,6.17647059 L16.6633555,6.17647059 C16.5300608,6.56862745 16.160937,6.89542484 15.5662376,6.89542484 C14.756216,6.89542484 14.4383594,6.31808279 14.4383594,5.65359477 L14.4383594,5.51198257 L17.9245283,5.51198257 L17.9245283,4.52069717 C17.9245283,3.15904139 17.1247602,2.03703704 15.5457307,2.03703704 C13.9461944,2.03703704 13.0849057,3.12636166 13.0849057,4.66230937 L13.0849057,5.43572985 C13.0849057,7.02614379 14.0589823,7.96296296 15.5662376,7.96296296 Z M16.6698113,4.44444444 L14.5188679,4.44444444 L14.5188679,4.39340916 C14.5188679,3.67891514 14.8189996,3.14814815 15.5993418,3.14814815 C16.3296621,3.14814815 16.6698113,3.64829396 16.6698113,4.3117527 L16.6698113,4.44444444 Z M20.2301523,7.96296296 L20.2301523,4.63937622 C20.2301523,3.88401559 20.6343178,3.49554442 21.2664741,3.49554442 C21.9504464,3.49554442 22.2509798,3.95955166 22.2509798,4.60700362 L22.2509798,7.96296296 L23.6603774,7.96296296 L23.6603774,4.36960457 C23.6603774,3.02074631 22.9245889,2.22222222 21.7535453,2.22222222 C20.9866672,2.22222222 20.4374167,2.50278474 20.167973,3.02074631 L20.167973,2.35171261 L18.8207547,2.35171261 L18.8207547,7.96296296 L20.2301523,7.96296296 Z M27.2844558,7.96296296 L28.8584906,2.11666667 L30.4325253,7.96296296 L31.8213795,7.96296296 L33.5188679,0.37037037 L32.0991503,0.37037037 L31.0600816,5.85873016 L29.5580616,0.37037037 L28.1589196,0.37037037 L26.6568995,5.85873016 L25.6178308,0.37037037 L24.1981132,0.37037037 L25.8956016,7.96296296 L27.2844558,7.96296296 Z M34.8632075,1.66666667 C35.3328756,1.66666667 35.6698113,1.30801688 35.6698113,0.833333333 C35.6698113,0.358649789 35.3328756,0 34.8632075,0 C34.3935395,0 34.0566038,0.358649789 34.0566038,0.833333333 C34.0566038,1.30801688 34.3935395,1.66666667 34.8632075,1.66666667 Z M35.6698113,7.77777778 L35.6698113,2.22222222 L34.2358491,2.22222222 L34.2358491,7.77777778 L35.6698113,7.77777778 Z M38.6499869,8.14814815 C39.4250535,8.14814815 39.9727672,7.77478287 40.2414569,7.3355296 L40.2414569,8.01637217 L41.5849057,8.01637217 L41.5849057,0 L40.1794516,0 L40.1794516,2.92103424 C39.8797592,2.4927623 39.3527139,2.17430368 38.6396527,2.17430368 C37.1928617,2.17430368 36.3867925,3.31636218 36.3867925,4.68902865 L36.3867925,5.63342318 C36.3867925,6.98412698 37.2031959,8.14814815 38.6499869,8.14814815 Z M38.9908928,6.85185185 C38.1939884,6.85185185 37.8207547,6.24371285 37.8207547,5.49439872 L37.8207547,4.69078647 C37.8207547,3.89803384 38.2242506,3.33333333 39.0009802,3.33333333 C39.6263988,3.33333333 40.1509434,3.81115684 40.1509434,4.66906722 L40.1509434,5.49439872 C40.1509434,6.28715135 39.6869231,6.85185185 38.9908928,6.85185185 Z M45.0853972,10 C46.595871,10 47.6792453,9.06839988 47.6792453,7.86598576 L47.6792453,2.35221294 L46.3250274,2.35221294 L46.3250274,3.03466419 C46.1375203,2.65552461 45.5541649,2.22222222 44.7208001,2.22222222 C43.2415775,2.22222222 42.4811321,3.30547818 42.4811321,4.56205509 L42.4811321,5.38532962 C42.4811321,6.62024141 43.2519946,7.72516249 44.710383,7.72516249 C45.4083261,7.72516249 46.0333497,7.3460229 46.2625251,6.95605076 L46.2625251,7.84432064 C46.2625251,8.4726091 45.8041744,8.88424636 45.0853972,8.88424636 C44.533293,8.88424636 44.1061935,8.71092541 43.9186864,8.32095327 L42.5436344,8.32095327 C42.7623927,9.3825441 43.8145158,10 45.0853972,10 Z M45.0495283,6.48148148 C44.293239,6.48148148 43.9150943,5.96040868 43.9150943,5.24393359 L43.9150943,4.59259259 C43.9150943,3.82183908 44.3136792,3.33333333 45.0904088,3.33333333 C45.754717,3.33333333 46.245283,3.83269476 46.245283,4.59259259 L46.245283,5.24393359 C46.245283,6.03639847 45.7036164,6.48148148 45.0495283,6.48148148 Z M50.8775584,7.96296296 C52.0567037,7.96296296 53.0102734,7.21132898 53.1948353,6.17647059 L51.9746762,6.17647059 C51.8413815,6.56862745 51.4722578,6.89542484 50.8775584,6.89542484 C50.0675368,6.89542484 49.7496802,6.31808279 49.7496802,5.65359477 L49.7496802,5.51198257 L53.2358491,5.51198257 L53.2358491,4.52069717 C53.2358491,3.15904139 52.4360809,2.03703704 50.8570515,2.03703704 C49.2575152,2.03703704 48.3962264,3.12636166 48.3962264,4.66230937 L48.3962264,5.43572985 C48.3962264,7.02614379 49.370303,7.96296296 50.8775584,7.96296296 Z M51.9811321,4.44444444 L49.8301887,4.44444444 L49.8301887,4.39340916 C49.8301887,3.67891514 50.1303203,3.14814815 50.9106626,3.14814815 C51.6409829,3.14814815 51.9811321,3.64829396 51.9811321,4.3117527 L51.9811321,4.44444444 Z M56.9259639,7.96296296 L56.9259639,6.76289583 L56.3442517,6.76289583 C55.9634947,6.76289583 55.8259991,6.61016001 55.8259991,6.23923017 L55.8259991,3.48998545 L57,3.48998545 L57,2.28991832 L55.8259991,2.28991832 L55.8259991,0.740740741 L54.3770069,0.740740741 L54.3770069,2.28991832 L53.5943396,2.28991832 L53.5943396,3.48998545 L54.3770069,3.48998545 L54.3770069,6.34832718 C54.3770069,7.35201969 54.8741064,7.96296296 55.9317649,7.96296296 L56.9259639,7.96296296 Z",fill:t})))},ks=c("span",{target:"ef7ix0w0"})("display:inline-flex;position:relative;height:",e=>{let{height:t}=e;return t},"px;&>:first-child{margin-right:",e=>{let{horizontalGap:t}=e;return t},"px;}"),Ss=e=>{let{maxWidth:t=75,colors:r,className:n}=e;const a=v(),i=(null==r?void 0:r.signet)||a.colors.primaryTextColor,o=(null==r?void 0:r.letters)||a.colors.primaryTextColor,l=Math.round(t/7),s=Math.round(t/15),c=Math.round(l/12),u=Math.round(t-(l+s)),d=Math.round(l+c);return Ve.createElement(ks,{horizontalGap:s,verticalGap:c,height:d,className:n,"aria-label":"OpenWidget",role:"img"},Ve.createElement(Ls,{maxWidth:l,height:l,fill:i}),Ve.createElement(Es,{maxWidth:u,height:l,fill:o}))},zs=e=>{let{fill:t,maxWidth:r,height:n,className:a}=e;return Ve.createElement(Zr,{maxWidth:r,height:n,viewBox:"0 0 162 80",className:a},Ve.createElement("g",{stroke:"none",strokeWidth:"1"},Ve.createElement("path",{d:"M18.6105 67.3684H26.5263V58.1053H21.8947C18.8632 58.1053 17.7684 56.9263 17.7684 54.0632V32.8421H27.1158V23.5789H17.7684V11.621H6.23158V23.5789H0V32.8421H6.23158V54.9053C6.23158 62.6526 10.1895 67.3684 18.6105 67.3684Z",fill:t}),Ve.createElement("path",{d:"M51.498 68.379C61.1822 68.379 69.0138 62.5684 70.5296 54.5684H60.5086C59.4138 57.6 56.3822 60.1263 51.498 60.1263C44.8454 60.1263 42.2349 55.6632 42.2349 50.5263V49.4316H70.8665V41.7684C70.8665 31.2421 64.298 22.5684 51.3296 22.5684C38.1928 22.5684 31.1191 30.9895 31.1191 42.8632V48.8421C31.1191 61.1368 39.1191 68.379 51.498 68.379ZM42.2349 40.9263C42.2349 35.0316 44.7612 30.6526 51.3296 30.6526C57.477 30.6526 60.3401 34.7789 60.3401 40.2526V41.3474H42.2349V40.9263Z",fill:t}),Ve.createElement("path",{d:"M99.4645 45.1368L114.201 23.5789H102.328L93.654 36.5474L84.9803 23.5789H73.1066L87.8434 45.1368L72.5171 67.3684H84.5592L93.654 53.7263L102.749 67.3684H114.791L99.4645 45.1368Z",fill:t}),Ve.createElement("path",{d:"M134.236 67.3684H142.151V58.1053H137.52C134.488 58.1053 133.393 56.9263 133.393 54.0632V32.8421H142.741V23.5789H133.393V11.621H121.857V23.5789H115.625V32.8421H121.857V54.9053C121.857 62.6526 125.814 67.3684 134.236 67.3684Z",fill:t}),Ve.createElement("path",{d:"M152.049 80H161.818V0H152.049V80Z",fill:t})))},Ts=c("span",{target:"e1ye7lvw0"})("display:inline-flex;position:relative;height:",e=>{let{height:t}=e;return t},"px;"),Ms=e=>{let{maxWidth:t=26,colors:r,className:n}=e;const a=v(),i=(null==r?void 0:r.letters)||a.colors.primaryTextColor,o=t,l=Math.round(t*(80/162));return Ve.createElement(Ts,{height:l,className:n,"aria-label":"Text",role:"img"},Ve.createElement(zs,{maxWidth:o,height:l,fill:i}))},Rs=c("div",{displayName:"Footer",section:!0,target:"e13tedl74"})({name:"rudrqt",styles:"flex-shrink:0;overflow:hidden;position:relative"}),_s=c("span",{target:"e13tedl73"})("margin-bottom:",e=>{let{defaultWidget:t}=e;return"openwidget"===t?"1px":"0.5px"},";"),As=c("a",{displayName:"FooterLink",target:"e13tedl72"})("display:flex;direction:ltr;justify-content:center;color:",e=>{let{theme:t}=e;return t.colors.trademarkFooterText},";gap:5px;align-items:end;",e=>{let{mobile:t}=e;return t&&"pointer-events: none;"},";"),Is=c("div",{target:"e13tedl71"})({name:"o4a66r",styles:"transform:scale(0.7);margin-left:-29px"}),Ps=c(As,{target:"e13tedl70"})("display:flex;align-items:center;padding:",e=>{let{theme:t}=e;return t.spaces.space2},";position:absolute;bottom:2px;left:0;right:0;z-index:100;"),Bs=e=>{let{trademarkLink:t,children:r}=e;return Ve.createElement(Ve.Fragment,null,t?Ve.createElement(Ps,{href:t,target:"_blank",rel:"noreferrer"},r):Ve.createElement(Ps,{as:"div"},r))},js=e=>{var t;const{license:r,defaultWidget:n,mobile:a}=e.getApplicationState();return{license:r,isNonProfit:nr(e),hidden:ar(e),defaultWidget:n,mobile:a,hasChatBotIntegration:!(null==(t=yt("chatbotIntegration",e))||!t.enabled),customTrademarkData:Ur(e),isTextDomain:zt(e)}},Os=()=>{const{license:e,defaultWidget:t,mobile:r,hidden:n,hasChatBotIntegration:a,customTrademarkData:i,isNonProfit:o,isTextDomain:l}=j(js),s=Ve.useMemo(()=>{const r=document.referrer?rr(Dr(document.referrer)||""):"lc"+e,n={utm_campaign:r,utm_medium:"referral",...o&&{utm_term:"nonprofit"}};if("openwidget"===t){if(a){return"https://www.chatbot.com/powered-by-chatbot/?"+qr({...n,utm_source:"chat_window"})}return"https://www.openwidget.com/?"+qr({...n,utm_source:"openwidget_window"})}return"https://www.livechat.com/powered-by-livechat/?"+qr({...n,partner:r,utm_source:"chat_window"})},[t,a,e,o]);return Ve.createElement(Rs,null,Ve.createElement(D,{appear:!0,component:null},(()=>{if(i)return Ve.createElement(Or,{key:i.title},Ve.createElement(Bs,{trademarkLink:i.trademarkLink},Ve.createElement(Is,null,Ve.createElement(Fr,{src:i.icon,"aria-hidden":!0})),Ve.createElement(_s,{defaultWidget:t},i.title)));return n?null:Ve.createElement(Or,null,Ve.createElement(As,{href:s,rel:"noreferrer",target:"_blank",draggable:!1,mobile:r},Ve.createElement(_s,{defaultWidget:t},"Powered by "),l?Ve.createElement(Ms,null):"openwidget"===t?a?Ve.createElement(ws,null):Ve.createElement(Ss,null):Ve.createElement(Kr,null)))})()))},Fs=Ve.lazy(()=>He(()=>Le(()=>import("./21.nh6Xuns_.chunk.js"),[]))),Hs=e=>({destroyed:e.getApplicationState().destroyed,showLoader:ir(e),currentView:e.getCurrentView(),homeScreenEnabled:Tt(e)}),Vs=Object.freeze(Object.defineProperty({__proto__:null,default:e=>{let{onMinimizeButtonPress:t,showMinimizedButton:r}=e;const{destroyed:n,showLoader:a,currentView:i,homeScreenEnabled:o}=j(Hs),l="modern"===v().name;if(n)return x(ol,null);if(a)return x(bl,null);return x(Hr,null,o&&i&&"Chat"!==i?x(Fs,{currentView:i,showMinimizedButton:r}):x(Vr,null,x(l?vs:So,{onMinimize:t,showMinimizedButton:r}),x(Go,null)),x(Os,null))}},Symbol.toStringTag,{value:"Module"}));export{Vs as M,go as R};