@wexio/messenger-widget-react 1.7.5 → 1.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/widget-react-BI1zRae2.js +2 -0
- package/dist/{widget-react-CtHBMV7Z.js → widget-react-BbMhq_D0.js} +21 -20
- package/dist/widget-react-C6zJ0C4y.js +2 -0
- package/dist/{widget-react-B-NKlxTt.js → widget-react-Dul9xHaL.js} +10 -10
- package/dist/widget-react-PNvF_UGi.js +140 -0
- package/dist/widget-react-i3rT0ift.js +2 -0
- package/dist/widget-react.d.ts +18 -1
- package/dist/widget-react.js +30 -30
- package/package.json +1 -1
- package/dist/widget-react-BflWAq27.js +0 -2
- package/dist/widget-react-CfpEYz7V.js +0 -140
- package/dist/widget-react-DGksrvCr.js +0 -2
- package/dist/widget-react-Yd3uIKgg.js +0 -2
package/dist/widget-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){setTimeout(e,0)},emit:function(){return!1}});import"react";import"react-dom";import"react/jsx-runtime";import"react-dom/client";import{C as e,D as t,S as n,a as r,b as i,c as a,i as o,k as s,l as c,m as l,n as u,s as d,t as f,u as p,v as m,w as h,x as g}from"./widget-react-DIvxQOfe.js";import{$ as _,$t as v,A as y,At as b,B as x,Bt as S,C,Ct as w,D as T,Dt as E,E as D,Et as O,F as k,Ft as A,
|
|
1
|
+
globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){setTimeout(e,0)},emit:function(){return!1}});import"react";import"react-dom";import"react/jsx-runtime";import"react-dom/client";import{C as e,D as t,S as n,a as r,b as i,c as a,i as o,k as s,l as c,m as l,n as u,s as d,t as f,u as p,v as m,w as h,x as g}from"./widget-react-DIvxQOfe.js";import{$ as _,$t as v,A as y,At as b,B as x,Bt as S,C,Ct as w,D as T,Dt as E,E as D,Et as O,F as k,Ft as A,Gt as j,H as M,Ht as N,I as P,It as F,J as ee,Jt as te,K as ne,Kt as re,L as ie,Lt as ae,M as oe,Mt as se,N as ce,Nt as I,Ot as le,P as ue,Pt as de,Q as fe,Qt as pe,R as me,Rt as he,S as ge,St as _e,T as ve,Tt as ye,U as be,Ut as L,V as xe,Vt as Se,W as R,Wt as Ce,X as we,Xt as Te,Y as Ee,Yt as De,Z as Oe,Zt as ke,_ as z,_t as Ae,a as je,an as Me,at as Ne,b as Pe,bt as Fe,c as Ie,cn as Le,ct as Re,dn as ze,dt as Be,en as Ve,et as He,f as Ue,fn as We,ft as Ge,g as Ke,gt as B,h as qe,ht as Je,i as Ye,in as Xe,it as Ze,jt as Qe,k as $e,kt as et,l as tt,ln as nt,lt as rt,m as it,mt as at,nn as ot,nt as st,o as ct,on as lt,p as ut,pt as V,q as dt,qt as H,r as ft,rn as pt,rt as mt,s as ht,sn as gt,st as _t,t as vt,tn as yt,tt as bt,u as xt,un as St,ut as Ct,vt as wt,w as Tt,wt as Et,x as Dt,xt as Ot,yt as kt,z as At,zt as jt}from"./widget-react-BbMhq_D0.js";import{n as Mt,t as Nt}from"./widget-react-ChDwJoyJ.js";import{a as Pt,i as Ft,l as It,n as Lt,r as Rt,t as zt,u as Bt}from"./widget-react-_QsYqFeh.js";import{a as Vt,c as Ht,d as Ut,f as Wt,i as Gt,l as Kt,n as qt,r as Jt,t as Yt,u as Xt}from"./widget-react-Dul9xHaL.js";import{a as Zt,c as Qt,d as $t,f as en,h as tn,l as U,m as nn,o as rn,p as an,s as on,t as sn,u as cn}from"./widget-react-PNvF_UGi.js";import{n as ln,t as un}from"./widget-react-5vmcmqij.js";import{t as dn}from"./widget-react-8gKsfB0D.js";import{t as fn}from"./widget-react-BxEMz2N0.js";import{t as pn}from"./widget-react-CkrkZ3pp.js";import*as W from"react";import mn,{Component as hn,Fragment as gn,Suspense as _n,createContext as vn,forwardRef as yn,lazy as bn,memo as xn,startTransition as Sn,useCallback as G,useContext as Cn,useEffect as K,useImperativeHandle as wn,useLayoutEffect as Tn,useMemo as q,useRef as J,useState as Y,useSyncExternalStore as En}from"react";import{Fragment as Dn,jsx as X,jsxs as Z}from"react/jsx-runtime";import*as On from"react-dom";import kn,{createPortal as An}from"react-dom";function jn({locale:t,...n}){if(!t)throw Error(void 0);return X(e,{locale:t,...n})}var Mn=s(Le(),1),Nn=function(e){var t=e.client,n=e.children,r=gt(),i=Mn.useContext(r),a=Mn.useMemo(function(){return St(St({},i),{client:t||i.client})},[i,t]);return nt(a.client,71),Mn.createElement(r.Provider,{value:a},n)},Pn=0;function Fn(e,t,n){e.preview.setExpected(n),n||e.preview.setToken(t??null)}function In({publicKey:e,isolated:t=!1,previewToken:n,previewExpected:r=!1,persistent:i=!1,storageNamespace:a,children:o}){let s=t||(!!n||r)&&!i,c=a||null,l=e||null,[u,d]=Y(l),f=l??u;K(()=>{if(l!==null){d(l);return}let e=setTimeout(()=>d(null),400);return()=>clearTimeout(e)},[l]);let p=J(null),m=p.current;(!m||m.key!==f||m.isolated!==s||m.namespace!==c)&&(m&&m.key===null&&m.isolated===s&&m.namespace===c?(m.instance.publicKey=f,p.current={...m,key:f}):(p.current={key:f,isolated:s,namespace:c,instance:new jt(f,{isolated:s,storageNamespace:c??void 0}),generation:Pn++},Fn(p.current.instance,n,r)));let{instance:h,generation:g}=p.current;return Tn(()=>{Fn(h,n,r)},[h,n,r]),X(gn,{children:X(ae,{instance:h,children:X(Nn,{client:h.client,children:o})})},g)}function Ln({children:e,isValidProp:t,...n}){t&&r(t);let i=Cn(d);n={...i,...n},n.transition=l(n.transition,i.transition),n.isStatic=m(()=>n.isStatic);let a=q(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return X(d.Provider,{value:a,children:e})}function Rn(){!c.current&&a();let[e]=Y(p.current);return e}function zn(e){return typeof e==`string`&&/^https?:\/\//i.test(e.trim())}function Bn(e){if(!zn(e))return null;try{return new URL(e.trim()).hostname.replace(/^www\./i,``)||null}catch{return null}}function Vn(e){if(!e)return null;let t=e.split(`.`).filter(Boolean);if(t.length<=2)return t.join(`.`)||null;let n=t[t.length-2].length<=3?3:2;return t.slice(-n).join(`.`)}function Hn(e,t=64){let n=Vn(Bn(e));return n?`https://www.google.com/s2/favicons?domain=${encodeURIComponent(n)}&sz=${t}`:null}function Un(e){return!!(e.seoTitle?.trim()||e.link?.trim())}function Wn(e){return e.seoTitle?.trim()||(Bn(e.link)??e.link?.trim()??``)}function Gn(e){return e.type===`url`||e.type===`phone`}function Kn(e,t,n=A){if(!e)return[];let r=e.visitorChatHistory;if(!r||typeof r!=`object`)return[];let i=r.items;return Array.isArray(i)?i.filter(e=>typeof e==`object`&&!!e).map((e,r)=>{let i=e.sender??{},a=typeof e.deliveryStatus==`string`?e.deliveryStatus:void 0,o=typeof i.avatar==`string`?i.avatar:void 0,s=e.buttons,c=Array.isArray(s)?s.filter(e=>typeof e==`object`&&!!e).map(e=>{let t=typeof e.label==`string`?e.label:typeof e.text==`string`?e.text:``,n=typeof e.value==`string`?e.value:typeof e.payload==`string`?e.payload:t,r=typeof e.type==`string`?e.type.toLowerCase():void 0,i=typeof e.url==`string`?e.url:void 0,a=typeof e.phoneNumber==`string`?e.phoneNumber:void 0;return{text:t,payload:n,...r?{type:r}:{},...i?{url:i}:{},...a?{phoneNumber:a}:{}}}).filter(e=>!!e.text):void 0,l=i.kind??`operator`,u=(()=>{if(typeof e.system!=`object`||e.system===null)return;let t=e.system;if(t.type!==`OPERATOR_CONNECTED`&&t.type!==`CHAT_RESOLVED`)return;let n=t.initiator===`VISITOR`||t.initiator===`OPERATOR`||t.initiator===`SYSTEM`?t.initiator:void 0;return{type:t.type,...typeof t.operatorName==`string`?{operatorName:t.operatorName}:{},...typeof t.operatorAvatar==`string`?{operatorAvatar:t.operatorAvatar}:{},...n?{initiator:n}:{}}})(),d=l===`ai`||l===`bot`?n:i.name??``,f=qn(e.media),p=(()=>{if(typeof e.caption==`string`)return e.caption;let t=e.media,n=Array.isArray(t)?t[0]:t;return n&&typeof n==`object`&&typeof n.caption==`string`?n.caption:``})(),m=Jn(e.sources),h=typeof e.createdAt==`string`?e.createdAt:void 0;return{id:String(e.id??`m-${r}`),direction:e.direction===`INBOUND`?`INBOUND`:`OUTBOUND`,text:p||(typeof e.text==`string`?e.text:``),ageLabel:Xn(h,t),...h?{createdAt:h}:{},sender:{kind:l,name:d,...o?{avatar:o}:{}},...f.length>0?{media:f}:{},...m.length>0?{sources:m}:{},...c&&c.length>0?{buttons:c}:{},...a?{deliveryStatus:a}:{},...u?{system:u}:{}}}).reverse():[]}function qn(e){return e?(Array.isArray(e)?e:typeof e==`object`&&e?[typeof e.mediaId==`object`&&e.mediaId!==null?e.mediaId:e]:[]).filter(e=>typeof e==`object`&&!!e).map(e=>{let t=typeof e.url==`string`?e.url:``,n=typeof e.mimeType==`string`?e.mimeType:typeof e.mimetype==`string`?e.mimetype:``,r=typeof e.filename==`string`?e.filename:typeof e.alt==`string`?e.alt:``,i=Q(e.width),a=Q(e.height);return n===`video/webm`&&!(i&&a)&&(n=`audio/webm`),{url:t,mimetype:n,alt:r,...i&&a?{width:i,height:a}:{}}}).filter(e=>!!e.url&&!!e.mimetype):[]}function Q(e){let t=typeof e==`number`?e:typeof e==`string`?Number(e):NaN;return Number.isFinite(t)&&t>0?t:void 0}function Jn(e){if(!Array.isArray(e))return[];let t=e=>typeof e==`string`?e:null;return e.map(e=>{if(!e||typeof e!=`object`)return null;let n=e;return{link:t(n.link),seoTitle:t(n.seoTitle),seoDescription:t(n.seoDescription)}}).filter(e=>!!e&&Un(e))}function Yn(e,t){let n=atob(e),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return new Blob([r],{type:t})}function Xn(e,t){if(!e)return``;try{return new Date(e).toLocaleTimeString(t,{hour:`numeric`,minute:`2-digit`})}catch{return``}}function Zn(e,t,n){return n?{key:t,title:n}:e?.key===t?null:e}function Qn(e,t){return e&&e.key===t?e.title:null}function $n(e,t,n,r=`right`){let i=t.width,a=0,o=t.height,s=!1;for(let t of e)t.width<=0&&t.height<=0||(s=!0,t.left<i&&(i=t.left),t.left+t.width>a&&(a=t.left+t.width),t.top<o&&(o=t.top));return s?{width:r===`left`?Math.ceil(a)+n:Math.ceil(t.width-i)+n,height:Math.ceil(t.height-o)+n}:null}function er(e,t,n=`text/plain;charset=utf-8`){try{let r=new Blob([t],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);return a.href=i,a.download=e,a.rel=`noopener`,a.style.display=`none`,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3),!0}catch{return!1}}function tr(e,t=`transcript`){return e.normalize(`NFKD`).replace(/[^\w.-]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,80)||t}var nr=`
|
|
2
2
|
items {
|
|
3
3
|
id
|
|
4
4
|
title
|
|
@@ -10,19 +10,19 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
10
10
|
}
|
|
11
11
|
nextOffset
|
|
12
12
|
hasNext
|
|
13
|
-
`,
|
|
13
|
+
`,rr=Me`
|
|
14
14
|
query VisitorGifSearch($q: String!, $type: GifMediaType!, $offset: Int, $limit: Int) {
|
|
15
15
|
visitorGifSearch(q: $q, type: $type, offset: $offset, limit: $limit) {
|
|
16
|
-
${
|
|
16
|
+
${nr}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`,ir=Me`
|
|
20
20
|
query VisitorGifTrending($type: GifMediaType!, $offset: Int, $limit: Int) {
|
|
21
21
|
visitorGifTrending(type: $type, offset: $offset, limit: $limit) {
|
|
22
|
-
${
|
|
22
|
+
${nr}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,ar=Me`
|
|
26
26
|
mutation UploadVisitorMediaFromUrl($sourceUrl: String!, $kind: GifIngestKind!) {
|
|
27
27
|
uploadVisitorMediaFromUrl(sourceUrl: $sourceUrl, kind: $kind) {
|
|
28
28
|
url
|
|
@@ -31,7 +31,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
31
31
|
size
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
`;function
|
|
34
|
+
`;function or(){let e=lt();return G(async(t,n)=>{let r=(await e.mutate({mutation:ar,variables:{sourceUrl:t,kind:n},errorPolicy:`none`})).data?.uploadVisitorMediaFromUrl;if(!r?.mediaId)throw Error(`giphy ingest: empty response`);return r},[e])}function sr(){let e=lt();return{fetchPage:G(async({type:t,query:n,offset:r})=>{let i=n.length>0,a=(await e.query({query:i?rr:ir,variables:i?{q:n,type:t,offset:r}:{type:t,offset:r},fetchPolicy:`network-only`,errorPolicy:`none`})).data[i?`visitorGifSearch`:`visitorGifTrending`];return{items:a.items,nextOffset:a.nextOffset??null,hasNext:a.hasNext}},[e]),ingest:or()}}function cr(e){return e===`STICKER`?`STICKER`:`IMAGE`}var lr={},$=Me`
|
|
35
35
|
query VisitorProfilePreferences {
|
|
36
36
|
visitorProfile {
|
|
37
37
|
preferences {
|
|
@@ -42,7 +42,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
42
42
|
themeModeEditable
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
`;function
|
|
45
|
+
`;function ur(e){return Xe($,{...lr,...e})}var dr=Me`
|
|
46
46
|
query VisitorProfile {
|
|
47
47
|
visitorProfile {
|
|
48
48
|
fields {
|
|
@@ -62,7 +62,7 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
62
62
|
themeModeEditable
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
`;function
|
|
65
|
+
`;function fr(e){return Xe(dr,{...lr,...e})}var pr=Me`
|
|
66
66
|
mutation UpdateVisitorProfile($input: UpdateVisitorProfileInput!) {
|
|
67
67
|
updateVisitorProfile(input: $input) {
|
|
68
68
|
fields {
|
|
@@ -82,24 +82,24 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
82
82
|
themeModeEditable
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
`;function dr(e){return v(ur,{...or,...e})}function fr(e){return e.override?e.override===`SIGNED_IN`:e.verified||e.sessionVisitors===`SIGNED_IN`}function pr(e){if(e instanceof HTMLElement&&(e.hasAttribute(`data-wx-peek`)||e.hasAttribute(`data-wx-popup`)))return{left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight};let t=e.getBoundingClientRect();return{left:t.left,top:t.top,width:t.width,height:t.height}}var mr=[`fab`,`peek`,`popup`],hr=new Map;function gr(e,t){return hr.set(e,t),()=>{hr.get(e)===t&&hr.delete(e)}}var _r={fab:e=>e?gr(`fab`,e):void 0,peek:e=>e?gr(`peek`,e):void 0,popup:e=>e?gr(`popup`,e):void 0};function vr(e){return hr.get(e)??null}function yr(){let e=[];for(let t of mr){let n=hr.get(t);n&&e.push(pr(n))}return e}function br({onRetry:e}){let t=i(`chunkError`);return Z(`div`,{role:`status`,className:`text-wx-fg-muted flex items-center gap-2 p-3 text-xs`,children:[X(`span`,{children:t(`failed`)}),X(`button`,{type:`button`,onClick:e,className:`text-wx-primary rounded-wx-sm font-medium underline underline-offset-2`,children:t(`retry`)})]})}var xr=[800,2400],Sr=/failed to fetch dynamically imported module|error loading dynamically imported module|importing a module script failed|loading (css )?chunk|failed to fetch|load failed|networkerror/i;function Cr(e){return e instanceof Error?e.name===`ChunkLoadError`||Sr.test(e.message):!1}var wr=/(?:failed to fetch|error loading) dynamically imported module:\s*(\S+)/i;function Tr(e){return e instanceof Error?wr.exec(e.message)?.[1]??null:null}function Er(e,t){let n=e.replace(/([?&])wexio-retry=[\w-]+&?/,`$1`).replace(/[?&]$/,``);return`${n}${n.includes(`?`)?`&`:`?`}wexio-retry=${t}`}function Dr(){let e=Error(`Failed to load the chunk: the module does not have the expected export`);return e.name=`ChunkLoadError`,e}async function Or(e,t=xr,n,r=()=>!0){let i=async()=>{let t=await e();if(!r(t))throw Dr();return t},a=i;for(let e=0;;e++)try{return await a()}catch(o){let s=t[e];if(s===void 0||!Cr(o))throw o;let c=n?Tr(o):null,l=e+1;c&&n&&(a=async()=>{let e=await n(c,l);return r(e)?e:i()}),await new Promise(e=>setTimeout(e,s))}}function kr(e,t){return import(/* webpackIgnore: true */ /* turbopackIgnore: true */ Er(e,`${Date.now().toString(36)}-${t}`))}function Ar(e){return typeof e==`function`||typeof e==`object`&&!!e&&`$$typeof`in e}var jr=e=>{try{return e()}catch{return}},Mr=new WeakSet;function Nr(e,t,n={}){let r=n.retryDelays??xr,i=n.pick??(e=>e.default),a=()=>{let n={failed:!1,Loaded:_n(async()=>{try{return{default:i(await Or(t,r,(e,t)=>kr(e,t),e=>Ar(jr(()=>i(e)))))}}catch(t){let r=t instanceof Error?t:Error(String(t));throw n.failed=!0,Mr.add(r),Cr(r)?console.warn(`[wexio] the "${e}" chunk failed to load; that feature is unavailable until it is retried`,r):console.error(`[wexio] the "${e}" chunk threw while loading`,r),r}})};return n},o=a(),s=()=>{o.failed&&(o=a())};return function(e){let[t,n]=Y(0),r=o.Loaded;return X(Pr,{onRetry:()=>{s(),n(e=>e+1)},children:X(r,{...e})},t)}}var Pr=class extends fn{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}render(){let{error:e}=this.state;if(!e)return this.props.children;if(!Mr.has(e))throw e;return X(br,{onRetry:this.props.onRetry})}};function Fr(e,t,n){return{width:e+n.marginX+64,height:t+n.marginY+32}}function Ir(e,t,n=800){let r=performance.now(),i=0,a=!1,o=()=>{if(a)return;let s=e();if(!s||Number(getComputedStyle(s).opacity)<=.01||performance.now()-r>=n){t();return}i=requestAnimationFrame(o)};return i=requestAnimationFrame(o),()=>{a=!0,cancelAnimationFrame(i)}}var Lr=4096;function Rr(){let e=Te(),{preview:t}=I();K(()=>(t.onRequest=t=>e.onPreviewTokenRequest?.(t),()=>{t.onRequest=null}),[t,e]),K(()=>{if(e.kind!==`iframe`||typeof window>`u`)return;let n=n=>{if(!t.isExpected||!gt(n,e.kind))return;let r=n.data;if(!r||typeof r!=`object`||r.type!==`wexio:preview-token:v1`)return;let i=r.token;typeof i!=`string`||i.length===0||i.length>Lr||t.setToken(i)};return window.addEventListener(`message`,n),()=>window.removeEventListener(`message`,n)},[e.kind,t])}var zr=e=>`wexio:read-mark:${e??``}:`,Br=(e,t)=>`${zr(e)}${t}`;function Vr(e,t){let n={};try{let r=zr(t);for(let t=0;t<e.length;t++){let i=e.key(t);if(!i?.startsWith(r))continue;let a=Number(e.getItem(i));Number.isFinite(a)&&a>0&&(n[i.slice(r.length)]=a)}}catch{}return n}function Hr(e,t,n,r){if(!(!n||!Number.isFinite(r)))try{let i=Br(t,n),a=Number(e.getItem(i));if(Number.isFinite(a)&&a>=r)return;e.setItem(i,String(r))}catch{}}function Ur(e,t){let n=t[e.chatId];if(n===void 0||e.unreadCount<=0||!e.preview)return e;let r=Date.parse(e.preview.at);return Number.isNaN(r)||r>n?e:{...e,unreadCount:0}}var Wr={isLocal:()=>!1,snapshotOf:()=>void 0,remember:()=>{},keyFor:e=>F(e)},Gr=(e,t,n)=>e?ie(t,n):F(t,n),Kr=hn(Wr);function qr({value:e,children:t}){return X(Kr.Provider,{value:e,children:t})}function Jr(){return bn(Kr)}var Yr=new Set([`visitors`,`origins`,`paths`]);function Xr(e,t){if(e.length===0)return!0;let n=t.toLowerCase();return e.some(e=>{let t=e.toLowerCase();if(t.startsWith(`https://*.`)){let e=`.${t.slice(10)}`;return n.startsWith(`https://`)&&n.length>8+e.length&&n.endsWith(e)}return n===t})}function Zr(e){try{return decodeURIComponent(e)}catch{return e}}function Qr(e){if(e.length<=1||!e.endsWith(`/`))return e;let t=e.length;for(;t>0&&e.charCodeAt(t-1)===47;)t--;return t===0?`/`:e.slice(0,t)}function $r(e){try{return new URL(e).pathname}catch{return e.split(/[?#]/)[0]||`/`}}function ei(e,t){let n=Qr(Zr($r(t)).toLowerCase()),r=Zr(e.value).toLowerCase();switch(e.match){case`EQUALS`:return n===Qr(r);case`STARTS_WITH`:return n.startsWith(r);case`CONTAINS`:return n.includes(r);default:return!1}}function ti(e,t){return e===void 0||e===`ALL`?!0:(e===`ANONYMOUS`||e===`SIGNED_IN`)&&e===t}function ni(e,t){return e?!(Object.keys(e).some(e=>!Yr.has(e))||!ti(e.visitors,t.visitors)||e.origins!==void 0&&(!Array.isArray(e.origins)||!Xr(e.origins,t.origin))||e.paths!==void 0&&(!Array.isArray(e.paths)||e.paths.length>0&&!e.paths.some(e=>ei(e,t.url)))):!0}function ri(e,t){return e.find(e=>ni(e.when,t))??null}var ii=hn({slots:null,visitors:null,blocked:null,settled:!0,refresh:()=>{}});function ai({value:e,children:t}){return X(ii.Provider,{value:e,children:t})}function oi(){return bn(ii)}var si=e=>e.replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim();function ci(e,t){if(e.senderKind!==`bot`&&e.senderKind!==`ai`)return!1;let n=si(e.text??``);return!n||!t?!1:t.some(e=>e.kind===`MESSAGE`&&e.variants.some(e=>si(e.text)===n))}var li=`wexio:widget:viewport-request:v1`;function ui(){typeof window>`u`||window.parent?.postMessage({type:li},`*`)}function di(){let e=Te().kind===`iframe`,[t,n]=Y(null);return K(()=>{if(!e)return;let t=e=>{if(!gt(e,`iframe`))return;let t=e.data;!t||typeof t!=`object`||t.type!==`wexio:host-viewport:v1`||typeof t.width==`number`&&t.width>0&&n(t.width)};return window.addEventListener(`message`,t),ui(),()=>window.removeEventListener(`message`,t)},[e]),t}function fi(e){let{enabled:t,storage:n,publicKey:r,injected:i,sessionIds:a,variantThreads:o=!1}=e,s=r??``,[c,l]=Y(()=>me(n,s)),[u,d]=Y(()=>new Set),f=G(e=>t&&(Object.keys(c).some(t=>x(t).slotKeyId===k(e))||u.has(e)||i.has(e)&&!a?.has(e)),[t,c,u,i,a]),p=G((e,t,r=!1)=>l(Dt(n,s,{slotId:e,variant:t,pinVariant:r})),[n,s]),m=G((e,t,n=!1)=>{d(t=>new Set(t).add(e)),t&&p(e,t,n)},[p]);return q(()=>({isLocal:f,snapshotOf:e=>{let{slotKeyId:t,variantKeyId:n}=x(e);return c[ce(t,n)]},remember:p,keyFor:(e,t)=>Gr(f(e),e,o?t:void 0),markLocal:m}),[f,c,p,m,o])}function pi(e){try{let t=new URL(e);return{origin:t.origin,url:t.href}}catch{return{origin:``,url:``}}}function mi(e,t){if(!t||t.origin===void 0&&t.path===void 0)return e;let n=t.origin??e.origin,r=t.path;if(r===void 0)try{let t=new URL(e.url);r=`${t.pathname}${t.search}`}catch{r=`/`}return r.startsWith(`/`)||(r=`/${r}`),{origin:n,url:`${n}${r}`}}function hi(){return{subscribe:oe,getSnapshot:()=>window.location.href}}var gi=null;function _i(){let e=new URLSearchParams(window.location.search).get(`referer`)??``;if(gi?.key===e)return gi.store;let t=e,n=new Set;window.addEventListener(`message`,e=>{if(!gt(e,`iframe`))return;let r=e.data;if(!(!r||typeof r!=`object`||r.type!==`wexio:host-navigation:v1`)&&!(typeof r.url!=`string`||r.url===t)){t=r.url;for(let e of n)e()}});let r={subscribe(e){return n.add(e),()=>n.delete(e)},getSnapshot:()=>t};return gi={key:e,store:r},r}var vi=()=>``;function yi(e){let t=Te(),n=q(()=>typeof window>`u`?null:t.kind===`iframe`?_i():hi(),[t.kind]),r=Cn(n?.subscribe??(()=>()=>{}),n?.getSnapshot??vi,vi),i=e?.origin,a=e?.path;return q(()=>mi(pi(r),{origin:i,path:a}),[r,i,a])}function bi(){return xi(oi().visitors)}function xi(e){let{audienceOverride:t}=Te(),n=yi(t),r=t?.visitors??e;return q(()=>({visitors:r,origin:n.origin,url:n.url}),[r,n])}async function Si(e){let t=new AbortController,n=()=>t.abort();e.signal?.addEventListener(`abort`,n),e.signal?.aborted&&t.abort();let r=setTimeout(()=>t.abort(),e.timeoutMs??3e3);try{let n=new URL(`${re()}/api/web/config/${encodeURIComponent(e.publicKey)}/session`);e.locale&&n.searchParams.set(`locale`,e.locale);let r=await fetch(n.toString(),{method:`GET`,headers:{"x-web-public-key":e.publicKey,Authorization:`Bearer ${e.token}`,...e.previewToken?{[Oe]:e.previewToken}:{}},credentials:`omit`,cache:`no-store`,signal:t.signal});if(e.previewToken&&(r.status===401||r.status===403)){let e=pe(await r.json().catch(()=>null));if(e)return{kind:`unauthorized`,previewReason:e}}if(r.status===401)return{kind:`unauthorized`};if(!r.ok)return{kind:`failed`};let i=await r.json();if(!i||typeof i!=`object`||Array.isArray(i))return{kind:`failed`};let a=i.visitors;return{kind:`ok`,visitors:a===`ANONYMOUS`||a===`SIGNED_IN`?a:null,blocked:typeof i.blocked==`boolean`?i.blocked:null,slots:we(i),capabilities:Array.isArray(i.capabilities)?Ee(i.capabilities):null}}catch{return{kind:`failed`}}finally{clearTimeout(r),e.signal?.removeEventListener(`abort`,n)}}var Ci=6e3;function wi(e){let{publicKey:t,token:n,locale:r,anonymous:i=!1}=e,a=n?e.visitorKey??n:null,o=J(n);o.current=n;let s=I(),c=Ce().paused,l=e.enabled&&!c,[u,d]=Y({token:null,slots:null,visitors:null,blocked:null,capabilities:null,settled:!1}),[f,p]=Y(0),m=J(0),h=J(null),g=u.token!==a;g?d({token:a,slots:null,visitors:null,blocked:null,capabilities:null,settled:!1}):u.rejected&&u.rejected!==n&&(d({...u,rejected:null}),p(e=>e+1)),K(()=>{let e=o.current;if(!l||!t||!e||!a)return;h.current?.abort();let n=new AbortController;h.current=n;let i=++m.current,c=s.preview.token;return Si({publicKey:t,token:e,locale:r,previewToken:c,signal:n.signal}).then(t=>{i===m.current&&(t.kind===`unauthorized`&&t.previewReason&&s.preview.report(t.previewReason,c),d(n=>n.token===a?t.kind===`ok`?{token:a,slots:t.slots,visitors:t.visitors,blocked:t.blocked,capabilities:t.capabilities,settled:!0}:t.kind===`unauthorized`?{token:a,slots:null,visitors:null,blocked:null,capabilities:null,settled:!0,rejected:e}:{...n,settled:!0}:n))}),()=>{n.abort()}},[l,t,a,r,f,s]),K(()=>{if(!l||n)return;let e=setTimeout(()=>d(e=>({...e,settled:!0})),Ci);return()=>clearTimeout(e)},[l,n]);let _=G(()=>p(e=>e+1),[]),v=l&&!g,y=v?u.slots:null,b=v?u.visitors??(i&&n?`ANONYMOUS`:null):null,x=v?u.blocked:null,S=v?u.capabilities:null,C=!l||!g&&u.settled;return q(()=>({slots:y,visitors:b,blocked:x,capabilities:S,settled:C,refresh:_}),[y,b,x,S,C,_])}function Ti(e){return e===`image/gif`?`[GIF]`:e.startsWith(`image/`)?`[Image]`:e.startsWith(`video/`)?`[Video]`:e.startsWith(`audio/`)?`[Audio]`:e===`application/pdf`?`[PDF]`:`[File]`}function Ei(e){if(!e)return``;try{return(new DOMParser().parseFromString(e,`text/html`).body.textContent??``).replace(/\s+/g,` `).trim()}catch{return e.replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim()}}function Di(e,t){let n=e.sender.kind;return n===`visitor`?t.visitorLabel:n===`ai`||n===`bot`?t.aiName:e.sender.name?.trim()||t.t(`operator`)}function Oi(e){let t=(e.media??[]).map(e=>Ti(e.mimetype)),n=Ei(e.text??``);return[...t,n].filter(Boolean).join(` `)}function ki(e,t,n){return new Intl.DateTimeFormat(t,{hour:`2-digit`,minute:`2-digit`,timeZone:n}).format(e)}function Ai(e,t,n){let r=new Intl.DateTimeFormat(t,{dateStyle:`long`,timeStyle:`short`,timeZone:n}).format(e),i=ji(e,t,n);return i?`${r} ${i}`:r}function ji(e,t,n){let r=r=>{try{return new Intl.DateTimeFormat(t,{timeZone:n,timeZoneName:r}).formatToParts(e).find(e=>e.type===`timeZoneName`)?.value??``}catch{return``}},i=r(`long`),a=r(`longOffset`)||r(`shortOffset`);return i&&a?`${i} (${a})`:i||a}function Mi(e,t){let{orgName:n,locale:r,timeZone:i,t:a}=t,o=t.now??new Date,s=e.map(e=>{let n=Oi(e);if(!n)return null;let a=e.createdAt?new Date(e.createdAt):null;return`${a&&!Number.isNaN(a.getTime())?ki(a,r,i):``} | ${Di(e,t)}: ${n}`.replace(/^ \| /,``)}).filter(e=>e!==null),c=e.find(e=>e.createdAt)?.createdAt,l=c?new Date(c):o,u=[a(`title`,{org:n}),a(`started`,{when:Ai(l,r,i)})].join(`
|
|
86
|
-
`),d=[...t.truncated?[a(`truncated`)]:[],a(`exported`,{org:n,when:
|
|
85
|
+
`;function mr(e){return pt(pr,{...lr,...e})}function hr(e){return e.override?e.override===`SIGNED_IN`:e.verified||e.sessionVisitors===`SIGNED_IN`}function gr(e){if(e instanceof HTMLElement&&(e.hasAttribute(`data-wx-peek`)||e.hasAttribute(`data-wx-popup`)))return{left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight};let t=e.getBoundingClientRect();return{left:t.left,top:t.top,width:t.width,height:t.height}}var _r=[`fab`,`peek`,`popup`],vr=new Map;function yr(e,t){return vr.set(e,t),()=>{vr.get(e)===t&&vr.delete(e)}}var br={fab:e=>e?yr(`fab`,e):void 0,peek:e=>e?yr(`peek`,e):void 0,popup:e=>e?yr(`popup`,e):void 0};function xr(e){return vr.get(e)??null}function Sr(){let e=[];for(let t of _r){let n=vr.get(t);n&&e.push(gr(n))}return e}function Cr({onRetry:e}){let t=i(`chunkError`);return Z(`div`,{role:`status`,className:`text-wx-fg-muted flex items-center gap-2 p-3 text-xs`,children:[X(`span`,{children:t(`failed`)}),X(`button`,{type:`button`,onClick:e,className:`text-wx-primary rounded-wx-sm font-medium underline underline-offset-2`,children:t(`retry`)})]})}var wr=[800,2400],Tr=/failed to fetch dynamically imported module|error loading dynamically imported module|importing a module script failed|loading (css )?chunk|failed to fetch|load failed|networkerror/i;function Er(e){return e instanceof Error?e.name===`ChunkLoadError`||Tr.test(e.message):!1}var Dr=/(?:failed to fetch|error loading) dynamically imported module:\s*(\S+)/i;function Or(e){return e instanceof Error?Dr.exec(e.message)?.[1]??null:null}function kr(e,t){let n=e.replace(/([?&])wexio-retry=[\w-]+&?/,`$1`).replace(/[?&]$/,``);return`${n}${n.includes(`?`)?`&`:`?`}wexio-retry=${t}`}function Ar(){let e=Error(`Failed to load the chunk: the module does not have the expected export`);return e.name=`ChunkLoadError`,e}async function jr(e,t=wr,n,r=()=>!0){let i=async()=>{let t=await e();if(!r(t))throw Ar();return t},a=i;for(let e=0;;e++)try{return await a()}catch(o){let s=t[e];if(s===void 0||!Er(o))throw o;let c=n?Or(o):null,l=e+1;c&&n&&(a=async()=>{let e=await n(c,l);return r(e)?e:i()}),await new Promise(e=>setTimeout(e,s))}}function Mr(e,t){return import(/* webpackIgnore: true */ /* turbopackIgnore: true */ kr(e,`${Date.now().toString(36)}-${t}`))}function Nr(e){return typeof e==`function`||typeof e==`object`&&!!e&&`$$typeof`in e}var Pr=e=>{try{return e()}catch{return}},Fr=new WeakSet;function Ir(e,t,n={}){let r=n.retryDelays??wr,i=n.pick??(e=>e.default),a=()=>{let n={failed:!1,Loaded:bn(async()=>{try{return{default:i(await jr(t,r,(e,t)=>Mr(e,t),e=>Nr(Pr(()=>i(e)))))}}catch(t){let r=t instanceof Error?t:Error(String(t));throw n.failed=!0,Fr.add(r),Er(r)?console.warn(`[wexio] the "${e}" chunk failed to load; that feature is unavailable until it is retried`,r):console.error(`[wexio] the "${e}" chunk threw while loading`,r),r}})};return n},o=a(),s=()=>{o.failed&&(o=a())};return function(e){let[t,n]=Y(0),r=o.Loaded;return X(Lr,{onRetry:()=>{s(),n(e=>e+1)},children:X(r,{...e})},t)}}var Lr=class extends hn{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}render(){let{error:e}=this.state;if(!e)return this.props.children;if(!Fr.has(e))throw e;return X(Cr,{onRetry:this.props.onRetry})}};function Rr(e,t,n){return{width:e+n.marginX+64,height:t+n.marginY+32}}function zr(e,t,n=800){let r=performance.now(),i=0,a=!1,o=()=>{if(a)return;let s=e();if(!s||Number(getComputedStyle(s).opacity)<=.01||performance.now()-r>=n){t();return}i=requestAnimationFrame(o)};return i=requestAnimationFrame(o),()=>{a=!0,cancelAnimationFrame(i)}}var Br=4096;function Vr(){let e=fe(),{preview:t}=he();K(()=>(t.onRequest=t=>e.onPreviewTokenRequest?.(t),()=>{t.onRequest=null}),[t,e]),K(()=>{if(e.kind!==`iframe`||typeof window>`u`)return;let n=n=>{if(!t.isExpected||!Ze(n,e.kind))return;let r=n.data;if(!r||typeof r!=`object`||r.type!==`wexio:preview-token:v1`)return;let i=r.token;typeof i!=`string`||i.length===0||i.length>Br||t.setToken(i)};return window.addEventListener(`message`,n),()=>window.removeEventListener(`message`,n)},[e.kind,t])}var Hr=e=>`wexio:read-mark:${e??``}:`,Ur=(e,t)=>`${Hr(e)}${t}`;function Wr(e,t){let n={};try{let r=Hr(t);for(let t=0;t<e.length;t++){let i=e.key(t);if(!i?.startsWith(r))continue;let a=Number(e.getItem(i));Number.isFinite(a)&&a>0&&(n[i.slice(r.length)]=a)}}catch{}return n}function Gr(e,t,n,r){if(!(!n||!Number.isFinite(r)))try{let i=Ur(t,n),a=Number(e.getItem(i));if(Number.isFinite(a)&&a>=r)return;e.setItem(i,String(r))}catch{}}function Kr(e,t){let n=t[e.chatId];if(n===void 0||e.unreadCount<=0||!e.preview)return e;let r=Date.parse(e.preview.at);return Number.isNaN(r)||r>n?e:{...e,unreadCount:0}}var qr={isLocal:()=>!1,snapshotOf:()=>void 0,remember:()=>{},keyFor:e=>Ee(e)},Jr=(e,t,n)=>e?x(t,n):Ee(t,n),Yr=vn(qr);function Xr({value:e,children:t}){return X(Yr.Provider,{value:e,children:t})}function Zr(){return Cn(Yr)}var Qr=new Set([`visitors`,`origins`,`paths`]);function $r(e,t){if(e.length===0)return!0;let n=t.toLowerCase();return e.some(e=>{let t=e.toLowerCase();if(t.startsWith(`https://*.`)){let e=`.${t.slice(10)}`;return n.startsWith(`https://`)&&n.length>8+e.length&&n.endsWith(e)}return n===t})}function ei(e){try{return decodeURIComponent(e)}catch{return e}}function ti(e){if(e.length<=1||!e.endsWith(`/`))return e;let t=e.length;for(;t>0&&e.charCodeAt(t-1)===47;)t--;return t===0?`/`:e.slice(0,t)}function ni(e){try{return new URL(e).pathname}catch{return e.split(/[?#]/)[0]||`/`}}function ri(e,t){let n=ti(ei(ni(t)).toLowerCase()),r=ei(e.value).toLowerCase();switch(e.match){case`EQUALS`:return n===ti(r);case`STARTS_WITH`:return n.startsWith(r);case`CONTAINS`:return n.includes(r);default:return!1}}function ii(e,t){return e===void 0||e===`ALL`?!0:(e===`ANONYMOUS`||e===`SIGNED_IN`)&&e===t}function ai(e,t){return e?!(Object.keys(e).some(e=>!Qr.has(e))||!ii(e.visitors,t.visitors)||e.origins!==void 0&&(!Array.isArray(e.origins)||!$r(e.origins,t.origin))||e.paths!==void 0&&(!Array.isArray(e.paths)||e.paths.length>0&&!e.paths.some(e=>ri(e,t.url)))):!0}function oi(e,t){return e.find(e=>ai(e.when,t))??null}var si=vn({slots:null,visitors:null,blocked:null,settled:!0,refresh:()=>{}});function ci({value:e,children:t}){return X(si.Provider,{value:e,children:t})}function li(){return Cn(si)}var ui=e=>e.replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim();function di(e,t){if(e.senderKind!==`bot`&&e.senderKind!==`ai`)return!1;let n=ui(e.text??``);return!n||!t?!1:t.some(e=>e.kind===`MESSAGE`&&e.variants.some(e=>ui(e.text)===n))}var fi=`wexio:widget:viewport-request:v1`;function pi(){typeof window>`u`||window.parent?.postMessage({type:fi},`*`)}function mi(){let e=fe().kind===`iframe`,[t,n]=Y(null);return K(()=>{if(!e)return;let t=e=>{if(!Ze(e,`iframe`))return;let t=e.data;!t||typeof t!=`object`||t.type!==`wexio:host-viewport:v1`||typeof t.width==`number`&&t.width>0&&n(t.width)};return window.addEventListener(`message`,t),pi(),()=>window.removeEventListener(`message`,t)},[e]),t}function hi(e){let{enabled:t,storage:n,publicKey:r,injected:i,sessionIds:a,variantThreads:o=!1}=e,s=r??``,[c,l]=Y(()=>xe(n,s)),[u,d]=Y(()=>new Set),f=G(e=>t&&(Object.keys(c).some(t=>be(t).slotKeyId===me(e))||u.has(e)||i.has(e)&&!a?.has(e)),[t,c,u,i,a]),p=G((e,t,r=!1)=>l(M(n,s,{slotId:e,variant:t,pinVariant:r})),[n,s]),m=G((e,t,n=!1)=>{d(t=>new Set(t).add(e)),t&&p(e,t,n)},[p]);return q(()=>({isLocal:f,snapshotOf:e=>{let{slotKeyId:t,variantKeyId:n}=be(e);return c[P(t,n)]},remember:p,keyFor:(e,t)=>Jr(f(e),e,o?t:void 0),markLocal:m}),[f,c,p,m,o])}function gi(e){try{let t=new URL(e);return{origin:t.origin,url:t.href}}catch{return{origin:``,url:``}}}function _i(e,t){if(!t||t.origin===void 0&&t.path===void 0)return e;let n=t.origin??e.origin,r=t.path;if(r===void 0)try{let t=new URL(e.url);r=`${t.pathname}${t.search}`}catch{r=`/`}return r.startsWith(`/`)||(r=`/${r}`),{origin:n,url:`${n}${r}`}}function vi(){return{subscribe:k,getSnapshot:()=>window.location.href}}var yi=null;function bi(){let e=new URLSearchParams(window.location.search).get(`referer`)??``;if(yi?.key===e)return yi.store;let t=e,n=new Set;window.addEventListener(`message`,e=>{if(!Ze(e,`iframe`))return;let r=e.data;if(!(!r||typeof r!=`object`||r.type!==`wexio:host-navigation:v1`)&&!(typeof r.url!=`string`||r.url===t)){t=r.url;for(let e of n)e()}});let r={subscribe(e){return n.add(e),()=>n.delete(e)},getSnapshot:()=>t};return yi={key:e,store:r},r}var xi=()=>``;function Si(e){let t=fe(),n=q(()=>typeof window>`u`?null:t.kind===`iframe`?bi():vi(),[t.kind]),r=En(n?.subscribe??(()=>()=>{}),n?.getSnapshot??xi,xi),i=e?.origin,a=e?.path;return q(()=>_i(gi(r),{origin:i,path:a}),[r,i,a])}function Ci(){return wi(li().visitors)}function wi(e){let{audienceOverride:t}=fe(),n=Si(t),r=t?.visitors??e;return q(()=>({visitors:r,origin:n.origin,url:n.url}),[r,n])}var Ti=2048,Ei=2048;function Di(e){try{let t=new URL(e).protocol;return t===`http:`||t===`https:`}catch{return!1}}function Oi(e){if(!e.url||!Di(e.url))return;let t=e.title?.slice(0,200),n=e.referrer?.slice(0,Ei),r=e.description?.trim().slice(0,500);return{url:e.url.slice(0,Ti),...t?{title:t}:{},...n?{referrer:n}:{},...r?{description:r}:{}}}var ki=null;function Ai(e){if(!Ze(e,`iframe`))return;let t=e.data;!t||typeof t!=`object`||t.type!==`wexio:host-navigation:v1`||typeof t.url==`string`&&(ki={url:t.url,title:typeof t.title==`string`?t.title:void 0,referrer:typeof t.referrer==`string`?t.referrer:void 0,description:typeof t.description==`string`?t.description:void 0})}typeof window<`u`&&window.addEventListener(`message`,Ai);function ji(){return document.querySelector(`meta[name="description"]`)?.getAttribute(`content`)?.trim()||(document.querySelector(`meta[property="og:description"]`)?.getAttribute(`content`)??void 0)}function Mi(e){if(!(typeof window>`u`)){if(e===`iframe`){let e=new URLSearchParams(window.location.search).get(`referer`)??void 0;return Oi(ki??{url:e})}return Oi({url:window.location.href,title:document.title,referrer:document.referrer,description:ji()})}}function Ni(e){if(!e)return{};let t;try{t=new URL(e.url).pathname.slice(0,200)}catch{t=void 0}let n=e.title?.trim().slice(0,120);return{...n?{pageTitle:n}:{},...t?{pagePath:t}:{}}}async function Pi(e){let t=new AbortController,n=()=>t.abort();e.signal?.addEventListener(`abort`,n),e.signal?.aborted&&t.abort();let r=setTimeout(()=>t.abort(),e.timeoutMs??3e3);try{let n=new URL(`${Te()}/api/web/config/${encodeURIComponent(e.publicKey)}/session`);e.locale&&n.searchParams.set(`locale`,e.locale),e.page?.pageTitle&&n.searchParams.set(`pageTitle`,e.page.pageTitle),e.page?.pagePath&&n.searchParams.set(`pagePath`,e.page.pagePath);let r=await fetch(n.toString(),{method:`GET`,headers:{"x-web-public-key":e.publicKey,Authorization:`Bearer ${e.token}`,...e.previewToken?{[yt]:e.previewToken}:{}},credentials:`omit`,cache:`no-store`,signal:t.signal});if(e.previewToken&&(r.status===401||r.status===403)){let e=ot(await r.json().catch(()=>null));if(e)return{kind:`unauthorized`,previewReason:e}}if(r.status===401)return{kind:`unauthorized`};if(!r.ok)return{kind:`failed`};let i=await r.json();if(!i||typeof i!=`object`||Array.isArray(i))return{kind:`failed`};let a=i.visitors;return{kind:`ok`,visitors:a===`ANONYMOUS`||a===`SIGNED_IN`?a:null,blocked:typeof i.blocked==`boolean`?i.blocked:null,slots:Ve(i),capabilities:Array.isArray(i.capabilities)?v(i.capabilities):null}}catch{return{kind:`failed`}}finally{clearTimeout(r),e.signal?.removeEventListener(`abort`,n)}}var Fi=6e3;function Ii(e){let{publicKey:t,token:n,locale:r,anonymous:i=!1}=e,a=n?e.visitorKey??n:null,o=J(n);o.current=n;let s=he(),c=_().paused,l=e.enabled&&!c,[u,d]=Y({token:null,slots:null,visitors:null,blocked:null,capabilities:null,settled:!1}),[f,p]=Y(0),m=J(0),h=J(null),g=u.token!==a;g?d({token:a,slots:null,visitors:null,blocked:null,capabilities:null,settled:!1}):u.rejected&&u.rejected!==n&&(d({...u,rejected:null}),p(e=>e+1)),K(()=>{let n=o.current;if(!l||!t||!n||!a)return;h.current?.abort();let i=new AbortController;h.current=i;let c=++m.current,u=s.preview.token;return Pi({publicKey:t,token:n,locale:r,...e.pageKind?{page:Ni(Mi(e.pageKind))}:{},previewToken:u,signal:i.signal}).then(e=>{c===m.current&&(e.kind===`unauthorized`&&e.previewReason&&s.preview.report(e.previewReason,u),d(t=>t.token===a?e.kind===`ok`?{token:a,slots:e.slots,visitors:e.visitors,blocked:e.blocked,capabilities:e.capabilities,settled:!0}:e.kind===`unauthorized`?{token:a,slots:null,visitors:null,blocked:null,capabilities:null,settled:!0,rejected:n}:{...t,settled:!0}:t))}),()=>{i.abort()}},[l,t,a,r,f,s]),K(()=>{if(!l||n)return;let e=setTimeout(()=>d(e=>({...e,settled:!0})),Fi);return()=>clearTimeout(e)},[l,n]);let v=G(()=>p(e=>e+1),[]),y=l&&!g,b=y?u.slots:null,x=y?u.visitors??(i&&n?`ANONYMOUS`:null):null,S=y?u.blocked:null,C=y?u.capabilities:null,w=!l||!g&&u.settled;return q(()=>({slots:b,visitors:x,blocked:S,capabilities:C,settled:w,refresh:v}),[b,x,S,C,w,v])}function Li(e){return e===`image/gif`?`[GIF]`:e.startsWith(`image/`)?`[Image]`:e.startsWith(`video/`)?`[Video]`:e.startsWith(`audio/`)?`[Audio]`:e===`application/pdf`?`[PDF]`:`[File]`}function Ri(e){if(!e)return``;try{return(new DOMParser().parseFromString(e,`text/html`).body.textContent??``).replace(/\s+/g,` `).trim()}catch{return e.replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim()}}function zi(e,t){let n=e.sender.kind;return n===`visitor`?t.visitorLabel:n===`ai`||n===`bot`?t.aiName:e.sender.name?.trim()||t.t(`operator`)}function Bi(e){let t=(e.media??[]).map(e=>Li(e.mimetype)),n=Ri(e.text??``);return[...t,n].filter(Boolean).join(` `)}function Vi(e,t,n){return new Intl.DateTimeFormat(t,{hour:`2-digit`,minute:`2-digit`,timeZone:n}).format(e)}function Hi(e,t,n){let r=new Intl.DateTimeFormat(t,{dateStyle:`long`,timeStyle:`short`,timeZone:n}).format(e),i=Ui(e,t,n);return i?`${r} ${i}`:r}function Ui(e,t,n){let r=r=>{try{return new Intl.DateTimeFormat(t,{timeZone:n,timeZoneName:r}).formatToParts(e).find(e=>e.type===`timeZoneName`)?.value??``}catch{return``}},i=r(`long`),a=r(`longOffset`)||r(`shortOffset`);return i&&a?`${i} (${a})`:i||a}function Wi(e,t){let{orgName:n,locale:r,timeZone:i,t:a}=t,o=t.now??new Date,s=e.map(e=>{let n=Bi(e);if(!n)return null;let a=e.createdAt?new Date(e.createdAt):null;return`${a&&!Number.isNaN(a.getTime())?Vi(a,r,i):``} | ${zi(e,t)}: ${n}`.replace(/^ \| /,``)}).filter(e=>e!==null),c=e.find(e=>e.createdAt)?.createdAt,l=c?new Date(c):o,u=[a(`title`,{org:n}),a(`started`,{when:Hi(l,r,i)})].join(`
|
|
86
|
+
`),d=[...t.truncated?[a(`truncated`)]:[],a(`exported`,{org:n,when:Hi(o,r,i)})].join(`
|
|
87
87
|
`);return`${u}\n\n---\n\n${s.join(`
|
|
88
88
|
|
|
89
|
-
`)}\n\n---\n${d}\n`}function Ni(e){return e?`wexio:news-last-read:${e}`:`wexio:news-last-read`}function Pi(e,t){return e?e!==t:!1}function Fi({enabled:e,locale:t}){let n=I(),r=n.publicKey,i=n.storage,{data:a}=tn({variables:{args:{locale:t,limit:1}},skip:!e}),o=a?.visitorNewsList?.items?.[0]?._id??null,[s,c]=Y(null);K(()=>{if(!(typeof window>`u`))try{c(i.getItem(Ni(r)))}catch{c(null)}},[r,i]);let l=G(()=>{if(o){c(o);try{i.setItem(Ni(r),o)}catch{}}},[o,r,i]);return{hasUnread:e&&Pi(o,s),markRead:l}}var Ii=class extends Error{constructor(e=`permanent outbox failure`){super(e),this.name=`PermanentOpError`}},Li=`wexio-outbox`,Ri=`queues`,zi=1;function Bi(e,t){return[...e.filter(e=>!(e.clientKey===t.clientKey||t.semantics===`convergence`&&t.convergenceKey!==void 0&&e.semantics===`convergence`&&e.convergenceKey===t.convergenceKey)),t]}function Vi(e,t,n){return e.map(e=>e.clientKey===t?{...e,...n}:e)}function Hi(e,t){return e.filter(e=>e.clientKey!==t)}function Ui(e,t){let n=e.filter(e=>!(e.semantics===`beacon`&&e.expiresAt!=null&&e.expiresAt<=t));return n.length===e.length?e:n}function Wi(e){return e.filter(e=>e.status!==`sending`).sort((e,t)=>e.createdAt-t.createdAt)}function Gi(e){return e.filter(e=>e.semantics!==`beacon`)}function Ki(e){return Math.min(6e4,2e3*2**Math.max(0,e-1))}function qi(e){return!!e&&typeof e==`object`&&typeof e.clientKey==`string`&&typeof e.op==`string`&&typeof e.createdAt==`number`}function Ji(){let e=new Map;return{load:t=>Promise.resolve((e.get(t)??[]).filter(qi)),save:(t,n)=>(n.length===0?e.delete(t):e.set(t,n),Promise.resolve())}}function Yi(){return typeof indexedDB>`u`?Promise.resolve(null):new Promise(e=>{let t;try{t=indexedDB.open(Li,zi)}catch{e(null);return}t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(Ri)||e.createObjectStore(Ri)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null),t.onblocked=()=>e(null)})}async function Xi(e){if(!e)return[];let t=await Yi();return t?new Promise(n=>{try{let r=t.transaction(Ri,`readonly`).objectStore(Ri).get(e);r.onsuccess=()=>{let e=r.result;n(Array.isArray(e)?e.filter(qi):[])},r.onerror=()=>n([])}catch{n([])}}):[]}async function Zi(e,t){if(!e)return;let n=await Yi();if(n)return new Promise(r=>{try{let i=n.transaction(Ri,`readwrite`),a=i.objectStore(Ri);t.length===0?a.delete(e):a.put(t,e),i.oncomplete=()=>r(),i.onerror=()=>r(),i.onabort=()=>r()}catch{r()}})}var Qi={load:Xi,save:Zi};function $i(){return typeof indexedDB>`u`?Ji():Qi}function ea(e,t=$i(),n={}){let r=[],i=!1,a=new Set,o=()=>{for(let e of a)e(r)},s=(n.crossTab??!0)&&typeof BroadcastChannel<`u`?new BroadcastChannel(`${Li}:${e}`):null;return s&&(s.onmessage=async()=>{r=await t.load(e),o()}),{get:()=>r,set:n=>{i=!0,r=n,t.save(e,Gi(n)),s?.postMessage(`changed`),o()},subscribe:e=>(a.add(e),()=>a.delete(e)),ready:t.load(e).then(e=>{if(!i&&e.length>0){let t=Date.now();r=e.map(e=>e.status===`sending`&&(e.sendingSince===void 0||e.sendingSince>t||t-e.sendingSince>12e4)?{...e,status:`queued`}:e),o()}}),dispose:()=>{a.clear(),s?.close()}}}function ta(){try{if(typeof crypto<`u`&&`randomUUID`in crypto)return crypto.randomUUID()}catch{}return`ck-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function na(){return typeof navigator<`u`&&!navigator.onLine}function ra({publicKey:e,enabled:t,isolated:n=!1,paused:r=!1,run:i,onSent:a,isPermanent:o,onDropped:s}){let[c,l]=Y([]),[u,d]=Y(typeof navigator>`u`?!0:navigator.onLine),f=J(i),p=J(a),m=J(o),h=J(s);K(()=>{f.current=i,p.current=a,m.current=o,h.current=s});let g=J(null),_=J(!1),v=J(r);v.current=r;let y=J(null),b=J(()=>{});b.current=G(()=>{let e=g.current;!e||_.current||na()||v.current||(_.current=!0,(async()=>{try{for(;!(na()||v.current);){let t=Date.now(),n=Ui(e.get(),t);n!==e.get()&&e.set(n);let r=Wi(e.get()),i=r.find(e=>(e.nextAttemptAt??0)<=t);if(!i){let e=r.reduce((e,t)=>Math.min(e,t.nextAttemptAt??0),1/0);e!==1/0&&e>t&&(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>b.current(),e-t));break}e.set(Vi(e.get(),i.clientKey,{status:`sending`,sendingSince:Date.now()}));try{let t=await f.current(i,{patch:t=>e.set(Vi(e.get(),i.clientKey,{payload:t}))});p.current(i,t),e.set(Hi(e.get(),i.clientKey))}catch(t){if(t instanceof Ii||m.current?.(t)===!0)e.set(Hi(e.get(),i.clientKey)),h.current?.(i,t);else{let t=i.attempts+1;e.set(Vi(e.get(),i.clientKey,{status:`failed`,attempts:t,nextAttemptAt:Date.now()+Ki(t)}))}}}}finally{_.current=!1}})())},[]),K(()=>{if(!t||!e){l([]);return}let r=n?ea(e,Ji(),{crossTab:!1}):ea(e);g.current=r,l(r.get());let i=r.subscribe(e=>l(e));return r.ready.then(()=>{l(r.get()),b.current()}),()=>{i(),r.dispose(),g.current=null}},[t,e,n]);let x=J(r);return K(()=>{let e=x.current;if(x.current=r,r||!e)return;y.current&&clearTimeout(y.current);let t=g.current;if(t){let e=t.get().map(e=>({...e,nextAttemptAt:0}));e.length>0&&t.set(e)}b.current()},[r]),K(()=>{if(typeof window>`u`)return;let e=()=>{d(!0),y.current&&clearTimeout(y.current);let e=g.current;if(e){let t=e.get().map(e=>({...e,nextAttemptAt:0}));t.length>0&&e.set(t)}b.current()},t=()=>d(!1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]),K(()=>()=>{y.current&&clearTimeout(y.current)},[]),{ops:c,online:u,enqueue:G(e=>{let t={clientKey:ta(),op:e.op,semantics:e.semantics,...e.convergenceKey===void 0?{}:{convergenceKey:e.convergenceKey},payload:e.payload,createdAt:Date.now(),status:`queued`,attempts:0,...e.semantics===`beacon`&&e.ttlMs!==void 0?{expiresAt:Date.now()+e.ttlMs}:{}},n=g.current;return n&&(n.set(Bi(n.get(),t)),b.current()),t},[]),retry:G(e=>{let t=g.current;t&&(y.current&&clearTimeout(y.current),t.set(Vi(t.get(),e,{status:`queued`,attempts:0,nextAttemptAt:0})),b.current())},[]),discard:G(e=>{let t=g.current;t&&t.set(Hi(t.get(),e))},[]),clear:G(()=>{y.current&&clearTimeout(y.current);let t=g.current;t?t.set([]):e&&Zi(e,[])},[e])}}Array.from({length:21},(e,t)=>`wx-nt_${t+1}`);var ia=`wx-nt_`;function aa(e){return e?e.startsWith(`http://`)||e.startsWith(`https://`)?e:e.startsWith(ia)?O(`/sounds/${e}.mp3`):null:null}var oa=`wexio:sound-muted`;function sa(e){let t=I().storage,[n,r]=Y(!1),i=J(null),a=J(null);K(()=>{typeof window>`u`||r(t.getItem(oa)===`1`)},[t]),K(()=>{if(typeof window>`u`)return;i.current?.pause(),a.current?.pause();let t=aa(e?.inboundSoundId),n=aa(e?.outboundSoundId),r=typeof e?.volume==`number`?Math.max(0,Math.min(1,e.volume)):.5;return i.current=t?ca(t,r):null,a.current=n?ca(n,r):null,()=>{i.current?.pause(),a.current?.pause()}},[e]);let o=G(()=>{r(e=>{let n=!e;try{t.setItem(oa,n?`1`:`0`)}catch{}return n})},[t]),s=G(t=>{if(n||e&&e.enabled===!1)return;let r=t===`inbound`?i.current:a.current;r&&(r.currentTime=0,r.play().catch(()=>{}))},[n,e]);return{muted:n,toggleMuted:o,playInbound:()=>s(`inbound`),playOutbound:()=>s(`outbound`)}}function ca(e,t){let n=new Audio;return n.preload=`none`,n.volume=t,n.src=e,n}function la(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>Object.hasOwn(t,n)&&la(e[n],t[n])):!1}function ua(e){let t=J(void 0),n=J(!1);return(!n.current||!la(t.current,e))&&(t.current=e,n.current=!0),t.current}function da(e,t){let[n,r]=Y(`dark`),i=Te(),a=i.themeRoot,o=i.themeOverride,s=i.kind,c=I().storage;return K(()=>{let n=new URL(window.location.href).searchParams.get(`theme`),i=e&&fa(e)?e:null,l=t?.allowed!==!1,u=t?.preference&&fa(t.preference)?t.preference:null,d=(()=>{if(!l)return null;try{let e=c.getItem(`wexio:theme`);return e&&fa(e)?e:null}catch{return null}})(),f=()=>{if(o&&fa(o))return o;if(n&&fa(n))return n;if(l){if(u&&u!==`auto`)return u;if(d&&d!==`auto`&&!u)return d}return i&&i!==`auto`?i:`auto`};if(l&&u)try{c.setItem(`wexio:theme`,u)}catch{}let p=f(),m=a??document.documentElement,h=()=>{let e=p===`auto`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:p;m.dataset.theme=e,r(e)};h();let g=window.matchMedia(`(prefers-color-scheme: dark)`),_=()=>p===`auto`&&h();g.addEventListener?.(`change`,_);let v=e=>{if(!gt(e,s)||!e.data||typeof e.data!=`object`||e.data.type!==`wexio:preview-theme-mode:v1`&&e.data.type!==`wexio:theme:v1`)return;let t=e.data.mode;t&&fa(t)&&(p=t,h())};return window.addEventListener(`message`,v),()=>{g.removeEventListener?.(`change`,_),window.removeEventListener(`message`,v)}},[e,a,o,s,t?.preference,t?.allowed,c]),n}function fa(e){return e===`light`||e===`dark`||e===`auto`}function pa({enabled:e,refetch:t,onSettled:n}){let r=J(e),i=J(t),a=J(n),o=J(!1);K(()=>{r.current=e,i.current=t,a.current=n});let s=G(async()=>{if(!r.current||o.current)return;o.current=!0;let e=Date.now();try{await i.current(),a.current(e)}catch{}finally{o.current=!1}},[]);return K(()=>{if(!e||typeof window>`u`)return;let t=()=>void s(),n=()=>{document.hidden||s()};return window.addEventListener(`online`,t),document.addEventListener(`visibilitychange`,n),()=>{window.removeEventListener(`online`,t),document.removeEventListener(`visibilitychange`,n)}},[e,s]),s}var ma=`https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit`,ha=`wexio-turnstile-script`,ga=null;function _a(){return typeof window>`u`?Promise.reject(Error(`turnstile: no window`)):window.turnstile?Promise.resolve():ga||(ga=new Promise((e,t)=>{let n=document.getElementById(ha);if(n){if(window.turnstile)return e();n.addEventListener(`load`,()=>e(),{once:!0}),n.addEventListener(`error`,()=>t(Error(`turnstile: script load error`)),{once:!0});return}let r=document.createElement(`script`);r.id=ha,r.src=ma,r.async=!0,r.defer=!0,r.addEventListener(`load`,()=>e(),{once:!0}),r.addEventListener(`error`,()=>{r.remove(),t(Error(`turnstile: script load error`))},{once:!0}),document.head.appendChild(r)}).catch(e=>{throw ga=null,e}),ga)}function va(e){let{siteKey:t,theme:n,position:r=`right`}=e,i=J(null),a=J(n);return K(()=>{a.current=n},[n]),K(()=>{if(typeof document>`u`)return;let e=document.createElement(`div`);return e.style.position=`fixed`,e.style.bottom=`88px`,r===`left`?e.style.left=`16px`:e.style.right=`16px`,e.style.zIndex=`60`,document.body.appendChild(e),i.current=e,()=>{e.remove(),i.current=null}},[r]),{getToken:G(async()=>{if(!t)return;await _a();let e=i.current,n=typeof window<`u`?window.turnstile:void 0;if(!e||!n)throw Error(`turnstile: not ready`);return new Promise((r,i)=>{let a=n.render(e,{sitekey:t,execution:`render`,appearance:`interaction-only`,retry:`auto`,"refresh-expired":`auto`,callback:e=>{r(e);try{n.remove(a)}catch{}},"error-callback":()=>{try{n.remove(a)}catch{}i(Error(`turnstile: error`))},"expired-callback":()=>{try{n.remove(a)}catch{}i(Error(`turnstile: expired before submission`))},"timeout-callback":()=>{try{n.remove(a)}catch{}i(Error(`turnstile: timeout`))}})})},[t])}}function ya(e,t){if(typeof window>`u`)return`en`;if(!t?.ignoreVisitorOverrides){let e=xa(new URL(window.location.href).searchParams.get(`lang`));if(e)return e;let t=xa(Sa(`wexio-locale`));if(t)return t}if(e&&e!==`AUTO`&&e!==`WEBSITE`){let t=xa(e);if(t)return t}else if(e===`WEBSITE`){let e=xa(document.documentElement.lang);if(e)return e}return xa(navigator.language)||`en`}var ba=new Map(y.map(e=>[e.toLowerCase(),e]));function xa(e){if(!e)return null;let t=e.toLowerCase().replace(/_/g,`-`),n=ba.get(t);if(n)return n;let r=t.split(`-`)[0];return ba.get(r)??null}function Sa(e){let t=document.cookie.split(`;`);for(let n of t){let[t,...r]=n.trim().split(`=`);if(t===e)return decodeURIComponent(r.join(`=`))}return null}var Ca=2147483647,wa=5e3,Ta=6e4,Ea=15*6e4;function Da(e,t,n){let r=(e,t=Ea)=>({delayMs:Math.min(t,e*2**Math.min(n,10)),streak:n+1});if(typeof e!=`number`||!Number.isFinite(e)||e<=0)return r(Ta);let i=(e-t)*1e3;return i<wa?r(wa,Math.min(Ea,Math.max(wa,e*1e3-wa))):{delayMs:Math.min(Ca,i),streak:0}}var Oa=`network_unreachable`,ka=`preview_visitor_limit`;function Aa(e){if(!e||typeof e!=`object`)return!1;let t=e;if(Array.isArray(t.graphQLErrors)&&t.graphQLErrors.length>0)return!1;if(t.networkError)return!0;let n=typeof t.message==`string`?t.message:``;return/failed to fetch|networkerror|network request failed|load failed|err_|fetch/i.test(n)}var ja=e=>e?`wexio:visitor-id:${e}`:`wexio:visitor-id`,Ma=e=>e?`wexio:visitor-session:${e}`:`wexio:visitor-session`,Na=`wexio:visitor-id`,Pa=`wexio:visitor-session`;function Fa(e,t=ae(),n=ve(`local`)){if(!(typeof window>`u`))try{let r={token:e.token,chatId:e.chatId,peopleId:e.peopleId,displayName:e.displayName,expiresAt:Date.now()+e.expiresIn*1e3};n.setItem(Ma(t),JSON.stringify(r))}catch{}}function Ia(e,t){if(typeof window>`u`)return null;try{let n=t.getItem(Ma(e));if(!n&&e){let r=t.getItem(Pa);r&&(t.setItem(Ma(e),r),t.removeItem(Pa),n=r)}if(!n)return null;let r=JSON.parse(n);return typeof r?.token!=`string`||typeof r?.expiresAt!=`number`||r.expiresAt-Ra*1e3<=Date.now()?(t.removeItem(Ma(e)),null):r}catch{return null}}function La(e,t){if(!(typeof window>`u`))try{t.removeItem(Ma(e)),t.removeItem(Pa)}catch{}}var Ra=30,za=120,Ba=3e4,Va=`wexio:prechat-submitted:`;function Ha(e=ee()){e.token=null;let t=e.publicKey,n=e.storage;if(La(t,n),!(typeof window>`u`))try{n.removeItem(ja(t)),n.removeItem(Na);for(let e=n.length-1;e>=0;e--){let t=n.key(e);t?.startsWith(Va)&&n.removeItem(t)}}catch{}}function Ua(e){let[t,n]=Y({token:null,chatId:null,peopleId:null,displayName:null,isAuthenticating:e.enabled,error:null,verified:!1,blocked:!1}),r=I(),{token:i,holding:a}=Ce(),o=e.enabled&&!a,[s,c]=Y(i);s!==i&&(c(i),r.token=null,n({token:null,chatId:null,peopleId:null,displayName:null,isAuthenticating:o,error:null,verified:!1,blocked:!1}));let[l]=Be(),[u]=We(),d=J(e.identity??null);d.current=i?null:e.identity??null;let f=J(e.getTurnstileToken);f.current=e.getTurnstileToken;let p=J(null),m=J(!1),h=J(0),g=J(0),_=G(async e=>{if(r.preview.paused){n(e=>({...e,isAuthenticating:!1}));return}if(m.current){n(e=>({...e,isAuthenticating:!1,error:ka}));return}n(e=>({...e,isAuthenticating:!0,error:null}));try{let t=Ga(r.publicKey,r.storage),i=r.preview.active?null:d.current,a=ya(),o;try{o=await f.current?.()??void 0}catch(t){if(e.current)return;n(e=>({...e,isAuthenticating:!1,error:`turnstile_failed:${t.message}`}));return}if(e.current)return;let s;if(i&&(i.googleIdToken||i.jwt||i.userId&&i.userHash)){let n=await u({variables:{input:{visitorId:t,...i.googleIdToken?{googleIdToken:i.googleIdToken}:i.jwt?{jwt:i.jwt}:{userId:i.userId,userHash:i.userHash},name:i.name,email:i.email,phone:i.phone,contextSnapshot:JSON.stringify({...i.attributes&&typeof i.attributes==`object`?i.attributes:{},locale:a}),turnstileToken:o}}});if(e.current)return;s=n.data?.startIdentifiedVisitor}else{let n=await l({variables:{input:{visitorId:t,turnstileToken:o,contextSnapshot:JSON.stringify({locale:a})}}});if(e.current)return;s=n.data?.startAnonymousVisitor}if(!s&&r.preview.paused){n(e=>({...e,isAuthenticating:!1,error:null}));return}if(!s){n(e=>({...e,isAuthenticating:!1,error:`handshake_empty_response`}));return}if(s.visitorId&&s.visitorId!==t)try{r.storage.setItem(ja(r.publicKey),s.visitorId)}catch{}r.token=s.token,n({token:s.token,chatId:s.chatId,peopleId:s.peopleId,displayName:s.displayName,isAuthenticating:!1,error:null,verified:s.kind===`identified`,blocked:s.blocked??!1}),s.kind===`identified`?Fa({token:s.token,chatId:s.chatId,peopleId:s.peopleId,displayName:s.displayName,expiresIn:s.expiresIn},r.publicKey,r.storage):La(r.publicKey,r.storage);let c=Da(s.expiresIn,Ra,h.current);h.current=c.streak;let m=c.delayMs;r.preview.active&&typeof s.expiresIn==`number`&&s.expiresIn<za&&(r.preview.requestRefresh(),m=Math.max(Ba,m)),p.current&&clearTimeout(p.current),g.current=Date.now()+m,p.current=setTimeout(()=>{e.current||_(e)},m)}catch(t){if(e.current)return;if(be(t,Ot.previewVisitorLimit)){m.current=!0,n({token:null,chatId:null,peopleId:null,displayName:null,isAuthenticating:!1,error:ka,verified:!1,blocked:!1});return}let i=r.preview.paused;n({token:null,chatId:null,peopleId:null,displayName:null,isAuthenticating:!1,error:i?null:Aa(t)?Oa:t.message,verified:!1,blocked:!1})}},[l,u,r]),v=i?null:e.identity,y=v?.googleIdToken?`google:${v.googleIdToken}`:v?.jwt?`jwt:${v.jwt}`:v?.userId&&v?.userHash?`${v.userId}:${v.userHash}`:null,b=J(e.epoch);return K(()=>{b.current!==e.epoch&&(b.current=e.epoch,h.current=0,r.token=null,n({token:null,chatId:null,peopleId:null,displayName:null,isAuthenticating:o,error:null,verified:!1,blocked:!1}))},[e.epoch,o,r]),K(()=>{if(!o){n(e=>({...e,isAuthenticating:!1}));return}if(typeof window>`u`)return;let e={current:!1};h.current=0;let t=d.current||i?null:Ia(r.publicKey,r.storage);if(t){r.token=t.token,n({token:t.token,chatId:t.chatId,peopleId:t.peopleId,displayName:t.displayName,isAuthenticating:!1,error:null,verified:!0,blocked:!1});let i=Math.min(Ca,Math.max(0,t.expiresAt-Date.now()));g.current=t.expiresAt,p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{e.current||(La(r.publicKey,r.storage),_(e))},i)}else _(e);let a=()=>{e.current||typeof document>`u`||document.hidden||g.current!==0&&Date.now()>=g.current&&_(e)};return document.addEventListener(`visibilitychange`,a),()=>{e.current=!0,document.removeEventListener(`visibilitychange`,a),p.current&&(clearTimeout(p.current),p.current=null)}},[o,_,y,e.epoch,r,i]),K(()=>{if(!o||typeof window>`u`)return;let e=!1,t={current:!1};return r.onUnauthorized=()=>{e||(e=!0,La(r.publicKey,r.storage),r.token=null,_(t).finally(()=>{e=!1}))},r.onIntegrationMismatch=()=>{if(!e){e=!0,La(r.publicKey,r.storage),r.token=null;try{let e=r.publicKey;r.storage.removeItem(ja(e))}catch{}_(t).finally(()=>{e=!1})}},()=>{t.current=!0,r.onUnauthorized=null,r.onIntegrationMismatch=null}},[o,e.epoch,_,r]),t}function Wa(e){let[t,n]=Y({identity:null,prefill:null});return K(()=>{if(e.visitorIdentity||e.visitorPrefill||typeof window>`u`)return;let t=t=>{if(!gt(t,e.kind))return;let r=t.data;if(!(!r||typeof r!=`object`))if(r.type===`wexio:identify:v1`){let e=r.user;if(!e||typeof e!=`object`)return;let t=typeof e.googleIdToken==`string`,i=typeof e.jwt==`string`,a=typeof e.userId==`string`&&typeof e.userHash==`string`;if(!t&&!i&&!a)return;n(n=>({...n,identity:{googleIdToken:t?e.googleIdToken:void 0,jwt:i?e.jwt:void 0,userId:typeof e.userId==`string`?e.userId:void 0,userHash:typeof e.userHash==`string`?e.userHash:void 0,name:typeof e.name==`string`?e.name:void 0,email:typeof e.email==`string`?e.email:void 0,phone:typeof e.phone==`string`?e.phone:void 0,attributes:e.attributes&&typeof e.attributes==`object`?e.attributes:void 0}}))}else if(r.type===`wexio:prefill:v1`){let e=r.prefill;if(!e||typeof e!=`object`)return;n(t=>({...t,prefill:{name:typeof e.name==`string`?e.name:void 0,email:typeof e.email==`string`?e.email:void 0,phone:typeof e.phone==`string`?e.phone:void 0}}))}else r.type===`wexio:shutdown:v1`&&n({identity:null,prefill:null})};return window.addEventListener(`message`,t),window.parent?.postMessage({type:`wexio:widget:ready:v1`},`*`),()=>window.removeEventListener(`message`,t)},[e.kind,e.visitorIdentity,e.visitorPrefill]),{identity:e.visitorIdentity??t.identity,prefill:e.visitorPrefill??t.prefill}}function Ga(e=ae(),t=ve(`local`)){try{let n=ja(e),r=t.getItem(n);if(r)return r;if(e){let e=t.getItem(Na);if(e)return t.setItem(n,e),t.removeItem(Na),e}let i=Ka();return t.setItem(n,i),i}catch{return Ka()}}function Ka(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();let e=new Uint8Array(16);if(typeof crypto<`u`&&crypto.getRandomValues)crypto.getRandomValues(e);else for(let t=0;t<16;t++)e[t]=Math.floor(Math.random()*256);return Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}var qa={themeMode:null,language:null,desktopNotifications:!1},Ja=new Set;function Ya(e,t){if(qa[e]!==t){qa={...qa,[e]:t};for(let e of Ja)e(qa)}}function Xa(){let[e,t]=Y(qa);return K(()=>(Ja.add(t),t(qa),()=>{Ja.delete(t)}),[]),e}var Za=null,Qa=new Set;function $a(e){if(Ye(e)&&Za!==e){Za=e;for(let t of Qa)t(e)}}var eo=new Set;function to(e){if(e){$a(e);return}let t=Za!==null;if(Za=null,t)for(let e of eo)e()}function no(e){return eo.add(e),()=>{eo.delete(e)}}function ro(e){return Qa.add(e),()=>{Qa.delete(e)}}var io={en:()=>import(`./widget-react-CkrkZ3pp.js`).then(e=>e.n).then(e=>e.default),"en-US":()=>import(`./widget-react-BXlRglvP2.js`).then(e=>e.default),"en-GB":()=>import(`./widget-react-DdIv5LKJ2.js`).then(e=>e.default),uk:()=>import(`./widget-react-DV3BZAN0.js`).then(e=>e.default),de:()=>import(`./widget-react-RWR7XGaa.js`).then(e=>e.default),es:()=>import(`./widget-react-CrWgGrOv2.js`).then(e=>e.default),"es-MX":()=>import(`./widget-react-Ci-9Gtq-2.js`).then(e=>e.default),fr:()=>import(`./widget-react-CTr72oJP2.js`).then(e=>e.default),it:()=>import(`./widget-react-D71FBbwd.js`).then(e=>e.default),nl:()=>import(`./widget-react-BZ7sDBzB.js`).then(e=>e.default),pt:()=>import(`./widget-react-BJLMVdT8.js`).then(e=>e.default),"pt-BR":()=>import(`./widget-react-CVu0iQzo.js`).then(e=>e.default),sv:()=>import(`./widget-react-CESpzeFW.js`).then(e=>e.default),da:()=>import(`./widget-react-DtxeNDUn.js`).then(e=>e.default),no:()=>import(`./widget-react-DpT7-wmd.js`).then(e=>e.default),fi:()=>import(`./widget-react-DSej45hO2.js`).then(e=>e.default),pl:()=>import(`./widget-react--SnHxPOY.js`).then(e=>e.default),cs:()=>import(`./widget-react-oMWtXf4y.js`).then(e=>e.default),sk:()=>import(`./widget-react-x1O7Aw-0.js`).then(e=>e.default),tr:()=>import(`./widget-react-C7ABw9U-.js`).then(e=>e.default),ro:()=>import(`./widget-react-B4O9LryX.js`).then(e=>e.default),hu:()=>import(`./widget-react-D3JyG2-s.js`).then(e=>e.default),el:()=>import(`./widget-react-DFBUOrVn2.js`).then(e=>e.default),ar:()=>import(`./widget-react-CCfIguE3.js`).then(e=>e.default),he:()=>import(`./widget-react-DR9wD8RF2.js`).then(e=>e.default),hi:()=>import(`./widget-react-CiXpsVM3.js`).then(e=>e.default),th:()=>import(`./widget-react-DySiCebV.js`).then(e=>e.default),vi:()=>import(`./widget-react-G5Axrzd4.js`).then(e=>e.default),id:()=>import(`./widget-react-CO_-SXaO.js`).then(e=>e.default),ja:()=>import(`./widget-react-BDwkTnhP.js`).then(e=>e.default),ko:()=>import(`./widget-react-JRr_KL3e.js`).then(e=>e.default),zh:()=>import(`./widget-react-D8sZCT6W.js`).then(e=>e.default),"zh-TW":()=>import(`./widget-react-bxGcWjbs.js`).then(e=>e.default)};async function ao(e){return(io[e]??io.en)()}var oo={themeMode:null,themeModeEditable:!0,language:null,desktopNotifications:!1,loaded:!1};function so(e){let{data:t}=sr({skip:!e.enabled||!!e.isDummy}),n=t?.visitorProfile,r=Xa(),i=e.isDummy?{themeMode:r.themeMode,themeModeEditable:!0,language:r.language,desktopNotifications:r.desktopNotifications,loaded:!0}:n?{themeMode:co(n.preferences.themeMode),themeModeEditable:n.themeModeEditable,language:n.preferences.language??null,desktopNotifications:!!n.preferences.desktopNotifications,loaded:!0}:e.enabled?oo:{...oo,loaded:!0};return K(()=>{if(i.loaded&&i.language){try{document.cookie=`wexio-locale=${encodeURIComponent(i.language)}; path=/; max-age=${3600*24*365}; samesite=lax`}catch{}$a(i.language)}},[i.loaded,i.language]),i}function co(e){if(typeof e!=`string`)return null;let t=e.toLowerCase();return t===`light`||t===`dark`?t:t===`auto`||t===`system`?`auto`:null}function lo(e,t,n){let r=!1,i=t.preview.token,a=a=>{if(!t.preview.active)return;if(a instanceof MessageEvent){if(typeof a.data!=`string`)return;try{let e=pe(JSON.parse(a.data));e&&t.preview.report(e,i)}catch{}return}if(e.readyState!==2||r||!t.publicKey)return;r=!0;let o=i;Si({publicKey:t.publicKey,token:n,previewToken:o}).then(e=>{e.kind===`unauthorized`&&e.previewReason&&t.preview.report(e.previewReason,o)})};return e.addEventListener(`error`,a),()=>e.removeEventListener(`error`,a)}var uo=3e3,fo=6e4,po=1e4;function mo({token:e,visitorId:t=null,enabled:n=!0,epoch:r=0,onUpdate:i,onAdd:a,onReopen:o}){let s=I(),c=J(i);K(()=>{c.current=i},[i]);let l=J(a);K(()=>{l.current=a},[a]);let u=J(o);K(()=>{u.current=o},[o]);let d=J(!1),f=J(!0),p=J(e);p.current=e;let m=!!e;K(()=>{if(!n||!m||typeof window>`u`)return;let e=s.publicKey;if(!e)return;let t=!1,r=0,i,a,o=()=>{},h=()=>{let n=p.current;if(!n)return;let m=`${re()}/api/web/realtime/threads?token=${encodeURIComponent(n)}&publicKey=${encodeURIComponent(e)}`,g=new EventSource(m,{withCredentials:!1}),_=e=>{try{c.current(JSON.parse(e.data))}catch{console.warn(`[wexio] unparseable threadUpdated frame`,e.data)}},v=e=>{try{l.current?.(JSON.parse(e.data))}catch{console.warn(`[wexio] unparseable threadAdded frame`,e.data)}},y=()=>{d.current&&f.current&&(f.current=!1,u.current?.()),d.current=!0,clearTimeout(a),a=setTimeout(()=>{r=0,f.current=!0},po)},b=e=>{e instanceof MessageEvent||(clearTimeout(a),o(),!t&&(i=setTimeout(h,Math.min(fo,uo*2**r)),r+=1))};g.addEventListener(`open`,y),g.addEventListener(`threadUpdated`,_),g.addEventListener(`threadAdded`,v);let x=lo(g,s,n);g.addEventListener(`error`,b),o=()=>{x(),g.removeEventListener(`open`,y),g.removeEventListener(`threadUpdated`,_),g.removeEventListener(`threadAdded`,v),g.removeEventListener(`error`,b),g.close()}};return h(),()=>{t=!0,clearTimeout(i),clearTimeout(a),o()}},[m,t,n,r,s])}function ho({chatId:e,token:t,visitorId:n=null,enabled:r=!0,onMessage:i}){let a=I(),o=J(i);K(()=>{o.current=i},[i]);let s=J(t);s.current=t;let c=!!t;K(()=>{if(!r||!e||!c||typeof window>`u`)return;let t=a.publicKey;if(!t)return;let n=!1,i=0,l,u,d=()=>{},f=()=>{let r=s.current;if(!r)return;let c=`${re()}/api/web/realtime/${encodeURIComponent(e)}?token=${encodeURIComponent(r)}&publicKey=${encodeURIComponent(t)}`,p=new EventSource(c,{withCredentials:!1}),m=e=>{try{let t=JSON.parse(e.data);o.current(t)}catch{console.warn(`[wexio] unparseable SSE frame`,e.data)}},h=e=>{try{let t=JSON.parse(e.data);o.current({...t,update:!0})}catch{console.warn(`[wexio] unparseable SSE frame`,e.data)}},g=()=>{clearTimeout(u),u=setTimeout(()=>{i=0},po)},_=e=>{e instanceof MessageEvent||(clearTimeout(u),d(),!n&&(l=setTimeout(f,Math.min(fo,uo*2**i)),i+=1))};p.addEventListener(`open`,g),p.addEventListener(`message`,m),p.addEventListener(`messageUpdate`,h);let v=lo(p,a,r);p.addEventListener(`error`,_),d=()=>{v(),p.removeEventListener(`open`,g),p.removeEventListener(`message`,m),p.removeEventListener(`messageUpdate`,h),p.removeEventListener(`error`,_),p.close()}};return f(),()=>{n=!0,clearTimeout(l),clearTimeout(u),d()}},[e,c,n,r,a])}function go(e){let[t,n]=Y(!1),[r,i]=Y(!1);return K(()=>(e.onUnavailable=()=>{n(!0),(e.publicKey?xt(e.publicKey):Promise.resolve()).finally(()=>i(!0))},()=>{e.onUnavailable=null}),[e]),{unavailable:t,evicted:r}}var _o={status:null};function vo(e){let t=e.assignment;return t?t.assignedStatus===`connected`?{status:`connected`,...t.operator?{operator:t.operator}:{}}:t.assignedStatus===`pending`?{status:`pending`,...t.estimate?{estimate:t.estimate}:{}}:{status:null}:null}function yo(e,t,n=new Date){let r=new Date(e);if(Number.isNaN(r.getTime()))return``;let i=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),a=new Intl.DateTimeFormat(t,{hour:`numeric`,minute:`2-digit`}).format(r);if(i(r,n))return a;let o=new Date(n);return o.setDate(n.getDate()+1),i(r,o)?`${new Intl.RelativeTimeFormat(t,{numeric:`auto`}).format(1,`day`)}, ${a}`:`${new Intl.DateTimeFormat(t,{weekday:`short`}).format(r)}, ${a}`}function bo(e){let t=e.assignment;if(!t?.messageId)return null;let n={id:t.messageId,direction:`OUTBOUND`,text:``,ageLabel:``,...e.sentAt?{createdAt:e.sentAt}:{},sender:{kind:`system`,name:`System`}};return t.assignedStatus===`connected`?{...n,system:{type:`OPERATOR_CONNECTED`,...t.operator?.name?{operatorName:t.operator.name}:{},...t.operator?.avatar?{operatorAvatar:t.operator.avatar}:{}}}:t.assignedStatus===null?{...n,system:{type:`CHAT_RESOLVED`,...t.initiator?{initiator:t.initiator}:{}}}:null}function xo(e,t,n){if(e.basis===`business_hours`)return e.availableAt?t(`assignment.eta.businessHours`,{time:yo(e.availableAt,n)}):null;if(e.basis===`operator_load`){if(typeof e.etaMinutes==`number`)return t(`assignment.eta.minutes`,{minutes:e.etaMinutes});if(e.soft)return t(`assignment.eta.soft`)}return null}var So=2048,Co=2048;function wo(e){try{let t=new URL(e).protocol;return t===`http:`||t===`https:`}catch{return!1}}function To(e){if(!e.url||!wo(e.url))return;let t=e.title?.slice(0,200),n=e.referrer?.slice(0,Co),r=e.description?.trim().slice(0,500);return{url:e.url.slice(0,So),...t?{title:t}:{},...n?{referrer:n}:{},...r?{description:r}:{}}}var Eo=null;function Do(e){if(!gt(e,`iframe`))return;let t=e.data;!t||typeof t!=`object`||t.type!==`wexio:host-navigation:v1`||typeof t.url==`string`&&(Eo={url:t.url,title:typeof t.title==`string`?t.title:void 0,referrer:typeof t.referrer==`string`?t.referrer:void 0,description:typeof t.description==`string`?t.description:void 0})}typeof window<`u`&&window.addEventListener(`message`,Do);function Oo(){return document.querySelector(`meta[name="description"]`)?.getAttribute(`content`)?.trim()||(document.querySelector(`meta[property="og:description"]`)?.getAttribute(`content`)??void 0)}function ko(e){if(!(typeof window>`u`)){if(e===`iframe`){let e=new URLSearchParams(window.location.search).get(`referer`)??void 0;return To(Eo??{url:e})}return To({url:window.location.href,title:document.title,referrer:document.referrer,description:Oo()})}}var Ao=!1,jo=/(["'`]page["'`]|VisitorPageInput)/;function Mo(e){let t=e??{};return[...t.errors??[],...t.graphQLErrors??[],...t.networkError?.result?.errors??[]].map(e=>e?.message??``)}function No(e){return Mo(e).some(e=>jo.test(e))}async function Po(e){let t=e.options?.variables?.input;if(!t)return e.send(e.options);let{page:n,...r}=t,i=n??e.page,a=t=>({...e.options,variables:{...e.options?.variables,input:t}});if(Ao||!i)return e.send(a(r));let o;try{o=await e.send(a({...r,page:i}))}catch(t){if(!No(t))throw t;return Ao=!0,e.send(a(r))}return No(o)?(Ao=!0,e.send(a(r))):o}function Fo(){let e=Te().kind,[t,n]=et();return[G(n=>Po({send:t,options:n,page:ko(e)}),[t,e]),n]}function Io(e){return e.kind===`home`||e.kind===`messages`||e.kind===`help`||e.kind===`news`||e.kind===`profile`}function Lo(e,t){switch(e.kind){case`messages`:return t.home?{kind:`home`}:t.help?{kind:`help`}:t.news?{kind:`news`}:t.profile?{kind:`profile`}:{kind:`messages`};case`help-category`:return e.origin??{kind:`help`};case`help-article`:return e.origin?e.origin:e.from===`category`&&e.fromCategoryId?{kind:`help-category`,categoryId:e.fromCategoryId}:{kind:`help`};case`news-article`:return e.origin??{kind:`news`};case`messages-thread`:return{kind:`messages`};default:return{kind:`home`}}}function Ro(e,t){return e.kind===`help-article`||e.kind===`news-article`||e.kind===`help-category`?{...e,origin:t}:e}function zo(e,t){return e.kind===`news-article`&&t.kind===`news-article`?{...e,origin:t.origin}:e.kind===`help-article`&&t.kind===`help-article`?{...e,origin:t.origin,...t.origin?{}:{from:t.from,fromCategoryId:t.fromCategoryId}}:Ro(e,t)}function Bo(e){switch(e.kind){case`home`:return`home`;case`messages`:case`messages-thread`:return`messages`;case`help`:case`help-category`:case`help-article`:return`help`;case`news`:case`news-article`:return`news`;case`profile`:return`profile`}}function Vo(e,t){return e===`home`?t.home:e===`messages`?t.messenger:e===`help`?t.help:e===`news`?t.news:!!t.profile}function Ho(e){return+!!e.home+ +!!e.messenger+ +!!e.help+ +!!e.news+ +!!e.profile}function Uo(e,t){if(Vo(e,t))return e;for(let e of[`home`,`messages`,`help`,`news`,`profile`])if(Vo(e,t))return e;return e}function Wo(e){switch(e){case`PHOTO`:return`🖼️`;case`VIDEO`:return`🎥`;case`AUDIO`:return`🎵`;case`VOICE`:return`🎤`;case`FILE`:return`📄`;case`GIF`:return`🎞️`;case`STICKER`:return`🩷`;default:return`📎`}}function Go(e){switch(e){case`PENDING`:return`PENDING`;case`RESOLVED`:return`RESOLVED`;case`CLOSED`:return`CLOSED`;default:return`OPEN`}}function Ko(e){if(typeof e==`string`)return e;if(typeof e==`number`||e instanceof Date){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toISOString()}return``}function qo(e){return e.replace(/<[^>]*>/g,` `).replace(/ /g,` `).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/�*39;|'/g,`'`).replace(/\s+/g,` `).trim()}function Jo(e){let t=e.lastMessagePreview?qo(e.lastMessagePreview):``,n=e.lastMessageMediaType??null,r=e.lastMessageMediaThumbUrl??null,i=Ko(e.lastMessageAt??e.updatedAt),a=!!e.lastMessageFromVisitor;if(t)return{text:t,at:i,fromVisitor:a,...n?{media:!0,mediaType:n,mediaThumbUrl:r}:{}};if(n)return{text:``,at:i,fromVisitor:a,media:!0,mediaType:n,mediaThumbUrl:r};let o=e.lastMessageSenderKind;return e.lastMessageAt&&o&&o!==`system`?{text:``,at:i,fromVisitor:a,media:!0}:null}function Yo(e,t){return{chatId:e.id,threadKey:e.threadKey??null,title:null,status:Go(e.status),blocked:e.blocked??!1,unreadCount:e.unReadCount??0,updatedAt:Ko(e.updatedAt),preview:Jo(e),senderName:t,lastSenderKind:e.lastMessageSenderKind??null,lastSenderName:e.lastMessageSenderName??null}}function Xo(e,t){let n=e?.visitorThreads?.threads;return n?n.map(e=>Yo(e,t)):[]}var Zo=[`status`,`title`,`unreadCount`,`updatedAt`,`preview`,`lastSenderKind`,`lastSenderName`,`blocked`],Qo=e=>e?Date.parse(e):NaN;function $o(e,t){let n=Qo(t.lastMessageAt),r=Qo(e?.preview?.at);if(!Number.isNaN(n)&&!Number.isNaN(r))return n<r;let i=Qo(t.updatedAt),a=Qo(e?.updatedAt);return!Number.isNaN(i)&&!Number.isNaN(a)&&i<a}function es(e){switch(e){case`PENDING`:return`PENDING`;case`RESOLVED`:return`RESOLVED`;case`CLOSED`:return`CLOSED`;default:return`OPEN`}}function ts(e,t,n=Date.now()){let r={...e};return $o(e,t)||(ns(r,t),Zo.some(t=>r[t]!==e?.[t])&&(r.contentAt=n)),t.typing!==void 0&&(r.typing=!!t.typing?.active),t.assignment!==void 0&&(r.assignedStatus=t.assignment?.assignedStatus??null,r.assignedOperatorName=t.assignment?.operator?.name??null),r}function ns(e,t){if(t.status!=null&&(e.status=es(t.status)),t.title!=null&&(e.title=t.title),t.unReadCount!=null&&(e.unreadCount=t.unReadCount),t.updatedAt!=null&&(e.updatedAt=Ko(t.updatedAt)),(t.lastMessagePreview!=null||t.lastMessageAt!=null)&&(e.typing=!1),t.lastMessagePreview!=null||t.lastMessageMediaType!=null){let n=t.lastMessagePreview?qo(t.lastMessagePreview):``,r=t.lastMessageMediaType??null,i=t.lastMessageMediaThumbUrl??null,a=Ko(t.lastMessageAt??t.updatedAt),o=!!t.lastMessageFromVisitor;n?e.preview={text:n,at:a,fromVisitor:o,...r?{media:!0,mediaType:r,mediaThumbUrl:i}:{}}:r?e.preview={text:``,at:a,fromVisitor:o,media:!0,mediaType:r,mediaThumbUrl:i}:t.lastMessageAt!=null&&t.lastMessageSenderKind&&t.lastMessageSenderKind!==`system`&&(e.preview={text:``,at:a,fromVisitor:o,media:!0})}t.lastMessageSenderKind!=null&&(e.lastSenderKind=t.lastMessageSenderKind,e.lastSenderName=t.lastMessageSenderName??null),t.blocked!=null&&(e.blocked=t.blocked)}function rs(e,t){let n=!1,r={};for(let[i,a]of Object.entries(e)){if(a.contentAt!==void 0&&a.contentAt>t){r[i]=a;continue}if(!Zo.some(e=>a[e]!==void 0)){r[i]=a;continue}n=!0;let e={...a};for(let t of Zo)delete e[t];delete e.contentAt,Object.values(e).some(e=>e!==void 0)&&(r[i]=e)}return n?r:e}function is(e,t){if(!t)return e;let n=Qo(t.preview?.at),r=Qo(e.preview?.at),i=!Number.isNaN(n)&&!Number.isNaN(r)&&n<r?void 0:t;return{...e,...i?.status===void 0?{}:{status:i.status},...i?.title===void 0?{}:{title:i.title},...i?.unreadCount===void 0?{}:{unreadCount:i.unreadCount},...i?.updatedAt===void 0?{}:{updatedAt:i.updatedAt},...i?.preview===void 0?{}:{preview:i.preview},...t.typing===void 0?{}:{typing:t.typing},...t.assignedStatus===void 0?{}:{assignedStatus:t.assignedStatus},...t.assignedOperatorName===void 0?{}:{assignedOperatorName:t.assignedOperatorName},...i?.lastSenderKind===void 0?{}:{lastSenderKind:i.lastSenderKind},...i?.lastSenderName===void 0?{}:{lastSenderName:i.lastSenderName},...i?.blocked===void 0?{}:{blocked:i.blocked}}}var as=f(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),os=f(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),ss=f(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),cs=f(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),ls=f(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),us=f(`book`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),ds=f(`bookmark`,[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}]]),fs=f(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ps=f(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),ms=f(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),hs=f(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),gs=f(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),_s=f(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),vs=f(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),ys=f(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),bs=f(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),xs=f(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Ss=f(`gamepad-2`,[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]),Cs=f(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),ws=f(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Ts=f(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),Es=f(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),Ds=f(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Os=f(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),ks=f(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),As=f(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),js=f(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Ms=f(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Ns=f(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Ps=f(`message-circle-more`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}]]),Fs=f(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Is=f(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Ls=f(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Rs=f(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),zs=f(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Bs=f(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),Vs=f(`phone`,[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),Hs=f(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Us=f(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Ws=f(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Gs=f(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),Ks=f(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),qs=f(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),Js=f(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Ys=f(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Xs=f(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Zs=f(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),Qs=f(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),$s=f(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ec=f(`underline`,[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]),tc=f(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),nc=f(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),rc=f(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),ic=f(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),ac=f(`volume-x`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]),oc=f(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),sc=f(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),cc={sm:`h-3.5 min-w-3.5 px-0.75 text-[8px]`,md:`h-5 min-w-5 px-1.5 text-[10px]`},lc={duration:.2,ease:[.2,0,0,1]},uc={duration:.12,ease:[.2,0,0,1]};function dc({count:e,size:t=`sm`,className:n,dot:r,label:i}){let a=r&&e<=0;return X(kt,{children:(e>0||a)&&Z(o.span,{role:`status`,initial:{opacity:0},animate:{opacity:1,transition:lc},exit:{opacity:0,transition:uc},className:u(`inline-flex`,n),"aria-label":i??`${e} unread`,children:[X(`span`,{"aria-hidden":`true`,className:`absolute inset-0 -z-10 rounded-full bg-wx-danger opacity-40 blur-[2px]`}),X(`span`,{className:u(`relative flex items-center justify-center`,`rounded-full bg-wx-danger font-bold leading-none text-white`,cc[t]),children:a?null:e>99?`99+`:e})]},`badge`)})}var fc=[`home`,`messages`,`help`,`news`,`profile`];function pc({active:e,features:t,onChange:n,unreadCount:r=0,newsUnread:a=!1}){let o=i(`tabs`),s=i(`news`),c=ln(),l=ln(),d=fc.filter(e=>gc(e,t));return X(`div`,{className:`px-3 pt-2 pb-2`,children:X(`nav`,{role:`tablist`,className:u(`relative flex w-full items-center gap-1`,`rounded-full bg-wx-bg-elevated/70 p-1 backdrop-blur-md`,`shadow-[inset_0_0_0_1px_rgb(0_0_0/0.04)]`),children:d.map(t=>{let i=t===e;if(t===`home`)return X(mc,{id:t,label:o(t),isActive:i,onClick:()=>n(t),parentHandlers:c.parentHandlers,icon:X(Ft,{ref:c.iconRef,size:16})},t);if(t===`messages`)return X(mc,{id:t,label:o(t),isActive:i,onClick:()=>n(t),parentHandlers:l.parentHandlers,icon:X(Mt,{ref:l.iconRef,size:16}),badgeCount:r},t);let u=t===`help`?hs:t===`news`?an:tc;return X(hc,{id:t,label:o(t),isActive:i,onClick:()=>n(t),Icon:u,showDot:t===`news`&&a,dotLabel:s(`unread`)},t)})})})}function mc({id:e,label:t,isActive:n,onClick:r,icon:i,parentHandlers:a,badgeCount:s=0}){return Z(`button`,{type:`button`,role:`tab`,"aria-selected":n,onClick:r,...a,className:u(`relative z-10 flex items-center justify-center gap-1.5 rounded-full px-3 py-2`,`transition-colors duration-150`,n?`flex-[2_2_0%] text-wx-fg`:`flex-1 text-wx-fg-muted hover:text-wx-fg`),children:[n&&X(o.span,{layoutId:`bottom-nav-pill`,className:`absolute inset-0 -z-10 rounded-full bg-wx-bg shadow-[0_2px_8px_rgba(0,0,0,0.08)]`,transition:{type:`spring`,stiffness:420,damping:36}}),Z(`span`,{className:`relative inline-flex shrink-0 items-center justify-center`,children:[i,X(dc,{count:s,size:`sm`,className:`absolute -top-1.5 -right-2 z-20`})]}),X(o.span,{animate:{width:n?`auto`:0,opacity:+!!n,marginLeft:n?0:-4},initial:!1,transition:{duration:.2,ease:`easeOut`},className:`overflow-hidden text-[11px] font-semibold tracking-tight whitespace-nowrap`,children:t})]})}function hc({id:e,label:t,isActive:n,onClick:r,Icon:i,showDot:a=!1,dotLabel:s}){let c=Lt();return K(()=>{n&&c.start({scale:[1,1.15,1]})},[n,c]),Z(o.button,{type:`button`,role:`tab`,"aria-selected":n,onClick:r,onHoverStart:()=>c.start({rotate:[0,-10,10,0]}),className:u(`relative z-10 flex items-center justify-center gap-1.5 rounded-full px-3 py-2`,`transition-colors duration-150`,n?`flex-[2_2_0%] text-wx-fg`:`flex-1 text-wx-fg-muted hover:text-wx-fg`),children:[n&&X(o.span,{layoutId:`bottom-nav-pill`,className:`absolute inset-0 -z-10 rounded-full bg-wx-bg shadow-[0_2px_8px_rgba(0,0,0,0.08)]`,transition:{type:`spring`,stiffness:420,damping:36}}),Z(`span`,{className:`relative inline-flex shrink-0 items-center justify-center`,children:[X(o.span,{animate:c,transition:{duration:.4},children:X(i,{size:16,strokeWidth:n?2.2:1.8})}),X(dc,{count:0,dot:a,label:s,size:`sm`,className:`absolute -top-1.5 -right-2 z-20`})]}),X(o.span,{animate:{width:n?`auto`:0,opacity:+!!n,marginLeft:n?0:-4},initial:!1,transition:{duration:.2,ease:`easeOut`},className:`overflow-hidden text-[11px] font-semibold tracking-tight whitespace-nowrap`,children:t})]})}function gc(e,t){return e===`home`?t.home:e===`messages`?t.messenger:e===`help`?t.help:e===`news`?t.news:!!t.profile}var _c=3e3;function vc({online:e,showBranding:t}){let n=i(`messages`),r=i(`branding`),[a,s]=Y(!1),c=J(e);K(()=>{let t=c.current;if(c.current=e,!e){s(!1);return}if(!t&&e){s(!0);let e=setTimeout(()=>s(!1),_c);return()=>clearTimeout(e)}},[e]);let l=e?a?`online`:t?`branding`:null:`offline`,d=`absolute inset-0 flex items-center justify-center gap-1.5 px-4 text-[10px] font-medium`;return X(`div`,{className:u(`relative shrink-0`,l?`h-[26px]`:`h-0`),children:Z(kt,{initial:!1,mode:`wait`,children:[l===`offline`&&Z(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:u(d,`bg-wx-danger/10 text-wx-danger`),children:[X(oc,{"aria-hidden":`true`,className:`size-3`}),X(`span`,{children:n(`offlineBanner`)})]},`offline`),l===`online`&&Z(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:u(d,`bg-wx-success/10 text-wx-success`),children:[X(sc,{"aria-hidden":`true`,className:`size-3`}),X(`span`,{children:n(`backOnline`)})]},`online`),l===`branding`&&Z(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:u(d,`bg-wx-bg text-wx-fg-subtle`),children:[X(`span`,{children:r(`poweredBy`)}),X(`a`,{href:`https://wexio.io?ref=widget`,target:`_blank`,rel:`noopener`,className:`font-semibold text-wx-fg-muted transition-colors hover:text-wx-fg`,children:r(`wexio`)})]},`branding`)]})})}function yc({title:e,subtitle:t,organizationLogoUrl:n,muted:r,onToggleMute:a,onBack:o,onClose:s,showResolve:c,onResolve:l,onDownloadTranscript:d,downloadingTranscript:f,expanded:p,onToggleExpand:m}){let h=i(`header`),g=i(`header`),_=ln(),v=ln();return Z(`header`,{"data-wx-top-bar":!0,className:u(`flex items-center gap-3 border-b border-wx-border bg-wx-bg px-3 py-3`),children:[o&&X(Kt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":h(`back`),onClick:o,className:`size-8 shrink-0`,..._.parentHandlers,children:X(It,{ref:_.iconRef,size:16})}),n&&X(`span`,{className:`h-9 w-9 shrink-0 overflow-hidden rounded-full`,children:X(`img`,{src:n,alt:e,className:`h-full w-full object-cover`})}),Z(`div`,{className:`min-w-0 flex-1`,children:[X(`p`,{className:`truncate text-sm font-semibold text-wx-fg`,children:e}),t&&X(`p`,{className:`truncate text-xs text-wx-fg-muted`,children:t})]}),X(xc,{muted:r,onToggleMute:a,showResolve:!!c&&!!l,onResolve:l,onDownloadTranscript:d,downloadingTranscript:!!f}),m&&X(Kt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":g(p?`collapse`:`expand`),onClick:m,className:`group size-8 shrink-0`,children:X(`span`,{className:`block transition-transform duration-200 ease-out group-hover:scale-110 group-active:scale-90`,children:X(Cc,{expanded:!!p})})}),X(Kt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":h(`close`),onClick:s,className:`size-8 shrink-0`,...v.parentHandlers,children:X(Nt,{ref:v.iconRef,size:16})})]})}function bc(){return Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`}),X(`path`,{d:`m9 11 3 3L22 4`})]})}function xc({muted:e,onToggleMute:t,showResolve:n,onResolve:r,onDownloadTranscript:a,downloadingTranscript:o}){let s=i(`header`),c=i(`sound`),l=i(`messages`),[u,d]=Y(!1),f=J(null);K(()=>{if(!u)return;let e=e=>{f.current&&!e.composedPath().includes(f.current)&&d(!1)},t=e=>{e.key===`Escape`&&d(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[u]);let p=e=>()=>{d(!1),e?.()};return Z(`div`,{ref:f,className:`relative shrink-0`,children:[X(Kt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":s(`moreActions`),"aria-haspopup":`menu`,"aria-expanded":u,onClick:()=>d(e=>!e),className:`group size-8`,children:X(`span`,{className:`block transition-transform duration-200 ease-out group-hover:scale-110 group-active:scale-90`,children:X(Qt,{icon:bs,size:18})})}),u&&Z(`div`,{role:`menu`,className:`absolute top-full right-0 z-30 mt-1 min-w-44 overflow-hidden rounded-wx-sm border border-wx-border bg-wx-bg py-1 shadow-lg`,children:[a&&X(Sc,{icon:X(Qt,{icon:o?js:ys,size:16}),label:s(`downloadTranscript`),onClick:p(a),disabled:o,spinning:o}),X(Sc,{icon:X(Qt,{icon:e?ac:ic,size:16}),label:c(e?`unmute`:`mute`),onClick:p(t)}),n&&X(Sc,{icon:X(bc,{}),label:l(`resolveConversation`),onClick:p(r)})]})]})}function Sc({icon:e,label:t,onClick:n,disabled:r,spinning:i}){return Z(`button`,{type:`button`,role:`menuitem`,onClick:n,disabled:r,className:`flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm text-wx-fg transition-colors hover:bg-wx-bg-elevated disabled:cursor-default disabled:opacity-60`,children:[X(`span`,{className:u(`shrink-0 text-wx-fg-muted`,i&&`animate-spin`),children:e}),X(`span`,{className:`truncate`,children:t})]})}function Cc({expanded:e}){return e?Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`polyline`,{points:`4 14 10 14 10 20`}),X(`polyline`,{points:`20 10 14 10 14 4`}),X(`line`,{x1:`14`,y1:`10`,x2:`21`,y2:`3`}),X(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`})]}):Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`polyline`,{points:`15 3 21 3 21 9`}),X(`polyline`,{points:`9 21 3 21 3 15`}),X(`line`,{x1:`21`,y1:`3`,x2:`14`,y2:`10`}),X(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`})]})}function wc({children:e}){let{isDummy:t}=Ct(),r=n(),i=g(),a=i.demo,o=a!==void 0&&typeof a==`object`&&!!a&&Object.keys(a).length>0,[s,c]=Y(null);if(K(()=>{if(!t||o)return;let e=!0;return Ze(r).then(t=>{e&&c(t)}),()=>{e=!1}},[t,o,r]),!t)return X(wn,{children:e});let l=o?i:s?{...i,demo:s}:null;return l?X(On,{locale:r,messages:l,timeZone:typeof Intl<`u`?Intl.DateTimeFormat().resolvedOptions().timeZone:`UTC`,children:e}):null}function Tc({title:e,description:t,meta:n,authors:r,onClick:i,kind:a=`none`,delay:s=0}){let c=a===`article`;return Z(o.button,{type:`button`,onClick:i,initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.18,delay:s},className:u(`group flex w-full items-center gap-3 border-wx-border border-b text-start transition-colors`,`hover:bg-wx-bg-elevated/60`,`last:border-b-0`,c?`px-5 py-3`:`px-5 py-3.5`),children:[Z(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5 [overflow-wrap:anywhere]`,children:[X(`span`,{className:u(`text-wx-fg`,c?`font-normal text-sm`:`font-semibold text-sm`),children:e}),t&&X(`span`,{className:u(`leading-snug`,c?`truncate text-[11px] text-wx-fg-subtle`:`text-wx-fg-muted text-xs`),children:t}),n&&X(`span`,{className:`text-[11px] text-wx-fg-subtle`,children:n})]}),Z(`span`,{className:`flex shrink-0 items-center gap-2 text-wx-fg-muted`,children:[r&&r.length>0&&X(en,{authors:r}),X(yt,{size:16,className:`transition-transform group-hover:translate-x-0.5 rtl:-scale-x-100 rtl:group-hover:-translate-x-0.5`,"aria-hidden":`true`})]})]})}var Ec=10,Dc=240,Oc=3;function kc({categoryId:e,categoryName:t,categoryDescription:r,categoryArticleCount:a,isDummy:s,onOpenCategory:c,onOpenArticle:l}){let u=i(`help`),d=T(),f=_t(),p=n(),[m,h]=Y(``),g=jc(m,300),_=g.length>=2,{data:v}=qt({variables:{parentId:e,locale:p},skip:s}),y=q(()=>v?.visitorHelpFolders??[],[v]),{data:b,loading:x,fetchMore:S}=Bt({variables:{args:{folderId:e,locale:p,recursive:!1,limit:Ec,offset:0}},skip:s,notifyOnNetworkStatusChange:!0}),{data:C,loading:w}=Bt({variables:{args:{query:g,locale:p,limit:10}},skip:g.length<2||s}),O=s?ue(d).find(t=>t.id===e):null,k=s?E(d).filter(t=>t.categoryId===e):[],A=s?k.map(e=>({id:e.id,slug:e.slug,title:e.title,excerpt:e.excerpt,authors:nn(e.authors),reactionCounts:null})):(b?.visitorHelpList?.items??[]).map(e=>({id:e._id,slug:e.slug,title:e.title,excerpt:e.excerpt??null,authors:nn(e.authors),reactionCounts:e.reactionCounts??null})),j=s?E(d).filter(e=>e.title.toLowerCase().includes(g.toLowerCase())||e.excerpt.toLowerCase().includes(g.toLowerCase())).map(e=>({id:e.id,slug:e.slug,title:e.title,excerpt:e.excerpt,authors:nn(e.authors),reactionCounts:null})):[],M=(C?.visitorHelpList?.items??[]).map(e=>({id:e._id,slug:e.slug,title:e.title,excerpt:e.excerpt??null,authors:nn(e.authors),reactionCounts:e.reactionCounts??null})),N=_?s?j:M:A,P=t??O?.title??``,ee=r??O?.description??``,te=a??O?.articleCount??A.length,ne=q(()=>{let e=new Map;for(let t of A)for(let n of t.authors??[])e.has(n.id)||e.set(n.id,n);return Array.from(e.values())},[A]),F=ne.slice(0,Oc),re=Math.max(0,ne.length-F.length),ie=F[0]?.name??``,ae=!_&&!s&&(b?.visitorHelpList?.meta?.hasNextPage??!1),[oe,se]=Y(!1),ce=G(async()=>{if(!(!ae||oe)){se(!0);try{await S({variables:{args:{folderId:e,locale:p,recursive:!1,limit:Ec,offset:b?.visitorHelpList?.items?.length??0}},updateQuery:(e,{fetchMoreResult:t})=>t?{...e,visitorHelpList:{...t.visitorHelpList,items:[...e.visitorHelpList?.items??[],...t.visitorHelpList?.items??[]]}}:e})}catch{}finally{se(!1)}}},[ae,oe,e,p,S,b]),le=G(e=>{let t=e.currentTarget;t.scrollHeight-t.clientHeight-t.scrollTop<Dc&&ce()},[ce]),de=s&&!D(d)||!s&&!_&&x&&A.length===0&&y.length===0;return X(`div`,{className:`flex h-full min-h-0 flex-col`,children:Z(ze,{followDirection:!0,className:`min-h-0 flex-1`,viewportRef:f,onScroll:le,children:[X(Jt,{value:m,onChange:h,placeholder:u(`searchPlaceholder`)}),!_&&P&&X(o.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:`border-wx-border border-b px-5 py-5`,children:Z(`div`,{className:`flex items-start justify-between gap-4`,children:[Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[X(`h2`,{className:`font-semibold text-lg text-wx-fg`,children:P}),ee&&X(`p`,{className:`text-sm text-wx-fg-muted leading-snug`,children:ee}),Z(`div`,{className:`mt-1 flex flex-col gap-0.5 text-wx-fg-subtle text-xs`,children:[X(`span`,{children:u(`articlesCount`,{count:te})}),ie&&X(`span`,{children:u(`authorsByline`,{first:ie,remaining:re})})]})]}),F.length>0&&X(`div`,{className:`shrink-0`,children:X(en,{authors:F})})]})}),de?X(Ac,{}):N.length===0&&y.length===0?X(`div`,{className:`px-5 py-6`,children:X(ct,{children:X(tt,{className:`py-8 text-center`,children:X(`p`,{className:`text-sm text-wx-fg-muted`,children:u(_?`noResults`:`emptyTitle`)})})})}):Z(`div`,{className:`flex flex-col`,children:[N.map((e,t)=>X(Tc,{title:e.title,description:e.excerpt,authors:e.authors,kind:`article`,onClick:()=>l(e.slug),delay:Math.min(t,Ec)*.03},e.id)),!_&&y.map((e,t)=>X(Tc,{title:e.name,description:e.description,meta:(e.articleCount??0)>0?u(`articlesCount`,{count:e.articleCount??0}):void 0,kind:`folder`,onClick:()=>c(e._id,{name:e.name,description:e.description??void 0,articleCount:e.articleCount??0}),delay:(N.length+t)*.03},e._id)),(oe||w)&&X(`div`,{className:`flex justify-center py-3`,children:X(U,{className:`h-3 w-24`})})]})]})})}function Ac(){return X(`div`,{className:`flex flex-col`,children:Array.from({length:3}).map((e,t)=>Z(`div`,{className:`flex items-center gap-3 border-wx-border border-b px-5 py-4 last:border-b-0`,children:[Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[X(U,{className:`h-4 w-32 rounded`}),X(U,{className:`h-3 w-56 rounded`})]}),X(U,{className:`h-4 w-4 rounded`})]},t))})}function jc(e,t){let[n,r]=Y(e);return K(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function Mc(e,t,n){let r=Object.entries(t).map(([e,t])=>({chatId:`demo-${F(e)}`,threadKey:F(e),title:t.title,status:`OPEN`,unreadCount:0,updatedAt:t.at,preview:null,senderName:n,lastSenderKind:`ai`}));return[...e,...r]}function Nc(e,t,n){return e?{chatId:``,threadKey:t(e.slotId,e.variant.id),status:`OPEN`,unreadCount:0,updatedAt:``,preview:{text:e.variant.text,at:``,fromVisitor:!1},senderName:n}:null}var Pc=`launcher-message`;function Fc(e,t){return{id:`slot:${e.slotId}:${e.variant.id}:${e.variant.contentHash??``}`,text:e.variant.text,sender:{kind:`ai`,name:t},buttons:e.variant.buttons.map(e=>({text:e.label,payload:``})),inPlaceKey:Pc}}function Ic(e){let t=e.find(e=>e.chatId);return t?{kind:`thread`,chatId:t.chatId,threadKey:t.threadKey}:{kind:`list`}}function Lc(e,t,n=e=>F(e)){if(!e)return{kind:`plain`};let r=n(e.slotId,e.variantId);return t.some(e=>e.chatId&&e.threadKey===r)?{kind:`topic-with-slot-text`,slotId:e.slotId}:{kind:`slot-thread`,threadKey:r}}function Rc(e){let{message:t,slotLauncher:n,launcherToMessages:r,threads:i,isOpen:a}=e,{setRoute:o,markResumed:s,openPanel:c,togglePanel:l,setPendingReply:u}=e,d=e.keyFor??(e=>F(e)),f=G((e,t)=>{let n=d(e,t),r=i.find(e=>e.chatId&&e.threadKey===n);return s(),o({kind:`messages-thread`,threadKey:n,chatId:r?.chatId}),n},[i,s,o,d]),{resumeRoute:p,threadsLoading:m}=e,h=G(()=>{let e=p?.();if(e)return s(),e;if(m)return{kind:`messages-thread`,pendingLatest:!0};s();let t=Ic(i);return t.kind===`thread`?{kind:`messages-thread`,chatId:t.chatId,threadKey:t.threadKey}:{kind:`messages`}},[i,m,s,p]);return{onLauncherToggle:G(()=>{!a&&n&&r&&o(h()),l()},[a,n,r,h,o,l]),messagesEntryRoute:h,newConversationRoute:G(e=>{let r={kind:`messages-thread`,threadKey:e};if(!n)return r;let a=Lc(t.top?{slotId:t.top.slotId,variantId:t.top.variant.id}:null,i,d);return a.kind===`slot-thread`?{kind:`messages-thread`,threadKey:a.threadKey}:a.kind===`topic-with-slot-text`?{...r,welcomeSlotId:a.slotId}:r},[n,t.top,i,d]),onBubbleOpen:G(()=>{let e=t.shown;e&&(t.markRead(`click`),f(e.slotId,e.variant.id),c())},[t,f,c]),onBubbleReply:G(e=>{let n=t.shown;n&&(t.markRead(`click`),u({threadKey:f(n.slotId,n.variant.id),text:e}),c())},[t,f,u,c]),onBubbleDismiss:G(()=>t.markRead(`dismiss`),[t])}}var zc={none:0,visitors:1,origin:2,path:3},Bc=e=>Array.isArray(e)&&e.length>0;function Vc(e){return e?Bc(e.paths)?zc.path:Bc(e.origins)?zc.origin:e.visitors===`ANONYMOUS`||e.visitors===`SIGNED_IN`?zc.visitors:zc.none:zc.none}function Hc(e,t){let n=[];return e.forEach((e,r)=>{if(e.kind!==`MESSAGE`)return;let i=ri(e.variants,t);i&&n.push({slotId:e.id,variant:i,specificity:Vc(i.when),order:r,reappearAfterDays:e.reappearAfterDays??null})}),n.sort((e,t)=>t.specificity-e.specificity||e.order-t.order)}function Uc(e,t){return Hc(e,t)[0]??null}var Wc=864e5,Gc=(e,t)=>`wexio:slot-read:${e}:${t}`,Kc=e=>typeof e==`string`?e:void 0;function qc(e,t,n){try{let r=e.getItem(Gc(t,n));if(!r)return{};let i=JSON.parse(r);if(!i||typeof i!=`object`||Array.isArray(i))return{};let a={};for(let[e,t]of Object.entries(i)){if(!t||typeof t!=`object`)continue;let n=t;if(typeof n.contentHash!=`string`)continue;let r=Kc(n.shownAt),i=Kc(n.readAt),o=Kc(n.dismissedAt);a[e]={contentHash:n.contentHash,...r?{shownAt:r}:{},...i?{readAt:i}:{},...o?{dismissedAt:o}:{}}}return a}catch{return{}}}function Jc(e,t,n,r,i){let a=qc(e,t,n),o=r.contentHash??``,s=a[r.id],c=s&&s.contentHash===o?s:{contentHash:o};a[r.id]={...c,...i};try{e.setItem(Gc(t,n),JSON.stringify(a))}catch{}}function Yc(e,t,n,r,i){let a=qc(e,t,n)[r.id],o=a?.shownAt&&(!a.dismissedAt||a.shownAt>a.dismissedAt);a&&a.contentHash===(r.contentHash??``)&&o||Jc(e,t,n,r,{shownAt:new Date(i).toISOString()})}function Xc(e,t,n,r,i,a){let o=new Date(a).toISOString();Jc(e,t,n,r,i===`dismiss`?{dismissedAt:o}:{readAt:o})}function Zc(e,t,n,r){let i=e[t.id];if(!i||i.contentHash!==(t.contentHash??``))return!1;if(i.readAt)return!0;if(!i.dismissedAt)return!1;if(n===null)return!0;let a=Date.parse(i.dismissedAt);return Number.isNaN(a)?!0:r-a<n*Wc}function Qc(e,t,n){let r=e[t.id];if(!r||r.contentHash!==(t.contentHash??``)||r.readAt||!r.dismissedAt||n===null)return null;let i=Date.parse(r.dismissedAt);return Number.isNaN(i)?null:i+n*Wc}var $c=2e9;function el(e){let{slots:t,ctx:n,publicKey:r,storage:i,ready:a,isOpen:o,suppressed:s}=e,c=e.previewVisible===!0,l=e.graceMs??1500,u=J(e.now??Date.now);u.current=e.now??Date.now;let d=r??``,f=q(()=>t.some(e=>e.kind===`MESSAGE`),[t]),p=q(()=>Uc(t,n),[t,n]),[m,h]=Y(0),[g,_]=Y(!1);K(()=>{if(!a){_(!1);return}let e=setTimeout(()=>_(!0),l);return()=>clearTimeout(e)},[a,l]);let v=q(()=>p&&!c?Zc(qc(i,d,p.slotId),p.variant,p.reappearAfterDays,u.current()):!1,[p,i,d,m,c]);K(()=>{if(!p||!v||c)return;let e=Qc(qc(i,d,p.slotId),{id:p.variant.id,contentHash:p.variant.contentHash},p.reappearAfterDays);if(e===null)return;let t=setTimeout(()=>h(e=>e+1),Math.min(Math.max(e-u.current(),0)+50,$c));return()=>clearTimeout(t)},[p,v,i,d,m,c]);let y=e.blocked!==!0,b=y&&g&&!!p&&!v,x=y&&g&&p&&!v&&!o&&!s?p:null,S=J(x);S.current=x;let C=G((e,t)=>{if(c)return;let n={id:e.variant.id,contentHash:e.variant.contentHash};Xc(i,d,e.slotId,n,t,u.current()),h(e=>e+1)},[i,d,c]);K(()=>{!x||c||Yc(i,d,x.slotId,{id:x.variant.id,contentHash:x.variant.contentHash},u.current())},[x,i,d,c]);let w=J(null);K(()=>{if(!o){w.current=x;return}let e=w.current;w.current=null,e&&C(e,`open`)},[o,x,C]);let T=G(e=>{let t=S.current;t&&C(t,e)},[C]);return q(()=>({active:f,top:p,shown:x,unread:b,markRead:T}),[f,p,x,b,T])}var tl={" ":` `,"<":`<`,">":`>`,""":`"`,"'":`'`,"'":`'`,"&":`&`};function nl(e){return e.replace(/&#(\d+);/g,(e,t)=>{let n=Number(t);return Number.isFinite(n)?String.fromCodePoint(n):e}).replace(/ |<|>|"|'|'/gi,e=>tl[e.toLowerCase()]??e).replace(/&/gi,`&`)}function rl(e){return e?/[<&]/.test(e)?nl(e.replace(/<li[^>]*>/gi,`
|
|
89
|
+
`)}\n\n---\n${d}\n`}function Gi(e){return e?`wexio:news-last-read:${e}`:`wexio:news-last-read`}function Ki(e,t){return e?e!==t:!1}function qi({enabled:e,locale:t}){let n=he(),r=n.publicKey,i=n.storage,{data:a}=nn({variables:{args:{locale:t,limit:1}},skip:!e}),o=a?.visitorNewsList?.items?.[0]?._id??null,[s,c]=Y(null);K(()=>{if(!(typeof window>`u`))try{c(i.getItem(Gi(r)))}catch{c(null)}},[r,i]);let l=G(()=>{if(o){c(o);try{i.setItem(Gi(r),o)}catch{}}},[o,r,i]);return{hasUnread:e&&Ki(o,s),markRead:l}}var Ji=class extends Error{constructor(e=`permanent outbox failure`){super(e),this.name=`PermanentOpError`}},Yi=`wexio-outbox`,Xi=`queues`,Zi=1;function Qi(e,t){return[...e.filter(e=>!(e.clientKey===t.clientKey||t.semantics===`convergence`&&t.convergenceKey!==void 0&&e.semantics===`convergence`&&e.convergenceKey===t.convergenceKey)),t]}function $i(e,t,n){return e.map(e=>e.clientKey===t?{...e,...n}:e)}function ea(e,t){return e.filter(e=>e.clientKey!==t)}function ta(e,t){let n=e.filter(e=>!(e.semantics===`beacon`&&e.expiresAt!=null&&e.expiresAt<=t));return n.length===e.length?e:n}function na(e){return e.filter(e=>e.status!==`sending`).sort((e,t)=>e.createdAt-t.createdAt)}function ra(e){return e.filter(e=>e.semantics!==`beacon`)}function ia(e){return Math.min(6e4,2e3*2**Math.max(0,e-1))}function aa(e){return!!e&&typeof e==`object`&&typeof e.clientKey==`string`&&typeof e.op==`string`&&typeof e.createdAt==`number`}function oa(){let e=new Map;return{load:t=>Promise.resolve((e.get(t)??[]).filter(aa)),save:(t,n)=>(n.length===0?e.delete(t):e.set(t,n),Promise.resolve())}}function sa(){return typeof indexedDB>`u`?Promise.resolve(null):new Promise(e=>{let t;try{t=indexedDB.open(Yi,Zi)}catch{e(null);return}t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(Xi)||e.createObjectStore(Xi)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null),t.onblocked=()=>e(null)})}async function ca(e){if(!e)return[];let t=await sa();return t?new Promise(n=>{try{let r=t.transaction(Xi,`readonly`).objectStore(Xi).get(e);r.onsuccess=()=>{let e=r.result;n(Array.isArray(e)?e.filter(aa):[])},r.onerror=()=>n([])}catch{n([])}}):[]}async function la(e,t){if(!e)return;let n=await sa();if(n)return new Promise(r=>{try{let i=n.transaction(Xi,`readwrite`),a=i.objectStore(Xi);t.length===0?a.delete(e):a.put(t,e),i.oncomplete=()=>r(),i.onerror=()=>r(),i.onabort=()=>r()}catch{r()}})}var ua={load:ca,save:la};function da(){return typeof indexedDB>`u`?oa():ua}function fa(e,t=da(),n={}){let r=[],i=!1,a=new Set,o=()=>{for(let e of a)e(r)},s=(n.crossTab??!0)&&typeof BroadcastChannel<`u`?new BroadcastChannel(`${Yi}:${e}`):null;return s&&(s.onmessage=async()=>{r=await t.load(e),o()}),{get:()=>r,set:n=>{i=!0,r=n,t.save(e,ra(n)),s?.postMessage(`changed`),o()},subscribe:e=>(a.add(e),()=>a.delete(e)),ready:t.load(e).then(e=>{if(!i&&e.length>0){let t=Date.now();r=e.map(e=>e.status===`sending`&&(e.sendingSince===void 0||e.sendingSince>t||t-e.sendingSince>12e4)?{...e,status:`queued`}:e),o()}}),dispose:()=>{a.clear(),s?.close()}}}function pa(){try{if(typeof crypto<`u`&&`randomUUID`in crypto)return crypto.randomUUID()}catch{}return`ck-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function ma(){return typeof navigator<`u`&&!navigator.onLine}function ha({publicKey:e,enabled:t,isolated:n=!1,paused:r=!1,run:i,onSent:a,isPermanent:o,onDropped:s}){let[c,l]=Y([]),[u,d]=Y(typeof navigator>`u`?!0:navigator.onLine),f=J(i),p=J(a),m=J(o),h=J(s);K(()=>{f.current=i,p.current=a,m.current=o,h.current=s});let g=J(null),_=J(!1),v=J(r);v.current=r;let y=J(null),b=J(()=>{});b.current=G(()=>{let e=g.current;!e||_.current||ma()||v.current||(_.current=!0,(async()=>{try{for(;!(ma()||v.current);){let t=Date.now(),n=ta(e.get(),t);n!==e.get()&&e.set(n);let r=na(e.get()),i=r.find(e=>(e.nextAttemptAt??0)<=t);if(!i){let e=r.reduce((e,t)=>Math.min(e,t.nextAttemptAt??0),1/0);e!==1/0&&e>t&&(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>b.current(),e-t));break}e.set($i(e.get(),i.clientKey,{status:`sending`,sendingSince:Date.now()}));try{let t=await f.current(i,{patch:t=>e.set($i(e.get(),i.clientKey,{payload:t}))});p.current(i,t),e.set(ea(e.get(),i.clientKey))}catch(t){if(t instanceof Ji||m.current?.(t)===!0)e.set(ea(e.get(),i.clientKey)),h.current?.(i,t);else{let t=i.attempts+1;e.set($i(e.get(),i.clientKey,{status:`failed`,attempts:t,nextAttemptAt:Date.now()+ia(t)}))}}}}finally{_.current=!1}})())},[]),K(()=>{if(!t||!e){l([]);return}let r=n?fa(e,oa(),{crossTab:!1}):fa(e);g.current=r,l(r.get());let i=r.subscribe(e=>l(e));return r.ready.then(()=>{l(r.get()),b.current()}),()=>{i(),r.dispose(),g.current=null}},[t,e,n]);let x=J(r);return K(()=>{let e=x.current;if(x.current=r,r||!e)return;y.current&&clearTimeout(y.current);let t=g.current;if(t){let e=t.get().map(e=>({...e,nextAttemptAt:0}));e.length>0&&t.set(e)}b.current()},[r]),K(()=>{if(typeof window>`u`)return;let e=()=>{d(!0),y.current&&clearTimeout(y.current);let e=g.current;if(e){let t=e.get().map(e=>({...e,nextAttemptAt:0}));t.length>0&&e.set(t)}b.current()},t=()=>d(!1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]),K(()=>()=>{y.current&&clearTimeout(y.current)},[]),{ops:c,online:u,enqueue:G(e=>{let t={clientKey:pa(),op:e.op,semantics:e.semantics,...e.convergenceKey===void 0?{}:{convergenceKey:e.convergenceKey},payload:e.payload,createdAt:Date.now(),status:`queued`,attempts:0,...e.semantics===`beacon`&&e.ttlMs!==void 0?{expiresAt:Date.now()+e.ttlMs}:{}},n=g.current;return n&&(n.set(Qi(n.get(),t)),b.current()),t},[]),retry:G(e=>{let t=g.current;t&&(y.current&&clearTimeout(y.current),t.set($i(t.get(),e,{status:`queued`,attempts:0,nextAttemptAt:0})),b.current())},[]),discard:G(e=>{let t=g.current;t&&t.set(ea(t.get(),e))},[]),clear:G(()=>{y.current&&clearTimeout(y.current);let t=g.current;t?t.set([]):e&&la(e,[])},[e])}}Array.from({length:21},(e,t)=>`wx-nt_${t+1}`);var ga=`wx-nt_`;function _a(e){return e?e.startsWith(`http://`)||e.startsWith(`https://`)?e:e.startsWith(ga)?b(`/sounds/${e}.mp3`):null:null}var va=`wexio:sound-muted`;function ya(e){let t=he().storage,[n,r]=Y(!1),i=J(null),a=J(null);K(()=>{typeof window>`u`||r(t.getItem(va)===`1`)},[t]),K(()=>{if(typeof window>`u`)return;i.current?.pause(),a.current?.pause();let t=_a(e?.inboundSoundId),n=_a(e?.outboundSoundId),r=typeof e?.volume==`number`?Math.max(0,Math.min(1,e.volume)):.5;return i.current=t?ba(t,r):null,a.current=n?ba(n,r):null,()=>{i.current?.pause(),a.current?.pause()}},[e]);let o=G(()=>{r(e=>{let n=!e;try{t.setItem(va,n?`1`:`0`)}catch{}return n})},[t]),s=G(t=>{if(n||e&&e.enabled===!1)return;let r=t===`inbound`?i.current:a.current;r&&(r.currentTime=0,r.play().catch(()=>{}))},[n,e]);return{muted:n,toggleMuted:o,playInbound:()=>s(`inbound`),playOutbound:()=>s(`outbound`)}}function ba(e,t){let n=new Audio;return n.preload=`none`,n.volume=t,n.src=e,n}function xa(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>Object.hasOwn(t,n)&&xa(e[n],t[n])):!1}function Sa(e){let t=J(void 0),n=J(!1);return(!n.current||!xa(t.current,e))&&(t.current=e,n.current=!0),t.current}function Ca(e,t){let[n,r]=Y(`dark`),i=fe(),a=i.themeRoot,o=i.themeOverride,s=i.kind,c=he().storage;return K(()=>{let n=new URL(window.location.href).searchParams.get(`theme`),i=e&&wa(e)?e:null,l=t?.allowed!==!1,u=t?.preference&&wa(t.preference)?t.preference:null,d=(()=>{if(!l)return null;try{let e=c.getItem(`wexio:theme`);return e&&wa(e)?e:null}catch{return null}})(),f=()=>{if(o&&wa(o))return o;if(n&&wa(n))return n;if(l){if(u&&u!==`auto`)return u;if(d&&d!==`auto`&&!u)return d}return i&&i!==`auto`?i:`auto`};if(l&&u)try{c.setItem(`wexio:theme`,u)}catch{}let p=f(),m=a??document.documentElement,h=()=>{let e=p===`auto`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:p;m.dataset.theme=e,r(e)};h();let g=window.matchMedia(`(prefers-color-scheme: dark)`),_=()=>p===`auto`&&h();g.addEventListener?.(`change`,_);let v=e=>{if(!Ze(e,s)||!e.data||typeof e.data!=`object`||e.data.type!==`wexio:preview-theme-mode:v1`&&e.data.type!==`wexio:theme:v1`)return;let t=e.data.mode;t&&wa(t)&&(p=t,h())};return window.addEventListener(`message`,v),()=>{g.removeEventListener?.(`change`,_),window.removeEventListener(`message`,v)}},[e,a,o,s,t?.preference,t?.allowed,c]),n}function wa(e){return e===`light`||e===`dark`||e===`auto`}function Ta({enabled:e,refetch:t,onSettled:n}){let r=J(e),i=J(t),a=J(n),o=J(!1);K(()=>{r.current=e,i.current=t,a.current=n});let s=G(async()=>{if(!r.current||o.current)return;o.current=!0;let e=Date.now();try{await i.current(),a.current(e)}catch{}finally{o.current=!1}},[]);return K(()=>{if(!e||typeof window>`u`)return;let t=()=>void s(),n=()=>{document.hidden||s()};return window.addEventListener(`online`,t),document.addEventListener(`visibilitychange`,n),()=>{window.removeEventListener(`online`,t),document.removeEventListener(`visibilitychange`,n)}},[e,s]),s}var Ea=`https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit`,Da=`wexio-turnstile-script`,Oa=null;function ka(){return typeof window>`u`?Promise.reject(Error(`turnstile: no window`)):window.turnstile?Promise.resolve():Oa||(Oa=new Promise((e,t)=>{let n=document.getElementById(Da);if(n){if(window.turnstile)return e();n.addEventListener(`load`,()=>e(),{once:!0}),n.addEventListener(`error`,()=>t(Error(`turnstile: script load error`)),{once:!0});return}let r=document.createElement(`script`);r.id=Da,r.src=Ea,r.async=!0,r.defer=!0,r.addEventListener(`load`,()=>e(),{once:!0}),r.addEventListener(`error`,()=>{r.remove(),t(Error(`turnstile: script load error`))},{once:!0}),document.head.appendChild(r)}).catch(e=>{throw Oa=null,e}),Oa)}function Aa(e){let{siteKey:t,theme:n,position:r=`right`}=e,i=J(null),a=J(n);return K(()=>{a.current=n},[n]),K(()=>{if(typeof document>`u`)return;let e=document.createElement(`div`);return e.style.position=`fixed`,e.style.bottom=`88px`,r===`left`?e.style.left=`16px`:e.style.right=`16px`,e.style.zIndex=`60`,document.body.appendChild(e),i.current=e,()=>{e.remove(),i.current=null}},[r]),{getToken:G(async()=>{if(!t)return;await ka();let e=i.current,n=typeof window<`u`?window.turnstile:void 0;if(!e||!n)throw Error(`turnstile: not ready`);return new Promise((r,i)=>{let a=n.render(e,{sitekey:t,execution:`render`,appearance:`interaction-only`,retry:`auto`,"refresh-expired":`auto`,callback:e=>{r(e);try{n.remove(a)}catch{}},"error-callback":()=>{try{n.remove(a)}catch{}i(Error(`turnstile: error`))},"expired-callback":()=>{try{n.remove(a)}catch{}i(Error(`turnstile: expired before submission`))},"timeout-callback":()=>{try{n.remove(a)}catch{}i(Error(`turnstile: timeout`))}})})},[t])}}function ja(e,t){if(typeof window>`u`)return`en`;if(!t?.ignoreVisitorOverrides){let e=Na(new URL(window.location.href).searchParams.get(`lang`));if(e)return e;let t=Na(Pa(`wexio-locale`));if(t)return t}if(e&&e!==`AUTO`&&e!==`WEBSITE`){let t=Na(e);if(t)return t}else if(e===`WEBSITE`){let e=Na(document.documentElement.lang);if(e)return e}return Na(navigator.language)||`en`}var Ma=new Map(ce.map(e=>[e.toLowerCase(),e]));function Na(e){if(!e)return null;let t=e.toLowerCase().replace(/_/g,`-`),n=Ma.get(t);if(n)return n;let r=t.split(`-`)[0];return Ma.get(r)??null}function Pa(e){let t=document.cookie.split(`;`);for(let n of t){let[t,...r]=n.trim().split(`=`);if(t===e)return decodeURIComponent(r.join(`=`))}return null}var Fa=2147483647,Ia=5e3,La=6e4,Ra=15*6e4;function za(e,t,n){let r=(e,t=Ra)=>({delayMs:Math.min(t,e*2**Math.min(n,10)),streak:n+1});if(typeof e!=`number`||!Number.isFinite(e)||e<=0)return r(La);let i=(e-t)*1e3;return i<Ia?r(Ia,Math.min(Ra,Math.max(Ia,e*1e3-Ia))):{delayMs:Math.min(Fa,i),streak:0}}var Ba=`network_unreachable`,Va=`preview_visitor_limit`;function Ha(e){if(!e||typeof e!=`object`)return!1;let t=e;if(Array.isArray(t.graphQLErrors)&&t.graphQLErrors.length>0)return!1;if(t.networkError)return!0;let n=typeof t.message==`string`?t.message:``;return/failed to fetch|networkerror|network request failed|load failed|err_|fetch/i.test(n)}var Ua=e=>e?`wexio:visitor-id:${e}`:`wexio:visitor-id`,Wa=e=>e?`wexio:visitor-session:${e}`:`wexio:visitor-session`,Ga=`wexio:visitor-id`,Ka=`wexio:visitor-session`;function qa(e,t=Se(),n=H(`local`)){if(!(typeof window>`u`))try{let r={token:e.token,chatId:e.chatId,peopleId:e.peopleId,displayName:e.displayName,expiresAt:Date.now()+e.expiresIn*1e3};n.setItem(Wa(t),JSON.stringify(r))}catch{}}function Ja(e,t){if(typeof window>`u`)return null;try{let n=t.getItem(Wa(e));if(!n&&e){let r=t.getItem(Ka);r&&(t.setItem(Wa(e),r),t.removeItem(Ka),n=r)}if(!n)return null;let r=JSON.parse(n);return typeof r?.token!=`string`||typeof r?.expiresAt!=`number`||r.expiresAt-Xa*1e3<=Date.now()?(t.removeItem(Wa(e)),null):r}catch{return null}}function Ya(e,t){if(!(typeof window>`u`))try{t.removeItem(Wa(e)),t.removeItem(Ka)}catch{}}var Xa=30,Za=120,Qa=3e4,$a=`wexio:prechat-submitted:`;function eo(e=S()){e.token=null;let t=e.publicKey,n=e.storage;if(Ya(t,n),!(typeof window>`u`))try{n.removeItem(Ua(t)),n.removeItem(Ga);for(let e=n.length-1;e>=0;e--){let t=n.key(e);t?.startsWith($a)&&n.removeItem(t)}}catch{}}function to(e){let[t,n]=Y({token:null,chatId:null,peopleId:null,displayName:null,isAuthenticating:e.enabled,error:null,verified:!1,blocked:!1}),r=he(),{token:i,holding:a}=_(),o=e.enabled&&!a,[s,c]=Y(i);s!==i&&(c(i),r.token=null,n({token:null,chatId:null,peopleId:null,displayName:null,isAuthenticating:o,error:null,verified:!1,blocked:!1}));let[l]=Je(),[u]=B(),d=J(e.identity??null);d.current=i?null:e.identity??null;let f=J(e.getTurnstileToken);f.current=e.getTurnstileToken;let p=J(null),m=J(!1),h=J(0),g=J(0),v=G(async e=>{if(r.preview.paused){n(e=>({...e,isAuthenticating:!1}));return}if(m.current){n(e=>({...e,isAuthenticating:!1,error:Va}));return}n(e=>({...e,isAuthenticating:!0,error:null}));try{let t=ro(r.publicKey,r.storage),i=r.preview.active?null:d.current,a=ja(),o;try{o=await f.current?.()??void 0}catch(t){if(e.current)return;n(e=>({...e,isAuthenticating:!1,error:`turnstile_failed:${t.message}`}));return}if(e.current)return;let s;if(i&&(i.googleIdToken||i.jwt||i.userId&&i.userHash)){let n=await u({variables:{input:{visitorId:t,...i.googleIdToken?{googleIdToken:i.googleIdToken}:i.jwt?{jwt:i.jwt}:{userId:i.userId,userHash:i.userHash},name:i.name,email:i.email,phone:i.phone,contextSnapshot:JSON.stringify({...i.attributes&&typeof i.attributes==`object`?i.attributes:{},locale:a}),turnstileToken:o}}});if(e.current)return;s=n.data?.startIdentifiedVisitor}else{let n=await l({variables:{input:{visitorId:t,turnstileToken:o,contextSnapshot:JSON.stringify({locale:a})}}});if(e.current)return;s=n.data?.startAnonymousVisitor}if(!s&&r.preview.paused){n(e=>({...e,isAuthenticating:!1,error:null}));return}if(!s){n(e=>({...e,isAuthenticating:!1,error:`handshake_empty_response`}));return}if(s.visitorId&&s.visitorId!==t)try{r.storage.setItem(Ua(r.publicKey),s.visitorId)}catch{}r.token=s.token,n({token:s.token,chatId:s.chatId,peopleId:s.peopleId,displayName:s.displayName,isAuthenticating:!1,error:null,verified:s.kind===`identified`,blocked:s.blocked??!1}),s.kind===`identified`?qa({token:s.token,chatId:s.chatId,peopleId:s.peopleId,displayName:s.displayName,expiresIn:s.expiresIn},r.publicKey,r.storage):Ya(r.publicKey,r.storage);let c=za(s.expiresIn,Xa,h.current);h.current=c.streak;let m=c.delayMs;r.preview.active&&typeof s.expiresIn==`number`&&s.expiresIn<Za&&(r.preview.requestRefresh(),m=Math.max(Qa,m)),p.current&&clearTimeout(p.current),g.current=Date.now()+m,p.current=setTimeout(()=>{e.current||v(e)},m)}catch(t){if(e.current)return;if(j(t,L.previewVisitorLimit)){m.current=!0,n({token:null,chatId:null,peopleId:null,displayName:null,isAuthenticating:!1,error:Va,verified:!1,blocked:!1});return}let i=r.preview.paused;n({token:null,chatId:null,peopleId:null,displayName:null,isAuthenticating:!1,error:i?null:Ha(t)?Ba:t.message,verified:!1,blocked:!1})}},[l,u,r]),y=i?null:e.identity,b=y?.googleIdToken?`google:${y.googleIdToken}`:y?.jwt?`jwt:${y.jwt}`:y?.userId&&y?.userHash?`${y.userId}:${y.userHash}`:null,x=J(e.epoch);return K(()=>{x.current!==e.epoch&&(x.current=e.epoch,h.current=0,r.token=null,n({token:null,chatId:null,peopleId:null,displayName:null,isAuthenticating:o,error:null,verified:!1,blocked:!1}))},[e.epoch,o,r]),K(()=>{if(!o){n(e=>({...e,isAuthenticating:!1}));return}if(typeof window>`u`)return;let e={current:!1};h.current=0;let t=d.current||i?null:Ja(r.publicKey,r.storage);if(t){r.token=t.token,n({token:t.token,chatId:t.chatId,peopleId:t.peopleId,displayName:t.displayName,isAuthenticating:!1,error:null,verified:!0,blocked:!1});let i=Math.min(Fa,Math.max(0,t.expiresAt-Date.now()));g.current=t.expiresAt,p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{e.current||(Ya(r.publicKey,r.storage),v(e))},i)}else v(e);let a=()=>{e.current||typeof document>`u`||document.hidden||g.current!==0&&Date.now()>=g.current&&v(e)};return document.addEventListener(`visibilitychange`,a),()=>{e.current=!0,document.removeEventListener(`visibilitychange`,a),p.current&&(clearTimeout(p.current),p.current=null)}},[o,v,b,e.epoch,r,i]),K(()=>{if(!o||typeof window>`u`)return;let e=!1,t={current:!1};return r.onUnauthorized=()=>{e||(e=!0,Ya(r.publicKey,r.storage),r.token=null,v(t).finally(()=>{e=!1}))},r.onIntegrationMismatch=()=>{if(!e){e=!0,Ya(r.publicKey,r.storage),r.token=null;try{let e=r.publicKey;r.storage.removeItem(Ua(e))}catch{}v(t).finally(()=>{e=!1})}},()=>{t.current=!0,r.onUnauthorized=null,r.onIntegrationMismatch=null}},[o,e.epoch,v,r]),t}function no(e){let[t,n]=Y({identity:null,prefill:null});return K(()=>{if(e.visitorIdentity||e.visitorPrefill||typeof window>`u`)return;let t=t=>{if(!Ze(t,e.kind))return;let r=t.data;if(!(!r||typeof r!=`object`))if(r.type===`wexio:identify:v1`){let e=r.user;if(!e||typeof e!=`object`)return;let t=typeof e.googleIdToken==`string`,i=typeof e.jwt==`string`,a=typeof e.userId==`string`&&typeof e.userHash==`string`;if(!t&&!i&&!a)return;n(n=>({...n,identity:{googleIdToken:t?e.googleIdToken:void 0,jwt:i?e.jwt:void 0,userId:typeof e.userId==`string`?e.userId:void 0,userHash:typeof e.userHash==`string`?e.userHash:void 0,name:typeof e.name==`string`?e.name:void 0,email:typeof e.email==`string`?e.email:void 0,phone:typeof e.phone==`string`?e.phone:void 0,attributes:e.attributes&&typeof e.attributes==`object`?e.attributes:void 0}}))}else if(r.type===`wexio:prefill:v1`){let e=r.prefill;if(!e||typeof e!=`object`)return;n(t=>({...t,prefill:{name:typeof e.name==`string`?e.name:void 0,email:typeof e.email==`string`?e.email:void 0,phone:typeof e.phone==`string`?e.phone:void 0}}))}else r.type===`wexio:shutdown:v1`&&n({identity:null,prefill:null})};return window.addEventListener(`message`,t),window.parent?.postMessage({type:`wexio:widget:ready:v1`},`*`),()=>window.removeEventListener(`message`,t)},[e.kind,e.visitorIdentity,e.visitorPrefill]),{identity:e.visitorIdentity??t.identity,prefill:e.visitorPrefill??t.prefill}}function ro(e=Se(),t=H(`local`)){try{let n=Ua(e),r=t.getItem(n);if(r)return r;if(e){let e=t.getItem(Ga);if(e)return t.setItem(n,e),t.removeItem(Ga),e}let i=io();return t.setItem(n,i),i}catch{return io()}}function io(){if(typeof crypto<`u`&&typeof crypto.randomUUID==`function`)return crypto.randomUUID();let e=new Uint8Array(16);if(typeof crypto<`u`&&crypto.getRandomValues)crypto.getRandomValues(e);else for(let t=0;t<16;t++)e[t]=Math.floor(Math.random()*256);return Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}var ao={themeMode:null,language:null,desktopNotifications:!1},oo=new Set;function so(e,t){if(ao[e]!==t){ao={...ao,[e]:t};for(let e of oo)e(ao)}}function co(){let[e,t]=Y(ao);return K(()=>(oo.add(t),t(ao),()=>{oo.delete(t)}),[]),e}var lo=null,uo=new Set;function fo(e){if(ue(e)&&lo!==e){lo=e;for(let t of uo)t(e)}}var po=new Set;function mo(e){if(e){fo(e);return}let t=lo!==null;if(lo=null,t)for(let e of po)e()}function ho(e){return po.add(e),()=>{po.delete(e)}}function go(e){return uo.add(e),()=>{uo.delete(e)}}var _o={en:()=>import(`./widget-react-CkrkZ3pp.js`).then(e=>e.n).then(e=>e.default),"en-US":()=>import(`./widget-react-BXlRglvP2.js`).then(e=>e.default),"en-GB":()=>import(`./widget-react-DdIv5LKJ2.js`).then(e=>e.default),uk:()=>import(`./widget-react-DV3BZAN0.js`).then(e=>e.default),de:()=>import(`./widget-react-RWR7XGaa.js`).then(e=>e.default),es:()=>import(`./widget-react-CrWgGrOv2.js`).then(e=>e.default),"es-MX":()=>import(`./widget-react-Ci-9Gtq-2.js`).then(e=>e.default),fr:()=>import(`./widget-react-CTr72oJP2.js`).then(e=>e.default),it:()=>import(`./widget-react-D71FBbwd.js`).then(e=>e.default),nl:()=>import(`./widget-react-BZ7sDBzB.js`).then(e=>e.default),pt:()=>import(`./widget-react-BJLMVdT8.js`).then(e=>e.default),"pt-BR":()=>import(`./widget-react-CVu0iQzo.js`).then(e=>e.default),sv:()=>import(`./widget-react-CESpzeFW.js`).then(e=>e.default),da:()=>import(`./widget-react-DtxeNDUn.js`).then(e=>e.default),no:()=>import(`./widget-react-DpT7-wmd.js`).then(e=>e.default),fi:()=>import(`./widget-react-DSej45hO2.js`).then(e=>e.default),pl:()=>import(`./widget-react--SnHxPOY.js`).then(e=>e.default),cs:()=>import(`./widget-react-oMWtXf4y.js`).then(e=>e.default),sk:()=>import(`./widget-react-x1O7Aw-0.js`).then(e=>e.default),tr:()=>import(`./widget-react-C7ABw9U-.js`).then(e=>e.default),ro:()=>import(`./widget-react-B4O9LryX.js`).then(e=>e.default),hu:()=>import(`./widget-react-D3JyG2-s.js`).then(e=>e.default),el:()=>import(`./widget-react-DFBUOrVn2.js`).then(e=>e.default),ar:()=>import(`./widget-react-CCfIguE3.js`).then(e=>e.default),he:()=>import(`./widget-react-DR9wD8RF2.js`).then(e=>e.default),hi:()=>import(`./widget-react-CiXpsVM3.js`).then(e=>e.default),th:()=>import(`./widget-react-DySiCebV.js`).then(e=>e.default),vi:()=>import(`./widget-react-G5Axrzd4.js`).then(e=>e.default),id:()=>import(`./widget-react-CO_-SXaO.js`).then(e=>e.default),ja:()=>import(`./widget-react-BDwkTnhP.js`).then(e=>e.default),ko:()=>import(`./widget-react-JRr_KL3e.js`).then(e=>e.default),zh:()=>import(`./widget-react-D8sZCT6W.js`).then(e=>e.default),"zh-TW":()=>import(`./widget-react-bxGcWjbs.js`).then(e=>e.default)};async function vo(e){return(_o[e]??_o.en)()}var yo={themeMode:null,themeModeEditable:!0,language:null,desktopNotifications:!1,loaded:!1};function bo(e){let{data:t}=ur({skip:!e.enabled||!!e.isDummy}),n=t?.visitorProfile,r=co(),i=e.isDummy?{themeMode:r.themeMode,themeModeEditable:!0,language:r.language,desktopNotifications:r.desktopNotifications,loaded:!0}:n?{themeMode:xo(n.preferences.themeMode),themeModeEditable:n.themeModeEditable,language:n.preferences.language??null,desktopNotifications:!!n.preferences.desktopNotifications,loaded:!0}:e.enabled?yo:{...yo,loaded:!0};return K(()=>{if(i.loaded&&i.language){try{document.cookie=`wexio-locale=${encodeURIComponent(i.language)}; path=/; max-age=${3600*24*365}; samesite=lax`}catch{}fo(i.language)}},[i.loaded,i.language]),i}function xo(e){if(typeof e!=`string`)return null;let t=e.toLowerCase();return t===`light`||t===`dark`?t:t===`auto`||t===`system`?`auto`:null}function So(e,t,n){let r=!1,i=t.preview.token,a=a=>{if(!t.preview.active)return;if(a instanceof MessageEvent){if(typeof a.data!=`string`)return;try{let e=ot(JSON.parse(a.data));e&&t.preview.report(e,i)}catch{}return}if(e.readyState!==2||r||!t.publicKey)return;r=!0;let o=i;Pi({publicKey:t.publicKey,token:n,previewToken:o}).then(e=>{e.kind===`unauthorized`&&e.previewReason&&t.preview.report(e.previewReason,o)})};return e.addEventListener(`error`,a),()=>e.removeEventListener(`error`,a)}var Co=3e3,wo=6e4,To=1e4;function Eo({token:e,visitorId:t=null,enabled:n=!0,epoch:r=0,onUpdate:i,onAdd:a,onReopen:o}){let s=he(),c=J(i);K(()=>{c.current=i},[i]);let l=J(a);K(()=>{l.current=a},[a]);let u=J(o);K(()=>{u.current=o},[o]);let d=J(!1),f=J(!0),p=J(e);p.current=e;let m=!!e;K(()=>{if(!n||!m||typeof window>`u`)return;let e=s.publicKey;if(!e)return;let t=!1,r=0,i,a,o=()=>{},h=()=>{let n=p.current;if(!n)return;let m=`${Te()}/api/web/realtime/threads?token=${encodeURIComponent(n)}&publicKey=${encodeURIComponent(e)}`,g=new EventSource(m,{withCredentials:!1}),_=e=>{try{c.current(JSON.parse(e.data))}catch{console.warn(`[wexio] unparseable threadUpdated frame`,e.data)}},v=e=>{try{l.current?.(JSON.parse(e.data))}catch{console.warn(`[wexio] unparseable threadAdded frame`,e.data)}},y=()=>{d.current&&f.current&&(f.current=!1,u.current?.()),d.current=!0,clearTimeout(a),a=setTimeout(()=>{r=0,f.current=!0},To)},b=e=>{e instanceof MessageEvent||(clearTimeout(a),o(),!t&&(i=setTimeout(h,Math.min(wo,Co*2**r)),r+=1))};g.addEventListener(`open`,y),g.addEventListener(`threadUpdated`,_),g.addEventListener(`threadAdded`,v);let x=So(g,s,n);g.addEventListener(`error`,b),o=()=>{x(),g.removeEventListener(`open`,y),g.removeEventListener(`threadUpdated`,_),g.removeEventListener(`threadAdded`,v),g.removeEventListener(`error`,b),g.close()}};return h(),()=>{t=!0,clearTimeout(i),clearTimeout(a),o()}},[m,t,n,r,s])}function Do(e){let[t,n]=Y(!1),[r,i]=Y(!1);return K(()=>(e.onUnavailable=()=>{n(!0),(e.publicKey?T(e.publicKey):Promise.resolve()).finally(()=>i(!0))},()=>{e.onUnavailable=null}),[e]),{unavailable:t,evicted:r}}var Oo={status:null};function ko(e){let t=e.assignment;return t?t.assignedStatus===`connected`?{status:`connected`,...t.operator?{operator:t.operator}:{}}:t.assignedStatus===`pending`?{status:`pending`,...t.estimate?{estimate:t.estimate}:{}}:{status:null}:null}function Ao(e){return e?e.assignedStatus===`connected`?{status:`connected`,...e.operator?{operator:{name:e.operator.name,...e.operator.avatar?{avatar:e.operator.avatar}:{}}}:{}}:e.assignedStatus===`pending`?{status:`pending`,...e.estimate?{estimate:e.estimate}:{}}:Oo:null}function jo(e,t,n=new Date){let r=new Date(e);if(Number.isNaN(r.getTime()))return``;let i=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),a=new Intl.DateTimeFormat(t,{hour:`numeric`,minute:`2-digit`}).format(r);if(i(r,n))return a;let o=new Date(n);return o.setDate(n.getDate()+1),i(r,o)?`${new Intl.RelativeTimeFormat(t,{numeric:`auto`}).format(1,`day`)}, ${a}`:`${new Intl.DateTimeFormat(t,{weekday:`short`}).format(r)}, ${a}`}function Mo(e){let t=e.assignment;if(!t?.messageId)return null;let n={id:t.messageId,direction:`OUTBOUND`,text:``,ageLabel:``,...e.sentAt?{createdAt:e.sentAt}:{},sender:{kind:`system`,name:`System`}};return t.assignedStatus===`connected`?{...n,system:{type:`OPERATOR_CONNECTED`,...t.operator?.name?{operatorName:t.operator.name}:{},...t.operator?.avatar?{operatorAvatar:t.operator.avatar}:{}}}:t.assignedStatus===null?{...n,system:{type:`CHAT_RESOLVED`,...t.initiator?{initiator:t.initiator}:{}}}:null}function No(e,t,n){if(e.basis===`business_hours`)return e.availableAt?t(`assignment.eta.businessHours`,{time:jo(e.availableAt,n)}):null;if(e.basis===`operator_load`){if(typeof e.etaMinutes==`number`)return t(`assignment.eta.minutes`,{minutes:e.etaMinutes});if(e.soft)return t(`assignment.eta.soft`)}return null}var Po=!1,Fo=/(["'`]page["'`]|VisitorPageInput)/;function Io(e){let t=e??{};return[...t.errors??[],...t.graphQLErrors??[],...t.networkError?.result?.errors??[]].map(e=>e?.message??``)}function Lo(e){return Io(e).some(e=>Fo.test(e))}async function Ro(e){let t=e.options?.variables?.input;if(!t)return e.send(e.options);let{page:n,...r}=t,i=n??e.page,a=t=>({...e.options,variables:{...e.options?.variables,input:t}});if(Po||!i)return e.send(a(r));let o;try{o=await e.send(a({...r,page:i}))}catch(t){if(!Lo(t))throw t;return Po=!0,e.send(a(r))}return Lo(o)?(Po=!0,e.send(a(r))):o}function zo(){let e=fe().kind,[t,n]=V();return[G(n=>Ro({send:t,options:n,page:Mi(e)}),[t,e]),n]}function Bo(e){return e.kind===`home`||e.kind===`messages`||e.kind===`help`||e.kind===`news`||e.kind===`profile`}function Vo(e,t){switch(e.kind){case`messages`:return t.home?{kind:`home`}:t.help?{kind:`help`}:t.news?{kind:`news`}:t.profile?{kind:`profile`}:{kind:`messages`};case`help-category`:return e.origin??{kind:`help`};case`help-article`:return e.origin?e.origin:e.from===`category`&&e.fromCategoryId?{kind:`help-category`,categoryId:e.fromCategoryId}:{kind:`help`};case`news-article`:return e.origin??{kind:`news`};case`messages-thread`:return{kind:`messages`};default:return{kind:`home`}}}function Ho(e,t){return e.kind===`help-article`||e.kind===`news-article`||e.kind===`help-category`?{...e,origin:t}:e}function Uo(e,t){return e.kind===`news-article`&&t.kind===`news-article`?{...e,origin:t.origin}:e.kind===`help-article`&&t.kind===`help-article`?{...e,origin:t.origin,...t.origin?{}:{from:t.from,fromCategoryId:t.fromCategoryId}}:Ho(e,t)}function Wo(e){switch(e.kind){case`home`:return`home`;case`messages`:case`messages-thread`:return`messages`;case`help`:case`help-category`:case`help-article`:return`help`;case`news`:case`news-article`:return`news`;case`profile`:return`profile`}}function Go(e,t){return e===`home`?t.home:e===`messages`?t.messenger:e===`help`?t.help:e===`news`?t.news:!!t.profile}function Ko(e){return+!!e.home+ +!!e.messenger+ +!!e.help+ +!!e.news+ +!!e.profile}function qo(e,t){if(Go(e,t))return e;for(let e of[`home`,`messages`,`help`,`news`,`profile`])if(Go(e,t))return e;return e}function Jo(e){switch(e){case`PHOTO`:return`🖼️`;case`VIDEO`:return`🎥`;case`AUDIO`:return`🎵`;case`VOICE`:return`🎤`;case`FILE`:return`📄`;case`GIF`:return`🎞️`;case`STICKER`:return`🩷`;default:return`📎`}}function Yo(e){switch(e){case`PENDING`:return`PENDING`;case`RESOLVED`:return`RESOLVED`;case`CLOSED`:return`CLOSED`;default:return`OPEN`}}function Xo(e){if(typeof e==`string`)return e;if(typeof e==`number`||e instanceof Date){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toISOString()}return``}function Zo(e){return e.replace(/<[^>]*>/g,` `).replace(/ /g,` `).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/�*39;|'/g,`'`).replace(/\s+/g,` `).trim()}function Qo(e){let t=e.lastMessagePreview?Zo(e.lastMessagePreview):``,n=e.lastMessageMediaType??null,r=e.lastMessageMediaThumbUrl??null,i=Xo(e.lastMessageAt??e.updatedAt),a=!!e.lastMessageFromVisitor;if(t)return{text:t,at:i,fromVisitor:a,...n?{media:!0,mediaType:n,mediaThumbUrl:r}:{}};if(n)return{text:``,at:i,fromVisitor:a,media:!0,mediaType:n,mediaThumbUrl:r};let o=e.lastMessageSenderKind;return e.lastMessageAt&&o&&o!==`system`?{text:``,at:i,fromVisitor:a,media:!0}:null}function $o(e,t){return{chatId:e.id,threadKey:e.threadKey??null,title:null,status:Yo(e.status),blocked:e.blocked??!1,unreadCount:e.unReadCount??0,updatedAt:Xo(e.updatedAt),preview:Qo(e),senderName:t,lastSenderKind:e.lastMessageSenderKind??null,lastSenderName:e.lastMessageSenderName??null,lastMessageId:e.lastMessageId??null}}function es(e,t){let n=e?.visitorThreads?.threads;return n?n.map(e=>$o(e,t)):[]}var ts=[`status`,`title`,`unreadCount`,`updatedAt`,`preview`,`lastSenderKind`,`lastSenderName`,`blocked`],ns=e=>e?Date.parse(e):NaN;function rs(e,t){let n=ns(t.lastMessageAt),r=ns(e?.preview?.at);if(!Number.isNaN(n)&&!Number.isNaN(r))return n<r;let i=ns(t.updatedAt),a=ns(e?.updatedAt);return!Number.isNaN(i)&&!Number.isNaN(a)&&i<a}function is(e){switch(e){case`PENDING`:return`PENDING`;case`RESOLVED`:return`RESOLVED`;case`CLOSED`:return`CLOSED`;default:return`OPEN`}}function as(e,t,n=Date.now()){let r={...e};return rs(e,t)||(ss(r,t,e?.preview),ts.some(t=>r[t]!==e?.[t])&&(r.contentAt=n)),t.typing!==void 0&&(r.typing=!!t.typing?.active),t.assignment!==void 0&&(r.assignedStatus=t.assignment?.assignedStatus??null,r.assignedOperatorName=t.assignment?.operator?.name??null),r}function os(e,t,n){n?e[t]=!0:delete e[t]}function ss(e,t,n){if(t.status!=null&&(e.status=is(t.status)),t.title!=null&&(e.title=t.title),t.unReadCount!=null&&(e.unreadCount=t.unReadCount),t.updatedAt!=null&&(e.updatedAt=Xo(t.updatedAt)),t.lastMessageDeletedId&&(delete e.preview,delete e.previewInheritsAt,delete e.previewInheritsDirection),(t.lastMessagePreview!=null||t.lastMessageAt!=null)&&(e.typing=!1),t.lastMessagePreview!=null||t.lastMessageMediaType!=null){let r=t.lastMessagePreview?Zo(t.lastMessagePreview):``,i=t.lastMessageMediaType??null,a=t.lastMessageMediaThumbUrl??null,o=t.lastMessageAt==null&&t.updatedAt==null,s=t.lastMessageFromVisitor==null,c=n&&o?n.at:Xo(t.lastMessageAt??t.updatedAt),l=n&&s?n.fromVisitor:!!t.lastMessageFromVisitor;os(e,`previewInheritsAt`,o&&(n?!!e.previewInheritsAt:!0)),os(e,`previewInheritsDirection`,s&&(n?!!e.previewInheritsDirection:!0)),r?e.preview={text:r,at:c,fromVisitor:l,...i?{media:!0,mediaType:i,mediaThumbUrl:a}:{}}:i?e.preview={text:``,at:c,fromVisitor:l,media:!0,mediaType:i,mediaThumbUrl:a}:t.lastMessageAt!=null&&t.lastMessageSenderKind&&t.lastMessageSenderKind!==`system`&&(e.preview={text:``,at:c,fromVisitor:l,media:!0})}t.lastMessageSenderKind!=null&&(e.lastSenderKind=t.lastMessageSenderKind,e.lastSenderName=t.lastMessageSenderName??null),t.blocked!=null&&(e.blocked=t.blocked)}function cs(e,t){let n=!1,r={};for(let[i,a]of Object.entries(e)){if(a.contentAt!==void 0&&a.contentAt>t){r[i]=a;continue}if(!ts.some(e=>a[e]!==void 0)){r[i]=a;continue}n=!0;let e={...a};for(let t of ts)delete e[t];delete e.contentAt,delete e.previewInheritsAt,delete e.previewInheritsDirection,Object.values(e).some(e=>e!==void 0)&&(r[i]=e)}return n?r:e}function ls(e,t){let n=e.preview;return!n||!t?n:{...n,...e.previewInheritsAt?{at:t.at}:{},...e.previewInheritsDirection?{fromVisitor:t.fromVisitor}:{}}}function us(e,t){if(!t)return e;let n=ns(t.preview?.at),r=ns(e.preview?.at),i=!Number.isNaN(n)&&!Number.isNaN(r)&&n<r?void 0:t;return{...e,...i?.status===void 0?{}:{status:i.status},...i?.title===void 0?{}:{title:i.title},...i?.unreadCount===void 0?{}:{unreadCount:i.unreadCount},...i?.updatedAt===void 0?{}:{updatedAt:i.updatedAt},...i?.preview===void 0?{}:{preview:ls(i,e.preview)},...t.typing===void 0?{}:{typing:t.typing},...t.assignedStatus===void 0?{}:{assignedStatus:t.assignedStatus},...t.assignedOperatorName===void 0?{}:{assignedOperatorName:t.assignedOperatorName},...i?.lastSenderKind===void 0?{}:{lastSenderKind:i.lastSenderKind},...i?.lastSenderName===void 0?{}:{lastSenderName:i.lastSenderName},...i?.blocked===void 0?{}:{blocked:i.blocked}}}var ds=f(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),fs=f(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),ps=f(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),ms=f(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),hs=f(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),gs=f(`book`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),_s=f(`bookmark`,[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}]]),vs=f(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ys=f(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),bs=f(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),xs=f(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Ss=f(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Cs=f(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),ws=f(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ts=f(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),Es=f(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Ds=f(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),Os=f(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),ks=f(`gamepad-2`,[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]),As=f(`gift`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`,key:`1sqzm4`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`,key:`kc0143`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`,key:`1hberx`}]]),js=f(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),Ms=f(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Ns=f(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),Ps=f(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),Fs=f(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Is=f(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Ls=f(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),Rs=f(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),zs=f(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Bs=f(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Vs=f(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Hs=f(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),Us=f(`message-circle-more`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}]]),Ws=f(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Gs=f(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Ks=f(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),qs=f(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Js=f(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Ys=f(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),Xs=f(`phone`,[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),Zs=f(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Qs=f(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),$s=f(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),ec=f(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),tc=f(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),nc=f(`shopping-cart`,[[`circle`,{cx:`8`,cy:`21`,r:`1`,key:`jimo8o`}],[`circle`,{cx:`19`,cy:`21`,r:`1`,key:`13723u`}],[`path`,{d:`M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12`,key:`9zh506`}]]),rc=f(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),ic=f(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),ac=f(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),oc=f(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),sc=f(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),cc=f(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),lc=f(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),uc=f(`underline`,[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]),dc=f(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),fc=f(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),pc=f(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),mc=f(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),hc=f(`volume-x`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]),gc=f(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),_c=f(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),vc={sm:`h-3.5 min-w-3.5 px-0.75 text-[8px]`,md:`h-5 min-w-5 px-1.5 text-[10px]`},yc={duration:.2,ease:[.2,0,0,1]},bc={duration:.12,ease:[.2,0,0,1]};function xc({count:e,size:t=`sm`,className:n,dot:r,label:i}){let a=r&&e<=0;return X(Mt,{children:(e>0||a)&&Z(o.span,{role:`status`,initial:{opacity:0},animate:{opacity:1,transition:yc},exit:{opacity:0,transition:bc},className:u(`inline-flex`,n),"aria-label":i??`${e} unread`,children:[X(`span`,{"aria-hidden":`true`,className:`absolute inset-0 -z-10 rounded-full bg-wx-danger opacity-40 blur-[2px]`}),X(`span`,{className:u(`relative flex items-center justify-center`,`rounded-full bg-wx-danger font-bold leading-none text-white`,vc[t]),children:a?null:e>99?`99+`:e})]},`badge`)})}var Sc=[`home`,`messages`,`help`,`news`,`profile`];function Cc({active:e,features:t,onChange:n,unreadCount:r=0,newsUnread:a=!1}){let o=i(`tabs`),s=i(`news`),c=fn(),l=fn(),d=Sc.filter(e=>Ec(e,t));return X(`div`,{className:`px-3 pt-2 pb-2`,children:X(`nav`,{role:`tablist`,className:u(`relative flex w-full items-center gap-1`,`rounded-full bg-wx-bg-elevated/70 p-1 backdrop-blur-md`,`shadow-[inset_0_0_0_1px_rgb(0_0_0/0.04)]`),children:d.map(t=>{let i=t===e;if(t===`home`)return X(wc,{id:t,label:o(t),isActive:i,onClick:()=>n(t),parentHandlers:c.parentHandlers,icon:X(Rt,{ref:c.iconRef,size:16})},t);if(t===`messages`)return X(wc,{id:t,label:o(t),isActive:i,onClick:()=>n(t),parentHandlers:l.parentHandlers,icon:X(Ft,{ref:l.iconRef,size:16}),badgeCount:r},t);let u=t===`help`?Ss:t===`news`?$t:dc;return X(Tc,{id:t,label:o(t),isActive:i,onClick:()=>n(t),Icon:u,showDot:t===`news`&&a,dotLabel:s(`unread`)},t)})})})}function wc({id:e,label:t,isActive:n,onClick:r,icon:i,parentHandlers:a,badgeCount:s=0}){return Z(`button`,{type:`button`,role:`tab`,"aria-selected":n,onClick:r,...a,className:u(`relative z-10 flex items-center justify-center gap-1.5 rounded-full px-3 py-2`,`transition-colors duration-150`,n?`flex-[2_2_0%] text-wx-fg`:`flex-1 text-wx-fg-muted hover:text-wx-fg`),children:[n&&X(o.span,{layoutId:`bottom-nav-pill`,className:`absolute inset-0 -z-10 rounded-full bg-wx-bg shadow-[0_2px_8px_rgba(0,0,0,0.08)]`,transition:{type:`spring`,stiffness:420,damping:36}}),Z(`span`,{className:`relative inline-flex shrink-0 items-center justify-center`,children:[i,X(xc,{count:s,size:`sm`,className:`absolute -top-1.5 -right-2 z-20`})]}),X(o.span,{animate:{width:n?`auto`:0,opacity:+!!n,marginLeft:n?0:-4},initial:!1,transition:{duration:.2,ease:`easeOut`},className:`overflow-hidden text-[11px] font-semibold tracking-tight whitespace-nowrap`,children:t})]})}function Tc({id:e,label:t,isActive:n,onClick:r,Icon:i,showDot:a=!1,dotLabel:s}){let c=Bt();return K(()=>{n&&c.start({scale:[1,1.15,1]})},[n,c]),Z(o.button,{type:`button`,role:`tab`,"aria-selected":n,onClick:r,onHoverStart:()=>c.start({rotate:[0,-10,10,0]}),className:u(`relative z-10 flex items-center justify-center gap-1.5 rounded-full px-3 py-2`,`transition-colors duration-150`,n?`flex-[2_2_0%] text-wx-fg`:`flex-1 text-wx-fg-muted hover:text-wx-fg`),children:[n&&X(o.span,{layoutId:`bottom-nav-pill`,className:`absolute inset-0 -z-10 rounded-full bg-wx-bg shadow-[0_2px_8px_rgba(0,0,0,0.08)]`,transition:{type:`spring`,stiffness:420,damping:36}}),Z(`span`,{className:`relative inline-flex shrink-0 items-center justify-center`,children:[X(o.span,{animate:c,transition:{duration:.4},children:X(i,{size:16,strokeWidth:n?2.2:1.8})}),X(xc,{count:0,dot:a,label:s,size:`sm`,className:`absolute -top-1.5 -right-2 z-20`})]}),X(o.span,{animate:{width:n?`auto`:0,opacity:+!!n,marginLeft:n?0:-4},initial:!1,transition:{duration:.2,ease:`easeOut`},className:`overflow-hidden text-[11px] font-semibold tracking-tight whitespace-nowrap`,children:t})]})}function Ec(e,t){return e===`home`?t.home:e===`messages`?t.messenger:e===`help`?t.help:e===`news`?t.news:!!t.profile}var Dc=3e3;function Oc({online:e,showBranding:t}){let n=i(`messages`),r=i(`branding`),[a,s]=Y(!1),c=J(e);K(()=>{let t=c.current;if(c.current=e,!e){s(!1);return}if(!t&&e){s(!0);let e=setTimeout(()=>s(!1),Dc);return()=>clearTimeout(e)}},[e]);let l=e?a?`online`:t?`branding`:null:`offline`,d=`absolute inset-0 flex items-center justify-center gap-1.5 px-4 text-[10px] font-medium`;return X(`div`,{className:u(`relative shrink-0`,l?`h-[26px]`:`h-0`),children:Z(Mt,{initial:!1,mode:`wait`,children:[l===`offline`&&Z(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:u(d,`bg-wx-danger/10 text-wx-danger`),children:[X(gc,{"aria-hidden":`true`,className:`size-3`}),X(`span`,{children:n(`offlineBanner`)})]},`offline`),l===`online`&&Z(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:u(d,`bg-wx-success/10 text-wx-success`),children:[X(_c,{"aria-hidden":`true`,className:`size-3`}),X(`span`,{children:n(`backOnline`)})]},`online`),l===`branding`&&Z(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:u(d,`bg-wx-bg text-wx-fg-subtle`),children:[X(`span`,{children:r(`poweredBy`)}),X(`a`,{href:`https://wexio.io?ref=widget`,target:`_blank`,rel:`noopener`,className:`font-semibold text-wx-fg-muted transition-colors hover:text-wx-fg`,children:r(`wexio`)})]},`branding`)]})})}function kc({title:e,subtitle:t,organizationLogoUrl:n,muted:r,onToggleMute:a,onBack:o,onClose:s,showResolve:c,onResolve:l,onDownloadTranscript:d,downloadingTranscript:f,expanded:p,onToggleExpand:m}){let h=i(`header`),g=i(`header`),_=fn(),v=fn();return Z(`header`,{"data-wx-top-bar":!0,className:u(`flex items-center gap-3 border-b border-wx-border bg-wx-bg px-3 py-3`),children:[o&&X(Yt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":h(`back`),onClick:o,className:`size-8 shrink-0`,..._.parentHandlers,children:X(zt,{ref:_.iconRef,size:16})}),n&&X(`span`,{className:`h-9 w-9 shrink-0 overflow-hidden rounded-full`,children:X(`img`,{src:n,alt:e,className:`h-full w-full object-cover`})}),Z(`div`,{className:`min-w-0 flex-1`,children:[X(`p`,{className:`truncate text-sm font-semibold text-wx-fg`,children:e}),t&&X(`p`,{className:`truncate text-xs text-wx-fg-muted`,children:t})]}),X(jc,{muted:r,onToggleMute:a,showResolve:!!c&&!!l,onResolve:l,onDownloadTranscript:d,downloadingTranscript:!!f}),m&&X(Yt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":g(p?`collapse`:`expand`),onClick:m,className:`group size-8 shrink-0`,children:X(`span`,{className:`block transition-transform duration-200 ease-out group-hover:scale-110 group-active:scale-90`,children:X(Nc,{expanded:!!p})})}),X(Yt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":h(`close`),onClick:s,className:`size-8 shrink-0`,...v.parentHandlers,children:X(It,{ref:v.iconRef,size:16})})]})}function Ac(){return Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`}),X(`path`,{d:`m9 11 3 3L22 4`})]})}function jc({muted:e,onToggleMute:t,showResolve:n,onResolve:r,onDownloadTranscript:a,downloadingTranscript:o}){let s=i(`header`),c=i(`sound`),l=i(`messages`),[u,d]=Y(!1),f=J(null);K(()=>{if(!u)return;let e=e=>{f.current&&!e.composedPath().includes(f.current)&&d(!1)},t=e=>{e.key===`Escape`&&d(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[u]);let p=e=>()=>{d(!1),e?.()};return Z(`div`,{ref:f,className:`relative shrink-0`,children:[X(Yt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":s(`moreActions`),"aria-haspopup":`menu`,"aria-expanded":u,onClick:()=>d(e=>!e),className:`group size-8`,children:X(`span`,{className:`block transition-transform duration-200 ease-out group-hover:scale-110 group-active:scale-90`,children:X(cn,{icon:Ds,size:18})})}),u&&Z(`div`,{role:`menu`,className:`absolute top-full right-0 z-30 mt-1 min-w-44 overflow-hidden rounded-wx-sm border border-wx-border bg-wx-bg py-1 shadow-lg`,children:[a&&X(Mc,{icon:X(cn,{icon:o?zs:Es,size:16}),label:s(`downloadTranscript`),onClick:p(a),disabled:o,spinning:o}),X(Mc,{icon:X(cn,{icon:e?hc:mc,size:16}),label:c(e?`unmute`:`mute`),onClick:p(t)}),n&&X(Mc,{icon:X(Ac,{}),label:l(`resolveConversation`),onClick:p(r)})]})]})}function Mc({icon:e,label:t,onClick:n,disabled:r,spinning:i}){return Z(`button`,{type:`button`,role:`menuitem`,onClick:n,disabled:r,className:`flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm text-wx-fg transition-colors hover:bg-wx-bg-elevated disabled:cursor-default disabled:opacity-60`,children:[X(`span`,{className:u(`shrink-0 text-wx-fg-muted`,i&&`animate-spin`),children:e}),X(`span`,{className:`truncate`,children:t})]})}function Nc({expanded:e}){return e?Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`polyline`,{points:`4 14 10 14 10 20`}),X(`polyline`,{points:`20 10 14 10 14 4`}),X(`line`,{x1:`14`,y1:`10`,x2:`21`,y2:`3`}),X(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`})]}):Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`polyline`,{points:`15 3 21 3 21 9`}),X(`polyline`,{points:`9 21 3 21 3 15`}),X(`line`,{x1:`21`,y1:`3`,x2:`14`,y2:`10`}),X(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`})]})}function Pc({children:e}){let{isDummy:t}=Tt(),r=n(),i=g(),a=i.demo,o=a!==void 0&&typeof a==`object`&&!!a&&Object.keys(a).length>0,[s,c]=Y(null);if(K(()=>{if(!t||o)return;let e=!0;return oe(r).then(t=>{e&&c(t)}),()=>{e=!1}},[t,o,r]),!t)return X(Dn,{children:e});let l=o?i:s?{...i,demo:s}:null;return l?X(jn,{locale:r,messages:l,timeZone:typeof Intl<`u`?Intl.DateTimeFormat().resolvedOptions().timeZone:`UTC`,children:e}):null}function Fc({title:e,description:t,meta:n,authors:r,onClick:i,kind:a=`none`,delay:s=0}){let c=a===`article`;return Z(o.button,{type:`button`,onClick:i,initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.18,delay:s},className:u(`group flex w-full items-center gap-3 border-wx-border border-b text-start transition-colors`,`hover:bg-wx-bg-elevated/60`,`last:border-b-0`,c?`px-5 py-3`:`px-5 py-3.5`),children:[Z(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5 [overflow-wrap:anywhere]`,children:[X(`span`,{className:u(`text-wx-fg`,c?`font-normal text-sm`:`font-semibold text-sm`),children:e}),t&&X(`span`,{className:u(`leading-snug`,c?`truncate text-[11px] text-wx-fg-subtle`:`text-wx-fg-muted text-xs`),children:Ue(t,160)}),n&&X(`span`,{className:`text-[11px] text-wx-fg-subtle`,children:n})]}),Z(`span`,{className:`flex shrink-0 items-center gap-2 text-wx-fg-muted`,children:[r&&r.length>0&&X(on,{authors:r}),X(Dt,{size:16,className:`transition-transform group-hover:translate-x-0.5 rtl:-scale-x-100 rtl:group-hover:-translate-x-0.5`,"aria-hidden":`true`})]})]})}var Ic=10,Lc=240,Rc=3;function zc({categoryId:e,categoryName:t,categoryDescription:r,categoryArticleCount:a,isDummy:s,onOpenCategory:c,onOpenArticle:l}){let u=i(`help`),d=y(),f=xt(),p=n(),[m,h]=Y(``),g=Vc(m,300),_=g.length>=2,{data:v}=Xt({variables:{parentId:e,locale:p},skip:s}),b=q(()=>v?.visitorHelpFolders??[],[v]),{data:x,loading:S,fetchMore:C}=Ut({variables:{args:{folderId:e,locale:p,recursive:!1,limit:Ic,offset:0}},skip:s,notifyOnNetworkStatusChange:!0}),{data:w,loading:T}=Ut({variables:{args:{query:g,locale:p,limit:10}},skip:g.length<2||s}),E=s?se(d).find(t=>t.id===e):null,D=s?Qe(d).filter(t=>t.categoryId===e):[],O=s?D.map(e=>({id:e.id,slug:e.slug,title:e.title,excerpt:e.excerpt,authors:Qt(e.authors),reactionCounts:null})):(x?.visitorHelpList?.items??[]).map(e=>({id:e._id,slug:e.slug,title:e.title,excerpt:e.excerpt??null,authors:Qt(e.authors),reactionCounts:e.reactionCounts??null})),k=s?Qe(d).filter(e=>e.title.toLowerCase().includes(g.toLowerCase())||e.excerpt.toLowerCase().includes(g.toLowerCase())).map(e=>({id:e.id,slug:e.slug,title:e.title,excerpt:e.excerpt,authors:Qt(e.authors),reactionCounts:null})):[],A=(w?.visitorHelpList?.items??[]).map(e=>({id:e._id,slug:e.slug,title:e.title,excerpt:e.excerpt??null,authors:Qt(e.authors),reactionCounts:e.reactionCounts??null})),j=_?s?k:A:O,M=t??E?.title??``,N=r??E?.description??``,P=a??E?.articleCount??O.length,F=q(()=>{let e=new Map;for(let t of O)for(let n of t.authors??[])e.has(n.id)||e.set(n.id,n);return Array.from(e.values())},[O]),ee=F.slice(0,Rc),te=Math.max(0,F.length-ee.length),ne=ee[0]?.name??``,re=!_&&!s&&(x?.visitorHelpList?.meta?.hasNextPage??!1),[ie,ae]=Y(!1),oe=G(async()=>{if(!(!re||ie)){ae(!0);try{await C({variables:{args:{folderId:e,locale:p,recursive:!1,limit:Ic,offset:x?.visitorHelpList?.items?.length??0}},updateQuery:(e,{fetchMoreResult:t})=>t?{...e,visitorHelpList:{...t.visitorHelpList,items:[...e.visitorHelpList?.items??[],...t.visitorHelpList?.items??[]]}}:e})}catch{}finally{ae(!1)}}},[re,ie,e,p,C,x]),ce=G(e=>{let t=e.currentTarget;t.scrollHeight-t.clientHeight-t.scrollTop<Lc&&oe()},[oe]),I=s&&!$e(d)||!s&&!_&&S&&O.length===0&&b.length===0;return X(`div`,{className:`flex h-full min-h-0 flex-col`,children:Z(it,{followDirection:!0,className:`min-h-0 flex-1`,viewportRef:f,onScroll:ce,children:[X(rn,{value:m,onChange:h,placeholder:u(`searchPlaceholder`)}),!_&&M&&X(o.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:`border-wx-border border-b px-5 py-5`,children:Z(`div`,{className:`flex items-start justify-between gap-4`,children:[Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[X(`h2`,{className:`font-semibold text-lg text-wx-fg`,children:M}),N&&X(`p`,{className:`text-sm text-wx-fg-muted leading-snug`,children:N}),Z(`div`,{className:`mt-1 flex flex-col gap-0.5 text-wx-fg-subtle text-xs`,children:[X(`span`,{children:u(`articlesCount`,{count:P})}),ne&&X(`span`,{children:u(`authorsByline`,{first:ne,remaining:te})})]})]}),ee.length>0&&X(`div`,{className:`shrink-0`,children:X(on,{authors:ee})})]})}),I?X(Bc,{}):j.length===0&&b.length===0?X(`div`,{className:`px-5 py-6`,children:X(Ke,{children:X(z,{className:`py-8 text-center`,children:X(`p`,{className:`text-sm text-wx-fg-muted`,children:u(_?`noResults`:`emptyTitle`)})})})}):Z(`div`,{className:`flex flex-col`,children:[j.map((e,t)=>X(Fc,{title:e.title,description:e.excerpt,authors:e.authors,kind:`article`,onClick:()=>l(e.slug),delay:Math.min(t,Ic)*.03},e.id)),!_&&b.map((e,t)=>X(Fc,{title:e.name,description:e.description,meta:(e.articleCount??0)>0?u(`articlesCount`,{count:e.articleCount??0}):void 0,kind:`folder`,onClick:()=>c(e._id,{name:e.name,description:e.description??void 0,articleCount:e.articleCount??0}),delay:(j.length+t)*.03},e._id)),(ie||T)&&X(`div`,{className:`flex justify-center py-3`,children:X(U,{className:`h-3 w-24`})})]})]})})}function Bc(){return X(`div`,{className:`flex flex-col`,children:Array.from({length:3}).map((e,t)=>Z(`div`,{className:`flex items-center gap-3 border-wx-border border-b px-5 py-4 last:border-b-0`,children:[Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[X(U,{className:`h-4 w-32 rounded`}),X(U,{className:`h-3 w-56 rounded`})]}),X(U,{className:`h-4 w-4 rounded`})]},t))})}function Vc(e,t){let[n,r]=Y(e);return K(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function Hc(e,t,n){let r=Object.entries(t).map(([e,t])=>({chatId:`demo-${Ee(e)}`,threadKey:Ee(e),title:t.title,status:`OPEN`,unreadCount:0,updatedAt:t.at,preview:null,senderName:n,lastSenderKind:`ai`}));return[...e,...r]}function Uc(e,t,n){return e?{chatId:``,threadKey:t(e.slotId,e.variant.id),status:`OPEN`,unreadCount:0,updatedAt:``,preview:{text:e.variant.text,at:``,fromVisitor:!1},senderName:n}:null}var Wc=`launcher-message`;function Gc(e,t){return{id:`slot:${e.slotId}:${e.variant.id}:${e.variant.contentHash??``}`,text:e.variant.text,sender:{kind:`ai`,name:t},buttons:e.variant.buttons.map(e=>({text:e.label,payload:``})),inPlaceKey:Wc}}function Kc(e){let t=e.find(e=>e.chatId);return t?{kind:`thread`,chatId:t.chatId,threadKey:t.threadKey}:{kind:`list`}}function qc(e,t,n=e=>Ee(e)){if(!e)return{kind:`plain`};let r=n(e.slotId,e.variantId);return t.some(e=>e.chatId&&e.threadKey===r)?{kind:`topic-with-slot-text`,slotId:e.slotId}:{kind:`slot-thread`,threadKey:r}}function Jc(e){let{message:t,slotLauncher:n,launcherToMessages:r,threads:i,isOpen:a}=e,{setRoute:o,markResumed:s,openPanel:c,togglePanel:l,setPendingReply:u}=e,d=e.keyFor??(e=>Ee(e)),f=G((e,t)=>{let n=d(e,t),r=i.find(e=>e.chatId&&e.threadKey===n);return s(),o({kind:`messages-thread`,threadKey:n,chatId:r?.chatId}),n},[i,s,o,d]),{resumeRoute:p,threadsLoading:m}=e,h=G(()=>{let e=p?.();if(e)return s(),e;if(m)return{kind:`messages-thread`,pendingLatest:!0};s();let t=Kc(i);return t.kind===`thread`?{kind:`messages-thread`,chatId:t.chatId,threadKey:t.threadKey}:{kind:`messages`}},[i,m,s,p]);return{onLauncherToggle:G(()=>{!a&&n&&r&&o(h()),l()},[a,n,r,h,o,l]),messagesEntryRoute:h,newConversationRoute:G(e=>{let r={kind:`messages-thread`,threadKey:e};if(!n)return r;let a=qc(t.top?{slotId:t.top.slotId,variantId:t.top.variant.id}:null,i,d);return a.kind===`slot-thread`?{kind:`messages-thread`,threadKey:a.threadKey}:a.kind===`topic-with-slot-text`?{...r,welcomeSlotId:a.slotId}:r},[n,t.top,i,d]),onBubbleOpen:G(()=>{let e=t.shown;e&&(t.markRead(`click`),f(e.slotId,e.variant.id),c())},[t,f,c]),onBubbleReply:G(e=>{let n=t.shown;n&&(t.markRead(`click`),u({threadKey:f(n.slotId,n.variant.id),text:e}),c())},[t,f,u,c]),onBubbleDismiss:G(()=>t.markRead(`dismiss`),[t])}}var Yc={none:0,visitors:1,origin:2,path:3},Xc=e=>Array.isArray(e)&&e.length>0;function Zc(e){return e?Xc(e.paths)?Yc.path:Xc(e.origins)?Yc.origin:e.visitors===`ANONYMOUS`||e.visitors===`SIGNED_IN`?Yc.visitors:Yc.none:Yc.none}function Qc(e,t){let n=[];return e.forEach((e,r)=>{if(e.kind!==`MESSAGE`)return;let i=oi(e.variants,t);i&&n.push({slotId:e.id,variant:i,specificity:Zc(i.when),order:r,reappearAfterDays:e.reappearAfterDays??null})}),n.sort((e,t)=>t.specificity-e.specificity||e.order-t.order)}function $c(e,t){return Qc(e,t)[0]??null}var el=864e5,tl=(e,t)=>`wexio:slot-read:${e}:${t}`,nl=e=>typeof e==`string`?e:void 0;function rl(e,t,n){try{let r=e.getItem(tl(t,n));if(!r)return{};let i=JSON.parse(r);if(!i||typeof i!=`object`||Array.isArray(i))return{};let a={};for(let[e,t]of Object.entries(i)){if(!t||typeof t!=`object`)continue;let n=t;if(typeof n.contentHash!=`string`)continue;let r=nl(n.shownAt),i=nl(n.readAt),o=nl(n.dismissedAt);a[e]={contentHash:n.contentHash,...r?{shownAt:r}:{},...i?{readAt:i}:{},...o?{dismissedAt:o}:{}}}return a}catch{return{}}}function il(e,t,n,r,i){let a=rl(e,t,n),o=r.contentHash??``,s=a[r.id],c=s&&s.contentHash===o?s:{contentHash:o};a[r.id]={...c,...i};try{e.setItem(tl(t,n),JSON.stringify(a))}catch{}}function al(e,t,n,r,i){let a=rl(e,t,n)[r.id],o=a?.shownAt&&(!a.dismissedAt||a.shownAt>a.dismissedAt);a&&a.contentHash===(r.contentHash??``)&&o||il(e,t,n,r,{shownAt:new Date(i).toISOString()})}function ol(e,t,n,r,i,a){let o=new Date(a).toISOString();il(e,t,n,r,i===`dismiss`?{dismissedAt:o}:{readAt:o})}function sl(e,t,n,r){let i=e[t.id];if(!i||i.contentHash!==(t.contentHash??``))return!1;if(i.readAt)return!0;if(!i.dismissedAt)return!1;if(n===null)return!0;let a=Date.parse(i.dismissedAt);return Number.isNaN(a)?!0:r-a<n*el}function cl(e,t,n){let r=e[t.id];if(!r||r.contentHash!==(t.contentHash??``)||r.readAt||!r.dismissedAt||n===null)return null;let i=Date.parse(r.dismissedAt);return Number.isNaN(i)?null:i+n*el}var ll=2e9;function ul(e){let{slots:t,ctx:n,publicKey:r,storage:i,ready:a,isOpen:o,suppressed:s}=e,c=e.previewVisible===!0,l=e.graceMs??1500,u=J(e.now??Date.now);u.current=e.now??Date.now;let d=r??``,f=q(()=>t.some(e=>e.kind===`MESSAGE`),[t]),p=q(()=>$c(t,n),[t,n]),[m,h]=Y(0),[g,_]=Y(!1);K(()=>{if(!a){_(!1);return}let e=setTimeout(()=>_(!0),l);return()=>clearTimeout(e)},[a,l]);let v=q(()=>p&&!c?sl(rl(i,d,p.slotId),p.variant,p.reappearAfterDays,u.current()):!1,[p,i,d,m,c]);K(()=>{if(!p||!v||c)return;let e=cl(rl(i,d,p.slotId),{id:p.variant.id,contentHash:p.variant.contentHash},p.reappearAfterDays);if(e===null)return;let t=setTimeout(()=>h(e=>e+1),Math.min(Math.max(e-u.current(),0)+50,ll));return()=>clearTimeout(t)},[p,v,i,d,m,c]);let y=e.blocked!==!0,b=y&&g&&!!p&&!v,x=y&&g&&p&&!v&&!o&&!s?p:null,S=J(x);S.current=x;let C=G((e,t)=>{if(c)return;let n={id:e.variant.id,contentHash:e.variant.contentHash};ol(i,d,e.slotId,n,t,u.current()),h(e=>e+1)},[i,d,c]);K(()=>{!x||c||al(i,d,x.slotId,{id:x.variant.id,contentHash:x.variant.contentHash},u.current())},[x,i,d,c]);let w=J(null);K(()=>{if(!o){w.current=x;return}let e=w.current;w.current=null,e&&C(e,`open`)},[o,x,C]);let T=G(e=>{let t=S.current;t&&C(t,e)},[C]);return q(()=>({active:f,top:p,shown:x,unread:b,markRead:T}),[f,p,x,b,T])}var dl={" ":` `,"<":`<`,">":`>`,""":`"`,"'":`'`,"'":`'`,"&":`&`};function fl(e){return e.replace(/&#(\d+);/g,(e,t)=>{let n=Number(t);return Number.isFinite(n)?String.fromCodePoint(n):e}).replace(/ |<|>|"|'|'/gi,e=>dl[e.toLowerCase()]??e).replace(/&/gi,`&`)}function pl(e){return e?/[<&]/.test(e)?fl(e.replace(/<li[^>]*>/gi,`
|
|
90
90
|
- `).replace(/<\/(p|div|ul|ol|li|blockquote|h[1-6]|tr)>/gi,`
|
|
91
91
|
`).replace(/<br\s*\/?>/gi,`
|
|
92
92
|
`).replace(/<[^>]*>/g,``)).split(`
|
|
93
93
|
`).map(e=>e.replace(/[ \t ]+/g,` `).trim()).filter(e=>e!==``).join(`
|
|
94
|
-
`):e.trim():``}function il({id:e,enabled:t=!0,className:n=`relative`,innerClassName:r,anchor:i,children:a}){let s=Fn();return t?i===`end`?X(`div`,{className:u(`grid grid-rows-[minmax(0,1fr)]`,n),children:X(kt,{initial:!1,mode:`sync`,children:X(o.div,{className:u(`col-start-1 row-start-1 max-h-full min-h-0 self-end`,r),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,pointerEvents:`none`},transition:{duration:s?0:150/1e3},children:a},e)})}):X(`div`,{className:n,children:X(kt,{initial:!1,mode:`popLayout`,children:X(o.div,{className:r,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:s?0:150/1e3},children:a},e)})}):X(wn,{children:a})}function al(e){let t=new Map;return e.map(e=>{let n=e.payload||e.text,r=(t.get(n)??0)+1;return t.set(n,r),r===1?n:`${n}#${r}`})}var ol=`line-clamp-2 min-w-0 break-words`,sl=`${ol} text-start`,cl=e=>`${ol} ${e?`text-left`:`text-right`}`;function ll(){return{role:`group`,"aria-label":i(`peek`)(`quickReplies`)}}var ul=112,dl=8,fl=250;function pl(e,t){let[n,r]=Y(null);return K(()=>{if(r(null),!e||!t||typeof window>`u`)return;let n,i=null,a=()=>{let e=window.innerHeight;if(i){if(i.viewport===e)return;i=null,r(null),o();return}let t=vr(`peek`);t&&t.getBoundingClientRect().top<dl&&(i={px:Math.max(0,e-ul),viewport:e},r(i))},o=()=>{clearTimeout(n),n=setTimeout(a,fl)},s=typeof ResizeObserver<`u`?new ResizeObserver(o):null,c=vr(`peek`);return c&&s?.observe(c),window.addEventListener(`resize`,o),o(),()=>{clearTimeout(n),s?.disconnect(),window.removeEventListener(`resize`,o)}},[e,t]),n?.px??null}function ml({message:e,onOpen:t,onDismiss:n,onSendButton:r,position:a=`right`,embedded:s=!1}){let c=i(`peek`),l=ll(),d=al(e?.buttons??[]),f=a===`left`,p=Te().kind===`iframe`,m=pl(p,e?.id);return X(kt,{children:e&&X(o.div,{"data-wx-peek":``,ref:_r.peek,initial:{opacity:0,y:18,scale:.88},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.96},transition:{type:`spring`,stiffness:440,damping:20},onKeyDown:e.inPlaceKey?e=>{e.key===`Escape`&&(e.stopPropagation(),n())}:void 0,className:u(`bottom-24 z-2147483599 flex flex-col gap-3`,`w-[300px]`,s?`absolute`:`fixed`,f?`left-4`:`right-4`),style:{marginBottom:`var(--wx-off-y,0px)`,...f?{marginLeft:`var(--wx-off-x,0px)`}:{marginRight:`var(--wx-off-x,0px)`},maxHeight:p?m??void 0:s?`calc(100% - 7rem - var(--wx-off-y,0px))`:`calc(100dvh - 7rem - var(--wx-off-y,0px))`},role:`dialog`,"aria-label":c(`newMessage`),children:Z(il,{id:e.id,enabled:!!e.inPlaceKey,anchor:`end`,className:`relative min-h-0`,innerClassName:`flex min-h-0 flex-col gap-3`,children:[(e.text||e.thumbUrl)&&Z(o.div,{whileHover:{y:-3},transition:{type:`spring`,stiffness:400,damping:24},className:u(`relative flex min-h-0 shrink-[0.01] flex-col overflow-hidden rounded-wx-lg border border-wx-border bg-wx-bg text-wx-fg`,`shadow-[0_10px_28px_rgba(0,0,0,0.14)]`),children:[Z(`div`,{className:`flex shrink-0 items-center justify-between gap-2 px-4 pt-3 pb-2`,children:[X(`button`,{type:`button`,onClick:t,className:`min-w-0 flex-1 text-start transition-opacity hover:opacity-90`,children:X(hl,{sender:e.sender})}),X(`button`,{type:`button`,onClick:n,"aria-label":c(`dismiss`),className:u(`flex h-6 w-6 shrink-0 items-center justify-center rounded-full`,`text-wx-fg-muted transition-colors hover:bg-wx-bg-elevated hover:text-wx-fg`,`relative before:absolute before:-inset-2.5 before:content-['']`),children:X(At,{size:12})})]}),Z(`button`,{type:`button`,onClick:t,className:u(`block min-h-0 w-full overflow-y-auto text-start`,`transition-opacity hover:opacity-90`),children:[e.thumbUrl&&X(`img`,{src:e.thumbUrl,...e.thumbW&&e.thumbH?{width:e.thumbW,height:e.thumbH}:{},alt:``,style:e.thumbW&&e.thumbH?{aspectRatio:`${e.thumbW} / ${e.thumbH}`}:void 0,className:`block h-auto w-full bg-wx-bg-elevated object-contain`}),e.text&&X(`span`,{className:u(`block px-4 pb-4 text-sm leading-relaxed`,e.thumbUrl?`pt-2`:void 0),children:X(`span`,{dir:`auto`,className:u(`block wrap-anywhere`,`whitespace-pre-line`,`line-clamp-10`),children:rl(e.text)})})]})]}),e.buttons.length>0&&X(`div`,{...l,dir:`ltr`,className:u(`relative z-10 -mx-3 -mt-2 -mb-4 flex min-h-0 shrink-2 flex-col gap-1.5 overflow-y-auto px-3 pt-2 pb-4`,`pointer-coarse:gap-2`,f?`items-start`:`items-end`),children:e.buttons.map((e,t)=>X(o.button,{type:`button`,onClick:()=>r(e.payload,e.text),whileHover:{y:-1},whileTap:{scale:.96},transition:{type:`spring`,stiffness:480,damping:26},className:u(`max-w-full rounded-full bg-wx-bg px-3.5 py-2 text-sm font-medium text-wx-primary`,`relative after:absolute after:top-1/2 after:left-1/2 after:-translate-x-1/2 after:-translate-y-1/2 after:content-[''] pointer-coarse:after:h-[max(100%,44px)] pointer-coarse:after:w-[max(100%,44px)]`,`transition-colors hover:bg-wx-primary hover:text-wx-primary-fg`,`shadow-[0_4px_12px_rgba(0,0,0,0.08)]`),children:X(`span`,{dir:`auto`,className:cl(f),children:e.text})},d[t]))})]})},e.inPlaceKey??e.id)})}function hl({sender:e}){let{config:t}=Ct(),n=i(`peek`),r=e.kind===`ai`||e.kind===`bot`?se(t.messenger?.aiAssistant)??`AI Agent`:e.name?.trim()??``,a=r?null:e.kind===`operator`?n(`operator`):null;return X(`span`,{className:`text-xs font-medium text-wx-fg-muted`,children:r||a})}function gl({title:e,onBack:t,onClose:n,className:r,expanded:a,onToggleExpand:o}){let s=i(`header`),c=ln(),l=ln();return Z(`header`,{"data-wx-top-bar":!0,className:u(`flex h-14 items-center gap-2 border-b border-wx-border bg-wx-bg px-2`,r),children:[X(`div`,{className:`flex flex-1 items-center justify-start`,children:t&&X(Kt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":s(`back`),onClick:t,className:`shrink-0`,...c.parentHandlers,children:X(It,{ref:c.iconRef,size:18,className:`rtl:-scale-x-100`})})}),e&&X(`h2`,{className:`min-w-0 shrink truncate text-center text-base font-semibold text-wx-fg`,children:e}),Z(`div`,{className:`flex flex-1 items-center justify-end gap-0`,children:[o&&X(Kt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":s(a?`collapse`:`expand`),onClick:o,children:a?Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`polyline`,{points:`4 14 10 14 10 20`}),X(`polyline`,{points:`20 10 14 10 14 4`}),X(`line`,{x1:`14`,y1:`10`,x2:`21`,y2:`3`}),X(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`})]}):Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`polyline`,{points:`15 3 21 3 21 9`}),X(`polyline`,{points:`9 21 3 21 3 15`}),X(`line`,{x1:`21`,y1:`3`,x2:`14`,y2:`10`}),X(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`})]})}),X(Kt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":s(`close`),onClick:n,...l.parentHandlers,children:X(Nt,{ref:l.iconRef,size:18})})]})]})}function _l({isDummy:e,onOpenCategory:t,onOpenArticle:r}){let a=i(`help`),o=T(),s=n(),[c,l]=Y(``),u=bl(c,300),{data:d,loading:f}=qt({variables:{parentId:null,locale:s},skip:e}),{data:p}=Bt({variables:{args:{folderId:null,locale:s,recursive:!1,limit:20}},skip:e}),{data:m}=Bt({variables:{args:{query:u,locale:s,limit:10}},skip:u.length<2||e}),h=I().publicKey,g=!!h&&!e,v=$e(g?_.helpCategories(h,s):null,d),y=$e(g?_.helpRoot(h,s):null,p),b=xl(v),x=e?ue(o):b??[],S=u.length>=2,C=Sl(m),w=e?E(o).filter(e=>e.title.toLowerCase().includes(u.toLowerCase())||e.excerpt.toLowerCase().includes(u.toLowerCase())).map(e=>({id:e.id,title:e.title,excerpt:e.excerpt,slug:e.slug,authors:nn(e.authors)})):[],O=e?w:C,k=e?[]:(y?.visitorHelpList?.items??[]).map(e=>({id:e._id,title:e.title,excerpt:e.excerpt??null,slug:e.slug,authors:nn(e.authors)}));return X(`div`,{className:`flex h-full min-h-0 flex-col`,children:Z(ze,{followDirection:!0,className:`min-h-0 flex-1`,viewportRef:Zt(`help`),children:[X(Jt,{value:c,onChange:l,placeholder:a(`searchPlaceholder`)}),S?X(vl,{results:O,onOpen:r}):e&&!D(o)||f&&x.length===0?X(yl,{}):x.length>0||k.length>0?Z(wn,{children:[x.length>0&&X(`div`,{className:`border-wx-border border-b px-5 py-4`,children:X(`p`,{className:`font-semibold text-base text-wx-fg`,children:a(`collectionsCount`,{count:x.length})})}),Z(`div`,{className:`flex flex-col`,children:[x.map((e,n)=>X(Tc,{title:e.title,description:e.description,meta:typeof e.articleCount==`number`&&e.articleCount>0?a(`articlesCount`,{count:e.articleCount}):void 0,kind:`folder`,onClick:()=>t(e.id,{name:e.title,description:e.description,articleCount:e.articleCount}),delay:n*.03},e.id)),k.map((e,t)=>X(Tc,{title:e.title,description:e.excerpt,authors:e.authors,kind:`article`,onClick:()=>r(e.slug),delay:(x.length+t)*.03},e.id))]})]}):X(`div`,{className:`px-5 py-6`,children:X(ct,{children:Z(tt,{className:`py-8 text-center`,children:[X(`p`,{className:`font-semibold text-sm text-wx-fg`,children:a(`emptyTitle`)}),X(`p`,{className:`mt-1 text-wx-fg-muted text-xs`,children:a(`emptyBody`)})]})})})]})})}function vl({results:e,onOpen:t}){let n=i(`help`);return e.length===0?X(`div`,{className:`px-5 py-6`,children:X(ct,{children:X(tt,{className:`py-8 text-center`,children:X(`p`,{className:`text-sm text-wx-fg-muted`,children:n(`noResults`)})})})}):X(`div`,{className:`flex flex-col`,children:e.map((e,n)=>X(Tc,{title:e.title,description:e.excerpt,authors:e.authors,onClick:()=>t(e.slug),delay:n*.03},e.id))})}function yl(){return X(`div`,{className:`flex flex-col`,children:Array.from({length:4}).map((e,t)=>Z(`div`,{className:`flex items-center gap-3 border-wx-border border-b px-5 py-4 last:border-b-0`,children:[Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[X(U,{className:`h-4 w-32 rounded`}),X(U,{className:`h-3 w-56 rounded`}),X(U,{className:`h-3 w-20 rounded`})]}),X(U,{className:`h-4 w-4 rounded`})]},t))})}function bl(e,t){let[n,r]=Y(e);return K(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function xl(e){return e?(e.visitorHelpFolders??[]).map(e=>({id:e._id,title:e.name,description:e.description??``,articleCount:e.articleCount??0})):null}function Sl(e){return e?(e.visitorHelpList?.items??[]).map(e=>({id:e._id,title:e.title,excerpt:e.excerpt??null,slug:e.slug,authors:nn(e.authors),reactionCounts:e.reactionCounts??null})):[]}function Cl(e,t=[]){let n=[];function r(t,r){let i=W.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=W.useMemo(()=>o,Object.values(o));return X(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=W.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>W.createContext(e));return function(n){let r=n?.[e]||t;return W.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,wl(i,...t)]}function wl(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return W.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Tl=globalThis?.document?W.useLayoutEffect:()=>{},El=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Wt(`Primitive.${t}`),r=W.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),X(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Dl=h((e=>{var n=t(`react`);function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),Ol=h(((e,t)=>{t.exports=Dl()}))();function kl(){return(0,Ol.useSyncExternalStore)(Al,()=>!0,()=>!1)}function Al(){return()=>{}}var jl=`Avatar`,[Ml,Nl]=Cl(jl),[Pl,Fl]=Ml(jl),Il=W.forwardRef((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,a]=W.useState(`idle`);return X(Pl,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:X(El.span,{...r,ref:t})})});Il.displayName=jl;var Ll=`AvatarImage`,Rl=W.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=Fl(Ll,n),s=Hl(r,a),c=Ue(e=>{i(e),o.onImageLoadingStatusChange(e)});return Tl(()=>{s!==`idle`&&c(s)},[s,c]),s===`loaded`?X(El.img,{...a,ref:t,src:r}):null});Rl.displayName=Ll;var zl=`AvatarFallback`,Bl=W.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=Fl(zl,n),[o,s]=W.useState(r===void 0);return W.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?X(El.span,{...i,ref:t}):null});Bl.displayName=zl;function Vl(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?`loaded`:`loading`):`error`:`idle`}function Hl(e,{referrerPolicy:t,crossOrigin:n}){let r=kl(),i=W.useRef(null),a=r?(i.current||(i.current=new window.Image),i.current):null,[o,s]=W.useState(()=>Vl(a,e));return Tl(()=>{s(Vl(a,e))},[a,e]),Tl(()=>{let e=e=>()=>{s(e)};if(!a)return;let r=e(`loaded`),i=e(`error`);return a.addEventListener(`load`,r),a.addEventListener(`error`,i),t&&(a.referrerPolicy=t),typeof n==`string`&&(a.crossOrigin=n),()=>{a.removeEventListener(`load`,r),a.removeEventListener(`error`,i)}},[a,n,t]),o}var Ul=Il,Wl=Rl,Gl=Bl,Kl=W.forwardRef(({className:e,...t},n)=>X(Ul,{ref:n,className:u(`relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full`,e),...t}));Kl.displayName=Ul.displayName;var ql=W.forwardRef(({className:e,...t},n)=>X(Wl,{ref:n,className:u(`aspect-square h-full w-full object-cover`,e),...t}));ql.displayName=Wl.displayName;var Jl=W.forwardRef(({className:e,...t},n)=>X(Gl,{ref:n,delayMs:300,className:u(`flex h-full w-full items-center justify-center bg-wx-bg-elevated-2 text-xs font-medium text-wx-fg-muted`,e),...t}));Jl.displayName=Gl.displayName;function Yl({avatars:e,max:t=3,size:n=`md`,ringClass:r=`ring-wx-bg`,className:i}){let a=e.slice(0,t),o=e.length-a.length,s=n===`sm`?`h-7 w-7`:`h-8 w-8`;return Z(`div`,{className:u(`flex -space-x-2`,i),children:[a.map(e=>Z(Kl,{className:u(s,`ring-2`,r),children:[X(ql,{src:e.src,alt:e.alt}),X(Jl,{children:Xl(e.alt)})]},e.src)),o>0&&X(Kl,{className:u(s,`ring-2`,r),children:Z(Jl,{children:[`+`,o]})})]})}function Xl(e){return e.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)}function Zl(e,t,n,r){let i=e?.trim()??``;return i&&Ql(n,r??`en`)?i:t}function Ql(e,t){return $l(e)===$l(t)}function $l(e){return e.toLowerCase().split(`-`)[0]}function eu(){let e=n(),{config:t}=Ct(),r=t.defaultLocale??`en`;return G((t,n)=>Zl(t,n,e,r),[e,r])}function tu({block:e,config:t,onOpenTab:n}){let r=i(`home`),a=eu(),s=e.action??`open-messenger`,c=s===`open-help`?`help`:s===`open-news`?`news`:`messages`;return Z(o.button,{type:`button`,onClick:()=>n(c),whileHover:{y:-1},whileTap:{scale:.99},transition:{type:`spring`,stiffness:360,damping:26},className:`flex w-full items-center gap-3 rounded-wx-lg bg-wx-bg-elevated px-4 py-3.5 text-start transition-colors hover:bg-wx-bg-elevated-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[Z(`div`,{className:`min-w-0 flex-1`,children:[X(`p`,{className:`truncate text-base font-semibold text-wx-fg`,children:a(e.title,r(`askTitle`))}),X(`p`,{className:`mt-0.5 truncate text-sm text-wx-fg-muted`,children:a(e.subtitle,r(`askSubtitle`))})]}),t.operatorAvatars.length>0&&X(Yl,{avatars:t.operatorAvatars,size:`sm`,ringClass:`ring-wx-bg-elevated`}),X(as,{size:16,className:`shrink-0 text-wx-fg-muted rtl:-scale-x-100`})]})}function nu(e){if(!e||typeof e!=`object`)return null;let t=e,n=String(t._id??t.id??``);if(!n)return null;let r=t.coverImageUrl?.url,i=t.externalCoverImageUrl,a=typeof r==`string`?r:typeof i==`string`?i:void 0;return{id:n,title:typeof t.title==`string`?t.title:``,excerpt:typeof t.excerpt==`string`?t.excerpt:``,coverImageUrl:a}}function ru(e){return Array.isArray(e)?e.map(e=>{if(typeof e!=`object`||!e)return null;let t=e,n=typeof t.title==`string`?t.title:``;return n?{id:String(t._id??t.id??``),title:n}:null}).filter(e=>e!==null):[]}function iu(e,t){return t||!e?[]:e.map(e=>{let t=typeof e.title==`string`?e.title:``;return t?{id:String(e._id??e.id??``),title:t}:null}).filter(e=>e!==null)}function au(e){let t=Date.parse(e);if(Number.isNaN(t))return``;let n=Date.now()-t,r=Math.floor(n/6e4);if(r<1)return`Just now`;if(r<60)return`${r}m`;let i=Math.floor(r/60);if(i<24)return`${i}h`;let a=Math.floor(i/24);return a<7?`${a}d`:new Date(t).toLocaleDateString()}function ou(e){return e.split(/\n{2,}/).map((e,t)=>X(`p`,{className:t>0?`mt-2`:void 0,children:e.split(`
|
|
95
|
-
`).map((e,t)=>Z(`span`,{children:[t>0&&X(`br`,{}),su(e)]},t))},t))}function su(e){let t=[],n=/\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|\*([^*]+)\*/g,r=0,i,a=0;for(;i=n.exec(e);){if(i.index>r&&t.push(e.slice(r,i.index)),i[1]&&i[2]){let e=/^https?:\/\//.test(i[2])?i[2]:`#`;t.push(X(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:i[1]},a++))}else i[3]?t.push(X(`strong`,{className:`font-semibold text-wx-fg`,children:i[3]},a++)):i[4]&&t.push(X(`em`,{children:i[4]},a++));r=i.index+i[0].length}return r<e.length&&t.push(e.slice(r)),t}function cu({block:e,onOpenTab:t,onOpenNewsArticle:n,isDummy:r}){let a=i(`home`),s=Te(),c=!r&&e.newsId?s.previewData?.newsPostsById?.[e.newsId]:void 0,l=c!==void 0,{data:u,loading:d}=$t({variables:{args:{id:e.newsId??``}},skip:r||l||!e.newsId}),f=I().publicKey,p=$e(f&&!r&&!l&&e.newsId?_.home(f,`news-card:${e.newsId}`,`_`):null,u);if(r)return Z(o.button,{type:`button`,onClick:()=>n?n(`demo-news-1`):t(`news`),whileHover:{y:-2},whileTap:{scale:.99},transition:{type:`spring`,stiffness:360,damping:26},className:`block w-full overflow-hidden rounded-wx-xl bg-wx-bg-elevated text-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[X(`div`,{className:`relative w-full`,style:{aspectRatio:`16 / 11`,backgroundImage:`linear-gradient(135deg, #1e1f3b 0%, #1a1a2e 55%, #3a1e2b 100%)`},children:Z(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-1.5 px-6 text-center text-white`,children:[X(`p`,{className:`text-[11px] font-semibold tracking-[0.22em] uppercase opacity-80`,children:a(`featuredArticleDemoEyebrow`)}),X(`p`,{className:`text-2xl leading-tight font-bold`,children:a(`featuredArticleDemoHeadline`)}),X(`p`,{className:`text-sm opacity-85`,children:a(`featuredArticleDemoSubline`)})]})}),Z(`div`,{className:`flex items-center justify-between gap-2 px-4 py-3`,children:[X(`span`,{className:`truncate text-sm font-semibold text-wx-fg`,children:a(`featuredArticleDemoCta`)}),X(yt,{size:16,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})]});let m=nu(l?c:p?.visitorNewsPost),h=!!m,g=e.ctaLabel?.trim()||a(`featuredArticleTap`),v=h?()=>n?n(m.id):t(`news`):void 0,y=m?.coverImageUrl;return!e.newsId||!d&&!m?X(o.button,{type:`button`,onClick:()=>t(`news`),whileHover:{y:-1},whileTap:{scale:.99},transition:{type:`spring`,stiffness:360,damping:26},className:`block w-full overflow-hidden rounded-wx-xl bg-wx-bg-elevated text-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:X(`div`,{className:`relative w-full`,style:{aspectRatio:`16 / 11`,backgroundImage:`linear-gradient(135deg, #1e1f3b 0%, #1a1a2e 55%, #3a1e2b 100%)`},children:Z(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-1 px-6 text-center text-white`,children:[X(`p`,{className:`text-2xl leading-tight font-bold`,children:e.newsId?a(`featuredArticleLoading`):a(`featuredArticleEmpty`)}),X(`p`,{className:`text-sm opacity-80`,children:e.newsId?``:a(`featuredArticleSetUp`)})]})})}):Z(o.button,{type:`button`,onClick:v,whileHover:h?{y:-2}:void 0,whileTap:h?{scale:.99}:void 0,transition:{type:`spring`,stiffness:360,damping:26},disabled:!h,className:`block w-full overflow-hidden rounded-wx-xl bg-wx-bg-elevated text-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[X(`div`,{className:`relative w-full`,style:{aspectRatio:`16 / 11`,backgroundImage:y?`linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.65) 100%), url(${y})`:`linear-gradient(135deg, #1e1f3b 0%, #1a1a2e 55%, #3a1e2b 100%)`,backgroundSize:`cover`,backgroundPosition:`center`},children:Z(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-1.5 px-6 text-center text-white`,children:[X(`p`,{className:`text-2xl leading-tight font-bold`,children:m?.title}),m?.excerpt&&X(`p`,{className:`text-sm opacity-85 line-clamp-2`,children:m.excerpt})]})}),Z(`div`,{className:`flex items-center justify-between gap-2 px-4 py-3`,children:[X(`span`,{className:`truncate text-sm font-semibold text-wx-fg`,children:g}),X(yt,{size:16,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})]})}function lu(){return Z(`div`,{className:`flex w-full items-center gap-2 px-3.5 py-2.5`,children:[X(`div`,{className:`h-3.5 min-w-0 flex-1 animate-pulse rounded-wx-sm bg-wx-bg-elevated-2`}),X(`div`,{className:`h-3.5 w-3.5 shrink-0 animate-pulse rounded-wx-sm bg-wx-bg-elevated-2`})]})}function uu({title:e,slug:t,onOpenArticle:n,onOpenTab:r}){return Z(`button`,{type:`button`,onClick:()=>n?n(t):r(`help`),className:`flex w-full items-center gap-2 px-3.5 py-2.5 text-start transition-colors hover:bg-wx-bg-elevated-2`,children:[X(`span`,{className:`min-w-0 flex-1 truncate text-sm text-wx-fg`,children:e}),X(yt,{size:14,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})}function du({block:e,onOpenTab:t,onOpenArticle:r,isDummy:a}){let o=i(`home`),s=T(),c=Te(),l=n(),u=e.suggestions,d=u?u.mode===`manual`?Math.min((u.articleIds??[]).length,10):Math.max(0,Math.min(u.maxItems??0,10)):0,f=c.previewData?.helpArticles,p=!a&&!!f&&d>0,m=u?.mode===`popular`?Gt.Popular:u?.mode===`recent`?Gt.Recent:void 0,h=u?.mode===`category`?u.categoryId:void 0,g=a||p||d===0||!u||!(u.mode===`popular`||u.mode===`recent`||u.mode===`category`)||u.mode===`category`&&!h,{data:v,loading:y}=Vt({variables:{args:{limit:d,locale:l,sort:m,folderId:h??void 0,recursive:u?.mode===`category`?!0:void 0}},skip:g}),b=u?.mode===`manual`?(u.articleIds??[]).slice(0,d):[],x=a||p||b.length===0,{data:S,loading:C}=Ut({variables:{ids:b,locale:l},skip:x}),w=I().publicKey,D=!!w&&!a&&!p,O=$e(D&&!g?_.home(w,`help-list-slim:${u?.mode??``}:${d}:${h??``}`,l):null,v),k=$e(D&&!x?_.home(w,`help-ids-slim:${b.join(`,`)}`,l):null,S),A=(()=>{if(d===0||!u)return[];if(a){let e=E(s);return(u.mode===`popular`?e.slice().sort((e,t)=>t.viewCount-e.viewCount):u.mode===`recent`?e.slice().sort((e,t)=>(t.publishedAt??``).localeCompare(e.publishedAt??``)):u.mode===`category`&&u.categoryId?e.filter(e=>e.categoryId===u.categoryId):u.mode===`manual`?(u.articleIds??[]).map(t=>e.find(e=>e.id===t)).filter(e=>e!=null):e).slice(0,d).map(e=>({id:e.id,title:e.title,slug:e.slug}))}if(p&&f){let e=f.map(e=>{if(!e||typeof e!=`object`)return null;let t=e;return typeof t._id==`string`&&typeof t.title==`string`&&typeof t.slug==`string`?{id:t._id,title:t.title,slug:t.slug}:null}).filter(e=>e!=null);if(u.mode===`manual`&&u.articleIds){let t=new Map(e.map(e=>[e.id,e]));return u.articleIds.map(e=>t.get(e)).filter(e=>e!=null).slice(0,d)}return e.slice(0,d)}return u.mode===`manual`?(k?.visitorHelpArticlesByIds??[]).filter(e=>e!=null).map(e=>({id:e._id,title:e.title,slug:e.slug})):(O?.visitorHelpList?.items??[]).map(e=>({id:e._id,title:e.title,slug:e.slug}))})(),j=!a&&!p&&(y||C)&&A.length===0?d:0,M=j>0||A.length>0;return Z(`div`,{className:`overflow-hidden rounded-wx-lg border border-wx-border bg-wx-bg-elevated`,children:[Z(`button`,{type:`button`,onClick:()=>t(`help`),className:`flex w-full items-center gap-2.5 px-3.5 py-3 text-start transition-colors hover:bg-wx-bg-elevated-2`,children:[X(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-wx-fg`,children:e.placeholder?.trim()||o(`searchPlaceholder`)}),X(on,{size:16,className:`shrink-0 text-wx-fg-muted`})]}),M&&X(`div`,{className:`border-t border-wx-border`,children:j>0?Array.from({length:j}).map((e,t)=>X(lu,{},t)):A.map(e=>X(uu,{title:e.title,slug:e.slug,onOpenArticle:r,onOpenTab:t},e.id))})]})}function fu({title:e,onOpenAll:t,children:n}){let r=i(`home`);return Z(`div`,{className:`overflow-hidden rounded-wx-lg border border-wx-border bg-wx-bg-elevated`,children:[Z(`div`,{className:`flex items-center justify-between px-3.5 pt-3 pb-1.5`,children:[X(`p`,{className:`text-xs font-semibold tracking-wide text-wx-fg-muted uppercase`,children:e}),X(`button`,{type:`button`,onClick:t,"aria-label":r(`seeAll`),className:`text-xs font-medium text-wx-primary hover:underline`,children:X(yt,{size:14,className:`rtl:-scale-x-100`})})]}),n]})}function pu({block:e,onOpenTab:t,onOpenNewsArticle:r,isDummy:a}){let o=i(`home`),s=T(),c=n(),l=Te(),u=eu(),d=Math.max(1,Math.min(10,e.maxItems??3)),f=a?void 0:l.previewData?.newsPosts,p=Array.isArray(f)&&f.length>0,{data:m,error:h,loading:g}=tn({variables:{args:{locale:c,limit:d}},skip:a||p}),v=I().publicKey,y=$e(v&&!a&&!p?_.home(v,`news-slim:${d}`,c):null,m),b=a?w(s).slice(0,d).map(e=>({id:e.id,title:e.title})):p?ru(f).slice(0,d):iu(y?.visitorNewsList?.items,h).slice(0,d);return!a&&!g&&b.length===0?null:X(fu,{title:u(e.title,o(`newsPreviewTitle`)),onOpenAll:()=>t(`news`),children:X(`ul`,{className:`flex flex-col`,children:b.map(e=>X(`li`,{children:Z(`button`,{type:`button`,onClick:()=>r?r(e.id):t(`news`),className:`flex w-full items-center gap-2 px-3.5 py-2.5 text-start transition-colors hover:bg-wx-bg-elevated-2`,children:[X(Js,{size:14,className:`shrink-0 text-wx-fg-muted`}),X(`span`,{className:`min-w-0 flex-1 truncate text-sm text-wx-fg`,children:e.title}),X(yt,{size:14,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})},e.id||e.title))})})}function mu({block:e,onOpenTab:t,onOpenArticle:r,isDummy:a}){let o=i(`home`),s=T(),c=Te(),l=n(),u=eu(),d=(e.articleIds??[]).slice(0,10),f=d.length,p=a?null:c.previewData?.helpArticlesById,m=!!p,{data:h}=zt({variables:{ids:d,locale:l},skip:a||m||d.length===0}),g=I().publicKey,v=$e(g&&!a&&!m&&d.length>0?_.home(g,`help-ids:${d.join(`,`)}`,l):null,h);if(a){let n=E(s).slice().sort((e,t)=>t.viewCount-e.viewCount).slice(0,4);return X(fu,{title:u(e.title,o(`popularArticlesTitle`)),onOpenAll:()=>t(`help`),children:X(`ul`,{className:`flex flex-col`,children:n.map(e=>X(`li`,{children:Z(`button`,{type:`button`,onClick:()=>r?r(e.slug):t(`help`),className:`flex w-full items-center gap-2 px-3.5 py-2.5 text-start transition-colors hover:bg-wx-bg-elevated-2`,children:[X(us,{size:14,className:`shrink-0 text-wx-fg-muted`}),X(`span`,{className:`min-w-0 flex-1 truncate text-sm text-wx-fg`,children:e.title}),X(yt,{size:14,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})},e.id))})})}if(f===0)return null;let y=new Map;if(m&&p)for(let e of d){let t=p[e];if(t&&typeof t==`object`){let n=t;typeof n.title==`string`&&typeof n.slug==`string`&&y.set(e,{title:n.title,slug:n.slug})}}else for(let e of v?.visitorHelpArticlesByIds??[])y.set(e._id,{title:e.title,slug:e.slug});return X(fu,{title:u(e.title,o(`pinnedArticlesTitle`)),onOpenAll:()=>t(`help`),children:X(`ul`,{className:`flex flex-col`,children:d.map((e,n)=>{let i=y.get(e);return X(`li`,{children:Z(`button`,{type:`button`,onClick:()=>{i&&r?r(i.slug):t(`help`)},className:`flex w-full items-center gap-2 px-3.5 py-2.5 text-start transition-colors hover:bg-wx-bg-elevated-2`,children:[X(us,{size:14,className:`shrink-0 text-wx-fg-muted`}),X(`span`,{className:`min-w-0 flex-1 truncate text-sm text-wx-fg`,children:i?i.title:o(`pinnedArticleRow`,{n:n+1})}),X(yt,{size:14,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})},e)})})})}var hu=new Set([`http:`,`https:`,`mailto:`,`tel:`,`sms:`]);function gu(e){if(typeof e!=`string`)return!1;try{return hu.has(new URL(e.trim()).protocol)}catch{return!1}}function _u(e){return gu(e)?(window.open(e.trim(),`_blank`,`noopener,noreferrer`),!0):!1}var vu=/^[\d\s()+\-.]+$/;function yu(e){if(typeof e!=`string`||!vu.test(e))return null;let t=e.replace(/\D/g,``);return t?`tel:${e.trim().startsWith(`+`)?`+`:``}${t}`:null}function bu(e,t=e=>{window.location.href=e}){let n=yu(e);return n?(t(n),!0):!1}function xu(e,t,n){return{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,fill:n,"aria-hidden":`true`,className:t}}function Su({size:e=18,className:t,colored:n}){return Z(`svg`,{...xu(e,t,n?`#25D366`:`currentColor`),children:[X(`title`,{children:`WhatsApp`}),X(`path`,{d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z`})]})}function Cu({size:e=18,className:t,colored:n}){return Z(`svg`,{...xu(e,t,n?`#26A5E4`:`currentColor`),children:[X(`title`,{children:`Telegram`}),X(`path`,{d:`M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.149-.056-.211s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z`})]})}function wu({size:e=18,className:t,colored:n}){return n?Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,"aria-hidden":`true`,className:t,children:[X(`title`,{children:`Instagram`}),X(`defs`,{children:Z(`radialGradient`,{id:`wexio-ig-gradient`,cx:`30%`,cy:`107%`,r:`150%`,children:[X(`stop`,{offset:`0%`,stopColor:`#FFDD55`}),X(`stop`,{offset:`25%`,stopColor:`#FFDD55`}),X(`stop`,{offset:`50%`,stopColor:`#FF543E`}),X(`stop`,{offset:`75%`,stopColor:`#C837AB`}),X(`stop`,{offset:`100%`,stopColor:`#5851DB`})]})}),X(`path`,{fill:`url(#wexio-ig-gradient)`,d:`M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z`})]}):Z(`svg`,{...xu(e,t,`currentColor`),children:[X(`title`,{children:`Instagram`}),X(`path`,{d:`M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z`})]})}function Tu({size:e=18,className:t,colored:n}){return Z(`svg`,{...xu(e,t,n?`#0078FF`:`currentColor`),children:[X(`title`,{children:`Messenger`}),X(`path`,{d:`M.001 11.639C.001 4.949 5.241 0 12.001 0S24 4.95 24 11.639c0 6.689-5.24 11.638-12 11.638-1.21 0-2.38-.16-3.47-.46a.96.96 0 00-.64.05l-2.39 1.05a.96.96 0 01-1.35-.85l-.07-2.14a.97.97 0 00-.32-.68A11.39 11.39 0 010 11.639zm8.32-2.19l-3.52 5.6c-.35.53.32 1.139.82.75l3.79-2.87c.26-.2.6-.2.87 0l2.8 2.1c.84.63 2.04.4 2.6-.48l3.52-5.6c.35-.53-.32-1.13-.82-.75l-3.79 2.87c-.25.2-.6.2-.86 0l-2.81-2.1a1.86 1.86 0 00-2.6.48z`})]})}function Eu({size:e=18,className:t,colored:n}){return Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 52 52`,"aria-hidden":`true`,className:t,children:[X(`title`,{children:`Viber`}),Z(`g`,{transform:`translate(-598, -758)`,children:[n&&X(`circle`,{cx:`624`,cy:`784`,r:`26`,fill:`#fff`}),X(`path`,{fill:n?`#7F4DA0`:`currentColor`,fillRule:`evenodd`,transform:`translate(624, 784) scale(1, -1) translate(-624, -784)`,d:`M624,810 C638.359403,810 650,798.359403 650,784 C650,769.640597 638.359403,758 624,758 C609.640597,758 598,769.640597 598,784 C598,798.359403 609.640597,810 624,810 Z M625.557163,799.409207 C627.325063,799.188564 628.753733,798.762672 630.321233,797.998094 C631.862939,797.243741 632.849644,796.530492 634.155019,795.232271 C635.37816,794.005859 636.056551,793.077041 636.776002,791.635145 C637.778174,789.623608 638.348632,787.232396 638.446219,784.599993 C638.482254,783.702032 638.456556,783.50185 638.25094,783.245321 C637.86039,782.747507 637.002091,782.829703 636.709224,783.388976 C636.616662,783.573725 636.590964,783.732729 636.560135,784.451177 C636.508729,785.554433 636.431719,786.267682 636.27751,787.119522 C635.671103,790.460024 634.067654,793.128369 631.508319,795.042409 C629.375578,796.643375 627.170843,797.423387 624.282692,797.592702 C623.306228,797.649143 623.136647,797.685029 622.915679,797.854391 C622.504456,798.177682 622.483974,798.9371 622.879644,799.291164 C623.121199,799.511855 623.290771,799.542627 624.128492,799.516968 C624.565327,799.501582 625.207683,799.450263 625.557163,799.409207 L625.557163,799.409207 Z M613.809012,798.854999 C613.98892,798.793445 614.266425,798.649789 614.425756,798.547142 C615.402134,797.900559 618.120799,794.426647 619.009917,792.692195 C619.518641,791.70186 619.688213,790.968064 619.528978,790.424129 C619.364432,789.839149 619.092143,789.531244 617.874123,788.551135 C617.385891,788.156063 616.928478,787.750671 616.856589,787.642901 C616.67156,787.376051 616.522471,786.852663 616.522471,786.483204 C616.527687,785.626251 617.082688,784.071435 617.812475,782.875805 C618.377717,781.947024 619.39013,780.756602 620.392302,779.84316 C621.569167,778.765517 622.607278,778.031815 623.779022,777.4519 C625.284788,776.702756 626.204735,776.512894 626.877996,776.825864 C627.047567,776.902853 627.227389,777.0055 627.284002,777.051621 C627.335313,777.097836 627.731079,777.580217 628.162784,778.113821 C628.995289,779.160683 629.185438,779.329998 629.755896,779.524982 C630.480563,779.771285 631.220592,779.704618 631.965742,779.324885 C632.531079,779.032366 633.76447,778.267798 634.561026,777.713628 C635.609379,776.979831 637.850063,775.153043 638.153362,774.788658 C638.687784,774.13185 638.780346,773.290379 638.42053,772.361503 C638.040222,771.381489 636.560154,769.54439 635.527163,768.759265 C634.591855,768.051128 633.92893,767.779251 633.05526,767.738158 C632.335809,767.702263 632.037726,767.763817 631.117779,768.14355 C623.902394,771.11464 618.141368,775.548114 613.567447,781.639157 C611.177779,784.820617 609.358473,788.120102 608.114745,791.542752 C607.390173,793.538846 607.354224,794.406072 607.950294,795.427217 C608.207307,795.858231 609.301946,796.925592 610.098502,797.520807 C611.424455,798.506067 612.035983,798.870414 612.524215,798.973014 C612.858247,799.04487 613.438945,798.988429 613.809012,798.854999 L613.809012,798.854999 Z M625.911773,795.688935 C629.031324,795.232271 631.446691,793.785177 633.029562,791.43501 C633.91868,790.111111 634.47368,788.556295 634.663839,786.888605 C634.730607,786.277956 634.730607,785.164427 634.658718,784.979678 C634.591855,784.80525 634.376007,784.569173 634.190969,784.471724 C633.990569,784.369076 633.564079,784.379302 633.327644,784.502496 C632.931879,784.702593 632.813714,785.020771 632.813714,785.882837 C632.813714,787.211849 632.469355,788.612736 631.873285,789.700606 C631.194894,790.942404 630.208198,791.968672 629.005635,792.681969 C627.972644,793.297732 626.4463,793.754405 625.053579,793.867278 C624.549889,793.908372 624.272384,794.010981 624.082235,794.231625 C623.789368,794.56519 623.758454,795.01675 624.00513,795.391313 C624.272375,795.806969 624.683502,795.873684 625.911773,795.688935 L625.911773,795.688935 Z M627.006411,791.814743 C628.018825,791.599213 628.794898,791.214367 629.457823,790.593454 C630.310906,789.787877 630.778646,788.812881 630.984157,787.411993 C631.122909,786.498599 631.066382,786.139423 630.742601,785.841791 C630.439407,785.564706 629.879286,785.554433 629.540048,785.816132 C629.293372,786.00088 629.216267,786.195864 629.15974,786.724365 C629.092972,787.427389 628.969591,787.919995 628.758949,788.376716 C628.306657,789.346542 627.510101,789.849431 626.163665,790.013633 C625.531464,790.090622 625.341315,790.162449 625.135794,790.403592 C624.760607,790.850039 624.90448,791.573563 625.423541,791.840412 C625.618906,791.9379 625.701131,791.948173 626.132751,791.922513 C626.400005,791.907118 626.79577,791.860949 627.006411,791.814743 L627.006411,791.814743 Z`})]})]})}function Du({size:e=18,className:t,colored:n}){return Z(`svg`,{...xu(e,t,n?`#5865F2`:`currentColor`),children:[X(`title`,{children:`Discord`}),X(`path`,{d:`M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z`})]})}function Ou({size:e=18,className:t,colored:n}){return n?Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,"aria-hidden":`true`,className:t,children:[X(`title`,{children:`Slack`}),X(`path`,{fill:`#E01E5A`,d:`M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z`}),X(`path`,{fill:`#36C5F0`,d:`M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z`}),X(`path`,{fill:`#2EB67D`,d:`M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312z`}),X(`path`,{fill:`#ECB22E`,d:`M15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z`})]}):Z(`svg`,{...xu(e,t,`currentColor`),children:[X(`title`,{children:`Slack`}),X(`path`,{d:`M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z`})]})}function ku({size:e=18,className:t,colored:n}){return Z(`svg`,{...xu(e,t,n?`#06C755`:`currentColor`),children:[X(`title`,{children:`LINE`}),X(`path`,{d:`M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.346 0 .627.285.627.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.038 1.08l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314`})]})}function Au({size:e=18,className:t,colored:n}){return Z(`svg`,{...xu(e,t,n?`#1877F2`:`currentColor`),children:[X(`title`,{children:`Facebook`}),X(`path`,{d:`M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z`})]})}function ju({size:e=18,className:t,colored:n}){return Z(`svg`,{...xu(e,t,n?`#000000`:`currentColor`),children:[X(`title`,{children:`X`}),X(`path`,{d:`M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z`})]})}function Mu({size:e=18,className:t,colored:n}){return Z(`svg`,{...xu(e,t,n?`#0A66C2`:`currentColor`),children:[X(`title`,{children:`LinkedIn`}),X(`path`,{d:`M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.063 2.063 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z`})]})}function Nu({size:e=18,className:t,colored:n}){return Z(`svg`,{...xu(e,t,n?`#FF4500`:`currentColor`),children:[X(`title`,{children:`Reddit`}),X(`path`,{d:`M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z`})]})}function Pu({size:e=18,className:t,colored:n}){return n?Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,"aria-hidden":`true`,className:t,children:[X(`title`,{children:`TikTok`}),X(`path`,{fill:`#25F4EE`,d:`M9.375 9.05v-1.1a4.91 4.91 0 0 0-.71-.06 4.99 4.99 0 0 0-2.86 9.03 4.987 4.987 0 0 1 3.57-7.87zM15.66 5.34v-1A2.93 2.93 0 0 1 13.42.78l-.07-.78h-.84a2.95 2.95 0 0 0 3.15 5.34zM18.51 6.78a4.96 4.96 0 0 1-.97-2.96h-.65A4.972 4.972 0 0 0 18.51 6.78z`}),X(`path`,{fill:`#FE2C55`,d:`M14.46 14.86a4.99 4.99 0 0 1-4.99 4.93 4.99 4.99 0 0 1-2.86-.9 4.987 4.987 0 0 0 8.55-3.45v-9c.96.69 2.06 1.18 3.21 1.36v-1.5a4.94 4.94 0 0 1-2.5-1.32V13.4zM8.61 11.91a4.987 4.987 0 0 1 5.41-4.91v-1.5a5.06 5.06 0 0 0-.66-.04c-2.76 0-5.01 2.24-5.01 5.01a4.99 4.99 0 0 0 .26 1.44z`}),X(`path`,{fill:`#000000`,d:`M16.6 5.82a4.91 4.91 0 0 1-.94-.48V7.81a6.412 6.412 0 0 0 4.18 1.53V7.84a3.84 3.84 0 0 1-3.24-2.02zM7.96 12.93a3.7 3.7 0 0 1 1.41-.27c.24 0 .48.04.71.1V9.06a6.41 6.41 0 0 0-.71-.05v3.43a3.69 3.69 0 0 0-.7-.06 3.72 3.72 0 0 0-3.72 3.72 3.72 3.72 0 0 0 3.01 3.65 3.7 3.7 0 0 1-1.06-2.61 3.72 3.72 0 0 1 1.06-2.61zM12.51 18.51c-.99-.07-1.94-.46-2.69-1.1a3.71 3.71 0 0 0 2.71 1.17c2.06 0 3.72-1.66 3.72-3.72V5.82a4.91 4.91 0 0 0-1.46-.18v9.04a3.72 3.72 0 0 1-2.28 3.83z`})]}):Z(`svg`,{...xu(e,t,`currentColor`),children:[X(`title`,{children:`TikTok`}),X(`path`,{d:`M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z`})]})}var Fu={whatsapp:Su,telegram:Cu,instagram:wu,messenger:Tu,viber:Eu,discord:Du,slack:Ou,line:ku,facebook:Au,twitter:ju,linkedin:Mu,reddit:Nu,tiktok:Pu},Iu={telegram:cn,whatsapp:Is,viber:Vs,instagram:ps,messenger:Ps,discord:Ss,slack:Cs,chat:Fs,email:Ns,phone:Vs,"video-call":rc,help:hs,book:us,bell:ss,star:Xs,heart:ws,bookmark:ds,"arrow-right":as,lock:Ms,shield:Ks,user:tc,users:nc};function Lu({block:e,onOpenTab:t}){let n=Array.isArray(e.buttons)?e.buttons:[],r=e=>{switch(e.action){case`open-messenger`:return t(`messages`);case`open-help`:return t(`help`);case`open-news`:return t(`news`);case`open-url`:_u(e.url);return}};if(e.layout===`inline`){let e=n.slice(0,8);return X(`div`,{className:u(`grid gap-2`,e.length===1&&`grid-cols-1`,e.length===2&&`grid-cols-2`,e.length===3&&`grid-cols-3`,e.length>=4&&`grid-cols-4`),children:e.map((e,t)=>X(Ru,{btn:e,onClick:()=>r(e)},`${e.action}-${t}`))})}return X(`div`,{className:`flex flex-col gap-2`,children:n.map((e,t)=>X(zu,{btn:e,onClick:()=>r(e)},`${e.action}-${t}`))})}function Ru({btn:e,onClick:t}){let n=e.icon?.kind===`named`?e.icon.name:null,r=e.icon?.kind===`named`?!!e.icon.colored:!1,i=n?Fu[n]:null,a=n?Iu[n]??Fs:Fs,s=i??a;return Z(o.button,{type:`button`,onClick:t,whileHover:{y:-2,scale:1.02},whileTap:{scale:.96},transition:{type:`spring`,stiffness:420,damping:24},title:e.label,className:`group flex h-24 flex-col items-center justify-center gap-1.5 rounded-wx-lg bg-wx-bg-elevated px-2 py-3 text-wx-fg transition-colors hover:bg-wx-bg-elevated-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[X(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-wx-bg transition-transform group-hover:scale-110`,children:e.icon?.kind===`media`?X(`img`,{src:e.icon.url,alt:``,className:`h-5 w-5 object-contain`}):X(s,{size:18,className:r?void 0:`text-wx-fg`,colored:i?r:void 0})}),e.label&&X(`span`,{className:`block w-full truncate text-center text-[11px] leading-tight font-medium`,children:e.label})]})}function zu({btn:e,onClick:t}){return!e.label&&e.icon?.kind===`media`?X(o.button,{type:`button`,onClick:t,whileHover:{y:-2},whileTap:{scale:.985},transition:{type:`spring`,stiffness:360,damping:26},className:`block w-full overflow-hidden rounded-wx-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:X(`img`,{src:e.icon.url,alt:``,className:`w-full object-cover`})}):Z(Kt,{type:`button`,variant:e.style===`primary`?`solid`:e.style===`ghost`?`ghost`:`tonal`,size:`lg`,onClick:t,className:`justify-start gap-2.5`,children:[e.icon?.kind===`named`?(()=>{let t=e.icon.name,n=!!e.icon.colored,r=Fu[t];return r?X(r,{size:16,className:`shrink-0`,colored:n}):X(Iu[t]??Fs,{size:16,className:`shrink-0`})})():e.icon?.kind===`media`?X(`img`,{src:e.icon.url,alt:``,className:`h-4 w-4 shrink-0 object-contain`}):null,e.label&&X(`span`,{className:`text-sm font-medium`,children:e.label})]})}function Bu(e){return e?/[<&]/.test(e)?typeof DOMParser<`u`?(new DOMParser().parseFromString(e,`text/html`).body.textContent??``).replace(/\s+/g,` `).trim():e.replace(/<[^>]*>/g,``).replace(/ /g,` `).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/\s+/g,` `).trim():e:``}function Vu({size:e=24,className:t}){return Z(`span`,{style:{width:e,height:e},className:u(`relative inline-block`,t),role:`img`,"aria-label":`Wexio`,children:[X(`img`,{src:O(`/logo-dark.png`),alt:``,width:e,height:e,className:`block h-full w-full dark:hidden`}),X(`img`,{src:O(`/logo-light.png`),alt:``,width:e,height:e,className:`hidden h-full w-full dark:block`})]})}function Hu({block:e,onOpenTab:t,onOpenThread:n,isDummy:r,chatId:a,config:o}){let s=i(`home`),c=eu(),l=()=>n?n():t(`messages`),{data:u,loading:d}=Fe({variables:{chatId:a??``},skip:r||!a});if(!r){if(!a||d)return null;let t=u?.visitorChatRecentInbound;if(!t)return null;let n=t.sender?.kind===`ai`||t.sender?.kind===`bot`,r=n?se(o.messenger?.aiAssistant)??`AI Agent`:t.sender?.name?.trim()||s(`recentMessageFromFallback`),i=n?o.messenger?.aiAssistantAvatar??null:t.sender?.avatar??null;return Z(`button`,{type:`button`,onClick:l,className:`flex w-full flex-col gap-3 rounded-wx-lg bg-wx-bg-elevated px-4 py-3.5 text-start transition-colors hover:bg-wx-bg-elevated-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[X(`p`,{className:`text-sm text-wx-fg-muted`,children:c(e.title,s(`recentMessageTitle`))}),Z(`div`,{className:`flex items-start gap-3`,children:[i?X(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-full bg-wx-bg`,children:X(`img`,{src:i,alt:r,className:`h-9 w-9 rounded-full object-cover`})}):n?null:X(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-full bg-wx-bg`,children:X(`span`,{className:`text-sm font-semibold text-wx-fg-muted`,children:r.charAt(0).toUpperCase()})}),Z(`div`,{className:`min-w-0 flex-1`,children:[Z(`div`,{className:`flex items-baseline justify-between gap-2`,children:[X(`p`,{className:`truncate text-sm font-semibold text-wx-fg`,children:r}),X(`span`,{className:`shrink-0 text-xs text-wx-fg-subtle`,children:au(t.createdAt)})]}),X(`p`,{className:`mt-0.5 line-clamp-2 text-sm text-wx-fg-muted`,children:Bu(t.text||t.caption)||s(`recentMessageAttachment`)})]})]})]})}let f=se(o.messenger?.aiAssistant)??s(`recentMessageFromFallback`),p=o.messenger?.aiAssistantAvatar??null;return Z(`button`,{type:`button`,onClick:l,className:`flex w-full flex-col gap-3 rounded-wx-lg bg-wx-bg-elevated px-4 py-3.5 text-start transition-colors hover:bg-wx-bg-elevated-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[X(`p`,{className:`text-sm text-wx-fg-muted`,children:c(e.title,s(`recentMessageTitle`))}),Z(`div`,{className:`flex items-start gap-3`,children:[X(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-full bg-wx-bg`,children:p?X(`img`,{src:p,alt:f,className:`h-9 w-9 rounded-full object-cover`}):X(Vu,{size:36})}),Z(`div`,{className:`min-w-0 flex-1`,children:[Z(`div`,{className:`flex items-baseline justify-between gap-2`,children:[X(`p`,{className:`truncate text-sm font-semibold text-wx-fg`,children:f}),X(`span`,{className:`shrink-0 text-xs text-wx-fg-subtle`,children:s(`recentMessageAgo`)})]}),X(`p`,{className:`mt-0.5 line-clamp-2 text-sm text-wx-fg-muted`,children:s(`recentMessageSample`)})]})]})]})}function Uu({block:e}){return X(`div`,{className:`px-2 text-sm leading-relaxed text-wx-fg-muted [&_a]:text-wx-primary [&_a]:underline`,children:ou(e.markdown)})}var Wu={INSTANT:`teamStatusReplyInstant`,MINUTES:`teamStatusReplyMinutes`,HOURS:`teamStatusReplyHours`,DAY:`teamStatusReplyDay`},Gu=Object.keys(Wu);function Ku(e,t){if(!e)return null;let n=new Date(e);if(Number.isNaN(n.getTime()))return null;try{return new Intl.DateTimeFormat(t,{weekday:`long`,hour:`numeric`,minute:`2-digit`}).format(n)}catch{return null}}function qu({block:e,config:t}){let r=i(`home`),a=n(),o=e.presence??`HUMAN`,s=o===`OFFLINE`?`bg-wx-fg-subtle`:o===`AI`?`bg-wx-warning`:`bg-wx-success`,c=Ku(e.nextOpenAt,a),l,u=null;if(o===`AI`)l=r(`teamStatusAiOnline`,{name:se(t.messenger?.aiAssistant)??`Gaia`}),u=c?r(`teamStatusOperatorsBack`,{when:c}):null;else if(o===`OFFLINE`)l=c?r(`teamStatusOfflineUntil`,{when:c}):r(`teamStatusOfflineSoon`);else{l=r(`teamStatusOnline`);let t=e.showResponseTime&&e.responseTime&&Gu.includes(e.responseTime)?e.responseTime:null;u=t?r(Wu[t]):null}return Z(`div`,{className:`flex items-center gap-3 rounded-wx-lg bg-wx-bg-elevated px-3.5 py-3`,children:[Z(`div`,{className:`flex min-w-0 flex-1 items-start gap-3`,children:[X(`span`,{"aria-hidden":`true`,className:`mt-1.5 h-2 w-2 shrink-0 rounded-full ${s}`}),Z(`div`,{className:`min-w-0 flex-1`,children:[X(`p`,{className:`text-sm font-semibold text-wx-fg`,children:l}),u&&X(`p`,{className:`text-xs text-wx-fg-muted`,children:u})]})]}),e.showOperatorAvatars&&t.operatorAvatars.length>0&&X(Yl,{avatars:t.operatorAvatars,size:`sm`,ringClass:`ring-wx-bg-elevated`})]})}function Ju({blocks:e,config:t,onOpenTab:n,onOpenNewsArticle:r,onOpenHelpArticle:i,isDummy:a,chatId:o,onOpenThread:s}){return X(`div`,{className:`flex flex-col gap-3 px-4 pb-2`,children:e.map((e,c)=>X(Xu,{delay:Math.min(c,6)*.05,children:X(Yu,{block:e,config:t,onOpenTab:n,onOpenNewsArticle:r,onOpenHelpArticle:i,isDummy:a,chatId:o,onOpenThread:s})},`${e.kind}-${c}`))})}function Yu({block:e,config:t,onOpenTab:n,onOpenNewsArticle:r,onOpenHelpArticle:i,isDummy:a,chatId:o,onOpenThread:s}){switch(e.kind){case`quick-actions`:return X(Lu,{block:e,onOpenTab:n});case`help-search`:return X(du,{block:e,onOpenTab:n,onOpenArticle:i,isDummy:a});case`pinned-articles`:return X(mu,{block:e,onOpenTab:n,onOpenArticle:i,isDummy:a});case`news-preview`:return X(pu,{block:e,onOpenTab:n,onOpenNewsArticle:r,isDummy:a});case`team-status`:return X(qu,{block:e,config:t});case`rich-text`:return X(Uu,{block:e});case`divider`:return X(`hr`,{className:`my-1 border-wx-border`});case`ask-question`:return X(tu,{block:e,config:t,onOpenTab:n});case`recent-message`:return X(Hu,{block:e,onOpenTab:n,onOpenThread:s,isDummy:a,chatId:o,config:t});case`featured-article`:return X(cu,{block:e,onOpenTab:n,onOpenNewsArticle:r,isDummy:a});default:return null}}function Xu({delay:e,children:t,className:n}){return X(o.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.24,delay:e,ease:`easeOut`},className:u(n),children:t})}function Zu(e,t){return Array.isArray(e)?e.filter(e=>!(!e||typeof e!=`object`||(e.kind===`help-search`||e.kind===`pinned-articles`)&&!t.help||e.kind===`news-preview`&&!t.news)):[]}function Qu(e,t){let n=[],r=[];for(let i of e){let e=ri(i.variants,t);e&&(n.push(e.block),r.push(`${i.id}:${e.id}`))}return{blocks:n,key:r.join(`|`)}}function $u(e){let t=oi(),n=bi(),r=ne(dt(t.capabilities,e.capabilities),`greetingVariants`)?t.slots?.greetingSlot??e.greetingSlot??null:null;return q(()=>{if(!r)return;let e=ri(r.variants,n);return e?{headline:e.headline,subheadline:e.subheadline}:null},[r,n])}function ed({config:e,organizationLogoUrl:t,onClose:n,onOpenTab:r,isDummy:a,chatId:o,onOpenNewsArticle:s,onOpenHelpArticle:c,onOpenThread:l}){let u=i(`header`),d=ln(),f=oi(),p=bi(),m=f.slots?.homeSlots??e.homeSlots??null,h=q(()=>m?Qu(m,p):null,[m,p]),g=Zu(h?h.blocks:e.homeLayout??he,e.features),_=$u(e),v=_===void 0?a||!!e.greeting?.headline?.trim()||!!e.greeting?.subheadline?.trim():!!_?.headline.trim()||!!_?.subheadline.trim();return X(ze,{followDirection:!0,className:`flex-1`,children:Z(`div`,{className:`flex flex-col pb-6`,children:[Z(`div`,{className:`flex items-center justify-between px-5 pt-5 pb-3`,children:[t?X(`img`,{src:t,alt:e.messenger?.title??``,className:`h-9 w-auto max-w-[140px] object-contain`}):a?X(Vu,{size:28}):X(`span`,{className:`h-9`,"aria-hidden":`true`}),Z(`div`,{className:`flex items-center gap-1`,children:[e.operatorAvatars.length>0&&X(Yl,{avatars:e.operatorAvatars,ringClass:`ring-wx-bg-elevated/60`,className:`mr-2`}),X(Kt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":u(`close`),onClick:n,...d.parentHandlers,children:X(Nt,{ref:d.iconRef,size:18})})]})]}),X(td,{config:e,isDummy:a,slotGreeting:_}),X(`div`,{className:v?void 0:`pt-4`,children:X(il,{enabled:!!h,id:h?.key??``,children:X(Ju,{blocks:g,config:e,onOpenTab:r,onOpenNewsArticle:s,onOpenHelpArticle:c,isDummy:a,chatId:o,onOpenThread:l})})})]})})}function td({config:e,isDummy:t,slotGreeting:r}){let a=i(`home`),o=n();if(r!==void 0){let e=r?.headline.trim()??``,t=r?.subheadline.trim()??``;return e||t?X(nd,{headline:e,subheadline:t}):null}let s=e.greeting?.headline?.trim()??``,c=e.greeting?.subheadline?.trim()??``,l=!!(s||c);if(!t&&!l)return null;let u=Ql(o,e.defaultLocale??`en`),d=l&&u,f=d?s:a(`greetingHeadline`),p=d?c:a(`greetingSubheadline`);return!f&&!p?null:X(nd,{headline:f,subheadline:p})}function nd({headline:e,subheadline:t}){return Z(`section`,{className:`px-5 pt-2 pb-4`,children:[e&&X(`p`,{className:`text-3xl leading-tight font-bold text-wx-fg-muted`,children:e}),t&&X(`p`,{className:`mt-1 text-3xl leading-tight font-bold text-wx-fg`,children:t})]})}var rd=[`#7c5cff`,`#ff6b6b`,`#12b886`,`#f59f00`,`#4dabf7`,`#e64980`],id=[120,160,200,140,180,100],ad=3;function od(e,t,n,r){let i=`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}"><rect width="100%" height="100%" fill="${r}"/><text x="50%" y="50%" fill="#fff" font-family="sans-serif" font-size="14" text-anchor="middle" dominant-baseline="middle">${e}</text></svg>`;return`data:image/svg+xml,${encodeURIComponent(i)}`}function sd(e,t,n){let r=id[n%id.length],i=rd[n%rd.length],a=t?`${t} ${n+1}`:e===`STICKER`?`sticker ${n+1}`:`gif ${n+1}`,o=od(a,220,r,i);return{id:`mock-${e}-${t||`trending`}-${n}`,title:a,previewUrl:o,previewWidth:220,previewHeight:r,sourceUrl:o,mimetype:`image/svg+xml`}}var cd=15,ld=({type:e,query:t,offset:n})=>{let r=Math.floor(n/cd),i=Array.from({length:cd},(r,i)=>sd(e,t,n+i)),a=r<ad-1;return new Promise(e=>setTimeout(()=>e({items:i,nextOffset:n+cd,hasNext:a}),250))};async function ud(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let i=r.result;if(typeof i!=`string`){n(Error(`FileReader returned non-string result`));return}let a=i.indexOf(`,`);t({base64:a>=0?i.slice(a+1):i,size:e.size})},r.onerror=()=>n(r.error??Error(`File read failed`)),r.readAsDataURL(e)})}var dd=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`image/heic`,`image/heif`,`audio/mpeg`,`audio/mp4`,`audio/ogg`,`audio/webm`,`audio/wav`,`video/mp4`,`video/quicktime`,`video/webm`,`video/3gpp`,`application/pdf`]),fd={png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`,heic:`image/heic`,heif:`image/heif`,mp3:`audio/mpeg`,m4a:`audio/mp4`,ogg:`audio/ogg`,oga:`audio/ogg`,wav:`audio/wav`,weba:`audio/webm`,mp4:`video/mp4`,mov:`video/quicktime`,webm:`video/webm`,"3gp":`video/3gpp`,pdf:`application/pdf`};function pd(e){return e.type?e.type:fd[e.name.split(`.`).pop()?.toLowerCase()??``]??``}var md=(e,t)=>`wexio:slot-thread:${e}:${t}`;function hd(e,t,n){try{let r=e.getItem(md(t,n));if(!r)return null;let i=JSON.parse(r)?.variantId;return typeof i==`string`&&i?{slotId:n,variantId:i}:null}catch{return null}}function gd(e,t,n){if(!hd(e,t,n.slotId))try{e.setItem(md(t,n.slotId),JSON.stringify({variantId:n.variantId}))}catch{}}function _d(e){let t=J(e);return Sn(()=>{t.current=e}),G((...e)=>t.current?.(...e),[])}var vd=`https://accounts.google.com/gsi/client`,yd=()=>document.querySelector(`script[src="${vd}"]`);function bd(){return typeof window>`u`?Promise.reject(Error(`gsi: no window`)):window.google?.accounts?.id?Promise.resolve():new Promise((e,t)=>{let n=yd()??document.createElement(`script`);n.addEventListener(`load`,()=>e(),{once:!0}),n.addEventListener(`error`,()=>{n.remove(),t(Error(`gsi: script failed to load`))},{once:!0}),n.isConnected||(n.src=vd,n.async=!0,n.defer=!0,document.head.appendChild(n))})}function xd({clientId:e,onCredential:t}){let n=i(`messages`),r=J(null),[a,o]=Y(`loading`),[s,c]=Y(0),l=J(t);return K(()=>{l.current=t},[t]),K(()=>{if(typeof window>`u`)return;let t=!1;o(`loading`);let n=()=>{let t=window.google?.accounts?.id,n=r.current;if(!t||!n){o(`error`);return}t.initialize({client_id:e,callback:e=>{e?.credential&&l.current(e.credential)},auto_select:!1,cancel_on_tap_outside:!0,ux_mode:`popup`}),n.replaceChildren(),t.renderButton(n,{type:`standard`,theme:`outline`,size:`large`,width:200}),o(`ready`)};return bd().then(()=>{t||n()},()=>{t||o(`error`)}),()=>{t=!0}},[e,s]),Z(wn,{children:[Z(`button`,{type:`button`,onClick:()=>{if(a===`error`){c(e=>e+1);return}let e=r.current;if(!e)return;let t=e.querySelector(`div[role="button"]`);if(!t){o(`error`);return}t.click()},disabled:a===`loading`,"aria-busy":a===`loading`,className:`flex w-full items-center justify-center gap-2 rounded-wx border border-wx-border bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated-2 disabled:opacity-60`,children:[X(Sd,{}),X(`span`,{children:n(`googleSignIn`)})]}),a===`error`&&X(`p`,{role:`alert`,className:`text-center text-xs text-wx-danger`,children:n(`googleUnavailable`)}),X(`div`,{ref:r,"aria-hidden":`true`,style:{position:`absolute`,width:1,height:1,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,whiteSpace:`nowrap`}})]})}function Sd(){return Z(`svg`,{width:`16`,height:`16`,viewBox:`0 0 18 18`,"aria-hidden":`true`,children:[X(`path`,{d:`M17.64 9.205c0-.639-.057-1.252-.164-1.841H9v3.481h4.844a4.14 4.14 0 0 1-1.796 2.716v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.614z`,fill:`#4285F4`}),X(`path`,{d:`M9 18c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332A8.997 8.997 0 0 0 9 18z`,fill:`#34A853`}),X(`path`,{d:`M3.964 10.71A5.41 5.41 0 0 1 3.682 9c0-.593.102-1.17.282-1.71V4.958H.957A8.996 8.996 0 0 0 0 9c0 1.452.348 2.827.957 4.042l3.007-2.332z`,fill:`#FBBC05`}),X(`path`,{d:`M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0A8.997 8.997 0 0 0 .957 4.958L3.964 7.29C4.672 5.163 6.656 3.58 9 3.58z`,fill:`#EA4335`})]})}function Cd(e){return new TextEncoder().encode(e)}function wd(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function Td(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function Ed(){return window?.PublicKeyCredential!==void 0&&typeof window.PublicKeyCredential==`function`}function Dd(e){let{id:t}=e;return{...e,id:Td(t),transports:e.transports}}function Od(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var kd=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),this.name=r??n.name,this.code=t}};function Ad({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new kd({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new kd({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new kd({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new kd({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new kd({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new kd({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new kd({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!Od(t))return new kd({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new kd({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new kd({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new kd({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var jd=new class{createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},Md=[`cross-platform`,`platform`];function Nd(e){if(e&&!(Md.indexOf(e)<0))return e}async function Pd(e){if(!Ed())throw Error(`WebAuthn is not supported in this browser`);let t={publicKey:{...e,challenge:Td(e.challenge),user:{...e.user,id:Cd(e.user.id)},excludeCredentials:e.excludeCredentials?.map(Dd)}};t.signal=jd.createNewAbortSignal();let n;try{n=await navigator.credentials.create(t)}catch(e){throw Ad({error:e,options:t})}if(!n)throw Error(`Registration was not completed`);let{id:r,rawId:i,response:a,type:o}=n,s;typeof a.getTransports==`function`&&(s=a.getTransports());let c;if(typeof a.getPublicKeyAlgorithm==`function`)try{c=a.getPublicKeyAlgorithm()}catch(e){Fd(`getPublicKeyAlgorithm()`,e)}let l;if(typeof a.getPublicKey==`function`)try{let e=a.getPublicKey();e!==null&&(l=wd(e))}catch(e){Fd(`getPublicKey()`,e)}let u;if(typeof a.getAuthenticatorData==`function`)try{u=wd(a.getAuthenticatorData())}catch(e){Fd(`getAuthenticatorData()`,e)}return{id:r,rawId:wd(i),response:{attestationObject:wd(a.attestationObject),clientDataJSON:wd(a.clientDataJSON),transports:s,publicKeyAlgorithm:c,publicKey:l,authenticatorData:u},type:o,clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:Nd(n.authenticatorAttachment)}}function Fd(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function Id(e){return new TextDecoder(`utf-8`).decode(e)}function Ld(){let e=window.PublicKeyCredential;return e.isConditionalMediationAvailable===void 0?new Promise(e=>e(!1)):e.isConditionalMediationAvailable()}function Rd({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new kd({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new kd({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!Od(t))return new kd({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new kd({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new kd({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function zd(e,t=!1){if(!Ed())throw Error(`WebAuthn is not supported in this browser`);let n;e.allowCredentials?.length!==0&&(n=e.allowCredentials?.map(Dd));let r={...e,challenge:Td(e.challenge),allowCredentials:n},i={};if(t){if(!await Ld())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');i.mediation=`conditional`,r.allowCredentials=[]}i.publicKey=r,i.signal=jd.createNewAbortSignal();let a;try{a=await navigator.credentials.get(i)}catch(e){throw Rd({error:e,options:i})}if(!a)throw Error(`Authentication was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;return c.userHandle&&(u=Id(c.userHandle)),{id:o,rawId:wd(s),response:{authenticatorData:wd(c.authenticatorData),clientDataJSON:wd(c.clientDataJSON),signature:wd(c.signature),userHandle:u},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:Nd(a.authenticatorAttachment)}}var Bd=H`
|
|
94
|
+
`):e.trim():``}function ml({id:e,enabled:t=!0,className:n=`relative`,innerClassName:r,anchor:i,children:a}){let s=Rn();return t?i===`end`?X(`div`,{className:u(`grid grid-rows-[minmax(0,1fr)]`,n),children:X(Mt,{initial:!1,mode:`sync`,children:X(o.div,{className:u(`col-start-1 row-start-1 max-h-full min-h-0 self-end`,r),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,pointerEvents:`none`},transition:{duration:s?0:150/1e3},children:a},e)})}):X(`div`,{className:n,children:X(Mt,{initial:!1,mode:`popLayout`,children:X(o.div,{className:r,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:s?0:150/1e3},children:a},e)})}):X(Dn,{children:a})}function hl(e){let t=new Map;return e.map(e=>{let n=e.payload||e.text,r=(t.get(n)??0)+1;return t.set(n,r),r===1?n:`${n}#${r}`})}var gl=`line-clamp-2 min-w-0 break-words`,_l=`${gl} text-start`,vl=e=>`${gl} ${e?`text-left`:`text-right`}`;function yl(){return{role:`group`,"aria-label":i(`peek`)(`quickReplies`)}}var bl=112,xl=8,Sl=250;function Cl(e,t){let[n,r]=Y(null);return K(()=>{if(r(null),!e||!t||typeof window>`u`)return;let n,i=null,a=()=>{let e=window.innerHeight;if(i){if(i.viewport===e)return;i=null,r(null),o();return}let t=xr(`peek`);t&&t.getBoundingClientRect().top<xl&&(i={px:Math.max(0,e-bl),viewport:e},r(i))},o=()=>{clearTimeout(n),n=setTimeout(a,Sl)},s=typeof ResizeObserver<`u`?new ResizeObserver(o):null,c=xr(`peek`);return c&&s?.observe(c),window.addEventListener(`resize`,o),o(),()=>{clearTimeout(n),s?.disconnect(),window.removeEventListener(`resize`,o)}},[e,t]),n?.px??null}function wl({message:e,onOpen:t,onDismiss:n,onSendButton:r,position:a=`right`,embedded:s=!1}){let c=i(`peek`),l=yl(),d=hl(e?.buttons??[]),f=a===`left`,p=fe().kind===`iframe`,m=Cl(p,e?.id);return X(Mt,{children:e&&X(o.div,{"data-wx-peek":``,ref:br.peek,initial:{opacity:0,y:18,scale:.88},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.96},transition:{type:`spring`,stiffness:440,damping:20},onKeyDown:e.inPlaceKey?e=>{e.key===`Escape`&&(e.stopPropagation(),n())}:void 0,className:u(`bottom-24 z-2147483599 flex flex-col gap-3`,`w-[300px]`,s?`absolute`:`fixed`,f?`left-4`:`right-4`),style:{marginBottom:`var(--wx-off-y,0px)`,...f?{marginLeft:`var(--wx-off-x,0px)`}:{marginRight:`var(--wx-off-x,0px)`},maxHeight:p?m??void 0:s?`calc(100% - 7rem - var(--wx-off-y,0px))`:`calc(100dvh - 7rem - var(--wx-off-y,0px))`},role:`dialog`,"aria-label":c(`newMessage`),children:Z(ml,{id:e.id,enabled:!!e.inPlaceKey,anchor:`end`,className:`relative min-h-0`,innerClassName:`flex min-h-0 flex-col gap-3`,children:[(e.text||e.thumbUrl)&&Z(o.div,{whileHover:{y:-3},transition:{type:`spring`,stiffness:400,damping:24},className:u(`relative flex min-h-0 shrink-[0.01] flex-col overflow-hidden rounded-wx-lg border border-wx-border bg-wx-bg text-wx-fg`,`shadow-[0_10px_28px_rgba(0,0,0,0.14)]`),children:[Z(`div`,{className:`flex shrink-0 items-center justify-between gap-2 px-4 pt-3 pb-2`,children:[X(`button`,{type:`button`,onClick:t,className:`min-w-0 flex-1 text-start transition-opacity hover:opacity-90`,children:X(Tl,{sender:e.sender})}),X(`button`,{type:`button`,onClick:n,"aria-label":c(`dismiss`),className:u(`flex h-6 w-6 shrink-0 items-center justify-center rounded-full`,`text-wx-fg-muted transition-colors hover:bg-wx-bg-elevated hover:text-wx-fg`,`relative before:absolute before:-inset-2.5 before:content-['']`),children:X(Nt,{size:12})})]}),Z(`button`,{type:`button`,onClick:t,className:u(`block min-h-0 w-full overflow-y-auto text-start`,`transition-opacity hover:opacity-90`),children:[e.thumbUrl&&X(`img`,{src:e.thumbUrl,...e.thumbW&&e.thumbH?{width:e.thumbW,height:e.thumbH}:{},alt:``,style:e.thumbW&&e.thumbH?{aspectRatio:`${e.thumbW} / ${e.thumbH}`}:void 0,className:`block h-auto w-full bg-wx-bg-elevated object-contain`}),e.text&&X(`span`,{className:u(`block px-4 pb-4 text-sm leading-relaxed`,e.thumbUrl?`pt-2`:void 0),children:X(`span`,{dir:`auto`,className:u(`block wrap-anywhere`,`whitespace-pre-line`,`line-clamp-10`),children:pl(e.text)})})]})]}),e.buttons.length>0&&X(`div`,{...l,dir:`ltr`,className:u(`relative z-10 -mx-3 -mt-2 -mb-4 flex min-h-0 shrink-2 flex-col gap-1.5 overflow-y-auto px-3 pt-2 pb-4`,`pointer-coarse:gap-2`,f?`items-start`:`items-end`),children:e.buttons.map((e,t)=>X(o.button,{type:`button`,onClick:()=>r(e.payload,e.text),whileHover:{y:-1},whileTap:{scale:.96},transition:{type:`spring`,stiffness:480,damping:26},className:u(`max-w-full rounded-full bg-wx-bg px-3.5 py-2 text-sm font-medium text-wx-primary`,`relative after:absolute after:top-1/2 after:left-1/2 after:-translate-x-1/2 after:-translate-y-1/2 after:content-[''] pointer-coarse:after:h-[max(100%,44px)] pointer-coarse:after:w-[max(100%,44px)]`,`transition-colors hover:bg-wx-primary hover:text-wx-primary-fg`,`shadow-[0_4px_12px_rgba(0,0,0,0.08)]`),children:X(`span`,{dir:`auto`,className:vl(f),children:e.text})},d[t]))})]})},e.inPlaceKey??e.id)})}function Tl({sender:e}){let{config:t}=Tt(),n=i(`peek`),r=e.kind===`ai`||e.kind===`bot`?F(t.messenger?.aiAssistant)??`AI Agent`:e.name?.trim()??``,a=r?null:e.kind===`operator`?n(`operator`):null;return X(`span`,{className:`text-xs font-medium text-wx-fg-muted`,children:r||a})}function El({title:e,onBack:t,onClose:n,className:r,expanded:a,onToggleExpand:o}){let s=i(`header`),c=fn(),l=fn();return Z(`header`,{"data-wx-top-bar":!0,className:u(`flex h-14 items-center gap-2 border-b border-wx-border bg-wx-bg px-2`,r),children:[X(`div`,{className:`flex flex-1 items-center justify-start`,children:t&&X(Yt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":s(`back`),onClick:t,className:`shrink-0`,...c.parentHandlers,children:X(zt,{ref:c.iconRef,size:18,className:`rtl:-scale-x-100`})})}),e&&X(`h2`,{className:`min-w-0 shrink truncate text-center text-base font-semibold text-wx-fg`,children:e}),Z(`div`,{className:`flex flex-1 items-center justify-end gap-0`,children:[o&&X(Yt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":s(a?`collapse`:`expand`),onClick:o,children:a?Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`polyline`,{points:`4 14 10 14 10 20`}),X(`polyline`,{points:`20 10 14 10 14 4`}),X(`line`,{x1:`14`,y1:`10`,x2:`21`,y2:`3`}),X(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`})]}):Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`polyline`,{points:`15 3 21 3 21 9`}),X(`polyline`,{points:`9 21 3 21 3 15`}),X(`line`,{x1:`21`,y1:`3`,x2:`14`,y2:`10`}),X(`line`,{x1:`3`,y1:`21`,x2:`10`,y2:`14`})]})}),X(Yt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":s(`close`),onClick:n,...l.parentHandlers,children:X(It,{ref:l.iconRef,size:18})})]})]})}function Dl({isDummy:e,onOpenCategory:t,onOpenArticle:r}){let a=i(`help`),o=y(),s=n(),[c,l]=Y(``),u=Al(c,300),{data:d,loading:f}=Xt({variables:{parentId:null,locale:s},skip:e}),{data:p}=Ut({variables:{args:{folderId:null,locale:s,recursive:!1,limit:20}},skip:e}),{data:m}=Ut({variables:{args:{query:u,locale:s,limit:10}},skip:u.length<2||e}),h=he().publicKey,g=!!h&&!e,_=tt(g?st.helpCategories(h,s):null,d),v=tt(g?st.helpRoot(h,s):null,p),b=jl(_),x=e?se(o):b??[],S=u.length>=2,C=Ml(m),w=e?Qe(o).filter(e=>e.title.toLowerCase().includes(u.toLowerCase())||e.excerpt.toLowerCase().includes(u.toLowerCase())).map(e=>({id:e.id,title:e.title,excerpt:e.excerpt,slug:e.slug,authors:Qt(e.authors)})):[],T=e?w:C,E=e?[]:(v?.visitorHelpList?.items??[]).map(e=>({id:e._id,title:e.title,excerpt:e.excerpt??null,slug:e.slug,authors:Qt(e.authors)}));return X(`div`,{className:`flex h-full min-h-0 flex-col`,children:Z(it,{followDirection:!0,className:`min-h-0 flex-1`,viewportRef:Zt(`help`),children:[X(rn,{value:c,onChange:l,placeholder:a(`searchPlaceholder`)}),S?X(Ol,{results:T,onOpen:r}):e&&!$e(o)||f&&x.length===0?X(kl,{}):x.length>0||E.length>0?Z(Dn,{children:[x.length>0&&X(`div`,{className:`border-wx-border border-b px-5 py-4`,children:X(`p`,{className:`font-semibold text-base text-wx-fg`,children:a(`collectionsCount`,{count:x.length})})}),Z(`div`,{className:`flex flex-col`,children:[x.map((e,n)=>X(Fc,{title:e.title,description:e.description,meta:typeof e.articleCount==`number`&&e.articleCount>0?a(`articlesCount`,{count:e.articleCount}):void 0,kind:`folder`,onClick:()=>t(e.id,{name:e.title,description:e.description,articleCount:e.articleCount}),delay:n*.03},e.id)),E.map((e,t)=>X(Fc,{title:e.title,description:e.excerpt,authors:e.authors,kind:`article`,onClick:()=>r(e.slug),delay:(x.length+t)*.03},e.id))]})]}):X(`div`,{className:`px-5 py-6`,children:X(Ke,{children:Z(z,{className:`py-8 text-center`,children:[X(`p`,{className:`font-semibold text-sm text-wx-fg`,children:a(`emptyTitle`)}),X(`p`,{className:`mt-1 text-wx-fg-muted text-xs`,children:a(`emptyBody`)})]})})})]})})}function Ol({results:e,onOpen:t}){let n=i(`help`);return e.length===0?X(`div`,{className:`px-5 py-6`,children:X(Ke,{children:X(z,{className:`py-8 text-center`,children:X(`p`,{className:`text-sm text-wx-fg-muted`,children:n(`noResults`)})})})}):X(`div`,{className:`flex flex-col`,children:e.map((e,n)=>X(Fc,{title:e.title,description:e.excerpt,authors:e.authors,onClick:()=>t(e.slug),delay:n*.03},e.id))})}function kl(){return X(`div`,{className:`flex flex-col`,children:Array.from({length:4}).map((e,t)=>Z(`div`,{className:`flex items-center gap-3 border-wx-border border-b px-5 py-4 last:border-b-0`,children:[Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[X(U,{className:`h-4 w-32 rounded`}),X(U,{className:`h-3 w-56 rounded`}),X(U,{className:`h-3 w-20 rounded`})]}),X(U,{className:`h-4 w-4 rounded`})]},t))})}function Al(e,t){let[n,r]=Y(e);return K(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function jl(e){return e?(e.visitorHelpFolders??[]).map(e=>({id:e._id,title:e.name,description:e.description??``,articleCount:e.articleCount??0})):null}function Ml(e){return e?(e.visitorHelpList?.items??[]).map(e=>({id:e._id,title:e.title,excerpt:e.excerpt??null,slug:e.slug,authors:Qt(e.authors),reactionCounts:e.reactionCounts??null})):[]}function Nl(e,t=[]){let n=[];function r(t,r){let i=W.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=W.useMemo(()=>o,Object.values(o));return X(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=W.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>W.createContext(e));return function(n){let r=n?.[e]||t;return W.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Pl(i,...t)]}function Pl(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return W.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Fl=globalThis?.document?W.useLayoutEffect:()=>{},Il=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=qt(`Primitive.${t}`),r=W.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),X(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ll=h((e=>{var n=t(`react`);function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),Rl=h(((e,t)=>{t.exports=Ll()}))();function zl(){return(0,Rl.useSyncExternalStore)(Bl,()=>!0,()=>!1)}function Bl(){return()=>{}}var Vl=`Avatar`,[Hl,Ul]=Nl(Vl),[Wl,Gl]=Hl(Vl),Kl=W.forwardRef((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,a]=W.useState(`idle`);return X(Wl,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:X(Il.span,{...r,ref:t})})});Kl.displayName=Vl;var ql=`AvatarImage`,Jl=W.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=Gl(ql,n),s=Ql(r,a),c=qe(e=>{i(e),o.onImageLoadingStatusChange(e)});return Fl(()=>{s!==`idle`&&c(s)},[s,c]),s===`loaded`?X(Il.img,{...a,ref:t,src:r}):null});Jl.displayName=ql;var Yl=`AvatarFallback`,Xl=W.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=Gl(Yl,n),[o,s]=W.useState(r===void 0);return W.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?X(Il.span,{...i,ref:t}):null});Xl.displayName=Yl;function Zl(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?`loaded`:`loading`):`error`:`idle`}function Ql(e,{referrerPolicy:t,crossOrigin:n}){let r=zl(),i=W.useRef(null),a=r?(i.current||(i.current=new window.Image),i.current):null,[o,s]=W.useState(()=>Zl(a,e));return Fl(()=>{s(Zl(a,e))},[a,e]),Fl(()=>{let e=e=>()=>{s(e)};if(!a)return;let r=e(`loaded`),i=e(`error`);return a.addEventListener(`load`,r),a.addEventListener(`error`,i),t&&(a.referrerPolicy=t),typeof n==`string`&&(a.crossOrigin=n),()=>{a.removeEventListener(`load`,r),a.removeEventListener(`error`,i)}},[a,n,t]),o}var $l=Kl,eu=Jl,tu=Xl,nu=W.forwardRef(({className:e,...t},n)=>X($l,{ref:n,className:u(`relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full`,e),...t}));nu.displayName=$l.displayName;var ru=W.forwardRef(({className:e,...t},n)=>X(eu,{ref:n,className:u(`aspect-square h-full w-full object-cover`,e),...t}));ru.displayName=eu.displayName;var iu=W.forwardRef(({className:e,...t},n)=>X(tu,{ref:n,delayMs:300,className:u(`flex h-full w-full items-center justify-center bg-wx-bg-elevated-2 text-xs font-medium text-wx-fg-muted`,e),...t}));iu.displayName=tu.displayName;function au({avatars:e,max:t=3,size:n=`md`,ringClass:r=`ring-wx-bg`,className:i}){let a=e.slice(0,t),o=e.length-a.length,s=n===`sm`?`h-7 w-7`:`h-8 w-8`;return Z(`div`,{className:u(`flex -space-x-2`,i),children:[a.map(e=>Z(nu,{className:u(s,`ring-2`,r),children:[X(ru,{src:e.src,alt:e.alt}),X(iu,{children:ou(e.alt)})]},e.src)),o>0&&X(nu,{className:u(s,`ring-2`,r),children:Z(iu,{children:[`+`,o]})})]})}function ou(e){return e.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)}function su(e,t,n,r){let i=e?.trim()??``;return i&&cu(n,r??`en`)?i:t}function cu(e,t){return lu(e)===lu(t)}function lu(e){return e.toLowerCase().split(`-`)[0]}function uu(){let e=n(),{config:t}=Tt(),r=t.defaultLocale??`en`;return G((t,n)=>su(t,n,e,r),[e,r])}function du({block:e,config:t,onOpenTab:n}){let r=i(`home`),a=uu(),s=e.action??`open-messenger`,c=s===`open-help`?`help`:s===`open-news`?`news`:`messages`;return Z(o.button,{type:`button`,onClick:()=>n(c),whileHover:{y:-1},whileTap:{scale:.99},transition:{type:`spring`,stiffness:360,damping:26},className:`flex w-full items-center gap-3 rounded-wx-lg bg-wx-bg-elevated px-4 py-3.5 text-start transition-colors hover:bg-wx-bg-elevated-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[Z(`div`,{className:`min-w-0 flex-1`,children:[X(`p`,{className:`truncate text-base font-semibold text-wx-fg`,children:a(e.title,r(`askTitle`))}),X(`p`,{className:`mt-0.5 truncate text-sm text-wx-fg-muted`,children:a(e.subtitle,r(`askSubtitle`))})]}),t.operatorAvatars.length>0&&X(au,{avatars:t.operatorAvatars,size:`sm`,ringClass:`ring-wx-bg-elevated`}),X(ds,{size:16,className:`shrink-0 text-wx-fg-muted rtl:-scale-x-100`})]})}function fu(e){if(!e||typeof e!=`object`)return null;let t=e,n=String(t._id??t.id??``);if(!n)return null;let r=t.coverImageUrl?.url,i=t.externalCoverImageUrl,a=typeof r==`string`?r:typeof i==`string`?i:void 0;return{id:n,title:typeof t.title==`string`?t.title:``,excerpt:typeof t.excerpt==`string`?Ue(t.excerpt,160):``,coverImageUrl:a}}function pu(e){return Array.isArray(e)?e.map(e=>{if(typeof e!=`object`||!e)return null;let t=e,n=typeof t.title==`string`?t.title:``;return n?{id:String(t._id??t.id??``),title:n}:null}).filter(e=>e!==null):[]}function mu(e,t){return t||!e?[]:e.map(e=>{let t=typeof e.title==`string`?e.title:``;return t?{id:String(e._id??e.id??``),title:t}:null}).filter(e=>e!==null)}function hu(e){let t=Date.parse(e);if(Number.isNaN(t))return``;let n=Date.now()-t,r=Math.floor(n/6e4);if(r<1)return`Just now`;if(r<60)return`${r}m`;let i=Math.floor(r/60);if(i<24)return`${i}h`;let a=Math.floor(i/24);return a<7?`${a}d`:new Date(t).toLocaleDateString()}function gu(e){return e.split(/\n{2,}/).map((e,t)=>X(`p`,{className:t>0?`mt-2`:void 0,children:e.split(`
|
|
95
|
+
`).map((e,t)=>Z(`span`,{children:[t>0&&X(`br`,{}),_u(e)]},t))},t))}function _u(e){let t=[],n=/\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|\*([^*]+)\*/g,r=0,i,a=0;for(;i=n.exec(e);){if(i.index>r&&t.push(e.slice(r,i.index)),i[1]&&i[2]){let e=/^https?:\/\//.test(i[2])?i[2]:`#`;t.push(X(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:i[1]},a++))}else i[3]?t.push(X(`strong`,{className:`font-semibold text-wx-fg`,children:i[3]},a++)):i[4]&&t.push(X(`em`,{children:i[4]},a++));r=i.index+i[0].length}return r<e.length&&t.push(e.slice(r)),t}function vu(e){let[t,n]=Y(null);return K(()=>{if(!e){n(null);return}let t=!0,r=new Image;return r.onload=()=>t&&n(e),r.onerror=()=>t&&n(null),r.src=e,()=>{t=!1}},[e]),t===e?e:null}var yu=`linear-gradient(135deg, var(--wx-home-glow, var(--wx-primary)) 0%, color-mix(in srgb, var(--wx-home-glow, var(--wx-primary)) 55%, #000) 100%)`;function bu({block:e,onOpenTab:t,onOpenNewsArticle:n,isDummy:r}){let a=i(`home`),s=fe(),c=!r&&e.newsId?s.previewData?.newsPostsById?.[e.newsId]:void 0,l=c!==void 0,{data:u,loading:d}=tn({variables:{args:{id:e.newsId??``}},skip:r||l||!e.newsId}),f=he().publicKey,p=tt(f&&!r&&!l&&e.newsId?st.home(f,`news-card:${e.newsId}`,`_`):null,u);if(r)return Z(o.button,{type:`button`,onClick:()=>n?n(`demo-news-1`):t(`news`),whileHover:{y:-2},whileTap:{scale:.99},transition:{type:`spring`,stiffness:360,damping:26},className:`block w-full overflow-hidden rounded-wx-xl bg-wx-bg-elevated text-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[X(`div`,{className:`relative w-full`,style:{aspectRatio:`16 / 11`,backgroundImage:yu},children:Z(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-1.5 px-6 text-center text-white`,children:[X(`p`,{className:`text-[11px] font-semibold tracking-[0.22em] uppercase opacity-80`,children:a(`featuredArticleDemoEyebrow`)}),X(`p`,{className:`text-2xl leading-tight font-bold`,children:a(`featuredArticleDemoHeadline`)}),X(`p`,{className:`text-sm opacity-85`,children:a(`featuredArticleDemoSubline`)})]})}),Z(`div`,{className:`flex items-center justify-between gap-2 px-4 py-3`,children:[X(`span`,{className:`truncate text-sm font-semibold text-wx-fg`,children:a(`featuredArticleDemoCta`)}),X(Dt,{size:16,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})]});let m=fu(l?c:p?.visitorNewsPost),h=!!m,g=e.ctaLabel?.trim()||a(`featuredArticleTap`),_=h?()=>n?n(m.id):t(`news`):void 0,v=m?.coverImageUrl;return!e.newsId||!d&&!m?X(o.button,{type:`button`,onClick:()=>t(`news`),whileHover:{y:-1},whileTap:{scale:.99},transition:{type:`spring`,stiffness:360,damping:26},className:`block w-full overflow-hidden rounded-wx-xl bg-wx-bg-elevated text-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:X(`div`,{className:`relative w-full`,style:{aspectRatio:`16 / 11`,backgroundImage:yu},children:Z(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-1 px-6 text-center text-white`,children:[X(`p`,{className:`text-2xl leading-tight font-bold`,children:e.newsId?a(`featuredArticleLoading`):a(`featuredArticleEmpty`)}),X(`p`,{className:`text-sm opacity-80`,children:e.newsId?``:a(`featuredArticleSetUp`)})]})})}):Z(o.button,{type:`button`,onClick:_,whileHover:h?{y:-2}:void 0,whileTap:h?{scale:.99}:void 0,transition:{type:`spring`,stiffness:360,damping:26},disabled:!h,className:`block w-full overflow-hidden rounded-wx-xl bg-wx-bg-elevated text-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[X(xu,{title:m?.title,excerpt:m?.excerpt,coverImage:v}),Z(`div`,{className:`flex items-center justify-between gap-2 px-4 py-3`,children:[X(`span`,{className:`truncate text-sm font-semibold text-wx-fg`,children:g}),X(Dt,{size:16,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})]})}function xu({title:e,excerpt:t,coverImage:n}){let r=vu(n);return X(`div`,{className:`relative w-full`,"data-cover":r?`image`:`gradient`,style:{aspectRatio:`16 / 11`,backgroundImage:r?`linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.6) 100%), url(${r})`:yu,backgroundSize:`cover`,backgroundPosition:`center`},children:Z(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-1.5 px-6 text-center text-white`,children:[X(`p`,{className:`text-2xl leading-tight font-bold`,children:e}),t&&X(`p`,{className:`text-sm opacity-85 line-clamp-2`,children:t})]})})}function Su(){return Z(`div`,{className:`flex w-full items-center gap-2 px-3.5 py-2.5`,children:[X(`div`,{className:`h-3.5 min-w-0 flex-1 animate-pulse rounded-wx-sm bg-wx-bg-elevated-2`}),X(`div`,{className:`h-3.5 w-3.5 shrink-0 animate-pulse rounded-wx-sm bg-wx-bg-elevated-2`})]})}function Cu({title:e,slug:t,onOpenArticle:n,onOpenTab:r}){return Z(`button`,{type:`button`,onClick:()=>n?n(t):r(`help`),className:`flex w-full items-center gap-2 px-3.5 py-2.5 text-start transition-colors hover:bg-wx-bg-elevated-2`,children:[X(`span`,{className:`min-w-0 flex-1 truncate text-sm text-wx-fg`,children:e}),X(Dt,{size:14,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})}function wu({block:e,onOpenTab:t,onOpenArticle:r,isDummy:a}){let o=i(`home`),s=y(),c=fe(),l=n(),u=e.suggestions,d=u?u.mode===`manual`?Math.min((u.articleIds??[]).length,10):Math.max(0,Math.min(u.maxItems??0,10)):0,f=c.previewData?.helpArticles,p=!a&&!!f&&d>0,m=u?.mode===`popular`?Jt.Popular:u?.mode===`recent`?Jt.Recent:void 0,h=u?.mode===`category`?u.categoryId:void 0,g=a||p||d===0||!u||!(u.mode===`popular`||u.mode===`recent`||u.mode===`category`)||u.mode===`category`&&!h,{data:_,loading:v}=Wt({variables:{args:{limit:d,locale:l,sort:m,folderId:h??void 0,recursive:u?.mode===`category`?!0:void 0}},skip:g}),b=u?.mode===`manual`?(u.articleIds??[]).slice(0,d):[],x=a||p||b.length===0,{data:S,loading:C}=Kt({variables:{ids:b,locale:l},skip:x}),w=he().publicKey,T=!!w&&!a&&!p,E=tt(T&&!g?st.home(w,`help-list-slim:${u?.mode??``}:${d}:${h??``}`,l):null,_),D=tt(T&&!x?st.home(w,`help-ids-slim:${b.join(`,`)}`,l):null,S),O=(()=>{if(d===0||!u)return[];if(a){let e=Qe(s);return(u.mode===`popular`?e.slice().sort((e,t)=>t.viewCount-e.viewCount):u.mode===`recent`?e.slice().sort((e,t)=>(t.publishedAt??``).localeCompare(e.publishedAt??``)):u.mode===`category`&&u.categoryId?e.filter(e=>e.categoryId===u.categoryId):u.mode===`manual`?(u.articleIds??[]).map(t=>e.find(e=>e.id===t)).filter(e=>e!=null):e).slice(0,d).map(e=>({id:e.id,title:e.title,slug:e.slug}))}if(p&&f){let e=f.map(e=>{if(!e||typeof e!=`object`)return null;let t=e;return typeof t._id==`string`&&typeof t.title==`string`&&typeof t.slug==`string`?{id:t._id,title:t.title,slug:t.slug}:null}).filter(e=>e!=null);if(u.mode===`manual`&&u.articleIds){let t=new Map(e.map(e=>[e.id,e]));return u.articleIds.map(e=>t.get(e)).filter(e=>e!=null).slice(0,d)}return e.slice(0,d)}return u.mode===`manual`?(D?.visitorHelpArticlesByIds??[]).filter(e=>e!=null).map(e=>({id:e._id,title:e.title,slug:e.slug})):(E?.visitorHelpList?.items??[]).map(e=>({id:e._id,title:e.title,slug:e.slug}))})(),k=!a&&!p&&(v||C)&&O.length===0?d:0,A=k>0||O.length>0;return Z(`div`,{className:`overflow-hidden rounded-wx-lg border border-wx-border bg-wx-bg-elevated`,children:[Z(`button`,{type:`button`,onClick:()=>t(`help`),className:`flex w-full items-center gap-2.5 px-3.5 py-3 text-start transition-colors hover:bg-wx-bg-elevated-2`,children:[X(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-wx-fg`,children:e.placeholder?.trim()||o(`searchPlaceholder`)}),X(ln,{size:16,className:`shrink-0 text-wx-fg-muted`})]}),A&&X(`div`,{className:`border-t border-wx-border`,children:k>0?Array.from({length:k}).map((e,t)=>X(Su,{},t)):O.map(e=>X(Cu,{title:e.title,slug:e.slug,onOpenArticle:r,onOpenTab:t},e.id))})]})}function Tu({title:e,onOpenAll:t,children:n}){let r=i(`home`);return Z(`div`,{className:`overflow-hidden rounded-wx-lg border border-wx-border bg-wx-bg-elevated`,children:[Z(`div`,{className:`flex items-center justify-between px-3.5 pt-3 pb-1.5`,children:[X(`p`,{className:`text-xs font-semibold tracking-wide text-wx-fg-muted uppercase`,children:e}),X(`button`,{type:`button`,onClick:t,"aria-label":r(`seeAll`),className:`text-xs font-medium text-wx-primary hover:underline`,children:X(Dt,{size:14,className:`rtl:-scale-x-100`})})]}),n]})}function Eu({block:e,onOpenTab:t,onOpenNewsArticle:r,isDummy:a}){let o=i(`home`),s=y(),c=n(),l=fe(),u=uu(),d=Math.max(1,Math.min(10,e.maxItems??3)),f=a?void 0:l.previewData?.newsPosts,p=Array.isArray(f)&&f.length>0,{data:m,error:h,loading:g}=nn({variables:{args:{locale:c,limit:d}},skip:a||p}),_=he().publicKey,v=tt(_&&!a&&!p?st.home(_,`news-slim:${d}`,c):null,m),b=a?E(s).slice(0,d).map(e=>({id:e.id,title:e.title})):p?pu(f).slice(0,d):mu(v?.visitorNewsList?.items,h).slice(0,d);return!a&&!g&&b.length===0?null:X(Tu,{title:u(e.title,o(`newsPreviewTitle`)),onOpenAll:()=>t(`news`),children:X(`ul`,{className:`flex flex-col`,children:b.map(e=>X(`li`,{children:Z(`button`,{type:`button`,onClick:()=>r?r(e.id):t(`news`),className:`flex w-full items-center gap-2 px-3.5 py-2.5 text-start transition-colors hover:bg-wx-bg-elevated-2`,children:[X(ic,{size:14,className:`shrink-0 text-wx-fg-muted`}),X(`span`,{className:`min-w-0 flex-1 truncate text-sm text-wx-fg`,children:e.title}),X(Dt,{size:14,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})},e.id||e.title))})})}function Du({block:e,onOpenTab:t,onOpenArticle:r,isDummy:a}){let o=i(`home`),s=y(),c=fe(),l=n(),u=uu(),d=(e.articleIds??[]).slice(0,10),f=d.length,p=a?null:c.previewData?.helpArticlesById,m=!!p,{data:h}=Ht({variables:{ids:d,locale:l},skip:a||m||d.length===0}),g=he().publicKey,_=tt(g&&!a&&!m&&d.length>0?st.home(g,`help-ids:${d.join(`,`)}`,l):null,h);if(a){let n=Qe(s).slice().sort((e,t)=>t.viewCount-e.viewCount).slice(0,4);return X(Tu,{title:u(e.title,o(`popularArticlesTitle`)),onOpenAll:()=>t(`help`),children:X(`ul`,{className:`flex flex-col`,children:n.map(e=>X(`li`,{children:Z(`button`,{type:`button`,onClick:()=>r?r(e.slug):t(`help`),className:`flex w-full items-center gap-2 px-3.5 py-2.5 text-start transition-colors hover:bg-wx-bg-elevated-2`,children:[X(gs,{size:14,className:`shrink-0 text-wx-fg-muted`}),X(`span`,{className:`min-w-0 flex-1 truncate text-sm text-wx-fg`,children:e.title}),X(Dt,{size:14,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})},e.id))})})}if(f===0)return null;let v=new Map;if(m&&p)for(let e of d){let t=p[e];if(t&&typeof t==`object`){let n=t;typeof n.title==`string`&&typeof n.slug==`string`&&v.set(e,{title:n.title,slug:n.slug})}}else for(let e of _?.visitorHelpArticlesByIds??[])v.set(e._id,{title:e.title,slug:e.slug});return X(Tu,{title:u(e.title,o(`pinnedArticlesTitle`)),onOpenAll:()=>t(`help`),children:X(`ul`,{className:`flex flex-col`,children:d.map((e,n)=>{let i=v.get(e);return X(`li`,{children:Z(`button`,{type:`button`,onClick:()=>{i&&r?r(i.slug):t(`help`)},className:`flex w-full items-center gap-2 px-3.5 py-2.5 text-start transition-colors hover:bg-wx-bg-elevated-2`,children:[X(gs,{size:14,className:`shrink-0 text-wx-fg-muted`}),X(`span`,{className:`min-w-0 flex-1 truncate text-sm text-wx-fg`,children:i?i.title:o(`pinnedArticleRow`,{n:n+1})}),X(Dt,{size:14,className:`shrink-0 text-wx-fg-subtle rtl:-scale-x-100`})]})},e)})})})}var Ou=new Set([`http:`,`https:`,`mailto:`,`tel:`,`sms:`]);function ku(e){if(typeof e!=`string`)return!1;try{return Ou.has(new URL(e.trim()).protocol)}catch{return!1}}function Au(e){return ku(e)?(window.open(e.trim(),`_blank`,`noopener,noreferrer`),!0):!1}var ju=/^[\d\s()+\-.]+$/;function Mu(e){if(typeof e!=`string`||!ju.test(e))return null;let t=e.replace(/\D/g,``);return t?`tel:${e.trim().startsWith(`+`)?`+`:``}${t}`:null}function Nu(e,t=e=>{window.location.href=e}){let n=Mu(e);return n?(t(n),!0):!1}function Pu(e,t,n){return{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,fill:n,"aria-hidden":`true`,className:t}}function Fu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#25D366`:`currentColor`),children:[X(`title`,{children:`WhatsApp`}),X(`path`,{d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z`})]})}function Iu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#26A5E4`:`currentColor`),children:[X(`title`,{children:`Telegram`}),X(`path`,{d:`M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.149-.056-.211s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z`})]})}function Lu({size:e=18,className:t,colored:n}){return n?Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,"aria-hidden":`true`,className:t,children:[X(`title`,{children:`Instagram`}),X(`defs`,{children:Z(`radialGradient`,{id:`wexio-ig-gradient`,cx:`30%`,cy:`107%`,r:`150%`,children:[X(`stop`,{offset:`0%`,stopColor:`#FFDD55`}),X(`stop`,{offset:`25%`,stopColor:`#FFDD55`}),X(`stop`,{offset:`50%`,stopColor:`#FF543E`}),X(`stop`,{offset:`75%`,stopColor:`#C837AB`}),X(`stop`,{offset:`100%`,stopColor:`#5851DB`})]})}),X(`path`,{fill:`url(#wexio-ig-gradient)`,d:`M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z`})]}):Z(`svg`,{...Pu(e,t,`currentColor`),children:[X(`title`,{children:`Instagram`}),X(`path`,{d:`M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z`})]})}function Ru({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#0078FF`:`currentColor`),children:[X(`title`,{children:`Messenger`}),X(`path`,{d:`M.001 11.639C.001 4.949 5.241 0 12.001 0S24 4.95 24 11.639c0 6.689-5.24 11.638-12 11.638-1.21 0-2.38-.16-3.47-.46a.96.96 0 00-.64.05l-2.39 1.05a.96.96 0 01-1.35-.85l-.07-2.14a.97.97 0 00-.32-.68A11.39 11.39 0 010 11.639zm8.32-2.19l-3.52 5.6c-.35.53.32 1.139.82.75l3.79-2.87c.26-.2.6-.2.87 0l2.8 2.1c.84.63 2.04.4 2.6-.48l3.52-5.6c.35-.53-.32-1.13-.82-.75l-3.79 2.87c-.25.2-.6.2-.86 0l-2.81-2.1a1.86 1.86 0 00-2.6.48z`})]})}function zu({size:e=18,className:t,colored:n}){return Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 52 52`,"aria-hidden":`true`,className:t,children:[X(`title`,{children:`Viber`}),Z(`g`,{transform:`translate(-598, -758)`,children:[n&&X(`circle`,{cx:`624`,cy:`784`,r:`26`,fill:`#fff`}),X(`path`,{fill:n?`#7F4DA0`:`currentColor`,fillRule:`evenodd`,transform:`translate(624, 784) scale(1, -1) translate(-624, -784)`,d:`M624,810 C638.359403,810 650,798.359403 650,784 C650,769.640597 638.359403,758 624,758 C609.640597,758 598,769.640597 598,784 C598,798.359403 609.640597,810 624,810 Z M625.557163,799.409207 C627.325063,799.188564 628.753733,798.762672 630.321233,797.998094 C631.862939,797.243741 632.849644,796.530492 634.155019,795.232271 C635.37816,794.005859 636.056551,793.077041 636.776002,791.635145 C637.778174,789.623608 638.348632,787.232396 638.446219,784.599993 C638.482254,783.702032 638.456556,783.50185 638.25094,783.245321 C637.86039,782.747507 637.002091,782.829703 636.709224,783.388976 C636.616662,783.573725 636.590964,783.732729 636.560135,784.451177 C636.508729,785.554433 636.431719,786.267682 636.27751,787.119522 C635.671103,790.460024 634.067654,793.128369 631.508319,795.042409 C629.375578,796.643375 627.170843,797.423387 624.282692,797.592702 C623.306228,797.649143 623.136647,797.685029 622.915679,797.854391 C622.504456,798.177682 622.483974,798.9371 622.879644,799.291164 C623.121199,799.511855 623.290771,799.542627 624.128492,799.516968 C624.565327,799.501582 625.207683,799.450263 625.557163,799.409207 L625.557163,799.409207 Z M613.809012,798.854999 C613.98892,798.793445 614.266425,798.649789 614.425756,798.547142 C615.402134,797.900559 618.120799,794.426647 619.009917,792.692195 C619.518641,791.70186 619.688213,790.968064 619.528978,790.424129 C619.364432,789.839149 619.092143,789.531244 617.874123,788.551135 C617.385891,788.156063 616.928478,787.750671 616.856589,787.642901 C616.67156,787.376051 616.522471,786.852663 616.522471,786.483204 C616.527687,785.626251 617.082688,784.071435 617.812475,782.875805 C618.377717,781.947024 619.39013,780.756602 620.392302,779.84316 C621.569167,778.765517 622.607278,778.031815 623.779022,777.4519 C625.284788,776.702756 626.204735,776.512894 626.877996,776.825864 C627.047567,776.902853 627.227389,777.0055 627.284002,777.051621 C627.335313,777.097836 627.731079,777.580217 628.162784,778.113821 C628.995289,779.160683 629.185438,779.329998 629.755896,779.524982 C630.480563,779.771285 631.220592,779.704618 631.965742,779.324885 C632.531079,779.032366 633.76447,778.267798 634.561026,777.713628 C635.609379,776.979831 637.850063,775.153043 638.153362,774.788658 C638.687784,774.13185 638.780346,773.290379 638.42053,772.361503 C638.040222,771.381489 636.560154,769.54439 635.527163,768.759265 C634.591855,768.051128 633.92893,767.779251 633.05526,767.738158 C632.335809,767.702263 632.037726,767.763817 631.117779,768.14355 C623.902394,771.11464 618.141368,775.548114 613.567447,781.639157 C611.177779,784.820617 609.358473,788.120102 608.114745,791.542752 C607.390173,793.538846 607.354224,794.406072 607.950294,795.427217 C608.207307,795.858231 609.301946,796.925592 610.098502,797.520807 C611.424455,798.506067 612.035983,798.870414 612.524215,798.973014 C612.858247,799.04487 613.438945,798.988429 613.809012,798.854999 L613.809012,798.854999 Z M625.911773,795.688935 C629.031324,795.232271 631.446691,793.785177 633.029562,791.43501 C633.91868,790.111111 634.47368,788.556295 634.663839,786.888605 C634.730607,786.277956 634.730607,785.164427 634.658718,784.979678 C634.591855,784.80525 634.376007,784.569173 634.190969,784.471724 C633.990569,784.369076 633.564079,784.379302 633.327644,784.502496 C632.931879,784.702593 632.813714,785.020771 632.813714,785.882837 C632.813714,787.211849 632.469355,788.612736 631.873285,789.700606 C631.194894,790.942404 630.208198,791.968672 629.005635,792.681969 C627.972644,793.297732 626.4463,793.754405 625.053579,793.867278 C624.549889,793.908372 624.272384,794.010981 624.082235,794.231625 C623.789368,794.56519 623.758454,795.01675 624.00513,795.391313 C624.272375,795.806969 624.683502,795.873684 625.911773,795.688935 L625.911773,795.688935 Z M627.006411,791.814743 C628.018825,791.599213 628.794898,791.214367 629.457823,790.593454 C630.310906,789.787877 630.778646,788.812881 630.984157,787.411993 C631.122909,786.498599 631.066382,786.139423 630.742601,785.841791 C630.439407,785.564706 629.879286,785.554433 629.540048,785.816132 C629.293372,786.00088 629.216267,786.195864 629.15974,786.724365 C629.092972,787.427389 628.969591,787.919995 628.758949,788.376716 C628.306657,789.346542 627.510101,789.849431 626.163665,790.013633 C625.531464,790.090622 625.341315,790.162449 625.135794,790.403592 C624.760607,790.850039 624.90448,791.573563 625.423541,791.840412 C625.618906,791.9379 625.701131,791.948173 626.132751,791.922513 C626.400005,791.907118 626.79577,791.860949 627.006411,791.814743 L627.006411,791.814743 Z`})]})]})}function Bu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#5865F2`:`currentColor`),children:[X(`title`,{children:`Discord`}),X(`path`,{d:`M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z`})]})}function Vu({size:e=18,className:t,colored:n}){return n?Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,"aria-hidden":`true`,className:t,children:[X(`title`,{children:`Slack`}),X(`path`,{fill:`#E01E5A`,d:`M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z`}),X(`path`,{fill:`#36C5F0`,d:`M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z`}),X(`path`,{fill:`#2EB67D`,d:`M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312z`}),X(`path`,{fill:`#ECB22E`,d:`M15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z`})]}):Z(`svg`,{...Pu(e,t,`currentColor`),children:[X(`title`,{children:`Slack`}),X(`path`,{d:`M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z`})]})}function Hu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#06C755`:`currentColor`),children:[X(`title`,{children:`LINE`}),X(`path`,{d:`M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.346 0 .627.285.627.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.038 1.08l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314`})]})}function Uu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#1877F2`:`currentColor`),children:[X(`title`,{children:`Facebook`}),X(`path`,{d:`M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z`})]})}function Wu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#000000`:`currentColor`),children:[X(`title`,{children:`X`}),X(`path`,{d:`M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z`})]})}function Gu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#0A66C2`:`currentColor`),children:[X(`title`,{children:`LinkedIn`}),X(`path`,{d:`M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.063 2.063 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z`})]})}function Ku({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#FF4500`:`currentColor`),children:[X(`title`,{children:`Reddit`}),X(`path`,{d:`M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z`})]})}function qu({size:e=18,className:t,colored:n}){return n?Z(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,"aria-hidden":`true`,className:t,children:[X(`title`,{children:`TikTok`}),X(`path`,{fill:`#25F4EE`,d:`M9.375 9.05v-1.1a4.91 4.91 0 0 0-.71-.06 4.99 4.99 0 0 0-2.86 9.03 4.987 4.987 0 0 1 3.57-7.87zM15.66 5.34v-1A2.93 2.93 0 0 1 13.42.78l-.07-.78h-.84a2.95 2.95 0 0 0 3.15 5.34zM18.51 6.78a4.96 4.96 0 0 1-.97-2.96h-.65A4.972 4.972 0 0 0 18.51 6.78z`}),X(`path`,{fill:`#FE2C55`,d:`M14.46 14.86a4.99 4.99 0 0 1-4.99 4.93 4.99 4.99 0 0 1-2.86-.9 4.987 4.987 0 0 0 8.55-3.45v-9c.96.69 2.06 1.18 3.21 1.36v-1.5a4.94 4.94 0 0 1-2.5-1.32V13.4zM8.61 11.91a4.987 4.987 0 0 1 5.41-4.91v-1.5a5.06 5.06 0 0 0-.66-.04c-2.76 0-5.01 2.24-5.01 5.01a4.99 4.99 0 0 0 .26 1.44z`}),X(`path`,{fill:`#000000`,d:`M16.6 5.82a4.91 4.91 0 0 1-.94-.48V7.81a6.412 6.412 0 0 0 4.18 1.53V7.84a3.84 3.84 0 0 1-3.24-2.02zM7.96 12.93a3.7 3.7 0 0 1 1.41-.27c.24 0 .48.04.71.1V9.06a6.41 6.41 0 0 0-.71-.05v3.43a3.69 3.69 0 0 0-.7-.06 3.72 3.72 0 0 0-3.72 3.72 3.72 3.72 0 0 0 3.01 3.65 3.7 3.7 0 0 1-1.06-2.61 3.72 3.72 0 0 1 1.06-2.61zM12.51 18.51c-.99-.07-1.94-.46-2.69-1.1a3.71 3.71 0 0 0 2.71 1.17c2.06 0 3.72-1.66 3.72-3.72V5.82a4.91 4.91 0 0 0-1.46-.18v9.04a3.72 3.72 0 0 1-2.28 3.83z`})]}):Z(`svg`,{...Pu(e,t,`currentColor`),children:[X(`title`,{children:`TikTok`}),X(`path`,{d:`M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z`})]})}function Ju({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#FF0000`:`currentColor`),children:[X(`title`,{children:`YouTube`}),X(`path`,{d:`M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z`})]})}function Yu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#000000`:`currentColor`),children:[X(`title`,{children:`X`}),X(`path`,{d:`M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z`})]})}function Xu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#000000`:`currentColor`),children:[X(`title`,{children:`Threads`}),X(`path`,{d:`M18.263 11.097c-.03-3.486-1.92-5.586-5.111-5.586-2.13 0-3.922.963-4.863 2.499l2.062 1.438c.535-.843 1.272-1.543 2.628-1.543 1.528 0 2.318.85 2.544 2.431a15 15 0 0 0-2.236-.173c-4.125 0-6.068 1.867-6.068 4.336s1.943 3.99 4.804 3.99c3.139 0 5.013-2.115 5.781-4.735.798.361 1.348 1.204 1.348 2.47 0 3.387-3.907 5.232-7.22 5.232-4.885 0-8.077-3.207-8.077-8.424 0-6.392 4.223-10.487 9.9-10.487 3.808 0 5.69 1.671 6.97 3.914l2.108-1.475C21.44 2.078 18.331 0 13.663 0 6.227 0 1.168 5.277 1.168 12.934c0 7 4.953 11.066 10.856 11.066 4.878 0 9.809-2.846 9.809-7.716 0-2.545-1.46-4.231-3.569-5.187m-6.33 4.855c-1.077 0-2.026-.512-2.026-1.453 0-1.483 1.822-1.934 3.606-1.934.678 0 1.34.045 1.927.173-.422 1.927-1.671 3.215-3.508 3.214Z`})]})}function Zu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#BD081C`:`currentColor`),children:[X(`title`,{children:`Pinterest`}),X(`path`,{d:`M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z`})]})}function Qu({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#FFFC00`:`currentColor`),children:[X(`title`,{children:`Snapchat`}),X(`path`,{d:`M12.206.793c.99 0 4.347.276 5.93 3.821.529 1.193.403 3.219.299 4.847l-.003.06c-.012.18-.022.345-.03.51.075.045.203.09.401.09.3-.016.659-.12 1.033-.301.165-.088.344-.104.464-.104.182 0 .359.029.509.09.45.149.734.479.734.838.015.449-.39.839-1.213 1.168-.089.029-.209.075-.344.119-.45.135-1.139.36-1.333.81-.09.224-.061.524.12.868l.015.015c.06.136 1.526 3.475 4.791 4.014.255.044.435.27.42.509 0 .075-.015.149-.045.225-.24.569-1.273.988-3.146 1.271-.059.091-.12.375-.164.57-.029.179-.074.36-.134.553-.076.271-.27.405-.555.405h-.03c-.135 0-.313-.031-.538-.074-.36-.075-.765-.135-1.273-.135-.3 0-.599.015-.913.074-.6.104-1.123.464-1.723.884-.853.599-1.826 1.288-3.294 1.288-.06 0-.119-.015-.18-.015h-.149c-1.468 0-2.427-.675-3.279-1.288-.599-.42-1.107-.779-1.707-.884-.314-.045-.629-.074-.928-.074-.54 0-.958.089-1.272.149-.211.043-.391.074-.54.074-.374 0-.523-.224-.583-.42-.061-.192-.09-.389-.135-.567-.046-.181-.105-.494-.166-.57-1.918-.222-2.95-.642-3.189-1.226-.031-.063-.052-.15-.055-.225-.015-.243.165-.465.42-.509 3.264-.54 4.73-3.879 4.791-4.02l.016-.029c.18-.345.224-.645.119-.869-.195-.434-.884-.658-1.332-.809-.121-.029-.24-.074-.346-.119-1.107-.435-1.257-.93-1.197-1.273.09-.479.674-.793 1.168-.793.146 0 .27.029.383.074.42.194.789.3 1.104.3.234 0 .384-.06.465-.105l-.046-.569c-.098-1.626-.225-3.651.307-4.837C7.392 1.077 10.739.807 11.727.807l.419-.015h.06z`})]})}function $u({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#9146FF`:`currentColor`),children:[X(`title`,{children:`Twitch`}),X(`path`,{d:`M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z`})]})}function ed({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#181717`:`currentColor`),children:[X(`title`,{children:`GitHub`}),X(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`})]})}function td({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#1ED760`:`currentColor`),children:[X(`title`,{children:`Spotify`}),X(`path`,{d:`M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z`})]})}function nd({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#3B45FD`:`currentColor`),children:[X(`title`,{children:`Signal`}),X(`path`,{d:`M12 0q-.934 0-1.83.139l.17 1.111a11 11 0 0 1 3.32 0l.172-1.111A12 12 0 0 0 12 0M9.152.34A12 12 0 0 0 5.77 1.742l.584.961a10.8 10.8 0 0 1 3.066-1.27zm5.696 0-.268 1.094a10.8 10.8 0 0 1 3.066 1.27l.584-.962A12 12 0 0 0 14.848.34M12 2.25a9.75 9.75 0 0 0-8.539 14.459c.074.134.1.292.064.441l-1.013 4.338 4.338-1.013a.62.62 0 0 1 .441.064A9.7 9.7 0 0 0 12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25m-7.092.068a12 12 0 0 0-2.59 2.59l.909.664a11 11 0 0 1 2.345-2.345zm14.184 0-.664.909a11 11 0 0 1 2.345 2.345l.909-.664a12 12 0 0 0-2.59-2.59M1.742 5.77A12 12 0 0 0 .34 9.152l1.094.268a10.8 10.8 0 0 1 1.269-3.066zm20.516 0-.961.584a10.8 10.8 0 0 1 1.27 3.066l1.093-.268a12 12 0 0 0-1.402-3.383M.138 10.168A12 12 0 0 0 0 12q0 .934.139 1.83l1.111-.17A11 11 0 0 1 1.125 12q0-.848.125-1.66zm23.723.002-1.111.17q.125.812.125 1.66c0 .848-.042 1.12-.125 1.66l1.111.172a12.1 12.1 0 0 0 0-3.662M1.434 14.58l-1.094.268a12 12 0 0 0 .96 2.591l-.265 1.14 1.096.255.36-1.539-.188-.365a10.8 10.8 0 0 1-.87-2.35m21.133 0a10.8 10.8 0 0 1-1.27 3.067l.962.584a12 12 0 0 0 1.402-3.383zm-1.793 3.848a11 11 0 0 1-2.345 2.345l.664.909a12 12 0 0 0 2.59-2.59zm-19.959 1.1L.357 21.48a1.8 1.8 0 0 0 2.162 2.161l1.954-.455-.256-1.095-1.953.455a.675.675 0 0 1-.81-.81l.454-1.954zm16.832 1.769a10.8 10.8 0 0 1-3.066 1.27l.268 1.093a12 12 0 0 0 3.382-1.402zm-10.94.213-1.54.36.256 1.095 1.139-.266c.814.415 1.683.74 2.591.961l.268-1.094a10.8 10.8 0 0 1-2.35-.869zm3.634 1.24-.172 1.111a12.1 12.1 0 0 0 3.662 0l-.17-1.111q-.812.125-1.66.125a11 11 0 0 1-1.66-.125`})]})}function rd({size:e=18,className:t,colored:n}){return Z(`svg`,{...Pu(e,t,n?`#07C160`:`currentColor`),children:[X(`title`,{children:`WeChat`}),X(`path`,{d:`M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.722.722 0 0 1 .598.082l1.584.926a.272.272 0 0 0 .14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.582.582 0 0 1-.023-.156.49.49 0 0 1 .201-.398C23.024 18.48 24 16.82 24 14.98c0-3.21-2.931-5.837-6.656-6.088V8.89c-.135-.01-.27-.027-.407-.03zm-2.53 3.274c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.97-.982zm4.844 0c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.969-.982z`})]})}var id={whatsapp:Fu,telegram:Iu,instagram:Lu,messenger:Ru,viber:zu,discord:Bu,slack:Vu,line:Hu,facebook:Uu,twitter:Wu,linkedin:Gu,reddit:Ku,tiktok:qu,youtube:Ju,x:Yu,threads:Xu,pinterest:Zu,snapchat:Qu,twitch:$u,github:ed,spotify:td,signal:nd,wechat:rd},ad={telegram:dn,whatsapp:Gs,viber:Xs,instagram:bs,messenger:Us,discord:ks,slack:js,chat:Ws,email:Vs,phone:Xs,"video-call":pc,help:Ss,book:gs,bell:ps,star:oc,heart:Ms,bookmark:_s,"arrow-right":ds,lock:Bs,shield:tc,user:dc,users:fc,globe:Pe,calendar:ys,"map-pin":Hs,"shopping-cart":nc,download:Es,gift:As,"file-text":Os};function od({block:e,onOpenTab:t}){let n=Array.isArray(e.buttons)?e.buttons:[],r=e=>{switch(e.action){case`open-messenger`:return t(`messages`);case`open-help`:return t(`help`);case`open-news`:return t(`news`);case`open-url`:Au(e.url);return}};if(e.layout===`inline`){let e=n.slice(0,8);return X(`div`,{className:u(`grid gap-2`,e.length===1&&`grid-cols-1`,e.length===2&&`grid-cols-2`,e.length===3&&`grid-cols-3`,e.length>=4&&`grid-cols-4`),children:e.map((e,t)=>X(sd,{btn:e,onClick:()=>r(e)},`${e.action}-${t}`))})}return X(`div`,{className:`flex flex-col gap-2`,children:n.map((e,t)=>X(cd,{btn:e,onClick:()=>r(e)},`${e.action}-${t}`))})}function sd({btn:e,onClick:t}){let n=e.icon?.kind===`named`?e.icon.name:null,r=e.icon?.kind===`named`?!!e.icon.colored:!1,i=n?id[n]:null,a=n?ad[n]??Ws:Ws,s=i??a;return Z(o.button,{type:`button`,onClick:t,whileHover:{y:-2,scale:1.02},whileTap:{scale:.96},transition:{type:`spring`,stiffness:420,damping:24},title:e.label,className:`group flex h-24 flex-col items-center justify-center gap-1.5 rounded-wx-lg bg-wx-bg-elevated px-2 py-3 text-wx-fg transition-colors hover:bg-wx-bg-elevated-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[X(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-wx-bg transition-transform group-hover:scale-110`,children:e.icon?.kind===`media`?X(`img`,{src:e.icon.url,alt:``,className:`h-5 w-5 object-contain`}):X(s,{size:18,className:r?void 0:`text-wx-fg`,colored:i?r:void 0})}),e.label&&X(`span`,{className:`block w-full truncate text-center text-[11px] leading-tight font-medium`,children:e.label})]})}function cd({btn:e,onClick:t}){return!e.label&&e.icon?.kind===`media`?X(o.button,{type:`button`,onClick:t,whileHover:{y:-2},whileTap:{scale:.985},transition:{type:`spring`,stiffness:360,damping:26},className:`block w-full overflow-hidden rounded-wx-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:X(`img`,{src:e.icon.url,alt:``,className:`w-full object-cover`})}):Z(Yt,{type:`button`,variant:e.style===`primary`?`solid`:e.style===`ghost`?`ghost`:`tonal`,size:`lg`,onClick:t,className:`justify-start gap-2.5`,children:[e.icon?.kind===`named`?(()=>{let t=e.icon.name,n=!!e.icon.colored,r=id[t];return r?X(r,{size:16,className:`shrink-0`,colored:n}):X(ad[t]??Ws,{size:16,className:`shrink-0`})})():e.icon?.kind===`media`?X(`img`,{src:e.icon.url,alt:``,className:`h-4 w-4 shrink-0 object-contain`}):null,e.label&&X(`span`,{className:`text-sm font-medium`,children:e.label})]})}function ld({size:e=24,className:t}){return Z(`span`,{style:{width:e,height:e},className:u(`relative inline-block`,t),role:`img`,"aria-label":`Wexio`,children:[X(`img`,{src:b(`/logo-dark.png`),alt:``,width:e,height:e,className:`block h-full w-full dark:hidden`}),X(`img`,{src:b(`/logo-light.png`),alt:``,width:e,height:e,className:`hidden h-full w-full dark:block`})]})}function ud({block:e,onOpenTab:t,onOpenThread:n,isDummy:r,chatId:a,config:o}){let s=i(`home`),c=uu(),l=()=>n?n():t(`messages`),{data:u,loading:d}=Et({variables:{chatId:a??``},skip:r||!a});if(!r){if(!a||d)return null;let t=u?.visitorChatRecentInbound;if(!t)return null;let n=t.sender?.kind===`ai`||t.sender?.kind===`bot`,r=n?F(o.messenger?.aiAssistant)??`AI Agent`:t.sender?.name?.trim()||s(`recentMessageFromFallback`),i=n?o.messenger?.aiAssistantAvatar??null:t.sender?.avatar??null;return Z(`button`,{type:`button`,onClick:l,className:`flex w-full flex-col gap-3 rounded-wx-lg bg-wx-bg-elevated px-4 py-3.5 text-start transition-colors hover:bg-wx-bg-elevated-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[X(`p`,{className:`text-sm text-wx-fg-muted`,children:c(e.title,s(`recentMessageTitle`))}),Z(`div`,{className:`flex items-start gap-3`,children:[i?X(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-full bg-wx-bg`,children:X(`img`,{src:i,alt:r,className:`h-9 w-9 rounded-full object-cover`})}):n?null:X(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-full bg-wx-bg`,children:X(`span`,{className:`text-sm font-semibold text-wx-fg-muted`,children:r.charAt(0).toUpperCase()})}),Z(`div`,{className:`min-w-0 flex-1`,children:[Z(`div`,{className:`flex items-baseline justify-between gap-2`,children:[X(`p`,{className:`truncate text-sm font-semibold text-wx-fg`,children:r}),X(`span`,{className:`shrink-0 text-xs text-wx-fg-subtle`,children:hu(t.createdAt)})]}),X(`p`,{className:`mt-0.5 line-clamp-2 text-sm text-wx-fg-muted`,children:ut(t.text||t.caption)||s(`recentMessageAttachment`)})]})]})]})}let f=F(o.messenger?.aiAssistant)??s(`recentMessageFromFallback`),p=o.messenger?.aiAssistantAvatar??null;return Z(`button`,{type:`button`,onClick:l,className:`flex w-full flex-col gap-3 rounded-wx-lg bg-wx-bg-elevated px-4 py-3.5 text-start transition-colors hover:bg-wx-bg-elevated-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`,children:[X(`p`,{className:`text-sm text-wx-fg-muted`,children:c(e.title,s(`recentMessageTitle`))}),Z(`div`,{className:`flex items-start gap-3`,children:[X(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-full bg-wx-bg`,children:p?X(`img`,{src:p,alt:f,className:`h-9 w-9 rounded-full object-cover`}):X(ld,{size:36})}),Z(`div`,{className:`min-w-0 flex-1`,children:[Z(`div`,{className:`flex items-baseline justify-between gap-2`,children:[X(`p`,{className:`truncate text-sm font-semibold text-wx-fg`,children:f}),X(`span`,{className:`shrink-0 text-xs text-wx-fg-subtle`,children:s(`recentMessageAgo`)})]}),X(`p`,{className:`mt-0.5 line-clamp-2 text-sm text-wx-fg-muted`,children:s(`recentMessageSample`)})]})]})]})}function dd({block:e}){return X(`div`,{className:`px-2 text-sm leading-relaxed text-wx-fg-muted [&_a]:text-wx-primary [&_a]:underline`,children:gu(e.markdown)})}var fd={INSTANT:`teamStatusReplyInstant`,MINUTES:`teamStatusReplyMinutes`,HOURS:`teamStatusReplyHours`,DAY:`teamStatusReplyDay`},pd=Object.keys(fd);function md(e,t){if(!e)return null;let n=new Date(e);if(Number.isNaN(n.getTime()))return null;try{return new Intl.DateTimeFormat(t,{weekday:`long`,hour:`numeric`,minute:`2-digit`}).format(n)}catch{return null}}function hd({block:e,config:t}){let r=i(`home`),a=n(),o=e.presence??`HUMAN`,s=o===`OFFLINE`?`bg-wx-fg-subtle`:o===`AI`?`bg-wx-warning`:`bg-wx-success`,c=md(e.nextOpenAt,a),l,u=null;if(o===`AI`)l=r(`teamStatusAiOnline`,{name:F(t.messenger?.aiAssistant)??`Gaia`}),u=c?r(`teamStatusOperatorsBack`,{when:c}):null;else if(o===`OFFLINE`)l=c?r(`teamStatusOfflineUntil`,{when:c}):r(`teamStatusOfflineSoon`);else{l=r(`teamStatusOnline`);let t=e.showResponseTime&&e.responseTime&&pd.includes(e.responseTime)?e.responseTime:null;u=t?r(fd[t]):null}return Z(`div`,{className:`flex items-center gap-3 rounded-wx-lg bg-wx-bg-elevated px-3.5 py-3`,children:[Z(`div`,{className:`flex min-w-0 flex-1 items-start gap-3`,children:[X(`span`,{"aria-hidden":`true`,className:`mt-1.5 h-2 w-2 shrink-0 rounded-full ${s}`}),Z(`div`,{className:`min-w-0 flex-1`,children:[X(`p`,{className:`text-sm font-semibold text-wx-fg`,children:l}),u&&X(`p`,{className:`text-xs text-wx-fg-muted`,children:u})]})]}),e.showOperatorAvatars&&t.operatorAvatars.length>0&&X(au,{avatars:t.operatorAvatars,size:`sm`,ringClass:`ring-wx-bg-elevated`})]})}function gd({blocks:e,config:t,onOpenTab:n,onOpenNewsArticle:r,onOpenHelpArticle:i,isDummy:a,chatId:o,onOpenThread:s}){return X(`div`,{className:`flex flex-col gap-3 px-4 pb-2`,children:e.map((e,c)=>X(vd,{delay:Math.min(c,6)*.05,children:X(_d,{block:e,config:t,onOpenTab:n,onOpenNewsArticle:r,onOpenHelpArticle:i,isDummy:a,chatId:o,onOpenThread:s})},`${e.kind}-${c}`))})}function _d({block:e,config:t,onOpenTab:n,onOpenNewsArticle:r,onOpenHelpArticle:i,isDummy:a,chatId:o,onOpenThread:s}){switch(e.kind){case`quick-actions`:return X(od,{block:e,onOpenTab:n});case`help-search`:return X(wu,{block:e,onOpenTab:n,onOpenArticle:i,isDummy:a});case`pinned-articles`:return X(Du,{block:e,onOpenTab:n,onOpenArticle:i,isDummy:a});case`news-preview`:return X(Eu,{block:e,onOpenTab:n,onOpenNewsArticle:r,isDummy:a});case`team-status`:return X(hd,{block:e,config:t});case`rich-text`:return X(dd,{block:e});case`divider`:return X(`hr`,{className:`my-1 border-wx-border`});case`ask-question`:return X(du,{block:e,config:t,onOpenTab:n});case`recent-message`:return X(ud,{block:e,onOpenTab:n,onOpenThread:s,isDummy:a,chatId:o,config:t});case`featured-article`:return X(bu,{block:e,onOpenTab:n,onOpenNewsArticle:r,isDummy:a});default:return null}}function vd({delay:e,children:t,className:n}){return X(o.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.24,delay:e,ease:`easeOut`},className:u(n),children:t})}function yd(e,t){return Array.isArray(e)?e.filter(e=>!(!e||typeof e!=`object`||(e.kind===`help-search`||e.kind===`pinned-articles`)&&!t.help||e.kind===`news-preview`&&!t.news)):[]}function bd(e,t){let n=[],r=[];for(let i of e){let e=oi(i.variants,t);e&&(n.push(e.block),r.push(`${i.id}:${e.id}`))}return{blocks:n,key:r.join(`|`)}}function xd(e){let t=li(),n=Ci(),r=pe(ke(t.capabilities,e.capabilities),`greetingVariants`)?t.slots?.greetingSlot??e.greetingSlot??null:null;return q(()=>{if(!r)return;let e=oi(r.variants,n);return e?{headline:e.headline,subheadline:e.subheadline}:null},[r,n])}function Sd({config:e,organizationLogoUrl:t,onClose:n,onOpenTab:r,isDummy:a,chatId:o,onOpenNewsArticle:s,onOpenHelpArticle:c,onOpenThread:l}){let u=i(`header`),d=fn(),f=li(),p=Ci(),m=f.slots?.homeSlots??e.homeSlots??null,h=q(()=>m?bd(m,p):null,[m,p]),g=yd(h?h.blocks:e.homeLayout??ve,e.features),_=xd(e),v=_===void 0?a||!!e.greeting?.headline?.trim()||!!e.greeting?.subheadline?.trim():!!_?.headline.trim()||!!_?.subheadline.trim();return X(it,{followDirection:!0,className:`flex-1`,children:Z(`div`,{className:`flex flex-col pb-6`,children:[Z(`div`,{className:`flex items-center justify-between px-5 pt-5 pb-3`,children:[t?X(`img`,{src:t,alt:e.messenger?.title??``,className:`h-9 w-auto max-w-[140px] object-contain`}):a?X(ld,{size:28}):X(`span`,{className:`h-9`,"aria-hidden":`true`}),Z(`div`,{className:`flex items-center gap-1`,children:[e.operatorAvatars.length>0&&X(au,{avatars:e.operatorAvatars,ringClass:`ring-wx-bg-elevated/60`,className:`mr-2`}),X(Yt,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":u(`close`),onClick:n,...d.parentHandlers,children:X(It,{ref:d.iconRef,size:18})})]})]}),X(Cd,{config:e,isDummy:a,slotGreeting:_}),X(`div`,{className:v?void 0:`pt-4`,children:X(ml,{enabled:!!h,id:h?.key??``,children:X(gd,{blocks:g,config:e,onOpenTab:r,onOpenNewsArticle:s,onOpenHelpArticle:c,isDummy:a,chatId:o,onOpenThread:l})})})]})})}function Cd({config:e,isDummy:t,slotGreeting:r}){let a=i(`home`),o=n();if(r!==void 0){let e=r?.headline.trim()??``,t=r?.subheadline.trim()??``;return e||t?X(wd,{headline:e,subheadline:t}):null}let s=e.greeting?.headline?.trim()??``,c=e.greeting?.subheadline?.trim()??``,l=!!(s||c);if(!t&&!l)return null;let u=cu(o,e.defaultLocale??`en`),d=l&&u,f=d?s:a(`greetingHeadline`),p=d?c:a(`greetingSubheadline`);return!f&&!p?null:X(wd,{headline:f,subheadline:p})}function wd({headline:e,subheadline:t}){return Z(`section`,{className:`px-5 pt-2 pb-4`,children:[e&&X(`p`,{className:`text-3xl leading-tight font-bold text-wx-fg-muted`,children:e}),t&&X(`p`,{className:`mt-1 text-3xl leading-tight font-bold text-wx-fg`,children:t})]})}var Td=[`#7c5cff`,`#ff6b6b`,`#12b886`,`#f59f00`,`#4dabf7`,`#e64980`],Ed=[120,160,200,140,180,100],Dd=3;function Od(e,t,n,r){let i=`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}"><rect width="100%" height="100%" fill="${r}"/><text x="50%" y="50%" fill="#fff" font-family="sans-serif" font-size="14" text-anchor="middle" dominant-baseline="middle">${e}</text></svg>`;return`data:image/svg+xml,${encodeURIComponent(i)}`}function kd(e,t,n){let r=Ed[n%Ed.length],i=Td[n%Td.length],a=t?`${t} ${n+1}`:e===`STICKER`?`sticker ${n+1}`:`gif ${n+1}`,o=Od(a,220,r,i);return{id:`mock-${e}-${t||`trending`}-${n}`,title:a,previewUrl:o,previewWidth:220,previewHeight:r,sourceUrl:o,mimetype:`image/svg+xml`}}var Ad=15,jd=({type:e,query:t,offset:n})=>{let r=Math.floor(n/Ad),i=Array.from({length:Ad},(r,i)=>kd(e,t,n+i)),a=r<Dd-1;return new Promise(e=>setTimeout(()=>e({items:i,nextOffset:n+Ad,hasNext:a}),250))};async function Md(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let i=r.result;if(typeof i!=`string`){n(Error(`FileReader returned non-string result`));return}let a=i.indexOf(`,`);t({base64:a>=0?i.slice(a+1):i,size:e.size})},r.onerror=()=>n(r.error??Error(`File read failed`)),r.readAsDataURL(e)})}var Nd=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`image/heic`,`image/heif`,`audio/mpeg`,`audio/mp4`,`audio/ogg`,`audio/webm`,`audio/wav`,`video/mp4`,`video/quicktime`,`video/webm`,`video/3gpp`,`application/pdf`]),Pd={png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`,heic:`image/heic`,heif:`image/heif`,mp3:`audio/mpeg`,m4a:`audio/mp4`,ogg:`audio/ogg`,oga:`audio/ogg`,wav:`audio/wav`,weba:`audio/webm`,mp4:`video/mp4`,mov:`video/quicktime`,webm:`video/webm`,"3gp":`video/3gpp`,pdf:`application/pdf`};function Fd(e){return e.type?e.type:Pd[e.name.split(`.`).pop()?.toLowerCase()??``]??``}var Id=(e,t)=>`wexio:slot-thread:${e}:${t}`;function Ld(e,t,n){try{let r=e.getItem(Id(t,n));if(!r)return null;let i=JSON.parse(r)?.variantId;return typeof i==`string`&&i?{slotId:n,variantId:i}:null}catch{return null}}function Rd(e,t,n){if(!Ld(e,t,n.slotId))try{e.setItem(Id(t,n.slotId),JSON.stringify({variantId:n.variantId}))}catch{}}function zd(e){let t=J(e);return Tn(()=>{t.current=e}),G((...e)=>t.current?.(...e),[])}var Bd=`https://accounts.google.com/gsi/client`,Vd=()=>document.querySelector(`script[src="${Bd}"]`);function Hd(){return typeof window>`u`?Promise.reject(Error(`gsi: no window`)):window.google?.accounts?.id?Promise.resolve():new Promise((e,t)=>{let n=Vd()??document.createElement(`script`);n.addEventListener(`load`,()=>e(),{once:!0}),n.addEventListener(`error`,()=>{n.remove(),t(Error(`gsi: script failed to load`))},{once:!0}),n.isConnected||(n.src=Bd,n.async=!0,n.defer=!0,document.head.appendChild(n))})}function Ud({clientId:e,onCredential:t}){let n=i(`messages`),r=J(null),[a,o]=Y(`loading`),[s,c]=Y(0),l=J(t);return K(()=>{l.current=t},[t]),K(()=>{if(typeof window>`u`)return;let t=!1;o(`loading`);let n=()=>{let t=window.google?.accounts?.id,n=r.current;if(!t||!n){o(`error`);return}t.initialize({client_id:e,callback:e=>{e?.credential&&l.current(e.credential)},auto_select:!1,cancel_on_tap_outside:!0,ux_mode:`popup`}),n.replaceChildren(),t.renderButton(n,{type:`standard`,theme:`outline`,size:`large`,width:200}),o(`ready`)};return Hd().then(()=>{t||n()},()=>{t||o(`error`)}),()=>{t=!0}},[e,s]),Z(Dn,{children:[Z(`button`,{type:`button`,onClick:()=>{if(a===`error`){c(e=>e+1);return}let e=r.current;if(!e)return;let t=e.querySelector(`div[role="button"]`);if(!t){o(`error`);return}t.click()},disabled:a===`loading`,"aria-busy":a===`loading`,className:`flex w-full items-center justify-center gap-2 rounded-wx border border-wx-border bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated-2 disabled:opacity-60`,children:[X(Wd,{}),X(`span`,{children:n(`googleSignIn`)})]}),a===`error`&&X(`p`,{role:`alert`,className:`text-center text-xs text-wx-danger`,children:n(`googleUnavailable`)}),X(`div`,{ref:r,"aria-hidden":`true`,style:{position:`absolute`,width:1,height:1,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,whiteSpace:`nowrap`}})]})}function Wd(){return Z(`svg`,{width:`16`,height:`16`,viewBox:`0 0 18 18`,"aria-hidden":`true`,children:[X(`path`,{d:`M17.64 9.205c0-.639-.057-1.252-.164-1.841H9v3.481h4.844a4.14 4.14 0 0 1-1.796 2.716v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.614z`,fill:`#4285F4`}),X(`path`,{d:`M9 18c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332A8.997 8.997 0 0 0 9 18z`,fill:`#34A853`}),X(`path`,{d:`M3.964 10.71A5.41 5.41 0 0 1 3.682 9c0-.593.102-1.17.282-1.71V4.958H.957A8.996 8.996 0 0 0 0 9c0 1.452.348 2.827.957 4.042l3.007-2.332z`,fill:`#FBBC05`}),X(`path`,{d:`M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0A8.997 8.997 0 0 0 .957 4.958L3.964 7.29C4.672 5.163 6.656 3.58 9 3.58z`,fill:`#EA4335`})]})}function Gd(e){return new TextEncoder().encode(e)}function Kd(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function qd(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function Jd(){return window?.PublicKeyCredential!==void 0&&typeof window.PublicKeyCredential==`function`}function Yd(e){let{id:t}=e;return{...e,id:qd(t),transports:e.transports}}function Xd(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var Zd=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),this.name=r??n.name,this.code=t}};function Qd({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Zd({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new Zd({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new Zd({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new Zd({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Zd({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new Zd({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Zd({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!Xd(t))return new Zd({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Zd({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Zd({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new Zd({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var $d=new class{createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},ef=[`cross-platform`,`platform`];function tf(e){if(e&&!(ef.indexOf(e)<0))return e}async function nf(e){if(!Jd())throw Error(`WebAuthn is not supported in this browser`);let t={publicKey:{...e,challenge:qd(e.challenge),user:{...e.user,id:Gd(e.user.id)},excludeCredentials:e.excludeCredentials?.map(Yd)}};t.signal=$d.createNewAbortSignal();let n;try{n=await navigator.credentials.create(t)}catch(e){throw Qd({error:e,options:t})}if(!n)throw Error(`Registration was not completed`);let{id:r,rawId:i,response:a,type:o}=n,s;typeof a.getTransports==`function`&&(s=a.getTransports());let c;if(typeof a.getPublicKeyAlgorithm==`function`)try{c=a.getPublicKeyAlgorithm()}catch(e){rf(`getPublicKeyAlgorithm()`,e)}let l;if(typeof a.getPublicKey==`function`)try{let e=a.getPublicKey();e!==null&&(l=Kd(e))}catch(e){rf(`getPublicKey()`,e)}let u;if(typeof a.getAuthenticatorData==`function`)try{u=Kd(a.getAuthenticatorData())}catch(e){rf(`getAuthenticatorData()`,e)}return{id:r,rawId:Kd(i),response:{attestationObject:Kd(a.attestationObject),clientDataJSON:Kd(a.clientDataJSON),transports:s,publicKeyAlgorithm:c,publicKey:l,authenticatorData:u},type:o,clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:tf(n.authenticatorAttachment)}}function rf(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function af(e){return new TextDecoder(`utf-8`).decode(e)}function of(){let e=window.PublicKeyCredential;return e.isConditionalMediationAvailable===void 0?new Promise(e=>e(!1)):e.isConditionalMediationAvailable()}function sf({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Zd({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Zd({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!Xd(t))return new Zd({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Zd({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new Zd({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function cf(e,t=!1){if(!Jd())throw Error(`WebAuthn is not supported in this browser`);let n;e.allowCredentials?.length!==0&&(n=e.allowCredentials?.map(Yd));let r={...e,challenge:qd(e.challenge),allowCredentials:n},i={};if(t){if(!await of())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');i.mediation=`conditional`,r.allowCredentials=[]}i.publicKey=r,i.signal=$d.createNewAbortSignal();let a;try{a=await navigator.credentials.get(i)}catch(e){throw sf({error:e,options:i})}if(!a)throw Error(`Authentication was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;return c.userHandle&&(u=af(c.userHandle)),{id:o,rawId:Kd(s),response:{authenticatorData:Kd(c.authenticatorData),clientDataJSON:Kd(c.clientDataJSON),signature:Kd(c.signature),userHandle:u},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:tf(a.authenticatorAttachment)}}var lf=Me`
|
|
96
96
|
mutation VisitorPasskeyRegistrationOptions($input: VisitorPasskeyOptionsInput!) {
|
|
97
97
|
visitorPasskeyRegistrationOptions(input: $input) {
|
|
98
98
|
sessionId
|
|
99
99
|
optionsJson
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
`,
|
|
102
|
+
`,uf=Me`
|
|
103
103
|
mutation VerifyVisitorPasskeyRegistration($input: VisitorPasskeyVerifyInput!) {
|
|
104
104
|
verifyVisitorPasskeyRegistration(input: $input) {
|
|
105
105
|
token
|
|
@@ -111,14 +111,14 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
111
111
|
shortHandle
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
`,
|
|
114
|
+
`,df=Me`
|
|
115
115
|
mutation VisitorPasskeyAuthenticationOptions($input: VisitorPasskeyOptionsInput!) {
|
|
116
116
|
visitorPasskeyAuthenticationOptions(input: $input) {
|
|
117
117
|
sessionId
|
|
118
118
|
optionsJson
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
`,
|
|
121
|
+
`,ff=Me`
|
|
122
122
|
mutation VerifyVisitorPasskeyAuthentication($input: VisitorPasskeyVerifyInput!) {
|
|
123
123
|
verifyVisitorPasskeyAuthentication(input: $input) {
|
|
124
124
|
token
|
|
@@ -130,14 +130,14 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
130
130
|
shortHandle
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
`;function Wd(e){let t=I(),[n,r]=Y(`idle`),[i,a]=Y(null),[o]=v(Bd),[s]=v(Vd),[c]=v(Hd),[l]=v(Ud),u=G(async n=>{r(`busy`),a(null);try{let i={visitorId:e.visitorId,origin:e.origin},a=n===`register`?(await o({variables:{input:i}})).data?.visitorPasskeyRegistrationOptions:(await c({variables:{input:i}})).data?.visitorPasskeyAuthenticationOptions;if(!a)throw Error(`passkey_options_failed`);let u=JSON.parse(a.optionsJson),d=n===`register`?await Pd(u):await zd(u),f={visitorId:e.visitorId,sessionId:a.sessionId,responseJson:JSON.stringify(d)},p=n===`register`?(await s({variables:{input:f}})).data?.verifyVisitorPasskeyRegistration:(await l({variables:{input:f}})).data?.verifyVisitorPasskeyAuthentication;if(!p)throw Error(`passkey_verify_failed`);return t.token=p.token,r(`idle`),p}catch(e){return r(`error`),a(e.message||`passkey_failed`),null}},[e.visitorId,e.origin,o,s,c,l,t]);return{authenticate:G(()=>u(`authenticate`),[u]),register:G(()=>u(`register`),[u]),status:n,error:i,supported:typeof window<`u`&&Ed()}}function Gd({onSession:e}){let t=i(`messages`),n=I(),r=n.publicKey,{authenticate:a,register:o,status:s,supported:c}=Wd({visitorId:q(()=>Ga(r,n.storage),[r,n.storage]),origin:typeof window<`u`?window.location.origin:``}),[l,u]=Y(null);if(!c)return null;let d=async(t,n)=>{u(null);let r=await n();r?e?.(r):u(t)},f=s===`busy`;return Z(`div`,{className:`flex w-full flex-col items-center gap-1.5`,children:[Z(`button`,{type:`button`,disabled:f,onClick:()=>d(`signIn`,a),className:`flex w-full items-center justify-center gap-2 rounded-wx border border-wx-border bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated-2 disabled:opacity-60`,children:[X(Kd,{}),t(`passkeySignIn`)]}),X(`button`,{type:`button`,disabled:f,onClick:()=>d(`register`,o),className:l===`signIn`?`flex w-full items-center justify-center gap-2 rounded-wx border border-wx-primary bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-primary transition-colors hover:bg-wx-bg-elevated-2 disabled:opacity-60`:`text-xs text-wx-fg-muted underline-offset-2 hover:underline disabled:opacity-60`,children:t(`passkeyRegister`)}),l===`signIn`&&X(`p`,{className:`text-center text-xs text-wx-fg-subtle`,children:t(`passkeyNoCredential`)}),l===`register`&&X(`p`,{className:`text-center text-xs text-wx-danger`,children:t(`passkeyError`)})]})}function Kd(){return Z(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`circle`,{cx:`8`,cy:`9`,r:`4`}),X(`path`,{d:`M10.5 12.5 21 23l-1.5-3 2-1-2-1.5L21 14l-4-1`})]})}var qd=e=>e.startsWith(`image/`),Jd=e=>e.startsWith(`video/`),Yd=e=>e.startsWith(`audio/`),Xd=e=>e===`application/pdf`;function Zd({attachments:e,onRemove:t,onOpenLightbox:n}){let r=i(`messages`),a=J(null),[o,s]=Y(null);K(()=>{o&&(e.some(e=>e.tempId===o)||(a.current?.pause(),a.current=null,s(null)))},[e,o]),K(()=>()=>{a.current?.pause(),a.current=null},[]);let c=e=>{if(!e.url)return;if(o===e.tempId){a.current?.pause(),s(null);return}a.current?.pause();let t=new Audio(e.url);t.onended=()=>{s(t=>t===e.tempId?null:t)},t.play().catch(()=>s(null)),a.current=t,s(e.tempId)},l=e.filter(e=>!!e.url&&(qd(e.mimetype)||Jd(e.mimetype)||Xd(e.mimetype))),d=l.map(e=>({url:e.url,mimetype:e.mimetype,alt:e.filename})),f=e=>{let t=l.findIndex(t=>t.tempId===e.tempId);t<0||n(d,t)};return X(`div`,{className:`flex flex-wrap gap-2`,children:e.map(e=>{let n=e.uploading===!0,i=r(`removeAttachment`);if(qd(e.mimetype)&&e.url)return X(Qd,{uploading:n,onRemove:()=>t(e.tempId),removeLabel:i,title:e.filename,children:X(`button`,{type:`button`,onClick:()=>f(e),className:`block h-16 w-16 overflow-hidden rounded-wx-sm bg-wx-bg-elevated`,"aria-label":r(`openPreview`),children:X(`img`,{src:e.url,alt:e.filename,className:`h-full w-full object-cover`})})},e.tempId);if(Jd(e.mimetype)&&e.url)return X(Qd,{uploading:n,onRemove:()=>t(e.tempId),removeLabel:i,title:e.filename,children:Z(`button`,{type:`button`,onClick:()=>f(e),className:`relative block h-16 w-16 overflow-hidden rounded-wx-sm bg-wx-bg-elevated`,"aria-label":r(`openPreview`),children:[X(`video`,{src:e.url,className:`h-full w-full object-cover`,muted:!0,playsInline:!0,preload:`metadata`}),X(`span`,{className:`absolute inset-0 flex items-center justify-center bg-black/30 text-white`,children:X(Hs,{size:16,fill:`currentColor`})})]})},e.tempId);if(Yd(e.mimetype)&&e.url){let a=o===e.tempId,s=a?Bs:Hs;return X(Qd,{uploading:n,onRemove:()=>t(e.tempId),removeLabel:i,title:e.filename,children:X(`button`,{type:`button`,onClick:()=>c(e),"aria-label":r(a?`pause`:`play`),className:u(`flex h-16 w-16 items-center justify-center rounded-wx-sm transition-colors`,a?`bg-wx-primary text-wx-primary-fg`:`bg-wx-bg-elevated text-wx-fg-muted hover:text-wx-fg`),children:X(s,{size:22,fill:`currentColor`,strokeWidth:0})})},e.tempId)}return Xd(e.mimetype)&&e.url?X(Qd,{uploading:n,onRemove:()=>t(e.tempId),removeLabel:i,title:e.filename,children:X(`button`,{type:`button`,onClick:()=>f(e),"aria-label":r(`openPreview`),className:u(`flex h-16 w-16 items-center justify-center rounded-wx-sm`,`bg-wx-bg-elevated text-wx-fg-muted transition-colors hover:text-wx-fg`),children:X(xs,{size:22,"aria-hidden":`true`})})},e.tempId):X(Qd,{uploading:n,onRemove:()=>t(e.tempId),removeLabel:i,title:e.filename,children:X(`div`,{className:`flex h-16 w-16 items-center justify-center rounded-wx-sm bg-wx-bg-elevated text-wx-fg-muted`,children:X(xs,{size:22,"aria-hidden":`true`})})},e.tempId)})})}function Qd({children:e,uploading:t,onRemove:n,removeLabel:r,title:i}){return Z(`div`,{className:`relative`,title:i,children:[e,t&&X(`span`,{"aria-hidden":`true`,className:u(`pointer-events-none absolute inset-0 flex items-center justify-center`,`rounded-wx-sm bg-black/30`),children:X(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent`})}),X(`button`,{type:`button`,onClick:n,"aria-label":r,className:u(`absolute -top-1.5 -right-1.5 flex h-5 w-5 items-center justify-center`,`rounded-full bg-wx-bg text-wx-fg-muted shadow ring-1 ring-wx-border`,`transition-colors hover:text-wx-fg`),children:X(At,{size:11})})]})}var $d=4e3;$d-500;function ef(e){let t=e??{text:``,html:``},n=new Set;return{get:()=>t,set(e,r){if(!(t.text===e&&t.html===r)){t={text:e,html:r};for(let e of[...n])e()}},subscribe(e){return n.add(e),()=>{n.delete(e)}}}}function tf(e,t){return Cn(e.subscribe,()=>t(e.get()),()=>t(e.get()))}function nf({kind:e,disabled:t,onSend:n,onMic:r,ariaLabels:i}){let a=e===`send`?n:r,s=i[e],c=ln();return X(o.button,{type:`button`,onClick:a,disabled:t&&e===`send`,"aria-label":s,whileHover:{scale:1.08},whileTap:{scale:.9},transition:{type:`spring`,stiffness:400,damping:22},...e===`mic`?c.parentHandlers:{},className:u(`flex h-8 w-8 items-center justify-center rounded-full transition-colors`,`bg-wx-primary text-wx-primary-fg hover:bg-wx-primary-hover`,`disabled:opacity-50`),children:Z(kt,{mode:`wait`,initial:!1,children:[e===`send`&&t&&X(o.span,{initial:{opacity:0,scale:.6},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{duration:.14},children:X(js,{size:14,className:`animate-spin`})},`sending`),e===`send`&&!t&&X(o.span,{initial:{opacity:0,scale:.6,rotate:-30},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.6,rotate:30},transition:{duration:.14},children:X(cn,{size:14})},`send`),e===`mic`&&X(o.span,{initial:{opacity:0,scale:.6},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{duration:.14},children:X(jt,{ref:c.iconRef,size:14})},`mic`)]})})}function rf({draft:e,hasAttachments:t,busy:n,onSend:r,onMic:i,ariaLabels:a}){let o=tf(e,e=>e.text.trim().length>0),s=tf(e,e=>e.text.length>=3500?e.text.length:0),c=tf(e,e=>e.text.length>$d);return Z(`div`,{className:`flex items-center gap-2`,children:[s>0&&Z(`span`,{className:u(`text-[11px] tabular-nums`,c?`text-wx-danger`:`text-wx-fg-subtle`),children:[s,`/`,4e3]}),X(nf,{kind:o||t?`send`:`mic`,disabled:n||c,onSend:r,onMic:i,ariaLabels:a})]})}var af={text:``,html:``},of=M;function sf(e,t){return`${e??``}\u0000${t??`main`}`}function cf(e,t=of){return t.get(e)??af}function lf(e,t,n=of){return e.subscribe(()=>{let r=e.get();r.text===``&&r.html===``?n.delete(t):n.set(t,r)})}function uf(e=of){e.clear()}var df=[[`suggested`,`suggested`],[`smileys_people`,`smileysPeople`],[`animals_nature`,`animalsNature`],[`food_drink`,`foodDrink`],[`travel_places`,`travelPlaces`],[`activities`,`activities`],[`objects`,`objects`],[`symbols`,`symbols`],[`flags`,`flags`]];function ff(e){return df.map(([t,n])=>({category:t,name:e(`emojiCategories.${n}`)}))}var pf=Nr(`emoji-picker`,()=>import(`./widget-react-1a5mHYv6.js`)),mf=`native`,hf={"--epr-bg-color":`var(--wx-bg)`,"--epr-category-label-bg-color":`var(--wx-bg)`,"--epr-reactions-bg-color":`var(--wx-bg-elevated)`,"--epr-picker-border-color":`var(--wx-border)`,"--epr-picker-border-radius":`var(--wx-radius-lg, 12px)`,"--epr-text-color":`var(--wx-fg)`,"--epr-category-label-text-color":`var(--wx-fg-muted)`,"--epr-hover-bg-color":`var(--wx-bg-elevated)`,"--epr-focus-bg-color":`var(--wx-bg-elevated-2)`,"--epr-highlight-color":`var(--wx-primary)`,"--epr-category-icon-active-color":`var(--wx-primary)`,"--epr-search-input-bg-color":`var(--wx-bg-elevated)`,"--epr-search-input-bg-color-active":`var(--wx-bg-elevated)`,"--epr-search-input-text-color":`var(--wx-fg)`,"--epr-search-input-placeholder-color":`var(--wx-fg-muted)`,"--epr-search-border-color":`var(--wx-border)`,"--epr-search-border-color-active":`var(--wx-primary)`,"--epr-search-input-border-radius":`var(--wx-radius, 8px)`,"--epr-emoji-size":`22px`,"--epr-emoji-fullsize":`30px`,"--epr-emoji-padding":`4px`,"--epr-category-padding":`4px`,"--epr-category-navigation-button-size":`22px`,"--epr-category-label-height":`26px`,"--epr-header-padding":`6px`,"--epr-search-input-height":`30px`,"--epr-search-input-padding":`0 32px 0 34px`,"--epr-horizontal-padding":`8px`};function gf({open:e,onClose:t,onSelect:n,anchorRef:r}){let a=i(`messages`),s=q(()=>ff(a),[a]),c=J(null);return K(()=>{if(!e)return;let n=e=>{let n=e.composedPath();c.current&&n.includes(c.current)||r?.current&&n.includes(r.current)||t()},i=e=>{e.key===`Escape`&&(t(),r?.current?.focus({preventScroll:!0}),sn(r?.current))};return document.addEventListener(`mousedown`,n),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,n),document.removeEventListener(`keydown`,i)}},[e,t,r]),X(kt,{children:e&&X(o.div,{ref:c,initial:{opacity:0,y:6,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:6,scale:.96},transition:{duration:.14,ease:`easeOut`},className:u(`absolute bottom-full left-3 z-20 mb-2 origin-bottom-left`,`overflow-hidden rounded-wx-lg shadow-lg`,`[&_.epr-btn-clear-search:hover]:!bg-wx-bg-elevated-2`,`[&_.epr-btn-clear-search:focus]:!bg-wx-bg-elevated-2`),role:`dialog`,"aria-label":a(`emojiPicker`),children:X(mn,{fallback:X(`div`,{className:`bg-wx-bg flex items-center justify-center`,style:{width:320,height:360},children:X(`div`,{className:`border-wx-border border-t-wx-primary h-5 w-5 animate-spin rounded-full border-2`})}),children:X(pf,{onEmojiClick:e=>n(e.emoji),width:320,height:360,emojiStyle:mf,previewConfig:{showPreview:!1},skinTonesDisabled:!0,lazyLoadEmojis:!0,categories:s,searchPlaceHolder:a(`emojiSearch`),style:hf})})})})}function _f(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function vf(e){let t=e.trim();return t?/^(https?:|mailto:|tel:)/i.test(t)?t:/^[a-z][a-z0-9+.-]*:/i.test(t)?null:t:null}var yf=``;function bf(e){let t=[],n=e.replace(/`([^`\n]+)`/g,(e,n)=>(t.push(`<code>${_f(n)}</code>`),`${yf}${t.length-1}${yf}`));return n=_f(n),n=n.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g,(e,t,n)=>{let r=vf(n);return r?`<a href="${_f(r)}">${t}</a>`:t}),n=n.replace(/\*\*([^\n]+?)\*\*/g,`<strong>$1</strong>`).replace(/__([^\n]+?)__/g,`<strong>$1</strong>`).replace(/~~([^\n]+?)~~/g,`<s>$1</s>`).replace(/(^|[^*])\*(?!\s)([^*\n]+?)\*(?!\*)/g,`$1<em>$2</em>`).replace(/(^|[^_])_(?!\s)([^_\n]+?)_(?!_)/g,`$1<em>$2</em>`),n=n.replace(RegExp(`${yf}(\\d+)${yf}`,`g`),(e,n)=>t[Number(n)]??``),n}function xf(e){if(!e.trim())return``;let t=e.replace(/\r\n?/g,`
|
|
133
|
+
`;function pf(e){let t=he(),[n,r]=Y(`idle`),[i,a]=Y(null),[o]=pt(lf),[s]=pt(uf),[c]=pt(df),[l]=pt(ff),u=G(async n=>{r(`busy`),a(null);try{let i={visitorId:e.visitorId,origin:e.origin},a=n===`register`?(await o({variables:{input:i}})).data?.visitorPasskeyRegistrationOptions:(await c({variables:{input:i}})).data?.visitorPasskeyAuthenticationOptions;if(!a)throw Error(`passkey_options_failed`);let u=JSON.parse(a.optionsJson),d=n===`register`?await nf(u):await cf(u),f={visitorId:e.visitorId,sessionId:a.sessionId,responseJson:JSON.stringify(d)},p=n===`register`?(await s({variables:{input:f}})).data?.verifyVisitorPasskeyRegistration:(await l({variables:{input:f}})).data?.verifyVisitorPasskeyAuthentication;if(!p)throw Error(`passkey_verify_failed`);return t.token=p.token,r(`idle`),p}catch(e){return r(`error`),a(e.message||`passkey_failed`),null}},[e.visitorId,e.origin,o,s,c,l,t]);return{authenticate:G(()=>u(`authenticate`),[u]),register:G(()=>u(`register`),[u]),status:n,error:i,supported:typeof window<`u`&&Jd()}}function mf({onSession:e}){let t=i(`messages`),n=he(),r=n.publicKey,{authenticate:a,register:o,status:s,supported:c}=pf({visitorId:q(()=>ro(r,n.storage),[r,n.storage]),origin:typeof window<`u`?window.location.origin:``}),[l,u]=Y(null);if(!c)return null;let d=async(t,n)=>{u(null);let r=await n();r?e?.(r):u(t)},f=s===`busy`;return Z(`div`,{className:`flex w-full flex-col items-center gap-1.5`,children:[Z(`button`,{type:`button`,disabled:f,onClick:()=>d(`signIn`,a),className:`flex w-full items-center justify-center gap-2 rounded-wx border border-wx-border bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated-2 disabled:opacity-60`,children:[X(hf,{}),t(`passkeySignIn`)]}),X(`button`,{type:`button`,disabled:f,onClick:()=>d(`register`,o),className:l===`signIn`?`flex w-full items-center justify-center gap-2 rounded-wx border border-wx-primary bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-primary transition-colors hover:bg-wx-bg-elevated-2 disabled:opacity-60`:`text-xs text-wx-fg-muted underline-offset-2 hover:underline disabled:opacity-60`,children:t(`passkeyRegister`)}),l===`signIn`&&X(`p`,{className:`text-center text-xs text-wx-fg-subtle`,children:t(`passkeyNoCredential`)}),l===`register`&&X(`p`,{className:`text-center text-xs text-wx-danger`,children:t(`passkeyError`)})]})}function hf(){return Z(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[X(`circle`,{cx:`8`,cy:`9`,r:`4`}),X(`path`,{d:`M10.5 12.5 21 23l-1.5-3 2-1-2-1.5L21 14l-4-1`})]})}var gf=e=>e.startsWith(`image/`),_f=e=>e.startsWith(`video/`),vf=e=>e.startsWith(`audio/`),yf=e=>e===`application/pdf`;function bf({attachments:e,onRemove:t,onOpenLightbox:n}){let r=i(`messages`),a=J(null),[o,s]=Y(null);K(()=>{o&&(e.some(e=>e.tempId===o)||(a.current?.pause(),a.current=null,s(null)))},[e,o]),K(()=>()=>{a.current?.pause(),a.current=null},[]);let c=e=>{if(!e.url)return;if(o===e.tempId){a.current?.pause(),s(null);return}a.current?.pause();let t=new Audio(e.url);t.onended=()=>{s(t=>t===e.tempId?null:t)},t.play().catch(()=>s(null)),a.current=t,s(e.tempId)},l=e.filter(e=>!!e.url&&(gf(e.mimetype)||_f(e.mimetype)||yf(e.mimetype))),d=l.map(e=>({url:e.url,mimetype:e.mimetype,alt:e.filename})),f=e=>{let t=l.findIndex(t=>t.tempId===e.tempId);t<0||n(d,t)};return X(`div`,{className:`flex flex-wrap gap-2`,children:e.map(e=>{let n=e.uploading===!0,i=r(`removeAttachment`);if(gf(e.mimetype)&&e.url)return X(xf,{uploading:n,onRemove:()=>t(e.tempId),removeLabel:i,title:e.filename,children:X(`button`,{type:`button`,onClick:()=>f(e),className:`block h-16 w-16 overflow-hidden rounded-wx-sm bg-wx-bg-elevated`,"aria-label":r(`openPreview`),children:X(`img`,{src:e.url,alt:e.filename,className:`h-full w-full object-cover`})})},e.tempId);if(_f(e.mimetype)&&e.url)return X(xf,{uploading:n,onRemove:()=>t(e.tempId),removeLabel:i,title:e.filename,children:Z(`button`,{type:`button`,onClick:()=>f(e),className:`relative block h-16 w-16 overflow-hidden rounded-wx-sm bg-wx-bg-elevated`,"aria-label":r(`openPreview`),children:[X(`video`,{src:e.url,className:`h-full w-full object-cover`,muted:!0,playsInline:!0,preload:`metadata`}),X(`span`,{className:`absolute inset-0 flex items-center justify-center bg-black/30 text-white`,children:X(Zs,{size:16,fill:`currentColor`})})]})},e.tempId);if(vf(e.mimetype)&&e.url){let a=o===e.tempId,s=a?Ys:Zs;return X(xf,{uploading:n,onRemove:()=>t(e.tempId),removeLabel:i,title:e.filename,children:X(`button`,{type:`button`,onClick:()=>c(e),"aria-label":r(a?`pause`:`play`),className:u(`flex h-16 w-16 items-center justify-center rounded-wx-sm transition-colors`,a?`bg-wx-primary text-wx-primary-fg`:`bg-wx-bg-elevated text-wx-fg-muted hover:text-wx-fg`),children:X(s,{size:22,fill:`currentColor`,strokeWidth:0})})},e.tempId)}return yf(e.mimetype)&&e.url?X(xf,{uploading:n,onRemove:()=>t(e.tempId),removeLabel:i,title:e.filename,children:X(`button`,{type:`button`,onClick:()=>f(e),"aria-label":r(`openPreview`),className:u(`flex h-16 w-16 items-center justify-center rounded-wx-sm`,`bg-wx-bg-elevated text-wx-fg-muted transition-colors hover:text-wx-fg`),children:X(Os,{size:22,"aria-hidden":`true`})})},e.tempId):X(xf,{uploading:n,onRemove:()=>t(e.tempId),removeLabel:i,title:e.filename,children:X(`div`,{className:`flex h-16 w-16 items-center justify-center rounded-wx-sm bg-wx-bg-elevated text-wx-fg-muted`,children:X(Os,{size:22,"aria-hidden":`true`})})},e.tempId)})})}function xf({children:e,uploading:t,onRemove:n,removeLabel:r,title:i}){return Z(`div`,{className:`relative`,title:i,children:[e,t&&X(`span`,{"aria-hidden":`true`,className:u(`pointer-events-none absolute inset-0 flex items-center justify-center`,`rounded-wx-sm bg-black/30`),children:X(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent`})}),X(`button`,{type:`button`,onClick:n,"aria-label":r,className:u(`absolute -top-1.5 -right-1.5 flex h-5 w-5 items-center justify-center`,`rounded-full bg-wx-bg text-wx-fg-muted shadow ring-1 ring-wx-border`,`transition-colors hover:text-wx-fg`),children:X(Nt,{size:11})})]})}var Sf=4e3;Sf-500;function Cf(e){let t=e??{text:``,html:``},n=new Set;return{get:()=>t,set(e,r){if(!(t.text===e&&t.html===r)){t={text:e,html:r};for(let e of[...n])e()}},subscribe(e){return n.add(e),()=>{n.delete(e)}}}}function wf(e,t){return En(e.subscribe,()=>t(e.get()),()=>t(e.get()))}function Tf({kind:e,disabled:t,onSend:n,onMic:r,ariaLabels:i}){let a=e===`send`?n:r,s=i[e],c=fn();return X(o.button,{type:`button`,onClick:a,disabled:t&&e===`send`,"aria-label":s,whileHover:{scale:1.08},whileTap:{scale:.9},transition:{type:`spring`,stiffness:400,damping:22},...e===`mic`?c.parentHandlers:{},className:u(`flex h-8 w-8 items-center justify-center rounded-full transition-colors`,`bg-wx-primary text-wx-primary-fg hover:bg-wx-primary-hover`,`disabled:opacity-50`),children:Z(Mt,{mode:`wait`,initial:!1,children:[e===`send`&&t&&X(o.span,{initial:{opacity:0,scale:.6},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{duration:.14},children:X(zs,{size:14,className:`animate-spin`})},`sending`),e===`send`&&!t&&X(o.span,{initial:{opacity:0,scale:.6,rotate:-30},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.6,rotate:30},transition:{duration:.14},children:X(dn,{size:14})},`send`),e===`mic`&&X(o.span,{initial:{opacity:0,scale:.6},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{duration:.14},children:X(Pt,{ref:c.iconRef,size:14})},`mic`)]})})}function Ef({draft:e,hasAttachments:t,busy:n,onSend:r,onMic:i,ariaLabels:a}){let o=wf(e,e=>e.text.trim().length>0),s=wf(e,e=>e.text.length>=3500?e.text.length:0),c=wf(e,e=>e.text.length>Sf);return Z(`div`,{className:`flex items-center gap-2`,children:[s>0&&Z(`span`,{className:u(`text-[11px] tabular-nums`,c?`text-wx-danger`:`text-wx-fg-subtle`),children:[s,`/`,4e3]}),X(Tf,{kind:o||t?`send`:`mic`,disabled:n||c,onSend:r,onMic:i,ariaLabels:a})]})}var Df={text:``,html:``},Of=De;function kf(e,t){return`${e??``}\u0000${t??`main`}`}function Af(e,t=Of){return t.get(e)??Df}function jf(e,t,n=Of){return e.subscribe(()=>{let r=e.get();r.text===``&&r.html===``?n.delete(t):n.set(t,r)})}function Mf(e=Of){e.clear()}var Nf=[[`suggested`,`suggested`],[`smileys_people`,`smileysPeople`],[`animals_nature`,`animalsNature`],[`food_drink`,`foodDrink`],[`travel_places`,`travelPlaces`],[`activities`,`activities`],[`objects`,`objects`],[`symbols`,`symbols`],[`flags`,`flags`]];function Pf(e){return Nf.map(([t,n])=>({category:t,name:e(`emojiCategories.${n}`)}))}var Ff=Ir(`emoji-picker`,()=>import(`./widget-react-1a5mHYv6.js`)),If=`native`,Lf={"--epr-bg-color":`var(--wx-bg)`,"--epr-category-label-bg-color":`var(--wx-bg)`,"--epr-reactions-bg-color":`var(--wx-bg-elevated)`,"--epr-picker-border-color":`var(--wx-border)`,"--epr-picker-border-radius":`var(--wx-radius-lg, 12px)`,"--epr-text-color":`var(--wx-fg)`,"--epr-category-label-text-color":`var(--wx-fg-muted)`,"--epr-hover-bg-color":`var(--wx-bg-elevated)`,"--epr-focus-bg-color":`var(--wx-bg-elevated-2)`,"--epr-highlight-color":`var(--wx-primary)`,"--epr-category-icon-active-color":`var(--wx-primary)`,"--epr-search-input-bg-color":`var(--wx-bg-elevated)`,"--epr-search-input-bg-color-active":`var(--wx-bg-elevated)`,"--epr-search-input-text-color":`var(--wx-fg)`,"--epr-search-input-placeholder-color":`var(--wx-fg-muted)`,"--epr-search-border-color":`var(--wx-border)`,"--epr-search-border-color-active":`var(--wx-primary)`,"--epr-search-input-border-radius":`var(--wx-radius, 8px)`,"--epr-emoji-size":`22px`,"--epr-emoji-fullsize":`30px`,"--epr-emoji-padding":`4px`,"--epr-category-padding":`4px`,"--epr-category-navigation-button-size":`22px`,"--epr-category-label-height":`26px`,"--epr-header-padding":`6px`,"--epr-search-input-height":`30px`,"--epr-search-input-padding":`0 32px 0 34px`,"--epr-horizontal-padding":`8px`};function Rf({open:e,onClose:t,onSelect:n,anchorRef:r}){let a=i(`messages`),s=q(()=>Pf(a),[a]),c=J(null);return K(()=>{if(!e)return;let n=e=>{let n=e.composedPath();c.current&&n.includes(c.current)||r?.current&&n.includes(r.current)||t()},i=e=>{e.key===`Escape`&&(t(),r?.current?.focus({preventScroll:!0}),un(r?.current))};return document.addEventListener(`mousedown`,n),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,n),document.removeEventListener(`keydown`,i)}},[e,t,r]),X(Mt,{children:e&&X(o.div,{ref:c,initial:{opacity:0,y:6,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:6,scale:.96},transition:{duration:.14,ease:`easeOut`},className:u(`absolute bottom-full left-3 z-20 mb-2 origin-bottom-left`,`overflow-hidden rounded-wx-lg shadow-lg`,`[&_.epr-btn-clear-search:hover]:!bg-wx-bg-elevated-2`,`[&_.epr-btn-clear-search:focus]:!bg-wx-bg-elevated-2`),role:`dialog`,"aria-label":a(`emojiPicker`),children:X(_n,{fallback:X(`div`,{className:`bg-wx-bg flex items-center justify-center`,style:{width:320,height:360},children:X(`div`,{className:`border-wx-border border-t-wx-primary h-5 w-5 animate-spin rounded-full border-2`})}),children:X(Ff,{onEmojiClick:e=>n(e.emoji),width:320,height:360,emojiStyle:If,previewConfig:{showPreview:!1},skinTonesDisabled:!0,lazyLoadEmojis:!0,categories:s,searchPlaceHolder:a(`emojiSearch`),style:Lf})})})})}function zf(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function Bf(e){let t=e.trim();return t?/^(https?:|mailto:|tel:)/i.test(t)?t:/^[a-z][a-z0-9+.-]*:/i.test(t)?null:t:null}var Vf=``;function Hf(e){let t=[],n=e.replace(/`([^`\n]+)`/g,(e,n)=>(t.push(`<code>${zf(n)}</code>`),`${Vf}${t.length-1}${Vf}`));return n=zf(n),n=n.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g,(e,t,n)=>{let r=Bf(n);return r?`<a href="${zf(r)}">${t}</a>`:t}),n=n.replace(/\*\*([^\n]+?)\*\*/g,`<strong>$1</strong>`).replace(/__([^\n]+?)__/g,`<strong>$1</strong>`).replace(/~~([^\n]+?)~~/g,`<s>$1</s>`).replace(/(^|[^*])\*(?!\s)([^*\n]+?)\*(?!\*)/g,`$1<em>$2</em>`).replace(/(^|[^_])_(?!\s)([^_\n]+?)_(?!_)/g,`$1<em>$2</em>`),n=n.replace(RegExp(`${Vf}(\\d+)${Vf}`,`g`),(e,n)=>t[Number(n)]??``),n}function Uf(e){if(!e.trim())return``;let t=e.replace(/\r\n?/g,`
|
|
134
134
|
`).split(`
|
|
135
|
-
`),n=[],r=[],i=()=>{r.length!==0&&(n.push({kind:`p`,html:r.map(bf).join(`<br>`)}),r=[])};for(let e of t){let t=e.replace(/\s+$/,``);if(!t.trim()){i();continue}if(/^\s*```/.test(t))continue;let a=/^\s{0,3}(#{1,6})\s+(.*)$/.exec(t);if(a){i(),n.push({kind:`p`,html:`<strong>${bf(a[2])}</strong>`});continue}let o=/^\s*[-*+]\s+(.*)$/.exec(t);if(o){i();let e=n[n.length-1];e?.kind===`ul`?e.items.push(bf(o[1])):n.push({kind:`ul`,items:[bf(o[1])]});continue}let s=/^\s*\d+\.\s+(.*)$/.exec(t);if(s){i();let e=n[n.length-1];e?.kind===`ol`?e.items.push(bf(s[1])):n.push({kind:`ol`,items:[bf(s[1])]});continue}let c=/^\s*>\s?(.*)$/.exec(t);r.push(bf(c?c[1]:t))}return i(),n.map(e=>{if(e.kind===`p`)return`<p>${e.html}</p>`;let t=e.items.map(e=>`<li>${e}</li>`).join(``);return`<${e.kind}>${t}</${e.kind}>`}).join(``)}function Sf(e){return[/\*\*[^*\n]+\*\*/,/__[^_\n]+__/,/~~[^~\n]+~~/,/`[^`\n]+`/,/\[[^\]\n]+\]\([^)\s]+\)/,/^\s{0,3}#{1,6}\s+\S/m,/^\s*[-*+]\s+\S/m,/^\s*\d+\.\s+\S/m].some(t=>t.test(e))}var Cf={STRONG:`strong`,B:`strong`,EM:`em`,I:`em`,U:`u`,S:`s`,STRIKE:`s`,DEL:`s`,CODE:`code`,A:`a`,UL:`ul`,OL:`ol`,LI:`li`,P:`p`,DIV:`p`,BR:`br`},wf=new Set([`strong`,`em`,`u`,`s`,`code`,`a`,`ul`,`ol`]),Tf=new Set([`SCRIPT`,`STYLE`,`NOSCRIPT`,`TEMPLATE`,`IFRAME`,`OBJECT`,`EMBED`,`HEAD`,`TITLE`]);function Ef(e){let t=e.trim();return t?/^(https?:|mailto:|tel:)/i.test(t)?t:/^[a-z][a-z0-9+.-]*:/i.test(t)?null:t:null}function Df(e,t,n){e.childNodes.forEach(e=>{if(e.nodeType===Node.TEXT_NODE){t.appendChild(n.createTextNode(e.textContent??``));return}if(e.nodeType!==Node.ELEMENT_NODE)return;let r=e;if(Tf.has(r.tagName))return;let i=Cf[r.tagName];if(i==null){Df(r,t,n);return}if(i===`br`){t.appendChild(n.createElement(`br`));return}let a=n.createElement(i);if(i===`a`){let e=Ef(r.getAttribute(`href`)??``);if(!e){Df(r,t,n);return}a.setAttribute(`href`,e)}Df(r,a,n),!(!(i===`li`||i===`ul`||i===`ol`||i===`p`)&&!a.textContent?.trim()&&!a.querySelector(`br`))&&t.appendChild(a)})}function Of(e){if(!e)return``;try{let t=new DOMParser().parseFromString(`<body>${e}</body>`,`text/html`),n=t.createElement(`div`);return Df(t.body,n,t),n.innerHTML.trim()}catch{return``}}function kf(e){if(!e)return``;try{let t=new DOMParser().parseFromString(`<body>${e}</body>`,`text/html`);for(let e of t.body.querySelectorAll(`h1,h2,h3,h4,h5,h6`)){let n=t.createElement(`p`),r=t.createElement(`strong`);for(;e.firstChild;)r.appendChild(e.firstChild);n.appendChild(r),e.replaceWith(n)}for(let e of t.body.querySelectorAll(`pre`)){let n=t.createElement(`code`);n.textContent=e.textContent??``,e.replaceWith(n)}let n=t.createElement(`div`);return Df(t.body,n,t),n.innerHTML.trim()}catch{return``}}function Af(e){return e?RegExp(`<(${[...wf].join(`|`)})[\\s>]`,`i`).test(e):!1}var jf=10,Mf={bold:`bold`,italic:`italic`,underline:`underline`,strike:`strikeThrough`,bullet:`insertUnorderedList`,ordered:`insertOrderedList`};function Nf(e){try{return document.queryCommandState(e)}catch{return!1}}function Pf(e){if(!e)return null;let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.getSelection;if(typeof e==`function`)return e.call(t)}return document.getSelection()}function Ff(e){let t=Pf(e)?.anchorNode??null,n=(t instanceof HTMLElement?t:t?.parentElement)?.closest?.(`a`)??null;return n&&e?.contains(n)?n:null}function If(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function Lf(e){let t=Pf(e)?.anchorNode??null,n=(t instanceof HTMLElement?t:t?.parentElement)?.closest?.(`code`)??null;return n&&e?.contains(n)?n:null}var Rf=gn(function({onChange:e,onEnter:t,onTyping:n,placeholder:r,ariaLabel:a,className:s,maxChars:c,initialHtml:l},d){let f=J(null),p=J(null),m=J(!1),[h,g]=Y(!0),[_,v]=Y(!1),[y,b]=Y({}),[x,S]=Y(!1),[C,w]=Y(``),T=i(`messages.format`);Sn(()=>{let e=f.current;if(!e||!l)return;let t=Of(l);t&&(e.innerHTML=t,g(!1))},[]);let E=G(()=>{let t=f.current;if(!t)return;let n=t.innerText??t.textContent??``;g(n.trim().length===0&&!t.querySelector(`li`)),e({html:t.innerHTML,text:n})},[e]),D=G(()=>{let e=!!Ff(f.current);b({bold:Nf(Mf.bold),italic:Nf(Mf.italic),underline:Nf(Mf.underline)&&!e,strike:Nf(Mf.strike),code:!!Lf(f.current),bullet:Nf(Mf.bullet),ordered:Nf(Mf.ordered),link:e})},[]),O=G(()=>{let e=f.current,t=Pf(e),n=!!e&&!!t&&t.rangeCount>0&&!t.isCollapsed&&e.contains(t.anchorNode)&&e.contains(t.focusNode);v(n),n&&t&&(p.current=t.getRangeAt(0).cloneRange(),D())},[D]);K(()=>{let e=()=>O();return document.addEventListener(`selectionchange`,e),()=>document.removeEventListener(`selectionchange`,e)},[O]);let k=G((e,t)=>{f.current?.focus({preventScroll:!0});try{document.execCommand(e,!1,t)}catch{}E(),D()},[E,D]);xn(d,()=>({focus(){f.current?.focus({preventScroll:!0})},clear(){f.current&&(f.current.innerHTML=``),g(!0),v(!1),S(!1),w(``),p.current=null},insertText(e){f.current?.focus({preventScroll:!0});try{document.execCommand(`insertText`,!1,e)}catch{}E()}}),[E]);let A=G(()=>{let e=f.current;if(!e)return;e.focus({preventScroll:!0});let t=Pf(e);if(!t)return;let n=Lf(e);if(n){let e=document.createRange();e.selectNode(n),t.removeAllRanges(),t.addRange(e),k(`insertText`,n.textContent??``);return}if(t.rangeCount===0||t.isCollapsed)return;let r=t.toString();r&&k(`insertHTML`,`<code>${If(r)}</code>`)},[k]),j=G(()=>{let e=f.current;if(!e||m.current)return;let t=Pf(e);if(!t||t.rangeCount===0||!t.isCollapsed)return;let n=t.getRangeAt(0),r=n.startContainer;if(r.nodeType!==Node.TEXT_NODE)return;let i=r,a=n.startOffset,o=i.textContent??``,s=o.slice(0,a);if(!i.previousSibling&&a===o.length&&(/^[-*]\s$/.test(s)||/^\d+\.\s$/.test(s))){let e=/^\d/.test(s),n=document.createRange();n.setStart(i,0),n.setEnd(i,a),t.removeAllRanges(),t.addRange(n),k(`insertText`,``),k(e?Mf.ordered:Mf.bullet);return}let c=/\*\*([^*\n]+?)\*\*$/.exec(s),l=`strong`;if(c||(c=/\*([^*\n]+?)\*$/.exec(s)),!c){let e=/`([^`\n]+?)`$/.exec(s);e&&(c=e,l=`code`)}if(!c)return;let u=a-c[0].length,d=document.createRange();d.setStart(i,u),d.setEnd(i,a),t.removeAllRanges(),t.addRange(d),k(`insertHTML`,`<${l}>${If(c[1])}</${l}>`)},[k]),M=G(()=>{if(Ff(f.current)){k(`unlink`);return}w(``),S(!0)},[k]),N=G(()=>{let e=f.current,t=p.current;if(!e)return null;e.focus({preventScroll:!0});let n=Pf(e);return n&&t&&(n.removeAllRanges(),n.addRange(t)),n},[]),P=G(()=>{let e=C.trim(),t=f.current;if(S(!1),w(``),!e||!t)return;let n=N(),r=p.current;if(n&&r&&!r.collapsed)k(`createLink`,e);else{let t=e.replace(/&/g,`&`).replace(/</g,`<`).replace(/"/g,`"`);k(`insertHTML`,`<a href="${t}">${t}</a>`)}},[C,k,N]),ee=G(()=>{S(!1),w(``),N()},[N]),te=_||x;return Z(`div`,{className:u(`relative`,s),children:[X(kt,{children:te&&X(o.div,{layout:!0,initial:{opacity:0,y:6,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:6,scale:.96},transition:{duration:.14,ease:[.16,1,.3,1]},className:u(`absolute bottom-full left-2 z-20 mb-2 origin-bottom overflow-hidden`,`rounded-2xl border border-wx-border/60 bg-wx-bg shadow-lg shadow-black/[0.06]`),onMouseDown:e=>e.preventDefault(),children:X(kt,{mode:`wait`,initial:!1,children:x?Z(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},className:`flex items-center gap-1 p-1 pl-3`,children:[X(`input`,{type:`url`,"data-wx-own-escape":``,value:C,onChange:e=>w(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),P()):e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),ee())},onMouseDown:e=>e.stopPropagation(),placeholder:T(`linkPlaceholder`),"aria-label":T(`link`),autoFocus:!0,className:u(`h-7 w-52 max-w-[52vw] bg-transparent text-[13px] text-wx-fg`,`placeholder:text-wx-fg-subtle focus:outline-none`)}),X(`button`,{type:`button`,onClick:P,className:u(`h-7 shrink-0 rounded-lg px-2.5 font-semibold text-[12px]`,`bg-wx-primary text-wx-primary-fg transition-[transform,opacity]`,`hover:opacity-95 active:scale-95`),children:T(`linkSave`)}),X(Bf,{label:T(`linkCancel`),onClick:ee,children:X(At,{className:`h-4 w-4`})})]},`link`):Z(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},className:`flex items-center gap-0 p-1`,children:[X(Bf,{label:T(`bold`),active:y.bold,onClick:()=>k(Mf.bold),children:X(cs,{className:`h-4 w-4`})}),X(Bf,{label:T(`italic`),active:y.italic,onClick:()=>k(Mf.italic),children:X(Es,{className:`h-4 w-4`})}),X(Bf,{label:T(`underline`),active:y.underline,onClick:()=>k(Mf.underline),children:X(ec,{className:`h-4 w-4`})}),X(Bf,{label:T(`strikethrough`),active:y.strike,onClick:()=>k(Mf.strike),children:X(Zs,{className:`h-4 w-4`})}),X(Bf,{label:T(`monospace`),active:y.code,onClick:A,children:X(_s,{className:`h-4 w-4`})}),X(zf,{}),X(Bf,{label:T(`bulletList`),active:y.bullet,onClick:()=>k(Mf.bullet),children:X(As,{className:`h-4 w-4`})}),X(Bf,{label:T(`numberedList`),active:y.ordered,onClick:()=>k(Mf.ordered),children:X(ks,{className:`h-4 w-4`})}),X(zf,{}),X(Bf,{label:T(`link`),active:y.link,onClick:M,children:X(Os,{className:`h-4 w-4`})})]},`tools`)})})}),Z(`div`,{className:`relative`,children:[X(`div`,{ref:f,role:`textbox`,"aria-multiline":`true`,"aria-label":a,contentEditable:!0,suppressContentEditableWarning:!0,onCompositionStart:()=>{m.current=!0},onCompositionEnd:()=>{m.current=!1},onInput:()=>{j(),E(),n?.()},onPaste:e=>{e.preventDefault();let t=e.clipboardData,n=t?.getData(`text/html`)??``,r=t?.getData(`text/plain`)??``;if(c){let e=c*jf,t=f.current?.innerText?.length??0,n=Math.max(0,e-t);if(r.length>n){n>0&&k(`insertText`,r.slice(0,n));return}}if(n.trim()){let e=kf(n);if(e){k(`insertHTML`,e);return}}if(r&&Sf(r)){let e=xf(r);if(e){k(`insertHTML`,e);return}}k(`insertText`,r)},onKeyDown:e=>{if(e.key===`Enter`&&!e.shiftKey){if(e.nativeEvent.isComposing||m.current)return;if(Nf(Mf.bullet)||Nf(Mf.ordered)){requestAnimationFrame(E);return}e.preventDefault(),t()}},autoCorrect:`off`,autoCapitalize:`sentences`,spellCheck:!0,"data-1p-ignore":`true`,"data-lpignore":`true`,"data-form-type":`other`,className:u(`w-full overflow-y-auto bg-transparent px-4 pt-2.5 pb-1 text-sm text-wx-fg`,`focus:outline-none`,`[&_ul]:my-1 [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:my-1 [&_ol]:list-decimal [&_ol]:pl-5`,`[&_code]:rounded-wx-sm [&_code]:bg-wx-bg-elevated-2 [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em]`,`[&_a]:font-medium [&_a]:text-wx-primary [&_a]:underline [&_a]:underline-offset-2 [&_a:hover]:opacity-80`),style:{minHeight:41,maxHeight:120}}),h&&X(`span`,{className:`pointer-events-none absolute top-2.5 left-4 select-none text-sm text-wx-fg-muted`,"aria-hidden":`true`,children:r})]})]})});function zf(){return X(`span`,{className:`mx-0.5 h-5 w-px bg-wx-border/70`,"aria-hidden":`true`})}function Bf({label:e,active:t,onClick:n,children:r}){return X(`button`,{type:`button`,"aria-label":e,"aria-pressed":t,onClick:n,className:u(`flex h-7 w-7 items-center justify-center rounded-lg text-wx-fg-muted`,`transition-[background-color,color,transform] hover:bg-wx-bg-elevated-2 hover:text-wx-fg active:scale-90`,t&&`bg-wx-primary/12 text-wx-primary hover:bg-wx-primary/12 hover:text-wx-primary`),children:r})}function Vf(e){let t=J(e);t.current=e;let n=J(!1);return G(async()=>{if(!n.current){n.current=!0;try{await t.current()}finally{n.current=!1}}},[])}var Hf=new Map;function Uf(e){let t=Hf.get(e);return t||(t={appended:[],consumed:[],read:[]},Hf.set(e,t)),t}function Wf(e){let t=Hf.get(e);return t?{appended:[...t.appended],consumed:[...t.consumed],read:[...t.read]}:{appended:[],consumed:[],read:[]}}function Gf(e,t){let n=Uf(e);n.appended.some(e=>e.id===t.id)||(n.appended=[...n.appended,t])}function Kf(e,t,n){let r=Uf(e);r.consumed=[...t],r.read=[...n]}function qf(e,t){let n=e.toLowerCase();return n.includes(`pric`)?{text:Qe(t,`messenger.replies.pricing.text`),buttons:Yf(t,[[`messenger.replies.pricing.planBtn`,`plans`],[`messenger.replies.pricing.salesBtn`,`sales`]])}:n.includes(`gaia`)||n.includes(`ai`)?{text:Qe(t,`messenger.replies.gaia.text`),buttons:Yf(t,[[`messenger.replies.gaia.handoffBtn`,`handoff-flow`]])}:n.includes(`human`)||n.includes(`chat with`)||n.includes(`operator`)?{text:Qe(t,`messenger.replies.human.text`)}:{text:Qe(t,`messenger.replies.fallback.text`)}}function Jf(e){return Qe(e,`messenger.replies.voice.text`)}function Yf(e,t){let n=t.map(([t,n])=>({text:Qe(e,t),payload:n})).filter(e=>e.text!==``);return n.length>0?n:void 0}function Xf(e){return Qe(e,`messenger.replies.fallback.text`)!==``}var Zf=e=>e.replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim();function Qf(e,t){let n=e.find(e=>e.direction===`OUTBOUND`&&!e.system&&(e.text??``).trim()!==``);if(!n||n.sender.kind!==`bot`&&n.sender.kind!==`ai`)return null;let r=Zf(n.text??``);return t.some(e=>Zf(e.text)===r)?n:null}function $f(e,t){let n=new Map(t.map(e=>[e.id,e])),r=e.map(e=>{let t=n.get(e.id);if(!t)return e;let r=e.clientKey??t.clientKey;return t.edited?{...e,text:t.text,media:t.media??e.media,buttons:t.buttons??e.buttons,sources:t.sources??e.sources,edited:!0,...r?{clientKey:r}:{}}:r&&!e.clientKey?{...e,clientKey:r}:e}),i=new Set(e.map(e=>e.id));return[...r,...t.filter(e=>!i.has(e.id)&&!e.editOnly)]}function ep(e,t){if(!e||e.startsWith(`#`)||/^[a-z][a-z0-9+\-.]*:/i.test(e)&&!/^https?:/i.test(e))return null;let n=t??(typeof window<`u`?window.location.origin:`http://localhost`),r;try{r=new URL(e,n)}catch{return null}try{let e=new URL(n).origin;if(r.origin!==e)return null}catch{}let i=r.pathname.split(`/`).filter(Boolean);if(i.length<2)return null;let[a,...o]=i,s=o.join(`/`);if(!s)return null;let c=r.searchParams.get(`locale`)??void 0;return a===`help`?{kind:`help-article`,slug:s,locale:c}:a===`news`||a===`article`?{kind:`news-article`,slug:s,locale:c}:null}var tp=`ul|ol|li|pre|p|blockquote|h[1-6]`;function np(e){return/<[a-z][a-z0-9]*(\s|>|\/)/i.test(e)}var rp=[/\*\*[^*\n]+\*\*/,/__[^_\n]+__/,/\[[^\]\n]+\]\([^)\n]+\)/,/`[^`\n]+`/,/```/,/^\s{0,3}#{1,6}\s+/m,/^\s*[-*+]\s+\S/m,/^\s*\d+\.\s+\S/m,/^\s*>\s+\S/m];function ip(e){return rp.some(t=>t.test(e))}function ap(e){return e.replace(RegExp(`\\n+(?=</?(?:${tp})[\\s/>])`,`gi`),``).replace(RegExp(`(</?(?:${tp})[^>]*>)\\n+`,`gi`),`$1`).replace(RegExp(`<br\\s*/?>(?=\\s*</?(?:${tp})[\\s/>])`,`gi`),``).replace(RegExp(`(</?(?:${tp})[^>]*>)\\s*<br\\s*/?>`,`gi`),`$1`)}function op(e,t){if(t.length===0)return e;let n=t.findIndex(t=>e.has(t));if(n===-1){let e=new Map,n=Math.max(0,t.length-10);return t.forEach((t,r)=>{e.set(t,r<n?null:(r-n)*35)}),e}let r=null;return t.forEach((t,i)=>{e.has(t)||(r??(r=new Map(e)),r.set(t,i>n?0:null))}),r??e}function sp(e){let t=J(new Map);return t.current=op(t.current,e),t.current}var cp=`wx-gentle-in`;function lp(e){return e==null?{}:{className:cp,style:e>0?{"--wx-enter-delay":`${e}ms`}:void 0}}function up({size:e,senderKind:t,senderName:n,senderAvatarUrl:r,aiAssistantAvatarUrl:a,organizationLogoUrl:o,organizationName:s,className:c}){let l=i(`messages`),d={width:e,height:e};if(t===`ai`||t===`bot`)return a?X(`span`,{style:d,className:u(`relative flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-wx-bg-elevated shadow-sm`,c),role:`img`,"aria-label":l(`aiAssistant`),children:X(`img`,{src:a,alt:``,className:`h-full w-full object-cover`,loading:`eager`,decoding:`async`})}):null;if(r)return X(`span`,{style:d,className:u(`shrink-0 overflow-hidden rounded-full`,c),children:X(`img`,{src:r,alt:``,className:`h-full w-full object-cover`})});let f=n?dp(n):``;if(!f&&o)return X(`span`,{style:d,className:u(`shrink-0 overflow-hidden rounded-full`,c),children:X(`img`,{src:o,alt:s??``,className:`h-full w-full object-cover`})});let p=f||(s??``).trim().charAt(0).toUpperCase();return X(`span`,{style:d,className:u(`flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-wx-bg-elevated text-[0.7em] font-semibold text-wx-fg-muted`,c),children:p||``})}function dp(e){let t=e.trim().split(/\s+/).map(e=>e.replace(/[^\p{L}\p{N}]/gu,``)).filter(e=>e.length>0);return t.length===0?``:t.length===1?t[0].charAt(0).toUpperCase():t[0].charAt(0).toUpperCase()+t[t.length-1].charAt(0).toUpperCase()}function fp(e,t){let n=Math.min(320/e,320/t,1);return{width:Math.round(e*n),height:Math.round(t*n)}}var pp=4;function mp(e){let t=new Set,n=[];for(let r of e){let e=r.link?.trim()||void 0,i=In(e),a=i?Rn(Ln(e))??e??`external`:`internal`;if(!t.has(a)&&(t.add(a),n.push({key:a,favicon:zn(e),external:i}),n.length>=pp))break}return n}function hp({sources:e,onOpen:t}){let n=i(`messages`),[r,a]=Y(!1),o=e.filter(Bn);if(o.length===0)return null;let s=mp(o);return Z(`div`,{className:`mt-1.5 flex w-full flex-col items-start gap-1`,children:[Z(`button`,{type:`button`,onClick:()=>a(e=>!e),"aria-expanded":r,className:u(`flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-wx-border bg-wx-bg-elevated py-1 pr-2.5 pl-1.5`,`font-medium text-[11px] text-wx-fg-muted transition-colors hover:bg-wx-bg-elevated-2 hover:text-wx-fg`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`),children:[X(`span`,{className:`flex items-center -space-x-1.5`,children:s.map(e=>X(`span`,{className:`inline-flex h-4 w-4 items-center justify-center overflow-hidden rounded-full bg-wx-bg ring-2 ring-wx-bg-elevated`,children:X(_p,{favicon:e.favicon,external:e.external})},e.key))}),Z(`span`,{children:[n(`sources`),` · `,o.length]}),X(Tt,{className:u(`h-3 w-3 transition-transform`,r&&`rotate-180`),"aria-hidden":`true`})]}),r&&X(`div`,{className:`flex w-full flex-col`,children:o.map((e,n)=>X(gp,{source:e,onOpen:t},n))})]})}function gp({source:e,onOpen:t}){let n=e.link?.trim()||void 0,r=In(n),i=zn(n),a=e.seoTitle?.trim(),o=e.seoDescription?.trim(),s=r?n:a??n??Vn(e),c=!!(a||o),l=Z(wn,{children:[X(_p,{favicon:i,external:r}),X(`span`,{className:`min-w-0 flex-1 truncate text-[12px] text-wx-fg`,children:s}),r&&X(os,{className:`h-3.5 w-3.5 shrink-0 text-wx-fg-subtle`,"aria-hidden":`true`})]}),d=`flex items-center gap-2 rounded-md px-2 py-1.5 text-left`;return Z(`div`,{className:`group relative`,children:[n?X(`button`,{type:`button`,onClick:()=>t(n),className:u(d,`w-full transition-colors hover:bg-wx-bg-elevated`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`),children:l}):X(`div`,{className:d,children:l}),c&&Z(`div`,{className:`pointer-events-none absolute bottom-full left-2 z-10 mb-1 hidden w-max max-w-[240px] rounded-lg bg-wx-fg px-3 py-2 text-wx-bg shadow-lg group-hover:block`,children:[a&&X(`p`,{className:`font-semibold text-[12px] leading-snug`,children:a}),o&&X(`p`,{className:`mt-0.5 text-[11px] text-wx-bg/70 leading-snug`,children:o})]})]})}function _p({favicon:e,external:t}){let[n,r]=Y(!1);return t&&e&&!n?X(`img`,{src:e,alt:``,width:14,height:14,referrerPolicy:`no-referrer`,className:`h-4 w-4 shrink-0 rounded-full bg-white object-contain p-px ring-1 ring-black/10`,onError:()=>r(!0)}):X(t?ke:ls,{className:`h-4 w-4 shrink-0 text-wx-fg-subtle`,"aria-hidden":`true`})}function vp(){return typeof window<`u`&&!!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function yp({item:e}){let[t,n]=Y(!1),[r]=Y(vp),i=`absolute inset-0 block h-full w-full object-cover`;return t?e.poster?X(`img`,{src:e.poster,alt:e.alt,className:i}):null:X(`video`,{src:e.url,poster:e.poster,"aria-label":e.alt,autoPlay:!r,loop:!r,muted:!0,playsInline:!0,preload:`metadata`,onError:()=>n(!0),className:i})}var bp=220;function xp({item:e,multi:t,onOpen:n,label:r}){let[i,a]=Y(null);if(t)return Z(`div`,{className:`relative w-full overflow-hidden`,children:[X(`video`,{src:e.url,poster:e.poster,controls:!0,preload:`metadata`,className:`block h-full w-full object-cover`}),X(`button`,{type:`button`,"aria-label":r,onClick:n,className:`absolute inset-0 cursor-zoom-in`})]});let o=e.width&&e.height?fp(e.width,e.height):null;return X(`div`,{style:{width:`${o?o.width:bp}px`,aspectRatio:o?`${o.width} / ${o.height}`:i??`16 / 9`,maxWidth:`100%`,...o?{}:{maxHeight:`20rem`}},className:`relative block overflow-hidden`,children:e.gif?X(yp,{item:e}):X(`video`,{src:e.url,poster:e.poster,controls:!0,preload:`metadata`,onLoadedMetadata:o?void 0:e=>{let t=e.currentTarget;t.videoWidth&&t.videoHeight&&a(`${t.videoWidth} / ${t.videoHeight}`)},className:`absolute inset-0 block h-full w-full object-contain`})})}var Sp=null;function Cp(e){return Sp&&Sp!==e&&Sp(),Sp=e,()=>{Sp===e&&(Sp=null)}}var wp=1e3;function Tp({src:e,onDark:t,resume:n=!1}){let r=i(`messages`),[a,o]=Y(!1),s=J(null),c=J(null),[l]=Y(n),d=J(!1),f=J(null);return K(()=>()=>{c.current?.(),f.current&&clearTimeout(f.current)},[]),a?Z(`a`,{href:e,target:`_blank`,rel:`noopener`,className:u(`inline-flex w-60 max-w-full items-center gap-2 rounded-wx-sm px-3 py-2 text-xs font-medium`,t?`bg-wx-primary-fg/10 text-wx-primary-fg hover:bg-wx-primary-fg/20`:`bg-wx-bg/60 text-wx-fg hover:bg-wx-bg`),children:[X(Yt,{size:12,className:`shrink-0`}),X(`span`,{className:`truncate`,children:r(`openAudio`)})]}):X(`audio`,{ref:s,controls:!0,preload:`none`,src:e,className:`h-12 w-56 max-w-full`,autoPlay:l,onError:()=>{if(d.current){o(!0);return}d.current=!0,f.current=setTimeout(()=>{let e=s.current;e&&(e.load(),e.play().catch(()=>{}))},wp)},onPlay:()=>{c.current?.(),c.current=Cp(()=>s.current?.pause())},onPause:()=>{c.current?.(),c.current=null}})}function Ep(e,t){let n=2166136261;for(let t=0;t<e.length;t++)n^=e.charCodeAt(t),n=Math.imul(n,16777619);let r=[];for(let e=0;e<t;e++)n^=n<<13,n^=n>>>17,n^=n<<5,r.push(.2+.8*((n>>>0)%1e3/999));return r}function Dp(e){let t=J(null),n=J(!1),r=J(null),[i,a]=Y(null),[o,s]=Y(!1),[c,l]=Y(!1),[u,d]=Y(!1),f=G(()=>{let n=new Audio;n.preload=`auto`,n.src=new URL(e,document.baseURI).href;let i=[[`play`,()=>s(!0)],[`playing`,()=>l(!1)],[`pause`,()=>s(!1)],[`ended`,()=>s(!1)],[`error`,()=>{l(!1),s(!1),d(!0)}]];for(let[e,t]of i)n.addEventListener(e,t);return r.current=()=>{for(let[e,t]of i)n.removeEventListener(e,t);n.pause(),n.removeAttribute(`src`),n.load()},t.current=n,a(n),n},[e]),p=G(()=>{let e=t.current??f();if(!e.paused){e.pause();return}l(!0),e.play().catch(e=>{l(!1),!(e instanceof DOMException&&e.name===`AbortError`)&&(n.current||(n.current=!0,console.warn(`[wexio] the browser refused to start the voice note (it must start from a tap); tap play again`,e)))})},[f]),m=G(()=>{t.current?.pause(),l(!1)},[]);return K(()=>{if(o)return Cp(()=>t.current?.pause())},[o]),K(()=>()=>{r.current?.(),r.current=null,t.current=null},[]),{audio:i,playing:o,starting:c,failed:u,toggle:p,stop:m}}function Op({onDark:e,loading:t,isPlaying:n,onPlayPause:r,buttonRef:a,onPointerEnter:o,onFocus:s,wave:c,time:l}){return Z(`div`,{className:`flex w-60 max-w-full min-w-0 items-center gap-3`,onPointerEnter:o,children:[X(`button`,{ref:a,type:`button`,onClick:r,onFocus:s,"aria-label":i(`messages`)(n?`pauseAudio`:`playAudio`),className:u(`flex h-8 w-8 shrink-0 items-center justify-center rounded-full transition-opacity`,e?`bg-wx-primary-fg text-wx-primary hover:opacity-90`:`bg-wx-primary text-wx-primary-fg hover:bg-wx-primary-hover`),children:t?X(js,{size:12,className:`animate-spin`}):n?X(Bs,{size:12}):X(Hs,{size:12,className:`translate-x-[1px]`})}),c,X(`span`,{className:u(`shrink-0 font-mono text-[10px] tabular-nums`,e?`text-wx-primary-fg/70`:`text-wx-fg-subtle`),children:l})]})}var kp=()=>import(`./widget-react-DFQYM8pj.js`),Ap=Nr(`voice-waveform`,kp,{pick:e=>e.LiveWaveform}),jp=40,Mp={ready:!1,time:0,failed:!1};function Np({src:e,onDark:t}){return X(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 flex items-center justify-between`,children:Ep(e,jp).map((e,n)=>X(`span`,{style:{height:`${Math.round(e*100)}%`},className:u(`w-0.5 rounded-sm`,t?`bg-wx-primary-fg/35`:`bg-wx-fg-muted`)},n))})}function Pp({src:e,onDark:t=!1}){let[n,r]=Y(Mp),i=J(null),a=Dp(e),o=n.failed||a.failed,{stop:s}=a;if(K(()=>{o&&s()},[o,s]),o)return X(Tp,{src:e,onDark:t,resume:a.playing||a.starting});let c=()=>void kp().catch(()=>{});return Z(wn,{children:[X(Op,{onDark:t,loading:a.starting,isPlaying:a.playing,onPlayPause:a.toggle,onPointerEnter:c,onFocus:c,wave:X(`div`,{ref:i,className:`relative h-6 min-w-0 flex-1`,children:!n.ready&&X(Np,{src:e,onDark:t})}),time:n.ready?Fp(n.time):`0:00`}),a.audio&&X(mn,{fallback:null,children:X(Ap,{src:e,onDark:t,containerRef:i,media:a.audio,onState:r})})]})}function Fp(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function Ip({message:e,organizationLogoUrl:t,organizationName:n,aiAssistantAvatarUrl:r,aiAssistantName:a,buttonsActive:s,onButtonClick:c,onOpenLightbox:l,onInternalLink:d,onRetry:f,enter:p}){let m=i(`messages`),h=ll(),g=lp(p),_=e.direction===`OUTBOUND`,v=e.sender.kind===`ai`||e.sender.kind===`bot`,y=_&&(!v||!!r),x=y?`ml-9`:`ml-1`,S=!_&&e.deliveryStatus===`QUEUED`,C=!_&&e.deliveryStatus===`SENDING`,w=!_&&e.deliveryStatus===`FAILED`,T=(e.buttons??[]).filter(e=>Hn(e)||s),E=al(T),{trackLinkClick:D}=Ie(),O=G(e=>{let t=ep(e);if(t){d?.(t);return}D({url:e,targetType:`EXTERNAL`}),_u(e)},[d,D]),[k,A]=Y(!1),j=G(e=>{e.target.closest(`a, button, input, textarea, video`)||A(e=>!e)},[]),M=v?a??``:e.sender.name?.trim()||``,N=_?e.sender.kind===`operator`?M?null:m(`operator`):b:null;return Z(o.div,{"data-message-id":e.id,initial:!1,exit:{opacity:0},transition:{duration:.24,ease:`easeOut`},style:g.style,className:u(`flex flex-col gap-1.5`,_?`items-start`:`items-end`,g.className),children:[Z(`div`,{className:u(`flex max-w-[85%] items-start gap-2`,_?`flex-row`:`flex-row-reverse`),children:[_&&X(up,{size:28,senderKind:e.sender.kind,senderName:e.sender.name,senderAvatarUrl:e.sender.avatar,aiAssistantAvatarUrl:r,organizationLogoUrl:t,organizationName:n,className:`mt-0.5`}),(()=>{let t=e.media??[],n=e=>e.mimetype.startsWith(`image/`)||e.mimetype.startsWith(`video/`)||e.mimetype===`application/pdf`,r=t.filter(n),i=t.filter(e=>!n(e)),a=!!e.text,o=i.length>0;return Z(`div`,{onClick:j,className:u(`max-w-full overflow-hidden rounded-wx-lg`,(a||o)&&(_?`bg-wx-bg-elevated text-wx-fg`:`bg-wx-primary text-wx-primary-fg`)),children:[r.length>0&&X(Rp,{items:r,onOpenLightbox:l}),(a||o)&&Z(`div`,{className:u(`flex flex-col gap-2 px-4 py-2.5 text-sm`,r.length>0&&`pt-2`),children:[a&&X(Lp,{text:e.text,isOutbound:_,onInternalLink:d}),i.map((e,t)=>X(Vp,{media:e,onDark:!_},t))]})]})})()]}),X(kt,{initial:!1,children:k&&(M||N||e.ageLabel)&&Z(o.p,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.18,ease:`easeOut`},className:u(`flex items-center gap-1.5 overflow-hidden text-[11px] text-wx-fg-subtle`,_?x:`mr-1`),children:[_&&M&&X(`span`,{className:`font-medium text-wx-fg-muted`,children:M}),_&&N&&Z(wn,{children:[M&&X(`span`,{"aria-hidden":`true`,children:`·`}),X(`span`,{children:N})]}),e.ageLabel&&Z(wn,{children:[_&&M||_&&N?X(`span`,{"aria-hidden":`true`,children:`·`}):null,X(`span`,{children:e.ageLabel})]})]})}),(S||C||w)&&X(`div`,{className:`mr-1 flex h-4 items-center justify-end gap-1 text-[11px] leading-none`,children:w?Z(`span`,{className:`flex items-center gap-1 text-wx-danger`,children:[X(`span`,{children:m(`notDelivered`)}),f&&X(`button`,{type:`button`,onClick:f,"aria-label":m(`retry`),title:m(`retry`),className:`-m-0.5 flex items-center rounded-full p-0.5 transition-opacity hover:opacity-70`,children:X(Ws,{"aria-hidden":`true`,className:`size-3`})})]}):C?X(js,{"aria-hidden":`true`,className:`size-3 animate-spin text-wx-fg-subtle`}):Z(`span`,{className:`flex items-center gap-1 text-wx-fg-subtle`,children:[X(gs,{"aria-hidden":`true`,className:`size-3`}),X(`span`,{children:m(`queued`)})]})}),e.sources&&e.sources.length>0&&X(`div`,{className:u(y?`ml-9 max-w-[calc(85%_-_2.25rem)]`:`ml-1 max-w-[85%]`),children:X(hp,{sources:e.sources,onOpen:O})}),T.length>0&&X(o.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0},transition:{duration:.18,ease:`easeOut`},...h,className:u(`flex flex-wrap gap-1`,`pointer-coarse:gap-5`,_?u(x,`max-w-[85%]`):`mr-1 justify-end`),children:T.map((e,t)=>Z(o.button,{type:`button`,onClick:()=>c?.(e),whileHover:{y:-1},whileTap:{scale:.96},transition:{type:`spring`,stiffness:480,damping:26},className:u(`inline-flex max-w-full items-center gap-1`,`rounded-full bg-wx-bg-elevated px-2.5 py-1 text-xs font-medium text-wx-primary`,`relative after:absolute after:top-1/2 after:left-1/2 after:-translate-x-1/2 after:-translate-y-1/2 after:content-[''] pointer-coarse:after:h-[max(100%,44px)] pointer-coarse:after:w-[max(100%,44px)]`,`transition-colors hover:bg-wx-primary hover:text-wx-primary-fg`),children:[e.type===`url`&&X(Yt,{size:12,className:`shrink-0`,"aria-hidden":`true`}),e.type===`phone`&&X(Vs,{size:12,className:`shrink-0`,"aria-hidden":`true`}),X(`span`,{dir:`auto`,className:sl,children:e.text})]},E[t]))})]})}function Lp({text:e,isOutbound:t,onInternalLink:n}){let{trackLinkClick:r}=Ie(),i=G(e=>{if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0)return;let t=e.target?.closest?.(`a`);if(!t)return;let i=t.getAttribute(`href`);if(!i)return;let a=ep(i);if(a){if(!n)return;e.preventDefault(),n(a);return}e.preventDefault(),r({url:i,targetType:`EXTERNAL`}),_u(i)},[n,r]),a=np(e),o=!a&&t&&ip(e);return!a&&!o?X(`p`,{className:`whitespace-pre-wrap leading-relaxed [overflow-wrap:anywhere]`,children:e}):X(`div`,{onClick:i,className:u(`leading-relaxed [overflow-wrap:anywhere]`,`[&_table]:block [&_table]:max-w-full [&_table]:overflow-x-auto`,`[&_td]:[overflow-wrap:normal] [&_th]:[overflow-wrap:normal]`,a?`whitespace-pre-wrap`:`whitespace-normal`,`[&>p]:my-0 [&>p+p]:mt-2`,`[&_a]:underline [&_a]:underline-offset-2 [&_a]:opacity-90 [&_a:hover]:opacity-100`,`[&_strong]:font-semibold [&_em]:italic [&_u]:underline [&_s]:line-through`,`[&_code]:rounded-wx-sm [&_code]:bg-wx-bg-elevated-2 [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em]`,`[&_ul]:my-1.5 [&_ul]:list-disc [&_ul]:whitespace-normal [&_ul]:pl-5`,`[&_ol]:my-1.5 [&_ol]:list-decimal [&_ol]:whitespace-normal [&_ol]:pl-5`,`[&_li]:my-0.5`,`[&_li>p]:my-0 [&_li>p+p]:mt-1`,`[&_code]:rounded-sm [&_code]:bg-black/10 [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-[0.85em]`,`[&_pre]:my-2 [&_pre]:overflow-x-auto [&_pre]:[overflow-wrap:normal] [&_pre]:rounded [&_pre]:bg-black/10 [&_pre]:p-2 [&_pre]:text-[0.8em]`,!t&&`[&_code]:bg-white/15 [&_pre]:bg-white/15 [&_a]:text-wx-primary-fg`),children:a?ft(ap(e)):X(je,{remarkPlugins:[z],children:e})})}function Rp({items:e,onOpenLightbox:t}){let n=i(`messages`);if(e.length===0)return null;let r=e.length>1;return X(`div`,{className:u(`grid w-full`,r?`max-h-[20rem] grid-cols-2 gap-0.5 auto-rows-fr`:`grid-cols-1`),children:e.map((i,a)=>{let o=()=>t?.(e,a);return i.mimetype===`application/pdf`?Z(`button`,{type:`button`,onClick:o,"aria-label":i.alt||n(`openPreview`),className:u(`group flex w-full cursor-zoom-in items-center gap-3 px-4 py-3 text-left`,`bg-wx-bg-elevated text-wx-fg transition-colors hover:bg-wx-bg-elevated-2`),children:[X(`span`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-wx-sm bg-wx-bg text-[10px] font-bold tracking-wider text-wx-fg-muted shadow-sm`,children:`PDF`}),Z(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[X(`span`,{className:`truncate text-sm font-medium`,children:i.alt}),X(`span`,{className:`truncate text-xs text-wx-fg-muted`,children:i.mimetype})]})]},a):i.mimetype.startsWith(`video/`)?X(xp,{item:i,multi:r,onOpen:o,label:i.alt||n(`openPreview`)},a):X(Bp,{item:i,multi:r,onOpen:o,label:i.alt||n(`openImage`)},a)})})}var zp=220;function Bp({item:e,multi:t,onOpen:n,label:r}){let i=!!(e.width&&e.height),[a,o]=Y(null);if(t)return X(`button`,{type:`button`,onClick:n,"aria-label":r,className:`group relative block w-full cursor-zoom-in overflow-hidden`,children:X(`img`,{src:e.url,alt:e.alt,loading:`lazy`,className:`block h-full w-full object-cover transition-transform duration-200 group-hover:scale-[1.02]`})});if(i&&e.width&&e.height){let{width:t,height:i}=fp(e.width,e.height);return X(`button`,{type:`button`,onClick:n,"aria-label":r,style:{width:`${t}px`,aspectRatio:`${t} / ${i}`,maxWidth:`100%`},className:`group relative block cursor-zoom-in overflow-hidden`,children:X(`img`,{src:e.url,alt:e.alt,loading:`lazy`,className:`absolute inset-0 block h-full w-full object-cover transition-transform duration-200 group-hover:scale-[1.02]`})})}return X(`button`,{type:`button`,onClick:n,"aria-label":r,style:{width:`${zp}px`,maxWidth:`100%`,aspectRatio:a??`1 / 1`,maxHeight:`20rem`},className:`group relative block cursor-zoom-in overflow-hidden`,children:X(`img`,{src:e.url,alt:e.alt,loading:`lazy`,onLoad:e=>{let t=e.currentTarget;t.naturalWidth&&t.naturalHeight&&o(`${t.naturalWidth} / ${t.naturalHeight}`)},className:`absolute inset-0 block h-full w-full object-contain transition-transform duration-200 group-hover:scale-[1.02]`})})}function Vp({media:e,onDark:t}){return e.mimetype.startsWith(`audio/`)?X(Pp,{src:e.url,onDark:t}):X(Hp,{media:e})}function Hp({media:e}){let t=i(`messages`),n=e.alt||e.url.split(`/`).pop()||e.mimetype||t(`fileFallback`),r=Up(e.mimetype);return Z(`a`,{href:e.url,target:`_blank`,rel:`noopener`,className:`flex max-w-xs items-center gap-3 rounded-wx-sm bg-wx-bg-elevated/60 px-3 py-2.5 text-xs text-wx-fg transition-colors hover:bg-wx-bg-elevated`,children:[X(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-wx-sm bg-wx-bg-elevated-2 text-[10px] font-bold tracking-wider text-wx-fg-muted uppercase`,children:r}),Z(`span`,{className:`min-w-0 flex-1`,children:[X(`span`,{className:`block truncate font-medium text-wx-fg`,children:n}),X(`span`,{className:`block truncate text-wx-fg-subtle`,children:e.mimetype||t(`fileFallback`)})]})]})}function Up(e){return e?e.includes(`pdf`)?`PDF`:e.includes(`zip`)||e.includes(`compressed`)?`ZIP`:e.includes(`spreadsheet`)||e.includes(`excel`)?`XLS`:e.includes(`word`)||e.includes(`document`)?`DOC`:e.startsWith(`text/`)?`TXT`:(e.split(`/`)[1]??``).slice(0,4).toUpperCase()||`FILE`:`FILE`}function Wp({actorName:e,actorKind:t,actorAvatarUrl:n,actorPhase:r,aiAssistantName:a,aiAssistantAvatarUrl:s,organizationLogoUrl:c,organizationName:l}){let d=i(`messages`),f=t===`ai`||t===`bot`,p=!f||!!s,m=f?a||`AI Agent`:e;return Z(o.div,{layout:`position`,initial:!1,exit:{opacity:0},transition:{duration:.18},className:u(`flex flex-col items-start gap-1.5`,cp),children:[Z(`div`,{className:`flex max-w-[85%] items-start gap-2`,children:[X(up,{size:28,senderKind:t,senderName:e,senderAvatarUrl:n,aiAssistantAvatarUrl:s,organizationLogoUrl:c,organizationName:l,className:`mt-0.5`}),X(`div`,{className:`rounded-wx-lg bg-wx-bg-elevated px-4 py-3 text-sm text-wx-fg`,children:Z(`span`,{className:`inline-flex items-end gap-1`,children:[X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-wx-fg-muted [animation-delay:-0.3s]`}),X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-wx-fg-muted [animation-delay:-0.15s]`}),X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-wx-fg-muted`})]})})]}),Z(`p`,{className:u(`text-[11px] text-wx-fg-subtle`,p?`ml-9`:`ml-1`),children:[X(`span`,{className:`font-medium text-wx-fg-muted`,children:m&&m!==`…`?m:d(`typingSomeone`)}),X(`span`,{"aria-hidden":`true`,children:` · `}),X(`span`,{children:d(r===`thinking`?`aiThinking`:r===`searching`?`aiSearching`:`typing`)})]})]})}var Gp=42;function Kp(e){let t=Gp*(.6+Math.random()*.8);return e&&`.!?`.includes(e)?t+=380:e&&`,;:`.includes(e)&&(t+=180),t}function qp({text:e,startDelayMs:t=0,onDone:n}){let[r,i]=Y(t>0?-1:0),a=J(n);if(a.current=n,K(()=>i(t>0?-1:0),[e]),K(()=>{if(r<0){let e=setTimeout(()=>i(0),t);return()=>clearTimeout(e)}if(r>=e.length){a.current?.();return}let n=setTimeout(()=>i(e=>e+1),Kp(e[r-1]));return()=>clearTimeout(n)},[r,e,t]),r<0)return Z(`span`,{className:`inline-flex items-end gap-1 align-middle`,"aria-hidden":`true`,children:[X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-current opacity-60 [animation-delay:-0.3s]`}),X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-current opacity-60 [animation-delay:-0.15s]`}),X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-current opacity-60`})]});let o=r>=e.length;return Z(wn,{children:[e.slice(0,r),!o&&X(`span`,{"aria-hidden":`true`,className:`ml-0.5 inline-block h-[1.05em] w-[0.5em] translate-y-[0.15em] animate-pulse rounded-[1px] bg-current align-baseline`})]})}function Jp({kind:e,text:t,typewriter:n=!1,typewriterDelayMs:r=0}){return e===`SYSTEM`?X(`div`,{className:`flex justify-center px-2 py-1`,children:X(`span`,{className:`text-[11px] text-wx-fg-muted`,children:n?X(qp,{text:t,startDelayMs:r}):t})}):Z(`div`,{className:`flex w-full items-start gap-2 rounded-wx-sm border border-wx-border bg-wx-bg px-3 py-2.5 text-wx-fg-muted`,children:[X(Ds,{size:15,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),X(`p`,{className:`text-xs leading-relaxed italic`,children:t})]})}function Yp({label:e}){return X(`div`,{className:`sticky top-2 z-10 flex justify-center py-1`,children:X(`span`,{className:`rounded-full bg-wx-bg-elevated px-3 py-1 text-[11px] font-medium text-wx-fg-muted shadow-sm`,children:e})})}function Xp(e,t){return e.type===`OPERATOR_CONNECTED`?e.operatorName?t(`withOperator`,{name:e.operatorName}):t(`operatorConnected`):e.initiator===`VISITOR`?t(`chatResolvedByYou`):e.initiator===`OPERATOR`&&e.operatorName?t(`chatResolvedByOperator`,{name:e.operatorName}):t(`chatResolved`)}function Zp({system:e,messageId:t}){let n=i(`messages`),r=e.type===`OPERATOR_CONNECTED`?e.operatorAvatar:void 0;return Z(`div`,{className:`flex items-center justify-center gap-1.5 px-2 py-1`,"data-message-id":t,children:[r&&X(`img`,{src:r,alt:``,className:`h-4 w-4 shrink-0 rounded-full object-cover`}),X(`span`,{className:`text-[11px] text-wx-fg-muted`,children:Xp(e,n)})]})}var Qp=gn(({label:e},t)=>Z(o.div,{ref:t,className:`flex items-center gap-2 py-1 overflow-hidden`,initial:{opacity:1},exit:{opacity:0,height:0,paddingTop:0,paddingBottom:0},transition:{duration:.18,ease:`easeOut`},children:[X(`span`,{"aria-hidden":`true`,className:`h-px flex-1 bg-wx-danger/40`}),X(`span`,{className:`text-[11px] font-semibold text-wx-danger`,children:e}),X(`span`,{"aria-hidden":`true`,className:`h-px flex-1 bg-wx-danger/40`})]}));Qp.displayName=`UnreadDivider`;var $p=vn(function({message:e,read:t,trackOperatorAvatar:n,operatorAvatarSrc:r,buttonsActive:i,enter:a,onQuickReply:o,onRetry:s,...c}){let l=q(()=>{let i=t?{...e,deliveryStatus:`READ`}:e;return n&&i.sender.kind===`operator`&&(i={...i,sender:{...i.sender,avatar:r}}),i},[e,t,n,r]),u=e.id,d=G(e=>o(u,e),[o,u]),f=G(()=>s?.(u),[s,u]);return X(Ip,{message:l,buttonsActive:i,enter:a,onButtonClick:d,onRetry:e.deliveryStatus===`FAILED`?f:void 0,...c})}),em=vn(function({rows:e,readMessageIds:t,isDummy:n,operatorAvatarSrc:r,activeButtonMessageId:i,unreadLabel:a,unreadDividerRef:o,onQuickReply:s,onRetry:c,...l}){let u=sp(e.flatMap(e=>e.kind===`message`&&!e.message.system?[e.key]:[]));return X(kt,{initial:!1,presenceAffectsLayout:!1,children:e.map(e=>{if(e.kind===`date`)return X(Yp,{label:e.label},e.key);if(e.kind===`unread`)return X(Qp,{ref:o,label:a},e.key);let d=e.message;return d.sender.kind===`system`&&d.system?X(Zp,{system:d.system,messageId:d.id},e.key):X($p,{message:d,read:t.has(d.id),trackOperatorAvatar:n,operatorAvatarSrc:r,buttonsActive:d.id===i,enter:u.get(e.key)??null,onQuickReply:s,onRetry:c,...l},e.key)})})}),tm=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate();function nm(e,t){if(e.createdAt){let t=new Date(e.createdAt);if(!Number.isNaN(t.getTime()))return t}return t}function rm(e,t,n){if(tm(e,n))return t.todayLabel;let r=new Date(n);return r.setDate(n.getDate()-1),tm(e,r)?t.yesterdayLabel:e.toLocaleDateString(t.locale,e.getFullYear()===n.getFullYear()?{day:`numeric`,month:`short`}:{day:`numeric`,month:`short`,year:`numeric`})}function im(e){return!e.system&&!(e.text??``).trim()&&!(e.media&&e.media.length>0)&&!(e.buttons&&e.buttons.length>0)}function am(e,t){let n=t.now??new Date,r=[],i=null;for(let a of e){if(im(a))continue;let e=nm(a,n),o=`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`;o!==i&&(i=o,r.push({kind:`date`,key:`date-${o}`,label:rm(e,t,n)})),t.unreadAnchorId&&a.id===t.unreadAnchorId&&r.push({kind:`unread`,key:`unread-divider`}),r.push({kind:`message`,key:a.clientKey??a.id,message:a})}return r}var om=5e3;function sm(e=Date.now,t=om){let n=null;return{mark(){n=e()},consume(){let r=n!==null&&e()-n<=t;return n=null,r}}}var cm=W.forwardRef(({className:e,type:t,...n},r)=>X(`input`,{ref:r,type:t,className:u(`h-11 w-full rounded-wx bg-wx-bg-elevated px-4 text-sm text-wx-fg`,`placeholder:text-wx-fg-muted`,`focus:outline-none focus:ring-2 focus:ring-wx-primary`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...n}));cm.displayName=`Input`;function lm(e){return e===`EMAIL`?`email`:e===`PHONE`?`tel`:`text`}function um(e){return e===`NAME`?`name`:e===`EMAIL`?`email`:e===`PHONE`?`tel`:`off`}function dm(e){return`wexio:prechat-submitted:${e}`}function fm(e,t=ve(`local`)){try{return t.getItem(dm(e))===`1`}catch{return!1}}function pm(e,t=ve(`local`)){try{t.setItem(dm(e),`1`)}catch{}}function mm(e,t,n){let r={};for(let i of e.fields){let e=(t[i.key]??``).trim();if(i.required&&!e){r[i.key]=n.required;continue}e&&(i.kind===`EMAIL`&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?r[i.key]=n.invalidEmail:i.kind===`PHONE`&&!/^[+\d\s()-]{5,}$/.test(e)&&(r[i.key]=n.invalidPhone))}return r}function hm(e,t){return e.fields.map(e=>({key:e.key,value:(t[e.key]??``).trim()})).filter(e=>e.value.length>0)}function gm(e,t){if(!t)return{};let n={};for(let r of e.fields){let e=(r.kind===`NAME`?t.name:r.kind===`EMAIL`?t.email:r.kind===`PHONE`?t.phone:void 0)?.trim();e&&(n[r.key]=e)}return n}function _m({form:e,values:t,errors:n,onChange:r,disabled:a=!1,locked:o}){let s=i(`prechat`),c=e=>{if(e.label.trim())return e.label;switch(e.kind){case`NAME`:return s(`labelName`);case`EMAIL`:return s(`labelEmail`);case`PHONE`:return s(`labelPhone`);case`CUSTOM_TEXT`:return s(`labelCustom`)}};return X(`div`,{className:`flex flex-col gap-1.5 border-wx-border border-b px-2.5 pt-2 pb-1.5`,children:e.fields.map(e=>{let i=c(e),l=n[e.key],d=!!o?.has(e.key);return Z(`div`,{children:[X(cm,{type:lm(e.kind),value:t[e.key]??``,onChange:t=>r(e.key,t.target.value),autoComplete:um(e.kind),disabled:a,readOnly:d,"aria-readonly":d||void 0,"data-locked":d||void 0,title:d?s(`locked`):void 0,"aria-invalid":!!l,"aria-label":i,placeholder:e.required?`${i} *`:i,className:u(`h-8 rounded-wx-md px-3 text-[13px]`,d&&`cursor-default bg-wx-bg-elevated text-wx-fg-muted focus:ring-0`,l&&`ring-1 ring-wx-danger placeholder:text-wx-danger/60 focus:ring-wx-danger`)}),l&&X(`p`,{className:`mt-0.5 px-1 text-[10px] text-wx-danger leading-none`,children:l})]},e.key)})})}var vm={values:{},locked:new Set,covered:!1},ym=e=>e?.trim()||void 0;function bm(e,t){if(t){if(e===`NAME`)return ym(t.name);if(e===`EMAIL`)return ym(t.email);if(e===`PHONE`)return ym(t.phone)}}function xm(e){let{form:t}=e;if(!e.active||!t?.enabled||t.fields.length===0)return vm;let n={},r=new Set;for(let i of t.fields){let t=bm(i.kind,e.host),a=bm(i.kind,e.profile),o=i.kind===`NAME`?ym(e.session?.name):void 0,s=i.kind===`CUSTOM_TEXT`?ym(e.profileCustom[i.key]):void 0;t?(n[i.key]=t,e.hostVerified&&r.add(i.key)):a||o?(n[i.key]=a??o,e.lockServerSide&&r.add(i.key)):s&&(n[i.key]=s)}return{values:n,locked:r,covered:t.fields.filter(e=>e.required).every(e=>!!n[e.key])}}function Sm(e){return!e.isInitial&&!e.atBottom&&!e.isVisitorSend}function Cm(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;let r=t,i=e;return n.every(e=>e in r&&Cm(i[e],r[e]))}function wm(e,t){if(e===t)return e;let n=new Map(e.map(e=>[e.id,e])),r=e.length===t.length,i=t.map((t,i)=>{let a=n.get(t.id),o=a&&Cm(a,t)?a:t;return o!==e[i]&&(r=!1),o});return r?e:i}function Tm(e){let t=J([]),n=wm(t.current,e);return t.current=n,n}function Em(e){return t=>t&&t.name===e.name&&t.kind===e.kind&&t.avatar===e.avatar&&t.phase===e.phase?t:e}function Dm(e,t,n){if(t<=0)return null;let r=e.filter(e=>e.direction===`OUTBOUND`&&!e.system&&e.id!==n);if(r.length===0)return null;let i=n?Math.min(t,r.length):t;return r.length<i?null:r[r.length-i].id}function Om(e,t){let n=J(t);n.current=t;let r=J(e);K(()=>{r.current&&!e&&n.current(),r.current=e},[e])}function km(e){let t=J(!1),n=J(e);n.current=e;let{text:r,enabled:i}=e;K(()=>{!i||!r||t.current||(t.current=!0,n.current.send(r),n.current.onSent?.())},[i,r])}var Am=80;function jm(e,t,n){let r=J(t);r.current=t;let i=J(n);i.current=n,K(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let n=t.firstElementChild instanceof HTMLElement?t.firstElementChild:null,a=t.clientHeight,o=t.clientWidth,s=n?.offsetHeight??0,c=i.current,l=!0,u=()=>t.clientHeight===a&&t.clientWidth===o&&(n?.offsetHeight??0)===s,d=()=>{u()&&(l=t.scrollHeight-t.scrollTop-t.clientHeight<=Am)},f=new ResizeObserver(()=>{let e=t.clientHeight,u=t.clientWidth,d=n?.offsetHeight??0,f=i.current,p=e!==a||u!==o,m=d!==s&&f===c;a=e,o=u,s=d,c=f,!(!p&&!m)&&l&&r.current()&&t.scrollTo({top:t.scrollHeight,behavior:`auto`})});return t.addEventListener(`scroll`,d,{passive:!0}),f.observe(t),n&&f.observe(n),()=>{t.removeEventListener(`scroll`,d),f.disconnect()}},[e])}function Mm(e){let t={};for(let n of e.fields)t[n.key]=n.value??null;return t}function Nm(e){return e==null||e===``||e.trim()===``}function Pm(e,t){if(e==null)return null;switch(t){case`STRING`:case`ENUM`:case`AVATAR`:return e.trim()===``?null:e.trim();case`NUMBER`:{let t=e.trim();if(t===``)return null;let n=Number(t);return Number.isFinite(n)?String(n):t}case`BOOLEAN`:return e===`true`?`true`:`false`;case`DATE`:return e===``?null:e;case`ARRAY`:{let t=e.trim();if(t===``)return null;try{let e=JSON.parse(t);if(Array.isArray(e))return JSON.stringify(e.map(String))}catch{}return JSON.stringify(t.split(`,`).map(e=>e.trim()).filter(Boolean))}default:return e}}function Fm(e,t){let n=[];for(let r of e){if(r.pinned)continue;let e=Pm(r.value??null,r.type),i=Pm(t[r.key]??null,r.type);e!==i&&n.push({key:r.key,value:i??``})}return n}function Im(e,t){let n=n=>t[n]?.trim()||e.fields.find(e=>e.key===n)?.value?.trim()||``,r=n(`firstName`),i=n(`lastName`);return r||i?`${r} ${i}`.trim():n(`name`)||n(`displayName`)||``}function Lm(e){if(!e)return``;if(/^\d{4}-\d{2}-\d{2}$/.test(e))return e;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toISOString().slice(0,10)}function Rm(e){if(!e)return[];try{let t=JSON.parse(e);if(Array.isArray(t))return t.map(e=>String(e))}catch{}return[]}var zm={};function Bm(e){if(!e)return null;let t=t=>e.fields.find(e=>e.key===t)?.value?.trim()||void 0;return{name:Im(e,{})||void 0,email:t(`email`),phone:t(`phone`)}}function Vm(e){let t={};for(let n of e?.fields??[]){let e=n.value?.trim();e&&(t[n.key]=e)}return t}var Hm=3e3;function Um(e){let t=e.verified&&e.enabled,{data:n,loading:r}=lr({skip:!t}),i=q(()=>t?Bm(n?.visitorProfile):null,[t,n?.visitorProfile]),a=q(()=>t?Vm(n?.visitorProfile):zm,[t,n?.visitorProfile]),[o,s]=Y(!1),c=t&&r;return K(()=>{if(!c){s(!1);return}let e=setTimeout(()=>s(!0),Hm);return()=>clearTimeout(e)},[c]),{identity:i,fieldValues:a,pending:c&&!o}}function Wm(e,t){let n=de(t),{slotKeyId:r,variantKeyId:i}=n?x(n):{slotKeyId:xe(t),variantKeyId:ut(t)};if(!r||!i)return e;let a=n?k:e=>e,o=e.find(e=>e.kind===`MESSAGE`&&a(e.id)===r),s=o?.variants.find(e=>a(e.id)===i);if(!o||!s)return e;let{when:c,...l}=s;return e.map(e=>e===o?{...e,variants:[l]}:e)}function Gm(e,t,n,r,i={}){let a=[];for(let o of e){let e;if(!(i.excludeMessages&&o.kind===`MESSAGE`)&&!(i.messageSlotId&&o.kind===`MESSAGE`&&o.id!==i.messageSlotId)){if(o.kind===`SYSTEM`)e=ri(o.variants,t);else if(n.has(o.id)){let t=n.get(o.id)??null;e=t?o.variants.find(e=>e.id===t.id)??t:null}else if(i.hold)continue;else e=ri(o.variants,t),r&&n.set(o.id,e);e&&a.push({slotId:o.id,kind:o.kind,variant:e})}}return a}function Km(e){let{publicSlots:t,active:n,isOpen:r,threadKey:i,token:a,welcomeSlotId:o}=e,s=oi(),c=bi(),l=J(new Map),u=s.slots?.messageSlots??t,d=q(()=>Wm(u,i),[u,i]),f=Jr(),p=de(i),m=p?f.snapshotOf(p):void 0,h=q(()=>{if(!p||!m)return d;let e=d.find(e=>e.kind===`MESSAGE`&&P(e.id,p)),t={...e,id:e?.id??x(p).slotKeyId,kind:`MESSAGE`,variants:[m]};return[...d.filter(t=>t!==e),t]},[d,p,m]),g=p==null?void 0:h.find(e=>e.kind===`MESSAGE`&&P(e.id,p))?.id,_=J({token:null,epoch:0});_.current.token!==a&&(_.current.token!==null&&(_.current.epoch+=1),_.current.token=a);let v=`${_.current.epoch}|${ye(i)}`,y=l.current.get(v);y||(y=new Map,l.current.set(v,y));let b=h.some(e=>e.kind===`MESSAGE`&&y.has(e.id)),S=n&&!s.settled&&!b&&!m,C=xe(i)??void 0,w=C??g??o,T=q(()=>Gm(h,c,y,r&&!S,{hold:S,messageSlotId:w,excludeMessages:n&&!w}),[h,c,y,r,S,w,n]),E=q(()=>{if(!C)return null;let e=T.find(e=>e.slotId===C);if(e)return{slotId:e.slotId,variantId:e.variant.id};let t=h.find(e=>e.kind===`MESSAGE`&&e.id===C),n=t?ri(t.variants,c):null;return t&&n?{slotId:t.id,variantId:n.id}:null},[T,C,h,c]),D=q(()=>{let e=g?T.find(e=>e.slotId===g):void 0;return e?{slotId:e.slotId,variant:e.variant}:null},[T,g]),O=q(()=>{if(C||!o)return null;let e=T.find(e=>e.kind===`MESSAGE`&&e.slotId===o);return e?{slotId:e.slotId,variantId:e.variant.id}:null},[T,C,o]),k=q(()=>h.flatMap(e=>e.kind===`MESSAGE`?e.variants.map(e=>({text:e.text})):[]),[h]);return q(()=>({welcomes:T,held:S,slotPick:E,welcomePick:O,localHeader:D,seedTexts:k}),[T,S,E,O,D,k])}var qm={required:`r`,invalidEmail:`e`,invalidPhone:`p`},Jm=[],Ym=4e3,Xm=Nr(`voice-recorder`,()=>import(`./widget-react-BK8heNFR.js`),{pick:e=>e.VoiceRecorderBar}),Zm=Nr(`giphy-picker`,()=>import(`./widget-react-DR2EqmbG.js`),{pick:e=>e.GiphyPicker});function Qm(e){return{...e.threadKey?{threadKey:e.threadKey}:{},...e.messageSlot?{messageSlot:e.messageSlot}:{}}}function $m({isDummy:e,chatId:t,threadKey:r,onChatIdResolved:a,token:s,prechatForm:c,messenger:l,organizationLogoUrl:d,organizationName:f,operatorAvatars:p,catchUpHistory:m=!1,isOpen:h=!0,assignmentStatus:g,assignmentEstimate:_,threadStatus:v,blocked:y,globalBlocked:b,onStartNewConversation:S,onInbound:C,onOutbound:w,registerRealtimeHandler:E,unreadCount:D=0,clearUnread:O,liveMessages:k,appendLiveMessage:A,replaceLiveMessage:M,enqueueSend:N,onRetryOutbox:P,initialVisitorMessage:ee,onInitialVisitorMessageSent:te,welcomeSlotId:ne,visitorIdentity:F,visitorPrefill:re,security:ie,verified:ae=!1,identified:oe,sessionName:ce,onGoogleCredential:le,onPasskeySession:ue,onInternalLink:pe,getTurnstileToken:me}){let L=i(`messages`),he=T(),ge=i(`prechat`),ve=n(),{trackLinkClick:be,trackButtonClick:Se}=Ie(),we=Te(),Ee=se(l?.aiAssistant),De=I(),Oe=De.publicKey??``,[ke,je]=Y(null);K(()=>{je(fm(Oe,De.storage))},[Oe,De.storage]);let[Me,Ne]=Y({}),[Pe,Fe]=Y({}),[Le,Re]=Y(null),[Be,{loading:Ve}]=lt(),{refresh:He}=oi(),Ue=G((e,t)=>{Ne(n=>({...n,[e]:t})),Fe(t=>{if(!t[e])return t;let n={...t};return delete n[e],n})},[]),We=q(()=>c?gm(c,re):{},[c,re]);K(()=>{Object.keys(We).length!==0&&Ne(e=>{let t=!1,n={...e};for(let[e,r]of Object.entries(We))n[e]||(n[e]=r,t=!0);return t?n:e})},[We]);let[Ge,Ke]=Y(!1),z=oe??ae,qe=Ce().token!==null,Je=z||!!F,{identity:Ye,fieldValues:Ze,pending:Qe}=Um({verified:Je,enabled:!!c?.enabled&&!e&&!!s}),$e=!!(F?.jwt||F?.googleIdToken||F?.userId&&F?.userHash),et=q(()=>xm({form:c??null,active:Je,host:F,hostVerified:$e,profile:Ye,profileCustom:Ze,session:{name:ce},lockServerSide:qe&&z}),[c,Je,F,$e,Ye,Ze,ce,qe,z]),tt=et.covered,nt=q(()=>{let e={...et.values,...Me};for(let t of et.locked)e[t]=et.values[t]??``;return e},[et,Me]),rt=q(()=>!c?.enabled||c.fields.length===0||Object.keys(We).length===0?!1:Object.keys(mm(c,We,qm)).length===0,[c,We]),it=J(!1);K(()=>{!rt||ke!==!1||Ge||it.current||tt||!c||!e&&!s||(it.current=!0,(async()=>{if(e){pm(Oe,De.storage),je(!0);return}try{let e=await me?.()??void 0;await Be({variables:{input:{fields:hm(c,We),turnstileToken:e}}}),pm(Oe,De.storage),je(!0),He()}catch{it.current=!1,Ke(!0)}})())},[rt,ke,Ge,tt,c,We,e,s,Oe,De.storage,Be,me,He]);let ot=!!c?.enabled&&c.fields.length>0&&ke===!1&&!Qe&&!tt&&!(rt&&!Ge),[ct,ut]=Y(()=>{if(typeof window>`u`)return!1;try{return De.sessionStorage.getItem(`wexio:demo-authed`)===`1`}catch{return!1}}),dt=e=>{ut(e);try{e?De.sessionStorage.setItem(`wexio:demo-authed`,`1`):De.sessionStorage.removeItem(`wexio:demo-authed`)}catch{}},ft=ie?.google?.enabled?ie.google.clientId:null,pt=!!ie?.passkey?.enabled,mt=e||qe,ht=!!ie?.requireAuth&&!z&&!(mt&&ct),V=v===`CLOSED`,H=!!y,gt=!!b,_t=G(async()=>{if(!ot||!c)return!0;let t=mm(c,nt,{required:ge(`required`),invalidEmail:ge(`invalidEmail`),invalidPhone:ge(`invalidPhone`)});if(Object.keys(t).length>0)return Fe(t),!1;if(Re(null),e)return pm(Oe,De.storage),je(!0),!0;try{let e=await me?.()??void 0;return await Be({variables:{input:{fields:hm(c,nt),turnstileToken:e}}}),pm(Oe,De.storage),je(!0),He(),!0}catch(e){return Re(e instanceof Error?e.message:ge(`submitFailed`)),!1}},[ot,c,nt,e,Oe,De.storage,Be,ge,me,He]),yt=r??`main`,bt=sf(De.publicKey,r??null),[xt]=Y(()=>ef(cf(bt,De.drafts)));K(()=>lf(xt,bt,De.drafts),[xt,bt,De.drafts]);let[Ct,wt]=Y(!1),[Dt,Ot]=Y(!1),[At,jt]=Y(!1),[Mt,Nt]=Y(!1),[Pt,Ft]=Y(null),It=J(new Set),Lt=J(new Map),[Rt,zt]=Y(!1);Om(h,()=>zt(!1));let Bt=J(null),Vt=J(null),Ht=J(null),Ut=J(null);K(()=>{if(!Dt)return;let e=e=>{let t=e.composedPath();Ut.current&&t.includes(Ut.current)||t.some(e=>e instanceof Element&&e.matches(`[data-wx-commands-panel]`))||Ot(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[Dt]);let Wt=e=>{Bt.current?.insertText(e)},Gt=G(()=>{xt.set(``,``),Bt.current?.clear()},[xt]),qt=q(()=>e&&!r?St(he):[],[e,r,he]),[Jt,Yt]=Y(()=>Wf(yt).appended),Xt=q(()=>[...qt,...Jt],[qt,Jt]),Zt=e?Xt:k??[],[Qt]=Y(()=>sm()),$t=J(null),en=J(null),tn=J(null),nn=Jr(),rn=J(t);rn.current=t;let an=G(()=>{let e=xe(r),t=j({threadKey:r,current:$t.current,remembered:e?hd(De.storage,De.publicKey??``,e):null,locale:ve,exists:!!rn.current});if(t.remember&&gd(De.storage,De.publicKey??``,t.remember),e)return t;let n=tn.current,i=de(r);if(n&&i)return nn.snapshotOf(i)||nn.remember(n.slotId,n.variant,!!x(i).variantKeyId),t;let a=R({threadKey:r,pick:en.current,exists:!!rn.current,locale:ve});return a?{...t,messageSlot:a}:t},[r,ve,De,nn]),on=q(()=>N?e=>{Qt.mark();let{threadKey:t,messageSlot:n}=an();return N({...e,threadKey:t,...n?{messageSlot:n}:{}})}:void 0,[N,Qt,an]),sn=G(t=>{if(t.sender?.kind===`visitor`&&Qt.mark(),e){Gf(yt,t),Yt(e=>e.some(e=>e.id===t.id)?e:[...e,t]);return}A?.(t)},[e,A,yt,Qt]),{fetchPage:cn}=ir(),ln=e?ld:cn,un=G((n,i)=>{if(e){sn({id:`gif-${n.id}-${Date.now()}`,direction:`INBOUND`,text:``,media:[{url:n.sourceUrl,mimetype:n.mimetype,alt:n.title}],sender:{kind:`visitor`,name:``},ageLabel:new Date().toLocaleTimeString(ve,{hour:`numeric`,minute:`2-digit`}),deliveryStatus:`SENT`});return}on&&(w?.(),on({text:``,threadKey:r??null,chatId:t??null,media:[{filename:n.title||`gif`,mimetype:n.mimetype||`image/gif`,giphyUrl:n.sourceUrl,gifKind:ar(i),previewUrl:n.previewUrl,previewWidth:n.previewWidth,previewHeight:n.previewHeight}]}))},[e,sn,on,w,r,t,ve]),[W,dn]=Y(()=>new Set(e?Wf(yt).consumed:[])),[fn,pn]=Y(null),hn=J(null);K(()=>()=>{hn.current&&clearTimeout(hn.current)},[]);let[gn,_n]=Y([]),[vn,yn]=Y(null),bn=J(null),xn=J(null),[Cn]=Ae(),[Tn]=B(),[En]=st(),Dn=fe(),On=J(new Set),kn=J(!0),An=J(!0),jn=J(0),Mn=J(!1);K(()=>{D===0&&(Mn.current=!1)},[D]);let Nn=G(()=>{if(!Mn.current&&D!==0&&(Mn.current=!0,O?.(),!(e||!t))){if(Dn){Dn.enqueue({op:`readAck`,semantics:`convergence`,convergenceKey:`read:${t}`,payload:{chatId:t}});return}En({variables:{chatId:t}}).catch(()=>{Mn.current=!1})}},[t,e,D,En,O,Dn]),[Pn,Fn]=Y(()=>new Set(e?Wf(yt).read:[]));K(()=>{e&&Kf(yt,W,Pn)},[e,yt,W,Pn]);let[In,Ln]=Y(null),Rn=(e,t)=>Ln({items:e,index:t}),{data:zn,loading:Bn,fetchMore:Vn,refetch:Hn}=Et({variables:{chatId:t??``,limit:10},skip:e||!t||!s,fetchPolicy:`cache-and-network`,nextFetchPolicy:`cache-first`});K(()=>{if(!m||e||!t||!s)return;let n=setTimeout(()=>{Hn?.().catch(()=>{})},700);return()=>clearTimeout(n)},[m,e,t,s,Hn]);let Wn=(()=>{let e=zn?.visitorChatHistory?.items;if(!Array.isArray(e)||e.length===0)return null;let t=e[e.length-1];return typeof t?.id==`string`?t.id:null})(),Gn=!!zn?.visitorChatHistory?.nextCursor,[Kn,Jn]=Y(!1),[Yn,Xn]=Y(!1),Zn=G(async()=>{if(!(e||!t||!Wn||Kn||Yn||!Gn)){Jn(!0);try{((await Vn({variables:{chatId:t,before:Wn,limit:10},updateQuery:(e,{fetchMoreResult:t})=>{if(!t)return e;let n=e.visitorChatHistory?.items??[],r=t.visitorChatHistory?.items??[],i=new Set(n.map(e=>typeof e.id==`string`?e.id:null).filter(e=>!!e)),a=[...n,...r.filter(e=>typeof e.id!=`string`||!i.has(e.id))];return{...e,visitorChatHistory:{...t.visitorChatHistory,items:a}}}})).data.visitorChatHistory?.items?.length??0)===0&&Xn(!0)}catch{}finally{Jn(!1)}}},[e,t,Wn,Kn,Yn,Gn,Vn]),Qn=J(()=>{});K(()=>{Qn.current=e=>rr(e)}),K(()=>{if(E)return E(e=>Qn.current(e))},[E]);let[$n,{loading:er}]=Fo(),[tr]=vt(),Q=J(0),nr=G(()=>{if(e||!s)return;let n=Date.now();n-Q.current<3e3||(Q.current=n,tr({variables:{chatId:t??void 0}}).catch(()=>void 0))},[tr,e,s,t]),rr=e=>{let t=e.from??e.sender,n=t?.kind,r=t?.name??``;if(e.kind===`typing`){pn(Em({name:n===`ai`||n===`bot`?Ee??`AI Agent`:r,kind:n,avatar:t?.avatar,phase:e.phase})),hn.current&&clearTimeout(hn.current),hn.current=setTimeout(()=>pn(null),8e3);return}if(e.kind===`read-receipt`){let t=e.readReceipt?.messageIds??[];t.length>0&&Fn(e=>{let n=new Set(e);for(let e of t)n.add(e);return n});return}hn.current&&(clearTimeout(hn.current),hn.current=null),pn(null)},or=q(()=>e?[]:Un(zn,ve,Ee??`AI Agent`),[e,zn,ve,Ee]),$=Tm(q(()=>e?Zt:$f(or,Zt),[e,Zt,or])),sr=J(0);sr.current===0&&D>0&&(sr.current=D);let[cr,lr]=Y(null),ur=J(null),dr=J(!1),fr=J(null),pr=J(null);pr.current=cr,K(()=>{if(dr.current||Bn)return;dr.current=!0;let t=sr.current;if(t>0&&$.length>0&&!e){let e=Dm($,t,fr.current);e&&lr(e)}},[Bn,$,e]),Sn(()=>{if(!cr)return;let e=ur.current;e&&(gr.current=!0,e.scrollIntoView({block:`center`,behavior:`auto`}))},[cr]),K(()=>{if(!cr)return;let e=setTimeout(()=>{pr.current=null,lr(null)},Ym);return()=>clearTimeout(e)},[cr]);let mr=J(h);K(()=>{let t=h&&!mr.current;if(mr.current=h,!t)return;let n=null;if(D>0&&$.length>0&&!e){let e=0;for(let t=$.length-1;t>=0;t--)if($[t].direction===`OUTBOUND`&&(e+=1,e===D)){n=$[t].id;break}}pr.current=n,gr.current=!1,lr(n)},[h,D,$,e]),K(()=>{let e=bn.current;if(!e)return;let t=()=>{let t=e.scrollHeight-e.scrollTop-e.clientHeight,n=t<80;kn.current=n,Nt(t>160),n&&(An.current=!0),e.scrollTop<120&&Zn()};t(),e.addEventListener(`scroll`,t,{passive:!0});let n=t=>{let n=t.target;(n instanceof HTMLImageElement||n instanceof HTMLVideoElement)&&(!(Date.now()<jn.current)&&(!kn.current||!An.current)||e.scrollTo({top:e.scrollHeight,behavior:`auto`}))},r=()=>{jn.current=0};return e.addEventListener(`load`,n,!0),e.addEventListener(`wheel`,r,{passive:!0}),e.addEventListener(`touchmove`,r,{passive:!0}),e.addEventListener(`keydown`,r),()=>{e.removeEventListener(`wheel`,r),e.removeEventListener(`touchmove`,r),e.removeEventListener(`keydown`,r),e.removeEventListener(`scroll`,t),e.removeEventListener(`load`,n,!0)}},[Zn]);let hr=J(null);K(()=>{let e=bn.current;if(!e)return;if(Kn){hr.current={scrollTop:e.scrollTop,scrollHeight:e.scrollHeight};return}let t=hr.current;if(!t)return;hr.current=null;let n=e.scrollHeight-t.scrollHeight;n>0&&(e.scrollTop=t.scrollTop+n)},[Kn]);let gr=J(!1),_r=J(0);jm(bn,()=>An.current&&!pr.current&&!(sr.current>0&&!dr.current),`${$.length}:${+!!fn}`),Sn(()=>{let e=bn.current;if(!e)return;let t=!gr.current&&$.length>0,n=_r.current,r=$.length>n;_r.current=$.length;let i=$[$.length-1],a=r&&!t&&!!i&&i.sender.kind!==`visitor`,o=r?$[n]:null,s=r&&Qt.consume()&&!t&&!!i&&i.sender.kind===`visitor`;if(Sm({isInitial:t,atBottom:kn.current,isVisitorSend:s}))return;let c=e.firstElementChild,l=(n=!1)=>{if(!Sm({isInitial:t,atBottom:kn.current,isVisitorSend:s})&&!(!s&&(pr.current||sr.current>0&&!dr.current))){if(a){if(An.current=!1,!kn.current)return;let t=o?e.querySelector(`[data-message-id="${o.id}"]`):null;if(!t)return;let n=t.getBoundingClientRect().height,r=e.clientHeight;if(n<=r*.6)e.scrollTo({top:e.scrollHeight-r,behavior:`smooth`}),An.current=!0,jn.current=Date.now()+3e3;else{let n=e.getBoundingClientRect(),i=t.getBoundingClientRect().top-n.top+e.scrollTop-(r-80),a=Math.max(0,Math.min(e.scrollHeight-r,i));e.scrollTo({top:a,behavior:`smooth`})}return}s&&(An.current=!0),!(!t&&!An.current)&&e.scrollTo({top:e.scrollHeight,behavior:t||n?`auto`:`smooth`})}};l(),t&&(gr.current=!0,kn.current=!0);let u=requestAnimationFrame(()=>l()),d=null;if(c&&typeof ResizeObserver<`u`){d=new ResizeObserver(()=>l(!0)),d.observe(c);let e=window.setTimeout(()=>d?.disconnect(),2e3);return()=>{cancelAnimationFrame(u),clearTimeout(e),d?.disconnect()}}return()=>cancelAnimationFrame(u)},[$.length,fn,cr,h]),K(()=>{if(!h||D===0)return;let e=bn.current;if(!e)return;let t=()=>{e.scrollHeight-e.scrollTop-e.clientHeight<=20&&Nn()};return t(),e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[h,D,Nn,$.length]);let vr=(()=>{for(let e=$.length-1;e>=0;e--){let t=$[e];if(t.direction!==`OUTBOUND`)break;if(t.buttons&&t.buttons.length>0&&!W.has(t.id))return t.id}return null})(),yr=J(he);yr.current=he;let br=(e,t)=>{let n=`tmp-${Date.now()}`;sn({id:n,direction:`INBOUND`,text:e,...t&&t.length>0?{media:t}:{},ageLabel:`now`,sender:{kind:`visitor`,name:`You`},deliveryStatus:`DELIVERED`}),w?.(),setTimeout(()=>{let t=qf(e,yr.current);t.text&&(sn({id:`tmp-fin-${Date.now()}`,direction:`OUTBOUND`,text:t.text,ageLabel:`now`,sender:{kind:`ai`,name:Xe},buttons:t.buttons}),Fn(e=>{let t=new Set(e);return t.add(n),t}),C?.())},900)},xr=J(!1),Sr=Xf(he);K(()=>{!e||!ee||!Sr||xr.current||(xr.current=!0,br(ee),te?.())},[e,ee,Sr]);let Cr=(n,i)=>{if(i.type===`url`){gu(i.url)&&(be({url:i.url,targetType:`CTA_URL`,targetRefId:n,title:i.text}),_u(i.url));return}if(i.type===`phone`){bu(i.phoneNumber);return}if(i.type&&i.type!==`callback`)return;if(dn(e=>{let t=new Set(e);return t.add(n),t}),e){br(i.text);return}if(on){w?.(),on({text:i.text,threadKey:r??null,chatId:t??null,buttonValue:i.payload||void 0});return}let a=`tmp-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;sn({id:a,clientKey:a,direction:`INBOUND`,text:i.text,ageLabel:`now`,sender:{kind:`visitor`,name:``},deliveryStatus:`SENT`}),w?.(),$n({variables:{input:{text:i.text,buttonValue:i.payload||void 0,...Qm(an())}}}).then(e=>{let t=e.data?.sendVisitorMessage?.messageId;t&&M?.(a,{id:t,direction:`INBOUND`,text:i.text,ageLabel:`now`,sender:{kind:`visitor`,name:``},deliveryStatus:`DELIVERED`})}).catch(()=>{})},wr=async t=>{yn(null);let n=pd(t);if(!dd.has(n)){yn(L(`fileMimeNotAllowed`));return}if(t.size>10485760){yn(L(`fileTooLarge`));return}if(e){_n(e=>[...e,{tempId:`upl-${Date.now()}`,filename:t.name,mimetype:n,mediaId:`demo-media`,url:URL.createObjectURL(t)}]);return}let r=`upl-${Date.now()}`,i=URL.createObjectURL(t),{base64:a}=await ud(t);if(Dn&&!Dn.online){_n(e=>[...e,{tempId:r,filename:t.name,mimetype:n,mediaId:null,url:i,dataBase64:a,uploading:!1}]);return}_n(e=>[...e,{tempId:r,filename:t.name,mimetype:n,mediaId:null,url:i,dataBase64:a,uploading:!0}]);try{let e=(await Cn({variables:{input:{filename:t.name,mimetype:n,dataBase64:a}}})).data?.uploadVisitorMedia;if(!e)throw Error(`empty upload response`);On.current.delete(r)&&Tn({variables:{mediaId:e.mediaId}}).catch(()=>void 0),e.url&&URL.revokeObjectURL(i),_n(t=>t.map(t=>t.tempId===r?{...t,mediaId:e.mediaId,dataBase64:void 0,uploading:!1,...e.url?{url:e.url}:{}}:t))}catch{_n(e=>e.map(e=>e.tempId===r?{...e,uploading:!1}:e))}},Tr=t=>{let n=gn.find(e=>e.tempId===t);n?.url?.startsWith(`blob:`)&&URL.revokeObjectURL(n.url),n&&!e&&(n.mediaId?Tn({variables:{mediaId:n.mediaId}}).catch(()=>void 0):On.current.add(t)),_n(e=>e.filter(e=>e.tempId!==t))},Er=async()=>{yn(null),await _t()&&zt(!0)},Dr=async n=>{if(zt(!1),n.size>10485760){yn(L(`fileTooLarge`));return}if(e){let e=qn(n.base64,n.mimetype),t=URL.createObjectURL(e),r=`tmp-voice-${Date.now()}`;sn({id:r,direction:`INBOUND`,text:``,ageLabel:`now`,sender:{kind:`visitor`,name:`You`},media:[{url:t,mimetype:n.mimetype,alt:n.filename}],deliveryStatus:`DELIVERED`}),w?.(),setTimeout(()=>{let e=Jf(yr.current);e&&(sn({id:`tmp-fin-${Date.now()}`,direction:`OUTBOUND`,text:e,ageLabel:`now`,sender:{kind:`ai`,name:Xe}}),Fn(e=>{let t=new Set(e);return t.add(r),t}),C?.())},900);return}if(on){let e;try{let t=(await Cn({variables:{input:{filename:n.filename,mimetype:n.mimetype,dataBase64:n.base64}}})).data?.uploadVisitorMedia;if(!t?.mediaId)throw Error(`empty upload response`);e=[{filename:n.filename,mimetype:n.mimetype,mediaId:t.mediaId,...t.url?{s3Url:t.url}:{}}]}catch{e=[{filename:n.filename,mimetype:n.mimetype,dataBase64:n.base64}]}w?.(),on({text:``,threadKey:r??null,chatId:t??null,media:e});return}try{let e=(await Cn({variables:{input:{filename:n.filename,mimetype:n.mimetype,dataBase64:n.base64}}})).data?.uploadVisitorMedia,t=e?.mediaId;if(!t)throw Error(`empty upload response`);let i=e?.url??URL.createObjectURL(qn(n.base64,n.mimetype)),a=`tmp-voice-${Date.now()}`;sn({id:a,clientKey:a,direction:`INBOUND`,text:``,ageLabel:`now`,sender:{kind:`visitor`,name:``},media:[{url:i,mimetype:n.mimetype,alt:n.filename}],deliveryStatus:`SENT`}),await $n({variables:{input:{mediaIds:[t],...r?{threadKey:r}:{}}}}),w?.()}catch{yn(L(`uploadFailed`))}},Or=e=>{zt(!1),yn(L(e===`unsupported`?`voiceUnsupported`:e===`denied`?`voiceDenied`:`uploadFailed`))},kr=Vf(async()=>{let n=xt.get().text,i=xt.get().html,o=n.trim(),s=gn.map(e=>e.mediaId).filter(e=>!!e),c=gn.some(e=>!!e.mediaId||!!e.dataBase64);if(!o&&!c||er||Ve||n.length>4e3)return;let l=Of(i),u=Af(l)?l:o,d=gn.filter(e=>!!e.mediaId&&!!e.url).map(e=>({url:e.url,mimetype:e.mimetype,alt:e.filename}));if(!await _t())return;if(e){Gt(),_n([]),br(u,d);return}if(on){let e=gn.filter(e=>!!e.mediaId||!!e.dataBase64).map(e=>({filename:e.filename,mimetype:e.mimetype,...e.mediaId?{mediaId:e.mediaId}:{},...e.mediaId&&e.url?{s3Url:e.url}:{},...!e.mediaId&&e.dataBase64?{dataBase64:e.dataBase64}:{}}));Gt(),_n([]),w?.(),on({text:u,threadKey:r??null,chatId:t??null,...e.length>0?{media:e}:{}});return}let f=`tmp-${Date.now()}`;sn({id:f,clientKey:f,direction:`INBOUND`,text:u,ageLabel:`now`,sender:{kind:`visitor`,name:``},...d.length>0?{media:d}:{},deliveryStatus:`SENT`}),Gt(),_n([]);try{let e=await $n({variables:{input:{...u?{text:u}:{},...s.length>0?{mediaIds:s}:{},...Qm(an())}}});w?.();let n=e.data?.sendVisitorMessage;n?.chatId&&n.chatId!==t&&a?.(n.chatId);let r=n?.messageId;r&&M?.(f,{id:r,direction:`INBOUND`,text:u,ageLabel:`now`,sender:{kind:`visitor`,name:``},...d.length>0?{media:d}:{},deliveryStatus:`DELIVERED`})}catch{}}),Ar=async t=>{if(Ot(!1),!await _t())return;if(e){br(t);return}let n=`tmp-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;sn({id:n,clientKey:n,direction:`INBOUND`,text:t,ageLabel:`now`,sender:{kind:`visitor`,name:``},deliveryStatus:`SENT`}),w?.();try{let e=(await $n({variables:{input:{text:t,...r?{threadKey:r}:{}}}})).data?.sendVisitorMessage?.messageId;e&&M?.(n,{id:e,direction:`INBOUND`,text:t,ageLabel:`now`,sender:{kind:`visitor`,name:``},deliveryStatus:`DELIVERED`})}catch{}},jr=gn.some(e=>e.mediaId===null),Mr=de(r),Nr=l?.messageSlots!==void 0||!!Mr&&!!nn.snapshotOf(Mr),{welcomes:Pr,held:Fr,slotPick:Ir,welcomePick:Lr,localHeader:Rr,seedTexts:zr}=Km({publicSlots:l?.messageSlots??Jm,active:Nr,isOpen:h,threadKey:r,welcomeSlotId:ne,token:s}),Br=Nr?Pr.map(e=>({kind:e.kind,text:e.variant.text,slotId:e.slotId,variantId:e.variant.id,buttons:e.variant.buttons})):e&&!(l?.messages&&l.messages.length>0)?_e(he):l?.messages??[],Vr=Br.filter(e=>e.kind===`SYSTEM`),Hr=Br.filter(e=>e.kind===`HINT`);$t.current=Ir,en.current=Lr,tn.current=Rr;let Ur=$.length===0,Wr=!e&&(Ir??Lr)!==null&&($.some(e=>e.direction===`OUTBOUND`)||!!t&&$.length===0),Gr=Br.filter(e=>e.kind===`MESSAGE`),Kr=e?null:Qf($,zr);fr.current=Kr?.id??null;let qr=!!Kr&&Gr.some(e=>Zf(e.text)===Zf(Kr.text??``)),Yr=Kr?qr?Gr:[]:Wr?[]:Gr,Xr=Yr.length>0?Yr.length:+!!Kr,Zr=ye(r);Sn(()=>{if(Xr===0&&!Fr){Ft(null);return}if(!Ur||It.current.has(Zr)){Ft(!1);return}Ft(!0);let e=Lt.current.get(Zr)??Date.now();Lt.current.set(Zr,e);let t=setTimeout(()=>{Ft(!1),It.current.add(Zr)},Math.max(0,3e3-(Date.now()-e)));return()=>clearTimeout(t)},[Ur,Xr,Zr,Fr]);let Qr=q(()=>Yr.length===0&&Kr?[{...Kr,id:`welcome-msg-0`}]:Yr.map((e,t)=>({id:`welcome-msg-${t}`,direction:`OUTBOUND`,text:e.text,ageLabel:``,sender:{kind:`ai`,name:Ee??``},...e.buttons&&e.buttons.length>0?{buttons:e.buttons.map(e=>({text:e.label,payload:``}))}:{}})),[Yr,Kr,Ee]),$r=e||ht||!Gn&&(!Bn||$.length>0);l?.showRelatedNews,l?.showRelatedHelpArticles,l?.showReactionCounts;let[ei,ti]=Y(()=>new Set),ni=!ei.has(Zr)&&!$.some(e=>e.direction===`INBOUND`),ri=(e,t)=>{ti(e=>new Set(e).add(Zr));let n=e.buttons?.find(e=>e.label===t.text);if(e.slotId&&e.variantId&&n){let t={slotId:e.slotId,variantId:e.variantId,buttonId:n.id};Se({source:`WELCOME_MESSAGE`,...t}),we.onMessageAction?.({...t,actionType:`QUICK_REPLY`,source:`WELCOME`})}Cr(`welcome-${e.slotId??``}`,{text:t.text,payload:``})};km({text:ee,enabled:!e&&!!on&&(Ir!==null||Rr!==null),send:e=>{ti(e=>new Set(e).add(Zr)),w?.(),on?.({text:e,threadKey:r??null,chatId:t??null})},onSent:te});let ii=q(()=>am(Kr?$.filter(e=>e.id!==Kr.id):$,{locale:ve,todayLabel:L(`today`),yesterdayLabel:L(`yesterday`),unreadAnchorId:cr}),[$,Kr,ve,L,cr]),ai=_d(Cr),si=_d(Rn),ci=_d(pe),li=_d(e=>P?.(e)),ui=G(()=>{let e=bn.current;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},[]);return Z(`div`,{className:`flex flex-1 flex-col overflow-hidden`,children:[Z(`div`,{className:`relative flex flex-1 flex-col overflow-hidden`,children:[X(ze,{className:`flex-1`,viewportRef:bn,children:Z(`div`,{className:`flex flex-col gap-3 px-4 pt-4 pb-3`,children:[$r&&Vr.length>0&&X(il,{enabled:l?.messageSlots!==void 0,id:Pr.filter(e=>e.kind===`SYSTEM`).map(e=>e.variant.id).join(`|`),children:X(`div`,{className:`flex flex-col gap-2`,children:Vr.map(e=>X(Jp,{kind:e.kind,text:e.text},`${e.kind}:${e.text}`))})}),$r&&(Xr>0||Fr)&&Pt!==null&&X(kt,{mode:`wait`,initial:!1,children:Pt||Fr?X(Wp,{actorName:Ee??``,actorKind:`ai`,aiAssistantName:Ee,aiAssistantAvatarUrl:l?.aiAssistantAvatar??null,organizationLogoUrl:d,organizationName:f},`welcome-typing`):X(o.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.24,ease:`easeOut`},className:`flex flex-col gap-3`,children:Qr.map((e,t)=>X(Ip,{message:e,buttonsActive:ni&&!Kr,onButtonClick:e=>ri(Yr[t],e),aiAssistantAvatarUrl:l?.aiAssistantAvatar??null,aiAssistantName:Ee,organizationLogoUrl:d,organizationName:f},e.id))},`welcome-msgs`)}),$r&&Hr.length>0&&X(`div`,{className:`flex flex-col gap-2`,children:Hr.map(e=>X(Jp,{kind:e.kind,text:e.text},`${e.kind}:${e.text}`))}),!ht&&Z(wn,{children:[Bn&&$.length===0&&Z(`div`,{className:`flex flex-col gap-3`,children:[Z(`div`,{className:`flex items-start gap-2`,children:[X(U,{className:`h-7 w-7 shrink-0 rounded-full`}),X(U,{className:`h-10 w-3/4 rounded-wx-lg`})]}),X(`div`,{className:`flex flex-row-reverse items-start`,children:X(U,{className:`h-8 w-2/3 rounded-wx-lg`})}),Z(`div`,{className:`flex items-start gap-2`,children:[X(U,{className:`h-7 w-7 shrink-0 rounded-full`}),X(U,{className:`h-12 w-4/5 rounded-wx-lg`})]})]}),X(em,{rows:ii,readMessageIds:Pn,isDummy:e,operatorAvatarSrc:p?.[0]?.src,activeButtonMessageId:vr,unreadLabel:L(`unreadMessages`),unreadDividerRef:ur,organizationLogoUrl:d,organizationName:f,aiAssistantAvatarUrl:l?.aiAssistantAvatar??null,aiAssistantName:Ee,onQuickReply:ai,onOpenLightbox:si,onInternalLink:pe?ci:void 0,onRetry:P?li:void 0})]}),!ht&&fn&&X(Wp,{actorName:fn.name,actorKind:fn.kind,actorAvatarUrl:fn.avatar,actorPhase:fn.phase,aiAssistantName:Ee,aiAssistantAvatarUrl:l?.aiAssistantAvatar??null,organizationLogoUrl:d,organizationName:f})]})}),X(kt,{children:Mt&&X(o.button,{type:`button`,onClick:ui,"aria-label":L(`scrollToLatest`),initial:{opacity:0,y:12,x:`-50%`},animate:{opacity:1,y:0,x:`-50%`},exit:{opacity:0,y:12,x:`-50%`},transition:{duration:.18,ease:`easeOut`},whileHover:{scale:1.1},whileTap:{scale:.94},className:`absolute bottom-3 left-1/2 z-10 flex size-9 items-center justify-center rounded-full border border-wx-border bg-wx-bg text-wx-fg-muted shadow-md transition-colors hover:text-wx-fg`,children:X(Tt,{className:`size-5`})})})]}),Z(`div`,{className:`relative bg-wx-bg px-3 pt-2 pb-3`,children:[g===`pending`&&!V&&!H&&X(`div`,{className:`mb-2 flex justify-center`,children:X(`span`,{className:`rounded-wx-sm bg-wx-bg-elevated px-3 py-1 text-center text-[11px] text-wx-fg-muted`,children:_&&xo(_,L,ve)||L(`connectingOperator`)})}),X(gf,{open:Ct,onClose:()=>wt(!1),onSelect:Wt,anchorRef:Vt}),X(mn,{fallback:null,children:X(Zm,{open:At,onClose:()=>jt(!1),fetchPage:ln,onPick:un,anchorRef:Ht})}),vn&&X(`p`,{className:`mb-2 text-xs text-wx-danger`,children:vn}),X(kt,{mode:`wait`,initial:!1,children:H?Z(o.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},className:`flex flex-col items-center gap-3 rounded-wx-lg border border-wx-border bg-wx-bg p-4`,children:[X(`p`,{className:`text-center text-sm text-wx-fg-muted`,children:L(gt?`visitorBlocked`:`conversationBlocked`)}),!gt&&S&&X(Kt,{type:`button`,onClick:S,className:`w-full`,children:L(`startNewConversation`)})]},`blocked`):V?Z(o.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},className:`flex flex-col items-center gap-2 rounded-wx-lg border border-wx-border bg-wx-bg p-4`,children:[X(`p`,{className:`text-center font-semibold text-sm text-wx-fg`,children:L(`conversationClosedTitle`)}),X(`p`,{className:`text-center text-xs text-wx-fg-muted`,children:L(`conversationClosedHint`)}),S&&X(Kt,{type:`button`,onClick:S,className:`mt-1 w-full`,children:L(`startNewConversation`)})]},`closed`):ht?Z(o.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},className:`flex flex-col items-center gap-2 rounded-wx-lg border border-wx-border bg-wx-bg p-4`,children:[X(`p`,{className:`text-center text-sm text-wx-fg-muted`,children:L(`signInToChat`)}),X(`div`,{className:`flex w-full flex-col gap-2`,children:mt?Z(wn,{children:[ie?.google?.enabled&&X(`button`,{type:`button`,onClick:()=>dt(!0),className:`flex w-full items-center justify-center gap-2 rounded-wx border border-wx-border bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated-2`,children:L(`googleSignInDemo`)}),ie?.passkey?.enabled&&X(`button`,{type:`button`,onClick:()=>dt(!0),className:`flex w-full items-center justify-center gap-2 rounded-wx border border-wx-border bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated-2`,children:L(`passkeySignIn`)}),!ie?.google?.enabled&&!ie?.passkey?.enabled&&X(`p`,{className:`text-center text-xs text-wx-fg-subtle`,children:L(`signInUnavailable`)})]}):Z(wn,{children:[ft&&X(xd,{clientId:ft,onCredential:e=>le?.(e)}),pt&&X(Gd,{onSession:ue}),!ft&&!pt&&X(`p`,{className:`text-center text-xs text-wx-fg-subtle`,children:L(`signInUnavailable`)})]})})]},`auth-gate`):Rt?X(mn,{fallback:X(`div`,{className:`h-13 w-full animate-pulse rounded-wx-lg bg-wx-bg-elevated`}),children:X(Xm,{onComplete:Dr,onCancel:()=>zt(!1),onError:Or})},`recorder`):Z(o.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},className:u(`flex flex-col rounded-wx-lg border border-wx-border bg-wx-bg`,`focus-within:border-wx-primary focus-within:ring-2 focus-within:ring-wx-primary/20`,`transition-colors`),children:[gn.length>0&&X(`div`,{className:`px-3 pt-3 pb-1`,children:X(Zd,{attachments:gn,onRemove:Tr,onOpenLightbox:Rn})}),ot&&c&&Z(wn,{children:[X(_m,{form:c,values:nt,locked:et.locked,errors:Pe,onChange:Ue,disabled:Ve}),Le&&X(`p`,{className:`px-3 pt-1.5 text-[11px] text-wx-danger`,children:Le})]}),X(Rf,{ref:Bt,placeholder:L(`sendCta`),ariaLabel:L(`sendCta`),initialHtml:xt.get().html,onChange:({html:e,text:t})=>xt.set(t,e),onTyping:nr,onEnter:kr,maxChars:$d}),Z(`div`,{className:`flex items-center justify-between px-1.5 pt-0.5 pb-1.5`,children:[Z(`div`,{className:`flex items-center gap-0.5`,children:[X(`input`,{ref:xn,type:`file`,accept:Array.from(dd).join(`,`),className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&wr(t),e.target.value=``}}),X(o.button,{type:`button`,"aria-label":L(`attach`),onClick:()=>xn.current?.click(),whileHover:{scale:1.12},whileTap:{scale:.9},transition:{type:`spring`,stiffness:400,damping:20},className:`flex h-7 w-7 items-center justify-center rounded-full text-wx-fg-muted transition-colors hover:bg-wx-bg-elevated hover:text-wx-fg`,children:X(zs,{size:14})}),X(o.button,{ref:Vt,type:`button`,"aria-label":L(`emoji`),"aria-expanded":Ct,onClick:()=>{jt(!1),wt(e=>!e)},whileHover:{scale:1.12},whileTap:{scale:.9},transition:{type:`spring`,stiffness:400,damping:20},className:u(`flex h-7 w-7 items-center justify-center rounded-full transition-colors`,Ct?`bg-wx-bg-elevated text-wx-fg`:`text-wx-fg-muted hover:bg-wx-bg-elevated hover:text-wx-fg`),children:X(qs,{size:14})}),X(o.button,{ref:Ht,type:`button`,"aria-label":L(`giphy.title`),"aria-expanded":At,onClick:()=>{wt(!1),Ot(!1),jt(e=>!e)},whileHover:{scale:1.12},whileTap:{scale:.9},transition:{type:`spring`,stiffness:400,damping:20},className:u(`flex h-7 w-7 items-center justify-center rounded-full transition-colors`,At?`bg-wx-bg-elevated text-wx-fg`:`text-wx-fg-muted hover:bg-wx-bg-elevated hover:text-wx-fg`),children:X(`span`,{className:`font-bold text-[10px] leading-none tracking-tight`,children:`GIF`})}),(l?.commands?.length??0)>0&&Z(`div`,{className:`relative`,children:[X(o.button,{ref:Ut,type:`button`,"aria-label":L(`commands`),"aria-expanded":Dt,onClick:()=>{jt(!1),Ot(e=>!e)},whileHover:{scale:1.12},whileTap:{scale:.9},transition:{type:`spring`,stiffness:400,damping:20},className:u(`flex h-7 w-7 items-center justify-center rounded-full transition-colors`,Dt?`bg-wx-bg-elevated text-wx-fg`:`text-wx-fg-muted hover:bg-wx-bg-elevated hover:text-wx-fg`),children:X(vs,{size:14})}),X(kt,{children:Dt&&X(o.div,{"data-wx-commands-panel":!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.12},className:`absolute bottom-full left-0 z-10 mb-2 w-44 overflow-hidden rounded-lg border border-wx-border bg-wx-bg shadow-lg`,children:X(`ul`,{className:`flex flex-col py-1`,children:l?.commands.map(e=>X(`li`,{children:X(`button`,{type:`button`,onClick:()=>Ar(e),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs font-mono text-wx-fg hover:bg-wx-bg-elevated`,children:e})},e))})})})]})]}),X(rf,{draft:xt,hasAttachments:gn.length>0,busy:er||jr,onSend:kr,onMic:Er,ariaLabels:{send:L(`sendCta`),mic:L(`record`)}})]})]},`composer`)})]}),X(at,{items:In?.items??[],initialIndex:In?.index??0,open:!!In,onClose:()=>Ln(null)})]})}function eh(){return Z(`div`,{className:`flex h-full min-h-0 flex-col gap-4 px-4 py-5`,"aria-hidden":`true`,children:[Z(`div`,{className:`flex items-end gap-2`,children:[X(U,{className:`h-7 w-7 shrink-0 rounded-full`}),X(U,{className:`h-9 w-1/2 rounded-wx-lg`})]}),Z(`div`,{className:`flex items-end gap-2`,children:[X(U,{className:`h-7 w-7 shrink-0 rounded-full`}),X(U,{className:`h-16 w-3/4 rounded-wx-lg`})]}),X(`div`,{className:`flex justify-end`,children:X(U,{className:`h-9 w-2/5 rounded-wx-lg`})}),Z(`div`,{className:`flex items-end gap-2`,children:[X(U,{className:`h-7 w-7 shrink-0 rounded-full`}),X(U,{className:`h-11 w-2/3 rounded-wx-lg`})]})]})}function th({threads:e,loading:t=!1,loadError:r=!1,onRetry:a,avatarUrl:o,onOpenThread:s,onNewQuestion:c,blocked:l=!1,slotThread:d=null}){let f=i(`messages`),p=n();return Z(`div`,{className:`relative flex h-full min-h-0 flex-col`,children:[X(ze,{className:`min-h-0 flex-1`,children:t&&e.length===0?X(rh,{}):r&&e.length===0?Z(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-2 px-6 py-16 text-center`,children:[X(`p`,{className:`font-semibold text-base text-wx-fg`,children:f(`threadsErrorTitle`)}),X(`p`,{className:`text-sm text-wx-fg-muted`,children:f(`threadsErrorBody`)}),a&&X(`button`,{type:`button`,onClick:a,className:`mt-1 font-medium text-sm text-wx-primary underline-offset-2 hover:underline`,children:f(`retry`)})]}):e.length===0&&d?X(`ul`,{"data-wx-thread-list":``,className:`flex flex-col pb-[4.5rem]`,children:X(nh,{thread:d,avatarUrl:o,locale:p,onClick:()=>s(d)})}):e.length===0?Z(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-2 px-6 py-16 text-center`,children:[X(`p`,{className:`font-semibold text-base text-wx-fg`,children:f(`threadsEmptyTitle`)}),X(`p`,{className:`text-sm text-wx-fg-muted`,children:f(`threadsEmptyBody`)})]}):X(`ul`,{"data-wx-thread-list":``,className:`flex flex-col pb-[4.5rem]`,children:e.map(e=>X(nh,{thread:e,avatarUrl:o,locale:p,onClick:()=>s(e)},e.chatId||e.threadKey||e.updatedAt))})}),X(`div`,{"data-wx-thread-cta":``,className:`pointer-events-none absolute inset-x-0 bottom-0 flex justify-center bg-gradient-to-t from-wx-bg via-wx-bg/80 to-transparent px-4 pt-6 pb-3`,children:l?X(`p`,{className:`pointer-events-auto px-4 py-2 text-center text-[13px] text-wx-fg-muted`,children:f(`visitorBlocked`)}):Z(`button`,{type:`button`,onClick:c,className:u(`pointer-events-auto inline-flex items-center gap-2 rounded-full px-4 py-2`,`bg-wx-primary font-semibold text-[13px] text-wx-primary-fg shadow-sm`,`transition-transform duration-150 ease-out hover:scale-[1.04] active:scale-95`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg`),children:[X(Ys,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`}),X(`span`,{children:f(`askQuestion`)})]})})]})}function nh({thread:e,avatarUrl:t,locale:n,onClick:r}){let a=i(`messages`),o=i(`home`),s=e.unreadCount>0,c=!!e.typing,l=e.assignedStatus===`connected`,d=e.lastSenderKind===`operator`&&e.lastSenderName?e.lastSenderName:e.lastSenderKind&&e.lastSenderKind!==`visitor`?e.senderName:l&&e.assignedOperatorName?e.assignedOperatorName:e.senderName,f=e.preview?.media?`${Wo(e.preview.mediaType)} ${e.preview.text||o(`recentMessageAttachment`)}`:e.preview?.text??``,p=e.preview?e.preview.fromVisitor?a(`previewYou`,{text:f}):f:``,m=e.preview?.at??e.updatedAt;return X(`li`,{children:Z(`button`,{type:`button`,onClick:r,className:u(`flex w-full items-start gap-3 border-wx-border border-b px-4 py-3.5 text-left`,`transition-colors last:border-b-0 hover:bg-wx-bg-elevated-2`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-wx-primary`),children:[X(ih,{src:e.senderAvatar??t}),Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[Z(`div`,{className:`flex items-baseline gap-2`,children:[Z(`span`,{className:u(`flex min-w-0 flex-1 items-center gap-1.5 truncate text-sm text-wx-fg`,s?`font-semibold`:`font-medium`),children:[l&&X(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full bg-wx-success`,"aria-hidden":`true`}),X(`span`,{className:`truncate`,children:d})]}),X(`span`,{className:`shrink-0 text-[11px] text-wx-fg-subtle`,children:ah(m,n)})]}),Z(`div`,{className:`flex items-center gap-2`,children:[c?X(`span`,{className:`min-w-0 flex-1 truncate text-[13px] text-wx-primary italic`,children:a(`typing`)}):X(`span`,{className:u(`min-w-0 flex-1 truncate text-[13px]`,s?`text-wx-fg`:`text-wx-fg-muted`),children:p}),s&&!c&&X(`span`,{className:`h-2 w-2 shrink-0 rounded-full bg-wx-primary`,"aria-hidden":`true`})]})]})]})})}function rh(){return X(`ul`,{className:`flex flex-col`,"aria-hidden":`true`,children:[0,1,2].map(e=>Z(`li`,{className:`flex items-start gap-3 border-wx-border border-b px-4 py-3.5`,children:[X(U,{className:`mt-0.5 h-9 w-9 shrink-0 rounded-full`}),Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2 pt-1`,children:[X(U,{className:`h-3.5 w-28`}),X(U,{className:`h-3 w-3/4`})]})]},e))})}function ih({src:e}){return e?X(`img`,{src:e,alt:``,className:`mt-0.5 h-9 w-9 shrink-0 rounded-full object-cover`}):X(`div`,{className:`mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-wx-bg-elevated-2 text-wx-fg-muted`,"aria-hidden":`true`,children:X(fs,{className:`h-5 w-5`})})}function ah(e,t){let n=new Date(e).getTime();if(Number.isNaN(n))return``;let r=Math.round((n-Date.now())/1e3),i=Math.abs(r),a=new Intl.RelativeTimeFormat(t,{numeric:`auto`,style:`narrow`});return i<60?a.format(Math.round(r),`second`):i<3600?a.format(Math.round(r/60),`minute`):i<86400?a.format(Math.round(r/3600),`hour`):i<604800?a.format(Math.round(r/86400),`day`):a.format(Math.round(r/604800),`week`)}function oh({field:e,value:t,uploading:n,onPick:r,onClear:i,displayName:a,t:o}){let s=J(null),[c,l]=Y(!1);K(()=>{l(!1)},[t]);let d=a.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``),f=e.pinned;return Z(`div`,{className:`flex flex-col items-center gap-2.5 pt-4 pb-2`,children:[Z(`div`,{className:`group relative`,children:[X(`span`,{"aria-hidden":`true`,className:`absolute -inset-2 rounded-full bg-wx-primary/20 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100`}),Z(`button`,{type:`button`,disabled:f||n,onClick:()=>s.current?.click(),"aria-label":o(`uploadAvatar`),style:{height:88,width:88},className:u(`relative flex items-center justify-center overflow-hidden rounded-full`,`bg-gradient-to-br from-wx-bg-elevated to-wx-bg-elevated-2 text-2xl font-semibold text-wx-fg-muted`,`ring-1 ring-inset ring-wx-border`,!f&&!n&&`cursor-pointer transition-transform duration-200 hover:scale-[1.04]`,f&&`cursor-not-allowed`),children:[t&&!c?X(`img`,{src:t,alt:``,className:`h-full w-full object-cover`,referrerPolicy:`no-referrer`,onError:()=>l(!0)}):d?X(`span`,{"aria-hidden":`true`,children:d}):X(ps,{size:26,"aria-hidden":`true`}),!f&&X(`span`,{className:`absolute inset-x-0 bottom-0 flex h-7 items-center justify-center bg-black/45 opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100`,children:n?X(js,{size:14,className:`animate-spin text-white`,"aria-hidden":`true`}):X(Ts,{size:14,className:`text-white`,"aria-hidden":`true`})})]}),f&&X(`span`,{className:`absolute right-0 bottom-0 flex h-6 w-6 items-center justify-center rounded-full bg-wx-bg shadow-sm ring-1 ring-wx-border`,children:X(Ms,{size:11,className:`text-wx-fg-subtle`,"aria-hidden":`true`})}),!f&&t&&X(`button`,{type:`button`,onClick:i,"aria-label":o(`removeAvatar`),className:`-top-1 -right-1 absolute flex h-7 w-7 items-center justify-center rounded-full border border-wx-border bg-wx-bg text-wx-fg-muted shadow-sm transition-colors hover:bg-wx-bg-elevated hover:text-wx-danger`,children:X($s,{size:12,"aria-hidden":`true`})}),X(`input`,{ref:s,type:`file`,accept:`image/png,image/jpeg,image/gif,image/webp`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&r(t),e.target.value=``}})]}),a&&X(`p`,{className:`text-[15px] font-semibold text-wx-fg`,children:a}),f&&X(`p`,{className:`text-[11px] text-wx-fg-subtle`,children:o(`pinnedHint`)})]})}function sh({id:e,checked:t,onChange:n,disabled:r,"aria-label":i}){return X(`button`,{id:e,type:`button`,role:`switch`,"aria-label":i,"aria-checked":t,disabled:r,onClick:()=>n(!t),className:u(`relative h-6 w-10 shrink-0 rounded-full transition-colors`,t?`bg-wx-primary`:`bg-wx-bg-elevated-2`,r&&`cursor-not-allowed opacity-60`),children:X(`span`,{"aria-hidden":`true`,className:u(`absolute top-0.5 left-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform`,t&&`translate-x-4`)})})}function ch({id:e,value:t,disabled:n,onChange:r}){return X(`div`,{className:`flex`,children:X(sh,{id:e,checked:t===`true`,disabled:n,onChange:e=>r(e?`true`:`false`)})})}var lh=u(`w-full rounded-wx-sm border border-wx-border bg-wx-bg px-3 py-2 text-sm text-wx-fg`,`focus:border-wx-primary focus:outline-none focus:ring-2 focus:ring-wx-primary/20`,`read-only:cursor-not-allowed read-only:bg-wx-bg-elevated/60 read-only:text-wx-fg-muted`,`disabled:cursor-not-allowed disabled:bg-wx-bg-elevated/60 disabled:text-wx-fg-muted`);function uh({id:e,value:t,disabled:n,onChange:r}){return X(`input`,{id:e,type:`date`,value:Lm(t),disabled:n,onChange:e=>r(e.target.value||null),className:lh})}function dh({id:e,value:t,disabled:n,onChange:r}){return X(`input`,{id:e,type:`number`,value:t??``,disabled:n,inputMode:`decimal`,onChange:e=>r(e.target.value||null),className:lh})}function fh(e,[t,n]){return Math.min(n,Math.max(t,e))}typeof window<`u`&&window.document&&window.document.createElement;function ph(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function mh(e,t=[]){let n=[];function r(t,r){let i=W.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=W.useMemo(()=>o,Object.values(o));return X(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=W.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>W.createContext(e));return function(n){let r=n?.[e]||t;return W.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,hh(i,...t)]}function hh(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return W.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function gh(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function _h(...e){return t=>{let n=!1,r=e.map(e=>{let r=gh(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():gh(e[t],null)}}}}function vh(...e){return W.useCallback(_h(...e),e)}function yh(e){let t=bh(e),n=W.forwardRef((e,n)=>{let{children:r,...i}=e,a=W.Children.toArray(r),o=a.find(Sh);if(o){let e=o.props.children,r=a.map(t=>t===o?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return X(t,{...i,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return X(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function bh(e){let t=W.forwardRef((e,t)=>{let{children:n,...r}=e;if(W.isValidElement(n)){let e=wh(n),i=Ch(r,n.props);return n.type!==W.Fragment&&(i.ref=t?_h(t,e):e),W.cloneElement(n,i)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xh=Symbol(`radix.slottable`);function Sh(e){return W.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===xh}function Ch(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function wh(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Th(e){let t=e+`CollectionProvider`,[n,r]=mh(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=dn.useRef(null),a=dn.useRef(new Map).current;return X(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=yh(s),l=dn.forwardRef((e,t)=>{let{scope:n,children:r}=e;return X(c,{ref:vh(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=yh(u),p=dn.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=dn.useRef(null),s=vh(t,o),c=a(u,n);return dn.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),X(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return dn.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var Eh=W.createContext(void 0);function Dh(e){let t=W.useContext(Eh);return e||t||`ltr`}var Oh=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=yh(`Primitive.${t}`),r=W.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),X(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function kh(e,t){e&&Tn.flushSync(()=>e.dispatchEvent(t))}function Ah(e,t=globalThis?.document){let n=Ue(e);W.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var jh=`DismissableLayer`,Mh=`dismissableLayer.update`,Nh=`dismissableLayer.pointerDownOutside`,Ph=`dismissableLayer.focusOutside`,Fh,Ih=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lh=W.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=W.useContext(Ih),[u,d]=W.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=W.useState({}),m=vh(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=Bh(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=Vh(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ah(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),W.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Fh=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Hh(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Fh)}},[u,f,n,l]),W.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Hh())},[u,l]),W.useEffect(()=>{let e=()=>p({});return document.addEventListener(Mh,e),()=>document.removeEventListener(Mh,e)},[]),X(Oh.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:ph(e.onFocusCapture,S.onFocusCapture),onBlurCapture:ph(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:ph(e.onPointerDownCapture,x.onPointerDownCapture)})});Lh.displayName=jh;var Rh=`DismissableLayerBranch`,zh=W.forwardRef((e,t)=>{let n=W.useContext(Ih),r=W.useRef(null),i=vh(t,r);return W.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),X(Oh.div,{...e,ref:i})});zh.displayName=Rh;function Bh(e,t=globalThis?.document){let n=Ue(e),r=W.useRef(!1),i=W.useRef(()=>{});return W.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Uh(Nh,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Vh(e,t=globalThis?.document){let n=Ue(e),r=W.useRef(!1);return W.useEffect(()=>{let e=e=>{e.target&&!r.current&&Uh(Ph,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Hh(){let e=new CustomEvent(Mh);document.dispatchEvent(e)}function Uh(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?kh(i,a):i.dispatchEvent(a)}var Wh=0;function Gh(){W.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Kh()),document.body.insertAdjacentElement(`beforeend`,e[1]??Kh()),Wh++,()=>{Wh===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Wh--}},[])}function Kh(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var qh=`focusScope.autoFocusOnMount`,Jh=`focusScope.autoFocusOnUnmount`,Yh={bubbles:!1,cancelable:!0},Xh=`FocusScope`,Zh=W.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=W.useState(null),l=Ue(i),u=Ue(a),d=W.useRef(null),f=vh(t,e=>c(e)),p=W.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:ig(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||ig(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ig(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),W.useEffect(()=>{if(s){ag.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(qh,Yh);s.addEventListener(qh,l),s.dispatchEvent(t),t.defaultPrevented||(Qh(cg(eg(s)),{select:!0}),document.activeElement===e&&ig(s))}return()=>{s.removeEventListener(qh,l),setTimeout(()=>{let t=new CustomEvent(Jh,Yh);s.addEventListener(Jh,u),s.dispatchEvent(t),t.defaultPrevented||ig(e??document.body,{select:!0}),s.removeEventListener(Jh,u),ag.remove(p)},0)}}},[s,l,u,p]);let m=W.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=$h(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&ig(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&ig(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return X(Oh.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Zh.displayName=Xh;function Qh(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(ig(r,{select:t}),document.activeElement!==n)return}function $h(e){let t=eg(e);return[tg(t,e),tg(t.reverse(),e)]}function eg(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function tg(e,t){for(let n of e)if(!ng(n,{upTo:t}))return n}function ng(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function rg(e){return e instanceof HTMLInputElement&&`select`in e}function ig(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&rg(e)&&t&&e.select()}}var ag=og();function og(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=sg(e,t),e.unshift(t)},remove(t){e=sg(e,t),e[0]?.resume()}}}function sg(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function cg(e){return e.filter(e=>e.tagName!==`A`)}var lg=globalThis?.document?W.useLayoutEffect:()=>{},ug=W.useId||(()=>void 0),dg=0;function fg(e){let[t,n]=W.useState(ug());return lg(()=>{e||n(e=>e??String(dg++))},[e]),e||(t?`radix-${t}`:``)}var pg=[`top`,`right`,`bottom`,`left`],mg=Math.min,hg=Math.max,gg=Math.round,_g=Math.floor,vg=e=>({x:e,y:e}),yg={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function bg(e,t,n){return hg(e,mg(t,n))}function xg(e,t){return typeof e==`function`?e(t):e}function Sg(e){return e.split(`-`)[0]}function Cg(e){return e.split(`-`)[1]}function wg(e){return e===`x`?`y`:`x`}function Tg(e){return e===`y`?`height`:`width`}function Eg(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Dg(e){return wg(Eg(e))}function Og(e,t,n){n===void 0&&(n=!1);let r=Cg(e),i=Dg(e),a=Tg(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Lg(o)),[o,Lg(o)]}function kg(e){let t=Lg(e);return[Ag(e),t,Ag(t)]}function Ag(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var jg=[`left`,`right`],Mg=[`right`,`left`],Ng=[`top`,`bottom`],Pg=[`bottom`,`top`];function Fg(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Mg:jg:t?jg:Mg;case`left`:case`right`:return t?Ng:Pg;default:return[]}}function Ig(e,t,n,r){let i=Cg(e),a=Fg(Sg(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ag)))),a}function Lg(e){let t=Sg(e);return yg[t]+e.slice(t.length)}function Rg(e){return{top:0,right:0,bottom:0,left:0,...e}}function zg(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Rg(e)}function Bg(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Vg(e,t,n){let{reference:r,floating:i}=e,a=Eg(t),o=Dg(t),s=Tg(o),c=Sg(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Cg(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Hg(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=xg(t,e),p=zg(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Bg(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Bg(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ug=50,Wg=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Hg},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Vg(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ug&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Vg(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Gg=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=xg(e,t)||{};if(l==null)return{};let d=zg(u),f={x:n,y:r},p=Dg(i),m=Tg(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=mg(d[_],T),D=mg(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=bg(O,A,k),M=!c.arrow&&Cg(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Kg=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=xg(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Sg(r),_=Eg(o),v=Sg(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Lg(o)]:kg(o)),x=p!==`none`;!d&&x&&b.push(...Ig(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Og(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Eg(t))||T.every(e=>Eg(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Eg(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function qg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jg(e){return pg.some(t=>e[t]>=0)}var Yg=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=xg(e,t);switch(i){case`referenceHidden`:{let e=qg(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Jg(e)}}}case`escaped`:{let e=qg(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Jg(e)}}}default:return{}}}}},Xg=new Set([`left`,`top`]);async function Zg(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Sg(n),s=Cg(n),c=Eg(n)===`y`,l=Xg.has(o)?-1:1,u=a&&c?-1:1,d=xg(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Qg=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Zg(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},$g=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=xg(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Eg(Sg(i)),p=wg(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=bg(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=bg(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},e_=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=xg(e,t),u={x:n,y:r},d=Eg(i),f=wg(d),p=u[f],m=u[d],h=xg(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Xg.has(Sg(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},t_=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=xg(e,t),u=await o.detectOverflow(t,l),d=Sg(i),f=Cg(i),p=Eg(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=mg(h-u[g],v),x=mg(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=hg(u.left,0),t=hg(u.right,0),n=hg(u.top,0),r=hg(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:hg(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:hg(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function n_(){return typeof window<`u`}function r_(e){return o_(e)?(e.nodeName||``).toLowerCase():`#document`}function i_(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function a_(e){return((o_(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function o_(e){return n_()?e instanceof Node||e instanceof i_(e).Node:!1}function s_(e){return n_()?e instanceof Element||e instanceof i_(e).Element:!1}function c_(e){return n_()?e instanceof HTMLElement||e instanceof i_(e).HTMLElement:!1}function l_(e){return!n_()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof i_(e).ShadowRoot}function u_(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=x_(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function d_(e){return/^(table|td|th)$/.test(r_(e))}function f_(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var p_=/transform|translate|scale|rotate|perspective|filter/,m_=/paint|layout|strict|content/,h_=e=>!!e&&e!==`none`,g_;function __(e){let t=s_(e)?x_(e):e;return h_(t.transform)||h_(t.translate)||h_(t.scale)||h_(t.rotate)||h_(t.perspective)||!y_()&&(h_(t.backdropFilter)||h_(t.filter))||p_.test(t.willChange||``)||m_.test(t.contain||``)}function v_(e){let t=C_(e);for(;c_(t)&&!b_(t);){if(__(t))return t;if(f_(t))return null;t=C_(t)}return null}function y_(){return g_??(g_=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),g_}function b_(e){return/^(html|body|#document)$/.test(r_(e))}function x_(e){return i_(e).getComputedStyle(e)}function S_(e){return s_(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function C_(e){if(r_(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||l_(e)&&e.host||a_(e);return l_(t)?t.host:t}function w_(e){let t=C_(e);return b_(t)?e.ownerDocument?e.ownerDocument.body:e.body:c_(t)&&u_(t)?t:w_(t)}function T_(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=w_(e),i=r===e.ownerDocument?.body,a=i_(r);if(i){let e=E_(a);return t.concat(a,a.visualViewport||[],u_(r)?r:[],e&&n?T_(e):[])}else return t.concat(r,T_(r,[],n))}function E_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function D_(e){let t=x_(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=c_(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=gg(n)!==a||gg(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function O_(e){return s_(e)?e:e.contextElement}function k_(e){let t=O_(e);if(!c_(t))return vg(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=D_(t),o=(a?gg(n.width):n.width)/r,s=(a?gg(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var A_=vg(0);function j_(e){let t=i_(e);return!y_()||!t.visualViewport?A_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function M_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==i_(e)?!1:t}function N_(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=O_(e),o=vg(1);t&&(r?s_(r)&&(o=k_(r)):o=k_(e));let s=M_(a,n,r)?j_(a):vg(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=i_(a),t=r&&s_(r)?i_(r):r,n=e,i=E_(n);for(;i&&r&&t!==n;){let e=k_(i),t=i.getBoundingClientRect(),r=x_(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=i_(i),i=E_(n)}}return Bg({width:u,height:d,x:c,y:l})}function P_(e,t){let n=S_(e).scrollLeft;return t?t.left+n:N_(a_(e)).left+n}function F_(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-P_(e,n),y:n.top+t.scrollTop}}function I_(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=a_(r),s=t?f_(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=vg(1),u=vg(0),d=c_(r);if((d||!d&&!a)&&((r_(r)!==`body`||u_(o))&&(c=S_(r)),d)){let e=N_(r);l=k_(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?F_(o,c):vg(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function L_(e){return Array.from(e.getClientRects())}function R_(e){let t=a_(e),n=S_(e),r=e.ownerDocument.body,i=hg(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=hg(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+P_(e),s=-n.scrollTop;return x_(r).direction===`rtl`&&(o+=hg(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var z_=25;function B_(e,t){let n=i_(e),r=a_(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=y_();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=P_(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=z_&&(a-=o)}else l<=z_&&(a+=l);return{width:a,height:o,x:s,y:c}}function V_(e,t){let n=N_(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=c_(e)?k_(e):vg(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function H_(e,t,n){let r;if(t===`viewport`)r=B_(e,n);else if(t===`document`)r=R_(a_(e));else if(s_(t))r=V_(t,n);else{let n=j_(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Bg(r)}function U_(e,t){let n=C_(e);return n===t||!s_(n)||b_(n)?!1:x_(n).position===`fixed`||U_(n,t)}function W_(e,t){let n=t.get(e);if(n)return n;let r=T_(e,[],!1).filter(e=>s_(e)&&r_(e)!==`body`),i=null,a=x_(e).position===`fixed`,o=a?C_(e):e;for(;s_(o)&&!b_(o);){let t=x_(o),n=__(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||u_(o)&&!n&&U_(e,o))?r=r.filter(e=>e!==o):i=t,o=C_(o)}return t.set(e,r),r}function G_(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?f_(t)?[]:W_(t,this._c):[].concat(n),r],o=H_(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=H_(t,a[e],i);s=hg(n.top,s),c=mg(n.right,c),l=mg(n.bottom,l),u=hg(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function K_(e){let{width:t,height:n}=D_(e);return{width:t,height:n}}function q_(e,t,n){let r=c_(t),i=a_(t),a=n===`fixed`,o=N_(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=vg(0);function l(){c.x=P_(i)}if(r||!r&&!a)if((r_(t)!==`body`||u_(i))&&(s=S_(t)),r){let e=N_(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?F_(i,s):vg(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function J_(e){return x_(e).position===`static`}function Y_(e,t){if(!c_(e)||x_(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return a_(e)===n&&(n=n.ownerDocument.body),n}function X_(e,t){let n=i_(e);if(f_(e))return n;if(!c_(e)){let t=C_(e);for(;t&&!b_(t);){if(s_(t)&&!J_(t))return t;t=C_(t)}return n}let r=Y_(e,t);for(;r&&d_(r)&&J_(r);)r=Y_(r,t);return r&&b_(r)&&J_(r)&&!__(r)?n:r||v_(e)||n}var Z_=async function(e){let t=this.getOffsetParent||X_,n=this.getDimensions,r=await n(e.floating);return{reference:q_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Q_(e){return x_(e).direction===`rtl`}var $_={convertOffsetParentRelativeRectToViewportRelativeRect:I_,getDocumentElement:a_,getClippingRect:G_,getOffsetParent:X_,getElementRects:Z_,getClientRects:L_,getDimensions:K_,getScale:k_,isElement:s_,isRTL:Q_};function ev(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tv(e,t){let n=null,r,i=a_(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=_g(d),h=_g(i.clientWidth-(u+f)),g=_g(i.clientHeight-(d+p)),_=_g(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:hg(0,mg(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!ev(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function nv(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=O_(e),u=i||a?[...l?T_(l):[],...t?T_(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?tv(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?N_(e):null;c&&g();function g(){let t=N_(e);h&&!ev(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var rv=Qg,iv=$g,av=Kg,ov=t_,sv=Yg,cv=Gg,lv=e_,uv=(e,t,n)=>{let r=new Map,i={platform:$_,...n},a={...i.platform,_c:r};return Wg(e,t,{...i,platform:a})},dv=typeof document<`u`?Sn:function(){};function fv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!fv(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!fv(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function pv(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mv(e,t){let n=pv(e);return Math.round(t*n)/n}function hv(e){let t=W.useRef(e);return dv(()=>{t.current=e}),t}function gv(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);fv(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=hv(c),D=hv(i),O=hv(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),uv(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!fv(w.current,t)&&(w.current=t,Tn.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);dv(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);dv(()=>(A.current=!0,()=>{A.current=!1}),[]),dv(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=W.useMemo(()=>({reference:b,floating:x}),[b,x]),N=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=mv(M.floating,u.x),r=mv(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...pv(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var _v=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:cv({element:r.current,padding:i}).fn(n):r?cv({element:r,padding:i}).fn(n):{}}}},vv=(e,t)=>{let n=rv(e);return{name:n.name,fn:n.fn,options:[e,t]}},yv=(e,t)=>{let n=iv(e);return{name:n.name,fn:n.fn,options:[e,t]}},bv=(e,t)=>({fn:lv(e).fn,options:[e,t]}),xv=(e,t)=>{let n=av(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sv=(e,t)=>{let n=ov(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cv=(e,t)=>{let n=sv(e);return{name:n.name,fn:n.fn,options:[e,t]}},wv=(e,t)=>{let n=_v(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tv=`Arrow`,Ev=W.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return X(Oh.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:X(`polygon`,{points:`0,0 30,0 15,10`})})});Ev.displayName=Tv;var Dv=Ev;function Ov(e){let[t,n]=W.useState(void 0);return lg(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var kv=`Popper`,[Av,jv]=mh(kv),[Mv,Nv]=Av(kv),Pv=e=>{let{__scopePopper:t,children:n}=e,[r,i]=W.useState(null);return X(Mv,{scope:t,anchor:r,onAnchorChange:i,children:n})};Pv.displayName=kv;var Fv=`PopperAnchor`,Iv=W.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Nv(Fv,n),o=W.useRef(null),s=vh(t,o),c=W.useRef(null);return W.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:X(Oh.div,{...i,ref:s})});Iv.displayName=Fv;var Lv=`PopperContent`,[Rv,zv]=Av(Lv),Bv=W.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Nv(Lv,n),[_,v]=W.useState(null),y=vh(t,e=>v(e)),[b,x]=W.useState(null),S=Ov(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(Wv),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:N,middlewareData:P}=gv({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>nv(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[vv({mainAxis:i+w,alignmentAxis:o}),c&&yv({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?bv():void 0,...k}),c&&xv({...k}),Sv({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&wv({element:b,padding:s}),Gv({arrowWidth:C,arrowHeight:w}),f&&Cv({strategy:`referenceHidden`,...k})]}),[ee,te]=Kv(M),ne=Ue(m);lg(()=>{N&&ne?.()},[N,ne]);let F=P.arrow?.x,re=P.arrow?.y,ie=P.arrow?.centerOffset!==0,[ae,oe]=W.useState();return lg(()=>{_&&oe(window.getComputedStyle(_).zIndex)},[_]),X(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:N?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:X(Rv,{scope:n,placedSide:ee,onArrowChange:x,arrowX:F,arrowY:re,shouldHideArrow:ie,children:X(Oh.div,{"data-side":ee,"data-align":te,...h,ref:y,style:{...h.style,animation:N?void 0:`none`}})})})});Bv.displayName=Lv;var Vv=`PopperArrow`,Hv={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Uv=W.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=zv(Vv,n),a=Hv[i.placedSide];return X(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:X(Dv,{...r,ref:t,style:{...r.style,display:`block`}})})});Uv.displayName=Vv;function Wv(e){return e!==null}var Gv=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Kv(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Kv(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var qv=Pv,Jv=Iv,Yv=Bv,Xv=Uv,Zv=`Portal`,Qv=W.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=W.useState(!1);lg(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?En.createPortal(X(Oh.div,{...r,ref:t}),o):null});Qv.displayName=Zv;var $v=W.useInsertionEffect||lg;function ey({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=ty({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=W.useRef(e!==void 0);W.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,W.useCallback(t=>{if(s){let n=ny(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function ty({defaultProp:e,onChange:t}){let[n,r]=W.useState(e),i=W.useRef(n),a=W.useRef(t);return $v(()=>{a.current=t},[t]),W.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function ny(e){return typeof e==`function`}function ry(e){let t=W.useRef({value:e,previous:e});return W.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var iy=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),ay=`VisuallyHidden`,oy=W.forwardRef((e,t)=>X(Oh.span,{...e,ref:t,style:{...iy,...e.style}}));oy.displayName=ay;var sy=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},cy=new WeakMap,ly=new WeakMap,uy={},dy=0,fy=function(e){return e&&(e.host||fy(e.parentNode))},py=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=fy(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},my=function(e,t,n,r){var i=py(t,Array.isArray(e)?e:[e]);uy[n]||(uy[n]=new WeakMap);var a=uy[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(cy.get(e)||0)+1,l=(a.get(e)||0)+1;cy.set(e,c),a.set(e,l),o.push(e),c===1&&i&&ly.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),dy++,function(){o.forEach(function(e){var t=cy.get(e)-1,i=a.get(e)-1;cy.set(e,t),a.set(e,i),t||(ly.has(e)||e.removeAttribute(r),ly.delete(e)),i||e.removeAttribute(n)}),dy--,dy||(cy=new WeakMap,cy=new WeakMap,ly=new WeakMap,uy={})}},hy=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||sy(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),my(r,i,n,`aria-hidden`)):function(){return null}},gy=`right-scroll-bar-position`,_y=`width-before-scroll-bar`,vy=`with-scroll-bars-hidden`,yy=`--removed-body-scroll-bar-size`;function by(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function xy(e,t){var n=Y(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Sy=typeof window<`u`?W.useLayoutEffect:W.useEffect,Cy=new WeakMap;function wy(e,t){var n=xy(t||null,function(t){return e.forEach(function(e){return by(e,t)})});return Sy(function(){var t=Cy.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||by(e,null)}),i.forEach(function(e){r.has(e)||by(e,a)})}Cy.set(n,e)},[e]),n}function Ty(e){return e}function Ey(e,t){t===void 0&&(t=Ty);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Dy(e){e===void 0&&(e={});var t=Ey(null);return t.options=ot({async:!0,ssr:!1},e),t}var Oy=function(e){var t=e.sideCar,n=ht(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return W.createElement(r,ot({},n))};Oy.isSideCarExport=!0;function ky(e,t){return e.useMedium(t),Oy}var Ay=Dy(),jy=function(){},My=W.forwardRef(function(e,t){var n=W.useRef(null),r=W.useState({onScrollCapture:jy,onWheelCapture:jy,onTouchMoveCapture:jy}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=ht(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=wy([n,t]),C=ot(ot({},b),i);return W.createElement(W.Fragment,null,u&&W.createElement(x,{sideCar:Ay,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?W.cloneElement(W.Children.only(s),ot(ot({},C),{ref:S})):W.createElement(v,ot({},C,{className:c,ref:S}),s))});My.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},My.classNames={fullWidth:_y,zeroRight:gy};var Ny,Py=function(){if(Ny)return Ny;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Fy(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Py();return t&&e.setAttribute(`nonce`,t),e}function Iy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ly(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Ry=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Fy())&&(Iy(t,n),Ly(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zy=function(){var e=Ry();return function(t,n){W.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},By=function(){var e=zy();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Vy={left:0,top:0,right:0,gap:0},Hy=function(e){return parseInt(e||``,10)||0},Uy=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Hy(n),Hy(r),Hy(i)]},Wy=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Vy;var t=Uy(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gy=By(),Ky=`data-scroll-locked`,qy=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
136
|
-
.${
|
|
135
|
+
`),n=[],r=[],i=()=>{r.length!==0&&(n.push({kind:`p`,html:r.map(Hf).join(`<br>`)}),r=[])};for(let e of t){let t=e.replace(/\s+$/,``);if(!t.trim()){i();continue}if(/^\s*```/.test(t))continue;let a=/^\s{0,3}(#{1,6})\s+(.*)$/.exec(t);if(a){i(),n.push({kind:`p`,html:`<strong>${Hf(a[2])}</strong>`});continue}let o=/^\s*[-*+]\s+(.*)$/.exec(t);if(o){i();let e=n[n.length-1];e?.kind===`ul`?e.items.push(Hf(o[1])):n.push({kind:`ul`,items:[Hf(o[1])]});continue}let s=/^\s*\d+\.\s+(.*)$/.exec(t);if(s){i();let e=n[n.length-1];e?.kind===`ol`?e.items.push(Hf(s[1])):n.push({kind:`ol`,items:[Hf(s[1])]});continue}let c=/^\s*>\s?(.*)$/.exec(t);r.push(Hf(c?c[1]:t))}return i(),n.map(e=>{if(e.kind===`p`)return`<p>${e.html}</p>`;let t=e.items.map(e=>`<li>${e}</li>`).join(``);return`<${e.kind}>${t}</${e.kind}>`}).join(``)}function Wf(e){return[/\*\*[^*\n]+\*\*/,/__[^_\n]+__/,/~~[^~\n]+~~/,/`[^`\n]+`/,/\[[^\]\n]+\]\([^)\s]+\)/,/^\s{0,3}#{1,6}\s+\S/m,/^\s*[-*+]\s+\S/m,/^\s*\d+\.\s+\S/m].some(t=>t.test(e))}var Gf={STRONG:`strong`,B:`strong`,EM:`em`,I:`em`,U:`u`,S:`s`,STRIKE:`s`,DEL:`s`,CODE:`code`,A:`a`,UL:`ul`,OL:`ol`,LI:`li`,P:`p`,DIV:`p`,BR:`br`},Kf=new Set([`strong`,`em`,`u`,`s`,`code`,`a`,`ul`,`ol`]),qf=new Set([`SCRIPT`,`STYLE`,`NOSCRIPT`,`TEMPLATE`,`IFRAME`,`OBJECT`,`EMBED`,`HEAD`,`TITLE`]);function Jf(e){let t=e.trim();return t?/^(https?:|mailto:|tel:)/i.test(t)?t:/^[a-z][a-z0-9+.-]*:/i.test(t)?null:t:null}function Yf(e,t,n){e.childNodes.forEach(e=>{if(e.nodeType===Node.TEXT_NODE){t.appendChild(n.createTextNode(e.textContent??``));return}if(e.nodeType!==Node.ELEMENT_NODE)return;let r=e;if(qf.has(r.tagName))return;let i=Gf[r.tagName];if(i==null){Yf(r,t,n);return}if(i===`br`){t.appendChild(n.createElement(`br`));return}let a=n.createElement(i);if(i===`a`){let e=Jf(r.getAttribute(`href`)??``);if(!e){Yf(r,t,n);return}a.setAttribute(`href`,e)}Yf(r,a,n),!(!(i===`li`||i===`ul`||i===`ol`||i===`p`)&&!a.textContent?.trim()&&!a.querySelector(`br`))&&t.appendChild(a)})}function Xf(e){if(!e)return``;try{let t=new DOMParser().parseFromString(`<body>${e}</body>`,`text/html`),n=t.createElement(`div`);return Yf(t.body,n,t),n.innerHTML.trim()}catch{return``}}function Zf(e){if(!e)return``;try{let t=new DOMParser().parseFromString(`<body>${e}</body>`,`text/html`);for(let e of t.body.querySelectorAll(`h1,h2,h3,h4,h5,h6`)){let n=t.createElement(`p`),r=t.createElement(`strong`);for(;e.firstChild;)r.appendChild(e.firstChild);n.appendChild(r),e.replaceWith(n)}for(let e of t.body.querySelectorAll(`pre`)){let n=t.createElement(`code`);n.textContent=e.textContent??``,e.replaceWith(n)}let n=t.createElement(`div`);return Yf(t.body,n,t),n.innerHTML.trim()}catch{return``}}function Qf(e){return e?RegExp(`<(${[...Kf].join(`|`)})[\\s>]`,`i`).test(e):!1}var $f=10,ep={bold:`bold`,italic:`italic`,underline:`underline`,strike:`strikeThrough`,bullet:`insertUnorderedList`,ordered:`insertOrderedList`};function tp(e){try{return document.queryCommandState(e)}catch{return!1}}function np(e){if(!e)return null;let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.getSelection;if(typeof e==`function`)return e.call(t)}return document.getSelection()}function rp(e){let t=np(e)?.anchorNode??null,n=(t instanceof HTMLElement?t:t?.parentElement)?.closest?.(`a`)??null;return n&&e?.contains(n)?n:null}function ip(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function ap(e){let t=np(e)?.anchorNode??null,n=(t instanceof HTMLElement?t:t?.parentElement)?.closest?.(`code`)??null;return n&&e?.contains(n)?n:null}var op=yn(function({onChange:e,onEnter:t,onTyping:n,placeholder:r,ariaLabel:a,className:s,maxChars:c,initialHtml:l},d){let f=J(null),p=J(null),m=J(!1),[h,g]=Y(!0),[_,v]=Y(!1),[y,b]=Y({}),[x,S]=Y(!1),[C,w]=Y(``),T=i(`messages.format`);Tn(()=>{let e=f.current;if(!e||!l)return;let t=Xf(l);t&&(e.innerHTML=t,g(!1))},[]);let E=G(()=>{let t=f.current;if(!t)return;let n=t.innerText??t.textContent??``;g(n.trim().length===0&&!t.querySelector(`li`)),e({html:t.innerHTML,text:n})},[e]),D=G(()=>{let e=!!rp(f.current);b({bold:tp(ep.bold),italic:tp(ep.italic),underline:tp(ep.underline)&&!e,strike:tp(ep.strike),code:!!ap(f.current),bullet:tp(ep.bullet),ordered:tp(ep.ordered),link:e})},[]),O=G(()=>{let e=f.current,t=np(e),n=!!e&&!!t&&t.rangeCount>0&&!t.isCollapsed&&e.contains(t.anchorNode)&&e.contains(t.focusNode);v(n),n&&t&&(p.current=t.getRangeAt(0).cloneRange(),D())},[D]);K(()=>{let e=()=>O();return document.addEventListener(`selectionchange`,e),()=>document.removeEventListener(`selectionchange`,e)},[O]);let k=G((e,t)=>{f.current?.focus({preventScroll:!0});try{document.execCommand(e,!1,t)}catch{}E(),D()},[E,D]);wn(d,()=>({focus(){f.current?.focus({preventScroll:!0})},clear(){f.current&&(f.current.innerHTML=``),g(!0),v(!1),S(!1),w(``),p.current=null},insertText(e){f.current?.focus({preventScroll:!0});try{document.execCommand(`insertText`,!1,e)}catch{}E()}}),[E]);let A=G(()=>{let e=f.current;if(!e)return;e.focus({preventScroll:!0});let t=np(e);if(!t)return;let n=ap(e);if(n){let e=document.createRange();e.selectNode(n),t.removeAllRanges(),t.addRange(e),k(`insertText`,n.textContent??``);return}if(t.rangeCount===0||t.isCollapsed)return;let r=t.toString();r&&k(`insertHTML`,`<code>${ip(r)}</code>`)},[k]),j=G(()=>{let e=f.current;if(!e||m.current)return;let t=np(e);if(!t||t.rangeCount===0||!t.isCollapsed)return;let n=t.getRangeAt(0),r=n.startContainer;if(r.nodeType!==Node.TEXT_NODE)return;let i=r,a=n.startOffset,o=i.textContent??``,s=o.slice(0,a);if(!i.previousSibling&&a===o.length&&(/^[-*]\s$/.test(s)||/^\d+\.\s$/.test(s))){let e=/^\d/.test(s),n=document.createRange();n.setStart(i,0),n.setEnd(i,a),t.removeAllRanges(),t.addRange(n),k(`insertText`,``),k(e?ep.ordered:ep.bullet);return}let c=/\*\*([^*\n]+?)\*\*$/.exec(s),l=`strong`;if(c||(c=/\*([^*\n]+?)\*$/.exec(s)),!c){let e=/`([^`\n]+?)`$/.exec(s);e&&(c=e,l=`code`)}if(!c)return;let u=a-c[0].length,d=document.createRange();d.setStart(i,u),d.setEnd(i,a),t.removeAllRanges(),t.addRange(d),k(`insertHTML`,`<${l}>${ip(c[1])}</${l}>`)},[k]),M=G(()=>{if(rp(f.current)){k(`unlink`);return}w(``),S(!0)},[k]),N=G(()=>{let e=f.current,t=p.current;if(!e)return null;e.focus({preventScroll:!0});let n=np(e);return n&&t&&(n.removeAllRanges(),n.addRange(t)),n},[]),P=G(()=>{let e=C.trim(),t=f.current;if(S(!1),w(``),!e||!t)return;let n=N(),r=p.current;if(n&&r&&!r.collapsed)k(`createLink`,e);else{let t=e.replace(/&/g,`&`).replace(/</g,`<`).replace(/"/g,`"`);k(`insertHTML`,`<a href="${t}">${t}</a>`)}},[C,k,N]),F=G(()=>{S(!1),w(``),N()},[N]),ee=_||x;return Z(`div`,{className:u(`relative`,s),children:[X(Mt,{children:ee&&X(o.div,{layout:!0,initial:{opacity:0,y:6,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:6,scale:.96},transition:{duration:.14,ease:[.16,1,.3,1]},className:u(`absolute bottom-full left-2 z-20 mb-2 origin-bottom overflow-hidden`,`rounded-2xl border border-wx-border/60 bg-wx-bg shadow-lg shadow-black/[0.06]`),onMouseDown:e=>e.preventDefault(),children:X(Mt,{mode:`wait`,initial:!1,children:x?Z(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},className:`flex items-center gap-1 p-1 pl-3`,children:[X(`input`,{type:`url`,"data-wx-own-escape":``,value:C,onChange:e=>w(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),P()):e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),F())},onMouseDown:e=>e.stopPropagation(),placeholder:T(`linkPlaceholder`),"aria-label":T(`link`),autoFocus:!0,className:u(`h-7 w-52 max-w-[52vw] bg-transparent text-[13px] text-wx-fg`,`placeholder:text-wx-fg-subtle focus:outline-none`)}),X(`button`,{type:`button`,onClick:P,className:u(`h-7 shrink-0 rounded-lg px-2.5 font-semibold text-[12px]`,`bg-wx-primary text-wx-primary-fg transition-[transform,opacity]`,`hover:opacity-95 active:scale-95`),children:T(`linkSave`)}),X(cp,{label:T(`linkCancel`),onClick:F,children:X(Nt,{className:`h-4 w-4`})})]},`link`):Z(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},className:`flex items-center gap-0 p-1`,children:[X(cp,{label:T(`bold`),active:y.bold,onClick:()=>k(ep.bold),children:X(ms,{className:`h-4 w-4`})}),X(cp,{label:T(`italic`),active:y.italic,onClick:()=>k(ep.italic),children:X(Ps,{className:`h-4 w-4`})}),X(cp,{label:T(`underline`),active:y.underline,onClick:()=>k(ep.underline),children:X(uc,{className:`h-4 w-4`})}),X(cp,{label:T(`strikethrough`),active:y.strike,onClick:()=>k(ep.strike),children:X(sc,{className:`h-4 w-4`})}),X(cp,{label:T(`monospace`),active:y.code,onClick:A,children:X(ws,{className:`h-4 w-4`})}),X(sp,{}),X(cp,{label:T(`bulletList`),active:y.bullet,onClick:()=>k(ep.bullet),children:X(Rs,{className:`h-4 w-4`})}),X(cp,{label:T(`numberedList`),active:y.ordered,onClick:()=>k(ep.ordered),children:X(Ls,{className:`h-4 w-4`})}),X(sp,{}),X(cp,{label:T(`link`),active:y.link,onClick:M,children:X(Is,{className:`h-4 w-4`})})]},`tools`)})})}),Z(`div`,{className:`relative`,children:[X(`div`,{ref:f,role:`textbox`,"aria-multiline":`true`,"aria-label":a,contentEditable:!0,suppressContentEditableWarning:!0,onCompositionStart:()=>{m.current=!0},onCompositionEnd:()=>{m.current=!1},onInput:()=>{j(),E(),n?.()},onPaste:e=>{e.preventDefault();let t=e.clipboardData,n=t?.getData(`text/html`)??``,r=t?.getData(`text/plain`)??``;if(c){let e=c*$f,t=f.current?.innerText?.length??0,n=Math.max(0,e-t);if(r.length>n){n>0&&k(`insertText`,r.slice(0,n));return}}if(n.trim()){let e=Zf(n);if(e){k(`insertHTML`,e);return}}if(r&&Wf(r)){let e=Uf(r);if(e){k(`insertHTML`,e);return}}k(`insertText`,r)},onKeyDown:e=>{if(e.key===`Enter`&&!e.shiftKey){if(e.nativeEvent.isComposing||m.current)return;if(tp(ep.bullet)||tp(ep.ordered)){requestAnimationFrame(E);return}e.preventDefault(),t()}},autoCorrect:`off`,autoCapitalize:`sentences`,spellCheck:!0,"data-1p-ignore":`true`,"data-lpignore":`true`,"data-form-type":`other`,className:u(`w-full overflow-y-auto bg-transparent px-4 pt-2.5 pb-1 text-sm text-wx-fg`,`focus:outline-none`,`[&_ul]:my-1 [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:my-1 [&_ol]:list-decimal [&_ol]:pl-5`,`[&_code]:rounded-wx-sm [&_code]:bg-wx-bg-elevated-2 [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em]`,`[&_a]:font-medium [&_a]:text-wx-primary [&_a]:underline [&_a]:underline-offset-2 [&_a:hover]:opacity-80`),style:{minHeight:41,maxHeight:120}}),h&&X(`span`,{className:`pointer-events-none absolute top-2.5 left-4 select-none text-sm text-wx-fg-muted`,"aria-hidden":`true`,children:r})]})]})});function sp(){return X(`span`,{className:`mx-0.5 h-5 w-px bg-wx-border/70`,"aria-hidden":`true`})}function cp({label:e,active:t,onClick:n,children:r}){return X(`button`,{type:`button`,"aria-label":e,"aria-pressed":t,onClick:n,className:u(`flex h-7 w-7 items-center justify-center rounded-lg text-wx-fg-muted`,`transition-[background-color,color,transform] hover:bg-wx-bg-elevated-2 hover:text-wx-fg active:scale-90`,t&&`bg-wx-primary/12 text-wx-primary hover:bg-wx-primary/12 hover:text-wx-primary`),children:r})}function lp(e){let t=J(e);t.current=e;let n=J(!1);return G(async()=>{if(!n.current){n.current=!0;try{await t.current()}finally{n.current=!1}}},[])}var up=new Map;function dp(e){let t=up.get(e);return t||(t={appended:[],consumed:[],read:[]},up.set(e,t)),t}function fp(e){let t=up.get(e);return t?{appended:[...t.appended],consumed:[...t.consumed],read:[...t.read]}:{appended:[],consumed:[],read:[]}}function pp(e,t){let n=dp(e);n.appended.some(e=>e.id===t.id)||(n.appended=[...n.appended,t])}function mp(e,t,n){let r=dp(e);r.consumed=[...t],r.read=[...n]}function hp(e,t){let n=e.toLowerCase();return n.includes(`pric`)?{text:I(t,`messenger.replies.pricing.text`),buttons:_p(t,[[`messenger.replies.pricing.planBtn`,`plans`],[`messenger.replies.pricing.salesBtn`,`sales`]])}:n.includes(`gaia`)||n.includes(`ai`)?{text:I(t,`messenger.replies.gaia.text`),buttons:_p(t,[[`messenger.replies.gaia.handoffBtn`,`handoff-flow`]])}:n.includes(`human`)||n.includes(`chat with`)||n.includes(`operator`)?{text:I(t,`messenger.replies.human.text`)}:{text:I(t,`messenger.replies.fallback.text`)}}function gp(e){return I(e,`messenger.replies.voice.text`)}function _p(e,t){let n=t.map(([t,n])=>({text:I(e,t),payload:n})).filter(e=>e.text!==``);return n.length>0?n:void 0}function vp(e){return I(e,`messenger.replies.fallback.text`)!==``}var yp=e=>e.replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim();function bp(e,t){let n=e.find(e=>e.direction===`OUTBOUND`&&!e.system&&(e.text??``).trim()!==``);if(!n||n.sender.kind!==`bot`&&n.sender.kind!==`ai`)return null;let r=yp(n.text??``);return t.some(e=>yp(e.text)===r)?n:null}function xp(e,t){return e.text===t.text&&JSON.stringify(e.media??null)===JSON.stringify(t.media??null)&&JSON.stringify(e.buttons??null)===JSON.stringify(t.buttons??null)&&JSON.stringify(e.sources??null)===JSON.stringify(t.sources??null)}function Sp(e,t){let n=new Map(t.map(e=>[e.id,e])),r=new Set(t.filter(e=>e.deleted).map(e=>e.id)),i=e.filter(e=>!r.has(e.id)).map(e=>{let t=n.get(e.id);if(!t)return e;let r=e.clientKey??t.clientKey;return t.edited&&!xp(e,t)?{...e,text:t.text,media:t.media??e.media,buttons:t.buttons??e.buttons,sources:t.sources??e.sources,edited:!0,...r?{clientKey:r}:{}}:r&&!e.clientKey?{...e,clientKey:r}:e}),a=new Set(e.map(e=>e.id));return[...i,...t.filter(e=>!a.has(e.id)&&!e.editOnly)]}function Cp(e,t){if(!e||e.startsWith(`#`)||/^[a-z][a-z0-9+\-.]*:/i.test(e)&&!/^https?:/i.test(e))return null;let n=t??(typeof window<`u`?window.location.origin:`http://localhost`),r;try{r=new URL(e,n)}catch{return null}try{let e=new URL(n).origin;if(r.origin!==e)return null}catch{}let i=r.pathname.split(`/`).filter(Boolean);if(i.length<2)return null;let[a,...o]=i,s=o.join(`/`);if(!s)return null;let c=r.searchParams.get(`locale`)??void 0;return a===`help`?{kind:`help-article`,slug:s,locale:c}:a===`news`||a===`article`?{kind:`news-article`,slug:s,locale:c}:null}var wp=`ul|ol|li|pre|p|blockquote|h[1-6]`;function Tp(e){return/<[a-z][a-z0-9]*(\s|>|\/)/i.test(e)}var Ep=[/\*\*[^*\n]+\*\*/,/__[^_\n]+__/,/\[[^\]\n]+\]\([^)\n]+\)/,/`[^`\n]+`/,/```/,/^\s{0,3}#{1,6}\s+/m,/^\s*[-*+]\s+\S/m,/^\s*\d+\.\s+\S/m,/^\s*>\s+\S/m];function Dp(e){return Ep.some(t=>t.test(e))}function Op(e){return e.replace(RegExp(`\\n+(?=</?(?:${wp})[\\s/>])`,`gi`),``).replace(RegExp(`(</?(?:${wp})[^>]*>)\\n+`,`gi`),`$1`).replace(RegExp(`<br\\s*/?>(?=\\s*</?(?:${wp})[\\s/>])`,`gi`),``).replace(RegExp(`(</?(?:${wp})[^>]*>)\\s*<br\\s*/?>`,`gi`),`$1`)}function kp(e,t){if(t.length===0)return e;let n=t.findIndex(t=>e.has(t));if(n===-1){let e=new Map,n=Math.max(0,t.length-10);return t.forEach((t,r)=>{e.set(t,r<n?null:(r-n)*35)}),e}let r=null;return t.forEach((t,i)=>{e.has(t)||(r??(r=new Map(e)),r.set(t,i>n?0:null))}),r??e}function Ap(e){let t=J(new Map);return t.current=kp(t.current,e),t.current}var jp=`wx-gentle-in`;function Mp(e){return e==null?{}:{className:jp,style:e>0?{"--wx-enter-delay":`${e}ms`}:void 0}}function Np({size:e,senderKind:t,senderName:n,senderAvatarUrl:r,aiAssistantAvatarUrl:a,organizationLogoUrl:o,organizationName:s,className:c}){let l=i(`messages`),d={width:e,height:e};if(t===`ai`||t===`bot`)return a?X(`span`,{style:d,className:u(`relative flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-wx-bg-elevated shadow-sm`,c),role:`img`,"aria-label":l(`aiAssistant`),children:X(`img`,{src:a,alt:``,className:`h-full w-full object-cover`,loading:`eager`,decoding:`async`})}):null;if(r)return X(`span`,{style:d,className:u(`shrink-0 overflow-hidden rounded-full`,c),children:X(`img`,{src:r,alt:``,className:`h-full w-full object-cover`})});let f=n?Pp(n):``;if(!f&&o)return X(`span`,{style:d,className:u(`shrink-0 overflow-hidden rounded-full`,c),children:X(`img`,{src:o,alt:s??``,className:`h-full w-full object-cover`})});let p=f||(s??``).trim().charAt(0).toUpperCase();return X(`span`,{style:d,className:u(`flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-wx-bg-elevated text-[0.7em] font-semibold text-wx-fg-muted`,c),children:p||``})}function Pp(e){let t=e.trim().split(/\s+/).map(e=>e.replace(/[^\p{L}\p{N}]/gu,``)).filter(e=>e.length>0);return t.length===0?``:t.length===1?t[0].charAt(0).toUpperCase():t[0].charAt(0).toUpperCase()+t[t.length-1].charAt(0).toUpperCase()}function Fp(e,t){let n=Math.min(320/e,320/t,1);return{width:Math.round(e*n),height:Math.round(t*n)}}var Ip=4;function Lp(e){let t=new Set,n=[];for(let r of e){let e=r.link?.trim()||void 0,i=zn(e),a=i?Vn(Bn(e))??e??`external`:`internal`;if(!t.has(a)&&(t.add(a),n.push({key:a,favicon:Hn(e),external:i}),n.length>=Ip))break}return n}function Rp({sources:e,onOpen:t}){let n=i(`messages`),[r,a]=Y(!1),o=e.filter(Un);if(o.length===0)return null;let s=Lp(o);return Z(`div`,{className:`mt-1.5 flex w-full flex-col items-start gap-1`,children:[Z(`button`,{type:`button`,onClick:()=>a(e=>!e),"aria-expanded":r,className:u(`flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-wx-border bg-wx-bg-elevated py-1 pr-2.5 pl-1.5`,`font-medium text-[11px] text-wx-fg-muted transition-colors hover:bg-wx-bg-elevated-2 hover:text-wx-fg`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`),children:[X(`span`,{className:`flex items-center -space-x-1.5`,children:s.map(e=>X(`span`,{className:`inline-flex h-4 w-4 items-center justify-center overflow-hidden rounded-full bg-wx-bg ring-2 ring-wx-bg-elevated`,children:X(Bp,{favicon:e.favicon,external:e.external})},e.key))}),Z(`span`,{children:[n(`sources`),` · `,o.length]}),X(ge,{className:u(`h-3 w-3 transition-transform`,r&&`rotate-180`),"aria-hidden":`true`})]}),r&&X(`div`,{className:`flex w-full flex-col`,children:o.map((e,n)=>X(zp,{source:e,onOpen:t},n))})]})}function zp({source:e,onOpen:t}){let n=e.link?.trim()||void 0,r=zn(n),i=Hn(n),a=e.seoTitle?.trim(),o=e.seoDescription?.trim(),s=r?n:a??n??Wn(e),c=!!(a||o),l=Z(Dn,{children:[X(Bp,{favicon:i,external:r}),X(`span`,{className:`min-w-0 flex-1 truncate text-[12px] text-wx-fg`,children:s}),r&&X(fs,{className:`h-3.5 w-3.5 shrink-0 text-wx-fg-subtle`,"aria-hidden":`true`})]}),d=`flex items-center gap-2 rounded-md px-2 py-1.5 text-left`;return Z(`div`,{className:`group relative`,children:[n?X(`button`,{type:`button`,onClick:()=>t(n),className:u(d,`w-full transition-colors hover:bg-wx-bg-elevated`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary`),children:l}):X(`div`,{className:d,children:l}),c&&Z(`div`,{className:`pointer-events-none absolute bottom-full left-2 z-10 mb-1 hidden w-max max-w-[240px] rounded-lg bg-wx-fg px-3 py-2 text-wx-bg shadow-lg group-hover:block`,children:[a&&X(`p`,{className:`font-semibold text-[12px] leading-snug`,children:a}),o&&X(`p`,{className:`mt-0.5 text-[11px] text-wx-bg/70 leading-snug`,children:o})]})]})}function Bp({favicon:e,external:t}){let[n,r]=Y(!1);return t&&e&&!n?X(`img`,{src:e,alt:``,width:14,height:14,referrerPolicy:`no-referrer`,className:`h-4 w-4 shrink-0 rounded-full bg-white object-contain p-px ring-1 ring-black/10`,onError:()=>r(!0)}):X(t?Pe:hs,{className:`h-4 w-4 shrink-0 text-wx-fg-subtle`,"aria-hidden":`true`})}function Vp(){return typeof window<`u`&&!!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function Hp({item:e}){let[t,n]=Y(!1),[r]=Y(Vp),i=`absolute inset-0 block h-full w-full object-cover`;return t?e.poster?X(`img`,{src:e.poster,alt:e.alt,className:i}):null:X(`video`,{src:e.url,poster:e.poster,"aria-label":e.alt,autoPlay:!r,loop:!r,muted:!0,playsInline:!0,preload:`metadata`,onError:()=>n(!0),className:i})}var Up=220;function Wp({item:e,multi:t,onOpen:n,label:r}){let[i,a]=Y(null);if(t)return Z(`div`,{className:`relative w-full overflow-hidden`,children:[X(`video`,{src:e.url,poster:e.poster,controls:!0,preload:`metadata`,className:`block h-full w-full object-cover`}),X(`button`,{type:`button`,"aria-label":r,onClick:n,className:`absolute inset-0 cursor-zoom-in`})]});let o=e.width&&e.height?Fp(e.width,e.height):null;return X(`div`,{style:{width:`${o?o.width:Up}px`,aspectRatio:o?`${o.width} / ${o.height}`:i??`16 / 9`,maxWidth:`100%`,...o?{}:{maxHeight:`20rem`}},className:`relative block overflow-hidden`,children:e.gif?X(Hp,{item:e}):X(`video`,{src:e.url,poster:e.poster,controls:!0,preload:`metadata`,onLoadedMetadata:o?void 0:e=>{let t=e.currentTarget;t.videoWidth&&t.videoHeight&&a(`${t.videoWidth} / ${t.videoHeight}`)},className:`absolute inset-0 block h-full w-full object-contain`})})}var Gp=null;function Kp(e){return Gp&&Gp!==e&&Gp(),Gp=e,()=>{Gp===e&&(Gp=null)}}var qp=1e3;function Jp({src:e,onDark:t,resume:n=!1}){let r=i(`messages`),[a,o]=Y(!1),s=J(null),c=J(null),[l]=Y(n),d=J(!1),f=J(null);return K(()=>()=>{c.current?.(),f.current&&clearTimeout(f.current)},[]),a?Z(`a`,{href:e,target:`_blank`,rel:`noopener`,className:u(`inline-flex w-60 max-w-full items-center gap-2 rounded-wx-sm px-3 py-2 text-xs font-medium`,t?`bg-wx-primary-fg/10 text-wx-primary-fg hover:bg-wx-primary-fg/20`:`bg-wx-bg/60 text-wx-fg hover:bg-wx-bg`),children:[X(en,{size:12,className:`shrink-0`}),X(`span`,{className:`truncate`,children:r(`openAudio`)})]}):X(`audio`,{ref:s,controls:!0,preload:`none`,src:e,className:`h-12 w-56 max-w-full`,autoPlay:l,onError:()=>{if(d.current){o(!0);return}d.current=!0,f.current=setTimeout(()=>{let e=s.current;e&&(e.load(),e.play().catch(()=>{}))},qp)},onPlay:()=>{c.current?.(),c.current=Kp(()=>s.current?.pause())},onPause:()=>{c.current?.(),c.current=null}})}function Yp(e,t){let n=2166136261;for(let t=0;t<e.length;t++)n^=e.charCodeAt(t),n=Math.imul(n,16777619);let r=[];for(let e=0;e<t;e++)n^=n<<13,n^=n>>>17,n^=n<<5,r.push(.2+.8*((n>>>0)%1e3/999));return r}function Xp(e){let t=J(null),n=J(!1),r=J(null),[i,a]=Y(null),[o,s]=Y(!1),[c,l]=Y(!1),[u,d]=Y(!1),f=G(()=>{let n=new Audio;n.preload=`auto`,n.src=new URL(e,document.baseURI).href;let i=[[`play`,()=>s(!0)],[`playing`,()=>l(!1)],[`pause`,()=>s(!1)],[`ended`,()=>s(!1)],[`error`,()=>{l(!1),s(!1),d(!0)}]];for(let[e,t]of i)n.addEventListener(e,t);return r.current=()=>{for(let[e,t]of i)n.removeEventListener(e,t);n.pause(),n.removeAttribute(`src`),n.load()},t.current=n,a(n),n},[e]),p=G(()=>{let e=t.current??f();if(!e.paused){e.pause();return}l(!0),e.play().catch(e=>{l(!1),!(e instanceof DOMException&&e.name===`AbortError`)&&(n.current||(n.current=!0,console.warn(`[wexio] the browser refused to start the voice note (it must start from a tap); tap play again`,e)))})},[f]),m=G(()=>{t.current?.pause(),l(!1)},[]);return K(()=>{if(o)return Kp(()=>t.current?.pause())},[o]),K(()=>()=>{r.current?.(),r.current=null,t.current=null},[]),{audio:i,playing:o,starting:c,failed:u,toggle:p,stop:m}}function Zp({onDark:e,loading:t,isPlaying:n,onPlayPause:r,buttonRef:a,onPointerEnter:o,onFocus:s,wave:c,time:l}){return Z(`div`,{className:`flex w-60 max-w-full min-w-0 items-center gap-3`,onPointerEnter:o,children:[X(`button`,{ref:a,type:`button`,onClick:r,onFocus:s,"aria-label":i(`messages`)(n?`pauseAudio`:`playAudio`),className:u(`flex h-8 w-8 shrink-0 items-center justify-center rounded-full transition-opacity`,e?`bg-wx-primary-fg text-wx-primary hover:opacity-90`:`bg-wx-primary text-wx-primary-fg hover:bg-wx-primary-hover`),children:t?X(zs,{size:12,className:`animate-spin`}):n?X(Ys,{size:12}):X(Zs,{size:12,className:`translate-x-[1px]`})}),c,X(`span`,{className:u(`shrink-0 font-mono text-[10px] tabular-nums`,e?`text-wx-primary-fg/70`:`text-wx-fg-subtle`),children:l})]})}var Qp=()=>import(`./widget-react-DFQYM8pj.js`),$p=Ir(`voice-waveform`,Qp,{pick:e=>e.LiveWaveform}),em=40,tm={ready:!1,time:0,failed:!1};function nm({src:e,onDark:t}){return X(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 flex items-center justify-between`,children:Yp(e,em).map((e,n)=>X(`span`,{style:{height:`${Math.round(e*100)}%`},className:u(`w-0.5 rounded-sm`,t?`bg-wx-primary-fg/35`:`bg-wx-fg-muted`)},n))})}function rm({src:e,onDark:t=!1}){let[n,r]=Y(tm),i=J(null),a=Xp(e),o=n.failed||a.failed,{stop:s}=a;if(K(()=>{o&&s()},[o,s]),o)return X(Jp,{src:e,onDark:t,resume:a.playing||a.starting});let c=()=>void Qp().catch(()=>{});return Z(Dn,{children:[X(Zp,{onDark:t,loading:a.starting,isPlaying:a.playing,onPlayPause:a.toggle,onPointerEnter:c,onFocus:c,wave:X(`div`,{ref:i,className:`relative h-6 min-w-0 flex-1`,children:!n.ready&&X(nm,{src:e,onDark:t})}),time:n.ready?im(n.time):`0:00`}),a.audio&&X(_n,{fallback:null,children:X($p,{src:e,onDark:t,containerRef:i,media:a.audio,onState:r})})]})}function im(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function am({message:e,organizationLogoUrl:t,organizationName:n,aiAssistantAvatarUrl:r,aiAssistantName:a,buttonsActive:s,onButtonClick:c,onOpenLightbox:l,onInternalLink:d,onRetry:f,enter:p}){let m=i(`messages`),h=yl(),g=Mp(p),_=e.direction===`OUTBOUND`,v=e.sender.kind===`ai`||e.sender.kind===`bot`,y=_&&(!v||!!r),b=y?`ml-9`:`ml-1`,x=!_&&e.deliveryStatus===`QUEUED`,S=!_&&e.deliveryStatus===`SENDING`,C=!_&&e.deliveryStatus===`FAILED`,w=(e.buttons??[]).filter(e=>Gn(e)||s),T=hl(w),{trackLinkClick:E}=Ie(),D=G(e=>{let t=Cp(e);if(t){d?.(t);return}E({url:e,targetType:`EXTERNAL`}),Au(e)},[d,E]),[O,k]=Y(!1),A=G(e=>{e.target.closest(`a, button, input, textarea, video`)||k(e=>!e)},[]),j=v?a??``:e.sender.name?.trim()||``,M=_?e.sender.kind===`operator`?j?null:m(`operator`):de:null;return Z(o.div,{"data-message-id":e.id,initial:!1,exit:{opacity:0},transition:{duration:.24,ease:`easeOut`},style:g.style,className:u(`flex flex-col gap-1.5`,_?`items-start`:`items-end`,g.className),children:[Z(`div`,{className:u(`flex max-w-[85%] items-start gap-2`,_?`flex-row`:`flex-row-reverse`),children:[_&&X(Np,{size:28,senderKind:e.sender.kind,senderName:e.sender.name,senderAvatarUrl:e.sender.avatar,aiAssistantAvatarUrl:r,organizationLogoUrl:t,organizationName:n,className:`mt-0.5`}),(()=>{let t=e.media??[],n=e=>e.mimetype.startsWith(`image/`)||e.mimetype.startsWith(`video/`)||e.mimetype===`application/pdf`,r=t.filter(n),i=t.filter(e=>!n(e)),a=!!e.text,o=i.length>0;return Z(`div`,{onClick:A,className:u(`max-w-full overflow-hidden rounded-wx-lg`,(a||o)&&(_?`bg-wx-bg-elevated text-wx-fg`:`bg-wx-primary text-wx-primary-fg`)),children:[r.length>0&&X(sm,{items:r,onOpenLightbox:l}),(a||o)&&Z(`div`,{className:u(`flex flex-col gap-2 px-4 py-2.5 text-sm`,r.length>0&&`pt-2`),children:[a&&X(om,{text:e.text,isOutbound:_,onInternalLink:d}),i.map((e,t)=>X(um,{media:e,onDark:!_},t))]})]})})()]}),X(Mt,{initial:!1,children:O&&(j||M||e.ageLabel)&&Z(o.p,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.18,ease:`easeOut`},className:u(`flex items-center gap-1.5 overflow-hidden text-[11px] text-wx-fg-subtle`,_?b:`mr-1`),children:[_&&j&&X(`span`,{className:`font-medium text-wx-fg-muted`,children:j}),_&&M&&Z(Dn,{children:[j&&X(`span`,{"aria-hidden":`true`,children:`·`}),X(`span`,{children:M})]}),e.ageLabel&&Z(Dn,{children:[_&&j||_&&M?X(`span`,{"aria-hidden":`true`,children:`·`}):null,X(`span`,{children:e.ageLabel})]})]})}),(x||S||C)&&X(`div`,{className:`mr-1 flex h-4 items-center justify-end gap-1 text-[11px] leading-none`,children:C?Z(`span`,{className:`flex items-center gap-1 text-wx-danger`,children:[X(`span`,{children:m(`notDelivered`)}),f&&X(`button`,{type:`button`,onClick:f,"aria-label":m(`retry`),title:m(`retry`),className:`-m-0.5 flex items-center rounded-full p-0.5 transition-opacity hover:opacity-70`,children:X($s,{"aria-hidden":`true`,className:`size-3`})})]}):S?X(zs,{"aria-hidden":`true`,className:`size-3 animate-spin text-wx-fg-subtle`}):Z(`span`,{className:`flex items-center gap-1 text-wx-fg-subtle`,children:[X(Cs,{"aria-hidden":`true`,className:`size-3`}),X(`span`,{children:m(`queued`)})]})}),e.sources&&e.sources.length>0&&X(`div`,{className:u(y?`ml-9 max-w-[calc(85%_-_2.25rem)]`:`ml-1 max-w-[85%]`),children:X(Rp,{sources:e.sources,onOpen:D})}),w.length>0&&X(o.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0},transition:{duration:.18,ease:`easeOut`},...h,className:u(`flex flex-wrap gap-1`,`pointer-coarse:gap-5`,_?u(b,`max-w-[85%]`):`mr-1 justify-end`),children:w.map((e,t)=>Z(o.button,{type:`button`,onClick:()=>c?.(e),whileHover:{y:-1},whileTap:{scale:.96},transition:{type:`spring`,stiffness:480,damping:26},className:u(`inline-flex max-w-full items-center gap-1`,`rounded-full bg-wx-bg-elevated px-2.5 py-1 text-xs font-medium text-wx-primary`,`relative after:absolute after:top-1/2 after:left-1/2 after:-translate-x-1/2 after:-translate-y-1/2 after:content-[''] pointer-coarse:after:h-[max(100%,44px)] pointer-coarse:after:w-[max(100%,44px)]`,`transition-colors hover:bg-wx-primary hover:text-wx-primary-fg`),children:[e.type===`url`&&X(en,{size:12,className:`shrink-0`,"aria-hidden":`true`}),e.type===`phone`&&X(Xs,{size:12,className:`shrink-0`,"aria-hidden":`true`}),X(`span`,{dir:`auto`,className:_l,children:e.text})]},T[t]))})]})}function om({text:e,isOutbound:t,onInternalLink:n}){let{trackLinkClick:r}=Ie(),i=G(e=>{if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0)return;let t=e.target?.closest?.(`a`);if(!t)return;let i=t.getAttribute(`href`);if(!i)return;let a=Cp(i);if(a){if(!n)return;e.preventDefault(),n(a);return}e.preventDefault(),r({url:i,targetType:`EXTERNAL`}),Au(i)},[n,r]),a=Tp(e),o=!a&&t&&Dp(e);return!a&&!o?X(`p`,{className:`whitespace-pre-wrap leading-relaxed [overflow-wrap:anywhere]`,children:e}):X(`div`,{onClick:i,className:u(`leading-relaxed [overflow-wrap:anywhere]`,`[&_table]:block [&_table]:max-w-full [&_table]:overflow-x-auto`,`[&_td]:[overflow-wrap:normal] [&_th]:[overflow-wrap:normal]`,a?`whitespace-pre-wrap`:`whitespace-normal`,`[&>p]:my-0 [&>p+p]:mt-2`,`[&_a]:underline [&_a]:underline-offset-2 [&_a]:opacity-90 [&_a:hover]:opacity-100`,`[&_strong]:font-semibold [&_em]:italic [&_u]:underline [&_s]:line-through`,`[&_code]:rounded-wx-sm [&_code]:bg-wx-bg-elevated-2 [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em]`,`[&_ul]:my-1.5 [&_ul]:list-disc [&_ul]:whitespace-normal [&_ul]:pl-5`,`[&_ol]:my-1.5 [&_ol]:list-decimal [&_ol]:whitespace-normal [&_ol]:pl-5`,`[&_li]:my-0.5`,`[&_li>p]:my-0 [&_li>p+p]:mt-1`,`[&_code]:rounded-sm [&_code]:bg-black/10 [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-[0.85em]`,`[&_pre]:my-2 [&_pre]:overflow-x-auto [&_pre]:[overflow-wrap:normal] [&_pre]:rounded [&_pre]:bg-black/10 [&_pre]:p-2 [&_pre]:text-[0.8em]`,!t&&`[&_code]:bg-white/15 [&_pre]:bg-white/15 [&_a]:text-wx-primary-fg`),children:a?ft(Op(e)):X(je,{remarkPlugins:[Ye],children:e})})}function sm({items:e,onOpenLightbox:t}){let n=i(`messages`);if(e.length===0)return null;let r=e.length>1;return X(`div`,{className:u(`grid w-full`,r?`max-h-[20rem] grid-cols-2 gap-0.5 auto-rows-fr`:`grid-cols-1`),children:e.map((i,a)=>{let o=()=>t?.(e,a);return i.mimetype===`application/pdf`?Z(`button`,{type:`button`,onClick:o,"aria-label":i.alt||n(`openPreview`),className:u(`group flex w-full cursor-zoom-in items-center gap-3 px-4 py-3 text-left`,`bg-wx-bg-elevated text-wx-fg transition-colors hover:bg-wx-bg-elevated-2`),children:[X(`span`,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-wx-sm bg-wx-bg text-[10px] font-bold tracking-wider text-wx-fg-muted shadow-sm`,children:`PDF`}),Z(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[X(`span`,{className:`truncate text-sm font-medium`,children:i.alt}),X(`span`,{className:`truncate text-xs text-wx-fg-muted`,children:i.mimetype})]})]},a):i.mimetype.startsWith(`video/`)?X(Wp,{item:i,multi:r,onOpen:o,label:i.alt||n(`openPreview`)},a):X(lm,{item:i,multi:r,onOpen:o,label:i.alt||n(`openImage`)},a)})})}var cm=220;function lm({item:e,multi:t,onOpen:n,label:r}){let i=!!(e.width&&e.height),[a,o]=Y(null);if(t)return X(`button`,{type:`button`,onClick:n,"aria-label":r,className:`group relative block w-full cursor-zoom-in overflow-hidden`,children:X(`img`,{src:e.url,alt:e.alt,loading:`lazy`,className:`block h-full w-full object-cover transition-transform duration-200 group-hover:scale-[1.02]`})});if(i&&e.width&&e.height){let{width:t,height:i}=Fp(e.width,e.height);return X(`button`,{type:`button`,onClick:n,"aria-label":r,style:{width:`${t}px`,aspectRatio:`${t} / ${i}`,maxWidth:`100%`},className:`group relative block cursor-zoom-in overflow-hidden`,children:X(`img`,{src:e.url,alt:e.alt,loading:`lazy`,className:`absolute inset-0 block h-full w-full object-cover transition-transform duration-200 group-hover:scale-[1.02]`})})}return X(`button`,{type:`button`,onClick:n,"aria-label":r,style:{width:`${cm}px`,maxWidth:`100%`,aspectRatio:a??`1 / 1`,maxHeight:`20rem`},className:`group relative block cursor-zoom-in overflow-hidden`,children:X(`img`,{src:e.url,alt:e.alt,loading:`lazy`,onLoad:e=>{let t=e.currentTarget;t.naturalWidth&&t.naturalHeight&&o(`${t.naturalWidth} / ${t.naturalHeight}`)},className:`absolute inset-0 block h-full w-full object-contain transition-transform duration-200 group-hover:scale-[1.02]`})})}function um({media:e,onDark:t}){return e.mimetype.startsWith(`audio/`)?X(rm,{src:e.url,onDark:t}):X(dm,{media:e})}function dm({media:e}){let t=i(`messages`),n=e.alt||e.url.split(`/`).pop()||e.mimetype||t(`fileFallback`),r=fm(e.mimetype);return Z(`a`,{href:e.url,target:`_blank`,rel:`noopener`,className:`flex max-w-xs items-center gap-3 rounded-wx-sm bg-wx-bg-elevated/60 px-3 py-2.5 text-xs text-wx-fg transition-colors hover:bg-wx-bg-elevated`,children:[X(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-wx-sm bg-wx-bg-elevated-2 text-[10px] font-bold tracking-wider text-wx-fg-muted uppercase`,children:r}),Z(`span`,{className:`min-w-0 flex-1`,children:[X(`span`,{className:`block truncate font-medium text-wx-fg`,children:n}),X(`span`,{className:`block truncate text-wx-fg-subtle`,children:e.mimetype||t(`fileFallback`)})]})]})}function fm(e){return e?e.includes(`pdf`)?`PDF`:e.includes(`zip`)||e.includes(`compressed`)?`ZIP`:e.includes(`spreadsheet`)||e.includes(`excel`)?`XLS`:e.includes(`word`)||e.includes(`document`)?`DOC`:e.startsWith(`text/`)?`TXT`:(e.split(`/`)[1]??``).slice(0,4).toUpperCase()||`FILE`:`FILE`}function pm({actorName:e,actorKind:t,actorAvatarUrl:n,actorPhase:r,aiAssistantName:a,aiAssistantAvatarUrl:s,organizationLogoUrl:c,organizationName:l}){let d=i(`messages`),f=t===`ai`||t===`bot`,p=!f||!!s,m=f?a||`AI Agent`:e;return Z(o.div,{layout:`position`,initial:!1,exit:{opacity:0},transition:{duration:.18},className:u(`flex flex-col items-start gap-1.5`,jp),children:[Z(`div`,{className:`flex max-w-[85%] items-start gap-2`,children:[X(Np,{size:28,senderKind:t,senderName:e,senderAvatarUrl:n,aiAssistantAvatarUrl:s,organizationLogoUrl:c,organizationName:l,className:`mt-0.5`}),X(`div`,{className:`rounded-wx-lg bg-wx-bg-elevated px-4 py-3 text-sm text-wx-fg`,children:Z(`span`,{className:`inline-flex items-end gap-1`,children:[X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-wx-fg-muted [animation-delay:-0.3s]`}),X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-wx-fg-muted [animation-delay:-0.15s]`}),X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-wx-fg-muted`})]})})]}),Z(`p`,{className:u(`text-[11px] text-wx-fg-subtle`,p?`ml-9`:`ml-1`),children:[X(`span`,{className:`font-medium text-wx-fg-muted`,children:m&&m!==`…`?m:d(`typingSomeone`)}),X(`span`,{"aria-hidden":`true`,children:` · `}),X(`span`,{children:d(r===`thinking`?`aiThinking`:r===`searching`?`aiSearching`:`typing`)})]})]})}var mm=42;function hm(e){let t=mm*(.6+Math.random()*.8);return e&&`.!?`.includes(e)?t+=380:e&&`,;:`.includes(e)&&(t+=180),t}function gm({text:e,startDelayMs:t=0,onDone:n}){let[r,i]=Y(t>0?-1:0),a=J(n);if(a.current=n,K(()=>i(t>0?-1:0),[e]),K(()=>{if(r<0){let e=setTimeout(()=>i(0),t);return()=>clearTimeout(e)}if(r>=e.length){a.current?.();return}let n=setTimeout(()=>i(e=>e+1),hm(e[r-1]));return()=>clearTimeout(n)},[r,e,t]),r<0)return Z(`span`,{className:`inline-flex items-end gap-1 align-middle`,"aria-hidden":`true`,children:[X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-current opacity-60 [animation-delay:-0.3s]`}),X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-current opacity-60 [animation-delay:-0.15s]`}),X(`span`,{className:`h-1.5 w-1.5 animate-bounce rounded-full bg-current opacity-60`})]});let o=r>=e.length;return Z(Dn,{children:[e.slice(0,r),!o&&X(`span`,{"aria-hidden":`true`,className:`ml-0.5 inline-block h-[1.05em] w-[0.5em] translate-y-[0.15em] animate-pulse rounded-[1px] bg-current align-baseline`})]})}function _m({kind:e,text:t,typewriter:n=!1,typewriterDelayMs:r=0}){return e===`SYSTEM`?X(`div`,{className:`flex justify-center px-2 py-1`,children:X(`span`,{className:`text-[11px] text-wx-fg-muted`,children:n?X(gm,{text:t,startDelayMs:r}):t})}):Z(`div`,{className:`flex w-full items-start gap-2 rounded-wx-sm border border-wx-border bg-wx-bg px-3 py-2.5 text-wx-fg-muted`,children:[X(Fs,{size:15,className:`mt-0.5 shrink-0`,"aria-hidden":`true`}),X(`p`,{className:`text-xs leading-relaxed italic`,children:t})]})}function vm({label:e}){return X(`div`,{className:`sticky top-2 z-10 flex justify-center py-1`,children:X(`span`,{className:`rounded-full bg-wx-bg-elevated px-3 py-1 text-[11px] font-medium text-wx-fg-muted shadow-sm`,children:e})})}function ym(e,t){return e.type===`OPERATOR_CONNECTED`?e.operatorName?t(`withOperator`,{name:e.operatorName}):t(`operatorConnected`):e.initiator===`VISITOR`?t(`chatResolvedByYou`):e.initiator===`OPERATOR`&&e.operatorName?t(`chatResolvedByOperator`,{name:e.operatorName}):t(`chatResolved`)}function bm({system:e,messageId:t}){let n=i(`messages`),r=e.type===`OPERATOR_CONNECTED`?e.operatorAvatar:void 0;return Z(`div`,{className:`flex items-center justify-center gap-1.5 px-2 py-1`,"data-message-id":t,children:[r&&X(`img`,{src:r,alt:``,className:`h-4 w-4 shrink-0 rounded-full object-cover`}),X(`span`,{className:`text-[11px] text-wx-fg-muted`,children:ym(e,n)})]})}var xm=yn(({label:e},t)=>Z(o.div,{ref:t,className:`flex items-center gap-2 py-1 overflow-hidden`,initial:{opacity:1},exit:{opacity:0,height:0,paddingTop:0,paddingBottom:0},transition:{duration:.18,ease:`easeOut`},children:[X(`span`,{"aria-hidden":`true`,className:`h-px flex-1 bg-wx-danger/40`}),X(`span`,{className:`text-[11px] font-semibold text-wx-danger`,children:e}),X(`span`,{"aria-hidden":`true`,className:`h-px flex-1 bg-wx-danger/40`})]}));xm.displayName=`UnreadDivider`;var Sm=xn(function({message:e,read:t,trackOperatorAvatar:n,operatorAvatarSrc:r,buttonsActive:i,enter:a,onQuickReply:o,onRetry:s,...c}){let l=q(()=>{let i=t?{...e,deliveryStatus:`READ`}:e;return n&&i.sender.kind===`operator`&&(i={...i,sender:{...i.sender,avatar:r}}),i},[e,t,n,r]),u=e.id,d=G(e=>o(u,e),[o,u]),f=G(()=>s?.(u),[s,u]);return X(am,{message:l,buttonsActive:i,enter:a,onButtonClick:d,onRetry:e.deliveryStatus===`FAILED`?f:void 0,...c})}),Cm=xn(function({rows:e,readMessageIds:t,isDummy:n,operatorAvatarSrc:r,activeButtonMessageId:i,unreadLabel:a,unreadDividerRef:o,onQuickReply:s,onRetry:c,...l}){let u=Ap(e.flatMap(e=>e.kind===`message`&&!e.message.system?[e.key]:[]));return X(Mt,{initial:!1,presenceAffectsLayout:!1,children:e.map(e=>{if(e.kind===`date`)return X(vm,{label:e.label},e.key);if(e.kind===`unread`)return X(xm,{ref:o,label:a},e.key);let d=e.message;return d.sender.kind===`system`&&d.system?X(bm,{system:d.system,messageId:d.id},e.key):X(Sm,{message:d,read:t.has(d.id),trackOperatorAvatar:n,operatorAvatarSrc:r,buttonsActive:d.id===i,enter:u.get(e.key)??null,onQuickReply:s,onRetry:c,...l},e.key)})})}),wm=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate();function Tm(e,t){if(e.createdAt){let t=new Date(e.createdAt);if(!Number.isNaN(t.getTime()))return t}return t}function Em(e,t,n){if(wm(e,n))return t.todayLabel;let r=new Date(n);return r.setDate(n.getDate()-1),wm(e,r)?t.yesterdayLabel:e.toLocaleDateString(t.locale,e.getFullYear()===n.getFullYear()?{day:`numeric`,month:`short`}:{day:`numeric`,month:`short`,year:`numeric`})}function Dm(e){return!e.system&&!(e.text??``).trim()&&!(e.media&&e.media.length>0)&&!(e.buttons&&e.buttons.length>0)}function Om(e,t){let n=t.now??new Date,r=[],i=null;for(let a of e){if(Dm(a))continue;let e=Tm(a,n),o=`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`;o!==i&&(i=o,r.push({kind:`date`,key:`date-${o}`,label:Em(e,t,n)})),t.unreadAnchorId&&a.id===t.unreadAnchorId&&r.push({kind:`unread`,key:`unread-divider`}),r.push({kind:`message`,key:a.clientKey??a.id,message:a})}return r}var km=5e3;function Am(e=Date.now,t=km){let n=null;return{mark(){n=e()},consume(){let r=n!==null&&e()-n<=t;return n=null,r}}}var jm=W.forwardRef(({className:e,type:t,...n},r)=>X(`input`,{ref:r,type:t,className:u(`h-11 w-full rounded-wx bg-wx-bg-elevated px-4 text-sm text-wx-fg`,`placeholder:text-wx-fg-muted`,`focus:outline-none focus:ring-2 focus:ring-wx-primary`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...n}));jm.displayName=`Input`;function Mm(e){return e===`EMAIL`?`email`:e===`PHONE`?`tel`:`text`}function Nm(e){return e===`NAME`?`name`:e===`EMAIL`?`email`:e===`PHONE`?`tel`:`off`}function Pm(e){return`wexio:prechat-submitted:${e}`}function Fm(e,t=H(`local`)){try{return t.getItem(Pm(e))===`1`}catch{return!1}}function Im(e,t=H(`local`)){try{t.setItem(Pm(e),`1`)}catch{}}function Lm(e,t,n){let r={};for(let i of e.fields){let e=(t[i.key]??``).trim();if(i.required&&!e){r[i.key]=n.required;continue}e&&(i.kind===`EMAIL`&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?r[i.key]=n.invalidEmail:i.kind===`PHONE`&&!/^[+\d\s()-]{5,}$/.test(e)&&(r[i.key]=n.invalidPhone))}return r}function Rm(e,t){return e.fields.map(e=>({key:e.key,value:(t[e.key]??``).trim()})).filter(e=>e.value.length>0)}function zm(e,t){if(!t)return{};let n={};for(let r of e.fields){let e=(r.kind===`NAME`?t.name:r.kind===`EMAIL`?t.email:r.kind===`PHONE`?t.phone:void 0)?.trim();e&&(n[r.key]=e)}return n}function Bm({form:e,values:t,errors:n,onChange:r,disabled:a=!1,locked:o}){let s=i(`prechat`),c=e=>{if(e.label.trim())return e.label;switch(e.kind){case`NAME`:return s(`labelName`);case`EMAIL`:return s(`labelEmail`);case`PHONE`:return s(`labelPhone`);case`CUSTOM_TEXT`:return s(`labelCustom`)}};return X(`div`,{className:`flex flex-col gap-1.5 border-wx-border border-b px-2.5 pt-2 pb-1.5`,children:e.fields.map(e=>{let i=c(e),l=n[e.key],d=!!o?.has(e.key);return Z(`div`,{children:[X(jm,{type:Mm(e.kind),value:t[e.key]??``,onChange:t=>r(e.key,t.target.value),autoComplete:Nm(e.kind),disabled:a,readOnly:d,"aria-readonly":d||void 0,"data-locked":d||void 0,title:d?s(`locked`):void 0,"aria-invalid":!!l,"aria-label":i,placeholder:e.required?`${i} *`:i,className:u(`h-8 rounded-wx-md px-3 text-[13px]`,d&&`cursor-default bg-wx-bg-elevated text-wx-fg-muted focus:ring-0`,l&&`ring-1 ring-wx-danger placeholder:text-wx-danger/60 focus:ring-wx-danger`)}),l&&X(`p`,{className:`mt-0.5 px-1 text-[10px] text-wx-danger leading-none`,children:l})]},e.key)})})}var Vm={values:{},locked:new Set,covered:!1},Hm=e=>e?.trim()||void 0;function Um(e,t){if(t){if(e===`NAME`)return Hm(t.name);if(e===`EMAIL`)return Hm(t.email);if(e===`PHONE`)return Hm(t.phone)}}function Wm(e){let{form:t}=e;if(!e.active||!t?.enabled||t.fields.length===0)return Vm;let n={},r=new Set;for(let i of t.fields){let t=Um(i.kind,e.host),a=Um(i.kind,e.profile),o=i.kind===`NAME`?Hm(e.session?.name):void 0,s=i.kind===`CUSTOM_TEXT`?Hm(e.profileCustom[i.key]):void 0;t?(n[i.key]=t,e.hostVerified&&r.add(i.key)):a||o?(n[i.key]=a??o,e.lockServerSide&&r.add(i.key)):s&&(n[i.key]=s)}return{values:n,locked:r,covered:t.fields.filter(e=>e.required).every(e=>!!n[e.key])}}function Gm(e){return!e.isInitial&&!e.atBottom&&!e.isVisitorSend}function Km(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;let r=t,i=e;return n.every(e=>e in r&&Km(i[e],r[e]))}function qm(e,t){if(e===t)return e;let n=new Map(e.map(e=>[e.id,e])),r=e.length===t.length,i=t.map((t,i)=>{let a=n.get(t.id),o=a&&Km(a,t)?a:t;return o!==e[i]&&(r=!1),o});return r?e:i}function Jm(e){let t=J([]),n=qm(t.current,e);return t.current=n,n}function Ym(e){return t=>t&&t.name===e.name&&t.kind===e.kind&&t.avatar===e.avatar&&t.phase===e.phase?t:e}function Xm(e,t,n){if(t<=0)return null;let r=e.filter(e=>e.direction===`OUTBOUND`&&!e.system&&e.id!==n);if(r.length===0)return null;let i=n?Math.min(t,r.length):t;return r.length<i?null:r[r.length-i].id}function Zm(e,t){let n=J(t);n.current=t;let r=J(e);K(()=>{r.current&&!e&&n.current(),r.current=e},[e])}function Qm(e){let t=J(!1),n=J(e);n.current=e;let{text:r,enabled:i}=e;K(()=>{!i||!r||t.current||(t.current=!0,n.current.send(r),n.current.onSent?.())},[i,r])}var $m=8e3;function eh(e){return e.aiEnabled!==!1&&!e.assignmentStatus&&e.online!==!1}var th=new Set([`read-receipt`,`status`,`blocked`,`reaction`]);function nh(e){return e.kind===`assignment`?!0:th.has(e.kind)||e.update||e.deleted?!1:(e.from??e.sender)?.kind!==`visitor`}function rh(e){let[t,n]=Y(!1),r=J(null),i=J(e);i.current=e;let a=G(()=>{r.current&&clearTimeout(r.current),r.current=null,n(!1)},[]),o=G(()=>{i.current&&(r.current&&clearTimeout(r.current),r.current=setTimeout(a,$m),n(!0))},[a]);return K(()=>{e||a()},[e,a]),K(()=>a,[a]),{pending:t,arm:o,clear:a}}var ih=80;function ah(e,t,n){let r=J(t);r.current=t;let i=J(n);i.current=n,K(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let n=t.firstElementChild instanceof HTMLElement?t.firstElementChild:null,a=t.clientHeight,o=t.clientWidth,s=n?.offsetHeight??0,c=i.current,l=!0,u=()=>t.clientHeight===a&&t.clientWidth===o&&(n?.offsetHeight??0)===s,d=()=>{u()&&(l=t.scrollHeight-t.scrollTop-t.clientHeight<=ih)},f=new ResizeObserver(()=>{let e=t.clientHeight,u=t.clientWidth,d=n?.offsetHeight??0,f=i.current,p=e!==a||u!==o,m=d!==s&&f===c;a=e,o=u,s=d,c=f,!(!p&&!m)&&l&&r.current()&&t.scrollTo({top:t.scrollHeight,behavior:`auto`})});return t.addEventListener(`scroll`,d,{passive:!0}),f.observe(t),n&&f.observe(n),()=>{t.removeEventListener(`scroll`,d),f.disconnect()}},[e])}function oh(e){let t={};for(let n of e.fields)t[n.key]=n.value??null;return t}function sh(e){return e==null||e===``||e.trim()===``}function ch(e,t){if(e==null)return null;switch(t){case`STRING`:case`ENUM`:case`AVATAR`:return e.trim()===``?null:e.trim();case`NUMBER`:{let t=e.trim();if(t===``)return null;let n=Number(t);return Number.isFinite(n)?String(n):t}case`BOOLEAN`:return e===`true`?`true`:`false`;case`DATE`:return e===``?null:e;case`ARRAY`:{let t=e.trim();if(t===``)return null;try{let e=JSON.parse(t);if(Array.isArray(e))return JSON.stringify(e.map(String))}catch{}return JSON.stringify(t.split(`,`).map(e=>e.trim()).filter(Boolean))}default:return e}}function lh(e,t){let n=[];for(let r of e){if(r.pinned)continue;let e=ch(r.value??null,r.type),i=ch(t[r.key]??null,r.type);e!==i&&n.push({key:r.key,value:i??``})}return n}function uh(e,t){let n=n=>t[n]?.trim()||e.fields.find(e=>e.key===n)?.value?.trim()||``,r=n(`firstName`),i=n(`lastName`);return r||i?`${r} ${i}`.trim():n(`name`)||n(`displayName`)||``}function dh(e){if(!e)return``;if(/^\d{4}-\d{2}-\d{2}$/.test(e))return e;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toISOString().slice(0,10)}function fh(e){if(!e)return[];try{let t=JSON.parse(e);if(Array.isArray(t))return t.map(e=>String(e))}catch{}return[]}var ph={};function mh(e){if(!e)return null;let t=t=>e.fields.find(e=>e.key===t)?.value?.trim()||void 0;return{name:uh(e,{})||void 0,email:t(`email`),phone:t(`phone`)}}function hh(e){let t={};for(let n of e?.fields??[]){let e=n.value?.trim();e&&(t[n.key]=e)}return t}var gh=3e3;function _h(e){let t=e.verified&&e.enabled,{data:n,loading:r}=fr({skip:!t}),i=q(()=>t?mh(n?.visitorProfile):null,[t,n?.visitorProfile]),a=q(()=>t?hh(n?.visitorProfile):ph,[t,n?.visitorProfile]),[o,s]=Y(!1),c=t&&r;return K(()=>{if(!c){s(!1);return}let e=setTimeout(()=>s(!0),gh);return()=>clearTimeout(e)},[c]),{identity:i,fieldValues:a,pending:c&&!o}}function vh(e,t){let n=ie(t),{slotKeyId:r,variantKeyId:i}=n?be(n):{slotKeyId:dt(t),variantKeyId:we(t)};if(!r||!i)return e;let a=n?me:e=>e,o=e.find(e=>e.kind===`MESSAGE`&&a(e.id)===r),s=o?.variants.find(e=>a(e.id)===i);if(!o||!s)return e;let{when:c,...l}=s;return e.map(e=>e===o?{...e,variants:[l]}:e)}function yh(e,t,n,r,i={}){let a=[];for(let o of e){let e;if(!(i.excludeMessages&&o.kind===`MESSAGE`)&&!(i.messageSlotId&&o.kind===`MESSAGE`&&o.id!==i.messageSlotId)){if(o.kind===`SYSTEM`)e=oi(o.variants,t);else if(n.has(o.id)){let t=n.get(o.id)??null;e=t?o.variants.find(e=>e.id===t.id)??t:null}else if(i.hold)continue;else e=oi(o.variants,t),r&&n.set(o.id,e);e&&a.push({slotId:o.id,kind:o.kind,variant:e})}}return a}function bh(e){let{publicSlots:t,active:n,isOpen:r,threadKey:i,token:a,welcomeSlotId:o}=e,s=li(),c=Ci(),l=J(new Map),u=s.slots?.messageSlots??t,d=q(()=>vh(u,i),[u,i]),f=Zr(),p=ie(i),m=p?f.snapshotOf(p):void 0,h=q(()=>{if(!p||!m)return d;let e=d.find(e=>e.kind===`MESSAGE`&&At(e.id,p)),t={...e,id:e?.id??be(p).slotKeyId,kind:`MESSAGE`,variants:[m]};return[...d.filter(t=>t!==e),t]},[d,p,m]),g=p==null?void 0:h.find(e=>e.kind===`MESSAGE`&&At(e.id,p))?.id,_=J({token:null,epoch:0});_.current.token!==a&&(_.current.token!==null&&(_.current.epoch+=1),_.current.token=a);let v=`${_.current.epoch}|${R(i)}`,y=l.current.get(v);y||(y=new Map,l.current.set(v,y));let b=h.some(e=>e.kind===`MESSAGE`&&y.has(e.id)),x=n&&!s.settled&&!b&&!m,S=dt(i)??void 0,C=S??g??o,w=q(()=>yh(h,c,y,r&&!x,{hold:x,messageSlotId:C,excludeMessages:n&&!C}),[h,c,y,r,x,C,n]),T=q(()=>{if(!S)return null;let e=w.find(e=>e.slotId===S);if(e)return{slotId:e.slotId,variantId:e.variant.id};let t=h.find(e=>e.kind===`MESSAGE`&&e.id===S),n=t?oi(t.variants,c):null;return t&&n?{slotId:t.id,variantId:n.id}:null},[w,S,h,c]),E=q(()=>{let e=g?w.find(e=>e.slotId===g):void 0;return e?{slotId:e.slotId,variant:e.variant}:null},[w,g]),D=q(()=>{if(S||!o)return null;let e=w.find(e=>e.kind===`MESSAGE`&&e.slotId===o);return e?{slotId:e.slotId,variantId:e.variant.id}:null},[w,S,o]),O=q(()=>h.flatMap(e=>e.kind===`MESSAGE`?e.variants.map(e=>({text:e.text})):[]),[h]);return q(()=>({welcomes:w,held:x,slotPick:T,welcomePick:D,localHeader:E,seedTexts:O}),[w,x,T,D,E,O])}var xh={required:`r`,invalidEmail:`e`,invalidPhone:`p`},Sh=[],Ch=4e3,wh=Ir(`voice-recorder`,()=>import(`./widget-react-BK8heNFR.js`),{pick:e=>e.VoiceRecorderBar}),Th=Ir(`giphy-picker`,()=>import(`./widget-react-DR2EqmbG.js`),{pick:e=>e.GiphyPicker});function Eh(e){return{...e.threadKey?{threadKey:e.threadKey}:{},...e.messageSlot?{messageSlot:e.messageSlot}:{}}}function Dh({isDummy:e,chatId:t,threadKey:r,onChatIdResolved:a,token:s,prechatForm:c,messenger:l,organizationLogoUrl:d,organizationName:f,operatorAvatars:p,catchUpHistory:m=!1,isOpen:h=!0,assignmentStatus:g,assignmentEstimate:v,threadStatus:b,blocked:x,globalBlocked:S,onStartNewConversation:C,onInbound:T,onOutbound:E,registerRealtimeHandler:D,unreadCount:O=0,clearUnread:k,liveMessages:j,appendLiveMessage:M,replaceLiveMessage:N,enqueueSend:P,onRetryOutbox:te,initialVisitorMessage:re,onInitialVisitorMessageSent:ae,welcomeSlotId:oe,visitorIdentity:se,visitorPrefill:ce,security:I,verified:ue=!1,identified:de,sessionName:pe,onGoogleCredential:me,onPasskeySession:_e,onInternalLink:ve,getTurnstileToken:ye}){let L=i(`messages`),xe=y(),Se=i(`prechat`),Ce=n(),{trackLinkClick:we,trackButtonClick:Te}=Ie(),Ee=fe(),De=F(l?.aiAssistant),Oe=bt()?.online,ke=rh(eh({aiEnabled:l?.aiAssistant?.enabled,assignmentStatus:g,online:Oe})),z=he(),je=z.publicKey??``,[Me,Ne]=Y(null);K(()=>{Ne(Fm(je,z.storage))},[je,z.storage]);let[Pe,Fe]=Y({}),[Le,Re]=Y({}),[ze,Ve]=Y(null),[He,{loading:Ue}]=Ae(),{refresh:We}=li(),Ge=G((e,t)=>{Fe(n=>({...n,[e]:t})),Re(t=>{if(!t[e])return t;let n={...t};return delete n[e],n})},[]),Ke=q(()=>c?zm(c,ce):{},[c,ce]);K(()=>{Object.keys(Ke).length!==0&&Fe(e=>{let t=!1,n={...e};for(let[e,r]of Object.entries(Ke))n[e]||(n[e]=r,t=!0);return t?n:e})},[Ke]);let[B,qe]=Y(!1),Je=de??ue,Ye=_().token!==null,Xe=Je||!!se,{identity:Ze,fieldValues:Qe,pending:$e}=_h({verified:Xe,enabled:!!c?.enabled&&!e&&!!s}),tt=!!(se?.jwt||se?.googleIdToken||se?.userId&&se?.userHash),nt=q(()=>Wm({form:c??null,active:Xe,host:se,hostVerified:tt,profile:Ze,profileCustom:Qe,session:{name:pe},lockServerSide:Ye&&Je}),[c,Xe,se,tt,Ze,Qe,pe,Ye,Je]),rt=nt.covered,ot=q(()=>{let e={...nt.values,...Pe};for(let t of nt.locked)e[t]=nt.values[t]??``;return e},[nt,Pe]),st=q(()=>!c?.enabled||c.fields.length===0||Object.keys(Ke).length===0?!1:Object.keys(Lm(c,Ke,xh)).length===0,[c,Ke]),lt=J(!1);K(()=>{!st||Me!==!1||B||lt.current||rt||!c||!e&&!s||(lt.current=!0,(async()=>{if(e){Im(je,z.storage),Ne(!0);return}try{let e=await ye?.()??void 0;await He({variables:{input:{fields:Rm(c,Ke),turnstileToken:e}}}),Im(je,z.storage),Ne(!0),We()}catch{lt.current=!1,qe(!0)}})())},[st,Me,B,rt,c,Ke,e,s,je,z.storage,He,ye,We]);let ut=!!c?.enabled&&c.fields.length>0&&Me===!1&&!$e&&!rt&&!(st&&!B),[V,H]=Y(()=>{if(typeof window>`u`)return!1;try{return z.sessionStorage.getItem(`wexio:demo-authed`)===`1`}catch{return!1}}),ft=e=>{H(e);try{e?z.sessionStorage.setItem(`wexio:demo-authed`,`1`):z.sessionStorage.removeItem(`wexio:demo-authed`)}catch{}},pt=I?.google?.enabled?I.google.clientId:null,mt=!!I?.passkey?.enabled,ht=e||Ye,gt=!!I?.requireAuth&&!Je&&!(ht&&V),_t=b===`CLOSED`,vt=!!x,yt=!!S,xt=G(async()=>{if(!ut||!c)return!0;let t=Lm(c,ot,{required:Se(`required`),invalidEmail:Se(`invalidEmail`),invalidPhone:Se(`invalidPhone`)});if(Object.keys(t).length>0)return Re(t),!1;if(Ve(null),e)return Im(je,z.storage),Ne(!0),!0;try{let e=await ye?.()??void 0;return await He({variables:{input:{fields:Rm(c,ot),turnstileToken:e}}}),Im(je,z.storage),Ne(!0),We(),!0}catch(e){return Ve(e instanceof Error?e.message:Se(`submitFailed`)),!1}},[ut,c,ot,e,je,z.storage,He,Se,ye,We]),St=r??`main`,wt=kf(z.publicKey,r??null),[Tt]=Y(()=>Cf(Af(wt,z.drafts)));K(()=>jf(Tt,wt,z.drafts),[Tt,wt,z.drafts]);let[Et,Dt]=Y(!1),[kt,At]=Y(!1),[jt,Nt]=Y(!1),[Pt,Ft]=Y(!1),[It,Lt]=Y(null),Rt=J(new Set),zt=J(new Map),[Bt,Vt]=Y(!1);Zm(h,()=>Vt(!1));let Ht=J(null),Ut=J(null),Wt=J(null),Gt=J(null);K(()=>{if(!kt)return;let e=e=>{let t=e.composedPath();Gt.current&&t.includes(Gt.current)||t.some(e=>e instanceof Element&&e.matches(`[data-wx-commands-panel]`))||At(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[kt]);let Kt=e=>{Ht.current?.insertText(e)},qt=G(()=>{Tt.set(``,``),Ht.current?.clear()},[Tt]),Jt=q(()=>e&&!r?le(xe):[],[e,r,xe]),[Xt,Zt]=Y(()=>fp(St).appended),Qt=q(()=>[...Jt,...Xt],[Jt,Xt]),$t=e?Qt:j??[],[en]=Y(()=>Am()),tn=J(null),nn=J(null),rn=J(null),an=Zr(),on=J(t);on.current=t;let sn=G(()=>{let e=dt(r),t=ee({threadKey:r,current:tn.current,remembered:e?Ld(z.storage,z.publicKey??``,e):null,locale:Ce,exists:!!on.current});if(t.remember&&Rd(z.storage,z.publicKey??``,t.remember),e)return t;let n=rn.current,i=ie(r);if(n&&i)return an.snapshotOf(i)||an.remember(n.slotId,n.variant,!!be(i).variantKeyId),t;let a=ne({threadKey:r,pick:nn.current,exists:!!on.current,locale:Ce});return a?{...t,messageSlot:a}:t},[r,Ce,z,an]),cn=q(()=>P?e=>{en.mark(),ke.arm();let{threadKey:t,messageSlot:n}=sn();return P({...e,threadKey:t,...n?{messageSlot:n}:{}})}:void 0,[P,en,sn,ke.arm]),ln=G(t=>{if(t.sender?.kind===`visitor`&&(en.mark(),e||ke.arm()),e){pp(St,t),Zt(e=>e.some(e=>e.id===t.id)?e:[...e,t]);return}M?.(t)},[e,M,St,en,ke.arm]),{fetchPage:un}=sr(),dn=e?jd:un,fn=G((n,i)=>{if(e){ln({id:`gif-${n.id}-${Date.now()}`,direction:`INBOUND`,text:``,media:[{url:n.sourceUrl,mimetype:n.mimetype,alt:n.title}],sender:{kind:`visitor`,name:``},ageLabel:new Date().toLocaleTimeString(Ce,{hour:`numeric`,minute:`2-digit`}),deliveryStatus:`SENT`});return}cn&&(E?.(),cn({text:``,threadKey:r??null,chatId:t??null,media:[{filename:n.title||`gif`,mimetype:n.mimetype||`image/gif`,giphyUrl:n.sourceUrl,gifKind:cr(i),previewUrl:n.previewUrl,previewWidth:n.previewWidth,previewHeight:n.previewHeight}]}))},[e,ln,cn,E,r,t,Ce]),[pn,W]=Y(()=>new Set(e?fp(St).consumed:[])),[mn,hn]=Y(null),gn=q(()=>mn??(ke.pending?{name:De??`AI Agent`,kind:`ai`,phase:`thinking`}:null),[mn,ke.pending,De]),vn=J(null);K(()=>()=>{vn.current&&clearTimeout(vn.current)},[]);let[yn,bn]=Y([]),[xn,Sn]=Y(null),Cn=J(null),wn=J(null),[En]=Ot(),[On]=Be(),[kn]=Ct(),An=bt(),jn=J(new Set),Mn=J(!0),Nn=J(!0),Pn=J(0),Fn=J(!1);K(()=>{O===0&&(Fn.current=!1)},[O]);let In=G(()=>{if(!Fn.current&&O!==0&&(Fn.current=!0,k?.(),!(e||!t))){if(An){An.enqueue({op:`readAck`,semantics:`convergence`,convergenceKey:`read:${t}`,payload:{chatId:t}});return}kn({variables:{chatId:t}}).catch(()=>{Fn.current=!1})}},[t,e,O,kn,k,An]),[Ln,Rn]=Y(()=>new Set(e?fp(St).read:[]));K(()=>{e&&mp(St,pn,Ln)},[e,St,pn,Ln]);let[zn,Bn]=Y(null),Vn=(e,t)=>Bn({items:e,index:t}),{data:Hn,loading:Un,fetchMore:Wn,refetch:Gn}=w({variables:{chatId:t??``,limit:10},skip:e||!t||!s,fetchPolicy:`cache-and-network`,nextFetchPolicy:`cache-first`});K(()=>{if(!m||e||!t||!s)return;let n=setTimeout(()=>{Gn?.().catch(()=>{})},700);return()=>clearTimeout(n)},[m,e,t,s,Gn]);let qn=(()=>{let e=Hn?.visitorChatHistory?.items;if(!Array.isArray(e)||e.length===0)return null;let t=e[e.length-1];return typeof t?.id==`string`?t.id:null})(),Q=!!Hn?.visitorChatHistory?.nextCursor,[Jn,Xn]=Y(!1),[Zn,Qn]=Y(!1),$n=G(async()=>{if(!(e||!t||!qn||Jn||Zn||!Q)){Xn(!0);try{((await Wn({variables:{chatId:t,before:qn,limit:10},updateQuery:(e,{fetchMoreResult:t})=>{if(!t)return e;let n=e.visitorChatHistory?.items??[],r=t.visitorChatHistory?.items??[],i=new Set(n.map(e=>typeof e.id==`string`?e.id:null).filter(e=>!!e)),a=[...n,...r.filter(e=>typeof e.id!=`string`||!i.has(e.id))];return{...e,visitorChatHistory:{...t.visitorChatHistory,items:a}}}})).data.visitorChatHistory?.items?.length??0)===0&&Qn(!0)}catch{}finally{Xn(!1)}}},[e,t,qn,Jn,Zn,Q,Wn]),er=J(()=>{});K(()=>{er.current=e=>or(e)}),K(()=>{if(D)return D(e=>er.current(e))},[D]);let[tr,{loading:nr}]=zo(),[rr]=at(),ir=J(0),ar=G(()=>{if(e||!s)return;let n=Date.now();n-ir.current<3e3||(ir.current=n,rr({variables:{chatId:t??void 0}}).catch(()=>void 0))},[rr,e,s,t]),or=e=>{nh(e)&&ke.clear();let t=e.from??e.sender,n=t?.kind,r=t?.name??``;if(e.kind===`typing`){hn(Ym({name:n===`ai`||n===`bot`?De??`AI Agent`:r,kind:n,avatar:t?.avatar,phase:e.phase})),vn.current&&clearTimeout(vn.current),vn.current=setTimeout(()=>hn(null),8e3);return}if(e.kind===`read-receipt`){let t=e.readReceipt?.messageIds??[];t.length>0&&Rn(e=>{let n=new Set(e);for(let e of t)n.add(e);return n});return}vn.current&&(clearTimeout(vn.current),vn.current=null),hn(null)},lr=q(()=>e?[]:Kn(Hn,Ce,De??`AI Agent`),[e,Hn,Ce,De]),$=Jm(q(()=>e?$t:Sp(lr,$t),[e,$t,lr])),ur=J(0);ur.current===0&&O>0&&(ur.current=O);let[dr,fr]=Y(null),pr=J(null),mr=J(!1),hr=J(null),gr=J(null);gr.current=dr,K(()=>{if(mr.current||Un)return;mr.current=!0;let t=ur.current;if(t>0&&$.length>0&&!e){let e=Xm($,t,hr.current);e&&fr(e)}},[Un,$,e]),Tn(()=>{if(!dr)return;let e=pr.current;e&&(yr.current=!0,e.scrollIntoView({block:`center`,behavior:`auto`}))},[dr]),K(()=>{if(!dr)return;let e=setTimeout(()=>{gr.current=null,fr(null)},Ch);return()=>clearTimeout(e)},[dr]);let _r=J(h);K(()=>{let t=h&&!_r.current;if(_r.current=h,!t)return;let n=null;if(O>0&&$.length>0&&!e){let e=0;for(let t=$.length-1;t>=0;t--)if($[t].direction===`OUTBOUND`&&(e+=1,e===O)){n=$[t].id;break}}gr.current=n,yr.current=!1,fr(n)},[h,O,$,e]),K(()=>{let e=Cn.current;if(!e)return;let t=()=>{let t=e.scrollHeight-e.scrollTop-e.clientHeight,n=t<80;Mn.current=n,Ft(t>160),n&&(Nn.current=!0),e.scrollTop<120&&$n()};t(),e.addEventListener(`scroll`,t,{passive:!0});let n=t=>{let n=t.target;(n instanceof HTMLImageElement||n instanceof HTMLVideoElement)&&(!(Date.now()<Pn.current)&&(!Mn.current||!Nn.current)||e.scrollTo({top:e.scrollHeight,behavior:`auto`}))},r=()=>{Pn.current=0};return e.addEventListener(`load`,n,!0),e.addEventListener(`wheel`,r,{passive:!0}),e.addEventListener(`touchmove`,r,{passive:!0}),e.addEventListener(`keydown`,r),()=>{e.removeEventListener(`wheel`,r),e.removeEventListener(`touchmove`,r),e.removeEventListener(`keydown`,r),e.removeEventListener(`scroll`,t),e.removeEventListener(`load`,n,!0)}},[$n]);let vr=J(null);K(()=>{let e=Cn.current;if(!e)return;if(Jn){vr.current={scrollTop:e.scrollTop,scrollHeight:e.scrollHeight};return}let t=vr.current;if(!t)return;vr.current=null;let n=e.scrollHeight-t.scrollHeight;n>0&&(e.scrollTop=t.scrollTop+n)},[Jn]);let yr=J(!1),br=J(0);ah(Cn,()=>Nn.current&&!gr.current&&!(ur.current>0&&!mr.current),`${$.length}:${+!!gn}`),Tn(()=>{let e=Cn.current;if(!e)return;let t=!yr.current&&$.length>0,n=br.current,r=$.length>n;br.current=$.length;let i=$[$.length-1],a=r&&!t&&!!i&&i.sender.kind!==`visitor`,o=r?$[n]:null,s=r&&en.consume()&&!t&&!!i&&i.sender.kind===`visitor`;if(Gm({isInitial:t,atBottom:Mn.current,isVisitorSend:s}))return;let c=e.firstElementChild,l=(n=!1)=>{if(!Gm({isInitial:t,atBottom:Mn.current,isVisitorSend:s})&&!(!s&&(gr.current||ur.current>0&&!mr.current))){if(a){if(Nn.current=!1,!Mn.current)return;let t=o?e.querySelector(`[data-message-id="${o.id}"]`):null;if(!t)return;let n=t.getBoundingClientRect().height,r=e.clientHeight;if(n<=r*.6)e.scrollTo({top:e.scrollHeight-r,behavior:`smooth`}),Nn.current=!0,Pn.current=Date.now()+3e3;else{let n=e.getBoundingClientRect(),i=t.getBoundingClientRect().top-n.top+e.scrollTop-(r-80),a=Math.max(0,Math.min(e.scrollHeight-r,i));e.scrollTo({top:a,behavior:`smooth`})}return}s&&(Nn.current=!0),!(!t&&!Nn.current)&&e.scrollTo({top:e.scrollHeight,behavior:t||n?`auto`:`smooth`})}};l(),t&&(yr.current=!0,Mn.current=!0);let u=requestAnimationFrame(()=>l()),d=null;if(c&&typeof ResizeObserver<`u`){d=new ResizeObserver(()=>l(!0)),d.observe(c);let e=window.setTimeout(()=>d?.disconnect(),2e3);return()=>{cancelAnimationFrame(u),clearTimeout(e),d?.disconnect()}}return()=>cancelAnimationFrame(u)},[$.length,gn,dr,h]),K(()=>{if(!h||O===0)return;let e=Cn.current;if(!e)return;let t=()=>{e.scrollHeight-e.scrollTop-e.clientHeight<=20&&In()};return t(),e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[h,O,In,$.length]);let xr=(()=>{for(let e=$.length-1;e>=0;e--){let t=$[e];if(t.direction!==`OUTBOUND`)break;if(t.buttons&&t.buttons.length>0&&!pn.has(t.id))return t.id}return null})(),Sr=J(xe);Sr.current=xe;let Cr=(e,t)=>{let n=`tmp-${Date.now()}`;ln({id:n,direction:`INBOUND`,text:e,...t&&t.length>0?{media:t}:{},ageLabel:`now`,sender:{kind:`visitor`,name:`You`},deliveryStatus:`DELIVERED`}),E?.(),setTimeout(()=>{let t=hp(e,Sr.current);t.text&&(ln({id:`tmp-fin-${Date.now()}`,direction:`OUTBOUND`,text:t.text,ageLabel:`now`,sender:{kind:`ai`,name:A},buttons:t.buttons}),Rn(e=>{let t=new Set(e);return t.add(n),t}),T?.())},900)},wr=J(!1),Tr=vp(xe);K(()=>{!e||!re||!Tr||wr.current||(wr.current=!0,Cr(re),ae?.())},[e,re,Tr]);let Er=(n,i)=>{if(i.type===`url`){ku(i.url)&&(we({url:i.url,targetType:`CTA_URL`,targetRefId:n,title:i.text}),Au(i.url));return}if(i.type===`phone`){Nu(i.phoneNumber);return}if(i.type&&i.type!==`callback`)return;if(W(e=>{let t=new Set(e);return t.add(n),t}),e){Cr(i.text);return}if(cn){E?.(),cn({text:i.text,threadKey:r??null,chatId:t??null,buttonValue:i.payload||void 0});return}let a=`tmp-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;ln({id:a,clientKey:a,direction:`INBOUND`,text:i.text,ageLabel:`now`,sender:{kind:`visitor`,name:``},deliveryStatus:`SENT`}),E?.(),tr({variables:{input:{text:i.text,buttonValue:i.payload||void 0,...Eh(sn())}}}).then(e=>{let t=e.data?.sendVisitorMessage?.messageId;t&&N?.(a,{id:t,direction:`INBOUND`,text:i.text,ageLabel:`now`,sender:{kind:`visitor`,name:``},deliveryStatus:`DELIVERED`})}).catch(()=>{})},Dr=async t=>{Sn(null);let n=Fd(t);if(!Nd.has(n)){Sn(L(`fileMimeNotAllowed`));return}if(t.size>10485760){Sn(L(`fileTooLarge`));return}if(e){bn(e=>[...e,{tempId:`upl-${Date.now()}`,filename:t.name,mimetype:n,mediaId:`demo-media`,url:URL.createObjectURL(t)}]);return}let r=`upl-${Date.now()}`,i=URL.createObjectURL(t),{base64:a}=await Md(t);if(An&&!An.online){bn(e=>[...e,{tempId:r,filename:t.name,mimetype:n,mediaId:null,url:i,dataBase64:a,uploading:!1}]);return}bn(e=>[...e,{tempId:r,filename:t.name,mimetype:n,mediaId:null,url:i,dataBase64:a,uploading:!0}]);try{let e=(await En({variables:{input:{filename:t.name,mimetype:n,dataBase64:a}}})).data?.uploadVisitorMedia;if(!e)throw Error(`empty upload response`);jn.current.delete(r)&&On({variables:{mediaId:e.mediaId}}).catch(()=>void 0),e.url&&URL.revokeObjectURL(i),bn(t=>t.map(t=>t.tempId===r?{...t,mediaId:e.mediaId,dataBase64:void 0,uploading:!1,...e.url?{url:e.url}:{}}:t))}catch{bn(e=>e.map(e=>e.tempId===r?{...e,uploading:!1}:e))}},Or=t=>{let n=yn.find(e=>e.tempId===t);n?.url?.startsWith(`blob:`)&&URL.revokeObjectURL(n.url),n&&!e&&(n.mediaId?On({variables:{mediaId:n.mediaId}}).catch(()=>void 0):jn.current.add(t)),bn(e=>e.filter(e=>e.tempId!==t))},kr=async()=>{Sn(null),await xt()&&Vt(!0)},Ar=async n=>{if(Vt(!1),n.size>10485760){Sn(L(`fileTooLarge`));return}if(e){let e=Yn(n.base64,n.mimetype),t=URL.createObjectURL(e),r=`tmp-voice-${Date.now()}`;ln({id:r,direction:`INBOUND`,text:``,ageLabel:`now`,sender:{kind:`visitor`,name:`You`},media:[{url:t,mimetype:n.mimetype,alt:n.filename}],deliveryStatus:`DELIVERED`}),E?.(),setTimeout(()=>{let e=gp(Sr.current);e&&(ln({id:`tmp-fin-${Date.now()}`,direction:`OUTBOUND`,text:e,ageLabel:`now`,sender:{kind:`ai`,name:A}}),Rn(e=>{let t=new Set(e);return t.add(r),t}),T?.())},900);return}if(cn){let e;try{let t=(await En({variables:{input:{filename:n.filename,mimetype:n.mimetype,dataBase64:n.base64}}})).data?.uploadVisitorMedia;if(!t?.mediaId)throw Error(`empty upload response`);e=[{filename:n.filename,mimetype:n.mimetype,mediaId:t.mediaId,...t.url?{s3Url:t.url}:{}}]}catch{e=[{filename:n.filename,mimetype:n.mimetype,dataBase64:n.base64}]}E?.(),cn({text:``,threadKey:r??null,chatId:t??null,media:e});return}try{let e=(await En({variables:{input:{filename:n.filename,mimetype:n.mimetype,dataBase64:n.base64}}})).data?.uploadVisitorMedia,t=e?.mediaId;if(!t)throw Error(`empty upload response`);let i=e?.url??URL.createObjectURL(Yn(n.base64,n.mimetype)),a=`tmp-voice-${Date.now()}`;ln({id:a,clientKey:a,direction:`INBOUND`,text:``,ageLabel:`now`,sender:{kind:`visitor`,name:``},media:[{url:i,mimetype:n.mimetype,alt:n.filename}],deliveryStatus:`SENT`}),await tr({variables:{input:{mediaIds:[t],...r?{threadKey:r}:{}}}}),E?.()}catch{Sn(L(`uploadFailed`))}},jr=e=>{Vt(!1),Sn(L(e===`unsupported`?`voiceUnsupported`:e===`denied`?`voiceDenied`:`uploadFailed`))},Mr=lp(async()=>{let n=Tt.get().text,i=Tt.get().html,o=n.trim(),s=yn.map(e=>e.mediaId).filter(e=>!!e),c=yn.some(e=>!!e.mediaId||!!e.dataBase64);if(!o&&!c||nr||Ue||n.length>4e3)return;let l=Xf(i),u=Qf(l)?l:o,d=yn.filter(e=>!!e.mediaId&&!!e.url).map(e=>({url:e.url,mimetype:e.mimetype,alt:e.filename}));if(!await xt())return;if(e){qt(),bn([]),Cr(u,d);return}if(cn){let e=yn.filter(e=>!!e.mediaId||!!e.dataBase64).map(e=>({filename:e.filename,mimetype:e.mimetype,...e.mediaId?{mediaId:e.mediaId}:{},...e.mediaId&&e.url?{s3Url:e.url}:{},...!e.mediaId&&e.dataBase64?{dataBase64:e.dataBase64}:{}}));qt(),bn([]),E?.(),cn({text:u,threadKey:r??null,chatId:t??null,...e.length>0?{media:e}:{}});return}let f=`tmp-${Date.now()}`;ln({id:f,clientKey:f,direction:`INBOUND`,text:u,ageLabel:`now`,sender:{kind:`visitor`,name:``},...d.length>0?{media:d}:{},deliveryStatus:`SENT`}),qt(),bn([]);try{let e=await tr({variables:{input:{...u?{text:u}:{},...s.length>0?{mediaIds:s}:{},...Eh(sn())}}});E?.();let n=e.data?.sendVisitorMessage;n?.chatId&&n.chatId!==t&&a?.(n.chatId);let r=n?.messageId;r&&N?.(f,{id:r,direction:`INBOUND`,text:u,ageLabel:`now`,sender:{kind:`visitor`,name:``},...d.length>0?{media:d}:{},deliveryStatus:`DELIVERED`})}catch{}}),Nr=async t=>{if(At(!1),!await xt())return;if(e){Cr(t);return}let n=`tmp-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;ln({id:n,clientKey:n,direction:`INBOUND`,text:t,ageLabel:`now`,sender:{kind:`visitor`,name:``},deliveryStatus:`SENT`}),E?.();try{let e=(await tr({variables:{input:{text:t,...r?{threadKey:r}:{}}}})).data?.sendVisitorMessage?.messageId;e&&N?.(n,{id:e,direction:`INBOUND`,text:t,ageLabel:`now`,sender:{kind:`visitor`,name:``},deliveryStatus:`DELIVERED`})}catch{}},Pr=yn.some(e=>e.mediaId===null),Fr=ie(r),Ir=l?.messageSlots!==void 0||!!Fr&&!!an.snapshotOf(Fr),{welcomes:Lr,held:Rr,slotPick:zr,welcomePick:Br,localHeader:Vr,seedTexts:Hr}=bh({publicSlots:l?.messageSlots??Sh,active:Ir,isOpen:h,threadKey:r,welcomeSlotId:oe,token:s}),Ur=Ir?Lr.map(e=>({kind:e.kind,text:e.variant.text,slotId:e.slotId,variantId:e.variant.id,buttons:e.variant.buttons})):e&&!(l?.messages&&l.messages.length>0)?et(xe):l?.messages??[],Wr=Ur.filter(e=>e.kind===`SYSTEM`),Gr=Ur.filter(e=>e.kind===`HINT`);tn.current=zr,nn.current=Br,rn.current=Vr;let Kr=$.length===0,qr=!e&&(zr??Br)!==null&&($.some(e=>e.direction===`OUTBOUND`)||!!t&&$.length===0),Jr=Ur.filter(e=>e.kind===`MESSAGE`),Yr=e?null:bp($,Hr);hr.current=Yr?.id??null;let Xr=!!Yr&&Jr.some(e=>yp(e.text)===yp(Yr.text??``)),Qr=Yr?Xr?Jr:[]:qr?[]:Jr,$r=Qr.length>0?Qr.length:+!!Yr,ei=R(r);Tn(()=>{if($r===0&&!Rr){Lt(null);return}if(!Kr||Rt.current.has(ei)){Lt(!1);return}Lt(!0);let e=zt.current.get(ei)??Date.now();zt.current.set(ei,e);let t=setTimeout(()=>{Lt(!1),Rt.current.add(ei)},Math.max(0,3e3-(Date.now()-e)));return()=>clearTimeout(t)},[Kr,$r,ei,Rr]);let ti=q(()=>Qr.length===0&&Yr?[{...Yr,id:`welcome-msg-0`}]:Qr.map((e,t)=>({id:`welcome-msg-${t}`,direction:`OUTBOUND`,text:e.text,ageLabel:``,sender:{kind:`ai`,name:De??``},...e.buttons&&e.buttons.length>0?{buttons:e.buttons.map(e=>({text:e.label,payload:``}))}:{}})),[Qr,Yr,De]),ni=e||gt||!Q&&(!Un||$.length>0);l?.showRelatedNews,l?.showRelatedHelpArticles,l?.showReactionCounts;let[ri,ii]=Y(()=>new Set),ai=!ri.has(ei)&&!$.some(e=>e.direction===`INBOUND`),oi=(e,t)=>{ii(e=>new Set(e).add(ei));let n=e.buttons?.find(e=>e.label===t.text);if(e.slotId&&e.variantId&&n){let t={slotId:e.slotId,variantId:e.variantId,buttonId:n.id};Te({source:`WELCOME_MESSAGE`,...t}),Ee.onMessageAction?.({...t,actionType:`QUICK_REPLY`,source:`WELCOME`})}Er(`welcome-${e.slotId??``}`,{text:t.text,payload:``})};Qm({text:re,enabled:!e&&!!cn&&(zr!==null||Vr!==null),send:e=>{ii(e=>new Set(e).add(ei)),E?.(),cn?.({text:e,threadKey:r??null,chatId:t??null})},onSent:ae});let si=q(()=>Om(Yr?$.filter(e=>e.id!==Yr.id):$,{locale:Ce,todayLabel:L(`today`),yesterdayLabel:L(`yesterday`),unreadAnchorId:dr}),[$,Yr,Ce,L,dr]),ci=zd(Er),ui=zd(Vn),di=zd(ve),fi=zd(e=>te?.(e)),pi=G(()=>{let e=Cn.current;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},[]);return Z(`div`,{className:`flex flex-1 flex-col overflow-hidden`,children:[Z(`div`,{className:`relative flex flex-1 flex-col overflow-hidden`,children:[X(it,{className:`flex-1`,viewportRef:Cn,children:Z(`div`,{className:`flex flex-col gap-3 px-4 pt-4 pb-3`,children:[ni&&Wr.length>0&&X(ml,{enabled:l?.messageSlots!==void 0,id:Lr.filter(e=>e.kind===`SYSTEM`).map(e=>e.variant.id).join(`|`),children:X(`div`,{className:`flex flex-col gap-2`,children:Wr.map(e=>X(_m,{kind:e.kind,text:e.text},`${e.kind}:${e.text}`))})}),ni&&($r>0||Rr)&&It!==null&&X(Mt,{mode:`wait`,initial:!1,children:It||Rr?X(pm,{actorName:De??``,actorKind:`ai`,aiAssistantName:De,aiAssistantAvatarUrl:l?.aiAssistantAvatar??null,organizationLogoUrl:d,organizationName:f},`welcome-typing`):X(o.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.24,ease:`easeOut`},className:`flex flex-col gap-3`,children:ti.map((e,t)=>X(am,{message:e,buttonsActive:ai&&!Yr,onButtonClick:e=>oi(Qr[t],e),aiAssistantAvatarUrl:l?.aiAssistantAvatar??null,aiAssistantName:De,organizationLogoUrl:d,organizationName:f},e.id))},`welcome-msgs`)}),ni&&Gr.length>0&&X(`div`,{className:`flex flex-col gap-2`,children:Gr.map(e=>X(_m,{kind:e.kind,text:e.text},`${e.kind}:${e.text}`))}),!gt&&Z(Dn,{children:[Un&&$.length===0&&Z(`div`,{className:`flex flex-col gap-3`,children:[Z(`div`,{className:`flex items-start gap-2`,children:[X(U,{className:`h-7 w-7 shrink-0 rounded-full`}),X(U,{className:`h-10 w-3/4 rounded-wx-lg`})]}),X(`div`,{className:`flex flex-row-reverse items-start`,children:X(U,{className:`h-8 w-2/3 rounded-wx-lg`})}),Z(`div`,{className:`flex items-start gap-2`,children:[X(U,{className:`h-7 w-7 shrink-0 rounded-full`}),X(U,{className:`h-12 w-4/5 rounded-wx-lg`})]})]}),X(Cm,{rows:si,readMessageIds:Ln,isDummy:e,operatorAvatarSrc:p?.[0]?.src,activeButtonMessageId:xr,unreadLabel:L(`unreadMessages`),unreadDividerRef:pr,organizationLogoUrl:d,organizationName:f,aiAssistantAvatarUrl:l?.aiAssistantAvatar??null,aiAssistantName:De,onQuickReply:ci,onOpenLightbox:ui,onInternalLink:ve?di:void 0,onRetry:te?fi:void 0})]}),!gt&&gn&&X(pm,{actorName:gn.name,actorKind:gn.kind,actorAvatarUrl:gn.avatar,actorPhase:gn.phase,aiAssistantName:De,aiAssistantAvatarUrl:l?.aiAssistantAvatar??null,organizationLogoUrl:d,organizationName:f})]})}),X(Mt,{children:Pt&&X(o.button,{type:`button`,onClick:pi,"aria-label":L(`scrollToLatest`),initial:{opacity:0,y:12,x:`-50%`},animate:{opacity:1,y:0,x:`-50%`},exit:{opacity:0,y:12,x:`-50%`},transition:{duration:.18,ease:`easeOut`},whileHover:{scale:1.1},whileTap:{scale:.94},className:`absolute bottom-3 left-1/2 z-10 flex size-9 items-center justify-center rounded-full border border-wx-border bg-wx-bg text-wx-fg-muted shadow-md transition-colors hover:text-wx-fg`,children:X(ge,{className:`size-5`})})})]}),Z(`div`,{className:`relative bg-wx-bg px-3 pt-2 pb-3`,children:[g===`pending`&&!_t&&!vt&&X(`div`,{className:`mb-2 flex justify-center`,children:X(`span`,{className:`rounded-wx-sm bg-wx-bg-elevated px-3 py-1 text-center text-[11px] text-wx-fg-muted`,children:v&&No(v,L,Ce)||L(`connectingOperator`)})}),X(Rf,{open:Et,onClose:()=>Dt(!1),onSelect:Kt,anchorRef:Ut}),X(_n,{fallback:null,children:X(Th,{open:jt,onClose:()=>Nt(!1),fetchPage:dn,onPick:fn,anchorRef:Wt})}),xn&&X(`p`,{className:`mb-2 text-xs text-wx-danger`,children:xn}),X(Mt,{mode:`wait`,initial:!1,children:vt?Z(o.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},className:`flex flex-col items-center gap-3 rounded-wx-lg border border-wx-border bg-wx-bg p-4`,children:[X(`p`,{className:`text-center text-sm text-wx-fg-muted`,children:L(yt?`visitorBlocked`:`conversationBlocked`)}),!yt&&C&&X(Yt,{type:`button`,onClick:C,className:`w-full`,children:L(`startNewConversation`)})]},`blocked`):_t?Z(o.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},className:`flex flex-col items-center gap-2 rounded-wx-lg border border-wx-border bg-wx-bg p-4`,children:[X(`p`,{className:`text-center font-semibold text-sm text-wx-fg`,children:L(`conversationClosedTitle`)}),X(`p`,{className:`text-center text-xs text-wx-fg-muted`,children:L(`conversationClosedHint`)}),C&&X(Yt,{type:`button`,onClick:C,className:`mt-1 w-full`,children:L(`startNewConversation`)})]},`closed`):gt?Z(o.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},className:`flex flex-col items-center gap-2 rounded-wx-lg border border-wx-border bg-wx-bg p-4`,children:[X(`p`,{className:`text-center text-sm text-wx-fg-muted`,children:L(`signInToChat`)}),X(`div`,{className:`flex w-full flex-col gap-2`,children:ht?Z(Dn,{children:[I?.google?.enabled&&X(`button`,{type:`button`,onClick:()=>ft(!0),className:`flex w-full items-center justify-center gap-2 rounded-wx border border-wx-border bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated-2`,children:L(`googleSignInDemo`)}),I?.passkey?.enabled&&X(`button`,{type:`button`,onClick:()=>ft(!0),className:`flex w-full items-center justify-center gap-2 rounded-wx border border-wx-border bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-fg transition-colors hover:bg-wx-bg-elevated-2`,children:L(`passkeySignIn`)}),!I?.google?.enabled&&!I?.passkey?.enabled&&X(`p`,{className:`text-center text-xs text-wx-fg-subtle`,children:L(`signInUnavailable`)})]}):Z(Dn,{children:[pt&&X(Ud,{clientId:pt,onCredential:e=>me?.(e)}),mt&&X(mf,{onSession:_e}),!pt&&!mt&&X(`p`,{className:`text-center text-xs text-wx-fg-subtle`,children:L(`signInUnavailable`)})]})})]},`auth-gate`):Bt?X(_n,{fallback:X(`div`,{className:`h-13 w-full animate-pulse rounded-wx-lg bg-wx-bg-elevated`}),children:X(wh,{onComplete:Ar,onCancel:()=>Vt(!1),onError:jr})},`recorder`):Z(o.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.18},className:u(`flex flex-col rounded-wx-lg border border-wx-border bg-wx-bg`,`focus-within:border-wx-primary focus-within:ring-2 focus-within:ring-wx-primary/20`,`transition-colors`),children:[yn.length>0&&X(`div`,{className:`px-3 pt-3 pb-1`,children:X(bf,{attachments:yn,onRemove:Or,onOpenLightbox:Vn})}),ut&&c&&Z(Dn,{children:[X(Bm,{form:c,values:ot,locked:nt.locked,errors:Le,onChange:Ge,disabled:Ue}),ze&&X(`p`,{className:`px-3 pt-1.5 text-[11px] text-wx-danger`,children:ze})]}),X(op,{ref:Ht,placeholder:L(`sendCta`),ariaLabel:L(`sendCta`),initialHtml:Tt.get().html,onChange:({html:e,text:t})=>Tt.set(t,e),onTyping:ar,onEnter:Mr,maxChars:Sf}),Z(`div`,{className:`flex items-center justify-between px-1.5 pt-0.5 pb-1.5`,children:[Z(`div`,{className:`flex items-center gap-0.5`,children:[X(`input`,{ref:wn,type:`file`,accept:Array.from(Nd).join(`,`),className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&Dr(t),e.target.value=``}}),X(o.button,{type:`button`,"aria-label":L(`attach`),onClick:()=>wn.current?.click(),whileHover:{scale:1.12},whileTap:{scale:.9},transition:{type:`spring`,stiffness:400,damping:20},className:`flex h-7 w-7 items-center justify-center rounded-full text-wx-fg-muted transition-colors hover:bg-wx-bg-elevated hover:text-wx-fg`,children:X(Js,{size:14})}),X(o.button,{ref:Ut,type:`button`,"aria-label":L(`emoji`),"aria-expanded":Et,onClick:()=>{Nt(!1),Dt(e=>!e)},whileHover:{scale:1.12},whileTap:{scale:.9},transition:{type:`spring`,stiffness:400,damping:20},className:u(`flex h-7 w-7 items-center justify-center rounded-full transition-colors`,Et?`bg-wx-bg-elevated text-wx-fg`:`text-wx-fg-muted hover:bg-wx-bg-elevated hover:text-wx-fg`),children:X(rc,{size:14})}),X(o.button,{ref:Wt,type:`button`,"aria-label":L(`giphy.title`),"aria-expanded":jt,onClick:()=>{Dt(!1),At(!1),Nt(e=>!e)},whileHover:{scale:1.12},whileTap:{scale:.9},transition:{type:`spring`,stiffness:400,damping:20},className:u(`flex h-7 w-7 items-center justify-center rounded-full transition-colors`,jt?`bg-wx-bg-elevated text-wx-fg`:`text-wx-fg-muted hover:bg-wx-bg-elevated hover:text-wx-fg`),children:X(`span`,{className:`font-bold text-[10px] leading-none tracking-tight`,children:`GIF`})}),(l?.commands?.length??0)>0&&Z(`div`,{className:`relative`,children:[X(o.button,{ref:Gt,type:`button`,"aria-label":L(`commands`),"aria-expanded":kt,onClick:()=>{Nt(!1),At(e=>!e)},whileHover:{scale:1.12},whileTap:{scale:.9},transition:{type:`spring`,stiffness:400,damping:20},className:u(`flex h-7 w-7 items-center justify-center rounded-full transition-colors`,kt?`bg-wx-bg-elevated text-wx-fg`:`text-wx-fg-muted hover:bg-wx-bg-elevated hover:text-wx-fg`),children:X(Ts,{size:14})}),X(Mt,{children:kt&&X(o.div,{"data-wx-commands-panel":!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.12},className:`absolute bottom-full left-0 z-10 mb-2 w-44 overflow-hidden rounded-lg border border-wx-border bg-wx-bg shadow-lg`,children:X(`ul`,{className:`flex flex-col py-1`,children:l?.commands.map(e=>X(`li`,{children:X(`button`,{type:`button`,onClick:()=>Nr(e),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs font-mono text-wx-fg hover:bg-wx-bg-elevated`,children:e})},e))})})})]})]}),X(Ef,{draft:Tt,hasAttachments:yn.length>0,busy:nr||Pr,onSend:Mr,onMic:kr,ariaLabels:{send:L(`sendCta`),mic:L(`record`)}})]})]},`composer`)})]}),X(ct,{items:zn?.items??[],initialIndex:zn?.index??0,open:!!zn,onClose:()=>Bn(null)})]})}function Oh(){return Z(`div`,{className:`flex h-full min-h-0 flex-col gap-4 px-4 py-5`,"aria-hidden":`true`,children:[Z(`div`,{className:`flex items-end gap-2`,children:[X(U,{className:`h-7 w-7 shrink-0 rounded-full`}),X(U,{className:`h-9 w-1/2 rounded-wx-lg`})]}),Z(`div`,{className:`flex items-end gap-2`,children:[X(U,{className:`h-7 w-7 shrink-0 rounded-full`}),X(U,{className:`h-16 w-3/4 rounded-wx-lg`})]}),X(`div`,{className:`flex justify-end`,children:X(U,{className:`h-9 w-2/5 rounded-wx-lg`})}),Z(`div`,{className:`flex items-end gap-2`,children:[X(U,{className:`h-7 w-7 shrink-0 rounded-full`}),X(U,{className:`h-11 w-2/3 rounded-wx-lg`})]})]})}function kh({threads:e,loading:t=!1,loadError:r=!1,onRetry:a,avatarUrl:o,onOpenThread:s,onNewQuestion:c,blocked:l=!1,slotThread:d=null}){let f=i(`messages`),p=n();return Z(`div`,{className:`relative flex h-full min-h-0 flex-col`,children:[X(it,{className:`min-h-0 flex-1`,children:t&&e.length===0?X(jh,{}):r&&e.length===0?Z(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-2 px-6 py-16 text-center`,children:[X(`p`,{className:`font-semibold text-base text-wx-fg`,children:f(`threadsErrorTitle`)}),X(`p`,{className:`text-sm text-wx-fg-muted`,children:f(`threadsErrorBody`)}),a&&X(`button`,{type:`button`,onClick:a,className:`mt-1 font-medium text-sm text-wx-primary underline-offset-2 hover:underline`,children:f(`retry`)})]}):e.length===0&&d?X(`ul`,{"data-wx-thread-list":``,className:`flex flex-col pb-[4.5rem]`,children:X(Ah,{thread:d,avatarUrl:o,locale:p,onClick:()=>s(d)})}):e.length===0?Z(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-2 px-6 py-16 text-center`,children:[X(`p`,{className:`font-semibold text-base text-wx-fg`,children:f(`threadsEmptyTitle`)}),X(`p`,{className:`text-sm text-wx-fg-muted`,children:f(`threadsEmptyBody`)})]}):X(`ul`,{"data-wx-thread-list":``,className:`flex flex-col pb-[4.5rem]`,children:e.map(e=>X(Ah,{thread:e,avatarUrl:o,locale:p,onClick:()=>s(e)},e.chatId||e.threadKey||e.updatedAt))})}),X(`div`,{"data-wx-thread-cta":``,className:`pointer-events-none absolute inset-x-0 bottom-0 flex justify-center bg-gradient-to-t from-wx-bg via-wx-bg/80 to-transparent px-4 pt-6 pb-3`,children:l?X(`p`,{className:`pointer-events-auto px-4 py-2 text-center text-[13px] text-wx-fg-muted`,children:f(`visitorBlocked`)}):Z(`button`,{type:`button`,onClick:c,className:u(`pointer-events-auto inline-flex items-center gap-2 rounded-full px-4 py-2`,`bg-wx-primary font-semibold text-[13px] text-wx-primary-fg shadow-sm`,`transition-transform duration-150 ease-out hover:scale-[1.04] active:scale-95`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg`),children:[X(ac,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":`true`}),X(`span`,{children:f(`askQuestion`)})]})})]})}function Ah({thread:e,avatarUrl:t,locale:n,onClick:r}){let a=i(`messages`),o=i(`home`),s=e.unreadCount>0,c=!!e.typing,l=e.assignedStatus===`connected`,d=e.lastSenderKind===`operator`&&e.lastSenderName?e.lastSenderName:e.lastSenderKind&&e.lastSenderKind!==`visitor`?e.senderName:l&&e.assignedOperatorName?e.assignedOperatorName:e.senderName,f=e.preview?.media?`${Jo(e.preview.mediaType)} ${e.preview.text||o(`recentMessageAttachment`)}`:e.preview?.text??``,p=e.preview?e.preview.fromVisitor?a(`previewYou`,{text:f}):f:``,m=e.preview?.at??e.updatedAt;return X(`li`,{children:Z(`button`,{type:`button`,onClick:r,className:u(`flex w-full items-start gap-3 border-wx-border border-b px-4 py-3.5 text-left`,`transition-colors last:border-b-0 hover:bg-wx-bg-elevated-2`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-wx-primary`),children:[X(Mh,{src:e.senderAvatar??t}),Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[Z(`div`,{className:`flex items-baseline gap-2`,children:[Z(`span`,{className:u(`flex min-w-0 flex-1 items-center gap-1.5 truncate text-sm text-wx-fg`,s?`font-semibold`:`font-medium`),children:[l&&X(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-full bg-wx-success`,"aria-hidden":`true`}),X(`span`,{className:`truncate`,children:d})]}),X(`span`,{className:`shrink-0 text-[11px] text-wx-fg-subtle`,children:Nh(m,n)})]}),Z(`div`,{className:`flex items-center gap-2`,children:[c?X(`span`,{className:`min-w-0 flex-1 truncate text-[13px] text-wx-primary italic`,children:a(`typing`)}):X(`span`,{className:u(`min-w-0 flex-1 truncate text-[13px]`,s?`text-wx-fg`:`text-wx-fg-muted`),children:p}),s&&!c&&X(`span`,{className:`h-2 w-2 shrink-0 rounded-full bg-wx-primary`,"aria-hidden":`true`})]})]})]})})}function jh(){return X(`ul`,{className:`flex flex-col`,"aria-hidden":`true`,children:[0,1,2].map(e=>Z(`li`,{className:`flex items-start gap-3 border-wx-border border-b px-4 py-3.5`,children:[X(U,{className:`mt-0.5 h-9 w-9 shrink-0 rounded-full`}),Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2 pt-1`,children:[X(U,{className:`h-3.5 w-28`}),X(U,{className:`h-3 w-3/4`})]})]},e))})}function Mh({src:e}){return e?X(`img`,{src:e,alt:``,className:`mt-0.5 h-9 w-9 shrink-0 rounded-full object-cover`}):X(`div`,{className:`mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-wx-bg-elevated-2 text-wx-fg-muted`,"aria-hidden":`true`,children:X(vs,{className:`h-5 w-5`})})}function Nh(e,t){let n=new Date(e).getTime();if(Number.isNaN(n))return``;let r=Math.round((n-Date.now())/1e3),i=Math.abs(r),a=new Intl.RelativeTimeFormat(t,{numeric:`auto`,style:`narrow`});return i<60?a.format(Math.round(r),`second`):i<3600?a.format(Math.round(r/60),`minute`):i<86400?a.format(Math.round(r/3600),`hour`):i<604800?a.format(Math.round(r/86400),`day`):a.format(Math.round(r/604800),`week`)}function Ph({field:e,value:t,uploading:n,onPick:r,onClear:i,displayName:a,t:o}){let s=J(null),[c,l]=Y(!1);K(()=>{l(!1)},[t]);let d=a.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``),f=e.pinned;return Z(`div`,{className:`flex flex-col items-center gap-2.5 pt-4 pb-2`,children:[Z(`div`,{className:`group relative`,children:[X(`span`,{"aria-hidden":`true`,className:`absolute -inset-2 rounded-full bg-wx-primary/20 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100`}),Z(`button`,{type:`button`,disabled:f||n,onClick:()=>s.current?.click(),"aria-label":o(`uploadAvatar`),style:{height:88,width:88},className:u(`relative flex items-center justify-center overflow-hidden rounded-full`,`bg-gradient-to-br from-wx-bg-elevated to-wx-bg-elevated-2 text-2xl font-semibold text-wx-fg-muted`,`ring-1 ring-inset ring-wx-border`,!f&&!n&&`cursor-pointer transition-transform duration-200 hover:scale-[1.04]`,f&&`cursor-not-allowed`),children:[t&&!c?X(`img`,{src:t,alt:``,className:`h-full w-full object-cover`,referrerPolicy:`no-referrer`,onError:()=>l(!0)}):d?X(`span`,{"aria-hidden":`true`,children:d}):X(bs,{size:26,"aria-hidden":`true`}),!f&&X(`span`,{className:`absolute inset-x-0 bottom-0 flex h-7 items-center justify-center bg-black/45 opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100`,children:n?X(zs,{size:14,className:`animate-spin text-white`,"aria-hidden":`true`}):X(Ns,{size:14,className:`text-white`,"aria-hidden":`true`})})]}),f&&X(`span`,{className:`absolute right-0 bottom-0 flex h-6 w-6 items-center justify-center rounded-full bg-wx-bg shadow-sm ring-1 ring-wx-border`,children:X(Bs,{size:11,className:`text-wx-fg-subtle`,"aria-hidden":`true`})}),!f&&t&&X(`button`,{type:`button`,onClick:i,"aria-label":o(`removeAvatar`),className:`-top-1 -right-1 absolute flex h-7 w-7 items-center justify-center rounded-full border border-wx-border bg-wx-bg text-wx-fg-muted shadow-sm transition-colors hover:bg-wx-bg-elevated hover:text-wx-danger`,children:X(lc,{size:12,"aria-hidden":`true`})}),X(`input`,{ref:s,type:`file`,accept:`image/png,image/jpeg,image/gif,image/webp`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&r(t),e.target.value=``}})]}),a&&X(`p`,{className:`text-[15px] font-semibold text-wx-fg`,children:a}),f&&X(`p`,{className:`text-[11px] text-wx-fg-subtle`,children:o(`pinnedHint`)})]})}function Fh({id:e,checked:t,onChange:n,disabled:r,"aria-label":i}){return X(`button`,{id:e,type:`button`,role:`switch`,"aria-label":i,"aria-checked":t,disabled:r,onClick:()=>n(!t),className:u(`relative h-6 w-10 shrink-0 rounded-full transition-colors`,t?`bg-wx-primary`:`bg-wx-bg-elevated-2`,r&&`cursor-not-allowed opacity-60`),children:X(`span`,{"aria-hidden":`true`,className:u(`absolute top-0.5 left-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform`,t&&`translate-x-4`)})})}function Ih({id:e,value:t,disabled:n,onChange:r}){return X(`div`,{className:`flex`,children:X(Fh,{id:e,checked:t===`true`,disabled:n,onChange:e=>r(e?`true`:`false`)})})}var Lh=u(`w-full rounded-wx-sm border border-wx-border bg-wx-bg px-3 py-2 text-sm text-wx-fg`,`focus:border-wx-primary focus:outline-none focus:ring-2 focus:ring-wx-primary/20`,`read-only:cursor-not-allowed read-only:bg-wx-bg-elevated/60 read-only:text-wx-fg-muted`,`disabled:cursor-not-allowed disabled:bg-wx-bg-elevated/60 disabled:text-wx-fg-muted`);function Rh({id:e,value:t,disabled:n,onChange:r}){return X(`input`,{id:e,type:`date`,value:dh(t),disabled:n,onChange:e=>r(e.target.value||null),className:Lh})}function zh({id:e,value:t,disabled:n,onChange:r}){return X(`input`,{id:e,type:`number`,value:t??``,disabled:n,inputMode:`decimal`,onChange:e=>r(e.target.value||null),className:Lh})}function Bh(e,[t,n]){return Math.min(n,Math.max(t,e))}typeof window<`u`&&window.document&&window.document.createElement;function Vh(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Hh(e,t=[]){let n=[];function r(t,r){let i=W.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=W.useMemo(()=>o,Object.values(o));return X(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=W.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>W.createContext(e));return function(n){let r=n?.[e]||t;return W.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Uh(i,...t)]}function Uh(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return W.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function Wh(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Gh(...e){return t=>{let n=!1,r=e.map(e=>{let r=Wh(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Wh(e[t],null)}}}}function Kh(...e){return W.useCallback(Gh(...e),e)}function qh(e){let t=Jh(e),n=W.forwardRef((e,n)=>{let{children:r,...i}=e,a=W.Children.toArray(r),o=a.find(Xh);if(o){let e=o.props.children,r=a.map(t=>t===o?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return X(t,{...i,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return X(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Jh(e){let t=W.forwardRef((e,t)=>{let{children:n,...r}=e;if(W.isValidElement(n)){let e=Qh(n),i=Zh(r,n.props);return n.type!==W.Fragment&&(i.ref=t?Gh(t,e):e),W.cloneElement(n,i)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Yh=Symbol(`radix.slottable`);function Xh(e){return W.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Yh}function Zh(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Qh(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function $h(e){let t=e+`CollectionProvider`,[n,r]=Hh(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=mn.useRef(null),a=mn.useRef(new Map).current;return X(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=qh(s),l=mn.forwardRef((e,t)=>{let{scope:n,children:r}=e;return X(c,{ref:Kh(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=qh(u),p=mn.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=mn.useRef(null),s=Kh(t,o),c=a(u,n);return mn.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),X(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return mn.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var eg=W.createContext(void 0);function tg(e){let t=W.useContext(eg);return e||t||`ltr`}var ng=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=qh(`Primitive.${t}`),r=W.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),X(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function rg(e,t){e&&On.flushSync(()=>e.dispatchEvent(t))}function ig(e,t=globalThis?.document){let n=qe(e);W.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var ag=`DismissableLayer`,og=`dismissableLayer.update`,sg=`dismissableLayer.pointerDownOutside`,cg=`dismissableLayer.focusOutside`,lg,ug=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dg=W.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=W.useContext(ug),[u,d]=W.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=W.useState({}),m=Kh(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=mg(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=hg(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ig(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),W.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(lg=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),gg(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=lg)}},[u,f,n,l]),W.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),gg())},[u,l]),W.useEffect(()=>{let e=()=>p({});return document.addEventListener(og,e),()=>document.removeEventListener(og,e)},[]),X(ng.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:Vh(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Vh(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Vh(e.onPointerDownCapture,x.onPointerDownCapture)})});dg.displayName=ag;var fg=`DismissableLayerBranch`,pg=W.forwardRef((e,t)=>{let n=W.useContext(ug),r=W.useRef(null),i=Kh(t,r);return W.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),X(ng.div,{...e,ref:i})});pg.displayName=fg;function mg(e,t=globalThis?.document){let n=qe(e),r=W.useRef(!1),i=W.useRef(()=>{});return W.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){_g(sg,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function hg(e,t=globalThis?.document){let n=qe(e),r=W.useRef(!1);return W.useEffect(()=>{let e=e=>{e.target&&!r.current&&_g(cg,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function gg(){let e=new CustomEvent(og);document.dispatchEvent(e)}function _g(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?rg(i,a):i.dispatchEvent(a)}var vg=0;function yg(){W.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??bg()),document.body.insertAdjacentElement(`beforeend`,e[1]??bg()),vg++,()=>{vg===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),vg--}},[])}function bg(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var xg=`focusScope.autoFocusOnMount`,Sg=`focusScope.autoFocusOnUnmount`,Cg={bubbles:!1,cancelable:!0},wg=`FocusScope`,Tg=W.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=W.useState(null),l=qe(i),u=qe(a),d=W.useRef(null),f=Kh(t,e=>c(e)),p=W.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Mg(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Mg(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Mg(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),W.useEffect(()=>{if(s){Ng.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(xg,Cg);s.addEventListener(xg,l),s.dispatchEvent(t),t.defaultPrevented||(Eg(Ig(Og(s)),{select:!0}),document.activeElement===e&&Mg(s))}return()=>{s.removeEventListener(xg,l),setTimeout(()=>{let t=new CustomEvent(Sg,Cg);s.addEventListener(Sg,u),s.dispatchEvent(t),t.defaultPrevented||Mg(e??document.body,{select:!0}),s.removeEventListener(Sg,u),Ng.remove(p)},0)}}},[s,l,u,p]);let m=W.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Dg(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Mg(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Mg(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return X(ng.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Tg.displayName=wg;function Eg(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Mg(r,{select:t}),document.activeElement!==n)return}function Dg(e){let t=Og(e);return[kg(t,e),kg(t.reverse(),e)]}function Og(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function kg(e,t){for(let n of e)if(!Ag(n,{upTo:t}))return n}function Ag(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function jg(e){return e instanceof HTMLInputElement&&`select`in e}function Mg(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&jg(e)&&t&&e.select()}}var Ng=Pg();function Pg(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Fg(e,t),e.unshift(t)},remove(t){e=Fg(e,t),e[0]?.resume()}}}function Fg(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ig(e){return e.filter(e=>e.tagName!==`A`)}var Lg=globalThis?.document?W.useLayoutEffect:()=>{},Rg=W.useId||(()=>void 0),zg=0;function Bg(e){let[t,n]=W.useState(Rg());return Lg(()=>{e||n(e=>e??String(zg++))},[e]),e||(t?`radix-${t}`:``)}var Vg=[`top`,`right`,`bottom`,`left`],Hg=Math.min,Ug=Math.max,Wg=Math.round,Gg=Math.floor,Kg=e=>({x:e,y:e}),qg={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Jg(e,t,n){return Ug(e,Hg(t,n))}function Yg(e,t){return typeof e==`function`?e(t):e}function Xg(e){return e.split(`-`)[0]}function Zg(e){return e.split(`-`)[1]}function Qg(e){return e===`x`?`y`:`x`}function $g(e){return e===`y`?`height`:`width`}function e_(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function t_(e){return Qg(e_(e))}function n_(e,t,n){n===void 0&&(n=!1);let r=Zg(e),i=t_(e),a=$g(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=d_(o)),[o,d_(o)]}function r_(e){let t=d_(e);return[i_(e),t,i_(t)]}function i_(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var a_=[`left`,`right`],o_=[`right`,`left`],s_=[`top`,`bottom`],c_=[`bottom`,`top`];function l_(e,t,n){switch(e){case`top`:case`bottom`:return n?t?o_:a_:t?a_:o_;case`left`:case`right`:return t?s_:c_;default:return[]}}function u_(e,t,n,r){let i=Zg(e),a=l_(Xg(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(i_)))),a}function d_(e){let t=Xg(e);return qg[t]+e.slice(t.length)}function f_(e){return{top:0,right:0,bottom:0,left:0,...e}}function p_(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:f_(e)}function m_(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function h_(e,t,n){let{reference:r,floating:i}=e,a=e_(t),o=t_(t),s=$g(o),c=Xg(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Zg(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function g_(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Yg(t,e),p=p_(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=m_(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=m_(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var __=50,v_=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:g_},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=h_(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<__&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=h_(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},y_=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Yg(e,t)||{};if(l==null)return{};let d=p_(u),f={x:n,y:r},p=t_(i),m=$g(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Hg(d[_],T),D=Hg(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Jg(O,A,k),M=!c.arrow&&Zg(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),b_=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Yg(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Xg(r),_=e_(o),v=Xg(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[d_(o)]:r_(o)),x=p!==`none`;!d&&x&&b.push(...u_(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=n_(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==e_(t))||T.every(e=>e_(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=e_(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function x_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function S_(e){return Vg.some(t=>e[t]>=0)}var C_=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Yg(e,t);switch(i){case`referenceHidden`:{let e=x_(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:S_(e)}}}case`escaped`:{let e=x_(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:S_(e)}}}default:return{}}}}},w_=new Set([`left`,`top`]);async function T_(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Xg(n),s=Zg(n),c=e_(n)===`y`,l=w_.has(o)?-1:1,u=a&&c?-1:1,d=Yg(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var E_=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await T_(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},D_=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Yg(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=e_(Xg(i)),p=Qg(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Jg(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Jg(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},O_=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Yg(e,t),u={x:n,y:r},d=e_(i),f=Qg(d),p=u[f],m=u[d],h=Yg(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=w_.has(Xg(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},k_=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Yg(e,t),u=await o.detectOverflow(t,l),d=Xg(i),f=Zg(i),p=e_(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Hg(h-u[g],v),x=Hg(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Ug(u.left,0),t=Ug(u.right,0),n=Ug(u.top,0),r=Ug(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Ug(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Ug(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function A_(){return typeof window<`u`}function j_(e){return P_(e)?(e.nodeName||``).toLowerCase():`#document`}function M_(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function N_(e){return((P_(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function P_(e){return A_()?e instanceof Node||e instanceof M_(e).Node:!1}function F_(e){return A_()?e instanceof Element||e instanceof M_(e).Element:!1}function I_(e){return A_()?e instanceof HTMLElement||e instanceof M_(e).HTMLElement:!1}function L_(e){return!A_()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof M_(e).ShadowRoot}function R_(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Y_(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function z_(e){return/^(table|td|th)$/.test(j_(e))}function B_(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var V_=/transform|translate|scale|rotate|perspective|filter/,H_=/paint|layout|strict|content/,U_=e=>!!e&&e!==`none`,W_;function G_(e){let t=F_(e)?Y_(e):e;return U_(t.transform)||U_(t.translate)||U_(t.scale)||U_(t.rotate)||U_(t.perspective)||!q_()&&(U_(t.backdropFilter)||U_(t.filter))||V_.test(t.willChange||``)||H_.test(t.contain||``)}function K_(e){let t=Z_(e);for(;I_(t)&&!J_(t);){if(G_(t))return t;if(B_(t))return null;t=Z_(t)}return null}function q_(){return W_??(W_=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),W_}function J_(e){return/^(html|body|#document)$/.test(j_(e))}function Y_(e){return M_(e).getComputedStyle(e)}function X_(e){return F_(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z_(e){if(j_(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||L_(e)&&e.host||N_(e);return L_(t)?t.host:t}function Q_(e){let t=Z_(e);return J_(t)?e.ownerDocument?e.ownerDocument.body:e.body:I_(t)&&R_(t)?t:Q_(t)}function $_(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Q_(e),i=r===e.ownerDocument?.body,a=M_(r);if(i){let e=ev(a);return t.concat(a,a.visualViewport||[],R_(r)?r:[],e&&n?$_(e):[])}else return t.concat(r,$_(r,[],n))}function ev(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tv(e){let t=Y_(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=I_(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Wg(n)!==a||Wg(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function nv(e){return F_(e)?e:e.contextElement}function rv(e){let t=nv(e);if(!I_(t))return Kg(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=tv(t),o=(a?Wg(n.width):n.width)/r,s=(a?Wg(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var iv=Kg(0);function av(e){let t=M_(e);return!q_()||!t.visualViewport?iv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ov(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==M_(e)?!1:t}function sv(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=nv(e),o=Kg(1);t&&(r?F_(r)&&(o=rv(r)):o=rv(e));let s=ov(a,n,r)?av(a):Kg(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=M_(a),t=r&&F_(r)?M_(r):r,n=e,i=ev(n);for(;i&&r&&t!==n;){let e=rv(i),t=i.getBoundingClientRect(),r=Y_(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=M_(i),i=ev(n)}}return m_({width:u,height:d,x:c,y:l})}function cv(e,t){let n=X_(e).scrollLeft;return t?t.left+n:sv(N_(e)).left+n}function lv(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-cv(e,n),y:n.top+t.scrollTop}}function uv(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=N_(r),s=t?B_(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Kg(1),u=Kg(0),d=I_(r);if((d||!d&&!a)&&((j_(r)!==`body`||R_(o))&&(c=X_(r)),d)){let e=sv(r);l=rv(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?lv(o,c):Kg(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function dv(e){return Array.from(e.getClientRects())}function fv(e){let t=N_(e),n=X_(e),r=e.ownerDocument.body,i=Ug(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ug(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+cv(e),s=-n.scrollTop;return Y_(r).direction===`rtl`&&(o+=Ug(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var pv=25;function mv(e,t){let n=M_(e),r=N_(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=q_();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=cv(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=pv&&(a-=o)}else l<=pv&&(a+=l);return{width:a,height:o,x:s,y:c}}function hv(e,t){let n=sv(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=I_(e)?rv(e):Kg(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function gv(e,t,n){let r;if(t===`viewport`)r=mv(e,n);else if(t===`document`)r=fv(N_(e));else if(F_(t))r=hv(t,n);else{let n=av(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return m_(r)}function _v(e,t){let n=Z_(e);return n===t||!F_(n)||J_(n)?!1:Y_(n).position===`fixed`||_v(n,t)}function vv(e,t){let n=t.get(e);if(n)return n;let r=$_(e,[],!1).filter(e=>F_(e)&&j_(e)!==`body`),i=null,a=Y_(e).position===`fixed`,o=a?Z_(e):e;for(;F_(o)&&!J_(o);){let t=Y_(o),n=G_(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||R_(o)&&!n&&_v(e,o))?r=r.filter(e=>e!==o):i=t,o=Z_(o)}return t.set(e,r),r}function yv(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?B_(t)?[]:vv(t,this._c):[].concat(n),r],o=gv(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=gv(t,a[e],i);s=Ug(n.top,s),c=Hg(n.right,c),l=Hg(n.bottom,l),u=Ug(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function bv(e){let{width:t,height:n}=tv(e);return{width:t,height:n}}function xv(e,t,n){let r=I_(t),i=N_(t),a=n===`fixed`,o=sv(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Kg(0);function l(){c.x=cv(i)}if(r||!r&&!a)if((j_(t)!==`body`||R_(i))&&(s=X_(t)),r){let e=sv(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?lv(i,s):Kg(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Sv(e){return Y_(e).position===`static`}function Cv(e,t){if(!I_(e)||Y_(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return N_(e)===n&&(n=n.ownerDocument.body),n}function wv(e,t){let n=M_(e);if(B_(e))return n;if(!I_(e)){let t=Z_(e);for(;t&&!J_(t);){if(F_(t)&&!Sv(t))return t;t=Z_(t)}return n}let r=Cv(e,t);for(;r&&z_(r)&&Sv(r);)r=Cv(r,t);return r&&J_(r)&&Sv(r)&&!G_(r)?n:r||K_(e)||n}var Tv=async function(e){let t=this.getOffsetParent||wv,n=this.getDimensions,r=await n(e.floating);return{reference:xv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ev(e){return Y_(e).direction===`rtl`}var Dv={convertOffsetParentRelativeRectToViewportRelativeRect:uv,getDocumentElement:N_,getClippingRect:yv,getOffsetParent:wv,getElementRects:Tv,getClientRects:dv,getDimensions:bv,getScale:rv,isElement:F_,isRTL:Ev};function Ov(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kv(e,t){let n=null,r,i=N_(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Gg(d),h=Gg(i.clientWidth-(u+f)),g=Gg(i.clientHeight-(d+p)),_=Gg(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ug(0,Hg(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ov(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Av(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=nv(e),u=i||a?[...l?$_(l):[],...t?$_(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?kv(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?sv(e):null;c&&g();function g(){let t=sv(e);h&&!Ov(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var jv=E_,Mv=D_,Nv=b_,Pv=k_,Fv=C_,Iv=y_,Lv=O_,Rv=(e,t,n)=>{let r=new Map,i={platform:Dv,...n},a={...i.platform,_c:r};return v_(e,t,{...i,platform:a})},zv=typeof document<`u`?Tn:function(){};function Bv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Bv(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Bv(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Vv(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hv(e,t){let n=Vv(e);return Math.round(t*n)/n}function Uv(e){let t=W.useRef(e);return zv(()=>{t.current=e}),t}function Wv(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);Bv(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=Uv(c),D=Uv(i),O=Uv(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Rv(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Bv(w.current,t)&&(w.current=t,On.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);zv(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);zv(()=>(A.current=!0,()=>{A.current=!1}),[]),zv(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=W.useMemo(()=>({reference:b,floating:x}),[b,x]),N=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Hv(M.floating,u.x),r=Hv(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Vv(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Gv=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Iv({element:r.current,padding:i}).fn(n):r?Iv({element:r,padding:i}).fn(n):{}}}},Kv=(e,t)=>{let n=jv(e);return{name:n.name,fn:n.fn,options:[e,t]}},qv=(e,t)=>{let n=Mv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jv=(e,t)=>({fn:Lv(e).fn,options:[e,t]}),Yv=(e,t)=>{let n=Nv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xv=(e,t)=>{let n=Pv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zv=(e,t)=>{let n=Fv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qv=(e,t)=>{let n=Gv(e);return{name:n.name,fn:n.fn,options:[e,t]}},$v=`Arrow`,ey=W.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return X(ng.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:X(`polygon`,{points:`0,0 30,0 15,10`})})});ey.displayName=$v;var ty=ey;function ny(e){let[t,n]=W.useState(void 0);return Lg(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var ry=`Popper`,[iy,ay]=Hh(ry),[oy,sy]=iy(ry),cy=e=>{let{__scopePopper:t,children:n}=e,[r,i]=W.useState(null);return X(oy,{scope:t,anchor:r,onAnchorChange:i,children:n})};cy.displayName=ry;var ly=`PopperAnchor`,uy=W.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=sy(ly,n),o=W.useRef(null),s=Kh(t,o),c=W.useRef(null);return W.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:X(ng.div,{...i,ref:s})});uy.displayName=ly;var dy=`PopperContent`,[fy,py]=iy(dy),my=W.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=sy(dy,n),[_,v]=W.useState(null),y=Kh(t,e=>v(e)),[b,x]=W.useState(null),S=ny(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(vy),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:N,middlewareData:P}=Wv({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>Av(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Kv({mainAxis:i+w,alignmentAxis:o}),c&&qv({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Jv():void 0,...k}),c&&Yv({...k}),Xv({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Qv({element:b,padding:s}),yy({arrowWidth:C,arrowHeight:w}),f&&Zv({strategy:`referenceHidden`,...k})]}),[F,ee]=by(M),te=qe(m);Lg(()=>{N&&te?.()},[N,te]);let ne=P.arrow?.x,re=P.arrow?.y,ie=P.arrow?.centerOffset!==0,[ae,oe]=W.useState();return Lg(()=>{_&&oe(window.getComputedStyle(_).zIndex)},[_]),X(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:N?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:X(fy,{scope:n,placedSide:F,onArrowChange:x,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:X(ng.div,{"data-side":F,"data-align":ee,...h,ref:y,style:{...h.style,animation:N?void 0:`none`}})})})});my.displayName=dy;var hy=`PopperArrow`,gy={top:`bottom`,right:`left`,bottom:`top`,left:`right`},_y=W.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=py(hy,n),a=gy[i.placedSide];return X(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:X(ty,{...r,ref:t,style:{...r.style,display:`block`}})})});_y.displayName=hy;function vy(e){return e!==null}var yy=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=by(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function by(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var xy=cy,Sy=uy,Cy=my,wy=_y,Ty=`Portal`,Ey=W.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=W.useState(!1);Lg(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?kn.createPortal(X(ng.div,{...r,ref:t}),o):null});Ey.displayName=Ty;var Dy=W.useInsertionEffect||Lg;function Oy({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=ky({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=W.useRef(e!==void 0);W.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,W.useCallback(t=>{if(s){let n=Ay(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function ky({defaultProp:e,onChange:t}){let[n,r]=W.useState(e),i=W.useRef(n),a=W.useRef(t);return Dy(()=>{a.current=t},[t]),W.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Ay(e){return typeof e==`function`}function jy(e){let t=W.useRef({value:e,previous:e});return W.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var My=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Ny=`VisuallyHidden`,Py=W.forwardRef((e,t)=>X(ng.span,{...e,ref:t,style:{...My,...e.style}}));Py.displayName=Ny;var Fy=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Iy=new WeakMap,Ly=new WeakMap,Ry={},zy=0,By=function(e){return e&&(e.host||By(e.parentNode))},Vy=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=By(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Hy=function(e,t,n,r){var i=Vy(t,Array.isArray(e)?e:[e]);Ry[n]||(Ry[n]=new WeakMap);var a=Ry[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Iy.get(e)||0)+1,l=(a.get(e)||0)+1;Iy.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ly.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),zy++,function(){o.forEach(function(e){var t=Iy.get(e)-1,i=a.get(e)-1;Iy.set(e,t),a.set(e,i),t||(Ly.has(e)||e.removeAttribute(r),Ly.delete(e)),i||e.removeAttribute(n)}),zy--,zy||(Iy=new WeakMap,Iy=new WeakMap,Ly=new WeakMap,Ry={})}},Uy=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Fy(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Hy(r,i,n,`aria-hidden`)):function(){return null}},Wy=`right-scroll-bar-position`,Gy=`width-before-scroll-bar`,Ky=`with-scroll-bars-hidden`,qy=`--removed-body-scroll-bar-size`;function Jy(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Yy(e,t){var n=Y(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Xy=typeof window<`u`?W.useLayoutEffect:W.useEffect,Zy=new WeakMap;function Qy(e,t){var n=Yy(t||null,function(t){return e.forEach(function(e){return Jy(e,t)})});return Xy(function(){var t=Zy.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Jy(e,null)}),i.forEach(function(e){r.has(e)||Jy(e,a)})}Zy.set(n,e)},[e]),n}function $y(e){return e}function eb(e,t){t===void 0&&(t=$y);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function tb(e){e===void 0&&(e={});var t=eb(null);return t.options=St({async:!0,ssr:!1},e),t}var nb=function(e){var t=e.sideCar,n=ze(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return W.createElement(r,St({},n))};nb.isSideCarExport=!0;function rb(e,t){return e.useMedium(t),nb}var ib=tb(),ab=function(){},ob=W.forwardRef(function(e,t){var n=W.useRef(null),r=W.useState({onScrollCapture:ab,onWheelCapture:ab,onTouchMoveCapture:ab}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=ze(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Qy([n,t]),C=St(St({},b),i);return W.createElement(W.Fragment,null,u&&W.createElement(x,{sideCar:ib,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?W.cloneElement(W.Children.only(s),St(St({},C),{ref:S})):W.createElement(v,St({},C,{className:c,ref:S}),s))});ob.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ob.classNames={fullWidth:Gy,zeroRight:Wy};var sb,cb=function(){if(sb)return sb;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function lb(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=cb();return t&&e.setAttribute(`nonce`,t),e}function ub(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function db(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var fb=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lb())&&(ub(t,n),db(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pb=function(){var e=fb();return function(t,n){W.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},mb=function(){var e=pb();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},hb={left:0,top:0,right:0,gap:0},gb=function(e){return parseInt(e||``,10)||0},_b=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[gb(n),gb(r),gb(i)]},vb=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return hb;var t=_b(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},yb=mb(),bb=`data-scroll-locked`,xb=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
136
|
+
.${Ky} {
|
|
137
137
|
overflow: hidden ${r};
|
|
138
138
|
padding-right: ${s}px ${r};
|
|
139
139
|
}
|
|
140
|
-
body[${
|
|
140
|
+
body[${bb}] {
|
|
141
141
|
overflow: hidden ${r};
|
|
142
142
|
overscroll-behavior: contain;
|
|
143
143
|
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
@@ -150,28 +150,28 @@ globalThis.process===void 0&&(globalThis.process={env:{},nextTick:function(e){se
|
|
|
150
150
|
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
.${
|
|
153
|
+
.${Wy} {
|
|
154
154
|
right: ${s}px ${r};
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
.${
|
|
157
|
+
.${Gy} {
|
|
158
158
|
margin-right: ${s}px ${r};
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
.${
|
|
161
|
+
.${Wy} .${Wy} {
|
|
162
162
|
right: 0 ${r};
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
.${
|
|
165
|
+
.${Gy} .${Gy} {
|
|
166
166
|
margin-right: 0 ${r};
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
body[${
|
|
170
|
-
${
|
|
169
|
+
body[${bb}] {
|
|
170
|
+
${qy}: ${s}px;
|
|
171
171
|
}
|
|
172
|
-
`},
|
|
172
|
+
`},Sb=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Cb=function(){W.useEffect(function(){return document.body.setAttribute(bb,(Sb()+1).toString()),function(){var e=Sb()-1;e<=0?document.body.removeAttribute(bb):document.body.setAttribute(bb,e.toString())}},[])},wb=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Cb();var a=W.useMemo(function(){return vb(i)},[i]);return W.createElement(yb,{styles:xb(a,!t,i,n?``:`!important`)})},Tb=!1;if(typeof window<`u`)try{var Eb=Object.defineProperty({},`passive`,{get:function(){return Tb=!0,!0}});window.addEventListener(`test`,Eb,Eb),window.removeEventListener(`test`,Eb,Eb)}catch{Tb=!1}var Db=Tb?{passive:!1}:!1,Ob=function(e){return e.tagName===`TEXTAREA`},kb=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Ob(e)&&n[t]===`visible`)},Ab=function(e){return kb(e,`overflowY`)},jb=function(e){return kb(e,`overflowX`)},Mb=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Fb(e,r)){var i=Ib(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Nb=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Pb=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Fb=function(e,t){return e===`v`?Ab(t):jb(t)},Ib=function(e,t){return e===`v`?Nb(t):Pb(t)},Lb=function(e,t){return e===`h`&&t===`rtl`?-1:1},Rb=function(e,t,n,r,i){var a=Lb(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Ib(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Fb(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},zb=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bb=function(e){return[e.deltaX,e.deltaY]},Vb=function(e){return e&&`current`in e?e.current:e},Hb=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ub=function(e){return`
|
|
173
173
|
.block-interactivity-${e} {pointer-events: none;}
|
|
174
174
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
175
|
-
`},gb=0,_b=[];function vb(e){var t=W.useRef([]),n=W.useRef([0,0]),r=W.useRef(),i=W.useState(gb++)[0],a=W.useState(By)[0],o=W.useRef(e);W.useEffect(function(){o.current=e},[e]),W.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Le([e.lockRef.current],(e.shards||[]).map(pb),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=W.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=db(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ib(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ib(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ub(h,t,e,h===`h`?s:c,!0)},[]),c=W.useCallback(function(e){var n=e;if(!(!_b.length||_b[_b.length-1]!==a)){var r=`deltaY`in n?fb(n):db(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&mb(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(pb).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=W.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:yb(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=W.useCallback(function(e){n.current=db(e),r.current=void 0},[]),d=W.useCallback(function(t){l(t.type,fb(t),t.target,s(t,e.lockRef.current))},[]),f=W.useCallback(function(t){l(t.type,db(t),t.target,s(t,e.lockRef.current))},[]);W.useEffect(function(){return _b.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,$y),document.addEventListener(`touchmove`,c,$y),document.addEventListener(`touchstart`,u,$y),function(){_b=_b.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,$y),document.removeEventListener(`touchmove`,c,$y),document.removeEventListener(`touchstart`,u,$y)}},[]);var p=e.removeScrollBar,m=e.inert;return W.createElement(W.Fragment,null,m?W.createElement(a,{styles:hb(i)}):null,p?W.createElement(Xy,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function yb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var bb=ky(Ay,vb),xb=W.forwardRef(function(e,t){return W.createElement(My,ot({},e,{ref:t,sideCar:bb}))});xb.classNames=My.classNames;var Sb=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Cb=[` `,`Enter`],wb=`Select`,[Tb,Eb,Db]=Th(wb),[Ob,kb]=mh(wb,[Db,jv]),Ab=jv(),[jb,Mb]=Ob(wb),[Nb,Pb]=Ob(wb),Fb=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=Ab(t),[g,_]=W.useState(null),[v,y]=W.useState(null),[b,x]=W.useState(!1),S=Dh(l),[C,w]=ey({prop:r,defaultProp:i??!1,onChange:a,caller:wb}),[T,E]=ey({prop:o,defaultProp:s,onChange:c,caller:wb}),D=W.useRef(null),O=g?m||!!g.closest(`form`):!0,[k,A]=W.useState(new Set),j=Array.from(k).map(e=>e.props.value).join(`;`);return X(qv,{...h,children:Z(jb,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:fg(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:D,disabled:f,children:[X(Tb.Provider,{scope:t,children:X(Nb,{scope:e.__scopeSelect,onNativeOptionAdd:W.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:W.useCallback(e=>{A(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),O?Z(Ax,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?X(`option`,{value:``}):null,Array.from(k)]},j):null]})})};Fb.displayName=wb;var Ib=`SelectTrigger`,Lb=W.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Ab(n),o=Mb(Ib,n),s=o.disabled||r,c=vh(t,o.onTriggerChange),l=Eb(n),u=W.useRef(`touch`),[d,f,p]=Mx(e=>{let t=l().filter(e=>!e.disabled),n=Nx(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return X(Jv,{asChild:!0,...a,children:X(Oh.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":jx(o.value)?``:void 0,...i,ref:c,onClick:ph(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:ph(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:ph(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Sb.includes(e.key)&&(m(),e.preventDefault())})})})});Lb.displayName=Ib;var Rb=`SelectValue`,zb=W.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Mb(Rb,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=vh(t,c.onValueNodeChange);return lg(()=>{l(u)},[l,u]),X(Oh.span,{...s,ref:d,style:{pointerEvents:`none`},children:jx(c.value)?X(wn,{children:o}):a})});zb.displayName=Rb;var Bb=`SelectIcon`,Vb=W.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return X(Oh.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});Vb.displayName=Bb;var Hb=`SelectPortal`,Ub=e=>X(Qv,{asChild:!0,...e});Ub.displayName=Hb;var Wb=`SelectContent`,Gb=W.forwardRef((e,t)=>{let n=Mb(Wb,e.__scopeSelect),[r,i]=W.useState();if(lg(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Tn.createPortal(X(qb,{scope:e.__scopeSelect,children:X(Tb.Slot,{scope:e.__scopeSelect,children:X(`div`,{children:e.children})})}),t):null}return X(Zb,{...e,ref:t})});Gb.displayName=Wb;var Kb=10,[qb,Jb]=Ob(Wb),Yb=`SelectContentImpl`,Xb=yh(`SelectContent.RemoveScroll`),Zb=W.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=Mb(Wb,n),[y,b]=W.useState(null),[x,S]=W.useState(null),C=vh(t,e=>b(e)),[w,T]=W.useState(null),[E,D]=W.useState(null),O=Eb(n),[k,A]=W.useState(!1),j=W.useRef(!1);W.useEffect(()=>{if(y)return hy(y)},[y]),Gh();let M=W.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),N=W.useCallback(()=>M([w,y]),[M,w,y]);W.useEffect(()=>{k&&N()},[k,N]);let{onOpenChange:P,triggerPointerDownPosRef:ee}=v;W.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ee.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ee.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||P(!1),document.removeEventListener(`pointermove`,t),ee.current=null};return ee.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,P,ee]),W.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[te,ne]=Mx(e=>{let t=O().filter(e=>!e.disabled),n=Nx(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),F=W.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(j.current=!0))},[v.value]),re=W.useCallback(()=>y?.focus(),[y]),ie=W.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),ae=r===`popper`?tx:$b,oe=ae===tx?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return X(qb,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:F,selectedItem:w,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:N,selectedItemText:E,position:r,isPositioned:k,searchRef:te,children:X(xb,{as:Xb,allowPinchZoom:!0,children:X(Zh,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ph(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:X(Lh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:X(ae,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...oe,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:ph(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ne(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});Zb.displayName=Yb;var Qb=`SelectItemAlignedPosition`,$b=W.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=Mb(Wb,n),o=Jb(Wb,n),[s,c]=W.useState(null),[l,u]=W.useState(null),d=vh(t,e=>u(e)),f=Eb(n),p=W.useRef(!1),m=W.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=W.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Kb,d=fh(a,[Kb,Math.max(Kb,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Kb,d=fh(a,[Kb,Math.max(Kb,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Kb*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Kb,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${Kb}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);lg(()=>y(),[y]);let[b,x]=W.useState();return lg(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),X(nx,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:W.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:X(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:X(Oh.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});$b.displayName=Qb;var ex=`SelectPopperPosition`,tx=W.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Kb,...a}=e;return X(Yv,{...Ab(n),...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});tx.displayName=ex;var[nx,rx]=Ob(Wb,{}),ix=`SelectViewport`,ax=W.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=Jb(ix,n),o=rx(ix,n),s=vh(t,a.onViewportChange),c=W.useRef(0);return Z(wn,{children:[X(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),X(Tb.Slot,{scope:n,children:X(Oh.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:ph(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Kb*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});ax.displayName=ix;var ox=`SelectGroup`,[sx,cx]=Ob(ox),lx=W.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=fg();return X(sx,{scope:n,id:i,children:X(Oh.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});lx.displayName=ox;var ux=`SelectLabel`,dx=W.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=cx(ux,n);return X(Oh.div,{id:i.id,...r,ref:t})});dx.displayName=ux;var fx=`SelectItem`,[px,mx]=Ob(fx),hx=W.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Mb(fx,n),c=Jb(fx,n),l=s.value===r,[u,d]=W.useState(a??``),[f,p]=W.useState(!1),m=vh(t,e=>c.itemRefCallback?.(e,r,i)),h=fg(),g=W.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return X(px,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:W.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:X(Tb.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:X(Oh.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:ph(o.onFocus,()=>p(!0)),onBlur:ph(o.onBlur,()=>p(!1)),onClick:ph(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:ph(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:ph(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:ph(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ph(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:ph(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(Cb.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});hx.displayName=fx;var gx=`SelectItemText`,_x=W.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=Mb(gx,n),s=Jb(gx,n),c=mx(gx,n),l=Pb(gx,n),[u,d]=W.useState(null),f=vh(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=W.useMemo(()=>X(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return lg(()=>(h(m),()=>g(m)),[h,g,m]),Z(wn,{children:[X(Oh.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Tn.createPortal(a.children,o.valueNode):null]})});_x.displayName=gx;var vx=`SelectItemIndicator`,yx=W.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return mx(vx,n).isSelected?X(Oh.span,{"aria-hidden":!0,...r,ref:t}):null});yx.displayName=vx;var bx=`SelectScrollUpButton`,xx=W.forwardRef((e,t)=>{let n=Jb(bx,e.__scopeSelect),r=rx(bx,e.__scopeSelect),[i,a]=W.useState(!1),o=vh(t,r.onScrollButtonChange);return lg(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?X(wx,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});xx.displayName=bx;var Sx=`SelectScrollDownButton`,Cx=W.forwardRef((e,t)=>{let n=Jb(Sx,e.__scopeSelect),r=rx(Sx,e.__scopeSelect),[i,a]=W.useState(!1),o=vh(t,r.onScrollButtonChange);return lg(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?X(wx,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Cx.displayName=Sx;var wx=W.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Jb(`SelectScrollButton`,n),o=W.useRef(null),s=Eb(n),c=W.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return W.useEffect(()=>()=>c(),[c]),lg(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),X(Oh.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ph(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ph(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ph(i.onPointerLeave,()=>{c()})})}),Tx=`SelectSeparator`,Ex=W.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return X(Oh.div,{"aria-hidden":!0,...r,ref:t})});Ex.displayName=Tx;var Dx=`SelectArrow`,Ox=W.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Ab(n),a=Mb(Dx,n),o=Jb(Dx,n);return a.open&&o.position===`popper`?X(Xv,{...i,...r,ref:t}):null});Ox.displayName=Dx;var kx=`SelectBubbleInput`,Ax=W.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=W.useRef(null),a=vh(r,i),o=ry(t);return W.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),X(Oh.select,{...n,style:{...iy,...n.style},ref:a,defaultValue:t})});Ax.displayName=kx;function jx(e){return e===``||e===void 0}function Mx(e){let t=Ue(e),n=W.useRef(``),r=W.useRef(0),i=W.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=W.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return W.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Nx(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Px(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Px(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Fx=Fb,Ix=Lb,Lx=zb,Rx=Vb,zx=Ub,Bx=Gb,Vx=ax,Hx=hx,Ux=_x,Wx=yx;function Gx({modal:e=!1,...t}){return X(Fx,{modal:e,...t})}var Kx=Lx,qx=W.forwardRef(({className:e,children:t,...n},r)=>Z(Ix,{ref:r,className:u(`flex h-9 w-full items-center justify-between gap-2 rounded-wx-sm border border-wx-border bg-wx-bg px-3 py-2 text-sm text-wx-fg`,`placeholder:text-wx-fg-subtle`,`focus:border-wx-primary focus:outline-none focus:ring-2 focus:ring-wx-primary/20`,`disabled:cursor-not-allowed disabled:bg-wx-bg-elevated/60 disabled:text-wx-fg-muted`,`[&>span]:line-clamp-1`,e),...n,children:[t,X(Rx,{asChild:!0,children:X(Tt,{size:14,className:`opacity-60`,"aria-hidden":`true`})})]}));qx.displayName=Ix.displayName;var Jx=W.forwardRef(({className:e,children:t,position:n=`popper`,...r},i)=>X(zx,{container:Te().themeRoot??void 0,children:X(Bx,{ref:i,position:n,className:u(`relative z-2147483602 max-h-72 min-w-32 overflow-hidden rounded-wx-sm border border-wx-border bg-wx-bg text-wx-fg shadow-lg`,`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),...r,children:X(Vx,{className:u(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t})})}));Jx.displayName=Bx.displayName;var Yx=W.forwardRef(({className:e,children:t,...n},r)=>Z(Hx,{ref:r,className:u(`relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pr-2 pl-7 text-sm outline-none`,`focus:bg-wx-bg-elevated focus:text-wx-fg`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[state=checked]:font-medium`,e),...n,children:[X(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:X(Wx,{children:X(Pe,{size:12,className:`text-wx-primary`,"aria-hidden":`true`})})}),X(Ux,{children:t})]}));Yx.displayName=Hx.displayName;function Xx(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}var Zx=new Set(`avatar.wexioId.telegramId.whatsappId.viberId.instagramId.optInWhatsapp.webVerified.firstName.lastName.username.language.email.phone.company.location.isValid.chatStatus.chatCategory.priority.leadSource.leadStatus.interestLevel.productInterest.budgetRange.purchaseTimeline.lastMessageSentAt.lastMessageReceivedAt.lastSeenAt.firstMessageReceivedAt.isBlocked.registrationDate.aiAvailable.totalMessagesSent.totalMessagesReceived.totalAiMessagesSent.totalBotMessagesSent.totalUserMessagesSent.flowCompletionRate.lastFlowCompleted.totalFlowsStarted.totalFlowsCompleted`.split(`.`)),Qx=new Set([`chatStatus`,`chatCategory`,`priority`,`leadStatus`,`interestLevel`]);function $x(e,t,n){let r=Xx(e);return Zx.has(r)?n(`systemFields.${r}`):t}function eS(e,t,n){let r=Xx(e);return Qx.has(r)?n(`systemFieldOptions.${r}.${t}`):rS(t)}function tS({id:e,fieldKey:t,mode:n,options:r,value:i,disabled:a,onChange:o,t:s}){return r.length===0?X(`p`,{id:e,className:`text-[11px] text-wx-fg-subtle italic`,children:s(`noOptions`)}):Z(Gx,{value:(n===`single`?i??``:Rm(i)[0]??``)||void 0,disabled:a,onValueChange:e=>{if(e===`__clear__`||!e){o(null);return}o(n===`single`?e:JSON.stringify([e]))},children:[X(qx,{id:e,"aria-label":s(`selectOption`),children:X(Kx,{placeholder:`—`})}),Z(Jx,{children:[X(Yx,{value:`__clear__`,children:`—`}),r.map(e=>X(Yx,{value:e,children:eS(t,e,s)},e))]})]})}var nS=new Set([`URL`,`ID`,`AI`,`API`,`VIP`,`CRM`,`SMS`]);function rS(e){if(!e)return e;let t=e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/[\s_-]+/).filter(Boolean);return t.length===0?e:t.map((e,t)=>{let n=e.toUpperCase();if(nS.has(n))return n;let r=e.toLowerCase();return t===0?r.charAt(0).toUpperCase()+r.slice(1):r}).join(` `)}function iS({id:e,fieldKey:t,value:n,disabled:r,onChange:i}){return X(`input`,{id:e,type:t===`email`?`email`:t===`phone`?`tel`:`text`,value:n??``,disabled:r,autoComplete:t===`email`?`email`:t===`phone`?`tel`:t===`firstName`?`given-name`:t===`lastName`?`family-name`:void 0,placeholder:t===`phone`?`+1 555 123 4567`:void 0,onChange:e=>i(e.target.value||null),className:lh})}function aS({id:e,field:t,value:n,onChange:r,t:i}){let a=t.pinned;switch(t.type){case`BOOLEAN`:return X(ch,{id:e,value:n,disabled:a,onChange:r});case`NUMBER`:return X(dh,{id:e,value:n,disabled:a,onChange:r});case`DATE`:return X(uh,{id:e,value:n,disabled:a,onChange:r});case`ENUM`:return X(tS,{id:e,fieldKey:t.key,mode:`single`,options:t.options??[],value:n,disabled:a,onChange:r,t:i});case`ARRAY`:return X(tS,{id:e,fieldKey:t.key,mode:`multi`,options:t.options??[],value:n,disabled:a,onChange:r,t:i});case`AVATAR`:return null;default:return X(iS,{id:e,fieldKey:t.key,value:n,disabled:a,onChange:r})}}function oS({field:e,value:t,onChange:n,error:r,t:i}){let a=e.pinned,o=`wx-profile-${e.key}`;return Z(`div`,{className:`flex flex-col gap-1.5`,children:[Z(`label`,{htmlFor:o,className:`flex items-baseline justify-between gap-2 text-xs font-medium text-wx-fg-muted`,children:[Z(`span`,{className:`inline-flex items-center gap-1`,children:[$x(e.key,e.label,i),e.required&&Z(`span`,{className:`text-wx-danger`,title:i(`requiredHint`),children:[`*`,X(`span`,{className:`sr-only`,children:i(`requiredHint`)})]}),a&&X(Ms,{size:11,"aria-hidden":`true`,className:`text-wx-fg-subtle`})]}),a&&X(`span`,{className:`text-[10px] font-normal text-wx-fg-subtle`,children:i(`pinnedHint`)})]}),X(aS,{id:o,field:e,value:t,onChange:n,t:i}),r&&X(`p`,{className:`text-[11px] text-wx-danger`,children:r})]})}function sS({eyebrow:e,adornment:t,children:n}){return Z(`section`,{className:`mt-6 flex flex-col gap-4 border-wx-border border-t pt-5 first:mt-4 first:border-t-0 first:pt-0`,children:[Z(`div`,{className:`flex items-baseline justify-between gap-2`,children:[X(`h2`,{className:`text-[11px] font-semibold tracking-[0.08em] text-wx-fg-subtle uppercase`,children:e}),t]}),X(`div`,{className:`flex flex-col gap-4`,children:n})]})}function cS({label:e,hint:t,children:n}){return Z(`div`,{className:`flex items-center justify-between gap-3`,children:[Z(`div`,{className:`flex min-w-0 flex-col`,children:[X(`span`,{className:`text-sm font-medium text-wx-fg`,children:e}),t&&X(`span`,{className:`text-[11px] text-wx-fg-muted`,children:t})]}),X(`div`,{className:`shrink-0`,children:n})]})}var lS=[{value:`system`,icon:Ls,labelKey:`themeAuto`},{value:`light`,icon:Qs,labelKey:`themeLight`},{value:`dark`,icon:Rs,labelKey:`themeDark`}];function uS({profile:e,locale:t,themeMode:n,prefSaving:r,applyPref:i,onNotificationError:a,t:o}){let s=y,c=n===`auto`;return Z(sS,{eyebrow:o(`preferencesHeading`),adornment:r?Z(`span`,{className:`inline-flex items-center gap-1 text-[10px] font-normal text-wx-fg-subtle`,children:[X(js,{size:10,className:`animate-spin`,"aria-hidden":`true`}),o(`saving`)]}):void 0,children:[X(cS,{label:o(`preferenceLanguage`),children:X(`div`,{className:`w-40`,children:Z(Gx,{value:e.preferences.language??t,disabled:r===`language`,onValueChange:e=>i(`language`,e||null),children:[X(qx,{"aria-label":o(`preferenceLanguage`),children:X(Kx,{})}),X(Jx,{children:s.map(e=>X(Yx,{value:e,children:V(e)},e))})]})})}),c&&X(cS,{label:o(`preferenceThemeMode`),children:X(`div`,{className:`inline-flex items-center gap-0.5 rounded-full bg-wx-bg-elevated p-0.5`,children:lS.map(({value:t,icon:n,labelKey:a})=>{let s=(e.preferences.themeMode??`system`)===t;return X(`button`,{type:`button`,"aria-pressed":s,"aria-label":o(a),title:o(a),disabled:r===`themeMode`,onClick:()=>i(`themeMode`,t),className:u(`flex h-7 w-9 items-center justify-center rounded-full transition-all`,s?`bg-wx-bg text-wx-fg shadow-[0_1px_3px_rgba(0,0,0,0.08)]`:`text-wx-fg-muted hover:text-wx-fg`,`disabled:cursor-not-allowed disabled:opacity-50`),children:X(n,{size:13,"aria-hidden":`true`})},t)})})}),X(cS,{label:o(`preferenceDesktopNotifications`),hint:o(`preferenceDesktopNotificationsHint`),children:X(sh,{"aria-label":o(`preferenceDesktopNotifications`),checked:!!e.preferences.desktopNotifications&&(typeof Notification>`u`||Notification.permission===`granted`),onChange:async e=>{if(!e){i(`desktopNotifications`,!1);return}if(typeof Notification>`u`){a(`notificationsRequest`);return}if(Notification.permission===`denied`){a(`notificationsBlocked`);return}if(Notification.permission===`default`)try{if(await Notification.requestPermission()!==`granted`){a(`notificationsBlocked`);return}}catch{a(`notificationsRequest`);return}i(`desktopNotifications`,!0)}})})]})}function dS(e,t){let n=new Set(e.fields.map(e=>e.key)),r=[];for(let e of t)n.has(e.key)||(n.add(e.key),r.push({__typename:`VisitorProfileField`,key:e.key,label:e.label||e.key,type:`STRING`,required:!1,pinned:!0,options:null,value:``}));return r.length===0?e:{...e,fields:[...e.fields,...r]}}function fS(e){let t=e,n=[];if(t?.graphQLErrors)for(let e of t.graphQLErrors){let t=e.extensions?.code;typeof t==`string`&&n.push(t)}typeof t?.message==`string`&&n.push(t.message);for(let e of n){if(e===`webProfileFieldNotAllowed`)return`fieldNotAllowed`;if(e===`webProfileFieldPinned`)return`fieldPinned`;if(e===`webProfileThemeLocked`)return`themeLocked`;if(e===`webProfileFeatureDisabled`)return`featureDisabled`;if(e===`peopleFields.invalidValue`)return`fieldInvalid`}return`generic`}function pS(e){let t=e;if(!t?.graphQLErrors)return null;for(let e of t.graphQLErrors){let t=e.extensions;if(t&&t.code===`peopleFields.invalidValue`){if(typeof t.field==`string`)return t.field;if(typeof t.key==`string`)return t.key}}return null}function mS(e){switch(e){case`fieldNotAllowed`:return`errorFieldNotAllowed`;case`fieldPinned`:return`errorFieldPinned`;case`themeLocked`:return`errorThemeLocked`;case`featureDisabled`:return`errorFeatureDisabled`;case`fieldInvalid`:return`errorFieldInvalid`;default:return`errorGeneric`}}function hS({sent:e,current:t,saved:n}){let r={...n},i=!1;for(let a of new Set([...Object.keys(e),...Object.keys(t)])){let o=t[a]??null;o!==(e[a]??null)&&(r[a]=o,o!==(n[a]??null)&&(i=!0))}return{values:r,hasEdits:i}}function gS(e,t){let n=new Map(t.map(e=>[e.key,e.value]));return{...e,fields:e.fields.map(e=>n.has(e.key)?{...e,value:n.get(e.key)||null}:e)}}function _S(e,t,n){let[r]=dr(),i=fe(),a=rt(),[o,s]=Y(null),[c,l]=Y(null),u=G(()=>l(null),[]);return{apply:G(async(o,c)=>{if(!e)return;if(n){n(o,c),o===`language`&&typeof c==`string`&&$a(c);return}s(o),l(null);let u={[o]:c},d={__typename:`VisitorProfilePreferences`,...e.preferences,...u};if(i){a.writeQuery({query:cr,data:{visitorProfile:{...e,preferences:d}}}),o===`language`&&typeof c==`string`&&$a(c);let{__typename:t,...n}=d;i.enqueue({op:`setPreferences`,semantics:`convergence`,convergenceKey:`preferences`,payload:n}),s(null);return}try{await r({variables:{input:{preferences:u}},optimisticResponse:{__typename:`Mutation`,updateVisitorProfile:{__typename:`VisitorProfile`,...e,preferences:d}},update:(e,{data:t})=>{let n=t?.updateVisitorProfile;n&&e.writeQuery({query:cr,data:{visitorProfile:n}})}}),o===`language`&&typeof c==`string`&&$a(c)}catch(e){l(t(mS(fS(e))))}finally{s(null)}},[e,t,r,n,i,a]),saving:o,error:c,clearError:u}}var vS=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function yS(e){return e?vS.test(e.trim())?null:`invalidEmail`:null}var bS=null;async function xS(){if(!bS)try{bS=(await import(`./widget-react-Ds-6CsP4.js`)).isValidPhoneNumber}catch(e){console.warn(`[wexio] the "phone-validation" chunk failed to load; only the "+" check applies`,e)}}function SS(e){if(!e)return null;let t=e.trim();return t.startsWith(`+`)&&(!bS||bS(t))?null:`invalidPhone`}function CS(e,t){return t==null||t===``?null:e.key===`email`?yS(t):e.key===`phone`?SS(t):null}function wS({isDummy:e,pending:t=!1}){let r=i(`profile`),a=n(),{config:o}=Ct(),s=Te(),c=s.demoProfileFields,{token:l}=Ce(),d=l||s.audienceOverride?s.previewProfileFields:void 0,{data:f,loading:p,error:m,refetch:h}=lr({skip:e||t}),[g,_]=Y([]),v=q(()=>e?gS(ES(a,c),g):null,[e,a,c,g]),y=Xa(),b=q(()=>{if(v)return{...v,preferences:{...v.preferences,...y.themeMode!=null&&{themeMode:y.themeMode},...y.language!=null&&{language:y.language},desktopNotifications:y.desktopNotifications}};let e=f?.visitorProfile;return e&&d?dS(e,d):e},[v,y,f?.visitorProfile,d]),[x,{loading:S}]=dr(),{refresh:C}=oi(),w=rt(),T=fe(),[E,{loading:D}]=Ae(),O=G((e,t)=>{e===`language`?Ya(`language`,typeof t==`string`?t:null):e===`themeMode`?Ya(`themeMode`,TS(t)):e===`desktopNotifications`&&Ya(`desktopNotifications`,!!t)},[]),{apply:k,saving:A,error:j}=_S(b,r,e?O:void 0),[M,N]=Y({}),[P,ee]=Y(!1),[te,ne]=Y(!1),[F,re]=Y(null),[ie,ae]=Y({}),oe=J(M);oe.current=M;let se=J(null);K(()=>{xS()},[]),K(()=>()=>{se.current&&clearTimeout(se.current)},[]);let ce=G(()=>{ne(!0),se.current&&clearTimeout(se.current),se.current=setTimeout(()=>ne(!1),2400)},[]),le=J(Date.now()),ue=T?.dropped;K(()=>{ue&&ue.at>le.current&&re(r(`errorGeneric`))},[ue,r]),K(()=>{b&&(P||N(Mm(b)))},[b,P]);let de=o.messenger?.profile?.fields??null,{avatarField:I,regularFields:pe}=q(()=>{if(!b)return{avatarField:null,regularFields:[]};let e=b.fields.find(e=>e.type===`AVATAR`)??null,t=b.fields.filter(e=>e.type!==`AVATAR`);if(!de)return{avatarField:e,regularFields:t};let n=new Map(t.map(e=>[e.key,e])),r=de.map(e=>n.get(e)).filter(e=>!!e);if(d){let e=new Set(d.map(e=>e.key));for(let n of t)n.pinned&&e.has(n.key)&&!r.includes(n)&&r.push(n)}return{avatarField:e&&de.includes(e.key)?e:null,regularFields:r}},[b,de,d]),me=G((e,t)=>{N(n=>({...n,[e]:t})),ee(!0),ne(!1),re(null),ae(t=>{if(!t[e])return t;let n={...t};return delete n[e],n})},[]),L=G(()=>{b&&(N(Mm(b)),ee(!1),re(null),ae({}))},[b]),he=G(async()=>{if(!b)return;await xS();let t={};for(let e of b.fields){if(e.pinned)continue;let n=M[e.key]??null;if(e.required&&Nm(n)){t[e.key]=r(`requiredHint`);continue}let i=CS(e,n);i&&(t[e.key]=r(i))}if(Object.keys(t).length>0){ae(t),re(r(`errorFieldInvalid`));return}let n=Fm(b.fields,M);if(n.length===0)return;re(null),ae({});let i=e=>{let t=hS({sent:M,current:oe.current,saved:Mm(e)});N(t.values),ee(t.hasEdits),ce()};if(e){_(e=>[...e.filter(e=>!n.some(t=>t.key===e.key)),...n]),i(gS(b,n));return}if(T&&!T.online){T.enqueue({op:`setProfile`,semantics:`convergence`,convergenceKey:`profile`,payload:{fields:n}});let e=gS(b,n);w.writeQuery({query:cr,data:{visitorProfile:e}}),i(e);return}try{let e=(await x({variables:{input:{fields:n}},update:(e,{data:t})=>{let n=t?.updateVisitorProfile;n&&e.writeQuery({query:cr,data:{visitorProfile:n}})}})).data?.updateVisitorProfile;e&&(i(e),C())}catch(e){let t=fS(e);if(t===`fieldInvalid`){let t=pS(e);t&&ae({[t]:r(`errorFieldInvalid`)})}re(r(mS(t)))}},[b,r,x,M,e,T,w,ce,C]),ge=G(async t=>{if(I){if(re(null),!dd.has(t.type)||!t.type.startsWith(`image/`)){re(r(`errorGeneric`));return}if(t.size>10485760){re(r(`errorGeneric`));return}try{if(e){let{base64:e}=await ud(t);me(I.key,`data:${t.type};base64,${e}`);return}let{base64:n}=await ud(t),r=(await E({variables:{input:{filename:t.name,mimetype:t.type,dataBase64:n}}})).data?.uploadVisitorMedia?.url;if(!r)throw Error(`empty upload response`);me(I.key,r)}catch{re(r(`errorGeneric`))}}},[I,e,me,r,E]);if(p||t)return X(ze,{className:`flex-1`,children:Z(`div`,{className:`flex flex-col gap-4 px-5 py-6`,"aria-busy":`true`,children:[Z(`div`,{className:`mx-auto flex flex-col items-center gap-3`,children:[X(U,{className:`h-24 w-24 rounded-full`}),X(U,{className:`h-4 w-32 rounded`})]}),X(U,{className:`h-9 w-full rounded-wx-sm`}),X(U,{className:`h-9 w-full rounded-wx-sm`}),X(U,{className:`h-9 w-full rounded-wx-sm`}),X(`span`,{className:`sr-only`,children:r(`loading`)})]})});if(m||!b)return Z(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-4 px-6 py-10 text-center`,children:[X(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full bg-wx-danger/10 text-wx-danger`,children:X(ms,{size:24,"aria-hidden":`true`})}),X(`p`,{className:`max-w-xs text-sm text-wx-fg-muted`,children:r(`loadError`)}),Z(`button`,{type:`button`,onClick:()=>h(),className:`inline-flex items-center gap-1.5 rounded-full bg-wx-primary px-4 py-2 text-sm font-medium text-wx-primary-fg transition-colors hover:bg-wx-primary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg`,children:[X(Us,{size:14,"aria-hidden":`true`}),r(`retry`)]})]});let _e=I?M[I.key]??null:null,R=Im(b,M);return Z(`div`,{className:`flex h-full min-h-0 flex-col`,children:[X(ze,{className:`min-h-0 flex-1`,children:Z(`form`,{id:`wx-profile-form`,noValidate:!0,onSubmit:e=>{e.preventDefault(),he()},className:`flex flex-col px-5 pt-2 pb-4`,children:[I&&X(oh,{field:I,value:_e,uploading:D,onPick:ge,onClear:()=>me(I.key,null),displayName:R,t:r}),pe.length>0&&X(sS,{eyebrow:r(`title`),children:pe.map(e=>X(oS,{field:e,value:M[e.key]??null,onChange:t=>me(e.key,t),error:ie[e.key],t:r},e.key))}),!I&&pe.length===0&&X(`p`,{className:`py-6 text-center text-sm text-wx-fg-muted`,children:r(`noFields`)}),X(uS,{profile:b,locale:a,themeMode:o.themeMode,prefSaving:A,applyPref:k,onNotificationError:e=>re(e?r(e):null),t:r}),(F??j)&&Z(`p`,{className:`mt-4 flex items-start gap-1.5 rounded-wx-sm bg-wx-danger/10 px-3 py-2 text-xs text-wx-danger`,children:[X(At,{size:13,"aria-hidden":`true`,className:`mt-0.5 shrink-0`}),X(`span`,{children:F??j})]}),te&&!F&&!j&&Z(`p`,{className:`mt-4 flex items-center gap-1.5 rounded-wx-sm bg-wx-success/10 px-3 py-2 text-xs text-wx-success`,children:[X(Pe,{size:13,"aria-hidden":`true`}),X(`span`,{children:r(`saved`)})]})]})}),P&&Z(`div`,{className:`flex items-center gap-2 border-t border-wx-border bg-wx-bg/95 px-4 py-3 backdrop-blur`,children:[Z(`button`,{type:`submit`,form:`wx-profile-form`,disabled:S,className:u(`flex flex-1 items-center justify-center gap-1.5 rounded-full bg-wx-primary px-4 py-2 text-sm font-semibold text-wx-primary-fg`,`hover:bg-wx-primary-hover disabled:cursor-not-allowed disabled:opacity-60`),children:[S&&X(js,{size:14,className:`animate-spin`,"aria-hidden":`true`}),r(S?`saving`:`save`)]}),X(`button`,{type:`button`,onClick:L,disabled:S,className:u(`rounded-full bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-fg`,`hover:bg-wx-bg-elevated-2 disabled:cursor-not-allowed disabled:opacity-60`),children:r(`cancel`)})]})]})}function TS(e){if(typeof e!=`string`)return null;let t=e.toLowerCase();return t===`light`||t===`dark`?t:t===`auto`||t===`system`?`auto`:null}function ES(e,t=[]){return{themeModeEditable:!0,preferences:{language:e,themeMode:`system`,desktopNotifications:!1},fields:[{key:`avatar`,label:`Avatar`,type:`AVATAR`,required:!1,pinned:!1,value:null},{key:`name`,label:`Name`,type:`STRING`,required:!1,pinned:!1,value:`John Doe`},{key:`email`,label:`Email`,type:`STRING`,required:!1,pinned:!1,value:``},{key:`phone`,label:`Phone`,type:`STRING`,required:!1,pinned:!1,value:``},...t.map(e=>({key:e.key,label:e.label||e.key,type:`STRING`,required:!1,pinned:!1,value:``}))]}}var DS=`data-wx-pointer`,OS={onPointerDown:e=>{e.currentTarget.setAttribute(DS,``)},onBlur:e=>{e.currentTarget.removeAttribute(DS)},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.currentTarget.removeAttribute(DS)}};function kS({isOpen:e,onToggle:t,unreadCount:n=0,newsUnread:r=!1,logoUrl:a=null,position:s=`right`,embedded:c=!1,loading:l=!1}){let d=i(`launcher`),f=i(`news`),p=ln(),m=ln(),h=e?m.parentHandlers:p.parentHandlers,g=n+ +!!r,_=!e&&n>0,v=!e&&n===0&&r;return Z(o.button,{type:`button`,"data-wx-fab":``,ref:_r.fab,onClick:l?void 0:t,disabled:l,"aria-label":d(e?`close`:`open`),"aria-busy":l||void 0,whileHover:l?void 0:{scale:1.05},whileTap:l?void 0:{scale:.92},transition:{type:`spring`,stiffness:400,damping:22},onHoverStart:h.onMouseEnter,onHoverEnd:h.onMouseLeave,...h,onPointerDown:OS.onPointerDown,onKeyDown:OS.onKeyDown,onBlur:e=>{h.onBlur(),OS.onBlur(e)},className:u(c?`absolute`:`fixed`,`bottom-4 z-2147483600`,s===`left`?`left-4`:`right-4`,`flex h-14 w-14 items-center justify-center rounded-full`,`bg-wx-launcher-bg text-wx-launcher-fg`,`shadow-[0_8px_24px_rgba(0,0,0,0.18)]`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-launcher-bg focus-visible:ring-offset-2 focus-visible:ring-offset-white`,`data-wx-pointer:focus-visible:ring-0 data-wx-pointer:focus-visible:ring-offset-0`),style:s===`left`?{marginBottom:`var(--wx-off-y,0px)`,marginLeft:`var(--wx-off-x,0px)`}:{marginBottom:`var(--wx-off-y,0px)`,marginRight:`var(--wx-off-x,0px)`},children:[X(`span`,{"aria-hidden":!0,className:`contents`,children:X(dc,{count:_?g:0,dot:v,label:v?f(`unread`):void 0,size:`md`,className:`absolute -top-1 -right-1 z-10`})}),X(kt,{mode:`wait`,initial:!1,children:e?X(o.span,{initial:{opacity:0,rotate:-90,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:90,scale:.7},transition:{duration:.18},children:X(Pt,{ref:m.iconRef,size:24})},`x`):a?X(o.span,{initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{duration:.18},className:`absolute inset-0 overflow-hidden rounded-full`,children:X(`img`,{src:a,alt:``,className:`h-full w-full object-cover`})},`logo`):X(o.span,{initial:{opacity:0,rotate:90,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:-90,scale:.7},transition:{duration:.18},children:X(Mt,{ref:p.iconRef,size:24,className:`[&_svg]:fill-current [&_svg]:stroke-current`})},`chat`)})]})}function AS(e,t){if(e===t)return!1;let n=Date.parse(t),r=e===void 0?NaN:Date.parse(e);return!Number.isNaN(n)&&!Number.isNaN(r)?n>r:!0}function jS({open:e,errorCode:t,onRetry:n,onDismiss:r,position:a=`right`,embedded:s=!1}){let c=i(`authError`),l=a===`left`,d=t?.startsWith(`turnstile_failed:`)??!1,f=t===ka,p=c(f?`visitorLimitTitle`:d?`turnstileTitle`:`genericTitle`),m=c(f?`visitorLimitBody`:d?`turnstileBody`:`genericBody`);return X(kt,{children:e&&X(o.div,{initial:{opacity:0,y:18,scale:.88},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.96},transition:{type:`spring`,stiffness:440,damping:20},className:u(`bottom-24 z-2147483599 w-[300px]`,s?`absolute`:`fixed`,l?`left-4`:`right-4`),"data-wx-popup":``,ref:_r.popup,role:`alert`,"aria-live":`polite`,"aria-label":p,children:Z(`div`,{className:u(`relative rounded-wx-lg border border-wx-border bg-wx-bg`,`p-4 pr-9 text-wx-fg`,`shadow-[0_16px_40px_rgba(0,0,0,0.16)]`),children:[X(`button`,{type:`button`,onClick:r,"aria-label":c(`dismiss`),className:u(`absolute top-2 right-2 flex h-6 w-6 items-center justify-center rounded-full`,`text-wx-fg-muted transition-colors hover:bg-wx-bg-elevated hover:text-wx-fg`),children:X(At,{size:12})}),Z(`div`,{className:`flex items-start gap-3`,children:[X(`div`,{className:u(`flex h-8 w-8 shrink-0 items-center justify-center rounded-full`,`bg-wx-danger/10 text-wx-danger`),children:X(d||f?Gs:Us,{size:16,"aria-hidden":`true`})}),Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[X(`p`,{className:`text-sm font-medium text-wx-fg`,children:p}),X(`p`,{className:`text-xs leading-relaxed text-wx-fg-muted`,children:m})]})]}),!f&&X(`div`,{className:`mt-3 flex justify-end`,children:Z(`button`,{type:`button`,onClick:n,className:u(`inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-xs font-medium`,`bg-wx-primary text-wx-primary-fg transition-colors`,`hover:bg-wx-primary-hover`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg`),children:[X(Us,{size:12,"aria-hidden":`true`}),c(`retry`)]})})]})})})}var MS=e=>e.chatId===``;function NS(e){return e.reduce((e,t)=>MS(t)?e:e+(t.unreadCount||0),0)}var PS=32,FS=420,IS=640;function LS(e){if(e===null)return!0;let t=e-PS;return Math.min(IS,t)>Math.min(FS,t)}function RS(e){if(typeof e!=`string`)return`auto`;let t=e.toLowerCase();return t===`light`||t===`dark`||t===`auto`?t:`auto`}function zS(e,t){if(!e)return null;let n=t===`dark`?e.dark:e.light,r=t===`dark`?e.light:e.dark;return n??r??null}function BS(e){let t=new Set([`BAD_USER_INPUT`,`BAD_REQUEST`,`GRAPHQL_VALIDATION_FAILED`,`VISITOR_BLOCKED`,`THREAD_BLOCKED`]),n=new Set([400,413,422]);if(!e||typeof e!=`object`)return!1;if(N(e))return!0;let r=e=>{if(!e||typeof e!=`object`)return!1;let r=e;if(typeof r.code==`string`&&t.has(r.code))return!0;let i=r.response?.statusCode;return typeof i==`number`&&n.has(i)},i=e.graphQLErrors;if(Array.isArray(i)){for(let e of i)if(e&&typeof e==`object`&&r(e.extensions))return!0}let a=e.networkError;if(a&&typeof a==`object`){let e=a.statusCode;if(typeof e==`number`&&n.has(e))return!0}return!1}function VS(e){return e===`messages`?{kind:`messages`}:e===`help`?{kind:`help`}:e===`news`?{kind:`news`}:e===`profile`?{kind:`profile`}:{kind:`home`}}function HS(e){switch(e.kind){case`home`:return 0;case`messages`:return 1;case`messages-thread`:return 1.5;case`help`:return 2;case`help-category`:return 2.5;case`help-article`:return 2.75;case`news`:return 3;case`news-article`:return 3.25;case`profile`:return 4}}function US(e){return e.kind===`help-category`?`help-category:${e.categoryId}`:e.kind===`help-article`?`help-article:${e.slug}`:e.kind===`news-article`?`news-article:${e.id}`:e.kind===`messages-thread`?`messages-thread:${e.keyAs??e.threadKey??`main`}`:e.kind}var WS={enter:e=>({x:e>0?28:e<0?-28:0,opacity:0}),center:{x:0,opacity:1},exit:e=>({x:e>0?-28:e<0?28:0,opacity:0})};function GS({glow:e}){return X(`div`,{"aria-hidden":`true`,"data-wx-home-backdrop":e?`glow`:`plain`,className:u(`pointer-events-none absolute inset-x-0 top-0 -z-10 h-96`,e?`bg-[radial-gradient(120%_80%_at_50%_-10%,color-mix(in_srgb,var(--wx-home-glow)_var(--wx-home-glow-a,22%),transparent),transparent_55%),linear-gradient(to_bottom,var(--wx-bg-elevated-2)_0%,var(--wx-bg-elevated)_40%,var(--wx-bg)_75%)] dark:bg-[radial-gradient(120%_80%_at_50%_-10%,color-mix(in_srgb,var(--wx-home-glow)_var(--wx-home-glow-a,35%),transparent),transparent_55%),linear-gradient(to_bottom,var(--wx-bg-elevated-2)_0%,var(--wx-bg-elevated)_40%,var(--wx-bg)_75%)]`:`bg-[linear-gradient(to_bottom,var(--wx-bg-elevated-2)_0%,var(--wx-bg-elevated)_40%,var(--wx-bg)_75%)]`)})}function KS(e){return e||`main`}function qS(e,t,n,r){let i=e,a=!1,o=()=>{a||(i=[...e],a=!0)};for(let e of t){if(e.op!==`sendMessage`)continue;let t=e.payload;if(KS(t.threadKey)!==n)continue;let a=e.status===`failed`?`FAILED`:e.status===`sending`?`SENDING`:`QUEUED`,s=i.findIndex(t=>(t.clientKey??t.id)===e.clientKey);if(s===-1){o();let n=r(e.clientKey,t.media);i.push({id:e.clientKey,clientKey:e.clientKey,direction:`INBOUND`,text:t.text,ageLabel:``,sender:{kind:`visitor`,name:``},...n.length>0?{media:n}:{},deliveryStatus:a})}else i[s].deliveryStatus!==a&&(o(),i[s]={...i[s],deliveryStatus:a})}return a?i:e}function JS(e,t){let n=e.findIndex(e=>e.id===t.id),r={...t,edited:!0};if(n===-1)return[...e,{...r,editOnly:!0}];let i=[...e];return i[n]={...r,clientKey:e[n].clientKey??t.clientKey},i}function YS(e){return e.kind===`messages`||e.kind===`messages-thread`&&!e.pendingLatest}function XS(e,t){if(!e)return null;let{route:n}=e;return n.kind===`messages-thread`&&(xe(n.threadKey)||de(n.threadKey))&&e.topSlotId!==t?null:n}function ZS(e,t,n){let r=``;if(e)try{r=(new DOMParser().parseFromString(e,`text/html`).body.textContent??``).replace(/\s+/g,` `).trim()}catch{r=e.replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim()}if(r)return r;if(t.length===0)return n.newMessage;let i=t[0]?.mimetype??``,a=i.startsWith(`image/`)?n.image:i.startsWith(`video/`)?n.video:i.startsWith(`audio/`)?n.voiceMessage:n.attachment;return t.length>1?`${a} +${t.length-1}`:a}function QS(e,t){return e?.assignedOperatorName??e?.senderName??t}function $S(){let e=null;return{report(t,n){if(!(e!==null&&(t.width<e.width||t.height<e.height)))return e=t,n(t.width,t.height),()=>{};let r=setTimeout(()=>{e=t,n(t.width,t.height)},450);return()=>clearTimeout(r)},forget(){e=null}}}function eC(e,t,n){return{text:e,buttonValue:t,...n?{threadKey:n}:{}}}function tC(e,t){return{id:e,clientKey:e,direction:`INBOUND`,text:t,ageLabel:`now`,sender:{kind:`visitor`,name:``},deliveryStatus:`SENT`}}function nC(e,t){let{article:n}=e;if(n?.kind===`help`&&t.help)return{kind:`help-article`,slug:n.slug,from:`search`,origin:{kind:`help`}};if(n?.kind===`news`&&t.news)return{kind:`news-article`,id:n.id,origin:{kind:`news`}};let r=Uo(e.tab,t);return r===`messages`?{kind:`messages-thread`,pendingLatest:!0}:VS(r)}function rC(e){let{article:t}=e;return[e.tab,e.nonce,t?.kind??``,t?t.kind===`help`?t.slug:t.id:``].join(`|`)}function iC(e){return e===`setProfile`||e===`setPreferences`}function aC(e){e.cache.evict({id:`ROOT_QUERY`,fieldName:`visitorProfile`}),e.cache.gc()}async function oC(e){try{let{data:t}=await e.query({query:cr,fetchPolicy:`network-only`}),n=t?.visitorProfile?.preferences?.language;to(Ye(n)?n:null)}catch{}}function sC(e,t=Xe){if(e.kind===`typing`||e.kind===`read-receipt`||e.kind===`assignment`||e.kind===`status`||e.kind===`blocked`||e.kind===`reaction`)return null;let n=(e.from??e.sender)?.kind;if(n===`visitor`)return null;let r=e.from??e.sender,i=Array.isArray(e.buttons)?e.buttons.map(e=>({text:e.label,payload:e.value,...e.type?{type:e.type.toLowerCase()}:{},...e.url?{url:e.url}:{},...e.phoneNumber?{phoneNumber:e.phoneNumber}:{}})):void 0,a=n===`ai`||n===`bot`?t:r?.name??``,o=e.sentAt??new Date().toISOString(),s=(()=>{try{return new Date(o).toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}catch{return``}})(),c=e.media,l=Wn(c),u=Kn(e.sources),d=c&&typeof c==`object`&&!Array.isArray(c)?c.caption:void 0,f={id:e.externalMessageId,direction:`OUTBOUND`,text:e.text||(typeof d==`string`?d:``),ageLabel:s,sender:{kind:n??`operator`,name:a,...r?.avatar?{avatar:r.avatar}:{}},...l.length>0?{media:l}:{},...u.length>0?{sources:u}:{},...i?{buttons:i}:{},deliveryStatus:`DELIVERED`};return im(f)?null:f}var cC=class extends fn{constructor(...e){super(...e),this.state={failed:!1},this.retry=()=>this.setState({failed:!1})}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){console.error(`[wexio] a tab crashed`,e,t.componentStack)}render(){return this.state.failed?Z(`div`,{role:`alert`,className:`flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center`,children:[X(ms,{"aria-hidden":`true`,className:`size-6 text-wx-fg-subtle`}),Z(`div`,{className:`flex flex-col gap-1`,children:[X(`p`,{className:`font-semibold text-sm text-wx-fg`,children:this.props.title}),X(`p`,{className:`text-xs text-wx-fg-muted`,children:this.props.hint})]}),X(Kt,{type:`button`,variant:`tonal`,size:`sm`,onClick:this.retry,children:this.props.retryLabel})]}):this.props.children}};function lC({children:e}){let t=i(`tabError`);return X(cC,{title:t(`title`),hint:t(`hint`),retryLabel:t(`retry`),children:e})}function uC({children:e,...t}){return X(o.div,{...t,children:X(lC,{children:e})})}function dC(e){if(e.op.op!==`sendMessage`)return null;let t=e.error??{};if(!N(t)||!JSON.stringify(t).includes(S.notFound))return null;let n=e.op.payload,r=n?.messageSlot;if(!r?.slotId||!n?.threadKey)return null;let{messageSlot:i,...a}=n,o=n.threadKey.startsWith(`message:`)?ie(r.slotId,ut(n.threadKey)):n.threadKey;return{slotId:r.slotId,failedThreadKey:n.threadKey,payload:{...a,threadKey:o,chatId:null}}}function fC(e){if(e.op.op!==`sendMessage`)return null;let t=e.error??{};if(!N(t)||!JSON.stringify(t).includes(S.threadKeyMismatch))return null;let n=e.op.payload;if(!n?.messageSlot||!n.threadKey||n.threadKey.startsWith(`message:`))return null;let{messageSlot:r,...i}=n;return i}function pC({hasError:e,hasSession:t,onRetry:n}){let[r,i]=Y(!1),a=J(!1);K(()=>{e||i(!1)},[e]),K(()=>{t&&(a.current=!1)},[t]),K(()=>{e&&a.current&&(a.current=!1,i(!0))},[e]);let o=G(()=>{a.current=!0,i(!1),n()},[n]);return{open:r,show:G(()=>i(!0),[]),dismiss:G(()=>i(!1),[]),retry:o}}function mC(e,t,n){K(()=>{e===void 0&&t&&n()},[])}function hC(e,t,n=!1,r){let i=J(!1),a=r??i,o=J(n);o.current=n;let s=J(e);s.current=e;let c=J(t);c.current=t;let l=G(()=>{s.current&&!o.current?a.current=!0:c.current()},[a]),u=G(()=>{a.current=!1},[a]);return K(()=>{e||!a.current||(a.current=!1,c.current())},[e,a]),K(()=>{!n||!a.current||(a.current=!1,c.current())},[n,a]),{request:l,cancel:u}}function gC(e,t,n){K(()=>{e!==void 0&&(e?t():n())},[e,t,n])}var _C=[`home`,`messages`,`help`,`news`,`profile`];function vC(e){if(!e||typeof e!=`object`)return;let t=e;if(t.kind===`help`&&typeof t.slug==`string`&&t.slug)return{kind:`help`,slug:t.slug};if(t.kind===`news`&&typeof t.id==`string`&&t.id)return{kind:`news`,id:t.id}}function yC(e){if(!e||typeof e!=`object`)return null;let t=e;if(t.type!==`wexio:host-control:v1`)return null;if(t.command===`open`||t.command===`close`)return{command:t.command};if(t.command!==`navigate`||!_C.includes(t.tab)||typeof t.nonce!=`number`||!Number.isFinite(t.nonce))return null;let n=vC(e.article);return{command:`navigate`,signal:{tab:t.tab,nonce:t.nonce,...n?{article:n}:{}}}}function bC(e,t,n){let[r,i]=Y(),a=J(t),o=J(n);return a.current=t,o.current=n,K(()=>{if(e!==`iframe`)return;let t=t=>{if(!gt(t,e))return;let n=yC(t.data);n&&(n.command===`open`?a.current():n.command===`close`?o.current():i(n.signal))};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e]),r}function xC(e,t){let n=Uo(e,t);return n===`messages`?{kind:`messages-thread`,pendingLatest:!0}:VS(n)}function SC(e,t,{defaultTab:n,features:r,loading:i}){let a=J(e),o=J(!1);K(()=>{Vo(Bo(e),r)||t(VS(Uo(n,r)))},[r,n]),K(()=>{i||o.current||(o.current=!0,e===a.current&&t(xC(n,r)))},[i])}function CC(e){let t=Number(e);return Number.isFinite(t)?Math.min(200,Math.max(0,Math.round(t))):0}function wC(e){if(!e||typeof e!=`object`)return;let{x:t,y:n}=e;return{x:CC(t),y:CC(n)}}function TC(e){if(!(e==null||e===``))return Number.isFinite(Number(e))?CC(e):void 0}function EC(e,t){let n=wC(t),r=e&&typeof e==`object`?e:void 0;return{x:TC(r?.x)??n?.x??0,y:TC(r?.y)??n?.y??0}}function DC(e,t){let n=e.kind===`iframe`,r=EC(n?void 0:e.offset,t),{x:i,y:a}=n?{x:0,y:0}:r,o=e.themeRoot;K(()=>{let e=o??document.documentElement;e.style.setProperty(`--wx-off-x`,`${i}px`),e.style.setProperty(`--wx-off-y`,`${a}px`)},[i,a,o]);let s=J(e.onLauncherOffset);s.current=e.onLauncherOffset;let c=wC(t),l=c?.x,u=c?.y;K(()=>{!n||l===void 0||u===void 0||s.current?.({x:l,y:u})},[n,l,u])}var OC=new Set([`ar`,`he`,`fa`,`ur`]);function kC(e){let t=e.toLowerCase().split(/[-_]/)[0];return OC.has(t)?`rtl`:`ltr`}function AC(e,t){Sn(()=>{let n=kC(e);t?n===`rtl`?t.dir=`rtl`:t.removeAttribute(`dir`):document.documentElement.dir=n},[e,t])}function jC({isOpen:e,enabled:t,onOpen:n,onClose:r}){let i=J(n),a=J(r);i.current=n,a.current=r;let o=J(t);o.current=t;let s=J(!1);K(()=>{e!==s.current&&(s.current=e,t&&(e?i.current?.():a.current?.()))},[e,t]),K(()=>()=>{s.current&&(s.current=!1,o.current&&a.current?.())},[])}function MC(){return document.querySelector(`dialog[open], [aria-modal="true"]`)!==null}var NC=`[role="dialog"]:not([data-wx-peek]), [role="listbox"], [role="menu"]`;function PC(e){return e?Array.from(e.querySelectorAll(NC)).some(e=>!e.closest(`[hidden], [inert], [aria-hidden="true"]`)):!1}function FC(e){let t=e.getRootNode();return`activeElement`in t?t:null}function IC({isOpen:e,panelRef:t,onEscape:n,scopeToWidget:r}){let i=J(n);i.current=n;let a=J(!1),o=J(!1);K(()=>{let n=t.current;if(n){if(e&&!o.current){let e=FC(n)?.activeElement;e&&(e.matches(`[data-wx-fab]`)||e.closest(`[data-wx-peek]`))&&(n.focus({preventScroll:!0}),a.current=!0)}else !e&&o.current&&a.current&&((FC(n)?.querySelector(`[data-wx-fab]`))?.focus({preventScroll:!0}),a.current=!1);o.current=e}},[e,t]),K(()=>{let e=t.current;if(!e)return;let n=()=>{a.current=!0},r=t=>{let n=t.composedPath(),r=FC(e)?.querySelector(`[data-wx-fab]`);!n.includes(e)&&!(r&&n.includes(r))&&(a.current=!1)},i=t=>{let n=t.relatedTarget;n&&!e.contains(n)&&(a.current=!1)};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),document.addEventListener(`pointerdown`,r,!0),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),document.removeEventListener(`pointerdown`,r,!0)}},[t]),K(()=>{if(!e)return;let n=e=>{if(e.key!==`Escape`||e.defaultPrevented||e.isComposing||e.keyCode===229)return;let n=e.composedPath()[0];if(n instanceof Element&&n.closest(`[data-wx-own-escape]`))return;let o=t.current;if(o){if(r){let t=FC(o)?.querySelector(`[data-wx-fab]`),n=e.composedPath(),r=n.includes(o)||!!(t&&n.includes(t)),i=n[0],s=a.current&&!MC()&&(i===document.body||i===document.documentElement);if(!r&&!s)return}PC(FC(o))||i.current()}};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e,t,r])}function LC(e){let{publicKey:t,storage:n}=e,[r,i]=Y(()=>Vr(n,t));return{marks:r,markRead:G((e,r)=>{let a=Date.parse(r??``);!e||Number.isNaN(a)||(Hr(n,t,e,a),i(t=>(t[e]??0)>=a?t:{...t,[e]:a}))},[n,t])}}function RC(e,t){let n=rt(),r=J(t);r.current=t;let i=J(e);K(()=>{i.current!==e&&(i.current=e,n.clearStore().catch(()=>{}),r.current())},[e,n])}var zC=e=>`wexio:visitor-blocked:${e??``}`;function BC(e,t){try{return t.getItem(zC(e))===`1`}catch{return!1}}function VC(e){let{publicKey:t,storage:n,live:r,threads:i,sessionContent:a,handshake:o}=e,[s]=Y(()=>BC(t,n)),c=q(()=>r===null?i===!0||a===!0||o?!0:i===!1||a===!1?!1:null:r,[r,i,a,o]);return K(()=>{if(c!==null)try{c?n.setItem(zC(t),`1`):n.removeItem(zC(t))}catch{}},[c,n,t]),c??s}var HC=Nr(`help-article`,()=>import(`./widget-react-BflWAq27.js`),{pick:e=>e.HelpArticleView}),UC=Nr(`news-article`,()=>import(`./widget-react-Yd3uIKgg.js`),{pick:e=>e.NewsArticleView}),WC=`wexio:panel-expanded`,GC=6e3,KC=32,qC=112;function JC(e){if(typeof window>`u`)return!1;try{return e.getItem(WC)===`1`}catch{return!1}}var YC=`wexio:welcome-read:`,XC=[],ZC=e=>`${YC}${e??``}`;function QC(e,t){if(typeof window>`u`)return!1;try{return t.getItem(ZC(e))===`1`}catch{return!1}}function $C(e){let t=e.errors;if(!t||t.length===0)return;let n=t[0],r=Error(n?.message??`backend error`);throw r.graphQLErrors=t,r}function ew(){return X(`div`,{className:`flex flex-1 items-center justify-center`,children:X(`div`,{className:`border-wx-border border-t-wx-primary h-5 w-5 animate-spin rounded-full border-2`})})}function tw(){return X(Pn,{reducedMotion:`user`,children:X(wc,{children:X(nw,{})})})}function nw(){let e=i(`header`),t=i(`launcher`),r=i(`home`),a=i(`transcript`),s=i(`notification`),c=J({newMessage:``,image:``,video:``,voiceMessage:``,attachment:``});c.current={newMessage:s(`newMessage`),image:s(`image`),video:s(`video`),voiceMessage:s(`voiceMessage`),attachment:s(`attachment`)};let l=T(),d=n(),f=Te(),p=I();Rr();let m=Ce(),h=Ct(),{config:g,isLoading:v,error:y}=h,{unavailable:b,evicted:x}=go(p),S=b||y!==null||!v&&g.status!==`active`,C=S?`demo`:h.mode,w=S?!0:h.isDummy,E=w||h.sessionDemo,D=S&&(!b||x);K(()=>{D&&f.onHidden?.()},[D,f]);let k=!S&&!v;K(()=>{k&&f.onActive?.()},[k,f]);let A=g.theme?.launcherPosition===`LEFT_BOTTOM`,j=f.embedded??!1,{muted:M,toggleMuted:N,playInbound:P,playOutbound:ee}=sa(g.sounds),{identity:te,prefill:F}=Wa(f),[re,ie]=Y(null),[ae,oe]=Y(0),[ce,le]=Y(0),ue=J(()=>{});K(()=>{if(typeof window>`u`)return;let e=e=>{gt(e,f.kind)&&(!e.data||e.data.type!==`wexio:shutdown:v1`||(Ha(p),uf(p.drafts),ue.current(),ie(null),_e(null),le(e=>e+1),oe(e=>e+1)))};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[f.kind,p]);let de=!!g.botProtection?.turnstile?.enabled,fe=g.botProtection?.turnstile?.siteKey??null,pe=de&&fe?fe:null;K(()=>{},[de,fe]);let{getToken:me}=va({siteKey:pe,position:A?`left`:`right`}),L=Ua({enabled:!v&&C===`production`&&!w,identity:te??re,epoch:ae,getTurnstileToken:me}),[he,_e]=Y(null),R=he??L,ve=wi({publicKey:p.publicKey,token:R.token,locale:d,anonymous:!!R.token&&!R.verified,visitorKey:R.token?`${R.peopleId??``}:${R.verified}`:null,enabled:C===`production`&&!w&&!!p.publicKey&&(g.contentVersion??0)>=1}),ye=fr({verified:R.verified,sessionVisitors:ve.visitors,override:f.audienceOverride?.visitors}),[be,we]=Y(()=>typeof navigator>`u`?!0:navigator.onLine);K(()=>{if(typeof window>`u`)return;let e=()=>we(!0),t=()=>we(!1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]);let Ee=J(be);K(()=>{let e=Ee.current;Ee.current=be,!e&&be&&R.error&&oe(e=>e+1)},[be,R.error]);let Oe=R.error===Oa,ke=!!R.error&&!Oe&&C===`production`&&!w&&be;K(()=>{if(R.error!==`network_unreachable`)return;let e=setTimeout(()=>oe(e=>e+1),6e3);return()=>clearTimeout(e)},[R.error]);let je=J(!1);(R.token||R.error)&&(je.current=!0);let Me=!je.current,Pe=(v||R.isAuthenticating||Me)&&C===`production`&&!w,Fe=G(()=>oe(e=>e+1),[]),{open:Ie,show:Le,dismiss:ze,retry:Be}=pC({hasError:ke,hasSession:!!R.token,onRetry:Fe}),Ve=J(!1),Ue=J(!1),We=ke||Pe||v;Ve.current=We,Ue.current=ke;let[z,qe]=Y((f.open??f.defaultOpen??!1)&&!Ve.current),Ye=G(()=>{if(Ue.current){Le();return}Ve.current||qe(!0)},[Le]),Ze=hC(We,Ye,ke,p.pendingOpen),Qe=Ze.request,$e=G(()=>Ue.current?Ye():Qe(),[Ye,Qe]),et=Ze.cancel,tt=G(()=>{et(),qe(!1)},[et]),at=G(()=>{qe(e=>e?!1:Ue.current?(Le(),!1):!Ve.current)},[Le]),ot=so({enabled:!!g.features.profile&&(E||!!R.token),isDummy:E});K(()=>{if(typeof window>`u`)return;let e=window;e.__wexioNotifyDebug=()=>{let e={prefEnabled:ot.desktopNotifications,permission:typeof Notification<`u`?Notification.permission:`(unsupported)`,prefsLoaded:ot.loaded,featureEnabled:!!g.features.profile,sessionToken:!!R.token};return console.log(`[wexio] notify state:`,e),e},e.__wexioTestNotify=()=>{if(typeof Notification>`u`)return console.warn(`[wexio] Notification API not available in this context`),`unsupported`;if(Notification.permission!==`granted`)return console.warn(`[wexio] permission not granted:`,Notification.permission),Notification.permission;try{let e=new Notification(`Wexio test`,{body:`If you can see this, notifications work.`,tag:`wexio-test`});return e.onshow=()=>console.log(`[wexio] test notification: onshow fired`),e.onerror=e=>console.warn(`[wexio] test notification: onerror`,e),e.onclose=()=>console.log(`[wexio] test notification: onclose`),console.log(`[wexio] test notification posted to browser`),`posted`}catch(e){return console.warn(`[wexio] test notification threw:`,e),e}}},[ot.desktopNotifications,ot.loaded,g.features.profile,R.token]);let ct=da(RS(g.themeMode),{preference:ot.themeMode,allowed:ot.themeModeEditable}),lt=zS(g.organizationLogo,ct),ft=f.configOverride?.organizationLogo!==void 0,pt=lt??(w&&!ft?O(`/logo-${ct}.png`):null),ht=G(()=>xC(g.defaultTab,g.features),[g.defaultTab,g.features]),[B,V]=Y(ht);SC(B,V,{defaultTab:g.defaultTab,features:g.features,loading:v});let H=G(e=>V(t=>Ro(e,t)),[]);gC(f.open,$e,tt),mC(f.open,f.defaultOpen,$e);let _t=bC(f.kind,$e,tt),vt=f.previewTab??_t;K(()=>{vt&&(V(nC(vt,g.features)),$e())},[vt?rC(vt):null]);let[yt,xt]=Y(()=>JC(p.storage));K(()=>{try{p.storage.setItem(WC,yt?`1`:`0`)}catch{}},[yt,p.storage]);let[St,Tt]=Y(null),Et=US(B),Dt=q(()=>e=>Tt(t=>Yn(t,Et,e)),[Et]),Ot=Xn(St,Et),[At,jt]=Y(!1);K(()=>{z&&jt(!0)},[z]),jC({isOpen:z,enabled:f.kind!==`iframe`||C===`production`,onOpen:f.onOpen,onClose:f.onClose});let Mt=Fi({enabled:C===`production`&&!w&&!!g.features.news,locale:d}),Nt=rt(),Pt=J(null),[Ft,It]=Y([]),[Lt,zt]=Y(_o),[Bt,Vt]=Y(null),Ut=J(!1),[Wt,Gt]=Y(null),[Kt,qt]=Y(null),Jt=J(null),U=B.kind===`messages-thread`&&B.threadKey?B.threadKey:null,Yt=B.kind===`messages-thread`&&B.threadKey&&B.chatId?B.chatId:null,Zt=U??`main`,Qt=B.kind===`messages-thread`?B.chatId??null:null;K(()=>{It([]),zt(_o),Ut.current=!1},[Zt,ae]);let $t=z&&(B.kind===`messages`||B.kind===`messages-thread`),en=wt({skip:E||!R.token,fetchPolicy:`cache-and-network`}),[tn,nn]=Y({}),an=pa({enabled:!E&&!!R.token,refetch:async()=>{let e=await en.refetch();if(e?.error)throw e.error},onSettled:e=>nn(t=>rs(t,e))}),on=G(()=>{an()},[an]),[sn,cn]=Y({}),[ln,un]=Y(()=>new Set),[W,dn]=Y(0),[fn,pn]=Y(null),hn=J({}),gn=J(!1),_n=J({});K(()=>{let e=_n.current;return()=>{for(let t of Object.values(e))clearTimeout(t)}},[]),RC(ce,()=>{nn({}),un(new Set),pn(null),Vt(null),V(ht()),hn.current={},gn.current=!1;for(let[e,t]of Object.entries(_n.current))clearTimeout(t),delete _n.current[e]}),mo({token:R.token,visitorId:R.peopleId,enabled:!E&&C===`production`&&!!R.token,epoch:W,onReopen:on,onUpdate:e=>{let t=e.lastMessageFromVisitor===!1&&ci({text:e.lastMessagePreview,senderKind:e.lastMessageSenderKind??`bot`},Cn);nn(n=>({...n,[e.threadId]:ts(n[e.threadId],t?{...e,unReadCount:0}:e)})),e.blocked!=null&&e.blockScope===`CONTACT`&&Vt(e.blocked);let n=_n.current;n[e.threadId]&&(clearTimeout(n[e.threadId]),delete n[e.threadId]),e.typing?.active&&(n[e.threadId]=setTimeout(()=>{delete n[e.threadId],nn(t=>t[e.threadId]?{...t,[e.threadId]:{...t[e.threadId],typing:!1}}:t)},GC));let r=e.lastMessageFromVisitor===!1&&(e.lastMessageAt!=null||typeof e.lastMessagePreview==`string`&&e.lastMessagePreview.trim()!==``),i=e.lastMessageAt??e.lastMessagePreview??``;if(r&&!t&&AS(hn.current[e.threadId],i)&&(hn.current[e.threadId]=i,!(e.threadId===R.chatId||Yt&&e.threadId===Yt))){P();let t=ot.desktopNotifications,n=typeof Notification<`u`&&Notification.permission===`granted`;if(t&&n){let t=Fn.find(t=>t.chatId===e.threadId),n=QS(t,vn),r=ZS(e.lastMessagePreview??``,[],c.current),a=lt??void 0;try{let o=new Notification(n||c.current.newMessage,{body:r,tag:i||e.threadId,icon:a});o.onclick=()=>{try{window.focus()}catch{}Ye(),H({kind:`messages-thread`,chatId:e.threadId,threadKey:t?.threadKey??null}),o.close()}}catch(e){console.warn(`[wexio] topic-thread notification failed:`,e)}}}},onAdd:e=>{e.chatId&&(e.chatId===R.chatId||tn[e.chatId]||Fn.some(t=>t.chatId===e.chatId)||(on(),!e.threadKey&&B.kind===`messages-thread`&&!B.chatId&&!B.threadKey&&(V(t=>t.kind===`messages-thread`&&!t.chatId?{...t,chatId:e.chatId}:t),pn(e.chatId))))}}),K(()=>{if(!gn.current&&!(E||!en.data)){gn.current=!0;for(let e of Xo(en.data,Xe))hn.current[e.chatId]=e.preview?.at??e.updatedAt??``}},[E,en.data]);let vn=se(g.messenger?.aiAssistant)??`AI Agent`,[bn,xn]=Y(()=>QC(p.publicKey,p.storage)),Sn=G(()=>{xn(!0);try{p.storage.setItem(ZC(p.publicKey),`1`)}catch{}},[p]),Cn=ve.slots?.messageSlots??g.messenger?.messageSlots,wn=ne(dt(ve.capabilities,g.capabilities),`variantThreads`),Tn=q(()=>ve.slots?new Set(ve.slots.messageSlots.map(e=>e.id)):null,[ve.slots]),En=fi({enabled:!E,storage:p.storage,publicKey:p.publicKey,injected:h.injectedSlotIds,sessionIds:Tn,variantThreads:wn}),Dn=!!g.features.messenger&&!!Cn?.some(e=>e.kind===`MESSAGE`),On=Dn?null:g.messenger?.messages?.find(e=>e.kind===`MESSAGE`)?.text??g.messenger?.messages?.find(e=>e.kind===`SYSTEM`||e.kind===`HINT`)?.text??null,kn=J(new Date().toISOString()),An=!E&&!en.loading&&en.data!==void 0,jn=(en.data?.visitorThreads?.threads?.length??0)===0,[Mn,Nn]=Y(!1);K(()=>{if(E||!On||!An||!jn){Nn(!1);return}let e=setTimeout(()=>Nn(!0),1500);return()=>clearTimeout(e)},[E,On,An,jn]);let Pn=LC({publicKey:p.publicKey,storage:p.storage}),Fn=q(()=>{if(E){let e=ge(l,vn).map(e=>ln.has(e.chatId)?{...e,unreadCount:0}:e);return Dn?Mc(e,sn,vn):e}let e=Xo(en.data,vn);if(e.length===0&&On&&Mn)return[{chatId:``,threadKey:null,status:`OPEN`,unreadCount:+!bn,updatedAt:kn.current,preview:{text:On,at:kn.current,fromVisitor:!1},senderName:vn,lastSenderKind:`ai`}];let t=e.map(e=>Ur(is(e,tn[e.chatId]),Pn.marks)),n=e=>Date.parse(e.preview?.at??e.updatedAt)||0;return t.sort((e,t)=>n(t)-n(e))},[E,en.data,tn,vn,l,ln,sn,Dn,On,Mn,bn,Pn.marks]),In=B.kind===`messages-thread`?B.chatId??(B.threadKey?null:R.chatId):null,Ln=In?Fn.find(e=>e.chatId===In)?.status??null:null,Rn=VC({publicKey:p.publicKey,storage:p.storage,live:Bt,threads:en.data?.visitorThreads?.visitorBlocked??null,sessionContent:ve.blocked??null,handshake:R.blocked===!0}),zn=Rn||(In?Fn.find(e=>e.chatId===In)?.blocked??!1:!1),Bn=!E&&en.loading&&!en.data,Vn=Qt?Fn.find(e=>e.chatId===Qt)?.unreadCount??tn[Qt]?.unreadCount??0:0,Hn=J(Fn);Hn.current=Fn;let Gn=Pn.markRead,Kn=G(()=>{let e=Qt;e&&(Gn(e,Hn.current.find(t=>t.chatId===e)?.preview?.at),nn(t=>t[e]?.unreadCount===0?t:{...t,[e]:{...t[e]??{},unreadCount:0,contentAt:Date.now()}}))},[Qt,Gn]);K(()=>{if(!E||!Qt)return;let e=Qt;un(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})},[E,Qt]);let Jn=NS(Fn),[er,tr]=Y(null),Q=(Dn&&E&&f.launcherMessagePreview===`visible`?[]:Fn).find(e=>e.unreadCount>0&&e.preview&&!e.preview.fromVisitor),nr=Q?.preview?`${Q.chatId}:${Q.preview.at}`:null,ir=Q?.preview&&nr&&nr!==er?{id:nr,text:Q.preview.media?Q.preview.mediaThumbUrl?Q.preview.text||null:`${Wo(Q.preview.mediaType)} ${Q.preview.text||r(`recentMessageAttachment`)}`:Q.preview.text,thumbUrl:Q.preview.mediaThumbUrl??null,sender:{kind:Q.lastSenderKind===`operator`?`operator`:`ai`,name:Q.lastSenderKind===`operator`&&Q.lastSenderName?Q.lastSenderName:Q.assignedOperatorName??Q.senderName,...Q.senderAvatar?{avatar:Q.senderAvatar}:{}},buttons:Q.preview.buttons??[]}:null,ar=xi(ve.visitors),or=q(()=>Se(),[]),$=el({slots:Cn??XC,ctx:ar,publicKey:p.publicKey,storage:E?or:p.storage,ready:Dn&&(E||ve.settled&&An),isOpen:z,suppressed:ir!==null,previewVisible:f.launcherMessagePreview===`visible`,blocked:Rn}),sr=Jn+ +!!$.unread,cr=q(()=>$.shown?Fc($.shown,vn):null,[$.shown,vn]),lr=ir===null&&cr!==null,ur=ua(Rn?null:ir??cr),pr=nr,hr=J(!1),gr=G(()=>{if(!hr.current)return{kind:`messages-thread`,pendingLatest:!0};let e=Fn.length===1&&Fn[0].chatId===``;return Fn.length===0||e?{kind:`messages-thread`,threadKey:null}:{kind:`messages`}},[Fn]);K(()=>{if(B.kind!==`messages-thread`||!B.pendingLatest||!$t||Bn)return;hr.current=!0;let e=Fn[0];V(e?{kind:`messages-thread`,chatId:e.chatId||void 0,threadKey:e.threadKey}:Dn?{kind:`messages`}:{kind:`messages-thread`,threadKey:null})},[B,Fn,Bn,$t,Dn]);let _r=q(()=>Dn?Nc($.top,En.keyFor,vn):null,[Dn,$.top,En.keyFor,vn]);K(()=>{bn||!On||z&&B.kind===`messages-thread`&&!B.threadKey&&Sn()},[z,B,On,bn,Sn]);let br=()=>{if(ee(),!E||!Dn||B.kind!==`messages-thread`)return;let e=xe(B.threadKey);if(!e||sn[e])return;let t=Cn?.find(t=>t.kind===`MESSAGE`&&t.id===e),n=t?ri(t.variants,ar):null;n&&cn(t=>({...t,[e]:{title:n.text,at:new Date().toISOString()}}))},xr=G(()=>{hr.current=!0},[]),Sr=J(null),Cr=J(null);Cr.current=$.top?wn?`${$.top.slotId}:${$.top.variant.id}`:$.top.slotId:null,K(()=>{YS(B)&&(Sr.current={route:B,topSlotId:Cr.current})},[B]);let wr=G(()=>XS(Sr.current,Cr.current),[]),Tr=Rc({resumeRoute:wr,message:$,slotLauncher:Dn,launcherToMessages:Uo(g.defaultTab,g.features)===`messages`,threads:Fn,threadsLoading:$t&&Bn,isOpen:z,setRoute:V,markResumed:xr,openPanel:Ye,togglePanel:at,setPendingReply:qt,keyFor:En.keyFor}),Er=bt({variables:{chatId:Qt??``},skip:E||!Qt||!R.token||!z,fetchPolicy:`network-only`});K(()=>{if(Ut.current)return;let e=Er.data?.visitorChatAssignment;e&&(e.assignedStatus===`connected`?zt({status:`connected`,...e.operator?{operator:{name:e.operator.name,...e.operator.avatar?{avatar:e.operator.avatar}:{}}}:{}}):e.assignedStatus===`pending`?zt({status:`pending`,...e.estimate?{estimate:e.estimate}:{}}):zt(_o))},[Er.data]),K(()=>{g.features.profile&&(!R.peopleId||!R.token||(Nt.cache.evict({id:`ROOT_QUERY`,fieldName:`visitorProfile`}),Nt.cache.gc()))},[R.peopleId]);let Dr=G(e=>{It(t=>t.some(t=>t.id===e.id)?t:[...t,e])},[]),Or=G(e=>{It(t=>JS(t,e))},[]),kr=G((e,t)=>{It(n=>n.map(n=>n.id===e?{...t,clientKey:t.clientKey??n.clientKey??e}:n))},[]),Ar=G(e=>{It(t=>t.filter(t=>(t.clientKey??t.id)!==e))},[]),jr=J(e=>(Pt.current=e,()=>{Pt.current===e&&(Pt.current=null)})).current;ho({chatId:R.chatId||fn,token:R.token,visitorId:R.peopleId,enabled:!E&&C===`production`,onMessage:e=>{if(U||Pt.current?.(e),e.kind===`read-receipt`||e.kind===`typing`)return;if(e.kind===`assignment`){if(!U){let t=vo(e);t&&(zt(t),Ut.current=!0);let n=bo(e);n&&Dr(n)}return}if(e.kind===`status`)return;if(e.kind===`blocked`){e.blockScope===`CONTACT`&&typeof e.blocked==`boolean`&&Vt(e.blocked);return}let t=(e.from??e.sender)?.kind;if(t===`visitor`)return;let n=sC(e,vn);if(!n)return;if(e.update){U||Or(n);return}if(ci({text:n.text,senderKind:t},Cn)){U||Dr(n);return}P();let r=e.from??e.sender,i=t===`ai`||t===`bot`?vn:r?.name??``,a=e.media,o=Wn(a),s=a&&typeof a==`object`&&!Array.isArray(a)?a.caption:void 0;U||Dr(n),Jt.current={chatId:R.chatId??null,threadKey:null};let l=typeof document<`u`&&!document.hidden,u=z&&l&&B.kind===`messages-thread`,d=ot.desktopNotifications,f=typeof Notification<`u`?Notification.permission:`(unsupported)`,p=f===`granted`,m=d&&p&&!u;if(console.log(`[wexio] inbound:`,{id:e.externalMessageId,kind:e.kind,from:i,prefEnabled:d,permission:f,isOpen:z,docVisible:l,route:B.kind,activelyReadingMessages:u,willNotify:m}),d&&p&&!u)try{let t=typeof s==`string`?s:``,n=ZS(e.text||t,o,c.current),a=r?.avatar??lt??void 0,l=new Notification(i||c.current.newMessage,{body:n,tag:e.externalMessageId,icon:a});l.onclick=()=>{try{window.focus()}catch{}Ye(),V({kind:`messages`}),l.close()}}catch(e){console.warn(`[wexio] desktop notification failed:`,e)}else d&&!p&&console.warn(`[wexio] desktop notifications enabled but browser permission is not granted; current value:`,f);if(R.chatId){let t=e.media,n=t&&typeof t==`object`&&!Array.isArray(t)?t.caption:void 0;Nt.writeQuery({query:Je,variables:{chatId:R.chatId},data:{__typename:`Query`,visitorChatRecentInbound:{__typename:`VisitorChatRecentInbound`,id:e.externalMessageId,text:e.text??null,caption:typeof n==`string`?n:null,createdAt:e.sentAt??new Date().toISOString(),sender:{__typename:`VisitorUnreadSender`,kind:r?.kind??`operator`,name:r?.name??``,avatar:r?.avatar??null}}}})}}}),ho({chatId:Yt,token:R.token,visitorId:R.peopleId,enabled:!E&&C===`production`&&!!Yt,onMessage:e=>{if(Pt.current?.(e),e.kind===`typing`||e.kind===`read-receipt`)return;if(e.kind===`assignment`){let t=vo(e);t&&(zt(t),Ut.current=!0);let n=bo(e);n&&Dr(n);return}let t=sC(e,vn);if(t){if(e.update){Or(t);return}if(ci({text:t.text,senderKind:t.sender.kind},Cn)){Dr(t);return}P(),Dr(t),Jt.current={chatId:Yt,threadKey:U}}}});let[Mr]=Fo(),[Nr]=Ae(),Pr=rr(),[Lr]=dr(),[zr]=it(),[Br]=st(),[Vr]=Ge(),[Hr]=Ke(),[Wr]=nt(),Gr=J(new Map),Kr=G((e,t)=>!t||t.length===0?[]:t.map((t,n)=>{let r=t.s3Url??t.previewUrl;if(!r&&t.dataBase64){let i=`${e}:${n}`;r=Gr.current.get(i),r||(r=URL.createObjectURL(qn(t.dataBase64,t.mimetype)),Gr.current.set(i,r))}return{url:r??``,mimetype:t.mimetype,alt:t.filename,...t.previewWidth&&t.previewHeight?{width:t.previewWidth,height:t.previewHeight}:{}}}),[]),[Jr,Yr]=Y(null),Xr=p.outboxKey,Zr=!E&&C===`production`&&!!Xr,Qr=ra({publicKey:Xr,enabled:Zr,isolated:p.isolated,paused:m.paused,isPermanent:BS,onDropped:(e,t)=>{e.op===`sendMessage`&&Ar(e.clientKey);let n=fC({op:e,error:t});if(n){Qr.enqueue({op:`sendMessage`,semantics:`queue`,payload:n});return}let r=dC({op:e,error:t});if(r){let t=Cn?.find(e=>e.kind===`MESSAGE`&&e.id===r.slotId),n=e.payload.messageSlot;En.markLocal(r.slotId,t?.variants.find(e=>e.id===n?.variantId),!!ut(r.failedThreadKey)),Qr.enqueue({op:`sendMessage`,semantics:`queue`,payload:r.payload}),V(e=>e.kind===`messages-thread`&&e.threadKey===r.failedThreadKey?{kind:`messages-thread`,threadKey:r.payload.threadKey,keyAs:e.keyAs??r.failedThreadKey}:e)}iC(e.op)&&(aC(Nt),e.op===`setPreferences`&&oC(Nt),Yr({op:e.op,at:Date.now()}))},run:async(e,t)=>{if(e.op===`sendMessage`){let n=e.payload,r=n.media;if(r?.some(e=>!e.mediaId&&(e.dataBase64||e.giphyUrl))){let e=[];for(let t of r){if(t.mediaId){e.push(t);continue}if(t.giphyUrl){let n=await Pr(t.giphyUrl,t.gifKind??`IMAGE`);e.push({filename:t.filename,mimetype:n.mimetype||t.mimetype,mediaId:n.mediaId,s3Url:n.url??t.s3Url});continue}if(!t.dataBase64){e.push(t);continue}let n=(await Nr({variables:{input:{filename:t.filename,mimetype:t.mimetype,dataBase64:t.dataBase64}}})).data?.uploadVisitorMedia;if(!n?.mediaId)throw Error(`media upload failed`);e.push({filename:t.filename,mimetype:t.mimetype,mediaId:n.mediaId,s3Url:n.url??t.s3Url})}r=e,t.patch({...n,media:r})}let i=(r??[]).map(e=>e.mediaId).filter(e=>!!e),a=await Mr({variables:{input:{...n.text?{text:n.text}:{},...n.buttonValue===void 0?{}:{buttonValue:n.buttonValue},...i.length>0?{mediaIds:i}:{},...n.threadKey?{threadKey:n.threadKey}:{},...n.messageSlot?{messageSlot:n.messageSlot}:{},...n.page?{page:n.page}:{}}}});$C(a);let o=a.data?.sendVisitorMessage;if(!o)throw Error(`sendMessage: empty ack`);return{messageId:o.messageId,chatId:o.chatId}}if(e.op===`setPreferences`)return $C(await Lr({variables:{input:{preferences:e.payload}}})),{};if(e.op===`reaction`)return $C(await zr({variables:{input:e.payload}})),{};if(e.op===`setProfile`)return $C(await Lr({variables:{input:e.payload}})),{};if(e.op===`readAck`){let{chatId:t}=e.payload;return $C(await Br({variables:{chatId:t}})),{}}if(e.op===`trackPageView`)return await Vr({variables:{input:e.payload}}),{};if(e.op===`trackLinkClick`)return await Hr({variables:{input:e.payload}}),{};if(e.op===`trackButtonClick`)return await Wr({variables:{input:e.payload}}),{};throw Error(`outbox: no handler for op "${e.op}"`)},onSent:(e,t)=>{if(iC(e.op)&&ve.refresh(),e.op!==`sendMessage`)return;let n=e.payload,r=Kr(e.clientKey,n.media);t.messageId&&kr(e.clientKey,{id:t.messageId,clientKey:e.clientKey,direction:`INBOUND`,text:n.text,ageLabel:new Date().toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`}),sender:{kind:`visitor`,name:``},...r.length>0?{media:r}:{},deliveryStatus:`DELIVERED`}),t.chatId&&n.chatId==null&&(V(e=>e.kind===`messages-thread`&&!e.chatId&&e.threadKey===n.threadKey?{...e,chatId:t.chatId}:e),on(),dn(e=>e+1))}}),$r=G(e=>{let t=e.page??ko(f.kind);Qr.enqueue({op:`sendMessage`,semantics:`queue`,payload:t?{...e,page:t}:e})},[Qr.enqueue,f.kind]);ue.current=Qr.clear;let ei=q(()=>({enqueue:Qr.enqueue,online:be,dropped:Jr}),[Qr.enqueue,be,Jr]);K(()=>{It(e=>qS(e,Qr.ops,Zt,Kr))},[Qr.ops,Kr,Zt]),K(()=>{let e=new Set(Qr.ops.map(e=>e.clientKey)),t=Gr.current;for(let[n,r]of t)e.has(n.split(`:`)[0])||(URL.revokeObjectURL(r),t.delete(n))},[Qr.ops]);let ti=J(null);K(()=>{if(E||C!==`production`||!be||!z||!R.token)return;let e=p.publicKey;if(!e||ti.current===d)return;ti.current=d;let t=async(e,t)=>{try{let n=await Nt.query({...t,fetchPolicy:`network-only`});n.data&&He(e,n.data)}catch{}};g.features.news&&t(_.news(e,d),{query:Xt,variables:{args:{locale:d,limit:10,offset:0}}}),g.features.help&&(t(_.helpCategories(e,d),{query:Ht,variables:{parentId:null,locale:d}}),t(_.helpRoot(e,d),{query:Rt,variables:{args:{folderId:null,locale:d,recursive:!1,limit:20}}}))},[z,be,R.token,d,E,C,Nt]);let ni=J(!1);K(()=>{ni.current||w||!be||!z||(ni.current=!0,import(`./widget-react-BflWAq27.js`),import(`./widget-react-Yd3uIKgg.js`))},[be,z,w]);let[ii]=Re(),oi=G(()=>{if(!R.chatId)return;let e=Lt;zt(_o),ii({variables:{chatId:R.chatId}}).catch(()=>{zt(e)})},[ii,R.chatId,Lt]),[si,li]=Y(!1),ui=G(async e=>{if(!(!e||si)){li(!0);try{let t=await Nt.query({query:Ne,variables:{chatId:e},fetchPolicy:`network-only`});$C(t);let n=t.data?.visitorChatTranscript,r=se(g.messenger?.aiAssistant)??`Gaia`,i=Un({visitorChatHistory:n},d,r).slice().reverse(),o=!!n&&typeof n==`object`&&n.truncated===!0,s=g.messenger?.title?.trim()||`Gaia`,c=Mi(i,{orgName:s,visitorLabel:te?.email?.trim()||te?.name?.trim()||a(`you`),aiName:r,locale:d,truncated:o,t:a}),l=$n(s,`conversation`),u=new Date,f=e=>String(e).padStart(2,`0`);Qn(`${l}-${e}-${`${u.getFullYear()}_${f(u.getMonth()+1)}_${f(u.getDate())}_${f(u.getHours())}${f(u.getMinutes())}${f(u.getSeconds())}${String(u.getMilliseconds()).padStart(3,`0`)}`}.txt`,c)||window.open(`data:text/plain;charset=utf-8,${encodeURIComponent(c)}`,`_blank`,`noopener,noreferrer`)}catch(e){console.warn(`[wexio] transcript download failed:`,e)}finally{li(!1)}}},[si,Nt,d,g.messenger?.title,g.messenger?.aiAssistant,te,a]),pi=G(()=>{let e=typeof crypto<`u`&&`randomUUID`in crypto?crypto.randomUUID():`thread-${Date.now()}`;H(Tr.newConversationRoute(e))},[H,Tr]),mi=(B.kind===`messages-thread`||B.kind===`help-article`||B.kind===`news-article`)&&yt,hi=mi?640:420,gi=mi?860:670,[_i,vi]=Y(null);K(()=>{if(typeof window>`u`)return;let e=()=>{let e=window.innerWidth,t=window.innerHeight;vi(n=>n&&n.w===e&&n.h===t?n:{w:e,h:t})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let yi=f.kind===`iframe`,bi=j||yi||!_i?hi:Math.min(hi,_i.w-KC),Si=j||yi||!_i?gi:Math.min(gi,_i.h-qC),Ci=di(),Ti=q(()=>LS(j?null:yi?Ci:_i?.w??null)?()=>xt(e=>!e):void 0,[j,yi,Ci,_i?.w]),Ei=J(HS(B)),Di=(()=>{let e=HS(B),t=Ei.current;return Ei.current=e,e===t?0:e>t?1:-1})(),Oi=J(f.onResize);Oi.current=f.onResize;let ki=f.kind===`iframe`,Ai=J(!1),ji=J($S());K(()=>{if(z){if(Ai.current=!0,ki)return ji.current.report(Fr(hi,gi,{marginX:KC,marginY:qC}),(e,t)=>Oi.current(e,t,!0));Oi.current(hi,gi,!0);return}if(ji.current.forget(),!ki){Oi.current(88,88,!1);return}let e=0,t=0,n=Ai.current,r=()=>{if(typeof window>`u`||n)return;let r=Zn(yr(),{width:window.innerWidth,height:window.innerHeight},32,A?`left`:`right`);!r||r.width===e&&r.height===t||(e=r.width,t=r.height,Oi.current(r.width,r.height,!1))},i=0,a=0,o=()=>{r(),i=performance.now()<a?requestAnimationFrame(o):0},s=()=>{a=performance.now()+600,i||(i=requestAnimationFrame(o))},c=n?Ir(()=>Ii.current,()=>{n=!1,Ai.current=!1,s()}):null;n||s();let l=typeof ResizeObserver<`u`?new ResizeObserver(s):null;if(l)for(let e of mr){let t=vr(e);t&&l.observe(t)}return window.addEventListener(`resize`,s),()=>{c?.(),i&&cancelAnimationFrame(i),l?.disconnect(),window.removeEventListener(`resize`,s)}},[ki,z,hi,gi,ur,sr,Mt.hasUnread,ke&&Ie,A]);let Ni=J(f.onLauncherPosition);Ni.current=f.onLauncherPosition,K(()=>{Ni.current?.(A?`left`:`right`)},[A]),DC(f,g.theme?.launcherOffset);let Pi=()=>qe(!1);AC(d,f.themeRoot);let Ii=J(null);IC({isOpen:z,panelRef:Ii,onEscape:Pi,scopeToWidget:f.kind!==`iframe`});let Li=async(e,t)=>{if(lr){Tr.onBubbleReply(t);return}let n=Jt.current??(Q?{chatId:Q.chatId||null,threadKey:Q.threadKey}:null);if(E)Gt(t),tr(nr);else if(R.chatId){let r=`tmp-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;Dr(tC(r,t));try{let i=(await Mr({variables:{input:eC(t,e,n?.threadKey??null)}})).data?.sendVisitorMessage?.messageId;i&&kr(r,{...tC(r,t),id:i,deliveryStatus:`DELIVERED`})}catch{}}n?.chatId?(hr.current=!0,V({kind:`messages-thread`,chatId:n.chatId,threadKey:n.threadKey})):V({kind:`messages`}),Ye(),ee()},Ri=()=>{if(lr){Tr.onBubbleOpen();return}Q?(hr.current=!0,V({kind:`messages-thread`,chatId:Q.chatId||void 0,threadKey:Q.threadKey})):V({kind:`messages`}),Ye()},zi=!g.branding?.hidden,Bi=Ho(g.features),Vi=Io(B)&&Bi>1,Hi=B.kind===`home`,Ui=Bo(B);K(()=>{Ui===`news`&&Mt.markRead()},[Ui,Mt.markRead]);let Wi=e=>{yn(()=>{V(e===`messages`?wr()??(Dn?Tr.messagesEntryRoute():gr()):{kind:e})})},Gi=J(!1),Ki=E||C!==`production`||!!R.token||!!R.error;Ki&&(Gi.current=!0);let qi=Gi.current||Ki;if(S||v||!qi)return null;return Z(De,{value:Zr?ei:null,children:[X(ai,{value:ve,children:X(qr,{value:En,children:X(mt,{tracking:g.tracking,enabled:C===`production`&&!w,token:R.token,children:Z(o.div,{"aria-hidden":!z,inert:!z,initial:!1,animate:z?{opacity:1,y:0,scale:1,pointerEvents:`auto`,width:bi,height:Si}:{opacity:0,y:16,scale:.98,pointerEvents:`none`,width:bi,height:Si},transition:{opacity:{type:`spring`,stiffness:320,damping:30},y:{type:`spring`,stiffness:320,damping:30},scale:{type:`spring`,stiffness:320,damping:30},width:{type:`spring`,stiffness:300,damping:32},height:{type:`spring`,stiffness:300,damping:32}},"data-wx-panel":!0,role:`region`,"aria-label":t(`panel`),ref:Ii,tabIndex:-1,style:{marginBottom:`var(--wx-off-y,0px)`,...A?{marginLeft:`var(--wx-off-x,0px)`}:{marginRight:`var(--wx-off-x,0px)`},maxWidth:j?`calc(100% - 2rem - var(--wx-off-x,0px))`:`calc(100vw - 2rem - var(--wx-off-x,0px))`,maxHeight:j?`calc(100% - 7rem - var(--wx-off-y,0px))`:`calc(100dvh - 7rem - var(--wx-off-y,0px))`},className:u(`isolate flex flex-col overflow-hidden bg-wx-bg text-wx-fg outline-none`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-solid focus-visible:outline-wx-primary`,j?`absolute`:`fixed`,`bottom-24 z-2147483601 rounded-wx-xl`,A?`left-4`:`right-4`),children:[Hi&&X(GS,{glow:g.theme?.homeBackdropGlow!==!1}),Ji({route:B,onPop:()=>V(Lo(B,g.features)),onClose:Pi}),X(`main`,{className:`relative flex flex-1 flex-col overflow-hidden`,children:At&&X(kt,{mode:`sync`,initial:!1,custom:Di,children:Z(uC,{custom:Di,variants:WS,initial:`enter`,animate:`center`,exit:`exit`,transition:{x:{type:`tween`,duration:.18,ease:[.32,.72,0,1]},opacity:{duration:.14,ease:`easeOut`}},style:{willChange:`transform, opacity`},className:`absolute inset-0 flex flex-col overflow-hidden`,children:[B.kind===`home`&&X(ed,{config:g,organizationLogoUrl:lt,onClose:Pi,onOpenTab:e=>V({kind:e}),onOpenThread:()=>H({kind:`messages-thread`,chatId:R.chatId??void 0,threadKey:null}),onOpenNewsArticle:e=>H({kind:`news-article`,id:e}),onOpenHelpArticle:e=>H({kind:`help-article`,slug:e,from:`search`}),isDummy:w,chatId:R.chatId??null}),B.kind===`messages`&&X(th,{threads:Fn,loading:Bn,loadError:!E&&!!en.error&&Fn.length===0,onRetry:on,avatarUrl:pt??void 0,onOpenThread:e=>{H({kind:`messages-thread`,chatId:e.chatId||void 0,threadKey:e.threadKey})},onNewQuestion:pi,blocked:Rn,slotThread:_r}),B.kind===`messages-thread`&&B.pendingLatest&&X(eh,{}),B.kind===`messages-thread`&&!B.pendingLatest&&X($m,{isDummy:E,chatId:B.chatId??(B.threadKey?null:R.chatId),threadKey:B.threadKey,welcomeSlotId:B.welcomeSlotId,catchUpHistory:!!fn&&B.chatId===fn,onChatIdResolved:e=>{V(t=>t.kind===`messages-thread`&&!t.chatId?{...t,chatId:e}:t),pn(e),on(),dn(e=>e+1)},token:R.token,prechatForm:g.prechatForm,messenger:g.messenger,organizationLogoUrl:lt,organizationName:g.messenger?.title??``,operatorAvatars:g.operatorAvatars,isOpen:z,onInbound:P,onOutbound:br,registerRealtimeHandler:jr,unreadCount:Vn,clearUnread:Kn,liveMessages:Ft,appendLiveMessage:Dr,replaceLiveMessage:kr,enqueueSend:Zr?$r:void 0,onRetryOutbox:Qr.retry,assignmentStatus:Lt.status,assignmentEstimate:Lt.estimate,threadStatus:Ln,blocked:zn,globalBlocked:Rn,onStartNewConversation:pi,initialVisitorMessage:E?Wt:Kt&&Kt.threadKey===B.threadKey?Kt.text:null,onInitialVisitorMessageSent:()=>{Gt(null),qt(null)},visitorIdentity:te,visitorPrefill:F,security:g.security,verified:R.verified,identified:ye,sessionName:ye?R.displayName:null,onGoogleCredential:e=>ie({googleIdToken:e}),onPasskeySession:e=>{Fa(e,p.publicKey,p.storage),_e({token:e.token,chatId:e.chatId,peopleId:e.peopleId,displayName:e.displayName,isAuthenticating:!1,error:null,verified:!0,blocked:!1})},onInternalLink:e=>{e.kind===`help-article`?H({kind:`help-article`,slug:e.slug,from:`search`,locale:e.locale}):e.kind===`news-article`&&V({kind:`news`})},getTurnstileToken:me},ae),B.kind===`help`&&X(_l,{isDummy:w,onOpenCategory:(e,t)=>H({kind:`help-category`,categoryId:e,categoryName:t?.name,categoryDescription:t?.description,categoryArticleCount:t?.articleCount}),onOpenArticle:e=>H({kind:`help-article`,slug:e,from:`search`})}),B.kind===`help-category`&&X(kc,{categoryId:B.categoryId,categoryName:B.categoryName,categoryDescription:B.categoryDescription,categoryArticleCount:B.categoryArticleCount,isDummy:w,onOpenCategory:(e,t)=>H({kind:`help-category`,categoryId:e,categoryName:t?.name,categoryDescription:t?.description,categoryArticleCount:t?.articleCount}),onOpenArticle:e=>H({kind:`help-article`,slug:e,from:`category`,fromCategoryId:B.categoryId})}),B.kind===`help-article`&&X(mn,{fallback:X(ew,{}),children:X(HC,{slug:B.slug,locale:B.locale??d,isDummy:w,onHandoff:()=>V({kind:`messages`}),onOpenArticle:e=>V(t=>zo({kind:`help-article`,slug:e,from:`search`},t)),onOpenTranslation:(e,t)=>V({kind:`help-article`,slug:e,locale:t,from:B.from,fromCategoryId:B.fromCategoryId,origin:B.origin}),onTitleResolved:Dt})}),B.kind===`news`&&X(rn,{isDummy:w,onOpenArticle:e=>H({kind:`news-article`,id:e})}),B.kind===`news-article`&&X(mn,{fallback:X(ew,{}),children:X(UC,{id:B.id,isDummy:w,onOpenRelated:e=>V(t=>zo({kind:`news-article`,id:e},t)),onTitleResolved:Dt})}),B.kind===`profile`&&X(wS,{isDummy:E,pending:!E&&C===`production`&&!R.token&&R.isAuthenticating},ce)]},US(B))})}),Vi&&X(pc,{active:Ui,features:g.features,onChange:Wi,unreadCount:Jn,newsUnread:Mt.hasUnread}),X(vc,{online:be,showBranding:zi})]})})})}),X(ml,{message:z?null:ur,onOpen:Ri,onDismiss:()=>lr?Tr.onBubbleDismiss():tr(pr),onSendButton:Li,position:A?`left`:`right`,embedded:j}),X(jS,{open:ke&&Ie,errorCode:R.error,onRetry:Be,onDismiss:ze,position:A?`left`:`right`,embedded:j}),X(kS,{isOpen:z,onToggle:Tr.onLauncherToggle,unreadCount:sr,newsUnread:Mt.hasUnread,logoUrl:g.showLogoInLauncher?lt:null,position:A?`left`:`right`,embedded:j,loading:Pe})]});function Ji({route:t,onPop:n,onClose:r}){if(t.kind===`messages`)return X(gl,{title:e(`messagesTitle`),onClose:r});if(t.kind===`messages-thread`){let i=g.messenger?.title?.trim()||`Gaia`,a=g.messenger?.description?.trim()||e(`conversationSubtitle`),o=t.chatId??(t.threadKey?null:R.chatId);return X(yc,{title:i,subtitle:a,organizationLogoUrl:pt,muted:M,onToggleMute:N,onBack:n,onClose:r,expanded:mi,onToggleExpand:Ti,showResolve:Lt.status===`connected`,onResolve:oi,onDownloadTranscript:!E&&o?()=>ui(o):void 0,downloadingTranscript:si})}return t.kind===`help`?X(gl,{title:e(`helpTitle`),onClose:r}):t.kind===`help-category`?X(gl,{title:e(`helpTitle`),onBack:n,onClose:r}):t.kind===`help-article`?X(gl,{title:Ot??e(`helpTitle`),onBack:n,onClose:r,expanded:mi,onToggleExpand:Ti}):t.kind===`news`?X(gl,{title:e(`newsTitle`),onClose:r}):t.kind===`news-article`?X(gl,{title:Ot??e(`newsTitle`),onBack:n,onClose:r,expanded:mi,onToggleExpand:Ti}):null}}var rw=Object.freeze({}),iw=e=>({...e,demo:rw}),aw={locale:`en`,messages:iw(un)},ow=aw,sw=new Map([[`en`,ow]]),cw=new Map;function lw(e){return sw.get(e)??null}function uw(e,t=ao,n=xr){let r=sw.get(e);if(r)return Promise.resolve(r);let i=cw.get(e);if(i)return i;let a=Or(()=>t(e),n,(e,t)=>kr(e,t).then(e=>e.default)).then(t=>{let n={locale:e,messages:iw(t)};return sw.set(e,n),cw.delete(e),n},t=>(cw.delete(e),console.warn(`[wexio] the "${e}" language chunk failed to load; showing English`,t),ow));return cw.set(e,a),a}function dw(e){let[t,n]=Y(()=>lw(e)??aw);return K(()=>{let t=!1;return uw(e).then(e=>{t||n(t=>t===e?t:e)}),()=>{t=!0}},[e]),t}var fw=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
176
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:var(--font-geist-sans);--font-mono:var(--font-geist-mono);--color-amber-300:#ffd236;--color-emerald-300:#5ee9b5;--color-sky-300:#77d4ff;--color-violet-300:#c4b4ff;--color-rose-300:#ffa2ae;--color-zinc-100:#f4f4f5;--color-zinc-500:#71717b;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-geist-sans);--default-mono-font-family:var(--font-geist-mono);--color-wx-bg:var(--wx-bg);--color-wx-bg-elevated:var(--wx-bg-elevated);--color-wx-bg-elevated-2:var(--wx-bg-elevated-2);--color-wx-fg:var(--wx-fg);--color-wx-fg-muted:var(--wx-fg-muted);--color-wx-fg-subtle:var(--wx-fg-subtle);--color-wx-border:var(--wx-border);--color-wx-border-strong:var(--wx-border-strong);--color-wx-primary:var(--wx-primary);--color-wx-primary-hover:var(--wx-primary-hover);--color-wx-primary-fg:var(--wx-primary-fg);--color-wx-launcher-bg:var(--wx-launcher-bg);--color-wx-launcher-fg:var(--wx-launcher-fg);--color-wx-success:var(--wx-success);--color-wx-danger:var(--wx-danger);--color-wx-warning:var(--wx-warning);--radius-wx-sm:var(--wx-radius-sm);--radius-wx:var(--wx-radius);--radius-wx-lg:var(--wx-radius-lg);--radius-wx-xl:var(--wx-radius-xl)}@supports (color:color(display-p3 0 0 0)){:root,:host{--color-amber-300:color(display-p3 .974327 .83063 .33298);--color-emerald-300:color(display-p3 .524941 .903425 .722352);--color-sky-300:color(display-p3 .546356 .822561 .990576);--color-violet-300:color(display-p3 .758872 .706261 .991729);--color-rose-300:color(display-p3 .96017 .647703 .683715);--color-zinc-100:color(display-p3 .956385 .956385 .959079);--color-zinc-500:color(display-p3 .442983 .442931 .480324)}}@supports (color:lab(0% 0 0)){:root,:host{--color-amber-300:lab(86.4156% 6.13147 78.3961);--color-emerald-300:lab(83.9203% -48.7124 13.8849);--color-sky-300:lab(80.3307% -20.2945 -31.385);--color-violet-300:lab(76.7419% 18.3911 -37.0706);--color-rose-300:lab(76.6339% 38.3549 9.68835);--color-zinc-100:lab(96.1634% .0993311 -.364041);--color-zinc-500:lab(47.8878% 1.65477 -5.77283)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host *,:host :before,:host :after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-1{inset:calc(var(--spacing) * -1)}.-inset-2{inset:calc(var(--spacing) * -2)}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-x-2{inset-inline:calc(var(--spacing) * 2)}.-top-1{top:calc(var(--spacing) * -1)}.-top-1\\.5{top:calc(var(--spacing) * -1.5)}.-top-8{top:calc(var(--spacing) * -8)}.top-0{top:calc(var(--spacing) * 0)}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:calc(var(--spacing) * 1)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-2\\.5{top:calc(var(--spacing) * 2.5)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-1\\.5{right:calc(var(--spacing) * -1.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-5{bottom:calc(var(--spacing) * 5)}.bottom-24{bottom:calc(var(--spacing) * 24)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-0\\.5{left:calc(var(--spacing) * .5)}.left-1{left:calc(var(--spacing) * 1)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-3{left:calc(var(--spacing) * 3)}.left-3\\.5{left:calc(var(--spacing) * 3.5)}.left-4{left:calc(var(--spacing) * 4)}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-10{z-index:calc(10 * -1)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-2147483599{z-index:2147483599}.z-2147483600{z-index:2147483600}.z-2147483601{z-index:2147483601}.z-2147483602{z-index:2147483602}.z-2147483647{z-index:2147483647}.z-\\[10000\\]{z-index:10000}.z-\\[2147483647\\]{z-index:2147483647}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.container\\!{width:100%!important}@media (min-width:40rem){.container\\!{max-width:40rem!important}}@media (min-width:48rem){.container\\!{max-width:48rem!important}}@media (min-width:64rem){.container\\!{max-width:64rem!important}}@media (min-width:80rem){.container\\!{max-width:80rem!important}}@media (min-width:96rem){.container\\!{max-width:96rem!important}}.-m-0{margin:calc(var(--spacing) * 0)}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.m-0{margin:calc(var(--spacing) * 0)}.m-1{margin:calc(var(--spacing) * 1)}.-mx-3{margin-inline:calc(var(--spacing) * -3)}.mx-0{margin-inline:calc(var(--spacing) * 0)}.mx-0\\.5{margin-inline:calc(var(--spacing) * .5)}.mx-auto{margin-inline-start:auto;margin-inline-end:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-4{margin-block:calc(var(--spacing) * 4)}.-mt-2{margin-top:calc(var(--spacing) * -2)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.-mb-4{margin-bottom:calc(var(--spacing) * -4)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.ml-0{margin-left:calc(var(--spacing) * 0)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-9{margin-left:calc(var(--spacing) * 9)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-10{-webkit-line-clamp:10;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\\!hidden{display:none!important}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.aspect-\\[16\\/10\\]{aspect-ratio:16/10}.aspect-square{aspect-ratio:1}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-full{width:100%;height:100%}.h-0{height:calc(var(--spacing) * 0)}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-13{height:calc(var(--spacing) * 13)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-96{height:calc(var(--spacing) * 96)}.h-105{height:calc(var(--spacing) * 105)}.h-\\[1\\.05em\\]{height:1.05em}.h-\\[2px\\]{height:2px}.h-\\[26px\\]{height:26px}.h-\\[90vh\\]{height:90vh}.h-\\[720px\\]{height:720px}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\\[20rem\\]{max-height:20rem}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[calc\\(100\\%-7rem\\)\\]{max-height:calc(100% - 7rem)}.max-h-\\[calc\\(100dvh-7rem\\)\\]{max-height:calc(100dvh - 7rem)}.max-h-full{max-height:100%}.max-h-none{max-height:none}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-12{min-height:calc(var(--spacing) * 12)}.w-0{width:calc(var(--spacing) * 0)}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-1\\/2{width:50%}.w-1\\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\\/3{width:66.6667%}.w-2\\/5{width:40%}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-3\\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-4\\/5{width:80%}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-7\\/12{width:58.3333%}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-9\\/12{width:75%}.w-10{width:calc(var(--spacing) * 10)}.w-10\\/12{width:83.3333%}.w-11{width:calc(var(--spacing) * 11)}.w-11\\/12{width:91.6667%}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-95{width:calc(var(--spacing) * 95)}.w-\\[0\\.5em\\]{width:.5em}.w-\\[90vw\\]{width:90vw}.w-\\[300px\\]{width:300px}.w-\\[420px\\]{width:420px}.w-auto{width:auto}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-\\[52vw\\]{max-width:52vw}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[90vw\\]{max-width:90vw}.max-w-\\[140px\\]{max-width:140px}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[calc\\(85\\%_-_2\\.25rem\\)\\]{max-width:calc(85% - 2.25rem)}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.max-w-\\[calc\\(100vw-2rem\\)\\]{max-width:calc(100vw - 2rem)}.max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-3{min-width:calc(var(--spacing) * 3)}.min-w-3\\.5{min-width:calc(var(--spacing) * 3.5)}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-32{min-width:calc(var(--spacing) * 32)}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-\\[2_2_0\\%\\]{flex:2 2}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.shrink-2{flex-shrink:2}.shrink-\\[0\\.01\\]{flex-shrink:.01}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:0 100%}.origin-left{transform-origin:0}.-translate-x-1{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\\[1px\\]{--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[0\\.15em\\]{--tw-translate-y:.15em;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-none{translate:none}.scale-x-0{--tw-scale-x:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-x-100{--tw-scale-x:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-3d{scale:var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-zoom-in{cursor:zoom-in}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.\\[scrollbar-color\\:var\\(--color-wx-fg-subtle\\)_transparent\\]{scrollbar-color:var(--color-wx-fg-subtle) transparent}.list-none{list-style-type:none}.columns-2{columns:2}.auto-rows-fr{grid-auto-rows:minmax(0,1fr)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.grid-rows-\\[minmax\\(0\\,1fr\\)\\]{grid-template-rows:minmax(0,1fr)}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.-space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -1) * calc(1 - var(--tw-space-x-reverse)))}:where(.-space-x-1\\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -1.5) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -1.5) * calc(1 - var(--tw-space-x-reverse)))}:where(.-space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -2) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-wx{border-radius:var(--wx-radius)}.rounded-wx-lg{border-radius:var(--wx-radius-lg)}.rounded-wx-sm{border-radius:var(--wx-radius-sm)}.rounded-wx-xl{border-radius:var(--wx-radius-xl)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-s:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-s:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-ss:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:.25rem}.rounded-ss:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:.25rem}.rounded-ss:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:.25rem}.rounded-ss:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:.25rem}.rounded-e:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-e:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-e:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-se:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:.25rem}.rounded-se:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:.25rem}.rounded-se:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:.25rem}.rounded-se:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:.25rem}.rounded-ee:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:.25rem}.rounded-ee:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:.25rem}.rounded-ee:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:.25rem}.rounded-ee:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:.25rem}.rounded-es:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:.25rem}.rounded-es:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:.25rem}.rounded-es:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:.25rem}.rounded-es:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-x{border-inline-style:var(--tw-border-style);border-left-width:1px;border-right-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-start-width:1px;border-block-end-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-bs{border-block-start-style:var(--tw-border-style);border-block-start-width:1px}.border-be{border-block-end-style:var(--tw-border-style);border-block-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-black{border-color:var(--color-black)}.border-black\\/15{border-color:#00000026}@supports (color:color-mix(in lab, red, red)){.border-black\\/15{border-color:color-mix(in oklab, var(--color-black) 15%, transparent)}}.border-white{border-color:var(--color-white)}.border-wx-bg{border-color:var(--wx-bg)}.border-wx-border,.border-wx-border\\/60{border-color:var(--wx-border)}@supports (color:color-mix(in lab, red, red)){.border-wx-border\\/60{border-color:color-mix(in oklab, var(--wx-border) 60%, transparent)}}.border-wx-border\\/70{border-color:var(--wx-border)}@supports (color:color-mix(in lab, red, red)){.border-wx-border\\/70{border-color:color-mix(in oklab, var(--wx-border) 70%, transparent)}}.border-wx-danger,.border-wx-danger\\/30{border-color:var(--wx-danger)}@supports (color:color-mix(in lab, red, red)){.border-wx-danger\\/30{border-color:color-mix(in oklab, var(--wx-danger) 30%, transparent)}}.border-wx-launcher-fg,.border-wx-launcher-fg\\/30{border-color:var(--wx-launcher-fg)}@supports (color:color-mix(in lab, red, red)){.border-wx-launcher-fg\\/30{border-color:color-mix(in oklab, var(--wx-launcher-fg) 30%, transparent)}}.border-wx-primary,.border-wx-primary\\/30{border-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.border-wx-primary\\/30{border-color:color-mix(in oklab, var(--wx-primary) 30%, transparent)}}.border-wx-success,.border-wx-success\\/30{border-color:var(--wx-success)}@supports (color:color-mix(in lab, red, red)){.border-wx-success\\/30{border-color:color-mix(in oklab, var(--wx-success) 30%, transparent)}}.border-wx-warning,.border-wx-warning\\/30{border-color:var(--wx-warning)}@supports (color:color-mix(in lab, red, red)){.border-wx-warning\\/30{border-color:color-mix(in oklab, var(--wx-warning) 30%, transparent)}}.border-t-transparent{border-top-color:#0000}.border-t-wx-launcher-fg{border-top-color:var(--wx-launcher-fg)}.border-t-wx-primary{border-top-color:var(--wx-primary)}.border-l-transparent{border-left-color:#0000}.bg-\\[\\#1a1a1f\\]{background-color:#1a1a1f}.bg-black{background-color:var(--color-black)}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\\/45{background-color:#00000073}@supports (color:color-mix(in lab, red, red)){.bg-black\\/45{background-color:color-mix(in oklab, var(--color-black) 45%, transparent)}}.bg-black\\/85{background-color:#000000d9}@supports (color:color-mix(in lab, red, red)){.bg-black\\/85{background-color:color-mix(in oklab, var(--color-black) 85%, transparent)}}.bg-current{background-color:currentColor}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.bg-white\\/10{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.bg-wx-bg{background-color:var(--wx-bg)}.bg-wx-bg-elevated{background-color:var(--wx-bg-elevated)}.bg-wx-bg-elevated-2{background-color:var(--wx-bg-elevated-2)}.bg-wx-bg-elevated\\/60{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.bg-wx-bg-elevated\\/60{background-color:color-mix(in oklab, var(--wx-bg-elevated) 60%, transparent)}}.bg-wx-bg-elevated\\/70{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.bg-wx-bg-elevated\\/70{background-color:color-mix(in oklab, var(--wx-bg-elevated) 70%, transparent)}}.bg-wx-bg\\/60{background-color:var(--wx-bg)}@supports (color:color-mix(in lab, red, red)){.bg-wx-bg\\/60{background-color:color-mix(in oklab, var(--wx-bg) 60%, transparent)}}.bg-wx-bg\\/95{background-color:var(--wx-bg)}@supports (color:color-mix(in lab, red, red)){.bg-wx-bg\\/95{background-color:color-mix(in oklab, var(--wx-bg) 95%, transparent)}}.bg-wx-border,.bg-wx-border\\/70{background-color:var(--wx-border)}@supports (color:color-mix(in lab, red, red)){.bg-wx-border\\/70{background-color:color-mix(in oklab, var(--wx-border) 70%, transparent)}}.bg-wx-danger,.bg-wx-danger\\/5{background-color:var(--wx-danger)}@supports (color:color-mix(in lab, red, red)){.bg-wx-danger\\/5{background-color:color-mix(in oklab, var(--wx-danger) 5%, transparent)}}.bg-wx-danger\\/10{background-color:var(--wx-danger)}@supports (color:color-mix(in lab, red, red)){.bg-wx-danger\\/10{background-color:color-mix(in oklab, var(--wx-danger) 10%, transparent)}}.bg-wx-danger\\/40{background-color:var(--wx-danger)}@supports (color:color-mix(in lab, red, red)){.bg-wx-danger\\/40{background-color:color-mix(in oklab, var(--wx-danger) 40%, transparent)}}.bg-wx-fg{background-color:var(--wx-fg)}.bg-wx-fg-muted,.bg-wx-fg-muted\\/40{background-color:var(--wx-fg-muted)}@supports (color:color-mix(in lab, red, red)){.bg-wx-fg-muted\\/40{background-color:color-mix(in oklab, var(--wx-fg-muted) 40%, transparent)}}.bg-wx-fg-subtle{background-color:var(--wx-fg-subtle)}.bg-wx-launcher-bg{background-color:var(--wx-launcher-bg)}.bg-wx-primary{background-color:var(--wx-primary)}.bg-wx-primary-fg,.bg-wx-primary-fg\\/10{background-color:var(--wx-primary-fg)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary-fg\\/10{background-color:color-mix(in oklab, var(--wx-primary-fg) 10%, transparent)}}.bg-wx-primary-fg\\/35{background-color:var(--wx-primary-fg)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary-fg\\/35{background-color:color-mix(in oklab, var(--wx-primary-fg) 35%, transparent)}}.bg-wx-primary\\/5{background-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary\\/5{background-color:color-mix(in oklab, var(--wx-primary) 5%, transparent)}}.bg-wx-primary\\/10{background-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary\\/10{background-color:color-mix(in oklab, var(--wx-primary) 10%, transparent)}}.bg-wx-primary\\/12{background-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary\\/12{background-color:color-mix(in oklab, var(--wx-primary) 12%, transparent)}}.bg-wx-primary\\/20{background-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary\\/20{background-color:color-mix(in oklab, var(--wx-primary) 20%, transparent)}}.bg-wx-success,.bg-wx-success\\/5{background-color:var(--wx-success)}@supports (color:color-mix(in lab, red, red)){.bg-wx-success\\/5{background-color:color-mix(in oklab, var(--wx-success) 5%, transparent)}}.bg-wx-success\\/10{background-color:var(--wx-success)}@supports (color:color-mix(in lab, red, red)){.bg-wx-success\\/10{background-color:color-mix(in oklab, var(--wx-success) 10%, transparent)}}.bg-wx-warning,.bg-wx-warning\\/5{background-color:var(--wx-warning)}@supports (color:color-mix(in lab, red, red)){.bg-wx-warning\\/5{background-color:color-mix(in oklab, var(--wx-warning) 5%, transparent)}}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\\[linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]{background-image:linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}.bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,color-mix\\(in_srgb\\,var\\(--wx-home-glow\\)_var\\(--wx-home-glow-a\\,22\\%\\)\\,transparent\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]{background-image:radial-gradient(120% 80% at 50% -10%,var(--wx-home-glow),transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}@supports (color:color-mix(in lab, red, red)){.bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,color-mix\\(in_srgb\\,var\\(--wx-home-glow\\)_var\\(--wx-home-glow-a\\,22\\%\\)\\,transparent\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]{background-image:radial-gradient(120% 80% at 50% -10%,color-mix(in srgb,var(--wx-home-glow) var(--wx-home-glow-a,22%),transparent),transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}}.bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,rgba\\(99\\,102\\,241\\,0\\.22\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]{background-image:radial-gradient(120% 80% at 50% -10%,#6366f138,transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}.from-wx-bg{--tw-gradient-from:var(--wx-bg);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-wx-bg-elevated{--tw-gradient-from:var(--wx-bg-elevated);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-wx-bg{--tw-gradient-via:var(--wx-bg);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-wx-bg\\/80{--tw-gradient-via:var(--wx-bg)}@supports (color:color-mix(in lab, red, red)){.via-wx-bg\\/80{--tw-gradient-via:color-mix(in oklab, var(--wx-bg) 80%, transparent)}}.via-wx-bg\\/80{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-wx-bg-elevated-2{--tw-gradient-to:var(--wx-bg-elevated-2);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.bg-repeat{background-repeat:repeat}.mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-px{padding:1px}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-0\\.75{padding-inline:calc(var(--spacing) * .75)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-9{padding-right:calc(var(--spacing) * 9)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-12{padding-bottom:calc(var(--spacing) * 12)}.pb-\\[4\\.5rem\\]{padding-bottom:4.5rem}.pl-1{padding-left:calc(var(--spacing) * 1)}.pl-1\\.5{padding-left:calc(var(--spacing) * 1.5)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-geist-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.7em\\]{font-size:.7em}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.leading-\\[1\\.35\\]{--tw-leading:1.35;line-height:1.35}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\\[0\\.14em\\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-\\[0\\.22em\\]{--tw-tracking:.22em;letter-spacing:.22em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-wrap{text-wrap:wrap}.\\[overflow-wrap\\:anywhere\\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[\\#1a1a1f\\]{color:#1a1a1f}.text-white{color:var(--color-white)}.text-wx-bg,.text-wx-bg\\/70{color:var(--wx-bg)}@supports (color:color-mix(in lab, red, red)){.text-wx-bg\\/70{color:color-mix(in oklab, var(--wx-bg) 70%, transparent)}}.text-wx-danger{color:var(--wx-danger)}.text-wx-fg{color:var(--wx-fg)}.text-wx-fg-muted{color:var(--wx-fg-muted)}.text-wx-fg-subtle{color:var(--wx-fg-subtle)}.text-wx-launcher-fg{color:var(--wx-launcher-fg)}.text-wx-primary{color:var(--wx-primary)}.text-wx-primary-fg,.text-wx-primary-fg\\/70{color:var(--wx-primary-fg)}@supports (color:color-mix(in lab, red, red)){.text-wx-primary-fg\\/70{color:color-mix(in oklab, var(--wx-primary-fg) 70%, transparent)}}.text-wx-success{color:var(--wx-success)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-85{opacity:.85}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_3px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 1px 3px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_4px_12px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 4px 12px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_8px_24px_rgba\\(0\\,0\\,0\\,0\\.18\\)\\]{--tw-shadow:0 8px 24px var(--tw-shadow-color,#0000002e);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_10px_28px_rgba\\(0\\,0\\,0\\,0\\.14\\)\\]{--tw-shadow:0 10px 28px var(--tw-shadow-color,#00000024);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_12px_32px_rgba\\(0\\,0\\,0\\,0\\.16\\)\\]{--tw-shadow:0 12px 32px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_16px_40px_rgba\\(0\\,0\\,0\\,0\\.16\\)\\]{--tw-shadow:0 16px 40px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_rgb\\(0_0_0\\/0\\.04\\)\\]{--tw-shadow:inset 0 0 0 1px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-black{--tw-shadow-color:#000}@supports (color:color-mix(in lab, red, red)){.shadow-black{--tw-shadow-color:color-mix(in oklab, var(--color-black) var(--tw-shadow-alpha), transparent)}}.shadow-black\\/\\[0\\.06\\]{--tw-shadow-color:#0000000f}@supports (color:color-mix(in lab, red, red)){.shadow-black\\/\\[0\\.06\\]{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 6%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black{--tw-ring-color:var(--color-black)}.ring-black\\/10{--tw-ring-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.ring-black\\/10{--tw-ring-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.ring-wx-bg{--tw-ring-color:var(--wx-bg)}.ring-wx-bg-elevated,.ring-wx-bg-elevated\\/60{--tw-ring-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.ring-wx-bg-elevated\\/60{--tw-ring-color:color-mix(in oklab, var(--wx-bg-elevated) 60%, transparent)}}.ring-wx-border{--tw-ring-color:var(--wx-border)}.ring-wx-danger{--tw-ring-color:var(--wx-danger)}.ring-wx-primary,.ring-wx-primary\\/40{--tw-ring-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.ring-wx-primary\\/40{--tw-ring-color:color-mix(in oklab, var(--wx-primary) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\\[2px\\]{--tw-blur:blur(2px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-lg{--tw-blur:blur(var(--blur-lg));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[background-color\\,color\\,transform\\]{transition-property:background-color,color,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-\\[420ms\\]{--tw-duration:.42s;transition-duration:.42s}.ease-\\[cubic-bezier\\(0\\.34\\,1\\.42\\,0\\.5\\,1\\)\\]{--tw-ease:cubic-bezier(.34,1.42,.5,1);transition-timing-function:cubic-bezier(.34,1.42,.5,1)}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[animation-delay\\:-0\\.3s\\]{animation-delay:-.3s}.\\[animation-delay\\:-0\\.15s\\]{animation-delay:-.15s}.\\[direction\\:inherit\\]{direction:inherit}.\\[t\\:systemFieldOptions\\.chatStatus\\.IN_PROGRESS\\]{t:systemFieldOptions.chatStatus.IN PROGRESS}.\\[t\\:systemFields\\.chatStatus\\]{t:systemFields.chatStatus}.\\[t\\:systemFields\\.firstName\\]{t:systemFields.firstName}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\\:block:is(:where(.group):hover *){display:block}.group-hover\\:translate-x-0\\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:-translate-y-full:is(:where(.group):hover *){--tw-translate-y:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:translate-y-0:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\\:scale-\\[1\\.02\\]:is(:where(.group):hover *){scale:1.02}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-active\\:scale-90:is(:where(.group):active *){--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.placeholder\\:text-wx-danger\\/60::placeholder{color:var(--wx-danger)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-wx-danger\\/60::placeholder{color:color-mix(in oklab, var(--wx-danger) 60%, transparent)}}.placeholder\\:text-wx-fg-muted::placeholder{color:var(--wx-fg-muted)}.placeholder\\:text-wx-fg-subtle::placeholder{color:var(--wx-fg-subtle)}.backdrop\\:bg-transparent::backdrop{background-color:#0000}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:-inset-2\\.5:before{content:var(--tw-content);inset:calc(var(--spacing) * -2.5)}.before\\:content-\\[\\'\\'\\]:before{--tw-content:"";content:var(--tw-content)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:top-1\\/2:after{content:var(--tw-content);top:50%}.after\\:left-1\\/2:after{content:var(--tw-content);left:50%}.after\\:-translate-x-1\\/2:after{content:var(--tw-content);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.after\\:-translate-y-1\\/2:after{content:var(--tw-content);--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.after\\:content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.first\\:mt-4:first-child{margin-top:calc(var(--spacing) * 4)}.first\\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first\\:pt-0:first-child{padding-top:calc(var(--spacing) * 0)}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.read-only\\:cursor-not-allowed:read-only{cursor:not-allowed}.read-only\\:bg-wx-bg-elevated\\/60:read-only{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.read-only\\:bg-wx-bg-elevated\\/60:read-only{background-color:color-mix(in oklab, var(--wx-bg-elevated) 60%, transparent)}}.read-only\\:text-wx-fg-muted:read-only{color:var(--wx-fg-muted)}.focus-within\\:border-wx-primary:focus-within{border-color:var(--wx-primary)}.focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\\:ring-wx-primary\\/20:focus-within{--tw-ring-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-wx-primary\\/20:focus-within{--tw-ring-color:color-mix(in oklab, var(--wx-primary) 20%, transparent)}}@media (hover:hover){.hover\\:scale-\\[1\\.04\\]:hover{scale:1.04}.hover\\:bg-\\[\\#1a1a1f\\]\\/90:hover{background-color:#1a1a1fe6;background-color:color(display-p3 .10196 .10196 .119938/.9);background-color:lab(9.42875% 1.01694 -3.48157/.9)}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\\:bg-white\\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/20:hover{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.hover\\:bg-wx-bg:hover{background-color:var(--wx-bg)}.hover\\:bg-wx-bg-elevated:hover{background-color:var(--wx-bg-elevated)}.hover\\:bg-wx-bg-elevated-2:hover{background-color:var(--wx-bg-elevated-2)}.hover\\:bg-wx-bg-elevated\\/40:hover{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-bg-elevated\\/40:hover{background-color:color-mix(in oklab, var(--wx-bg-elevated) 40%, transparent)}}.hover\\:bg-wx-bg-elevated\\/50:hover{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-bg-elevated\\/50:hover{background-color:color-mix(in oklab, var(--wx-bg-elevated) 50%, transparent)}}.hover\\:bg-wx-bg-elevated\\/60:hover{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-bg-elevated\\/60:hover{background-color:color-mix(in oklab, var(--wx-bg-elevated) 60%, transparent)}}.hover\\:bg-wx-bg-elevated\\/80:hover{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-bg-elevated\\/80:hover{background-color:color-mix(in oklab, var(--wx-bg-elevated) 80%, transparent)}}.hover\\:bg-wx-fg-muted\\/60:hover{background-color:var(--wx-fg-muted)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-fg-muted\\/60:hover{background-color:color-mix(in oklab, var(--wx-fg-muted) 60%, transparent)}}.hover\\:bg-wx-primary:hover{background-color:var(--wx-primary)}.hover\\:bg-wx-primary-fg\\/20:hover{background-color:var(--wx-primary-fg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-primary-fg\\/20:hover{background-color:color-mix(in oklab, var(--wx-primary-fg) 20%, transparent)}}.hover\\:bg-wx-primary-hover:hover{background-color:var(--wx-primary-hover)}.hover\\:bg-wx-primary\\/12:hover{background-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-primary\\/12:hover{background-color:color-mix(in oklab, var(--wx-primary) 12%, transparent)}}.hover\\:text-wx-danger:hover{color:var(--wx-danger)}.hover\\:text-wx-fg:hover{color:var(--wx-fg)}.hover\\:text-wx-primary:hover{color:var(--wx-primary)}.hover\\:text-wx-primary-fg:hover{color:var(--wx-primary-fg)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-70:hover{opacity:.7}.hover\\:opacity-80:hover{opacity:.8}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-95:hover{opacity:.95}.hover\\:opacity-100:hover{opacity:1}}.focus\\:border-wx-primary:focus{border-color:var(--wx-primary)}.focus\\:bg-wx-bg-elevated:focus{background-color:var(--wx-bg-elevated)}.focus\\:text-wx-fg:focus{color:var(--wx-fg)}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-wx-danger:focus{--tw-ring-color:var(--wx-danger)}.focus\\:ring-wx-primary:focus,.focus\\:ring-wx-primary\\/20:focus{--tw-ring-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-wx-primary\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--wx-primary) 20%, transparent)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-\\[\\#1a1a1f\\]:focus-visible{--tw-ring-color:#1a1a1f}.focus-visible\\:ring-wx-launcher-bg:focus-visible{--tw-ring-color:var(--wx-launcher-bg)}.focus-visible\\:ring-wx-primary:focus-visible{--tw-ring-color:var(--wx-primary)}.focus-visible\\:ring-wx-primary\\/30:focus-visible{--tw-ring-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-wx-primary\\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--wx-primary) 30%, transparent)}}.focus-visible\\:ring-wx-primary\\/40:focus-visible{--tw-ring-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-wx-primary\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--wx-primary) 40%, transparent)}}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color:var(--color-white)}.focus-visible\\:ring-offset-wx-bg:focus-visible{--tw-ring-offset-color:var(--wx-bg)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:-outline-offset-2:focus-visible{outline-offset:calc(2px * -1)}.focus-visible\\:outline-wx-primary:focus-visible{outline-color:var(--wx-primary)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-wx-bg-elevated\\/60:disabled{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.disabled\\:bg-wx-bg-elevated\\/60:disabled{background-color:color-mix(in oklab, var(--wx-bg-elevated) 60%, transparent)}}.disabled\\:text-wx-fg-muted:disabled{color:var(--wx-fg-muted)}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}.data-wx-pointer\\:focus-visible\\:ring-0[data-wx-pointer]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.data-wx-pointer\\:focus-visible\\:ring-offset-0[data-wx-pointer]:focus-visible{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[state\\=active\\]\\:text-wx-fg[data-state=active]{color:var(--wx-fg)}.data-\\[state\\=checked\\]\\:font-medium[data-state=checked]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-\\[state\\=visible\\]\\:opacity-100[data-state=visible]{opacity:1}@media (prefers-reduced-motion:reduce){.motion-reduce\\:transition-none{transition-property:none}}.rtl\\:-scale-x-100:where(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-scale-x:calc(100% * -1);scale:var(--tw-scale-x) var(--tw-scale-y)}.rtl\\:-scale-x-100:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-scale-x:calc(100% * -1);scale:var(--tw-scale-x) var(--tw-scale-y)}@media (hover:hover){.rtl\\:group-hover\\:-translate-x-0\\.5:where(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *):-webkit-any(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.rtl\\:group-hover\\:-translate-x-0\\.5:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *):is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}}.dark\\:block:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){display:block}.dark\\:hidden:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){display:none}.dark\\:border-wx-bg\\/30:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){border-color:var(--wx-bg)}@supports (color:color-mix(in lab, red, red)){.dark\\:border-wx-bg\\/30:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){border-color:color-mix(in oklab, var(--wx-bg) 30%, transparent)}}.dark\\:border-t-wx-bg:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){border-top-color:var(--wx-bg)}.dark\\:bg-wx-bg:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){background-color:var(--wx-bg)}.dark\\:bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,color-mix\\(in_srgb\\,var\\(--wx-home-glow\\)_var\\(--wx-home-glow-a\\,35\\%\\)\\,transparent\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){background-image:radial-gradient(120% 80% at 50% -10%,var(--wx-home-glow),transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,color-mix\\(in_srgb\\,var\\(--wx-home-glow\\)_var\\(--wx-home-glow-a\\,35\\%\\)\\,transparent\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){background-image:radial-gradient(120% 80% at 50% -10%,color-mix(in srgb,var(--wx-home-glow) var(--wx-home-glow-a,35%),transparent),transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}}.dark\\:bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,rgba\\(99\\,102\\,241\\,0\\.35\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){background-image:radial-gradient(120% 80% at 50% -10%,#6366f159,transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}@media (pointer:coarse){.pointer-coarse\\:gap-2{gap:calc(var(--spacing) * 2)}.pointer-coarse\\:gap-5{gap:calc(var(--spacing) * 5)}.pointer-coarse\\:after\\:h-\\[max\\(100\\%\\,44px\\)\\]:after{content:var(--tw-content);height:max(100%,44px)}.pointer-coarse\\:after\\:w-\\[max\\(100\\%\\,44px\\)\\]:after{content:var(--tw-content);width:max(100%,44px)}}.\\[\\&_\\.epr-btn-clear-search\\:focus\\]\\:\\!bg-wx-bg-elevated-2 .epr-btn-clear-search:focus,.\\[\\&_\\.epr-btn-clear-search\\:hover\\]\\:\\!bg-wx-bg-elevated-2 .epr-btn-clear-search:hover{background-color:var(--wx-bg-elevated-2)!important}.\\[\\&_\\.hljs-attr\\]\\:text-sky-300 .hljs-attr,.\\[\\&_\\.hljs-attribute\\]\\:text-sky-300 .hljs-attribute{color:var(--color-sky-300)}.\\[\\&_\\.hljs-built_in\\]\\:text-violet-300 .hljs-built in{color:var(--color-violet-300)}.\\[\\&_\\.hljs-comment\\]\\:text-zinc-500 .hljs-comment{color:var(--color-zinc-500)}.\\[\\&_\\.hljs-comment\\]\\:italic .hljs-comment{font-style:italic}.\\[\\&_\\.hljs-keyword\\]\\:text-violet-300 .hljs-keyword{color:var(--color-violet-300)}.\\[\\&_\\.hljs-literal\\]\\:text-amber-300 .hljs-literal{color:var(--color-amber-300)}.\\[\\&_\\.hljs-name\\]\\:text-rose-300 .hljs-name{color:var(--color-rose-300)}.\\[\\&_\\.hljs-number\\]\\:text-amber-300 .hljs-number{color:var(--color-amber-300)}.\\[\\&_\\.hljs-string\\]\\:text-emerald-300 .hljs-string{color:var(--color-emerald-300)}.\\[\\&_\\.hljs-tag\\]\\:text-rose-300 .hljs-tag{color:var(--color-rose-300)}.\\[\\&_\\.hljs-title\\]\\:font-medium .hljs-title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_\\.hljs-title\\]\\:text-zinc-100 .hljs-title{color:var(--color-zinc-100)}.\\[\\&_\\.hljs-type\\]\\:text-violet-300 .hljs-type{color:var(--color-violet-300)}.\\[\\&_a\\]\\:font-medium a{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_a\\]\\:text-inherit a{color:inherit}.\\[\\&_a\\]\\:text-wx-primary a{color:var(--wx-primary)}.\\[\\&_a\\]\\:text-wx-primary-fg a{color:var(--wx-primary-fg)}.\\[\\&_a\\]\\:no-underline a{text-decoration-line:none}.\\[\\&_a\\]\\:underline a{text-decoration-line:underline}.\\[\\&_a\\]\\:underline-offset-2 a{text-underline-offset:2px}.\\[\\&_a\\]\\:opacity-90 a{opacity:.9}.\\[\\&_a\\]\\:transition-opacity a{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\\[\\&_a\\:hover\\]\\:opacity-70 a:hover{opacity:.7}.\\[\\&_a\\:hover\\]\\:opacity-80 a:hover{opacity:.8}.\\[\\&_a\\:hover\\]\\:opacity-100 a:hover{opacity:1}.\\[\\&_blockquote\\]\\:my-4 blockquote{margin-block:calc(var(--spacing) * 4)}.\\[\\&_blockquote\\]\\:border-l-2 blockquote{border-left-style:var(--tw-border-style);border-left-width:2px}.\\[\\&_blockquote\\]\\:border-wx-primary\\/40 blockquote{border-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.\\[\\&_blockquote\\]\\:border-wx-primary\\/40 blockquote{border-color:color-mix(in oklab, var(--wx-primary) 40%, transparent)}}.\\[\\&_blockquote\\]\\:pl-3 blockquote{padding-left:calc(var(--spacing) * 3)}.\\[\\&_blockquote\\]\\:text-wx-fg-muted blockquote{color:var(--wx-fg-muted)}.\\[\\&_blockquote\\]\\:italic blockquote{font-style:italic}.\\[\\&_code\\]\\:rounded-\\[6px\\] code{border-radius:6px}.\\[\\&_code\\]\\:rounded-sm code{border-radius:var(--radius-sm)}.\\[\\&_code\\]\\:rounded-wx-sm code{border-radius:var(--wx-radius-sm)}.\\[\\&_code\\]\\:bg-black\\/10 code{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.\\[\\&_code\\]\\:bg-black\\/10 code{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.\\[\\&_code\\]\\:bg-white\\/15 code{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.\\[\\&_code\\]\\:bg-white\\/15 code{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.\\[\\&_code\\]\\:bg-wx-bg-elevated code{background-color:var(--wx-bg-elevated)}.\\[\\&_code\\]\\:bg-wx-bg-elevated-2 code{background-color:var(--wx-bg-elevated-2)}.\\[\\&_code\\]\\:px-1 code{padding-inline:calc(var(--spacing) * 1)}.\\[\\&_code\\]\\:px-1\\.5 code{padding-inline:calc(var(--spacing) * 1.5)}.\\[\\&_code\\]\\:py-0\\.5 code{padding-block:calc(var(--spacing) * .5)}.\\[\\&_code\\]\\:font-mono code{font-family:var(--font-geist-mono)}.\\[\\&_code\\]\\:text-\\[0\\.85em\\] code{font-size:.85em}.\\[\\&_details\\]\\:my-2 details{margin-block:calc(var(--spacing) * 2)}.\\[\\&_details\\]\\:overflow-hidden details{overflow:hidden}.\\[\\&_details\\]\\:rounded-lg details{border-radius:var(--radius-lg)}.\\[\\&_details\\]\\:border details{border-style:var(--tw-border-style);border-width:1px}.\\[\\&_details\\]\\:border-wx-border details{border-color:var(--wx-border)}.\\[\\&_details\\]\\:bg-wx-bg-elevated\\/40 details{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.\\[\\&_details\\]\\:bg-wx-bg-elevated\\/40 details{background-color:color-mix(in oklab, var(--wx-bg-elevated) 40%, transparent)}}.\\[\\&_details\\+details\\]\\:mt-2 details+details{margin-top:calc(var(--spacing) * 2)}.\\[\\&_details\\[open\\]_summary\\]\\:border-b details[open] summary{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\\[\\&_details\\[open\\]_summary\\]\\:border-wx-border details[open] summary{border-color:var(--wx-border)}.\\[\\&_details\\[open\\]_summary\\]\\:after\\:rotate-90 details[open] summary:after{content:var(--tw-content);rotate:90deg}.\\[\\&_em\\]\\:italic em{font-style:italic}.\\[\\&_figcaption\\]\\:mt-2 figcaption{margin-top:calc(var(--spacing) * 2)}.\\[\\&_figcaption\\]\\:text-xs figcaption{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&_figcaption\\]\\:text-wx-fg-muted figcaption{color:var(--wx-fg-muted)}.\\[\\&_figcaption\\]\\:italic figcaption{font-style:italic}.\\[\\&_figure\\]\\:my-5 figure{margin-block:calc(var(--spacing) * 5)}.\\[\\&_figure\\]\\:flex figure{display:flex}.\\[\\&_figure\\]\\:flex-col figure{flex-direction:column}.\\[\\&_figure\\]\\:items-center figure{align-items:center}.\\[\\&_figure\\]\\:text-center figure{text-align:center}.\\[\\&_figure_img\\]\\:my-0 figure img{margin-block:calc(var(--spacing) * 0)}.\\[\\&_h1\\]\\:mt-6 h1{margin-top:calc(var(--spacing) * 6)}.\\[\\&_h1\\]\\:mb-3 h1{margin-bottom:calc(var(--spacing) * 3)}.\\[\\&_h1\\]\\:scroll-mt-16 h1{scroll-margin-top:calc(var(--spacing) * 16)}.\\[\\&_h1\\]\\:text-xl h1{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\\[\\&_h1\\]\\:font-semibold h1{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\\[\\&_h1\\]\\:tracking-tight h1{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.\\[\\&_h2\\]\\:mt-5 h2{margin-top:calc(var(--spacing) * 5)}.\\[\\&_h2\\]\\:mb-2 h2{margin-bottom:calc(var(--spacing) * 2)}.\\[\\&_h2\\]\\:scroll-mt-16 h2{scroll-margin-top:calc(var(--spacing) * 16)}.\\[\\&_h2\\]\\:text-base h2{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\\[\\&_h2\\]\\:font-semibold h2{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\\[\\&_h2\\]\\:tracking-tight h2{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.\\[\\&_h3\\]\\:mt-4 h3{margin-top:calc(var(--spacing) * 4)}.\\[\\&_h3\\]\\:mb-1\\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\\[\\&_h3\\]\\:scroll-mt-16 h3{scroll-margin-top:calc(var(--spacing) * 16)}.\\[\\&_h3\\]\\:text-sm h3{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\\[\\&_h3\\]\\:font-semibold h3{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\\[\\&_hr\\]\\:my-6 hr{margin-block:calc(var(--spacing) * 6)}.\\[\\&_hr\\]\\:border-wx-border hr{border-color:var(--wx-border)}.\\[\\&_img\\]\\:mx-auto img{margin-inline-start:auto;margin-inline-end:auto}.\\[\\&_img\\]\\:my-3 img{margin-block:calc(var(--spacing) * 3)}.\\[\\&_img\\]\\:block img{display:block}.\\[\\&_img\\]\\:max-w-full img{max-width:100%}.\\[\\&_img\\]\\:bg-wx-bg-elevated-2 img{background-color:var(--wx-bg-elevated-2)}.\\[\\&_li\\]\\:m-0 li{margin:calc(var(--spacing) * 0)}.\\[\\&_li\\]\\:my-0\\.5 li{margin-block:calc(var(--spacing) * .5)}.\\[\\&_li\\]\\:my-1 li{margin-block:calc(var(--spacing) * 1)}.\\[\\&_li\\>p\\]\\:my-0 li>p{margin-block:calc(var(--spacing) * 0)}.\\[\\&_li\\>p\\+p\\]\\:mt-1 li>p+p{margin-top:calc(var(--spacing) * 1)}.\\[\\&_ol\\]\\:my-1 ol{margin-block:calc(var(--spacing) * 1)}.\\[\\&_ol\\]\\:my-1\\.5 ol{margin-block:calc(var(--spacing) * 1.5)}.\\[\\&_ol\\]\\:my-3 ol{margin-block:calc(var(--spacing) * 3)}.\\[\\&_ol\\]\\:list-decimal ol{list-style-type:decimal}.\\[\\&_ol\\]\\:pl-5 ol{padding-left:calc(var(--spacing) * 5)}.\\[\\&_ol\\]\\:whitespace-normal ol{white-space:normal}.\\[\\&_ol\\]\\:marker\\:text-wx-fg-subtle ol ::marker{color:var(--wx-fg-subtle)}.\\[\\&_ol\\]\\:marker\\:text-wx-fg-subtle ol::marker{color:var(--wx-fg-subtle)}.\\[\\&_ol\\]\\:marker\\:text-wx-fg-subtle ol ::-webkit-details-marker{color:var(--wx-fg-subtle)}.\\[\\&_ol\\]\\:marker\\:text-wx-fg-subtle ol::-webkit-details-marker{color:var(--wx-fg-subtle)}.\\[\\&_p\\]\\:my-3 p{margin-block:calc(var(--spacing) * 3)}.\\[\\&_pre\\]\\:my-2 pre{margin-block:calc(var(--spacing) * 2)}.\\[\\&_pre\\]\\:my-4 pre{margin-block:calc(var(--spacing) * 4)}.\\[\\&_pre\\]\\:overflow-x-auto pre{overflow-x:auto}.\\[\\&_pre\\]\\:rounded pre{border-radius:.25rem}.\\[\\&_pre\\]\\:rounded-lg pre{border-radius:var(--radius-lg)}.\\[\\&_pre\\]\\:border pre{border-style:var(--tw-border-style);border-width:1px}.\\[\\&_pre\\]\\:border-wx-border pre{border-color:var(--wx-border)}.\\[\\&_pre\\]\\:bg-\\[\\#0f1115\\] pre{background-color:#0f1115}.\\[\\&_pre\\]\\:bg-black\\/10 pre{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.\\[\\&_pre\\]\\:bg-black\\/10 pre{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.\\[\\&_pre\\]\\:bg-white\\/15 pre{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.\\[\\&_pre\\]\\:bg-white\\/15 pre{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.\\[\\&_pre\\]\\:p-2 pre{padding:calc(var(--spacing) * 2)}.\\[\\&_pre\\]\\:p-4 pre{padding:calc(var(--spacing) * 4)}.\\[\\&_pre\\]\\:text-\\[0\\.8em\\] pre{font-size:.8em}.\\[\\&_pre\\]\\:text-\\[12\\.5px\\] pre{font-size:12.5px}.\\[\\&_pre\\]\\:leading-relaxed pre{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\\[\\&_pre\\]\\:\\[overflow-wrap\\:normal\\] pre{overflow-wrap:normal}.\\[\\&_pre\\]\\:text-zinc-100 pre{color:var(--color-zinc-100)}.\\[\\&_pre_code\\]\\:bg-transparent pre code{background-color:#0000}.\\[\\&_pre_code\\]\\:p-0 pre code{padding:calc(var(--spacing) * 0)}.\\[\\&_pre_code\\]\\:text-zinc-100 pre code{color:var(--color-zinc-100)}.\\[\\&_s\\]\\:line-through s{text-decoration-line:line-through}.\\[\\&_strong\\]\\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\\[\\&_summary\\]\\:relative summary{position:relative}.\\[\\&_summary\\]\\:cursor-pointer summary{cursor:pointer}.\\[\\&_summary\\]\\:list-none summary{list-style-type:none}.\\[\\&_summary\\]\\:px-4 summary{padding-inline:calc(var(--spacing) * 4)}.\\[\\&_summary\\]\\:py-3 summary{padding-block:calc(var(--spacing) * 3)}.\\[\\&_summary\\]\\:pr-10 summary{padding-right:calc(var(--spacing) * 10)}.\\[\\&_summary\\]\\:text-sm summary{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\\[\\&_summary\\]\\:font-medium summary{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_summary\\]\\:text-wx-fg summary{color:var(--wx-fg)}.\\[\\&_summary\\]\\:after\\:absolute summary:after{content:var(--tw-content);position:absolute}.\\[\\&_summary\\]\\:after\\:top-1\\/2 summary:after{content:var(--tw-content);top:50%}.\\[\\&_summary\\]\\:after\\:right-4 summary:after{content:var(--tw-content);right:calc(var(--spacing) * 4)}.\\[\\&_summary\\]\\:after\\:-translate-y-1\\/2 summary:after{content:var(--tw-content);--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.\\[\\&_summary\\]\\:after\\:text-base summary:after{content:var(--tw-content);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\\[\\&_summary\\]\\:after\\:leading-none summary:after{content:var(--tw-content);--tw-leading:1;line-height:1}.\\[\\&_summary\\]\\:after\\:text-wx-fg-subtle summary:after{content:var(--tw-content);color:var(--wx-fg-subtle)}.\\[\\&_summary\\]\\:after\\:transition-transform summary:after{content:var(--tw-content);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\\[\\&_summary\\]\\:after\\:content-\\[\\'\\\\\\\\203A\\'\\] summary:after{--tw-content:"\\\\203A";content:var(--tw-content)}.\\[\\&_summary\\:\\:-webkit-details-marker\\]\\:hidden summary::-webkit-details-marker{display:none}.\\[\\&_summary\\:\\:marker\\]\\:hidden summary::marker{display:none}.\\[\\&_svg\\]\\:fill-current svg{fill:currentColor}.\\[\\&_svg\\]\\:fill-wx-launcher-fg svg{fill:var(--wx-launcher-fg)}.\\[\\&_svg\\]\\:stroke-current svg{stroke:currentColor}.\\[\\&_svg\\]\\:stroke-wx-launcher-fg svg{stroke:var(--wx-launcher-fg)}.dark\\:\\[\\&_svg\\]\\:fill-wx-bg:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *) svg{fill:var(--wx-bg)}.dark\\:\\[\\&_svg\\]\\:stroke-wx-bg:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *) svg{stroke:var(--wx-bg)}.\\[\\&_table\\]\\:my-3 table{margin-block:calc(var(--spacing) * 3)}.\\[\\&_table\\]\\:block table{display:block}.\\[\\&_table\\]\\:w-full table{width:100%}.\\[\\&_table\\]\\:max-w-full table{max-width:100%}.\\[\\&_table\\]\\:table-fixed table{table-layout:fixed}.\\[\\&_table\\]\\:border-collapse table{border-collapse:collapse}.\\[\\&_table\\]\\:overflow-hidden table{overflow:hidden}.\\[\\&_table\\]\\:overflow-x-auto table{overflow-x:auto}.\\[\\&_table\\]\\:rounded-lg table{border-radius:var(--radius-lg)}.\\[\\&_table\\]\\:border table{border-style:var(--tw-border-style);border-width:1px}.\\[\\&_table\\]\\:border-wx-border table{border-color:var(--wx-border)}.\\[\\&_table\\]\\:text-xs table{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&_tbody_tr\\]\\:border-t tbody tr{border-top-style:var(--tw-border-style);border-top-width:1px}.\\[\\&_tbody_tr\\]\\:border-wx-border tbody tr{border-color:var(--wx-border)}.\\[\\&_tbody_tr\\:nth-child\\(odd\\)\\]\\:bg-wx-bg-elevated\\/40 tbody tr:nth-child(odd){background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.\\[\\&_tbody_tr\\:nth-child\\(odd\\)\\]\\:bg-wx-bg-elevated\\/40 tbody tr:nth-child(odd){background-color:color-mix(in oklab, var(--wx-bg-elevated) 40%, transparent)}}.\\[\\&_td\\]\\:px-2\\.5 td{padding-inline:calc(var(--spacing) * 2.5)}.\\[\\&_td\\]\\:py-1\\.5 td{padding-block:calc(var(--spacing) * 1.5)}.\\[\\&_td\\]\\:align-top td{vertical-align:top}.\\[\\&_td\\]\\:\\[overflow-wrap\\:normal\\] td{overflow-wrap:normal}.\\[\\&_td\\]\\:text-wx-fg td{color:var(--wx-fg)}.\\[\\&_td_p\\]\\:my-0 td p{margin-block:calc(var(--spacing) * 0)}.\\[\\&_td_p\\]\\:inline td p{display:inline}.\\[\\&_td\\+td\\]\\:border-l td+td{border-left-style:var(--tw-border-style);border-left-width:1px}.\\[\\&_td\\+td\\]\\:border-wx-border td+td{border-color:var(--wx-border)}.\\[\\&_th\\]\\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\\[\\&_th\\]\\:border-wx-border th{border-color:var(--wx-border)}.\\[\\&_th\\]\\:px-2\\.5 th{padding-inline:calc(var(--spacing) * 2.5)}.\\[\\&_th\\]\\:py-1\\.5 th{padding-block:calc(var(--spacing) * 1.5)}.\\[\\&_th\\]\\:text-left th{text-align:left}.\\[\\&_th\\]\\:font-medium th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_th\\]\\:\\[overflow-wrap\\:normal\\] th{overflow-wrap:normal}.\\[\\&_th\\]\\:text-wx-fg th{color:var(--wx-fg)}.\\[\\&_th_p\\]\\:my-0 th p{margin-block:calc(var(--spacing) * 0)}.\\[\\&_th_p\\]\\:inline th p{display:inline}.\\[\\&_th\\+th\\]\\:border-l th+th{border-left-style:var(--tw-border-style);border-left-width:1px}.\\[\\&_th\\+th\\]\\:border-wx-border th+th{border-color:var(--wx-border)}.\\[\\&_thead\\]\\:bg-wx-bg-elevated thead{background-color:var(--wx-bg-elevated)}.\\[\\&_u\\]\\:underline u{text-decoration-line:underline}.\\[\\&_ul\\]\\:m-0 ul{margin:calc(var(--spacing) * 0)}.\\[\\&_ul\\]\\:my-1 ul{margin-block:calc(var(--spacing) * 1)}.\\[\\&_ul\\]\\:my-1\\.5 ul{margin-block:calc(var(--spacing) * 1.5)}.\\[\\&_ul\\]\\:my-3 ul{margin-block:calc(var(--spacing) * 3)}.\\[\\&_ul\\]\\:list-disc ul{list-style-type:disc}.\\[\\&_ul\\]\\:list-none ul{list-style-type:none}.\\[\\&_ul\\]\\:p-0 ul{padding:calc(var(--spacing) * 0)}.\\[\\&_ul\\]\\:pl-5 ul{padding-left:calc(var(--spacing) * 5)}.\\[\\&_ul\\]\\:whitespace-normal ul{white-space:normal}.\\[\\&_ul\\]\\:marker\\:text-wx-fg-subtle ul ::marker{color:var(--wx-fg-subtle)}.\\[\\&_ul\\]\\:marker\\:text-wx-fg-subtle ul::marker{color:var(--wx-fg-subtle)}.\\[\\&_ul\\]\\:marker\\:text-wx-fg-subtle ul ::-webkit-details-marker{color:var(--wx-fg-subtle)}.\\[\\&_ul\\]\\:marker\\:text-wx-fg-subtle ul::-webkit-details-marker{color:var(--wx-fg-subtle)}.\\[\\&_ul\\[data-type\\=taskList\\]\\]\\:list-none\\! ul[data-type=taskList]{list-style-type:none!important}.\\[\\&_ul\\[data-type\\=taskList\\]\\]\\:pl-0\\! ul[data-type=taskList]{padding-left:calc(var(--spacing) * 0)!important}.\\[\\&_ul\\[data-type\\=taskList\\]_input\\]\\:h-3\\.5 ul[data-type=taskList] input{height:calc(var(--spacing) * 3.5)}.\\[\\&_ul\\[data-type\\=taskList\\]_input\\]\\:w-3\\.5 ul[data-type=taskList] input{width:calc(var(--spacing) * 3.5)}.\\[\\&_ul\\[data-type\\=taskList\\]_input\\]\\:accent-wx-primary ul[data-type=taskList] input{accent-color:var(--wx-primary)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:my-1\\.5 ul[data-type=taskList] li{margin-block:calc(var(--spacing) * 1.5)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:flex\\! ul[data-type=taskList] li{display:flex!important}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:items-start ul[data-type=taskList] li{align-items:flex-start}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:gap-2 ul[data-type=taskList] li{gap:calc(var(--spacing) * 2)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:pl-0 ul[data-type=taskList] li{padding-left:calc(var(--spacing) * 0)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:marker\\:content-none ul[data-type=taskList] li ::marker{--tw-content:none;content:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:marker\\:content-none ul[data-type=taskList] li::marker{--tw-content:none;content:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:marker\\:content-none ul[data-type=taskList] li ::-webkit-details-marker{--tw-content:none;content:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:marker\\:content-none ul[data-type=taskList] li::-webkit-details-marker{--tw-content:none;content:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>div\\]\\:min-w-0 ul[data-type=taskList] li>div{min-width:calc(var(--spacing) * 0)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>div\\]\\:flex-1 ul[data-type=taskList] li>div{flex:1}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>div\\>p\\]\\:my-0\\! ul[data-type=taskList] li>div>p{margin-block:calc(var(--spacing) * 0)!important}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>div\\>p\\]\\:leading-snug ul[data-type=taskList] li>div>p{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:pointer-events-none ul[data-type=taskList] li>label{pointer-events:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:m-0 ul[data-type=taskList] li>label{margin:calc(var(--spacing) * 0)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:inline-flex ul[data-type=taskList] li>label{display:inline-flex}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:h-5 ul[data-type=taskList] li>label{height:calc(var(--spacing) * 5)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:shrink-0 ul[data-type=taskList] li>label{flex-shrink:0}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:cursor-default ul[data-type=taskList] li>label{cursor:default}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:items-center ul[data-type=taskList] li>label{align-items:center}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:select-none ul[data-type=taskList] li>label{-webkit-user-select:none;user-select:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\>span\\]\\:hidden ul[data-type=taskList] li>label>span{display:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\[data-checked\\=true\\]\\>div\\]\\:text-wx-fg-muted ul[data-type=taskList] li[data-checked=true]>div{color:var(--wx-fg-muted)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\[data-checked\\=true\\]\\>div\\]\\:line-through ul[data-type=taskList] li[data-checked=true]>div{text-decoration-line:line-through}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:h-2::-webkit-scrollbar{height:calc(var(--spacing) * 2)}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-full::-webkit-scrollbar-thumb{border-radius:3.40282e38px}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-wx-fg-subtle\\/40::-webkit-scrollbar-thumb{background-color:var(--wx-fg-subtle)}@supports (color:color-mix(in lab, red, red)){.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-wx-fg-subtle\\/40::-webkit-scrollbar-thumb{background-color:color-mix(in oklab, var(--wx-fg-subtle) 40%, transparent)}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\:hover\\]\\:bg-wx-fg-subtle\\/60::-webkit-scrollbar-thumb:hover{background-color:var(--wx-fg-subtle)}@supports (color:color-mix(in lab, red, red)){.\\[\\&\\:\\:-webkit-scrollbar-thumb\\:hover\\]\\:bg-wx-fg-subtle\\/60::-webkit-scrollbar-thumb:hover{background-color:color-mix(in oklab, var(--wx-fg-subtle) 60%, transparent)}}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-transparent::-webkit-scrollbar-track{background-color:#0000}.\\[\\&\\:\\:-webkit-search-cancel-button\\]\\:appearance-none::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}.\\[\\&\\>\\:first-child\\]\\:mt-0>:first-child{margin-top:calc(var(--spacing) * 0)}.\\[\\&\\>\\:last-child\\]\\:mb-0>:last-child{margin-bottom:calc(var(--spacing) * 0)}.\\[\\&_details\\]\\:\\[\\&\\>\\:not\\(summary\\)\\]\\:px-4 details>:not(summary){padding-inline:calc(var(--spacing) * 4)}.\\[\\&_details\\]\\:\\[\\&\\>\\:not\\(summary\\)\\]\\:py-3 details>:not(summary){padding-block:calc(var(--spacing) * 3)}.\\[\\&_details\\]\\:\\[\\&\\>\\:not\\(summary\\)\\:first-of-type\\]\\:pt-3 details>:not(summary):first-of-type{padding-top:calc(var(--spacing) * 3)}.\\[\\&\\>div\\]\\:\\!block>div{display:block!important}.\\[\\&\\>div\\]\\:\\!w-full>div{width:100%!important}.\\[\\&\\>div\\]\\:\\!max-w-full>div{max-width:100%!important}.\\[\\&\\>p\\]\\:my-0>p{margin-block:calc(var(--spacing) * 0)}.\\[\\&\\>p\\+p\\]\\:mt-2>p+p{margin-top:calc(var(--spacing) * 2)}.\\[\\&\\>span\\]\\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}}:root,:host{--wx-home-glow:#6366f1;--wx-bg:#fff;--wx-bg-elevated:#f5f5f7;--wx-bg-elevated-2:#ebebef;--wx-fg:#121314;--wx-fg-muted:#565d69;--wx-fg-subtle:#636976;--wx-border:#e4e4e7;--wx-border-strong:#d1d5db;--wx-primary:#121314;--wx-primary-hover:#2a2c2e;--wx-primary-fg:#fff;--wx-launcher-bg:#121314;--wx-launcher-fg:#fff;--wx-success:#10b981;--wx-danger:#cc1f1f;--wx-warning:#f59e0b;--wx-radius-sm:8px;--wx-radius:12px;--wx-radius-lg:20px;--wx-radius-xl:28px}:host([data-theme=dark]),[data-theme=dark]{--wx-bg:#121314;--wx-bg-elevated:#1e1f21;--wx-bg-elevated-2:#2a2c2e;--wx-fg:#f4f4f5;--wx-fg-muted:#a1a1aa;--wx-fg-subtle:#94949e;--wx-danger:#ef4444;--wx-border:#2a2c2e;--wx-border-strong:#3f3f46;--wx-primary:#fff;--wx-primary-hover:#e4e4e7;--wx-primary-fg:#121314;--wx-launcher-bg:#fff;--wx-launcher-fg:#121314}:host{--color-wx-bg:var(--wx-bg);--color-wx-bg-elevated:var(--wx-bg-elevated);--color-wx-bg-elevated-2:var(--wx-bg-elevated-2);--color-wx-fg:var(--wx-fg);--color-wx-fg-muted:var(--wx-fg-muted);--color-wx-fg-subtle:var(--wx-fg-subtle);--color-wx-border:var(--wx-border);--color-wx-border-strong:var(--wx-border-strong);--color-wx-primary:var(--wx-primary);--color-wx-primary-hover:var(--wx-primary-hover);--color-wx-primary-fg:var(--wx-primary-fg);--color-wx-launcher-bg:var(--wx-launcher-bg);--color-wx-launcher-fg:var(--wx-launcher-fg);--color-wx-success:var(--wx-success);--color-wx-danger:var(--wx-danger);--color-wx-warning:var(--wx-warning);--radius-wx-sm:var(--wx-radius-sm);--radius-wx:var(--wx-radius);--radius-wx-lg:var(--wx-radius-lg);--radius-wx-xl:var(--wx-radius-xl);--font-sans:var(--font-geist-sans);--font-mono:var(--font-geist-mono)}html,body{height:100%;color:var(--wx-fg);background:0 0}body{font-family:var(--wx-font,var(--font-geist-sans,system-ui)), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;-webkit-font-smoothing:antialiased;margin:0;padding:0}button:not(:disabled),[role=button]:not([aria-disabled=true]),a[href],label[for],summary{cursor:pointer}button:disabled,[role=button][aria-disabled=true]{cursor:default}[data-wx-gis]>div,[data-wx-gis]>div>div{width:100%!important}[data-wx-gis] [role=button]{border-radius:var(--wx-radius)!important;width:100%!important;max-width:none!important;overflow:hidden!important}:host{font-family:var(--wx-font,var(--font-geist-sans,system-ui)), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;-webkit-font-smoothing:antialiased;color:var(--wx-fg);font-variant:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-align:start;text-shadow:none;white-space:normal;word-break:normal;overflow-wrap:normal;line-break:auto;-webkit-hyphens:manual;hyphens:manual;text-wrap:wrap;text-rendering:auto;font-feature-settings:normal;font-kerning:auto;font-variant-alternates:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;visibility:visible;pointer-events:auto;cursor:auto;-webkit-text-stroke:0;-webkit-text-fill-color:currentcolor;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;font-stretch:100%;line-height:1.5}[data-wx-panel]{font-family:var(--wx-font,var(--font-geist-sans,system-ui)), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif}*{-webkit-tap-highlight-color:transparent}[data-theme=dark] [data-wx-panel]{box-shadow:0 0 0 1px #ffffff0f,0 32px 80px #0000008c,0 0 48px #ffffff0a}[data-theme=dark] [data-wx-panel]:before{content:"";pointer-events:none;z-index:30;background:radial-gradient(circle at 0 0,#ffffff29 0%,#ffffff12 30%,#ffffff05 60%,#fff0 70%);width:260px;height:260px;position:absolute;top:0;left:0}[data-theme=dark] [data-wx-panel] header{background:0 0;border-bottom-color:#0000}[data-wx-panel]{box-shadow:0 24px 64px #0000002e}@keyframes wx-gentle-in{0%{opacity:0;translate:0 .3125rem}}.wx-gentle-in{animation:wx-gentle-in .28s cubic-bezier(.33, 1, .68, 1) var(--wx-enter-delay,0s) backwards}@media (prefers-reduced-motion:reduce){:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]){scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]){scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) :before{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) :before{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) :after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) :after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) .wx-gentle-in{animation:none!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) .wx-gentle-in{animation:none!important}:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) .animate-spin{animation-duration:2.4s!important;animation-iteration-count:infinite!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) .animate-spin{animation-duration:2.4s!important;animation-iteration-count:infinite!important}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}`;function pw({publicKey:e,user:t,mode:n,configOverride:r,theme:i,offset:a,defaultOpen:o,open:s,previewTab:c,config:l,previewData:u,hostAnchored:d,session:f,storageNamespace:p,audienceOverride:m,previewProfileFields:h,launcherMessagePreview:g,previewToken:_,onPreviewTokenExpired:v,onResize:y,onOpen:b,onClose:x,onMessageAction:S,className:w,style:T}){let E=J(null),D=m?.visitors,O=m?.origin,k=m?.path,A=q(()=>D===void 0&&O===void 0&&k===void 0?void 0:{visitors:D,origin:O,path:k},[D,O,k]),j=q(()=>h,[h?JSON.stringify(h.map(e=>[e.key,e.label])):``]),[M,N]=Y(null),[P,ee]=Y(()=>ya()),[te,ne]=Y(null);K(()=>{let e=ro(e=>{Ye(e)&&ee(e)}),t=no(()=>ee(ya()));return()=>{e(),t()}},[]);let F=J(y),re=J(b),ie=J(x),ae=J(S),oe=J(v);K(()=>{F.current=y,re.current=b,ie.current=x,ae.current=S,oe.current=v},[y,b,x,S,v]),K(()=>{let e=E.current;if(!e)return;let t=e.shadowRoot??e.attachShadow({mode:`open`});if(typeof CSSStyleSheet<`u`&&`replaceSync`in CSSStyleSheet.prototype){let e=new CSSStyleSheet;e.replaceSync(fw),t.adoptedStyleSheets=[...t.adoptedStyleSheets??[],e]}else if(!t.querySelector(`style[data-wexio-style]`)){let e=document.createElement(`style`);e.setAttribute(`data-wexio-style`,`true`),e.textContent=fw,t.appendChild(e)}let n=t.querySelector(`div[data-wexio-portal-target]`);n||(n=document.createElement(`div`),n.setAttribute(`data-wexio-portal-target`,`true`),n.style.display=`contents`,t.appendChild(n)),N(n),ne(t)},[]);let se=q(()=>{let m=n??(e?`production`:`demo`);return{kind:`web-component`,publicKeyOverride:e,modeOverride:m,configOverride:r,themeOverride:i,offset:a,defaultOpen:o,open:s,previewTab:c,configBase:l,forceDummyData:void 0,previewData:u,embedded:d??m===`preview`,isolatedSession:f===`isolated`,persistentSession:f===`persistent`,storageNamespace:p,audienceOverride:A,previewProfileFields:j,launcherMessagePreview:g,visitorIdentity:t,visitorPrefill:void 0,themeRoot:M??void 0,styleRoot:te??void 0,onResize:(e,t)=>{F.current?.({width:e,height:t})},onOpen:()=>{re.current?.()},onClose:()=>{ie.current?.()},onMessageAction:e=>{ae.current?.(e)},onPreviewTokenRequest:e=>{oe.current?.(e)},onLocaleStrategy:e=>ee(ya(e,{ignoreVisitorOverrides:m===`preview`}))}},[e,n,r,i,a,o,s,c,l,u,d,f,p,A,j,g,M,te,t]);return X(`div`,{ref:E,"data-wexio-widget-host":`true`,"data-wexio-build":C,className:w,style:T,children:M?Dn(X(mw,{env:se,locale:P,publicKey:e,previewToken:_,children:X(tw,{})}),M):null})}function mw({env:e,locale:t,publicKey:n,previewToken:r,children:i}){let a=dw(t);return X(Nn,{publicKey:n,isolated:e.isolatedSession,persistent:e.persistentSession,storageNamespace:e.storageNamespace,previewToken:r,children:X(On,{locale:a.locale,messages:a.messages,timeZone:typeof Intl<`u`?Intl.DateTimeFormat().resolvedOptions().timeZone:`UTC`,children:X(te,{env:e,children:i})})})}export{pw as WexioWidget,L as setWexioPublicKey};
|
|
175
|
+
`},Wb=0,Gb=[];function Kb(e){var t=W.useRef([]),n=W.useRef([0,0]),r=W.useRef(),i=W.useState(Wb++)[0],a=W.useState(mb)[0],o=W.useRef(e);W.useEffect(function(){o.current=e},[e]),W.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=We([e.lockRef.current],(e.shards||[]).map(Vb),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=W.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=zb(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Mb(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Mb(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Rb(h,t,e,h===`h`?s:c,!0)},[]),c=W.useCallback(function(e){var n=e;if(!(!Gb.length||Gb[Gb.length-1]!==a)){var r=`deltaY`in n?Bb(n):zb(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Hb(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Vb).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=W.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:qb(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=W.useCallback(function(e){n.current=zb(e),r.current=void 0},[]),d=W.useCallback(function(t){l(t.type,Bb(t),t.target,s(t,e.lockRef.current))},[]),f=W.useCallback(function(t){l(t.type,zb(t),t.target,s(t,e.lockRef.current))},[]);W.useEffect(function(){return Gb.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Db),document.addEventListener(`touchmove`,c,Db),document.addEventListener(`touchstart`,u,Db),function(){Gb=Gb.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Db),document.removeEventListener(`touchmove`,c,Db),document.removeEventListener(`touchstart`,u,Db)}},[]);var p=e.removeScrollBar,m=e.inert;return W.createElement(W.Fragment,null,m?W.createElement(a,{styles:Ub(i)}):null,p?W.createElement(wb,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function qb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Jb=rb(ib,Kb),Yb=W.forwardRef(function(e,t){return W.createElement(ob,St({},e,{ref:t,sideCar:Jb}))});Yb.classNames=ob.classNames;var Xb=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Zb=[` `,`Enter`],Qb=`Select`,[$b,ex,tx]=$h(Qb),[nx,rx]=Hh(Qb,[tx,ay]),ix=ay(),[ax,ox]=nx(Qb),[sx,cx]=nx(Qb),lx=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=ix(t),[g,_]=W.useState(null),[v,y]=W.useState(null),[b,x]=W.useState(!1),S=tg(l),[C,w]=Oy({prop:r,defaultProp:i??!1,onChange:a,caller:Qb}),[T,E]=Oy({prop:o,defaultProp:s,onChange:c,caller:Qb}),D=W.useRef(null),O=g?m||!!g.closest(`form`):!0,[k,A]=W.useState(new Set),j=Array.from(k).map(e=>e.props.value).join(`;`);return X(xy,{...h,children:Z(ax,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:Bg(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:D,disabled:f,children:[X($b.Provider,{scope:t,children:X(sx,{scope:e.__scopeSelect,onNativeOptionAdd:W.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:W.useCallback(e=>{A(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),O?Z(iS,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?X(`option`,{value:``}):null,Array.from(k)]},j):null]})})};lx.displayName=Qb;var ux=`SelectTrigger`,dx=W.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=ix(n),o=ox(ux,n),s=o.disabled||r,c=Kh(t,o.onTriggerChange),l=ex(n),u=W.useRef(`touch`),[d,f,p]=oS(e=>{let t=l().filter(e=>!e.disabled),n=sS(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return X(Sy,{asChild:!0,...a,children:X(ng.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":aS(o.value)?``:void 0,...i,ref:c,onClick:Vh(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:Vh(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:Vh(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Xb.includes(e.key)&&(m(),e.preventDefault())})})})});dx.displayName=ux;var fx=`SelectValue`,px=W.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=ox(fx,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Kh(t,c.onValueNodeChange);return Lg(()=>{l(u)},[l,u]),X(ng.span,{...s,ref:d,style:{pointerEvents:`none`},children:aS(c.value)?X(Dn,{children:o}):a})});px.displayName=fx;var mx=`SelectIcon`,hx=W.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return X(ng.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});hx.displayName=mx;var gx=`SelectPortal`,_x=e=>X(Ey,{asChild:!0,...e});_x.displayName=gx;var vx=`SelectContent`,yx=W.forwardRef((e,t)=>{let n=ox(vx,e.__scopeSelect),[r,i]=W.useState();if(Lg(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?On.createPortal(X(xx,{scope:e.__scopeSelect,children:X($b.Slot,{scope:e.__scopeSelect,children:X(`div`,{children:e.children})})}),t):null}return X(Tx,{...e,ref:t})});yx.displayName=vx;var bx=10,[xx,Sx]=nx(vx),Cx=`SelectContentImpl`,wx=qh(`SelectContent.RemoveScroll`),Tx=W.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=ox(vx,n),[y,b]=W.useState(null),[x,S]=W.useState(null),C=Kh(t,e=>b(e)),[w,T]=W.useState(null),[E,D]=W.useState(null),O=ex(n),[k,A]=W.useState(!1),j=W.useRef(!1);W.useEffect(()=>{if(y)return Uy(y)},[y]),yg();let M=W.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),N=W.useCallback(()=>M([w,y]),[M,w,y]);W.useEffect(()=>{k&&N()},[k,N]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;W.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null};return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,P,F]),W.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[ee,te]=oS(e=>{let t=O().filter(e=>!e.disabled),n=sS(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=W.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(j.current=!0))},[v.value]),re=W.useCallback(()=>y?.focus(),[y]),ie=W.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),ae=r===`popper`?kx:Dx,oe=ae===kx?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return X(xx,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:w,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:N,selectedItemText:E,position:r,isPositioned:k,searchRef:ee,children:X(Yb,{as:wx,allowPinchZoom:!0,children:X(Tg,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Vh(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:X(dg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:X(ae,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...oe,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:Vh(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});Tx.displayName=Cx;var Ex=`SelectItemAlignedPosition`,Dx=W.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=ox(vx,n),o=Sx(vx,n),[s,c]=W.useState(null),[l,u]=W.useState(null),d=Kh(t,e=>u(e)),f=ex(n),p=W.useRef(!1),m=W.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=W.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-bx,d=Bh(a,[bx,Math.max(bx,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-bx,d=Bh(a,[bx,Math.max(bx,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-bx*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-bx,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${bx}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Lg(()=>y(),[y]);let[b,x]=W.useState();return Lg(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),X(Ax,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:W.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:X(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:X(ng.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Dx.displayName=Ex;var Ox=`SelectPopperPosition`,kx=W.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=bx,...a}=e;return X(Cy,{...ix(n),...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});kx.displayName=Ox;var[Ax,jx]=nx(vx,{}),Mx=`SelectViewport`,Nx=W.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=Sx(Mx,n),o=jx(Mx,n),s=Kh(t,a.onViewportChange),c=W.useRef(0);return Z(Dn,{children:[X(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),X($b.Slot,{scope:n,children:X(ng.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Vh(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-bx*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});Nx.displayName=Mx;var Px=`SelectGroup`,[Fx,Ix]=nx(Px),Lx=W.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Bg();return X(Fx,{scope:n,id:i,children:X(ng.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Lx.displayName=Px;var Rx=`SelectLabel`,zx=W.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Ix(Rx,n);return X(ng.div,{id:i.id,...r,ref:t})});zx.displayName=Rx;var Bx=`SelectItem`,[Vx,Hx]=nx(Bx),Ux=W.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=ox(Bx,n),c=Sx(Bx,n),l=s.value===r,[u,d]=W.useState(a??``),[f,p]=W.useState(!1),m=Kh(t,e=>c.itemRefCallback?.(e,r,i)),h=Bg(),g=W.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return X(Vx,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:W.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:X($b.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:X(ng.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:Vh(o.onFocus,()=>p(!0)),onBlur:Vh(o.onBlur,()=>p(!1)),onClick:Vh(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:Vh(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:Vh(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:Vh(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Vh(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Vh(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(Zb.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});Ux.displayName=Bx;var Wx=`SelectItemText`,Gx=W.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=ox(Wx,n),s=Sx(Wx,n),c=Hx(Wx,n),l=cx(Wx,n),[u,d]=W.useState(null),f=Kh(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=W.useMemo(()=>X(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Lg(()=>(h(m),()=>g(m)),[h,g,m]),Z(Dn,{children:[X(ng.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?On.createPortal(a.children,o.valueNode):null]})});Gx.displayName=Wx;var Kx=`SelectItemIndicator`,qx=W.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Hx(Kx,n).isSelected?X(ng.span,{"aria-hidden":!0,...r,ref:t}):null});qx.displayName=Kx;var Jx=`SelectScrollUpButton`,Yx=W.forwardRef((e,t)=>{let n=Sx(Jx,e.__scopeSelect),r=jx(Jx,e.__scopeSelect),[i,a]=W.useState(!1),o=Kh(t,r.onScrollButtonChange);return Lg(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?X(Qx,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Yx.displayName=Jx;var Xx=`SelectScrollDownButton`,Zx=W.forwardRef((e,t)=>{let n=Sx(Xx,e.__scopeSelect),r=jx(Xx,e.__scopeSelect),[i,a]=W.useState(!1),o=Kh(t,r.onScrollButtonChange);return Lg(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?X(Qx,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Zx.displayName=Xx;var Qx=W.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Sx(`SelectScrollButton`,n),o=W.useRef(null),s=ex(n),c=W.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return W.useEffect(()=>()=>c(),[c]),Lg(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),X(ng.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Vh(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Vh(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Vh(i.onPointerLeave,()=>{c()})})}),$x=`SelectSeparator`,eS=W.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return X(ng.div,{"aria-hidden":!0,...r,ref:t})});eS.displayName=$x;var tS=`SelectArrow`,nS=W.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=ix(n),a=ox(tS,n),o=Sx(tS,n);return a.open&&o.position===`popper`?X(wy,{...i,...r,ref:t}):null});nS.displayName=tS;var rS=`SelectBubbleInput`,iS=W.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=W.useRef(null),a=Kh(r,i),o=jy(t);return W.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),X(ng.select,{...n,style:{...My,...n.style},ref:a,defaultValue:t})});iS.displayName=rS;function aS(e){return e===``||e===void 0}function oS(e){let t=qe(e),n=W.useRef(``),r=W.useRef(0),i=W.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=W.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return W.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function sS(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=cS(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function cS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lS=lx,uS=dx,dS=px,fS=hx,pS=_x,mS=yx,hS=Nx,gS=Ux,_S=Gx,vS=qx;function yS({modal:e=!1,...t}){return X(lS,{modal:e,...t})}var bS=dS,xS=W.forwardRef(({className:e,children:t,...n},r)=>Z(uS,{ref:r,className:u(`flex h-9 w-full items-center justify-between gap-2 rounded-wx-sm border border-wx-border bg-wx-bg px-3 py-2 text-sm text-wx-fg`,`placeholder:text-wx-fg-subtle`,`focus:border-wx-primary focus:outline-none focus:ring-2 focus:ring-wx-primary/20`,`disabled:cursor-not-allowed disabled:bg-wx-bg-elevated/60 disabled:text-wx-fg-muted`,`[&>span]:line-clamp-1`,e),...n,children:[t,X(fS,{asChild:!0,children:X(ge,{size:14,className:`opacity-60`,"aria-hidden":`true`})})]}));xS.displayName=uS.displayName;var SS=W.forwardRef(({className:e,children:t,position:n=`popper`,...r},i)=>X(pS,{container:fe().themeRoot??void 0,children:X(mS,{ref:i,position:n,className:u(`relative z-2147483602 max-h-72 min-w-32 overflow-hidden rounded-wx-sm border border-wx-border bg-wx-bg text-wx-fg shadow-lg`,`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),...r,children:X(hS,{className:u(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t})})}));SS.displayName=mS.displayName;var CS=W.forwardRef(({className:e,children:t,...n},r)=>Z(gS,{ref:r,className:u(`relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pr-2 pl-7 text-sm outline-none`,`focus:bg-wx-bg-elevated focus:text-wx-fg`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[state=checked]:font-medium`,e),...n,children:[X(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:X(vS,{children:X(C,{size:12,className:`text-wx-primary`,"aria-hidden":`true`})})}),X(_S,{children:t})]}));CS.displayName=gS.displayName;function wS(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}var TS=new Set(`avatar.wexioId.telegramId.whatsappId.viberId.instagramId.optInWhatsapp.webVerified.firstName.lastName.username.language.email.phone.company.location.isValid.chatStatus.chatCategory.priority.leadSource.leadStatus.interestLevel.productInterest.budgetRange.purchaseTimeline.lastMessageSentAt.lastMessageReceivedAt.lastSeenAt.firstMessageReceivedAt.isBlocked.registrationDate.aiAvailable.totalMessagesSent.totalMessagesReceived.totalAiMessagesSent.totalBotMessagesSent.totalUserMessagesSent.flowCompletionRate.lastFlowCompleted.totalFlowsStarted.totalFlowsCompleted`.split(`.`)),ES=new Set([`chatStatus`,`chatCategory`,`priority`,`leadStatus`,`interestLevel`]);function DS(e,t,n){let r=wS(e);return TS.has(r)?n(`systemFields.${r}`):t}function OS(e,t,n){let r=wS(e);return ES.has(r)?n(`systemFieldOptions.${r}.${t}`):jS(t)}function kS({id:e,fieldKey:t,mode:n,options:r,value:i,disabled:a,onChange:o,t:s}){return r.length===0?X(`p`,{id:e,className:`text-[11px] text-wx-fg-subtle italic`,children:s(`noOptions`)}):Z(yS,{value:(n===`single`?i??``:fh(i)[0]??``)||void 0,disabled:a,onValueChange:e=>{if(e===`__clear__`||!e){o(null);return}o(n===`single`?e:JSON.stringify([e]))},children:[X(xS,{id:e,"aria-label":s(`selectOption`),children:X(bS,{placeholder:`—`})}),Z(SS,{children:[X(CS,{value:`__clear__`,children:`—`}),r.map(e=>X(CS,{value:e,children:OS(t,e,s)},e))]})]})}var AS=new Set([`URL`,`ID`,`AI`,`API`,`VIP`,`CRM`,`SMS`]);function jS(e){if(!e)return e;let t=e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/[\s_-]+/).filter(Boolean);return t.length===0?e:t.map((e,t)=>{let n=e.toUpperCase();if(AS.has(n))return n;let r=e.toLowerCase();return t===0?r.charAt(0).toUpperCase()+r.slice(1):r}).join(` `)}function MS({id:e,fieldKey:t,value:n,disabled:r,onChange:i}){return X(`input`,{id:e,type:t===`email`?`email`:t===`phone`?`tel`:`text`,value:n??``,disabled:r,autoComplete:t===`email`?`email`:t===`phone`?`tel`:t===`firstName`?`given-name`:t===`lastName`?`family-name`:void 0,placeholder:t===`phone`?`+1 555 123 4567`:void 0,onChange:e=>i(e.target.value||null),className:Lh})}function NS({id:e,field:t,value:n,onChange:r,t:i}){let a=t.pinned;switch(t.type){case`BOOLEAN`:return X(Ih,{id:e,value:n,disabled:a,onChange:r});case`NUMBER`:return X(zh,{id:e,value:n,disabled:a,onChange:r});case`DATE`:return X(Rh,{id:e,value:n,disabled:a,onChange:r});case`ENUM`:return X(kS,{id:e,fieldKey:t.key,mode:`single`,options:t.options??[],value:n,disabled:a,onChange:r,t:i});case`ARRAY`:return X(kS,{id:e,fieldKey:t.key,mode:`multi`,options:t.options??[],value:n,disabled:a,onChange:r,t:i});case`AVATAR`:return null;default:return X(MS,{id:e,fieldKey:t.key,value:n,disabled:a,onChange:r})}}function PS({field:e,value:t,onChange:n,error:r,t:i}){let a=e.pinned,o=`wx-profile-${e.key}`;return Z(`div`,{className:`flex flex-col gap-1.5`,children:[Z(`label`,{htmlFor:o,className:`flex items-baseline justify-between gap-2 text-xs font-medium text-wx-fg-muted`,children:[Z(`span`,{className:`inline-flex items-center gap-1`,children:[DS(e.key,e.label,i),e.required&&Z(`span`,{className:`text-wx-danger`,title:i(`requiredHint`),children:[`*`,X(`span`,{className:`sr-only`,children:i(`requiredHint`)})]}),a&&X(Bs,{size:11,"aria-hidden":`true`,className:`text-wx-fg-subtle`})]}),a&&X(`span`,{className:`text-[10px] font-normal text-wx-fg-subtle`,children:i(`pinnedHint`)})]}),X(NS,{id:o,field:e,value:t,onChange:n,t:i}),r&&X(`p`,{className:`text-[11px] text-wx-danger`,children:r})]})}function FS({eyebrow:e,adornment:t,children:n}){return Z(`section`,{className:`mt-6 flex flex-col gap-4 border-wx-border border-t pt-5 first:mt-4 first:border-t-0 first:pt-0`,children:[Z(`div`,{className:`flex items-baseline justify-between gap-2`,children:[X(`h2`,{className:`text-[11px] font-semibold tracking-[0.08em] text-wx-fg-subtle uppercase`,children:e}),t]}),X(`div`,{className:`flex flex-col gap-4`,children:n})]})}function IS({label:e,hint:t,children:n}){return Z(`div`,{className:`flex items-center justify-between gap-3`,children:[Z(`div`,{className:`flex min-w-0 flex-col`,children:[X(`span`,{className:`text-sm font-medium text-wx-fg`,children:e}),t&&X(`span`,{className:`text-[11px] text-wx-fg-muted`,children:t})]}),X(`div`,{className:`shrink-0`,children:n})]})}var LS=[{value:`system`,icon:Ks,labelKey:`themeAuto`},{value:`light`,icon:cc,labelKey:`themeLight`},{value:`dark`,icon:qs,labelKey:`themeDark`}];function RS({profile:e,locale:t,themeMode:n,prefSaving:r,applyPref:i,onNotificationError:a,t:o}){let s=ce,c=n===`auto`;return Z(FS,{eyebrow:o(`preferencesHeading`),adornment:r?Z(`span`,{className:`inline-flex items-center gap-1 text-[10px] font-normal text-wx-fg-subtle`,children:[X(zs,{size:10,className:`animate-spin`,"aria-hidden":`true`}),o(`saving`)]}):void 0,children:[X(IS,{label:o(`preferenceLanguage`),children:X(`div`,{className:`w-40`,children:Z(yS,{value:e.preferences.language??t,disabled:r===`language`,onValueChange:e=>i(`language`,e||null),children:[X(xS,{"aria-label":o(`preferenceLanguage`),children:X(bS,{})}),X(SS,{children:s.map(e=>X(CS,{value:e,children:vt(e)},e))})]})})}),c&&X(IS,{label:o(`preferenceThemeMode`),children:X(`div`,{className:`inline-flex items-center gap-0.5 rounded-full bg-wx-bg-elevated p-0.5`,children:LS.map(({value:t,icon:n,labelKey:a})=>{let s=(e.preferences.themeMode??`system`)===t;return X(`button`,{type:`button`,"aria-pressed":s,"aria-label":o(a),title:o(a),disabled:r===`themeMode`,onClick:()=>i(`themeMode`,t),className:u(`flex h-7 w-9 items-center justify-center rounded-full transition-all`,s?`bg-wx-bg text-wx-fg shadow-[0_1px_3px_rgba(0,0,0,0.08)]`:`text-wx-fg-muted hover:text-wx-fg`,`disabled:cursor-not-allowed disabled:opacity-50`),children:X(n,{size:13,"aria-hidden":`true`})},t)})})}),X(IS,{label:o(`preferenceDesktopNotifications`),hint:o(`preferenceDesktopNotificationsHint`),children:X(Fh,{"aria-label":o(`preferenceDesktopNotifications`),checked:!!e.preferences.desktopNotifications&&(typeof Notification>`u`||Notification.permission===`granted`),onChange:async e=>{if(!e){i(`desktopNotifications`,!1);return}if(typeof Notification>`u`){a(`notificationsRequest`);return}if(Notification.permission===`denied`){a(`notificationsBlocked`);return}if(Notification.permission===`default`)try{if(await Notification.requestPermission()!==`granted`){a(`notificationsBlocked`);return}}catch{a(`notificationsRequest`);return}i(`desktopNotifications`,!0)}})})]})}function zS(e,t){let n=new Set(e.fields.map(e=>e.key)),r=[];for(let e of t)n.has(e.key)||(n.add(e.key),r.push({__typename:`VisitorProfileField`,key:e.key,label:e.label||e.key,type:`STRING`,required:!1,pinned:!0,options:null,value:``}));return r.length===0?e:{...e,fields:[...e.fields,...r]}}function BS(e){let t=e,n=[];if(t?.graphQLErrors)for(let e of t.graphQLErrors){let t=e.extensions?.code;typeof t==`string`&&n.push(t)}typeof t?.message==`string`&&n.push(t.message);for(let e of n){if(e===`webProfileFieldNotAllowed`)return`fieldNotAllowed`;if(e===`webProfileFieldPinned`)return`fieldPinned`;if(e===`webProfileThemeLocked`)return`themeLocked`;if(e===`webProfileFeatureDisabled`)return`featureDisabled`;if(e===`peopleFields.invalidValue`)return`fieldInvalid`}return`generic`}function VS(e){let t=e;if(!t?.graphQLErrors)return null;for(let e of t.graphQLErrors){let t=e.extensions;if(t&&t.code===`peopleFields.invalidValue`){if(typeof t.field==`string`)return t.field;if(typeof t.key==`string`)return t.key}}return null}function HS(e){switch(e){case`fieldNotAllowed`:return`errorFieldNotAllowed`;case`fieldPinned`:return`errorFieldPinned`;case`themeLocked`:return`errorThemeLocked`;case`featureDisabled`:return`errorFeatureDisabled`;case`fieldInvalid`:return`errorFieldInvalid`;default:return`errorGeneric`}}function US({sent:e,current:t,saved:n}){let r={...n},i=!1;for(let a of new Set([...Object.keys(e),...Object.keys(t)])){let o=t[a]??null;o!==(e[a]??null)&&(r[a]=o,o!==(n[a]??null)&&(i=!0))}return{values:r,hasEdits:i}}function WS(e,t){let n=new Map(t.map(e=>[e.key,e.value]));return{...e,fields:e.fields.map(e=>n.has(e.key)?{...e,value:n.get(e.key)||null}:e)}}function GS(e,t,n){let[r]=mr(),i=bt(),a=lt(),[o,s]=Y(null),[c,l]=Y(null),u=G(()=>l(null),[]);return{apply:G(async(o,c)=>{if(!e)return;if(n){n(o,c),o===`language`&&typeof c==`string`&&fo(c);return}s(o),l(null);let u={[o]:c},d={__typename:`VisitorProfilePreferences`,...e.preferences,...u};if(i){a.writeQuery({query:dr,data:{visitorProfile:{...e,preferences:d}}}),o===`language`&&typeof c==`string`&&fo(c);let{__typename:t,...n}=d;i.enqueue({op:`setPreferences`,semantics:`convergence`,convergenceKey:`preferences`,payload:n}),s(null);return}try{await r({variables:{input:{preferences:u}},optimisticResponse:{__typename:`Mutation`,updateVisitorProfile:{__typename:`VisitorProfile`,...e,preferences:d}},update:(e,{data:t})=>{let n=t?.updateVisitorProfile;n&&e.writeQuery({query:dr,data:{visitorProfile:n}})}}),o===`language`&&typeof c==`string`&&fo(c)}catch(e){l(t(HS(BS(e))))}finally{s(null)}},[e,t,r,n,i,a]),saving:o,error:c,clearError:u}}var KS=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function qS(e){return e?KS.test(e.trim())?null:`invalidEmail`:null}var JS=null;async function YS(){if(!JS)try{JS=(await import(`./widget-react-Ds-6CsP4.js`)).isValidPhoneNumber}catch(e){console.warn(`[wexio] the "phone-validation" chunk failed to load; only the "+" check applies`,e)}}function XS(e){if(!e)return null;let t=e.trim();return t.startsWith(`+`)&&(!JS||JS(t))?null:`invalidPhone`}function ZS(e,t){return t==null||t===``?null:e.key===`email`?qS(t):e.key===`phone`?XS(t):null}function QS({isDummy:e,pending:t=!1}){let r=i(`profile`),a=n(),{config:o}=Tt(),s=fe(),c=s.demoProfileFields,{token:l}=_(),d=l||s.audienceOverride?s.previewProfileFields:void 0,{data:f,loading:p,error:m,refetch:h}=fr({skip:e||t}),[g,v]=Y([]),y=q(()=>e?WS(eC(a,c),g):null,[e,a,c,g]),b=co(),x=q(()=>{if(y)return{...y,preferences:{...y.preferences,...b.themeMode!=null&&{themeMode:b.themeMode},...b.language!=null&&{language:b.language},desktopNotifications:b.desktopNotifications}};let e=f?.visitorProfile;return e&&d?zS(e,d):e},[y,b,f?.visitorProfile,d]),[S,{loading:w}]=mr(),{refresh:T}=li(),E=lt(),D=bt(),[O,{loading:k}]=Ot(),A=G((e,t)=>{e===`language`?so(`language`,typeof t==`string`?t:null):e===`themeMode`?so(`themeMode`,$S(t)):e===`desktopNotifications`&&so(`desktopNotifications`,!!t)},[]),{apply:j,saving:M,error:N}=GS(x,r,e?A:void 0),[P,F]=Y({}),[ee,te]=Y(!1),[ne,re]=Y(!1),[ie,ae]=Y(null),[oe,se]=Y({}),ce=J(P);ce.current=P;let I=J(null);K(()=>{YS()},[]),K(()=>()=>{I.current&&clearTimeout(I.current)},[]);let le=G(()=>{re(!0),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>re(!1),2400)},[]),ue=J(Date.now()),de=D?.dropped;K(()=>{de&&de.at>ue.current&&ae(r(`errorGeneric`))},[de,r]),K(()=>{x&&(ee||F(oh(x)))},[x,ee]);let pe=o.messenger?.profile?.fields??null,{avatarField:me,regularFields:he}=q(()=>{if(!x)return{avatarField:null,regularFields:[]};let e=x.fields.find(e=>e.type===`AVATAR`)??null,t=x.fields.filter(e=>e.type!==`AVATAR`);if(!pe)return{avatarField:e,regularFields:t};let n=new Map(t.map(e=>[e.key,e])),r=pe.map(e=>n.get(e)).filter(e=>!!e);if(d){let e=new Set(d.map(e=>e.key));for(let n of t)n.pinned&&e.has(n.key)&&!r.includes(n)&&r.push(n)}return{avatarField:e&&pe.includes(e.key)?e:null,regularFields:r}},[x,pe,d]),ge=G((e,t)=>{F(n=>({...n,[e]:t})),te(!0),re(!1),ae(null),se(t=>{if(!t[e])return t;let n={...t};return delete n[e],n})},[]),_e=G(()=>{x&&(F(oh(x)),te(!1),ae(null),se({}))},[x]),ve=G(async()=>{if(!x)return;await YS();let t={};for(let e of x.fields){if(e.pinned)continue;let n=P[e.key]??null;if(e.required&&sh(n)){t[e.key]=r(`requiredHint`);continue}let i=ZS(e,n);i&&(t[e.key]=r(i))}if(Object.keys(t).length>0){se(t),ae(r(`errorFieldInvalid`));return}let n=lh(x.fields,P);if(n.length===0)return;ae(null),se({});let i=e=>{let t=US({sent:P,current:ce.current,saved:oh(e)});F(t.values),te(t.hasEdits),le()};if(e){v(e=>[...e.filter(e=>!n.some(t=>t.key===e.key)),...n]),i(WS(x,n));return}if(D&&!D.online){D.enqueue({op:`setProfile`,semantics:`convergence`,convergenceKey:`profile`,payload:{fields:n}});let e=WS(x,n);E.writeQuery({query:dr,data:{visitorProfile:e}}),i(e);return}try{let e=(await S({variables:{input:{fields:n}},update:(e,{data:t})=>{let n=t?.updateVisitorProfile;n&&e.writeQuery({query:dr,data:{visitorProfile:n}})}})).data?.updateVisitorProfile;e&&(i(e),T())}catch(e){let t=BS(e);if(t===`fieldInvalid`){let t=VS(e);t&&se({[t]:r(`errorFieldInvalid`)})}ae(r(HS(t)))}},[x,r,S,P,e,D,E,le,T]),ye=G(async t=>{if(me){if(ae(null),!Nd.has(t.type)||!t.type.startsWith(`image/`)){ae(r(`errorGeneric`));return}if(t.size>10485760){ae(r(`errorGeneric`));return}try{if(e){let{base64:e}=await Md(t);ge(me.key,`data:${t.type};base64,${e}`);return}let{base64:n}=await Md(t),r=(await O({variables:{input:{filename:t.name,mimetype:t.type,dataBase64:n}}})).data?.uploadVisitorMedia?.url;if(!r)throw Error(`empty upload response`);ge(me.key,r)}catch{ae(r(`errorGeneric`))}}},[me,e,ge,r,O]);if(p||t)return X(it,{className:`flex-1`,children:Z(`div`,{className:`flex flex-col gap-4 px-5 py-6`,"aria-busy":`true`,children:[Z(`div`,{className:`mx-auto flex flex-col items-center gap-3`,children:[X(U,{className:`h-24 w-24 rounded-full`}),X(U,{className:`h-4 w-32 rounded`})]}),X(U,{className:`h-9 w-full rounded-wx-sm`}),X(U,{className:`h-9 w-full rounded-wx-sm`}),X(U,{className:`h-9 w-full rounded-wx-sm`}),X(`span`,{className:`sr-only`,children:r(`loading`)})]})});if(m||!x)return Z(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-4 px-6 py-10 text-center`,children:[X(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full bg-wx-danger/10 text-wx-danger`,children:X(xs,{size:24,"aria-hidden":`true`})}),X(`p`,{className:`max-w-xs text-sm text-wx-fg-muted`,children:r(`loadError`)}),Z(`button`,{type:`button`,onClick:()=>h(),className:`inline-flex items-center gap-1.5 rounded-full bg-wx-primary px-4 py-2 text-sm font-medium text-wx-primary-fg transition-colors hover:bg-wx-primary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg`,children:[X(Qs,{size:14,"aria-hidden":`true`}),r(`retry`)]})]});let be=me?P[me.key]??null:null,L=uh(x,P);return Z(`div`,{className:`flex h-full min-h-0 flex-col`,children:[X(it,{className:`min-h-0 flex-1`,children:Z(`form`,{id:`wx-profile-form`,noValidate:!0,onSubmit:e=>{e.preventDefault(),ve()},className:`flex flex-col px-5 pt-2 pb-4`,children:[me&&X(Ph,{field:me,value:be,uploading:k,onPick:ye,onClear:()=>ge(me.key,null),displayName:L,t:r}),he.length>0&&X(FS,{eyebrow:r(`title`),children:he.map(e=>X(PS,{field:e,value:P[e.key]??null,onChange:t=>ge(e.key,t),error:oe[e.key],t:r},e.key))}),!me&&he.length===0&&X(`p`,{className:`py-6 text-center text-sm text-wx-fg-muted`,children:r(`noFields`)}),X(RS,{profile:x,locale:a,themeMode:o.themeMode,prefSaving:M,applyPref:j,onNotificationError:e=>ae(e?r(e):null),t:r}),(ie??N)&&Z(`p`,{className:`mt-4 flex items-start gap-1.5 rounded-wx-sm bg-wx-danger/10 px-3 py-2 text-xs text-wx-danger`,children:[X(Nt,{size:13,"aria-hidden":`true`,className:`mt-0.5 shrink-0`}),X(`span`,{children:ie??N})]}),ne&&!ie&&!N&&Z(`p`,{className:`mt-4 flex items-center gap-1.5 rounded-wx-sm bg-wx-success/10 px-3 py-2 text-xs text-wx-success`,children:[X(C,{size:13,"aria-hidden":`true`}),X(`span`,{children:r(`saved`)})]})]})}),ee&&Z(`div`,{className:`flex items-center gap-2 border-t border-wx-border bg-wx-bg/95 px-4 py-3 backdrop-blur`,children:[Z(`button`,{type:`submit`,form:`wx-profile-form`,disabled:w,className:u(`flex flex-1 items-center justify-center gap-1.5 rounded-full bg-wx-primary px-4 py-2 text-sm font-semibold text-wx-primary-fg`,`hover:bg-wx-primary-hover disabled:cursor-not-allowed disabled:opacity-60`),children:[w&&X(zs,{size:14,className:`animate-spin`,"aria-hidden":`true`}),r(w?`saving`:`save`)]}),X(`button`,{type:`button`,onClick:_e,disabled:w,className:u(`rounded-full bg-wx-bg-elevated px-4 py-2 text-sm font-medium text-wx-fg`,`hover:bg-wx-bg-elevated-2 disabled:cursor-not-allowed disabled:opacity-60`),children:r(`cancel`)})]})]})}function $S(e){if(typeof e!=`string`)return null;let t=e.toLowerCase();return t===`light`||t===`dark`?t:t===`auto`||t===`system`?`auto`:null}function eC(e,t=[]){return{themeModeEditable:!0,preferences:{language:e,themeMode:`system`,desktopNotifications:!1},fields:[{key:`avatar`,label:`Avatar`,type:`AVATAR`,required:!1,pinned:!1,value:null},{key:`name`,label:`Name`,type:`STRING`,required:!1,pinned:!1,value:`John Doe`},{key:`email`,label:`Email`,type:`STRING`,required:!1,pinned:!1,value:``},{key:`phone`,label:`Phone`,type:`STRING`,required:!1,pinned:!1,value:``},...t.map(e=>({key:e.key,label:e.label||e.key,type:`STRING`,required:!1,pinned:!1,value:``}))]}}var tC=`data-wx-pointer`,nC={onPointerDown:e=>{e.currentTarget.setAttribute(tC,``)},onBlur:e=>{e.currentTarget.removeAttribute(tC)},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.currentTarget.removeAttribute(tC)}};function rC({isOpen:e,onToggle:t,unreadCount:n=0,newsUnread:r=!1,logoUrl:a=null,position:s=`right`,embedded:c=!1,loading:l=!1}){let d=i(`launcher`),f=i(`news`),p=fn(),m=fn(),h=e?m.parentHandlers:p.parentHandlers,g=n+ +!!r,_=!e&&n>0,v=!e&&n===0&&r;return Z(o.button,{type:`button`,"data-wx-fab":``,ref:br.fab,onClick:l?void 0:t,disabled:l,"aria-label":d(e?`close`:`open`),"aria-busy":l||void 0,whileHover:l?void 0:{scale:1.05},whileTap:l?void 0:{scale:.92},transition:{type:`spring`,stiffness:400,damping:22},onHoverStart:h.onMouseEnter,onHoverEnd:h.onMouseLeave,...h,onPointerDown:nC.onPointerDown,onKeyDown:nC.onKeyDown,onBlur:e=>{h.onBlur(),nC.onBlur(e)},className:u(c?`absolute`:`fixed`,`bottom-4 z-2147483600`,s===`left`?`left-4`:`right-4`,`flex h-14 w-14 items-center justify-center rounded-full`,`bg-wx-launcher-bg text-wx-launcher-fg`,`shadow-[0_8px_24px_rgba(0,0,0,0.18)]`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-launcher-bg focus-visible:ring-offset-2 focus-visible:ring-offset-white`,`data-wx-pointer:focus-visible:ring-0 data-wx-pointer:focus-visible:ring-offset-0`),style:s===`left`?{marginBottom:`var(--wx-off-y,0px)`,marginLeft:`var(--wx-off-x,0px)`}:{marginBottom:`var(--wx-off-y,0px)`,marginRight:`var(--wx-off-x,0px)`},children:[X(`span`,{"aria-hidden":!0,className:`contents`,children:X(xc,{count:_?g:0,dot:v,label:v?f(`unread`):void 0,size:`md`,className:`absolute -top-1 -right-1 z-10`})}),X(Mt,{mode:`wait`,initial:!1,children:e?X(o.span,{initial:{opacity:0,rotate:-90,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:90,scale:.7},transition:{duration:.18},children:X(Lt,{ref:m.iconRef,size:24})},`x`):a?X(o.span,{initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{duration:.18},className:`absolute inset-0 overflow-hidden rounded-full`,children:X(`img`,{src:a,alt:``,className:`h-full w-full object-cover`})},`logo`):X(o.span,{initial:{opacity:0,rotate:90,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:-90,scale:.7},transition:{duration:.18},children:X(Ft,{ref:p.iconRef,size:24,className:`[&_svg]:fill-current [&_svg]:stroke-current`})},`chat`)})]})}function iC(e,t,n){let r=``;if(e)try{r=(new DOMParser().parseFromString(e,`text/html`).body.textContent??``).replace(/\s+/g,` `).trim()}catch{r=e.replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim()}if(r)return r;if(t.length===0)return n.newMessage;let i=t[0]?.mimetype??``,a=i.startsWith(`image/`)?n.image:i.startsWith(`video/`)?n.video:i.startsWith(`audio/`)?n.voiceMessage:n.attachment;return t.length>1?`${a} +${t.length-1}`:a}function aC(e,t){t.playInbound(),t.markPeekTarget(),t.writeRecent();let{notify:n}=t,r=typeof Notification<`u`&&Notification.permission===`granted`;if(!(!n.enabled||!r||n.reading))try{let t=new Notification(n.title||n.labels.newMessage,{body:iC(e.lastMessagePreview??``,[],n.labels),tag:e.lastMessageId??`${e.threadId}@${e.lastMessageAt??``}`,icon:e.lastMessageSenderAvatar??n.orgLogoUrl??void 0});t.onclick=()=>{try{window.focus()}catch{}n.open(),t.close()}}catch(e){console.warn(`[wexio] desktop notification failed:`,e)}}function oC({open:e,errorCode:t,onRetry:n,onDismiss:r,position:a=`right`,embedded:s=!1}){let c=i(`authError`),l=a===`left`,d=t?.startsWith(`turnstile_failed:`)??!1,f=t===Va,p=c(f?`visitorLimitTitle`:d?`turnstileTitle`:`genericTitle`),m=c(f?`visitorLimitBody`:d?`turnstileBody`:`genericBody`);return X(Mt,{children:e&&X(o.div,{initial:{opacity:0,y:18,scale:.88},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.96},transition:{type:`spring`,stiffness:440,damping:20},className:u(`bottom-24 z-2147483599 w-[300px]`,s?`absolute`:`fixed`,l?`left-4`:`right-4`),"data-wx-popup":``,ref:br.popup,role:`alert`,"aria-live":`polite`,"aria-label":p,children:Z(`div`,{className:u(`relative rounded-wx-lg border border-wx-border bg-wx-bg`,`p-4 pr-9 text-wx-fg`,`shadow-[0_16px_40px_rgba(0,0,0,0.16)]`),children:[X(`button`,{type:`button`,onClick:r,"aria-label":c(`dismiss`),className:u(`absolute top-2 right-2 flex h-6 w-6 items-center justify-center rounded-full`,`text-wx-fg-muted transition-colors hover:bg-wx-bg-elevated hover:text-wx-fg`),children:X(Nt,{size:12})}),Z(`div`,{className:`flex items-start gap-3`,children:[X(`div`,{className:u(`flex h-8 w-8 shrink-0 items-center justify-center rounded-full`,`bg-wx-danger/10 text-wx-danger`),children:X(d||f?ec:Qs,{size:16,"aria-hidden":`true`})}),Z(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[X(`p`,{className:`text-sm font-medium text-wx-fg`,children:p}),X(`p`,{className:`text-xs leading-relaxed text-wx-fg-muted`,children:m})]})]}),!f&&X(`div`,{className:`mt-3 flex justify-end`,children:Z(`button`,{type:`button`,onClick:n,className:u(`inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-xs font-medium`,`bg-wx-primary text-wx-primary-fg transition-colors`,`hover:bg-wx-primary-hover`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg`),children:[X(Qs,{size:12,"aria-hidden":`true`}),c(`retry`)]})})]})})})}var sC=e=>e.chatId===``;function cC(e){return e.reduce((e,t)=>sC(t)?e:e+(t.unreadCount||0),0)}function lC(e,t){return e.lastMessageDeletedId?!t||t===e.lastMessageDeletedId:!1}function uC(e,t){t.lastMessageDeletedId&&e[t.threadId]===t.lastMessageDeletedId&&delete e[t.threadId],t.lastMessageId&&(e[t.threadId]=t.lastMessageId)}function dC(e,t,n){let r=lC(t,e[t.threadId]??n);return uC(e,t),{frame:t.lastMessageDeletedId&&!r?{...t,lastMessageDeletedId:null}:t,refetch:r}}var fC=32,pC=420,mC=640;function hC(e){if(e===null)return!0;let t=e-fC;return Math.min(mC,t)>Math.min(pC,t)}function gC(e){if(typeof e!=`string`)return`auto`;let t=e.toLowerCase();return t===`light`||t===`dark`||t===`auto`?t:`auto`}function _C(e,t){if(!e)return null;let n=t===`dark`?e.dark:e.light,r=t===`dark`?e.light:e.dark;return n??r??null}function vC(e){let t=new Set([`BAD_USER_INPUT`,`BAD_REQUEST`,`GRAPHQL_VALIDATION_FAILED`,`VISITOR_BLOCKED`,`THREAD_BLOCKED`]),n=new Set([400,413,422]);if(!e||typeof e!=`object`)return!1;if(re(e))return!0;let r=e=>{if(!e||typeof e!=`object`)return!1;let r=e;if(typeof r.code==`string`&&t.has(r.code))return!0;let i=r.response?.statusCode;return typeof i==`number`&&n.has(i)},i=e.graphQLErrors;if(Array.isArray(i)){for(let e of i)if(e&&typeof e==`object`&&r(e.extensions))return!0}let a=e.networkError;if(a&&typeof a==`object`){let e=a.statusCode;if(typeof e==`number`&&n.has(e))return!0}return!1}function yC(e){return e===`messages`?{kind:`messages`}:e===`help`?{kind:`help`}:e===`news`?{kind:`news`}:e===`profile`?{kind:`profile`}:{kind:`home`}}function bC(e){switch(e.kind){case`home`:return 0;case`messages`:return 1;case`messages-thread`:return 1.5;case`help`:return 2;case`help-category`:return 2.5;case`help-article`:return 2.75;case`news`:return 3;case`news-article`:return 3.25;case`profile`:return 4}}function xC(e){return e.kind===`help-category`?`help-category:${e.categoryId}`:e.kind===`help-article`?`help-article:${e.slug}`:e.kind===`news-article`?`news-article:${e.id}`:e.kind===`messages-thread`?`messages-thread:${e.keyAs??e.threadKey??`main`}`:e.kind}var SC={enter:e=>({x:e>0?28:e<0?-28:0,opacity:0}),center:{x:0,opacity:1},exit:e=>({x:e>0?-28:e<0?28:0,opacity:0})};function CC({glow:e}){return X(`div`,{"aria-hidden":`true`,"data-wx-home-backdrop":e?`glow`:`plain`,className:u(`pointer-events-none absolute inset-x-0 top-0 -z-10 h-96`,e?`bg-[radial-gradient(120%_80%_at_50%_-10%,color-mix(in_srgb,var(--wx-home-glow)_var(--wx-home-glow-a,22%),transparent),transparent_55%),linear-gradient(to_bottom,var(--wx-bg-elevated-2)_0%,var(--wx-bg-elevated)_40%,var(--wx-bg)_75%)] dark:bg-[radial-gradient(120%_80%_at_50%_-10%,color-mix(in_srgb,var(--wx-home-glow)_var(--wx-home-glow-a,35%),transparent),transparent_55%),linear-gradient(to_bottom,var(--wx-bg-elevated-2)_0%,var(--wx-bg-elevated)_40%,var(--wx-bg)_75%)]`:`bg-[linear-gradient(to_bottom,var(--wx-bg-elevated-2)_0%,var(--wx-bg-elevated)_40%,var(--wx-bg)_75%)]`)})}function wC(e){return e||`main`}function TC(e,t,n,r){let i=e,a=!1,o=()=>{a||(i=[...e],a=!0)};for(let e of t){if(e.op!==`sendMessage`)continue;let t=e.payload;if(wC(t.threadKey)!==n)continue;let a=e.status===`failed`?`FAILED`:e.status===`sending`?`SENDING`:`QUEUED`,s=i.findIndex(t=>(t.clientKey??t.id)===e.clientKey);if(s===-1){o();let n=r(e.clientKey,t.media);i.push({id:e.clientKey,clientKey:e.clientKey,direction:`INBOUND`,text:t.text,ageLabel:``,sender:{kind:`visitor`,name:``},...n.length>0?{media:n}:{},deliveryStatus:a})}else i[s].deliveryStatus!==a&&(o(),i[s]={...i[s],deliveryStatus:a})}return a?i:e}function EC(e,t){let n=e.findIndex(e=>e.id===t.id);if(n!==-1&&xp(e[n],t))return e;let r={...t,edited:!0};if(n===-1)return[...e,{...r,editOnly:!0}];let i=[...e];return i[n]={...r,clientKey:e[n].clientKey??t.clientKey},i}function DC(e,t){let n={id:t,direction:`OUTBOUND`,text:``,ageLabel:``,sender:{kind:`operator`,name:``},deleted:!0,editOnly:!0},r=e.findIndex(e=>e.id===t);if(r===-1)return[...e,n];let i=[...e];return i[r]=n,i}function OC(e){return e.kind===`messages`||e.kind===`messages-thread`&&!e.pendingLatest}function kC(e,t){if(!e)return null;let{route:n}=e;return n.kind===`messages-thread`&&(dt(n.threadKey)||ie(n.threadKey))&&e.topSlotId!==t?null:n}function AC(e,t){return e?.assignedOperatorName??e?.senderName??t}function jC(e,t=A){if(e.kind===`typing`||e.kind===`read-receipt`||e.kind===`assignment`||e.kind===`status`||e.kind===`blocked`||e.kind===`reaction`)return null;let n=(e.from??e.sender)?.kind;if(n===`visitor`)return null;let r=e.from??e.sender,i=Array.isArray(e.buttons)?e.buttons.map(e=>({text:e.label,payload:e.value,...e.type?{type:e.type.toLowerCase()}:{},...e.url?{url:e.url}:{},...e.phoneNumber?{phoneNumber:e.phoneNumber}:{}})):void 0,a=n===`ai`||n===`bot`?t:r?.name??``,o=e.sentAt??new Date().toISOString(),s=(()=>{try{return new Date(o).toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}catch{return``}})(),c=e.media,l=qn(c),u=Jn(e.sources),d=c&&typeof c==`object`&&!Array.isArray(c)?c.caption:void 0,f={id:e.externalMessageId,direction:`OUTBOUND`,text:e.text||(typeof d==`string`?d:``),ageLabel:s,sender:{kind:n??`operator`,name:a,...r?.avatar?{avatar:r.avatar}:{}},...l.length>0?{media:l}:{},...u.length>0?{sources:u}:{},...i?{buttons:i}:{},deliveryStatus:`DELIVERED`};return Dm(f)?null:f}function MC(e){let{isOpen:t,route:n,anchorChatId:r}=e;return!t||n.kind!==`messages-thread`||n.pendingLatest?null:n.chatId??(n.threadKey?null:r||null)}function NC(e,t,n){if(e.deleted){t.deleteMessage(e.externalMessageId);return}if(t.forward(e),e.kind===`typing`||e.kind===`read-receipt`)return;if(e.kind===`assignment`){let n=ko(e);n&&t.setAssignment(n);let r=Mo(e);r&&t.appendMessage(r);return}if(e.kind===`status`)return;if(e.kind===`blocked`){e.blockScope===`CONTACT`&&typeof e.blocked==`boolean`&&t.setContactBlock(e.blocked);return}let r=jC(e,n);r&&(e.update?t.updateMessage(r):t.appendMessage(r))}async function PC(e){e.touchedRef.current=!1;try{let t=await e.refetch();t&&e.apply(t)}catch{}}function FC(){let e=null;return{report(t,n){if(!(e!==null&&(t.width<e.width||t.height<e.height)))return e=t,n(t.width,t.height),()=>{};let r=setTimeout(()=>{e=t,n(t.width,t.height)},450);return()=>clearTimeout(r)},forget(){e=null}}}function IC(e,t,n){return{text:e,buttonValue:t,...n?{threadKey:n}:{}}}function LC(e,t){return{id:e,clientKey:e,direction:`INBOUND`,text:t,ageLabel:`now`,sender:{kind:`visitor`,name:``},deliveryStatus:`SENT`}}function RC(e,t){let{article:n}=e;if(n?.kind===`help`&&t.help)return{kind:`help-article`,slug:n.slug,from:`search`,origin:{kind:`help`}};if(n?.kind===`news`&&t.news)return{kind:`news-article`,id:n.id,origin:{kind:`news`}};let r=qo(e.tab,t);return r===`messages`?{kind:`messages-thread`,pendingLatest:!0}:yC(r)}function zC(e){let{article:t}=e;return[e.tab,e.nonce,t?.kind??``,t?t.kind===`help`?t.slug:t.id:``].join(`|`)}function BC(e){return e===`setProfile`||e===`setPreferences`}function VC(e){e.cache.evict({id:`ROOT_QUERY`,fieldName:`visitorProfile`}),e.cache.gc()}async function HC(e){try{let{data:t}=await e.query({query:dr,fetchPolicy:`network-only`}),n=t?.visitorProfile?.preferences?.language;mo(ue(n)?n:null)}catch{}}function UC(e){return{__typename:`VisitorChatRecentInbound`,id:e.lastMessageId??`${e.threadId}@${e.lastMessageAt??``}`,text:e.lastMessagePreview??null,caption:null,createdAt:e.lastMessageAt??new Date().toISOString(),sender:{__typename:`VisitorUnreadSender`,kind:e.lastMessageSenderKind??`operator`,name:e.lastMessageSenderName??``,avatar:e.lastMessageSenderAvatar??null}}}var WC=class extends hn{constructor(...e){super(...e),this.state={failed:!1},this.retry=()=>this.setState({failed:!1})}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){console.error(`[wexio] a tab crashed`,e,t.componentStack)}render(){return this.state.failed?Z(`div`,{role:`alert`,className:`flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center`,children:[X(xs,{"aria-hidden":`true`,className:`size-6 text-wx-fg-subtle`}),Z(`div`,{className:`flex flex-col gap-1`,children:[X(`p`,{className:`font-semibold text-sm text-wx-fg`,children:this.props.title}),X(`p`,{className:`text-xs text-wx-fg-muted`,children:this.props.hint})]}),X(Yt,{type:`button`,variant:`tonal`,size:`sm`,onClick:this.retry,children:this.props.retryLabel})]}):this.props.children}};function GC({children:e}){let t=i(`tabError`);return X(WC,{title:t(`title`),hint:t(`hint`),retryLabel:t(`retry`),children:e})}function KC({children:e,...t}){return X(o.div,{...t,children:X(GC,{children:e})})}function qC(e){if(e.op.op!==`sendMessage`)return null;let t=e.error??{};if(!re(t)||!JSON.stringify(t).includes(Ce.notFound))return null;let n=e.op.payload,r=n?.messageSlot;if(!r?.slotId||!n?.threadKey)return null;let{messageSlot:i,...a}=n,o=n.threadKey.startsWith(`message:`)?x(r.slotId,we(n.threadKey)):n.threadKey;return{slotId:r.slotId,failedThreadKey:n.threadKey,payload:{...a,threadKey:o,chatId:null}}}function JC(e){if(e.op.op!==`sendMessage`)return null;let t=e.error??{};if(!re(t)||!JSON.stringify(t).includes(Ce.threadKeyMismatch))return null;let n=e.op.payload;if(!n?.messageSlot||!n.threadKey||n.threadKey.startsWith(`message:`))return null;let{messageSlot:r,...i}=n;return i}function YC(e,t){if(e===t)return!1;let n=Date.parse(t),r=e===void 0?NaN:Date.parse(e);return!Number.isNaN(n)&&!Number.isNaN(r)?n>r:!0}function XC(){return{ids:new Set,held:{},seeded:!1}}function ZC(e,t){for(let n of t)e.held[n.chatId]=n.at??``;e.seeded=!0}function QC(e,t,n){if(t.lastMessageFromVisitor!==!1||n)return!1;let r=typeof t.lastMessagePreview==`string`?t.lastMessagePreview.trim():``,i=t.lastMessageAt??(r===``?null:r);if(!t.lastMessageId&&i===null)return!1;let a=t.lastMessageId??`${t.threadId}@${i}`;return e.ids.has(a)||t.lastMessageAt&&!YC(e.held[t.threadId],t.lastMessageAt)?!1:(e.ids.add(a),t.lastMessageAt&&(e.held[t.threadId]=t.lastMessageAt),!0)}function $C(e){let{isOpen:t,docVisible:n,route:r,threadId:i,anchorChatId:a}=e;if(!t||!n||r.kind!==`messages-thread`)return!1;let o=r.chatId??(r.threadKey?null:a);return!!o&&o===i}function ew({hasError:e,hasSession:t,onRetry:n}){let[r,i]=Y(!1),a=J(!1);K(()=>{e||i(!1)},[e]),K(()=>{t&&(a.current=!1)},[t]),K(()=>{e&&a.current&&(a.current=!1,i(!0))},[e]);let o=G(()=>{a.current=!0,i(!1),n()},[n]);return{open:r,show:G(()=>i(!0),[]),dismiss:G(()=>i(!1),[]),retry:o}}function tw(e,t,n){K(()=>{e===void 0&&t&&n()},[])}function nw(e,t,n=!1,r){let i=J(!1),a=r??i,o=J(n);o.current=n;let s=J(e);s.current=e;let c=J(t);c.current=t;let l=G(()=>{s.current&&!o.current?a.current=!0:c.current()},[a]),u=G(()=>{a.current=!1},[a]);return K(()=>{e||!a.current||(a.current=!1,c.current())},[e,a]),K(()=>{!n||!a.current||(a.current=!1,c.current())},[n,a]),{request:l,cancel:u}}function rw(e,t,n){K(()=>{e!==void 0&&(e?t():n())},[e,t,n])}var iw=[`home`,`messages`,`help`,`news`,`profile`];function aw(e){if(!e||typeof e!=`object`)return;let t=e;if(t.kind===`help`&&typeof t.slug==`string`&&t.slug)return{kind:`help`,slug:t.slug};if(t.kind===`news`&&typeof t.id==`string`&&t.id)return{kind:`news`,id:t.id}}function ow(e){if(!e||typeof e!=`object`)return null;let t=e;if(t.type!==`wexio:host-control:v1`)return null;if(t.command===`open`||t.command===`close`)return{command:t.command};if(t.command!==`navigate`||!iw.includes(t.tab)||typeof t.nonce!=`number`||!Number.isFinite(t.nonce))return null;let n=aw(e.article);return{command:`navigate`,signal:{tab:t.tab,nonce:t.nonce,...n?{article:n}:{}}}}function sw(e,t,n){let[r,i]=Y(),a=J(t),o=J(n);return a.current=t,o.current=n,K(()=>{if(e!==`iframe`)return;let t=t=>{if(!Ze(t,e))return;let n=ow(t.data);n&&(n.command===`open`?a.current():n.command===`close`?o.current():i(n.signal))};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e]),r}function cw(e,t){let n=qo(e,t);return n===`messages`?{kind:`messages-thread`,pendingLatest:!0}:yC(n)}function lw(e,t,{defaultTab:n,features:r,loading:i}){let a=J(e),o=J(!1);K(()=>{Go(Wo(e),r)||t(yC(qo(n,r)))},[r,n]),K(()=>{i||o.current||(o.current=!0,e===a.current&&t(cw(n,r)))},[i])}function uw(e){let t=Number(e);return Number.isFinite(t)?Math.min(200,Math.max(0,Math.round(t))):0}function dw(e){if(!e||typeof e!=`object`)return;let{x:t,y:n}=e;return{x:uw(t),y:uw(n)}}function fw(e){if(!(e==null||e===``))return Number.isFinite(Number(e))?uw(e):void 0}function pw(e,t){let n=dw(t),r=e&&typeof e==`object`?e:void 0;return{x:fw(r?.x)??n?.x??0,y:fw(r?.y)??n?.y??0}}function mw(e,t){let n=e.kind===`iframe`,r=pw(n?void 0:e.offset,t),{x:i,y:a}=n?{x:0,y:0}:r,o=e.themeRoot;K(()=>{let e=o??document.documentElement;e.style.setProperty(`--wx-off-x`,`${i}px`),e.style.setProperty(`--wx-off-y`,`${a}px`)},[i,a,o]);let s=J(e.onLauncherOffset);s.current=e.onLauncherOffset;let c=dw(t),l=c?.x,u=c?.y;K(()=>{!n||l===void 0||u===void 0||s.current?.({x:l,y:u})},[n,l,u])}var hw=new Set([`ar`,`he`,`fa`,`ur`]);function gw(e){let t=e.toLowerCase().split(/[-_]/)[0];return hw.has(t)?`rtl`:`ltr`}function _w(e,t){Tn(()=>{let n=gw(e);t?n===`rtl`?t.dir=`rtl`:t.removeAttribute(`dir`):document.documentElement.dir=n},[e,t])}function vw({isOpen:e,enabled:t,onOpen:n,onClose:r}){let i=J(n),a=J(r);i.current=n,a.current=r;let o=J(t);o.current=t;let s=J(!1);K(()=>{e!==s.current&&(s.current=e,t&&(e?i.current?.():a.current?.()))},[e,t]),K(()=>()=>{s.current&&(s.current=!1,o.current&&a.current?.())},[])}function yw({chatId:e,token:t,visitorId:n=null,enabled:r=!0,onMessage:i,onReopen:a}){let o=he(),s=J(i);K(()=>{s.current=i},[i]);let c=J(a);K(()=>{c.current=a},[a]);let l=J(t);l.current=t;let u=!!t;K(()=>{if(!r||!e||!u||typeof window>`u`)return;let t=o.publicKey;if(!t)return;let n=!1,i=0,a=!1,d=!0,f,p,m=()=>{},h=()=>{let r=l.current;if(!r)return;let u=`${Te()}/api/web/realtime/${encodeURIComponent(e)}?token=${encodeURIComponent(r)}&publicKey=${encodeURIComponent(t)}`,g=new EventSource(u,{withCredentials:!1}),_=e=>{try{let t=JSON.parse(e.data);s.current(t)}catch{console.warn(`[wexio] unparseable SSE frame`,e.data)}},v=e=>{try{let t=JSON.parse(e.data);s.current({...t,update:!0})}catch{console.warn(`[wexio] unparseable SSE frame`,e.data)}},y=e=>{try{let t=JSON.parse(e.data);s.current({...t,kind:`text`,deleted:!0})}catch{console.warn(`[wexio] unparseable SSE frame`,e.data)}},b=()=>{a&&d&&(d=!1,c.current?.()),a=!0,clearTimeout(p),p=setTimeout(()=>{i=0,d=!0},To)},x=e=>{e instanceof MessageEvent||(clearTimeout(p),m(),!n&&(f=setTimeout(h,Math.min(wo,Co*2**i)),i+=1))};g.addEventListener(`open`,b),g.addEventListener(`message`,_),g.addEventListener(`messageUpdate`,v),g.addEventListener(`messageDelete`,y);let S=So(g,o,r);g.addEventListener(`error`,x),m=()=>{S(),g.removeEventListener(`open`,b),g.removeEventListener(`message`,_),g.removeEventListener(`messageUpdate`,v),g.removeEventListener(`messageDelete`,y),g.removeEventListener(`error`,x),g.close()}};return h(),()=>{n=!0,clearTimeout(f),clearTimeout(p),m()}},[e,u,n,r,o])}function bw({chatId:e,token:t,visitorId:n,enabled:r,aiName:i,handlerRef:a,sinks:o,resync:s}){let c=J({aiName:i,sinks:o,resync:s});c.current={aiName:i,sinks:o,resync:s},yw({chatId:e,token:t,visitorId:n,enabled:r,onMessage:e=>NC(e,{...c.current.sinks,forward:e=>a.current?.(e)},c.current.aiName),onReopen:()=>c.current.resync()});let l=J(null),u=J(null);K(()=>{e&&u.current===null&&l.current===e&&c.current.resync(),e&&(l.current=e),u.current=e},[e])}function xw(){return document.querySelector(`dialog[open], [aria-modal="true"]`)!==null}var Sw=`[role="dialog"]:not([data-wx-peek]), [role="listbox"], [role="menu"]`;function Cw(e){return e?Array.from(e.querySelectorAll(Sw)).some(e=>!e.closest(`[hidden], [inert], [aria-hidden="true"]`)):!1}function ww(e){let t=e.getRootNode();return`activeElement`in t?t:null}function Tw({isOpen:e,panelRef:t,onEscape:n,scopeToWidget:r}){let i=J(n);i.current=n;let a=J(!1),o=J(!1);K(()=>{let n=t.current;if(n){if(e&&!o.current){let e=ww(n)?.activeElement;e&&(e.matches(`[data-wx-fab]`)||e.closest(`[data-wx-peek]`))&&(n.focus({preventScroll:!0}),a.current=!0)}else !e&&o.current&&a.current&&((ww(n)?.querySelector(`[data-wx-fab]`))?.focus({preventScroll:!0}),a.current=!1);o.current=e}},[e,t]),K(()=>{let e=t.current;if(!e)return;let n=()=>{a.current=!0},r=t=>{let n=t.composedPath(),r=ww(e)?.querySelector(`[data-wx-fab]`);!n.includes(e)&&!(r&&n.includes(r))&&(a.current=!1)},i=t=>{let n=t.relatedTarget;n&&!e.contains(n)&&(a.current=!1)};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),document.addEventListener(`pointerdown`,r,!0),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),document.removeEventListener(`pointerdown`,r,!0)}},[t]),K(()=>{if(!e)return;let n=e=>{if(e.key!==`Escape`||e.defaultPrevented||e.isComposing||e.keyCode===229)return;let n=e.composedPath()[0];if(n instanceof Element&&n.closest(`[data-wx-own-escape]`))return;let o=t.current;if(o){if(r){let t=ww(o)?.querySelector(`[data-wx-fab]`),n=e.composedPath(),r=n.includes(o)||!!(t&&n.includes(t)),i=n[0],s=a.current&&!xw()&&(i===document.body||i===document.documentElement);if(!r&&!s)return}Cw(ww(o))||i.current()}};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e,t,r])}function Ew(e){let{publicKey:t,storage:n}=e,[r,i]=Y(()=>Wr(n,t));return{marks:r,markRead:G((e,r)=>{let a=Date.parse(r??``);!e||Number.isNaN(a)||(Gr(n,t,e,a),i(t=>(t[e]??0)>=a?t:{...t,[e]:a}))},[n,t])}}function Dw(e,t){let n=lt(),r=J(t);r.current=t;let i=J(e);K(()=>{i.current!==e&&(i.current=e,n.clearStore().catch(()=>{}),r.current())},[e,n])}var Ow=e=>`wexio:visitor-blocked:${e??``}`;function kw(e,t){try{return t.getItem(Ow(e))===`1`}catch{return!1}}function Aw(e){let{publicKey:t,storage:n,live:r,threads:i,sessionContent:a,handshake:o}=e,[s]=Y(()=>kw(t,n)),c=q(()=>r===null?i===!0||a===!0||o?!0:i===!1||a===!1?!1:null:r,[r,i,a,o]);return K(()=>{if(c!==null)try{c?n.setItem(Ow(t),`1`):n.removeItem(Ow(t))}catch{}},[c,n,t]),c??s}var jw=Ir(`help-article`,()=>import(`./widget-react-i3rT0ift.js`),{pick:e=>e.HelpArticleView}),Mw=Ir(`news-article`,()=>import(`./widget-react-BI1zRae2.js`),{pick:e=>e.NewsArticleView}),Nw=`wexio:panel-expanded`,Pw=6e3,Fw=32,Iw=112;function Lw(e){if(typeof window>`u`)return!1;try{return e.getItem(Nw)===`1`}catch{return!1}}var Rw=`wexio:welcome-read:`,zw=[],Bw=e=>`${Rw}${e??``}`;function Vw(e,t){if(typeof window>`u`)return!1;try{return t.getItem(Bw(e))===`1`}catch{return!1}}function Hw(e){let t=e.errors;if(!t||t.length===0)return;let n=t[0],r=Error(n?.message??`backend error`);throw r.graphQLErrors=t,r}function Uw(){return X(`div`,{className:`flex flex-1 items-center justify-center`,children:X(`div`,{className:`border-wx-border border-t-wx-primary h-5 w-5 animate-spin rounded-full border-2`})})}function Ww(){return X(Ln,{reducedMotion:`user`,children:X(Pc,{children:X(Gw,{})})})}function Gw(){let e=i(`header`),t=i(`launcher`),r=i(`home`),a=i(`transcript`),s=i(`notification`),c=J({newMessage:``,image:``,video:``,voiceMessage:``,attachment:``});c.current={newMessage:s(`newMessage`),image:s(`image`),video:s(`video`),voiceMessage:s(`voiceMessage`),attachment:s(`attachment`)};let l=y(),d=n(),f=fe(),p=he();Vr();let m=_(),h=Tt(),{config:g,isLoading:v,error:x}=h,{unavailable:S,evicted:C}=Do(p),w=S||x!==null||!v&&g.status!==`active`,T=w?`demo`:h.mode,E=w?!0:h.isDummy,D=E||h.sessionDemo,k=w&&(!S||C);K(()=>{k&&f.onHidden?.()},[k,f]);let j=!w&&!v;K(()=>{j&&f.onActive?.()},[j,f]);let M=g.theme?.launcherPosition===`LEFT_BOTTOM`,N=f.embedded??!1,{muted:P,toggleMuted:ee,playInbound:ne,playOutbound:re}=ya(g.sounds),{identity:ie,prefill:ae}=no(f),[oe,se]=Y(null),[ce,I]=Y(0),[le,ue]=Y(0),de=J(()=>{});K(()=>{if(typeof window>`u`)return;let e=e=>{Ze(e,f.kind)&&(!e.data||e.data.type!==`wexio:shutdown:v1`||(eo(p),Mf(p.drafts),de.current(),se(null),Se(null),ue(e=>e+1),I(e=>e+1)))};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[f.kind,p]);let me=!!g.botProtection?.turnstile?.enabled,ge=g.botProtection?.turnstile?.siteKey??null,ve=me&&ge?ge:null;K(()=>{},[me,ge]);let{getToken:be}=Aa({siteKey:ve,position:M?`left`:`right`}),L=to({enabled:!v&&T===`production`&&!E,identity:ie??oe,epoch:ce,getTurnstileToken:be}),[xe,Se]=Y(null),R=xe??L,Ce=Ii({publicKey:p.publicKey,token:R.token,locale:d,anonymous:!!R.token&&!R.verified,visitorKey:R.token?`${R.peopleId??``}:${R.verified}`:null,pageKind:f.kind,enabled:T===`production`&&!E&&!!p.publicKey&&(g.contentVersion??0)>=1}),Te=hr({verified:R.verified,sessionVisitors:Ce.visitors,override:f.audienceOverride?.visitors}),[Ee,De]=Y(()=>typeof navigator>`u`?!0:navigator.onLine);K(()=>{if(typeof window>`u`)return;let e=()=>De(!0),t=()=>De(!1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]);let Oe=J(Ee);K(()=>{let e=Oe.current;Oe.current=Ee,!e&&Ee&&R.error&&I(e=>e+1)},[Ee,R.error]);let z=R.error===Ba,Ae=!!R.error&&!z&&T===`production`&&!E&&Ee;K(()=>{if(R.error!==`network_unreachable`)return;let e=setTimeout(()=>I(e=>e+1),6e3);return()=>clearTimeout(e)},[R.error]);let je=J(!1);(R.token||R.error)&&(je.current=!0);let Me=!je.current,Pe=(v||R.isAuthenticating||Me)&&T===`production`&&!E,Ie=G(()=>I(e=>e+1),[]),{open:Le,show:ze,dismiss:Be,retry:Ve}=ew({hasError:Ae,hasSession:!!R.token,onRetry:Ie}),Ue=J(!1),We=J(!1),Ke=Ae||Pe||v;Ue.current=Ke,We.current=Ae;let[B,qe]=Y((f.open??f.defaultOpen??!1)&&!Ue.current),Je=G(()=>{if(We.current){ze();return}Ue.current||qe(!0)},[ze]),Ye=nw(Ke,Je,Ae,p.pendingOpen),Xe=Ye.request,Qe=G(()=>We.current?Je():Xe(),[Je,Xe]),$e=Ye.cancel,et=G(()=>{$e(),qe(!1)},[$e]),tt=G(()=>{qe(e=>e?!1:We.current?(ze(),!1):!Ue.current)},[ze]),nt=bo({enabled:!!g.features.profile&&(D||!!R.token),isDummy:D});K(()=>{if(typeof window>`u`)return;let e=window;e.__wexioNotifyDebug=()=>{let e={prefEnabled:nt.desktopNotifications,permission:typeof Notification<`u`?Notification.permission:`(unsupported)`,prefsLoaded:nt.loaded,featureEnabled:!!g.features.profile,sessionToken:!!R.token};return console.log(`[wexio] notify state:`,e),e},e.__wexioTestNotify=()=>{if(typeof Notification>`u`)return console.warn(`[wexio] Notification API not available in this context`),`unsupported`;if(Notification.permission!==`granted`)return console.warn(`[wexio] permission not granted:`,Notification.permission),Notification.permission;try{let e=new Notification(`Wexio test`,{body:`If you can see this, notifications work.`,tag:`wexio-test`});return e.onshow=()=>console.log(`[wexio] test notification: onshow fired`),e.onerror=e=>console.warn(`[wexio] test notification: onerror`,e),e.onclose=()=>console.log(`[wexio] test notification: onclose`),console.log(`[wexio] test notification posted to browser`),`posted`}catch(e){return console.warn(`[wexio] test notification threw:`,e),e}}},[nt.desktopNotifications,nt.loaded,g.features.profile,R.token]);let it=Ca(gC(g.themeMode),{preference:nt.themeMode,allowed:nt.themeModeEditable}),at=_C(g.organizationLogo,it),ot=f.configOverride?.organizationLogo!==void 0,ct=at??(E&&!ot?b(`/logo-${it}.png`):null),ut=G(()=>cw(g.defaultTab,g.features),[g.defaultTab,g.features]),[V,H]=Y(ut);lw(V,H,{defaultTab:g.defaultTab,features:g.features,loading:v});let ft=G(e=>H(t=>Ho(e,t)),[]);rw(f.open,Qe,et),tw(f.open,f.defaultOpen,Qe);let pt=sw(f.kind,Qe,et),gt=f.previewTab??pt;K(()=>{gt&&(H(RC(gt,g.features)),Qe())},[gt?zC(gt):null]);let[vt,yt]=Y(()=>Lw(p.storage));K(()=>{try{p.storage.setItem(Nw,vt?`1`:`0`)}catch{}},[vt,p.storage]);let[bt,xt]=Y(null),St=xC(V),Et=q(()=>e=>xt(t=>Zn(t,St,e)),[St]),Dt=Qn(bt,St),[At,jt]=Y(!1);K(()=>{B&&jt(!0)},[B]),vw({isOpen:B,enabled:f.kind!==`iframe`||T===`production`,onOpen:f.onOpen,onClose:f.onClose});let Nt=qi({enabled:T===`production`&&!E&&!!g.features.news,locale:d}),Pt=lt(),Ft=J(null),[It,Lt]=Y([]),[Rt,zt]=Y(Oo),[Bt,Ht]=Y(null),Ut=J(!1),[Wt,Kt]=Y(null),[qt,Jt]=Y(null),Yt=J(null),Xt=(V.kind===`messages-thread`&&V.threadKey?V.threadKey:null)??`main`,Zt=V.kind===`messages-thread`?V.chatId??null:null;K(()=>{Lt([]),zt(Oo),Ut.current=!1},[Xt,ce]);let Qt=B&&(V.kind===`messages`||V.kind===`messages-thread`),$t=ye({skip:D||!R.token,fetchPolicy:`cache-and-network`}),[en,tn]=Y({}),U=Ta({enabled:!D&&!!R.token,refetch:async()=>{let e=await $t.refetch();if(e?.error)throw e.error},onSettled:e=>tn(t=>cs(t,e))}),nn=G(()=>{U()},[U]),[rn,on]=Y({}),[cn,ln]=Y(()=>new Set),[un,dn]=Y(0),[fn,pn]=Y(null),W=J(XC()),mn=J({}),hn=J({});K(()=>{let e=hn.current;return()=>{for(let t of Object.values(e))clearTimeout(t)}},[]),Dw(le,()=>{tn({}),ln(new Set),pn(null),Ht(null),H(ut()),W.current=XC(),mn.current={};for(let[e,t]of Object.entries(hn.current))clearTimeout(t),delete hn.current[e]}),Eo({token:R.token,visitorId:R.peopleId,enabled:!D&&T===`production`&&!!R.token,epoch:un,onReopen:nn,onUpdate:e=>{let{frame:t,refetch:n}=dC(mn.current,e,Pn.find(t=>t.chatId===e.threadId)?.lastMessageId),r=t.lastMessageFromVisitor===!1&&di({text:t.lastMessagePreview,senderKind:t.lastMessageSenderKind??`bot`},xn);tn(e=>({...e,[t.threadId]:as(e[t.threadId],r?{...t,unReadCount:0}:t)})),t.blocked!=null&&t.blockScope===`CONTACT`&&Ht(t.blocked);let i=hn.current;if(i[t.threadId]&&(clearTimeout(i[t.threadId]),delete i[t.threadId]),t.typing?.active&&(i[t.threadId]=setTimeout(()=>{delete i[t.threadId],tn(e=>e[t.threadId]?{...e,[t.threadId]:{...e[t.threadId],typing:!1}}:e)},Pw)),n&&nn(),QC(W.current,t,r)){let e=Pn.find(e=>e.chatId===t.threadId);aC(t,{playInbound:ne,markPeekTarget:()=>{Yt.current={chatId:t.threadId,threadKey:e?.threadKey??null}},writeRecent:()=>kr(t),notify:{enabled:nt.desktopNotifications,reading:$C({isOpen:B,docVisible:typeof document<`u`&&!document.hidden,route:V,threadId:t.threadId,anchorChatId:R.chatId}),title:AC(e,gn),labels:c.current,orgLogoUrl:at,open:()=>{Je(),ft({kind:`messages-thread`,chatId:t.threadId,threadKey:e?.threadKey??null})}}})}},onAdd:e=>{e.chatId&&(e.chatId===R.chatId||en[e.chatId]||Pn.some(t=>t.chatId===e.chatId)||(nn(),!e.threadKey&&V.kind===`messages-thread`&&!V.chatId&&!V.threadKey&&(H(t=>t.kind===`messages-thread`&&!t.chatId?{...t,chatId:e.chatId}:t),pn(e.chatId))))}}),K(()=>{W.current.seeded||D||!$t.data||ZC(W.current,es($t.data,A).map(e=>({chatId:e.chatId,at:e.preview?.at??e.updatedAt??``})))},[D,$t.data]);let gn=F(g.messenger?.aiAssistant)??`AI Agent`,[vn,yn]=Y(()=>Vw(p.publicKey,p.storage)),bn=G(()=>{yn(!0);try{p.storage.setItem(Bw(p.publicKey),`1`)}catch{}},[p]),xn=Ce.slots?.messageSlots??g.messenger?.messageSlots,Cn=pe(ke(Ce.capabilities,g.capabilities),`variantThreads`),wn=q(()=>Ce.slots?new Set(Ce.slots.messageSlots.map(e=>e.id)):null,[Ce.slots]),Tn=hi({enabled:!D,storage:p.storage,publicKey:p.publicKey,injected:h.injectedSlotIds,sessionIds:wn,variantThreads:Cn}),En=!!g.features.messenger&&!!xn?.some(e=>e.kind===`MESSAGE`),Dn=En?null:g.messenger?.messages?.find(e=>e.kind===`MESSAGE`)?.text??g.messenger?.messages?.find(e=>e.kind===`SYSTEM`||e.kind===`HINT`)?.text??null,On=J(new Date().toISOString()),kn=!D&&!$t.loading&&$t.data!==void 0,An=($t.data?.visitorThreads?.threads?.length??0)===0,[jn,Mn]=Y(!1);K(()=>{if(D||!Dn||!kn||!An){Mn(!1);return}let e=setTimeout(()=>Mn(!0),1500);return()=>clearTimeout(e)},[D,Dn,kn,An]);let Nn=Ew({publicKey:p.publicKey,storage:p.storage}),Pn=q(()=>{if(D){let e=O(l,gn).map(e=>cn.has(e.chatId)?{...e,unreadCount:0}:e);return En?Hc(e,rn,gn):e}let e=es($t.data,gn);if(e.length===0&&Dn&&jn)return[{chatId:``,threadKey:null,status:`OPEN`,unreadCount:+!vn,updatedAt:On.current,preview:{text:Dn,at:On.current,fromVisitor:!1},senderName:gn,lastSenderKind:`ai`}];let t=e.map(e=>Kr(us(e,en[e.chatId]),Nn.marks)),n=e=>Date.parse(e.preview?.at??e.updatedAt)||0;return t.sort((e,t)=>n(t)-n(e))},[D,$t.data,en,gn,l,cn,rn,En,Dn,jn,vn,Nn.marks]),Fn=V.kind===`messages-thread`?V.chatId??(V.threadKey?null:R.chatId):null,In=Fn?Pn.find(e=>e.chatId===Fn)?.status??null:null,Ln=Aw({publicKey:p.publicKey,storage:p.storage,live:Bt,threads:$t.data?.visitorThreads?.visitorBlocked??null,sessionContent:Ce.blocked??null,handshake:R.blocked===!0}),Rn=Ln||(Fn?Pn.find(e=>e.chatId===Fn)?.blocked??!1:!1),zn=!D&&$t.loading&&!$t.data,Bn=Zt?Pn.find(e=>e.chatId===Zt)?.unreadCount??en[Zt]?.unreadCount??0:0,Vn=J(Pn);Vn.current=Pn;let Hn=Nn.markRead,Un=G(()=>{let e=Zt;e&&(Hn(e,Vn.current.find(t=>t.chatId===e)?.preview?.at),tn(t=>t[e]?.unreadCount===0?t:{...t,[e]:{...t[e]??{},unreadCount:0,contentAt:Date.now()}}))},[Zt,Hn]);K(()=>{if(!D||!Zt)return;let e=Zt;ln(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})},[D,Zt]);let Wn=cC(Pn),[Gn,qn]=Y(null),Q=(En&&D&&f.launcherMessagePreview===`visible`?[]:Pn).find(e=>e.unreadCount>0&&e.preview&&!e.preview.fromVisitor),Jn=Q?.preview?`${Q.chatId}:${Q.preview.at}`:null,Xn=Q?.preview&&Jn&&Jn!==Gn?{id:Jn,text:Q.preview.media?Q.preview.mediaThumbUrl?Q.preview.text||null:`${Jo(Q.preview.mediaType)} ${Q.preview.text||r(`recentMessageAttachment`)}`:Q.preview.text,thumbUrl:Q.preview.mediaThumbUrl??null,sender:{kind:Q.lastSenderKind===`operator`?`operator`:`ai`,name:Q.lastSenderKind===`operator`&&Q.lastSenderName?Q.lastSenderName:Q.assignedOperatorName??Q.senderName,...Q.senderAvatar?{avatar:Q.senderAvatar}:{}},buttons:Q.preview.buttons??[]}:null,nr=wi(Ce.visitors),rr=q(()=>te(),[]),ir=ul({slots:xn??zw,ctx:nr,publicKey:p.publicKey,storage:D?rr:p.storage,ready:En&&(D||Ce.settled&&kn),isOpen:B,suppressed:Xn!==null,previewVisible:f.launcherMessagePreview===`visible`,blocked:Ln}),ar=Wn+ +!!ir.unread,sr=q(()=>ir.shown?Gc(ir.shown,gn):null,[ir.shown,gn]),cr=Xn===null&&sr!==null,lr=Sa(Ln?null:Xn??sr),$=Jn,ur=J(!1),dr=G(()=>{if(!ur.current)return{kind:`messages-thread`,pendingLatest:!0};let e=Pn.length===1&&Pn[0].chatId===``;return Pn.length===0||e?{kind:`messages-thread`,threadKey:null}:{kind:`messages`}},[Pn]);K(()=>{if(V.kind!==`messages-thread`||!V.pendingLatest||!Qt||zn)return;ur.current=!0;let e=Pn[0];H(e?{kind:`messages-thread`,chatId:e.chatId||void 0,threadKey:e.threadKey}:En?{kind:`messages`}:{kind:`messages-thread`,threadKey:null})},[V,Pn,zn,Qt,En]);let fr=q(()=>En?Uc(ir.top,Tn.keyFor,gn):null,[En,ir.top,Tn.keyFor,gn]);K(()=>{vn||!Dn||B&&V.kind===`messages-thread`&&!V.threadKey&&bn()},[B,V,Dn,vn,bn]);let pr=()=>{if(re(),!D||!En||V.kind!==`messages-thread`)return;let e=dt(V.threadKey);if(!e||rn[e])return;let t=xn?.find(t=>t.kind===`MESSAGE`&&t.id===e),n=t?oi(t.variants,nr):null;n&&on(t=>({...t,[e]:{title:n.text,at:new Date().toISOString()}}))},gr=G(()=>{ur.current=!0},[]),vr=J(null),yr=J(null);yr.current=ir.top?Cn?`${ir.top.slotId}:${ir.top.variant.id}`:ir.top.slotId:null,K(()=>{OC(V)&&(vr.current={route:V,topSlotId:yr.current})},[V]);let br=G(()=>kC(vr.current,yr.current),[]),Cr=Jc({resumeRoute:br,message:ir,slotLauncher:En,launcherToMessages:qo(g.defaultTab,g.features)===`messages`,threads:Pn,threadsLoading:Qt&&zn,isOpen:B,setRoute:H,markResumed:gr,openPanel:Je,togglePanel:tt,setPendingReply:Jt,keyFor:Tn.keyFor}),wr=MC({isOpen:B,route:V,anchorChatId:R.chatId||fn}),Tr=_e({variables:{chatId:wr??``},skip:D||!wr||!R.token,fetchPolicy:`network-only`});K(()=>{if(Ut.current)return;let e=Ao(Tr.data?.visitorChatAssignment);e&&zt(e)},[Tr.data]),K(()=>{g.features.profile&&(!R.peopleId||!R.token||(Pt.cache.evict({id:`ROOT_QUERY`,fieldName:`visitorProfile`}),Pt.cache.gc()))},[R.peopleId]);let Er=G(e=>{Lt(t=>t.some(t=>t.id===e.id)?t:[...t,e])},[]),Dr=G(e=>{Lt(t=>EC(t,e))},[]),Or=G(e=>{Lt(t=>DC(t,e))},[]),kr=e=>{!R.chatId||e.threadId!==R.chatId||Pt.writeQuery({query:Re,variables:{chatId:R.chatId},data:{__typename:`Query`,visitorChatRecentInbound:UC(e)}})},Ar=()=>{Pt.refetchQueries({include:[_t]}),!(!wr||D)&&PC({refetch:async()=>Ao((await Tr.refetch()).data?.visitorChatAssignment),apply:zt,touchedRef:Ut})},jr=G((e,t)=>{Lt(n=>n.map(n=>n.id===e?{...t,clientKey:t.clientKey??n.clientKey??e}:n))},[]),Mr=G(e=>{Lt(t=>t.filter(t=>(t.clientKey??t.id)!==e))},[]),Nr=J(e=>(Ft.current=e,()=>{Ft.current===e&&(Ft.current=null)})).current;bw({chatId:wr,token:R.token,visitorId:R.peopleId,enabled:!D&&T===`production`,aiName:gn,handlerRef:Ft,sinks:{setAssignment:e=>{zt(e),Ut.current=!0},appendMessage:Er,updateMessage:Dr,deleteMessage:Or,setContactBlock:Ht},resync:Ar});let[Pr]=zo(),[Fr]=Ot(),Ir=or(),[Lr]=mr(),[Br]=Ne(),[Hr]=Ct(),[Ur]=Fe(),[Wr]=kt(),[Gr]=wt(),qr=J(new Map),Jr=G((e,t)=>!t||t.length===0?[]:t.map((t,n)=>{let r=t.s3Url??t.previewUrl;if(!r&&t.dataBase64){let i=`${e}:${n}`;r=qr.current.get(i),r||(r=URL.createObjectURL(Yn(t.dataBase64,t.mimetype)),qr.current.set(i,r))}return{url:r??``,mimetype:t.mimetype,alt:t.filename,...t.previewWidth&&t.previewHeight?{width:t.previewWidth,height:t.previewHeight}:{}}}),[]),[Yr,Zr]=Y(null),Qr=p.outboxKey,$r=!D&&T===`production`&&!!Qr,ei=ha({publicKey:Qr,enabled:$r,isolated:p.isolated,paused:m.paused,isPermanent:vC,onDropped:(e,t)=>{e.op===`sendMessage`&&Mr(e.clientKey);let n=JC({op:e,error:t});if(n){ei.enqueue({op:`sendMessage`,semantics:`queue`,payload:n});return}let r=qC({op:e,error:t});if(r){let t=xn?.find(e=>e.kind===`MESSAGE`&&e.id===r.slotId),n=e.payload.messageSlot;Tn.markLocal(r.slotId,t?.variants.find(e=>e.id===n?.variantId),!!we(r.failedThreadKey)),ei.enqueue({op:`sendMessage`,semantics:`queue`,payload:r.payload}),H(e=>e.kind===`messages-thread`&&e.threadKey===r.failedThreadKey?{kind:`messages-thread`,threadKey:r.payload.threadKey,keyAs:e.keyAs??r.failedThreadKey}:e)}BC(e.op)&&(VC(Pt),e.op===`setPreferences`&&HC(Pt),Zr({op:e.op,at:Date.now()}))},run:async(e,t)=>{if(e.op===`sendMessage`){let n=e.payload,r=n.media;if(r?.some(e=>!e.mediaId&&(e.dataBase64||e.giphyUrl))){let e=[];for(let t of r){if(t.mediaId){e.push(t);continue}if(t.giphyUrl){let n=await Ir(t.giphyUrl,t.gifKind??`IMAGE`);e.push({filename:t.filename,mimetype:n.mimetype||t.mimetype,mediaId:n.mediaId,s3Url:n.url??t.s3Url});continue}if(!t.dataBase64){e.push(t);continue}let n=(await Fr({variables:{input:{filename:t.filename,mimetype:t.mimetype,dataBase64:t.dataBase64}}})).data?.uploadVisitorMedia;if(!n?.mediaId)throw Error(`media upload failed`);e.push({filename:t.filename,mimetype:t.mimetype,mediaId:n.mediaId,s3Url:n.url??t.s3Url})}r=e,t.patch({...n,media:r})}let i=(r??[]).map(e=>e.mediaId).filter(e=>!!e),a=await Pr({variables:{input:{...n.text?{text:n.text}:{},...n.buttonValue===void 0?{}:{buttonValue:n.buttonValue},...i.length>0?{mediaIds:i}:{},...n.threadKey?{threadKey:n.threadKey}:{},...n.messageSlot?{messageSlot:n.messageSlot}:{},...n.page?{page:n.page}:{}}}});Hw(a);let o=a.data?.sendVisitorMessage;if(!o)throw Error(`sendMessage: empty ack`);return{messageId:o.messageId,chatId:o.chatId}}if(e.op===`setPreferences`)return Hw(await Lr({variables:{input:{preferences:e.payload}}})),{};if(e.op===`reaction`)return Hw(await Br({variables:{input:e.payload}})),{};if(e.op===`setProfile`)return Hw(await Lr({variables:{input:e.payload}})),{};if(e.op===`readAck`){let{chatId:t}=e.payload;return Hw(await Hr({variables:{chatId:t}})),{}}if(e.op===`trackPageView`)return await Ur({variables:{input:e.payload}}),{};if(e.op===`trackLinkClick`)return await Wr({variables:{input:e.payload}}),{};if(e.op===`trackButtonClick`)return await Gr({variables:{input:e.payload}}),{};throw Error(`outbox: no handler for op "${e.op}"`)},onSent:(e,t)=>{if(BC(e.op)&&Ce.refresh(),e.op!==`sendMessage`)return;let n=e.payload,r=Jr(e.clientKey,n.media);t.messageId&&jr(e.clientKey,{id:t.messageId,clientKey:e.clientKey,direction:`INBOUND`,text:n.text,ageLabel:new Date().toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`}),sender:{kind:`visitor`,name:``},...r.length>0?{media:r}:{},deliveryStatus:`DELIVERED`}),t.chatId&&n.chatId==null&&(H(e=>e.kind===`messages-thread`&&!e.chatId&&e.threadKey===n.threadKey?{...e,chatId:t.chatId}:e),nn(),dn(e=>e+1))}}),ti=G(e=>{let t=e.page??Mi(f.kind);ei.enqueue({op:`sendMessage`,semantics:`queue`,payload:t?{...e,page:t}:e})},[ei.enqueue,f.kind]);de.current=ei.clear;let ni=q(()=>({enqueue:ei.enqueue,online:Ee,dropped:Yr}),[ei.enqueue,Ee,Yr]);K(()=>{Lt(e=>TC(e,ei.ops,Xt,Jr))},[ei.ops,Jr,Xt]),K(()=>{let e=new Set(ei.ops.map(e=>e.clientKey)),t=qr.current;for(let[n,r]of t)e.has(n.split(`:`)[0])||(URL.revokeObjectURL(r),t.delete(n))},[ei.ops]);let ri=J(null);K(()=>{if(D||T!==`production`||!Ee||!B||!R.token)return;let e=p.publicKey;if(!e||ri.current===d)return;ri.current=d;let t=async(e,t)=>{try{let n=await Pt.query({...t,fetchPolicy:`network-only`});n.data&&mt(e,n.data)}catch{}};g.features.news&&t(st.news(e,d),{query:an,variables:{args:{locale:d,limit:10,offset:0}}}),g.features.help&&(t(st.helpCategories(e,d),{query:Gt,variables:{parentId:null,locale:d}}),t(st.helpRoot(e,d),{query:Vt,variables:{args:{folderId:null,locale:d,recursive:!1,limit:20}}}))},[B,Ee,R.token,d,D,T,Pt]);let ii=J(!1);K(()=>{ii.current||E||!Ee||!B||(ii.current=!0,import(`./widget-react-i3rT0ift.js`),import(`./widget-react-BI1zRae2.js`))},[Ee,B,E]);let[ai]=Ge(),si=G(()=>{if(!R.chatId)return;let e=Rt;zt(Oo),ai({variables:{chatId:R.chatId}}).catch(()=>{zt(e)})},[ai,R.chatId,Rt]),[li,ui]=Y(!1),fi=G(async e=>{if(!(!e||li)){ui(!0);try{let t=await Pt.query({query:rt,variables:{chatId:e},fetchPolicy:`network-only`});Hw(t);let n=t.data?.visitorChatTranscript,r=F(g.messenger?.aiAssistant)??`Gaia`,i=Kn({visitorChatHistory:n},d,r).slice().reverse(),o=!!n&&typeof n==`object`&&n.truncated===!0,s=g.messenger?.title?.trim()||`Gaia`,c=Wi(i,{orgName:s,visitorLabel:ie?.email?.trim()||ie?.name?.trim()||a(`you`),aiName:r,locale:d,truncated:o,t:a}),l=tr(s,`conversation`),u=new Date,f=e=>String(e).padStart(2,`0`);er(`${l}-${e}-${`${u.getFullYear()}_${f(u.getMonth()+1)}_${f(u.getDate())}_${f(u.getHours())}${f(u.getMinutes())}${f(u.getSeconds())}${String(u.getMilliseconds()).padStart(3,`0`)}`}.txt`,c)||window.open(`data:text/plain;charset=utf-8,${encodeURIComponent(c)}`,`_blank`,`noopener,noreferrer`)}catch(e){console.warn(`[wexio] transcript download failed:`,e)}finally{ui(!1)}}},[li,Pt,d,g.messenger?.title,g.messenger?.aiAssistant,ie,a]),pi=G(()=>{let e=typeof crypto<`u`&&`randomUUID`in crypto?crypto.randomUUID():`thread-${Date.now()}`;ft(Cr.newConversationRoute(e))},[ft,Cr]),gi=(V.kind===`messages-thread`||V.kind===`help-article`||V.kind===`news-article`)&&vt,_i=gi?640:420,vi=gi?860:670,[yi,bi]=Y(null);K(()=>{if(typeof window>`u`)return;let e=()=>{let e=window.innerWidth,t=window.innerHeight;bi(n=>n&&n.w===e&&n.h===t?n:{w:e,h:t})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let xi=f.kind===`iframe`,Si=N||xi||!yi?_i:Math.min(_i,yi.w-Fw),Ci=N||xi||!yi?vi:Math.min(vi,yi.h-Iw),Ti=mi(),Ei=q(()=>hC(N?null:xi?Ti:yi?.w??null)?()=>yt(e=>!e):void 0,[N,xi,Ti,yi?.w]),Di=J(bC(V)),Oi=(()=>{let e=bC(V),t=Di.current;return Di.current=e,e===t?0:e>t?1:-1})(),ki=J(f.onResize);ki.current=f.onResize;let Ai=f.kind===`iframe`,ji=J(!1),Ni=J(FC());K(()=>{if(B){if(ji.current=!0,Ai)return Ni.current.report(Rr(_i,vi,{marginX:Fw,marginY:Iw}),(e,t)=>ki.current(e,t,!0));ki.current(_i,vi,!0);return}if(Ni.current.forget(),!Ai){ki.current(88,88,!1);return}let e=0,t=0,n=ji.current,r=()=>{if(typeof window>`u`||n)return;let r=$n(Sr(),{width:window.innerWidth,height:window.innerHeight},32,M?`left`:`right`);!r||r.width===e&&r.height===t||(e=r.width,t=r.height,ki.current(r.width,r.height,!1))},i=0,a=0,o=()=>{r(),i=performance.now()<a?requestAnimationFrame(o):0},s=()=>{a=performance.now()+600,i||(i=requestAnimationFrame(o))},c=n?zr(()=>Li.current,()=>{n=!1,ji.current=!1,s()}):null;n||s();let l=typeof ResizeObserver<`u`?new ResizeObserver(s):null;if(l)for(let e of _r){let t=xr(e);t&&l.observe(t)}return window.addEventListener(`resize`,s),()=>{c?.(),i&&cancelAnimationFrame(i),l?.disconnect(),window.removeEventListener(`resize`,s)}},[Ai,B,_i,vi,lr,ar,Nt.hasUnread,Ae&&Le,M]);let Pi=J(f.onLauncherPosition);Pi.current=f.onLauncherPosition,K(()=>{Pi.current?.(M?`left`:`right`)},[M]),mw(f,g.theme?.launcherOffset);let Fi=()=>qe(!1);_w(d,f.themeRoot);let Li=J(null);Tw({isOpen:B,panelRef:Li,onEscape:Fi,scopeToWidget:f.kind!==`iframe`});let Ri=async(e,t)=>{if(cr){Cr.onBubbleReply(t);return}let n=Yt.current??(Q?{chatId:Q.chatId||null,threadKey:Q.threadKey}:null);if(D)Kt(t),qn(Jn);else if(R.chatId){let r=`tmp-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;Er(LC(r,t));try{let i=(await Pr({variables:{input:IC(t,e,n?.threadKey??null)}})).data?.sendVisitorMessage?.messageId;i&&jr(r,{...LC(r,t),id:i,deliveryStatus:`DELIVERED`})}catch{}}n?.chatId?(ur.current=!0,H({kind:`messages-thread`,chatId:n.chatId,threadKey:n.threadKey})):H({kind:`messages`}),Je(),re()},zi=()=>{if(cr){Cr.onBubbleOpen();return}Q?(ur.current=!0,H({kind:`messages-thread`,chatId:Q.chatId||void 0,threadKey:Q.threadKey})):H({kind:`messages`}),Je()},Bi=!g.branding?.hidden,Vi=Ko(g.features),Hi=Bo(V)&&Vi>1,Ui=V.kind===`home`,Gi=Wo(V);K(()=>{Gi===`news`&&Nt.markRead()},[Gi,Nt.markRead]);let Ki=e=>{Sn(()=>{H(e===`messages`?br()??(En?Cr.messagesEntryRoute():dr()):{kind:e})})},Ji=J(!1),Yi=D||T!==`production`||!!R.token||!!R.error;Yi&&(Ji.current=!0);let Xi=Ji.current||Yi;if(w||v||!Xi)return null;return Z(He,{value:$r?ni:null,children:[X(ci,{value:Ce,children:X(Xr,{value:Tn,children:X(ht,{tracking:g.tracking,enabled:T===`production`&&!E,token:R.token,children:Z(o.div,{"aria-hidden":!B,inert:!B,initial:!1,animate:B?{opacity:1,y:0,scale:1,pointerEvents:`auto`,width:Si,height:Ci}:{opacity:0,y:16,scale:.98,pointerEvents:`none`,width:Si,height:Ci},transition:{opacity:{type:`spring`,stiffness:320,damping:30},y:{type:`spring`,stiffness:320,damping:30},scale:{type:`spring`,stiffness:320,damping:30},width:{type:`spring`,stiffness:300,damping:32},height:{type:`spring`,stiffness:300,damping:32}},"data-wx-panel":!0,role:`region`,"aria-label":t(`panel`),ref:Li,tabIndex:-1,style:{marginBottom:`var(--wx-off-y,0px)`,...M?{marginLeft:`var(--wx-off-x,0px)`}:{marginRight:`var(--wx-off-x,0px)`},maxWidth:N?`calc(100% - 2rem - var(--wx-off-x,0px))`:`calc(100vw - 2rem - var(--wx-off-x,0px))`,maxHeight:N?`calc(100% - 7rem - var(--wx-off-y,0px))`:`calc(100dvh - 7rem - var(--wx-off-y,0px))`},className:u(`isolate flex flex-col overflow-hidden bg-wx-bg text-wx-fg outline-none`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-solid focus-visible:outline-wx-primary`,N?`absolute`:`fixed`,`bottom-24 z-2147483601 rounded-wx-xl`,M?`left-4`:`right-4`),children:[Ui&&X(CC,{glow:g.theme?.homeBackdropGlow!==!1}),Zi({route:V,onPop:()=>H(Vo(V,g.features)),onClose:Fi}),X(`main`,{className:`relative flex flex-1 flex-col overflow-hidden`,children:At&&X(Mt,{mode:`sync`,initial:!1,custom:Oi,children:Z(KC,{custom:Oi,variants:SC,initial:`enter`,animate:`center`,exit:`exit`,transition:{x:{type:`tween`,duration:.18,ease:[.32,.72,0,1]},opacity:{duration:.14,ease:`easeOut`}},style:{willChange:`transform, opacity`},className:`absolute inset-0 flex flex-col overflow-hidden`,children:[V.kind===`home`&&X(Sd,{config:g,organizationLogoUrl:at,onClose:Fi,onOpenTab:e=>H({kind:e}),onOpenThread:()=>ft({kind:`messages-thread`,chatId:R.chatId??void 0,threadKey:null}),onOpenNewsArticle:e=>ft({kind:`news-article`,id:e}),onOpenHelpArticle:e=>ft({kind:`help-article`,slug:e,from:`search`}),isDummy:E,chatId:R.chatId??null}),V.kind===`messages`&&X(kh,{threads:Pn,loading:zn,loadError:!D&&!!$t.error&&Pn.length===0,onRetry:nn,avatarUrl:ct??void 0,onOpenThread:e=>{ft({kind:`messages-thread`,chatId:e.chatId||void 0,threadKey:e.threadKey})},onNewQuestion:pi,blocked:Ln,slotThread:fr}),V.kind===`messages-thread`&&V.pendingLatest&&X(Oh,{}),V.kind===`messages-thread`&&!V.pendingLatest&&X(Dh,{isDummy:D,chatId:V.chatId??(V.threadKey?null:R.chatId),threadKey:V.threadKey,welcomeSlotId:V.welcomeSlotId,catchUpHistory:!!fn&&V.chatId===fn,onChatIdResolved:e=>{H(t=>t.kind===`messages-thread`&&!t.chatId?{...t,chatId:e}:t),pn(e),nn(),dn(e=>e+1)},token:R.token,prechatForm:g.prechatForm,messenger:g.messenger,organizationLogoUrl:at,organizationName:g.messenger?.title??``,operatorAvatars:g.operatorAvatars,isOpen:B,onInbound:ne,onOutbound:pr,registerRealtimeHandler:Nr,unreadCount:Bn,clearUnread:Un,liveMessages:It,appendLiveMessage:Er,replaceLiveMessage:jr,enqueueSend:$r?ti:void 0,onRetryOutbox:ei.retry,assignmentStatus:Rt.status,assignmentEstimate:Rt.estimate,threadStatus:In,blocked:Rn,globalBlocked:Ln,onStartNewConversation:pi,initialVisitorMessage:D?Wt:qt&&qt.threadKey===V.threadKey?qt.text:null,onInitialVisitorMessageSent:()=>{Kt(null),Jt(null)},visitorIdentity:ie,visitorPrefill:ae,security:g.security,verified:R.verified,identified:Te,sessionName:Te?R.displayName:null,onGoogleCredential:e=>se({googleIdToken:e}),onPasskeySession:e=>{qa(e,p.publicKey,p.storage),Se({token:e.token,chatId:e.chatId,peopleId:e.peopleId,displayName:e.displayName,isAuthenticating:!1,error:null,verified:!0,blocked:!1})},onInternalLink:e=>{e.kind===`help-article`?ft({kind:`help-article`,slug:e.slug,from:`search`,locale:e.locale}):e.kind===`news-article`&&H({kind:`news`})},getTurnstileToken:be},ce),V.kind===`help`&&X(Dl,{isDummy:E,onOpenCategory:(e,t)=>ft({kind:`help-category`,categoryId:e,categoryName:t?.name,categoryDescription:t?.description,categoryArticleCount:t?.articleCount}),onOpenArticle:e=>ft({kind:`help-article`,slug:e,from:`search`})}),V.kind===`help-category`&&X(zc,{categoryId:V.categoryId,categoryName:V.categoryName,categoryDescription:V.categoryDescription,categoryArticleCount:V.categoryArticleCount,isDummy:E,onOpenCategory:(e,t)=>ft({kind:`help-category`,categoryId:e,categoryName:t?.name,categoryDescription:t?.description,categoryArticleCount:t?.articleCount}),onOpenArticle:e=>ft({kind:`help-article`,slug:e,from:`category`,fromCategoryId:V.categoryId})}),V.kind===`help-article`&&X(_n,{fallback:X(Uw,{}),children:X(jw,{slug:V.slug,locale:V.locale??d,isDummy:E,onHandoff:()=>H({kind:`messages`}),onOpenArticle:e=>H(t=>Uo({kind:`help-article`,slug:e,from:`search`},t)),onOpenTranslation:(e,t)=>H({kind:`help-article`,slug:e,locale:t,from:V.from,fromCategoryId:V.fromCategoryId,origin:V.origin}),onTitleResolved:Et})}),V.kind===`news`&&X(sn,{isDummy:E,onOpenArticle:e=>ft({kind:`news-article`,id:e})}),V.kind===`news-article`&&X(_n,{fallback:X(Uw,{}),children:X(Mw,{id:V.id,isDummy:E,onOpenRelated:e=>H(t=>Uo({kind:`news-article`,id:e},t)),onTitleResolved:Et})}),V.kind===`profile`&&X(QS,{isDummy:D,pending:!D&&T===`production`&&!R.token&&R.isAuthenticating},le)]},xC(V))})}),Hi&&X(Cc,{active:Gi,features:g.features,onChange:Ki,unreadCount:Wn,newsUnread:Nt.hasUnread}),X(Oc,{online:Ee,showBranding:Bi})]})})})}),X(wl,{message:B?null:lr,onOpen:zi,onDismiss:()=>cr?Cr.onBubbleDismiss():qn($),onSendButton:Ri,position:M?`left`:`right`,embedded:N}),X(oC,{open:Ae&&Le,errorCode:R.error,onRetry:Ve,onDismiss:Be,position:M?`left`:`right`,embedded:N}),X(rC,{isOpen:B,onToggle:Cr.onLauncherToggle,unreadCount:ar,newsUnread:Nt.hasUnread,logoUrl:g.showLogoInLauncher?at:null,position:M?`left`:`right`,embedded:N,loading:Pe})]});function Zi({route:t,onPop:n,onClose:r}){if(t.kind===`messages`)return X(El,{title:e(`messagesTitle`),onClose:r});if(t.kind===`messages-thread`){let i=g.messenger?.title?.trim()||`Gaia`,a=g.messenger?.description?.trim()||e(`conversationSubtitle`),o=t.chatId??(t.threadKey?null:R.chatId);return X(kc,{title:i,subtitle:a,organizationLogoUrl:ct,muted:P,onToggleMute:ee,onBack:n,onClose:r,expanded:gi,onToggleExpand:Ei,showResolve:Rt.status===`connected`,onResolve:si,onDownloadTranscript:!D&&o?()=>fi(o):void 0,downloadingTranscript:li})}return t.kind===`help`?X(El,{title:e(`helpTitle`),onClose:r}):t.kind===`help-category`?X(El,{title:e(`helpTitle`),onBack:n,onClose:r}):t.kind===`help-article`?X(El,{title:Dt??e(`helpTitle`),onBack:n,onClose:r,expanded:gi,onToggleExpand:Ei}):t.kind===`news`?X(El,{title:e(`newsTitle`),onClose:r}):t.kind===`news-article`?X(El,{title:Dt??e(`newsTitle`),onBack:n,onClose:r,expanded:gi,onToggleExpand:Ei}):null}}var Kw=Object.freeze({}),qw=e=>({...e,demo:Kw}),Jw={locale:`en`,messages:qw(pn)},Yw=Jw,Xw=new Map([[`en`,Yw]]),Zw=new Map;function Qw(e){return Xw.get(e)??null}function $w(e,t=vo,n=wr){let r=Xw.get(e);if(r)return Promise.resolve(r);let i=Zw.get(e);if(i)return i;let a=jr(()=>t(e),n,(e,t)=>Mr(e,t).then(e=>e.default)).then(t=>{let n={locale:e,messages:qw(t)};return Xw.set(e,n),Zw.delete(e),n},t=>(Zw.delete(e),console.warn(`[wexio] the "${e}" language chunk failed to load; showing English`,t),Yw));return Zw.set(e,a),a}function eT(e){let[t,n]=Y(()=>Qw(e)??Jw);return K(()=>{let t=!1;return $w(e).then(e=>{t||n(t=>t===e?t:e)}),()=>{t=!0}},[e]),t}var tT=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
176
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:var(--font-geist-sans);--font-mono:var(--font-geist-mono);--color-amber-300:#ffd236;--color-emerald-300:#5ee9b5;--color-sky-300:#77d4ff;--color-violet-300:#c4b4ff;--color-rose-300:#ffa2ae;--color-zinc-100:#f4f4f5;--color-zinc-500:#71717b;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-geist-sans);--default-mono-font-family:var(--font-geist-mono);--color-wx-bg:var(--wx-bg);--color-wx-bg-elevated:var(--wx-bg-elevated);--color-wx-bg-elevated-2:var(--wx-bg-elevated-2);--color-wx-fg:var(--wx-fg);--color-wx-fg-muted:var(--wx-fg-muted);--color-wx-fg-subtle:var(--wx-fg-subtle);--color-wx-border:var(--wx-border);--color-wx-border-strong:var(--wx-border-strong);--color-wx-primary:var(--wx-primary);--color-wx-primary-hover:var(--wx-primary-hover);--color-wx-primary-fg:var(--wx-primary-fg);--color-wx-launcher-bg:var(--wx-launcher-bg);--color-wx-launcher-fg:var(--wx-launcher-fg);--color-wx-success:var(--wx-success);--color-wx-danger:var(--wx-danger);--color-wx-warning:var(--wx-warning);--radius-wx-sm:var(--wx-radius-sm);--radius-wx:var(--wx-radius);--radius-wx-lg:var(--wx-radius-lg);--radius-wx-xl:var(--wx-radius-xl)}@supports (color:color(display-p3 0 0 0)){:root,:host{--color-amber-300:color(display-p3 .974327 .83063 .33298);--color-emerald-300:color(display-p3 .524941 .903425 .722352);--color-sky-300:color(display-p3 .546356 .822561 .990576);--color-violet-300:color(display-p3 .758872 .706261 .991729);--color-rose-300:color(display-p3 .96017 .647703 .683715);--color-zinc-100:color(display-p3 .956385 .956385 .959079);--color-zinc-500:color(display-p3 .442983 .442931 .480324)}}@supports (color:lab(0% 0 0)){:root,:host{--color-amber-300:lab(86.4156% 6.13147 78.3961);--color-emerald-300:lab(83.9203% -48.7124 13.8849);--color-sky-300:lab(80.3307% -20.2945 -31.385);--color-violet-300:lab(76.7419% 18.3911 -37.0706);--color-rose-300:lab(76.6339% 38.3549 9.68835);--color-zinc-100:lab(96.1634% .0993311 -.364041);--color-zinc-500:lab(47.8878% 1.65477 -5.77283)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host *,:host :before,:host :after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-1{inset:calc(var(--spacing) * -1)}.-inset-2{inset:calc(var(--spacing) * -2)}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-x-2{inset-inline:calc(var(--spacing) * 2)}.-top-1{top:calc(var(--spacing) * -1)}.-top-1\\.5{top:calc(var(--spacing) * -1.5)}.-top-8{top:calc(var(--spacing) * -8)}.top-0{top:calc(var(--spacing) * 0)}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:calc(var(--spacing) * 1)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-2\\.5{top:calc(var(--spacing) * 2.5)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-1\\.5{right:calc(var(--spacing) * -1.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-5{bottom:calc(var(--spacing) * 5)}.bottom-24{bottom:calc(var(--spacing) * 24)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-0\\.5{left:calc(var(--spacing) * .5)}.left-1{left:calc(var(--spacing) * 1)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-3{left:calc(var(--spacing) * 3)}.left-3\\.5{left:calc(var(--spacing) * 3.5)}.left-4{left:calc(var(--spacing) * 4)}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-10{z-index:calc(10 * -1)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-2147483599{z-index:2147483599}.z-2147483600{z-index:2147483600}.z-2147483601{z-index:2147483601}.z-2147483602{z-index:2147483602}.z-2147483647{z-index:2147483647}.z-\\[10000\\]{z-index:10000}.z-\\[2147483647\\]{z-index:2147483647}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.container\\!{width:100%!important}@media (min-width:40rem){.container\\!{max-width:40rem!important}}@media (min-width:48rem){.container\\!{max-width:48rem!important}}@media (min-width:64rem){.container\\!{max-width:64rem!important}}@media (min-width:80rem){.container\\!{max-width:80rem!important}}@media (min-width:96rem){.container\\!{max-width:96rem!important}}.-m-0{margin:calc(var(--spacing) * 0)}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.m-0{margin:calc(var(--spacing) * 0)}.m-1{margin:calc(var(--spacing) * 1)}.-mx-3{margin-inline:calc(var(--spacing) * -3)}.mx-0{margin-inline:calc(var(--spacing) * 0)}.mx-0\\.5{margin-inline:calc(var(--spacing) * .5)}.mx-auto{margin-inline-start:auto;margin-inline-end:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-4{margin-block:calc(var(--spacing) * 4)}.-mt-2{margin-top:calc(var(--spacing) * -2)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.-mb-4{margin-bottom:calc(var(--spacing) * -4)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.ml-0{margin-left:calc(var(--spacing) * 0)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-9{margin-left:calc(var(--spacing) * 9)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-10{-webkit-line-clamp:10;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\\!hidden{display:none!important}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.aspect-\\[16\\/9\\]{aspect-ratio:16/9}.aspect-\\[16\\/10\\]{aspect-ratio:16/10}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-full{width:100%;height:100%}.h-0{height:calc(var(--spacing) * 0)}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-13{height:calc(var(--spacing) * 13)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-24{height:calc(var(--spacing) * 24)}.h-96{height:calc(var(--spacing) * 96)}.h-105{height:calc(var(--spacing) * 105)}.h-\\[1\\.05em\\]{height:1.05em}.h-\\[2px\\]{height:2px}.h-\\[26px\\]{height:26px}.h-\\[90vh\\]{height:90vh}.h-\\[720px\\]{height:720px}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\\[20rem\\]{max-height:20rem}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[calc\\(100\\%-7rem\\)\\]{max-height:calc(100% - 7rem)}.max-h-\\[calc\\(100dvh-7rem\\)\\]{max-height:calc(100dvh - 7rem)}.max-h-full{max-height:100%}.max-h-none{max-height:none}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-12{min-height:calc(var(--spacing) * 12)}.w-0{width:calc(var(--spacing) * 0)}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-1\\/2{width:50%}.w-1\\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\\/3{width:66.6667%}.w-2\\/5{width:40%}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-3\\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-4\\/5{width:80%}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-7\\/12{width:58.3333%}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-9\\/12{width:75%}.w-10{width:calc(var(--spacing) * 10)}.w-10\\/12{width:83.3333%}.w-11{width:calc(var(--spacing) * 11)}.w-11\\/12{width:91.6667%}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-95{width:calc(var(--spacing) * 95)}.w-\\[0\\.5em\\]{width:.5em}.w-\\[90vw\\]{width:90vw}.w-\\[300px\\]{width:300px}.w-\\[420px\\]{width:420px}.w-auto{width:auto}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-\\[52vw\\]{max-width:52vw}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[90vw\\]{max-width:90vw}.max-w-\\[140px\\]{max-width:140px}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[calc\\(85\\%_-_2\\.25rem\\)\\]{max-width:calc(85% - 2.25rem)}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.max-w-\\[calc\\(100vw-2rem\\)\\]{max-width:calc(100vw - 2rem)}.max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-3{min-width:calc(var(--spacing) * 3)}.min-w-3\\.5{min-width:calc(var(--spacing) * 3.5)}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-32{min-width:calc(var(--spacing) * 32)}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-\\[2_2_0\\%\\]{flex:2 2}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.shrink-2{flex-shrink:2}.shrink-\\[0\\.01\\]{flex-shrink:.01}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:0 100%}.origin-left{transform-origin:0}.-translate-x-1{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\\[1px\\]{--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[0\\.15em\\]{--tw-translate-y:.15em;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-none{translate:none}.scale-x-0{--tw-scale-x:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-x-100{--tw-scale-x:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-3d{scale:var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-zoom-in{cursor:zoom-in}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.\\[scrollbar-color\\:var\\(--color-wx-fg-subtle\\)_transparent\\]{scrollbar-color:var(--color-wx-fg-subtle) transparent}.list-none{list-style-type:none}.columns-2{columns:2}.auto-rows-fr{grid-auto-rows:minmax(0,1fr)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.grid-rows-\\[minmax\\(0\\,1fr\\)\\]{grid-template-rows:minmax(0,1fr)}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.-space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -1) * calc(1 - var(--tw-space-x-reverse)))}:where(.-space-x-1\\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -1.5) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -1.5) * calc(1 - var(--tw-space-x-reverse)))}:where(.-space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -2) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-wx{border-radius:var(--wx-radius)}.rounded-wx-lg{border-radius:var(--wx-radius-lg)}.rounded-wx-sm{border-radius:var(--wx-radius-sm)}.rounded-wx-xl{border-radius:var(--wx-radius-xl)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-s:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-s:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-s:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-ss:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:.25rem}.rounded-ss:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:.25rem}.rounded-ss:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:.25rem}.rounded-ss:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:.25rem}.rounded-e:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-e:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-e:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-e:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-se:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:.25rem}.rounded-se:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:.25rem}.rounded-se:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:.25rem}.rounded-se:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:.25rem}.rounded-ee:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:.25rem}.rounded-ee:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:.25rem}.rounded-ee:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:.25rem}.rounded-ee:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:.25rem}.rounded-es:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:.25rem}.rounded-es:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:.25rem}.rounded-es:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:.25rem}.rounded-es:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-x{border-inline-style:var(--tw-border-style);border-left-width:1px;border-right-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-start-width:1px;border-block-end-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-bs{border-block-start-style:var(--tw-border-style);border-block-start-width:1px}.border-be{border-block-end-style:var(--tw-border-style);border-block-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-black{border-color:var(--color-black)}.border-black\\/15{border-color:#00000026}@supports (color:color-mix(in lab, red, red)){.border-black\\/15{border-color:color-mix(in oklab, var(--color-black) 15%, transparent)}}.border-white{border-color:var(--color-white)}.border-wx-bg{border-color:var(--wx-bg)}.border-wx-border,.border-wx-border\\/60{border-color:var(--wx-border)}@supports (color:color-mix(in lab, red, red)){.border-wx-border\\/60{border-color:color-mix(in oklab, var(--wx-border) 60%, transparent)}}.border-wx-border\\/70{border-color:var(--wx-border)}@supports (color:color-mix(in lab, red, red)){.border-wx-border\\/70{border-color:color-mix(in oklab, var(--wx-border) 70%, transparent)}}.border-wx-danger,.border-wx-danger\\/30{border-color:var(--wx-danger)}@supports (color:color-mix(in lab, red, red)){.border-wx-danger\\/30{border-color:color-mix(in oklab, var(--wx-danger) 30%, transparent)}}.border-wx-launcher-fg,.border-wx-launcher-fg\\/30{border-color:var(--wx-launcher-fg)}@supports (color:color-mix(in lab, red, red)){.border-wx-launcher-fg\\/30{border-color:color-mix(in oklab, var(--wx-launcher-fg) 30%, transparent)}}.border-wx-primary,.border-wx-primary\\/30{border-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.border-wx-primary\\/30{border-color:color-mix(in oklab, var(--wx-primary) 30%, transparent)}}.border-wx-success,.border-wx-success\\/30{border-color:var(--wx-success)}@supports (color:color-mix(in lab, red, red)){.border-wx-success\\/30{border-color:color-mix(in oklab, var(--wx-success) 30%, transparent)}}.border-wx-warning,.border-wx-warning\\/30{border-color:var(--wx-warning)}@supports (color:color-mix(in lab, red, red)){.border-wx-warning\\/30{border-color:color-mix(in oklab, var(--wx-warning) 30%, transparent)}}.border-t-transparent{border-top-color:#0000}.border-t-wx-launcher-fg{border-top-color:var(--wx-launcher-fg)}.border-t-wx-primary{border-top-color:var(--wx-primary)}.border-l-transparent{border-left-color:#0000}.bg-\\[\\#1a1a1f\\]{background-color:#1a1a1f}.bg-black{background-color:var(--color-black)}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\\/45{background-color:#00000073}@supports (color:color-mix(in lab, red, red)){.bg-black\\/45{background-color:color-mix(in oklab, var(--color-black) 45%, transparent)}}.bg-black\\/85{background-color:#000000d9}@supports (color:color-mix(in lab, red, red)){.bg-black\\/85{background-color:color-mix(in oklab, var(--color-black) 85%, transparent)}}.bg-current{background-color:currentColor}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.bg-white\\/10{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.bg-wx-bg{background-color:var(--wx-bg)}.bg-wx-bg-elevated{background-color:var(--wx-bg-elevated)}.bg-wx-bg-elevated-2{background-color:var(--wx-bg-elevated-2)}.bg-wx-bg-elevated\\/60{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.bg-wx-bg-elevated\\/60{background-color:color-mix(in oklab, var(--wx-bg-elevated) 60%, transparent)}}.bg-wx-bg-elevated\\/70{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.bg-wx-bg-elevated\\/70{background-color:color-mix(in oklab, var(--wx-bg-elevated) 70%, transparent)}}.bg-wx-bg\\/60{background-color:var(--wx-bg)}@supports (color:color-mix(in lab, red, red)){.bg-wx-bg\\/60{background-color:color-mix(in oklab, var(--wx-bg) 60%, transparent)}}.bg-wx-bg\\/95{background-color:var(--wx-bg)}@supports (color:color-mix(in lab, red, red)){.bg-wx-bg\\/95{background-color:color-mix(in oklab, var(--wx-bg) 95%, transparent)}}.bg-wx-border,.bg-wx-border\\/70{background-color:var(--wx-border)}@supports (color:color-mix(in lab, red, red)){.bg-wx-border\\/70{background-color:color-mix(in oklab, var(--wx-border) 70%, transparent)}}.bg-wx-danger,.bg-wx-danger\\/5{background-color:var(--wx-danger)}@supports (color:color-mix(in lab, red, red)){.bg-wx-danger\\/5{background-color:color-mix(in oklab, var(--wx-danger) 5%, transparent)}}.bg-wx-danger\\/10{background-color:var(--wx-danger)}@supports (color:color-mix(in lab, red, red)){.bg-wx-danger\\/10{background-color:color-mix(in oklab, var(--wx-danger) 10%, transparent)}}.bg-wx-danger\\/40{background-color:var(--wx-danger)}@supports (color:color-mix(in lab, red, red)){.bg-wx-danger\\/40{background-color:color-mix(in oklab, var(--wx-danger) 40%, transparent)}}.bg-wx-fg{background-color:var(--wx-fg)}.bg-wx-fg-muted,.bg-wx-fg-muted\\/40{background-color:var(--wx-fg-muted)}@supports (color:color-mix(in lab, red, red)){.bg-wx-fg-muted\\/40{background-color:color-mix(in oklab, var(--wx-fg-muted) 40%, transparent)}}.bg-wx-fg-subtle{background-color:var(--wx-fg-subtle)}.bg-wx-launcher-bg{background-color:var(--wx-launcher-bg)}.bg-wx-primary{background-color:var(--wx-primary)}.bg-wx-primary-fg,.bg-wx-primary-fg\\/10{background-color:var(--wx-primary-fg)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary-fg\\/10{background-color:color-mix(in oklab, var(--wx-primary-fg) 10%, transparent)}}.bg-wx-primary-fg\\/35{background-color:var(--wx-primary-fg)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary-fg\\/35{background-color:color-mix(in oklab, var(--wx-primary-fg) 35%, transparent)}}.bg-wx-primary\\/5{background-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary\\/5{background-color:color-mix(in oklab, var(--wx-primary) 5%, transparent)}}.bg-wx-primary\\/10{background-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary\\/10{background-color:color-mix(in oklab, var(--wx-primary) 10%, transparent)}}.bg-wx-primary\\/12{background-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary\\/12{background-color:color-mix(in oklab, var(--wx-primary) 12%, transparent)}}.bg-wx-primary\\/20{background-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.bg-wx-primary\\/20{background-color:color-mix(in oklab, var(--wx-primary) 20%, transparent)}}.bg-wx-success,.bg-wx-success\\/5{background-color:var(--wx-success)}@supports (color:color-mix(in lab, red, red)){.bg-wx-success\\/5{background-color:color-mix(in oklab, var(--wx-success) 5%, transparent)}}.bg-wx-success\\/10{background-color:var(--wx-success)}@supports (color:color-mix(in lab, red, red)){.bg-wx-success\\/10{background-color:color-mix(in oklab, var(--wx-success) 10%, transparent)}}.bg-wx-warning,.bg-wx-warning\\/5{background-color:var(--wx-warning)}@supports (color:color-mix(in lab, red, red)){.bg-wx-warning\\/5{background-color:color-mix(in oklab, var(--wx-warning) 5%, transparent)}}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\\[linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]{background-image:linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}.bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,color-mix\\(in_srgb\\,var\\(--wx-home-glow\\)_var\\(--wx-home-glow-a\\,22\\%\\)\\,transparent\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]{background-image:radial-gradient(120% 80% at 50% -10%,var(--wx-home-glow),transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}@supports (color:color-mix(in lab, red, red)){.bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,color-mix\\(in_srgb\\,var\\(--wx-home-glow\\)_var\\(--wx-home-glow-a\\,22\\%\\)\\,transparent\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]{background-image:radial-gradient(120% 80% at 50% -10%,color-mix(in srgb,var(--wx-home-glow) var(--wx-home-glow-a,22%),transparent),transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}}.bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,rgba\\(99\\,102\\,241\\,0\\.22\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]{background-image:radial-gradient(120% 80% at 50% -10%,#6366f138,transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}.from-wx-bg{--tw-gradient-from:var(--wx-bg);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-wx-bg-elevated{--tw-gradient-from:var(--wx-bg-elevated);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-wx-bg{--tw-gradient-via:var(--wx-bg);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-wx-bg\\/80{--tw-gradient-via:var(--wx-bg)}@supports (color:color-mix(in lab, red, red)){.via-wx-bg\\/80{--tw-gradient-via:color-mix(in oklab, var(--wx-bg) 80%, transparent)}}.via-wx-bg\\/80{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-wx-bg-elevated-2{--tw-gradient-to:var(--wx-bg-elevated-2);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.bg-repeat{background-repeat:repeat}.mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-px{padding:1px}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-0\\.75{padding-inline:calc(var(--spacing) * .75)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-9{padding-right:calc(var(--spacing) * 9)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-12{padding-bottom:calc(var(--spacing) * 12)}.pb-\\[4\\.5rem\\]{padding-bottom:4.5rem}.pl-1{padding-left:calc(var(--spacing) * 1)}.pl-1\\.5{padding-left:calc(var(--spacing) * 1.5)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-geist-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.7em\\]{font-size:.7em}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.leading-\\[1\\.35\\]{--tw-leading:1.35;line-height:1.35}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\\[0\\.14em\\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-\\[0\\.22em\\]{--tw-tracking:.22em;letter-spacing:.22em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-wrap{text-wrap:wrap}.\\[overflow-wrap\\:anywhere\\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[\\#1a1a1f\\]{color:#1a1a1f}.text-white{color:var(--color-white)}.text-wx-bg,.text-wx-bg\\/70{color:var(--wx-bg)}@supports (color:color-mix(in lab, red, red)){.text-wx-bg\\/70{color:color-mix(in oklab, var(--wx-bg) 70%, transparent)}}.text-wx-danger{color:var(--wx-danger)}.text-wx-fg{color:var(--wx-fg)}.text-wx-fg-muted{color:var(--wx-fg-muted)}.text-wx-fg-subtle{color:var(--wx-fg-subtle)}.text-wx-launcher-fg{color:var(--wx-launcher-fg)}.text-wx-primary{color:var(--wx-primary)}.text-wx-primary-fg,.text-wx-primary-fg\\/70{color:var(--wx-primary-fg)}@supports (color:color-mix(in lab, red, red)){.text-wx-primary-fg\\/70{color:color-mix(in oklab, var(--wx-primary-fg) 70%, transparent)}}.text-wx-success{color:var(--wx-success)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-85{opacity:.85}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_3px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 1px 3px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_4px_12px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 4px 12px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_8px_24px_rgba\\(0\\,0\\,0\\,0\\.18\\)\\]{--tw-shadow:0 8px 24px var(--tw-shadow-color,#0000002e);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_10px_28px_rgba\\(0\\,0\\,0\\,0\\.14\\)\\]{--tw-shadow:0 10px 28px var(--tw-shadow-color,#00000024);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_12px_32px_rgba\\(0\\,0\\,0\\,0\\.16\\)\\]{--tw-shadow:0 12px 32px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_16px_40px_rgba\\(0\\,0\\,0\\,0\\.16\\)\\]{--tw-shadow:0 16px 40px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_rgb\\(0_0_0\\/0\\.04\\)\\]{--tw-shadow:inset 0 0 0 1px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-black{--tw-shadow-color:#000}@supports (color:color-mix(in lab, red, red)){.shadow-black{--tw-shadow-color:color-mix(in oklab, var(--color-black) var(--tw-shadow-alpha), transparent)}}.shadow-black\\/\\[0\\.06\\]{--tw-shadow-color:#0000000f}@supports (color:color-mix(in lab, red, red)){.shadow-black\\/\\[0\\.06\\]{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 6%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-black{--tw-ring-color:var(--color-black)}.ring-black\\/10{--tw-ring-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.ring-black\\/10{--tw-ring-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.ring-wx-bg{--tw-ring-color:var(--wx-bg)}.ring-wx-bg-elevated,.ring-wx-bg-elevated\\/60{--tw-ring-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.ring-wx-bg-elevated\\/60{--tw-ring-color:color-mix(in oklab, var(--wx-bg-elevated) 60%, transparent)}}.ring-wx-border{--tw-ring-color:var(--wx-border)}.ring-wx-danger{--tw-ring-color:var(--wx-danger)}.ring-wx-primary,.ring-wx-primary\\/40{--tw-ring-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.ring-wx-primary\\/40{--tw-ring-color:color-mix(in oklab, var(--wx-primary) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\\[2px\\]{--tw-blur:blur(2px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-lg{--tw-blur:blur(var(--blur-lg));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[background-color\\,color\\,transform\\]{transition-property:background-color,color,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-\\[420ms\\]{--tw-duration:.42s;transition-duration:.42s}.ease-\\[cubic-bezier\\(0\\.34\\,1\\.42\\,0\\.5\\,1\\)\\]{--tw-ease:cubic-bezier(.34,1.42,.5,1);transition-timing-function:cubic-bezier(.34,1.42,.5,1)}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[animation-delay\\:-0\\.3s\\]{animation-delay:-.3s}.\\[animation-delay\\:-0\\.15s\\]{animation-delay:-.15s}.\\[direction\\:inherit\\]{direction:inherit}.\\[t\\:systemFieldOptions\\.chatStatus\\.IN_PROGRESS\\]{t:systemFieldOptions.chatStatus.IN PROGRESS}.\\[t\\:systemFields\\.chatStatus\\]{t:systemFields.chatStatus}.\\[t\\:systemFields\\.firstName\\]{t:systemFields.firstName}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\\:block:is(:where(.group):hover *){display:block}.group-hover\\:translate-x-0\\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:-translate-y-full:is(:where(.group):hover *){--tw-translate-y:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:translate-y-0:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\\:scale-\\[1\\.02\\]:is(:where(.group):hover *){scale:1.02}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-active\\:scale-90:is(:where(.group):active *){--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.placeholder\\:text-wx-danger\\/60::placeholder{color:var(--wx-danger)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-wx-danger\\/60::placeholder{color:color-mix(in oklab, var(--wx-danger) 60%, transparent)}}.placeholder\\:text-wx-fg-muted::placeholder{color:var(--wx-fg-muted)}.placeholder\\:text-wx-fg-subtle::placeholder{color:var(--wx-fg-subtle)}.backdrop\\:bg-transparent::backdrop{background-color:#0000}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:-inset-2\\.5:before{content:var(--tw-content);inset:calc(var(--spacing) * -2.5)}.before\\:content-\\[\\'\\'\\]:before{--tw-content:"";content:var(--tw-content)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:top-1\\/2:after{content:var(--tw-content);top:50%}.after\\:left-1\\/2:after{content:var(--tw-content);left:50%}.after\\:-translate-x-1\\/2:after{content:var(--tw-content);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.after\\:-translate-y-1\\/2:after{content:var(--tw-content);--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.after\\:content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.first\\:mt-4:first-child{margin-top:calc(var(--spacing) * 4)}.first\\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first\\:pt-0:first-child{padding-top:calc(var(--spacing) * 0)}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.read-only\\:cursor-not-allowed:read-only{cursor:not-allowed}.read-only\\:bg-wx-bg-elevated\\/60:read-only{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.read-only\\:bg-wx-bg-elevated\\/60:read-only{background-color:color-mix(in oklab, var(--wx-bg-elevated) 60%, transparent)}}.read-only\\:text-wx-fg-muted:read-only{color:var(--wx-fg-muted)}.focus-within\\:border-wx-primary:focus-within{border-color:var(--wx-primary)}.focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\\:ring-wx-primary\\/20:focus-within{--tw-ring-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-wx-primary\\/20:focus-within{--tw-ring-color:color-mix(in oklab, var(--wx-primary) 20%, transparent)}}@media (hover:hover){.hover\\:scale-\\[1\\.04\\]:hover{scale:1.04}.hover\\:bg-\\[\\#1a1a1f\\]\\/90:hover{background-color:#1a1a1fe6;background-color:color(display-p3 .10196 .10196 .119938/.9);background-color:lab(9.42875% 1.01694 -3.48157/.9)}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\\:bg-white\\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/20:hover{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.hover\\:bg-wx-bg:hover{background-color:var(--wx-bg)}.hover\\:bg-wx-bg-elevated:hover{background-color:var(--wx-bg-elevated)}.hover\\:bg-wx-bg-elevated-2:hover{background-color:var(--wx-bg-elevated-2)}.hover\\:bg-wx-bg-elevated\\/40:hover{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-bg-elevated\\/40:hover{background-color:color-mix(in oklab, var(--wx-bg-elevated) 40%, transparent)}}.hover\\:bg-wx-bg-elevated\\/50:hover{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-bg-elevated\\/50:hover{background-color:color-mix(in oklab, var(--wx-bg-elevated) 50%, transparent)}}.hover\\:bg-wx-bg-elevated\\/60:hover{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-bg-elevated\\/60:hover{background-color:color-mix(in oklab, var(--wx-bg-elevated) 60%, transparent)}}.hover\\:bg-wx-bg-elevated\\/80:hover{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-bg-elevated\\/80:hover{background-color:color-mix(in oklab, var(--wx-bg-elevated) 80%, transparent)}}.hover\\:bg-wx-fg-muted\\/60:hover{background-color:var(--wx-fg-muted)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-fg-muted\\/60:hover{background-color:color-mix(in oklab, var(--wx-fg-muted) 60%, transparent)}}.hover\\:bg-wx-primary:hover{background-color:var(--wx-primary)}.hover\\:bg-wx-primary-fg\\/20:hover{background-color:var(--wx-primary-fg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-primary-fg\\/20:hover{background-color:color-mix(in oklab, var(--wx-primary-fg) 20%, transparent)}}.hover\\:bg-wx-primary-hover:hover{background-color:var(--wx-primary-hover)}.hover\\:bg-wx-primary\\/12:hover{background-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-wx-primary\\/12:hover{background-color:color-mix(in oklab, var(--wx-primary) 12%, transparent)}}.hover\\:text-wx-danger:hover{color:var(--wx-danger)}.hover\\:text-wx-fg:hover{color:var(--wx-fg)}.hover\\:text-wx-primary:hover{color:var(--wx-primary)}.hover\\:text-wx-primary-fg:hover{color:var(--wx-primary-fg)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-70:hover{opacity:.7}.hover\\:opacity-80:hover{opacity:.8}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-95:hover{opacity:.95}.hover\\:opacity-100:hover{opacity:1}}.focus\\:border-wx-primary:focus{border-color:var(--wx-primary)}.focus\\:bg-wx-bg-elevated:focus{background-color:var(--wx-bg-elevated)}.focus\\:text-wx-fg:focus{color:var(--wx-fg)}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-wx-danger:focus{--tw-ring-color:var(--wx-danger)}.focus\\:ring-wx-primary:focus,.focus\\:ring-wx-primary\\/20:focus{--tw-ring-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-wx-primary\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--wx-primary) 20%, transparent)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-\\[\\#1a1a1f\\]:focus-visible{--tw-ring-color:#1a1a1f}.focus-visible\\:ring-wx-launcher-bg:focus-visible{--tw-ring-color:var(--wx-launcher-bg)}.focus-visible\\:ring-wx-primary:focus-visible{--tw-ring-color:var(--wx-primary)}.focus-visible\\:ring-wx-primary\\/30:focus-visible{--tw-ring-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-wx-primary\\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--wx-primary) 30%, transparent)}}.focus-visible\\:ring-wx-primary\\/40:focus-visible{--tw-ring-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-wx-primary\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--wx-primary) 40%, transparent)}}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color:var(--color-white)}.focus-visible\\:ring-offset-wx-bg:focus-visible{--tw-ring-offset-color:var(--wx-bg)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:-outline-offset-2:focus-visible{outline-offset:calc(2px * -1)}.focus-visible\\:outline-wx-primary:focus-visible{outline-color:var(--wx-primary)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-wx-bg-elevated\\/60:disabled{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.disabled\\:bg-wx-bg-elevated\\/60:disabled{background-color:color-mix(in oklab, var(--wx-bg-elevated) 60%, transparent)}}.disabled\\:text-wx-fg-muted:disabled{color:var(--wx-fg-muted)}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}.data-wx-pointer\\:focus-visible\\:ring-0[data-wx-pointer]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.data-wx-pointer\\:focus-visible\\:ring-offset-0[data-wx-pointer]:focus-visible{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\\[state\\=active\\]\\:text-wx-fg[data-state=active]{color:var(--wx-fg)}.data-\\[state\\=checked\\]\\:font-medium[data-state=checked]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-\\[state\\=visible\\]\\:opacity-100[data-state=visible]{opacity:1}@media (prefers-reduced-motion:reduce){.motion-reduce\\:transition-none{transition-property:none}}.rtl\\:-scale-x-100:where(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-scale-x:calc(100% * -1);scale:var(--tw-scale-x) var(--tw-scale-y)}.rtl\\:-scale-x-100:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-scale-x:calc(100% * -1);scale:var(--tw-scale-x) var(--tw-scale-y)}@media (hover:hover){.rtl\\:group-hover\\:-translate-x-0\\.5:where(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *):-webkit-any(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.rtl\\:group-hover\\:-translate-x-0\\.5:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *):is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}}.dark\\:block:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){display:block}.dark\\:hidden:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){display:none}.dark\\:border-wx-bg\\/30:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){border-color:var(--wx-bg)}@supports (color:color-mix(in lab, red, red)){.dark\\:border-wx-bg\\/30:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){border-color:color-mix(in oklab, var(--wx-bg) 30%, transparent)}}.dark\\:border-t-wx-bg:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){border-top-color:var(--wx-bg)}.dark\\:bg-wx-bg:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){background-color:var(--wx-bg)}.dark\\:bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,color-mix\\(in_srgb\\,var\\(--wx-home-glow\\)_var\\(--wx-home-glow-a\\,35\\%\\)\\,transparent\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){background-image:radial-gradient(120% 80% at 50% -10%,var(--wx-home-glow),transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,color-mix\\(in_srgb\\,var\\(--wx-home-glow\\)_var\\(--wx-home-glow-a\\,35\\%\\)\\,transparent\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){background-image:radial-gradient(120% 80% at 50% -10%,color-mix(in srgb,var(--wx-home-glow) var(--wx-home-glow-a,35%),transparent),transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}}.dark\\:bg-\\[radial-gradient\\(120\\%_80\\%_at_50\\%_-10\\%\\,rgba\\(99\\,102\\,241\\,0\\.35\\)\\,transparent_55\\%\\)\\,linear-gradient\\(to_bottom\\,var\\(--wx-bg-elevated-2\\)_0\\%\\,var\\(--wx-bg-elevated\\)_40\\%\\,var\\(--wx-bg\\)_75\\%\\)\\]:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *){background-image:radial-gradient(120% 80% at 50% -10%,#6366f159,transparent 55%),linear-gradient(to bottom,var(--wx-bg-elevated-2) 0%,var(--wx-bg-elevated) 40%,var(--wx-bg) 75%)}@media (pointer:coarse){.pointer-coarse\\:gap-2{gap:calc(var(--spacing) * 2)}.pointer-coarse\\:gap-5{gap:calc(var(--spacing) * 5)}.pointer-coarse\\:after\\:h-\\[max\\(100\\%\\,44px\\)\\]:after{content:var(--tw-content);height:max(100%,44px)}.pointer-coarse\\:after\\:w-\\[max\\(100\\%\\,44px\\)\\]:after{content:var(--tw-content);width:max(100%,44px)}}.\\[\\&_\\.epr-btn-clear-search\\:focus\\]\\:\\!bg-wx-bg-elevated-2 .epr-btn-clear-search:focus,.\\[\\&_\\.epr-btn-clear-search\\:hover\\]\\:\\!bg-wx-bg-elevated-2 .epr-btn-clear-search:hover{background-color:var(--wx-bg-elevated-2)!important}.\\[\\&_\\.hljs-attr\\]\\:text-sky-300 .hljs-attr,.\\[\\&_\\.hljs-attribute\\]\\:text-sky-300 .hljs-attribute{color:var(--color-sky-300)}.\\[\\&_\\.hljs-built_in\\]\\:text-violet-300 .hljs-built in{color:var(--color-violet-300)}.\\[\\&_\\.hljs-comment\\]\\:text-zinc-500 .hljs-comment{color:var(--color-zinc-500)}.\\[\\&_\\.hljs-comment\\]\\:italic .hljs-comment{font-style:italic}.\\[\\&_\\.hljs-keyword\\]\\:text-violet-300 .hljs-keyword{color:var(--color-violet-300)}.\\[\\&_\\.hljs-literal\\]\\:text-amber-300 .hljs-literal{color:var(--color-amber-300)}.\\[\\&_\\.hljs-name\\]\\:text-rose-300 .hljs-name{color:var(--color-rose-300)}.\\[\\&_\\.hljs-number\\]\\:text-amber-300 .hljs-number{color:var(--color-amber-300)}.\\[\\&_\\.hljs-string\\]\\:text-emerald-300 .hljs-string{color:var(--color-emerald-300)}.\\[\\&_\\.hljs-tag\\]\\:text-rose-300 .hljs-tag{color:var(--color-rose-300)}.\\[\\&_\\.hljs-title\\]\\:font-medium .hljs-title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_\\.hljs-title\\]\\:text-zinc-100 .hljs-title{color:var(--color-zinc-100)}.\\[\\&_\\.hljs-type\\]\\:text-violet-300 .hljs-type{color:var(--color-violet-300)}.\\[\\&_a\\]\\:font-medium a{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_a\\]\\:text-inherit a{color:inherit}.\\[\\&_a\\]\\:text-wx-primary a{color:var(--wx-primary)}.\\[\\&_a\\]\\:text-wx-primary-fg a{color:var(--wx-primary-fg)}.\\[\\&_a\\]\\:no-underline a{text-decoration-line:none}.\\[\\&_a\\]\\:underline a{text-decoration-line:underline}.\\[\\&_a\\]\\:underline-offset-2 a{text-underline-offset:2px}.\\[\\&_a\\]\\:opacity-90 a{opacity:.9}.\\[\\&_a\\]\\:transition-opacity a{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\\[\\&_a\\:hover\\]\\:opacity-70 a:hover{opacity:.7}.\\[\\&_a\\:hover\\]\\:opacity-80 a:hover{opacity:.8}.\\[\\&_a\\:hover\\]\\:opacity-100 a:hover{opacity:1}.\\[\\&_blockquote\\]\\:my-4 blockquote{margin-block:calc(var(--spacing) * 4)}.\\[\\&_blockquote\\]\\:border-l-2 blockquote{border-left-style:var(--tw-border-style);border-left-width:2px}.\\[\\&_blockquote\\]\\:border-wx-primary\\/40 blockquote{border-color:var(--wx-primary)}@supports (color:color-mix(in lab, red, red)){.\\[\\&_blockquote\\]\\:border-wx-primary\\/40 blockquote{border-color:color-mix(in oklab, var(--wx-primary) 40%, transparent)}}.\\[\\&_blockquote\\]\\:pl-3 blockquote{padding-left:calc(var(--spacing) * 3)}.\\[\\&_blockquote\\]\\:text-wx-fg-muted blockquote{color:var(--wx-fg-muted)}.\\[\\&_blockquote\\]\\:italic blockquote{font-style:italic}.\\[\\&_code\\]\\:rounded-\\[6px\\] code{border-radius:6px}.\\[\\&_code\\]\\:rounded-sm code{border-radius:var(--radius-sm)}.\\[\\&_code\\]\\:rounded-wx-sm code{border-radius:var(--wx-radius-sm)}.\\[\\&_code\\]\\:bg-black\\/10 code{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.\\[\\&_code\\]\\:bg-black\\/10 code{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.\\[\\&_code\\]\\:bg-white\\/15 code{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.\\[\\&_code\\]\\:bg-white\\/15 code{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.\\[\\&_code\\]\\:bg-wx-bg-elevated code{background-color:var(--wx-bg-elevated)}.\\[\\&_code\\]\\:bg-wx-bg-elevated-2 code{background-color:var(--wx-bg-elevated-2)}.\\[\\&_code\\]\\:px-1 code{padding-inline:calc(var(--spacing) * 1)}.\\[\\&_code\\]\\:px-1\\.5 code{padding-inline:calc(var(--spacing) * 1.5)}.\\[\\&_code\\]\\:py-0\\.5 code{padding-block:calc(var(--spacing) * .5)}.\\[\\&_code\\]\\:font-mono code{font-family:var(--font-geist-mono)}.\\[\\&_code\\]\\:text-\\[0\\.85em\\] code{font-size:.85em}.\\[\\&_details\\]\\:my-2 details{margin-block:calc(var(--spacing) * 2)}.\\[\\&_details\\]\\:overflow-hidden details{overflow:hidden}.\\[\\&_details\\]\\:rounded-lg details{border-radius:var(--radius-lg)}.\\[\\&_details\\]\\:border details{border-style:var(--tw-border-style);border-width:1px}.\\[\\&_details\\]\\:border-wx-border details{border-color:var(--wx-border)}.\\[\\&_details\\]\\:bg-wx-bg-elevated\\/40 details{background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.\\[\\&_details\\]\\:bg-wx-bg-elevated\\/40 details{background-color:color-mix(in oklab, var(--wx-bg-elevated) 40%, transparent)}}.\\[\\&_details\\+details\\]\\:mt-2 details+details{margin-top:calc(var(--spacing) * 2)}.\\[\\&_details\\[open\\]_summary\\]\\:border-b details[open] summary{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\\[\\&_details\\[open\\]_summary\\]\\:border-wx-border details[open] summary{border-color:var(--wx-border)}.\\[\\&_details\\[open\\]_summary\\]\\:after\\:rotate-90 details[open] summary:after{content:var(--tw-content);rotate:90deg}.\\[\\&_em\\]\\:italic em{font-style:italic}.\\[\\&_figcaption\\]\\:mt-2 figcaption{margin-top:calc(var(--spacing) * 2)}.\\[\\&_figcaption\\]\\:text-xs figcaption{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&_figcaption\\]\\:text-wx-fg-muted figcaption{color:var(--wx-fg-muted)}.\\[\\&_figcaption\\]\\:italic figcaption{font-style:italic}.\\[\\&_figure\\]\\:my-5 figure{margin-block:calc(var(--spacing) * 5)}.\\[\\&_figure\\]\\:flex figure{display:flex}.\\[\\&_figure\\]\\:flex-col figure{flex-direction:column}.\\[\\&_figure\\]\\:items-center figure{align-items:center}.\\[\\&_figure\\]\\:text-center figure{text-align:center}.\\[\\&_figure_img\\]\\:my-0 figure img{margin-block:calc(var(--spacing) * 0)}.\\[\\&_h1\\]\\:mt-6 h1{margin-top:calc(var(--spacing) * 6)}.\\[\\&_h1\\]\\:mb-3 h1{margin-bottom:calc(var(--spacing) * 3)}.\\[\\&_h1\\]\\:scroll-mt-16 h1{scroll-margin-top:calc(var(--spacing) * 16)}.\\[\\&_h1\\]\\:text-xl h1{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\\[\\&_h1\\]\\:font-semibold h1{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\\[\\&_h1\\]\\:tracking-tight h1{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.\\[\\&_h2\\]\\:mt-5 h2{margin-top:calc(var(--spacing) * 5)}.\\[\\&_h2\\]\\:mb-2 h2{margin-bottom:calc(var(--spacing) * 2)}.\\[\\&_h2\\]\\:scroll-mt-16 h2{scroll-margin-top:calc(var(--spacing) * 16)}.\\[\\&_h2\\]\\:text-base h2{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\\[\\&_h2\\]\\:font-semibold h2{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\\[\\&_h2\\]\\:tracking-tight h2{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.\\[\\&_h3\\]\\:mt-4 h3{margin-top:calc(var(--spacing) * 4)}.\\[\\&_h3\\]\\:mb-1\\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\\[\\&_h3\\]\\:scroll-mt-16 h3{scroll-margin-top:calc(var(--spacing) * 16)}.\\[\\&_h3\\]\\:text-sm h3{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\\[\\&_h3\\]\\:font-semibold h3{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\\[\\&_hr\\]\\:my-6 hr{margin-block:calc(var(--spacing) * 6)}.\\[\\&_hr\\]\\:border-wx-border hr{border-color:var(--wx-border)}.\\[\\&_img\\]\\:mx-auto img{margin-inline-start:auto;margin-inline-end:auto}.\\[\\&_img\\]\\:my-3 img{margin-block:calc(var(--spacing) * 3)}.\\[\\&_img\\]\\:block img{display:block}.\\[\\&_img\\]\\:max-w-full img{max-width:100%}.\\[\\&_img\\]\\:bg-wx-bg-elevated-2 img{background-color:var(--wx-bg-elevated-2)}.\\[\\&_li\\]\\:m-0 li{margin:calc(var(--spacing) * 0)}.\\[\\&_li\\]\\:my-0\\.5 li{margin-block:calc(var(--spacing) * .5)}.\\[\\&_li\\]\\:my-1 li{margin-block:calc(var(--spacing) * 1)}.\\[\\&_li\\>p\\]\\:my-0 li>p{margin-block:calc(var(--spacing) * 0)}.\\[\\&_li\\>p\\+p\\]\\:mt-1 li>p+p{margin-top:calc(var(--spacing) * 1)}.\\[\\&_ol\\]\\:my-1 ol{margin-block:calc(var(--spacing) * 1)}.\\[\\&_ol\\]\\:my-1\\.5 ol{margin-block:calc(var(--spacing) * 1.5)}.\\[\\&_ol\\]\\:my-3 ol{margin-block:calc(var(--spacing) * 3)}.\\[\\&_ol\\]\\:list-decimal ol{list-style-type:decimal}.\\[\\&_ol\\]\\:pl-5 ol{padding-left:calc(var(--spacing) * 5)}.\\[\\&_ol\\]\\:whitespace-normal ol{white-space:normal}.\\[\\&_ol\\]\\:marker\\:text-wx-fg-subtle ol ::marker{color:var(--wx-fg-subtle)}.\\[\\&_ol\\]\\:marker\\:text-wx-fg-subtle ol::marker{color:var(--wx-fg-subtle)}.\\[\\&_ol\\]\\:marker\\:text-wx-fg-subtle ol ::-webkit-details-marker{color:var(--wx-fg-subtle)}.\\[\\&_ol\\]\\:marker\\:text-wx-fg-subtle ol::-webkit-details-marker{color:var(--wx-fg-subtle)}.\\[\\&_p\\]\\:my-3 p{margin-block:calc(var(--spacing) * 3)}.\\[\\&_pre\\]\\:my-2 pre{margin-block:calc(var(--spacing) * 2)}.\\[\\&_pre\\]\\:my-4 pre{margin-block:calc(var(--spacing) * 4)}.\\[\\&_pre\\]\\:overflow-x-auto pre{overflow-x:auto}.\\[\\&_pre\\]\\:rounded pre{border-radius:.25rem}.\\[\\&_pre\\]\\:rounded-lg pre{border-radius:var(--radius-lg)}.\\[\\&_pre\\]\\:border pre{border-style:var(--tw-border-style);border-width:1px}.\\[\\&_pre\\]\\:border-wx-border pre{border-color:var(--wx-border)}.\\[\\&_pre\\]\\:bg-\\[\\#0f1115\\] pre{background-color:#0f1115}.\\[\\&_pre\\]\\:bg-black\\/10 pre{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.\\[\\&_pre\\]\\:bg-black\\/10 pre{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.\\[\\&_pre\\]\\:bg-white\\/15 pre{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.\\[\\&_pre\\]\\:bg-white\\/15 pre{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.\\[\\&_pre\\]\\:p-2 pre{padding:calc(var(--spacing) * 2)}.\\[\\&_pre\\]\\:p-4 pre{padding:calc(var(--spacing) * 4)}.\\[\\&_pre\\]\\:text-\\[0\\.8em\\] pre{font-size:.8em}.\\[\\&_pre\\]\\:text-\\[12\\.5px\\] pre{font-size:12.5px}.\\[\\&_pre\\]\\:leading-relaxed pre{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\\[\\&_pre\\]\\:\\[overflow-wrap\\:normal\\] pre{overflow-wrap:normal}.\\[\\&_pre\\]\\:text-zinc-100 pre{color:var(--color-zinc-100)}.\\[\\&_pre_code\\]\\:bg-transparent pre code{background-color:#0000}.\\[\\&_pre_code\\]\\:p-0 pre code{padding:calc(var(--spacing) * 0)}.\\[\\&_pre_code\\]\\:text-zinc-100 pre code{color:var(--color-zinc-100)}.\\[\\&_s\\]\\:line-through s{text-decoration-line:line-through}.\\[\\&_strong\\]\\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\\[\\&_summary\\]\\:relative summary{position:relative}.\\[\\&_summary\\]\\:cursor-pointer summary{cursor:pointer}.\\[\\&_summary\\]\\:list-none summary{list-style-type:none}.\\[\\&_summary\\]\\:px-4 summary{padding-inline:calc(var(--spacing) * 4)}.\\[\\&_summary\\]\\:py-3 summary{padding-block:calc(var(--spacing) * 3)}.\\[\\&_summary\\]\\:pr-10 summary{padding-right:calc(var(--spacing) * 10)}.\\[\\&_summary\\]\\:text-sm summary{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\\[\\&_summary\\]\\:font-medium summary{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_summary\\]\\:text-wx-fg summary{color:var(--wx-fg)}.\\[\\&_summary\\]\\:after\\:absolute summary:after{content:var(--tw-content);position:absolute}.\\[\\&_summary\\]\\:after\\:top-1\\/2 summary:after{content:var(--tw-content);top:50%}.\\[\\&_summary\\]\\:after\\:right-4 summary:after{content:var(--tw-content);right:calc(var(--spacing) * 4)}.\\[\\&_summary\\]\\:after\\:-translate-y-1\\/2 summary:after{content:var(--tw-content);--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.\\[\\&_summary\\]\\:after\\:text-base summary:after{content:var(--tw-content);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\\[\\&_summary\\]\\:after\\:leading-none summary:after{content:var(--tw-content);--tw-leading:1;line-height:1}.\\[\\&_summary\\]\\:after\\:text-wx-fg-subtle summary:after{content:var(--tw-content);color:var(--wx-fg-subtle)}.\\[\\&_summary\\]\\:after\\:transition-transform summary:after{content:var(--tw-content);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\\[\\&_summary\\]\\:after\\:content-\\[\\'\\\\\\\\203A\\'\\] summary:after{--tw-content:"\\\\203A";content:var(--tw-content)}.\\[\\&_summary\\:\\:-webkit-details-marker\\]\\:hidden summary::-webkit-details-marker{display:none}.\\[\\&_summary\\:\\:marker\\]\\:hidden summary::marker{display:none}.\\[\\&_svg\\]\\:fill-current svg{fill:currentColor}.\\[\\&_svg\\]\\:fill-wx-launcher-fg svg{fill:var(--wx-launcher-fg)}.\\[\\&_svg\\]\\:stroke-current svg{stroke:currentColor}.\\[\\&_svg\\]\\:stroke-wx-launcher-fg svg{stroke:var(--wx-launcher-fg)}.dark\\:\\[\\&_svg\\]\\:fill-wx-bg:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *) svg{fill:var(--wx-bg)}.dark\\:\\[\\&_svg\\]\\:stroke-wx-bg:where([data-theme=dark],[data-theme=dark] *,:host([data-theme=dark]) *) svg{stroke:var(--wx-bg)}.\\[\\&_table\\]\\:my-3 table{margin-block:calc(var(--spacing) * 3)}.\\[\\&_table\\]\\:block table{display:block}.\\[\\&_table\\]\\:w-full table{width:100%}.\\[\\&_table\\]\\:max-w-full table{max-width:100%}.\\[\\&_table\\]\\:table-fixed table{table-layout:fixed}.\\[\\&_table\\]\\:border-collapse table{border-collapse:collapse}.\\[\\&_table\\]\\:overflow-hidden table{overflow:hidden}.\\[\\&_table\\]\\:overflow-x-auto table{overflow-x:auto}.\\[\\&_table\\]\\:rounded-lg table{border-radius:var(--radius-lg)}.\\[\\&_table\\]\\:border table{border-style:var(--tw-border-style);border-width:1px}.\\[\\&_table\\]\\:border-wx-border table{border-color:var(--wx-border)}.\\[\\&_table\\]\\:text-xs table{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&_tbody_tr\\]\\:border-t tbody tr{border-top-style:var(--tw-border-style);border-top-width:1px}.\\[\\&_tbody_tr\\]\\:border-wx-border tbody tr{border-color:var(--wx-border)}.\\[\\&_tbody_tr\\:nth-child\\(odd\\)\\]\\:bg-wx-bg-elevated\\/40 tbody tr:nth-child(odd){background-color:var(--wx-bg-elevated)}@supports (color:color-mix(in lab, red, red)){.\\[\\&_tbody_tr\\:nth-child\\(odd\\)\\]\\:bg-wx-bg-elevated\\/40 tbody tr:nth-child(odd){background-color:color-mix(in oklab, var(--wx-bg-elevated) 40%, transparent)}}.\\[\\&_td\\]\\:px-2\\.5 td{padding-inline:calc(var(--spacing) * 2.5)}.\\[\\&_td\\]\\:py-1\\.5 td{padding-block:calc(var(--spacing) * 1.5)}.\\[\\&_td\\]\\:align-top td{vertical-align:top}.\\[\\&_td\\]\\:\\[overflow-wrap\\:normal\\] td{overflow-wrap:normal}.\\[\\&_td\\]\\:text-wx-fg td{color:var(--wx-fg)}.\\[\\&_td_p\\]\\:my-0 td p{margin-block:calc(var(--spacing) * 0)}.\\[\\&_td_p\\]\\:inline td p{display:inline}.\\[\\&_td\\+td\\]\\:border-l td+td{border-left-style:var(--tw-border-style);border-left-width:1px}.\\[\\&_td\\+td\\]\\:border-wx-border td+td{border-color:var(--wx-border)}.\\[\\&_th\\]\\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\\[\\&_th\\]\\:border-wx-border th{border-color:var(--wx-border)}.\\[\\&_th\\]\\:px-2\\.5 th{padding-inline:calc(var(--spacing) * 2.5)}.\\[\\&_th\\]\\:py-1\\.5 th{padding-block:calc(var(--spacing) * 1.5)}.\\[\\&_th\\]\\:text-left th{text-align:left}.\\[\\&_th\\]\\:font-medium th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_th\\]\\:\\[overflow-wrap\\:normal\\] th{overflow-wrap:normal}.\\[\\&_th\\]\\:text-wx-fg th{color:var(--wx-fg)}.\\[\\&_th_p\\]\\:my-0 th p{margin-block:calc(var(--spacing) * 0)}.\\[\\&_th_p\\]\\:inline th p{display:inline}.\\[\\&_th\\+th\\]\\:border-l th+th{border-left-style:var(--tw-border-style);border-left-width:1px}.\\[\\&_th\\+th\\]\\:border-wx-border th+th{border-color:var(--wx-border)}.\\[\\&_thead\\]\\:bg-wx-bg-elevated thead{background-color:var(--wx-bg-elevated)}.\\[\\&_u\\]\\:underline u{text-decoration-line:underline}.\\[\\&_ul\\]\\:m-0 ul{margin:calc(var(--spacing) * 0)}.\\[\\&_ul\\]\\:my-1 ul{margin-block:calc(var(--spacing) * 1)}.\\[\\&_ul\\]\\:my-1\\.5 ul{margin-block:calc(var(--spacing) * 1.5)}.\\[\\&_ul\\]\\:my-3 ul{margin-block:calc(var(--spacing) * 3)}.\\[\\&_ul\\]\\:list-disc ul{list-style-type:disc}.\\[\\&_ul\\]\\:list-none ul{list-style-type:none}.\\[\\&_ul\\]\\:p-0 ul{padding:calc(var(--spacing) * 0)}.\\[\\&_ul\\]\\:pl-5 ul{padding-left:calc(var(--spacing) * 5)}.\\[\\&_ul\\]\\:whitespace-normal ul{white-space:normal}.\\[\\&_ul\\]\\:marker\\:text-wx-fg-subtle ul ::marker{color:var(--wx-fg-subtle)}.\\[\\&_ul\\]\\:marker\\:text-wx-fg-subtle ul::marker{color:var(--wx-fg-subtle)}.\\[\\&_ul\\]\\:marker\\:text-wx-fg-subtle ul ::-webkit-details-marker{color:var(--wx-fg-subtle)}.\\[\\&_ul\\]\\:marker\\:text-wx-fg-subtle ul::-webkit-details-marker{color:var(--wx-fg-subtle)}.\\[\\&_ul\\[data-type\\=taskList\\]\\]\\:list-none\\! ul[data-type=taskList]{list-style-type:none!important}.\\[\\&_ul\\[data-type\\=taskList\\]\\]\\:pl-0\\! ul[data-type=taskList]{padding-left:calc(var(--spacing) * 0)!important}.\\[\\&_ul\\[data-type\\=taskList\\]_input\\]\\:h-3\\.5 ul[data-type=taskList] input{height:calc(var(--spacing) * 3.5)}.\\[\\&_ul\\[data-type\\=taskList\\]_input\\]\\:w-3\\.5 ul[data-type=taskList] input{width:calc(var(--spacing) * 3.5)}.\\[\\&_ul\\[data-type\\=taskList\\]_input\\]\\:accent-wx-primary ul[data-type=taskList] input{accent-color:var(--wx-primary)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:my-1\\.5 ul[data-type=taskList] li{margin-block:calc(var(--spacing) * 1.5)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:flex\\! ul[data-type=taskList] li{display:flex!important}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:items-start ul[data-type=taskList] li{align-items:flex-start}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:gap-2 ul[data-type=taskList] li{gap:calc(var(--spacing) * 2)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:pl-0 ul[data-type=taskList] li{padding-left:calc(var(--spacing) * 0)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:marker\\:content-none ul[data-type=taskList] li ::marker{--tw-content:none;content:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:marker\\:content-none ul[data-type=taskList] li::marker{--tw-content:none;content:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:marker\\:content-none ul[data-type=taskList] li ::-webkit-details-marker{--tw-content:none;content:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\]\\:marker\\:content-none ul[data-type=taskList] li::-webkit-details-marker{--tw-content:none;content:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>div\\]\\:min-w-0 ul[data-type=taskList] li>div{min-width:calc(var(--spacing) * 0)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>div\\]\\:flex-1 ul[data-type=taskList] li>div{flex:1}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>div\\>p\\]\\:my-0\\! ul[data-type=taskList] li>div>p{margin-block:calc(var(--spacing) * 0)!important}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>div\\>p\\]\\:leading-snug ul[data-type=taskList] li>div>p{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:pointer-events-none ul[data-type=taskList] li>label{pointer-events:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:m-0 ul[data-type=taskList] li>label{margin:calc(var(--spacing) * 0)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:inline-flex ul[data-type=taskList] li>label{display:inline-flex}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:h-5 ul[data-type=taskList] li>label{height:calc(var(--spacing) * 5)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:shrink-0 ul[data-type=taskList] li>label{flex-shrink:0}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:cursor-default ul[data-type=taskList] li>label{cursor:default}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:items-center ul[data-type=taskList] li>label{align-items:center}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\]\\:select-none ul[data-type=taskList] li>label{-webkit-user-select:none;user-select:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\>label\\>span\\]\\:hidden ul[data-type=taskList] li>label>span{display:none}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\[data-checked\\=true\\]\\>div\\]\\:text-wx-fg-muted ul[data-type=taskList] li[data-checked=true]>div{color:var(--wx-fg-muted)}.\\[\\&_ul\\[data-type\\=taskList\\]_li\\[data-checked\\=true\\]\\>div\\]\\:line-through ul[data-type=taskList] li[data-checked=true]>div{text-decoration-line:line-through}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:h-2::-webkit-scrollbar{height:calc(var(--spacing) * 2)}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-full::-webkit-scrollbar-thumb{border-radius:3.40282e38px}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-wx-fg-subtle\\/40::-webkit-scrollbar-thumb{background-color:var(--wx-fg-subtle)}@supports (color:color-mix(in lab, red, red)){.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-wx-fg-subtle\\/40::-webkit-scrollbar-thumb{background-color:color-mix(in oklab, var(--wx-fg-subtle) 40%, transparent)}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\:hover\\]\\:bg-wx-fg-subtle\\/60::-webkit-scrollbar-thumb:hover{background-color:var(--wx-fg-subtle)}@supports (color:color-mix(in lab, red, red)){.\\[\\&\\:\\:-webkit-scrollbar-thumb\\:hover\\]\\:bg-wx-fg-subtle\\/60::-webkit-scrollbar-thumb:hover{background-color:color-mix(in oklab, var(--wx-fg-subtle) 60%, transparent)}}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-transparent::-webkit-scrollbar-track{background-color:#0000}.\\[\\&\\:\\:-webkit-search-cancel-button\\]\\:appearance-none::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}.\\[\\&\\>\\:first-child\\]\\:mt-0>:first-child{margin-top:calc(var(--spacing) * 0)}.\\[\\&\\>\\:last-child\\]\\:mb-0>:last-child{margin-bottom:calc(var(--spacing) * 0)}.\\[\\&_details\\]\\:\\[\\&\\>\\:not\\(summary\\)\\]\\:px-4 details>:not(summary){padding-inline:calc(var(--spacing) * 4)}.\\[\\&_details\\]\\:\\[\\&\\>\\:not\\(summary\\)\\]\\:py-3 details>:not(summary){padding-block:calc(var(--spacing) * 3)}.\\[\\&_details\\]\\:\\[\\&\\>\\:not\\(summary\\)\\:first-of-type\\]\\:pt-3 details>:not(summary):first-of-type{padding-top:calc(var(--spacing) * 3)}.\\[\\&\\>div\\]\\:\\!block>div{display:block!important}.\\[\\&\\>div\\]\\:\\!w-full>div{width:100%!important}.\\[\\&\\>div\\]\\:\\!max-w-full>div{max-width:100%!important}.\\[\\&\\>p\\]\\:my-0>p{margin-block:calc(var(--spacing) * 0)}.\\[\\&\\>p\\+p\\]\\:mt-2>p+p{margin-top:calc(var(--spacing) * 2)}.\\[\\&\\>span\\]\\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}}:root,:host{--wx-home-glow:#6366f1;--wx-bg:#fff;--wx-bg-elevated:#f5f5f7;--wx-bg-elevated-2:#ebebef;--wx-fg:#121314;--wx-fg-muted:#565d69;--wx-fg-subtle:#636976;--wx-border:#e4e4e7;--wx-border-strong:#d1d5db;--wx-primary:#121314;--wx-primary-hover:#2a2c2e;--wx-primary-fg:#fff;--wx-launcher-bg:#121314;--wx-launcher-fg:#fff;--wx-success:#10b981;--wx-danger:#cc1f1f;--wx-warning:#f59e0b;--wx-radius-sm:8px;--wx-radius:12px;--wx-radius-lg:20px;--wx-radius-xl:28px}:host([data-theme=dark]),[data-theme=dark]{--wx-bg:#121314;--wx-bg-elevated:#1e1f21;--wx-bg-elevated-2:#2a2c2e;--wx-fg:#f4f4f5;--wx-fg-muted:#a1a1aa;--wx-fg-subtle:#94949e;--wx-danger:#ef4444;--wx-border:#2a2c2e;--wx-border-strong:#3f3f46;--wx-primary:#fff;--wx-primary-hover:#e4e4e7;--wx-primary-fg:#121314;--wx-launcher-bg:#fff;--wx-launcher-fg:#121314}:host{--color-wx-bg:var(--wx-bg);--color-wx-bg-elevated:var(--wx-bg-elevated);--color-wx-bg-elevated-2:var(--wx-bg-elevated-2);--color-wx-fg:var(--wx-fg);--color-wx-fg-muted:var(--wx-fg-muted);--color-wx-fg-subtle:var(--wx-fg-subtle);--color-wx-border:var(--wx-border);--color-wx-border-strong:var(--wx-border-strong);--color-wx-primary:var(--wx-primary);--color-wx-primary-hover:var(--wx-primary-hover);--color-wx-primary-fg:var(--wx-primary-fg);--color-wx-launcher-bg:var(--wx-launcher-bg);--color-wx-launcher-fg:var(--wx-launcher-fg);--color-wx-success:var(--wx-success);--color-wx-danger:var(--wx-danger);--color-wx-warning:var(--wx-warning);--radius-wx-sm:var(--wx-radius-sm);--radius-wx:var(--wx-radius);--radius-wx-lg:var(--wx-radius-lg);--radius-wx-xl:var(--wx-radius-xl);--font-sans:var(--font-geist-sans);--font-mono:var(--font-geist-mono)}html,body{height:100%;color:var(--wx-fg);background:0 0}body{font-family:var(--wx-font,var(--font-geist-sans,system-ui)), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;-webkit-font-smoothing:antialiased;margin:0;padding:0}button:not(:disabled),[role=button]:not([aria-disabled=true]),a[href],label[for],summary{cursor:pointer}button:disabled,[role=button][aria-disabled=true]{cursor:default}[data-wx-gis]>div,[data-wx-gis]>div>div{width:100%!important}[data-wx-gis] [role=button]{border-radius:var(--wx-radius)!important;width:100%!important;max-width:none!important;overflow:hidden!important}:host{font-family:var(--wx-font,var(--font-geist-sans,system-ui)), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;-webkit-font-smoothing:antialiased;color:var(--wx-fg);font-variant:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-align:start;text-shadow:none;white-space:normal;word-break:normal;overflow-wrap:normal;line-break:auto;-webkit-hyphens:manual;hyphens:manual;text-wrap:wrap;text-rendering:auto;font-feature-settings:normal;font-kerning:auto;font-variant-alternates:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;visibility:visible;pointer-events:auto;cursor:auto;-webkit-text-stroke:0;-webkit-text-fill-color:currentcolor;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;font-stretch:100%;line-height:1.5}[data-wx-panel]{font-family:var(--wx-font,var(--font-geist-sans,system-ui)), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif}*{-webkit-tap-highlight-color:transparent}[data-theme=dark] [data-wx-panel]{box-shadow:0 0 0 1px #ffffff0f,0 32px 80px #0000008c,0 0 48px #ffffff0a}[data-theme=dark] [data-wx-panel]:before{content:"";pointer-events:none;z-index:30;background:radial-gradient(circle at 0 0,#ffffff29 0%,#ffffff12 30%,#ffffff05 60%,#fff0 70%);width:260px;height:260px;position:absolute;top:0;left:0}[data-theme=dark] [data-wx-panel] header{background:0 0;border-bottom-color:#0000}[data-wx-panel]{box-shadow:0 24px 64px #0000002e}@keyframes wx-gentle-in{0%{opacity:0;translate:0 .3125rem}}.wx-gentle-in{animation:wx-gentle-in .28s cubic-bezier(.33, 1, .68, 1) var(--wx-enter-delay,0s) backwards}@media (prefers-reduced-motion:reduce){:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]){scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]){scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) :before{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) :before{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) :after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) :after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) .wx-gentle-in{animation:none!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) .wx-gentle-in{animation:none!important}:-webkit-any([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) .animate-spin{animation-duration:2.4s!important;animation-iteration-count:infinite!important}:is([data-wx-panel],[data-wx-fab],[data-wx-peek],[data-wx-popup]) .animate-spin{animation-duration:2.4s!important;animation-iteration-count:infinite!important}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}`;function nT({publicKey:e,user:t,mode:n,configOverride:r,theme:i,offset:a,defaultOpen:o,open:s,previewTab:c,config:l,previewData:u,hostAnchored:d,session:f,storageNamespace:p,audienceOverride:m,previewProfileFields:h,launcherMessagePreview:g,previewToken:_,onPreviewTokenExpired:v,onResize:y,onOpen:b,onClose:x,onMessageAction:S,className:C,style:w}){let T=J(null),E=m?.visitors,O=m?.origin,k=m?.path,A=q(()=>E===void 0&&O===void 0&&k===void 0?void 0:{visitors:E,origin:O,path:k},[E,O,k]),j=q(()=>h,[h?JSON.stringify(h.map(e=>[e.key,e.label])):``]),[M,N]=Y(null),[P,F]=Y(()=>ja()),[ee,te]=Y(null);K(()=>{let e=go(e=>{ue(e)&&F(e)}),t=ho(()=>F(ja()));return()=>{e(),t()}},[]);let ne=J(y),re=J(b),ie=J(x),ae=J(S),oe=J(v);K(()=>{ne.current=y,re.current=b,ie.current=x,ae.current=S,oe.current=v},[y,b,x,S,v]),K(()=>{let e=T.current;if(!e)return;let t=e.shadowRoot??e.attachShadow({mode:`open`});if(typeof CSSStyleSheet<`u`&&`replaceSync`in CSSStyleSheet.prototype){let e=new CSSStyleSheet;e.replaceSync(tT),t.adoptedStyleSheets=[...t.adoptedStyleSheets??[],e]}else if(!t.querySelector(`style[data-wexio-style]`)){let e=document.createElement(`style`);e.setAttribute(`data-wexio-style`,`true`),e.textContent=tT,t.appendChild(e)}let n=t.querySelector(`div[data-wexio-portal-target]`);n||(n=document.createElement(`div`),n.setAttribute(`data-wexio-portal-target`,`true`),n.style.display=`contents`,t.appendChild(n)),N(n),te(t)},[]);let se=q(()=>{let m=n??(e?`production`:`demo`);return{kind:`web-component`,publicKeyOverride:e,modeOverride:m,configOverride:r,themeOverride:i,offset:a,defaultOpen:o,open:s,previewTab:c,configBase:l,forceDummyData:void 0,previewData:u,embedded:d??m===`preview`,isolatedSession:f===`isolated`,persistentSession:f===`persistent`,storageNamespace:p,audienceOverride:A,previewProfileFields:j,launcherMessagePreview:g,visitorIdentity:t,visitorPrefill:void 0,themeRoot:M??void 0,styleRoot:ee??void 0,onResize:(e,t)=>{ne.current?.({width:e,height:t})},onOpen:()=>{re.current?.()},onClose:()=>{ie.current?.()},onMessageAction:e=>{ae.current?.(e)},onPreviewTokenRequest:e=>{oe.current?.(e)},onLocaleStrategy:e=>F(ja(e,{ignoreVisitorOverrides:m===`preview`}))}},[e,n,r,i,a,o,s,c,l,u,d,f,p,A,j,g,M,ee,t]);return X(`div`,{ref:T,"data-wexio-widget-host":`true`,"data-wexio-build":D,className:C,style:w,children:M?An(X(rT,{env:se,locale:P,publicKey:e,previewToken:_,children:X(Ww,{})}),M):null})}function rT({env:e,locale:t,publicKey:n,previewToken:r,children:i}){let a=eT(t);return X(In,{publicKey:n,isolated:e.isolatedSession,persistent:e.persistentSession,storageNamespace:e.storageNamespace,previewToken:r,children:X(jn,{locale:a.locale,messages:a.messages,timeZone:typeof Intl<`u`?Intl.DateTimeFormat().resolvedOptions().timeZone:`UTC`,children:X(Oe,{env:e,children:i})})})}export{nT as WexioWidget,N as setWexioPublicKey};
|
|
177
177
|
//# sourceMappingURL=widget-react.js.map
|