@voxket-ai/voxket-live 1.0.63 → 1.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var sp=Object.defineProperty;var op=(e,t,n)=>t in e?sp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var je=(e,t,n)=>op(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("react"),d=require("react/jsx-runtime"),te=require("livekit-client"),Me=require("@livekit/components-react"),Fi=require("react-dom"),Ms=require("class-variance-authority"),Bi=require("clsx");function Fd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=Fd(A),Ns=Fd(Fi),Hi=A.createContext({});function zi(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ui=typeof window<"u",Bd=Ui?A.useLayoutEffect:A.useEffect,js=A.createContext(null);function Wi(e,t){e.indexOf(t)===-1&&e.push(t)}function Zi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Mt=(e,t,n)=>n>t?t:n<e?e:n;function Yo(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let zn=()=>{},Nt=()=>{};process.env.NODE_ENV!=="production"&&(zn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Yo(t,n))},Nt=(e,t,n)=>{if(!e)throw new Error(Yo(t,n))});const jt={},Hd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function zd(e){return typeof e=="object"&&e!==null}const Ud=e=>/^0[^.\s]+$/u.test(e);function Ki(e){let t;return()=>(t===void 0&&(t=e()),t)}const nt=e=>e,ip=(e,t)=>n=>t(e(n)),Tr=(...e)=>e.reduce(ip),hr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Yi{constructor(){this.subscriptions=[]}add(t){return Wi(this.subscriptions,t),()=>Zi(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const at=e=>e*1e3,vt=e=>e/1e3;function Wd(e,t){return t?e*(1e3/t):0}const tc=new Set;function Gi(e,t,n){e||tc.has(t)||(console.warn(Yo(t,n)),tc.add(t))}const Zd=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ap=1e-7,cp=12;function lp(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=Zd(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>ap&&++a<cp);return i}function Ar(e,t,n,r){if(e===t&&n===r)return nt;const s=o=>lp(o,0,1,e,n);return o=>o===0||o===1?o:Zd(s(o),t,r)}const Kd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yd=e=>t=>1-e(1-t),Gd=Ar(.33,1.53,.69,.99),qi=Yd(Gd),qd=Kd(qi),Xd=e=>(e*=2)<1?.5*qi(e):.5*(2-Math.pow(2,-10*(e-1))),Xi=e=>1-Math.sin(Math.acos(e)),Jd=Yd(Xi),Qd=Kd(Xi),dp=Ar(.42,0,1,1),up=Ar(0,0,.58,1),eu=Ar(.42,0,.58,1),fp=e=>Array.isArray(e)&&typeof e[0]!="number",tu=e=>Array.isArray(e)&&typeof e[0]=="number",nc={linear:nt,easeIn:dp,easeInOut:eu,easeOut:up,circIn:Xi,circInOut:Qd,circOut:Jd,backIn:qi,backInOut:qd,backOut:Gd,anticipate:Xd},hp=e=>typeof e=="string",rc=e=>{if(tu(e)){Nt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return Ar(t,n,r,s)}else if(hp(e))return Nt(nc[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),nc[e];return e},$r=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function mp(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){i.has(u)&&(l.schedule(u),e()),u(a)}const l={schedule:(u,h=!1,p=!1)=>{const y=p&&s?n:r;return h&&i.add(u),y.has(u)||y.add(u),u},cancel:u=>{r.delete(u),i.delete(u)},process:u=>{if(a=u,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),n.clear(),s=!1,o&&(o=!1,l.process(u))}};return l}const pp=40;function nu(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=$r.reduce((S,C)=>(S[C]=mp(o),S),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:h,preRender:p,render:g,postRender:y}=i,f=()=>{const S=jt.useManualTiming?s.timestamp:performance.now();n=!1,jt.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(S-s.timestamp,pp),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),c.process(s),l.process(s),u.process(s),h.process(s),p.process(s),g.process(s),y.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(f))},v=()=>{n=!0,r=!0,s.isProcessing||e(f)};return{schedule:$r.reduce((S,C)=>{const E=i[C];return S[C]=(T,k=!1,P=!1)=>(n||v(),E.schedule(T,k,P)),S},{}),cancel:S=>{for(let C=0;C<$r.length;C++)i[$r[C]].cancel(S)},state:s,steps:i}}const{schedule:be,cancel:_t,state:Oe,steps:ao}=nu(typeof requestAnimationFrame<"u"?requestAnimationFrame:nt,!0);let ns;function gp(){ns=void 0}const Ue={now:()=>(ns===void 0&&Ue.set(Oe.isProcessing||jt.useManualTiming?Oe.timestamp:performance.now()),ns),set:e=>{ns=e,queueMicrotask(gp)}},ru=e=>t=>typeof t=="string"&&t.startsWith(e),Ji=ru("--"),yp=ru("var(--"),Qi=e=>yp(e)?vp.test(e.split("/*")[0].trim()):!1,vp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Un={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mr={...Un,transform:e=>Mt(0,1,e)},Lr={...Un,default:1},cr=e=>Math.round(e*1e5)/1e5,ea=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xp(e){return e==null}const bp=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ta=(e,t)=>n=>!!(typeof n=="string"&&bp.test(n)&&n.startsWith(e)||t&&!xp(n)&&Object.prototype.hasOwnProperty.call(n,t)),su=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(ea);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},wp=e=>Mt(0,255,e),co={...Un,transform:e=>Math.round(wp(e))},en={test:ta("rgb","red"),parse:su("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+co.transform(e)+", "+co.transform(t)+", "+co.transform(n)+", "+cr(mr.transform(r))+")"};function Sp(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Go={test:ta("#"),parse:Sp,transform:en.transform},Pr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$t=Pr("deg"),xt=Pr("%"),re=Pr("px"),Cp=Pr("vh"),Ep=Pr("vw"),sc={...xt,parse:e=>xt.parse(e)/100,transform:e=>xt.transform(e*100)},kn={test:ta("hsl","hue"),parse:su("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xt.transform(cr(t))+", "+xt.transform(cr(n))+", "+cr(mr.transform(r))+")"},Re={test:e=>en.test(e)||Go.test(e)||kn.test(e),parse:e=>en.test(e)?en.parse(e):kn.test(e)?kn.parse(e):Go.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?en.transform(e):kn.transform(e),getAnimatableNone:e=>{const t=Re.parse(e);return t.alpha=0,Re.transform(t)}},kp=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Tp(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ea))==null?void 0:t.length)||0)+(((n=e.match(kp))==null?void 0:n.length)||0)>0}const ou="number",iu="color",Ap="var",Pp="var(",oc="${}",Mp=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Mp,c=>(Re.test(c)?(r.color.push(o),s.push(iu),n.push(Re.parse(c))):c.startsWith(Pp)?(r.var.push(o),s.push(Ap),n.push(c)):(r.number.push(o),s.push(ou),n.push(parseFloat(c))),++o,oc)).split(oc);return{values:n,split:a,indexes:r,types:s}}function au(e){return pr(e).values}function cu(e){const{split:t,types:n}=pr(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const a=n[i];a===ou?o+=cr(s[i]):a===iu?o+=Re.transform(s[i]):o+=s[i]}return o}}const Np=e=>typeof e=="number"?0:Re.test(e)?Re.getAnimatableNone(e):e;function jp(e){const t=au(e);return cu(e)(t.map(Np))}const Ft={test:Tp,parse:au,createTransformer:cu,getAnimatableNone:jp};function lo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Rp({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=lo(c,a,e+1/3),o=lo(c,a,e),i=lo(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function ps(e,t){return n=>n>0?t:e}const Se=(e,t,n)=>e+(t-e)*n,uo=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Vp=[Go,en,kn],Ip=e=>Vp.find(t=>t.test(e));function ic(e){const t=Ip(e);if(zn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===kn&&(n=Rp(n)),n}const ac=(e,t)=>{const n=ic(e),r=ic(t);if(!n||!r)return ps(e,t);const s={...n};return o=>(s.red=uo(n.red,r.red,o),s.green=uo(n.green,r.green,o),s.blue=uo(n.blue,r.blue,o),s.alpha=Se(n.alpha,r.alpha,o),en.transform(s))},qo=new Set(["none","hidden"]);function Dp(e,t){return qo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Op(e,t){return n=>Se(e,t,n)}function na(e){return typeof e=="number"?Op:typeof e=="string"?Qi(e)?ps:Re.test(e)?ac:_p:Array.isArray(e)?lu:typeof e=="object"?Re.test(e)?ac:$p:ps}function lu(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>na(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function $p(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=na(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function Lp(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],a=e.values[i]??0;n[s]=a,r[o]++}return n}const _p=(e,t)=>{const n=Ft.createTransformer(t),r=pr(e),s=pr(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?qo.has(e)&&!s.values.length||qo.has(t)&&!r.values.length?Dp(e,t):Tr(lu(Lp(r,s),s.values),n):(zn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ps(e,t))};function du(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Se(e,t,n):na(e)(e,t)}const Fp=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>be.update(t,n),stop:()=>_t(t),now:()=>Oe.isProcessing?Oe.timestamp:Ue.now()}},uu=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},gs=2e4;function ra(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<gs;)t+=n,r=e.next(t);return t>=gs?1/0:t}function Bp(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(ra(r),gs);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:vt(s)}}const Hp=5;function fu(e,t,n){const r=Math.max(t-Hp,0);return Wd(n-e(r),t-r)}const we={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},fo=.001;function zp({duration:e=we.duration,bounce:t=we.bounce,velocity:n=we.velocity,mass:r=we.mass}){let s,o;zn(e<=at(we.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Mt(we.minDamping,we.maxDamping,i),e=Mt(we.minDuration,we.maxDuration,vt(e)),i<1?(s=l=>{const u=l*i,h=u*e,p=u-n,g=Xo(l,i),y=Math.exp(-h);return fo-p/g*y},o=l=>{const h=l*i*e,p=h*n+n,g=Math.pow(i,2)*Math.pow(l,2)*e,y=Math.exp(-h),f=Xo(Math.pow(l,2),i);return(-s(l)+fo>0?-1:1)*((p-g)*y)/f}):(s=l=>{const u=Math.exp(-l*e),h=(l-n)*e+1;return-fo+u*h},o=l=>{const u=Math.exp(-l*e),h=(n-l)*(e*e);return u*h});const a=5/e,c=Wp(s,o,a);if(e=at(e),isNaN(c))return{stiffness:we.stiffness,damping:we.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:i*2*Math.sqrt(r*l),duration:e}}}const Up=12;function Wp(e,t,n){let r=n;for(let s=1;s<Up;s++)r=r-e(r)/t(r);return r}function Xo(e,t){return e*Math.sqrt(1-t*t)}const Zp=["duration","bounce"],Kp=["stiffness","damping","mass"];function cc(e,t){return t.some(n=>e[n]!==void 0)}function Yp(e){let t={velocity:we.velocity,stiffness:we.stiffness,damping:we.damping,mass:we.mass,isResolvedFromDuration:!1,...e};if(!cc(e,Kp)&&cc(e,Zp))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Mt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:we.mass,stiffness:s,damping:o}}else{const n=zp(e);t={...t,...n,mass:we.mass},t.isResolvedFromDuration=!0}return t}function ys(e=we.visualDuration,t=we.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:l,mass:u,duration:h,velocity:p,isResolvedFromDuration:g}=Yp({...n,velocity:-vt(n.velocity||0)}),y=p||0,f=l/(2*Math.sqrt(c*u)),v=i-o,w=vt(Math.sqrt(c/u)),b=Math.abs(v)<5;r||(r=b?we.restSpeed.granular:we.restSpeed.default),s||(s=b?we.restDelta.granular:we.restDelta.default);let S;if(f<1){const E=Xo(w,f);S=T=>{const k=Math.exp(-f*w*T);return i-k*((y+f*w*v)/E*Math.sin(E*T)+v*Math.cos(E*T))}}else if(f===1)S=E=>i-Math.exp(-w*E)*(v+(y+w*v)*E);else{const E=w*Math.sqrt(f*f-1);S=T=>{const k=Math.exp(-f*w*T),P=Math.min(E*T,300);return i-k*((y+f*w*v)*Math.sinh(P)+E*v*Math.cosh(P))/E}}const C={calculatedDuration:g&&h||null,next:E=>{const T=S(E);if(g)a.done=E>=h;else{let k=E===0?y:0;f<1&&(k=E===0?at(y):fu(S,E,T));const P=Math.abs(k)<=r,$=Math.abs(i-T)<=s;a.done=P&&$}return a.value=a.done?i:T,a},toString:()=>{const E=Math.min(ra(C),gs),T=uu(k=>C.next(E*k).value,E,30);return E+"ms "+T},toTransition:()=>{}};return C}ys.applyToOptions=e=>{const t=Bp(e,100,ys);return e.ease=t.ease,e.duration=at(t.duration),e.type="keyframes",e};function Jo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:c,restDelta:l=.5,restSpeed:u}){const h=e[0],p={done:!1,value:h},g=P=>a!==void 0&&P<a||c!==void 0&&P>c,y=P=>a===void 0?c:c===void 0||Math.abs(a-P)<Math.abs(c-P)?a:c;let f=n*t;const v=h+f,w=i===void 0?v:i(v);w!==v&&(f=w-h);const b=P=>-f*Math.exp(-P/r),S=P=>w+b(P),C=P=>{const $=b(P),x=S(P);p.done=Math.abs($)<=l,p.value=p.done?w:x};let E,T;const k=P=>{g(p.value)&&(E=P,T=ys({keyframes:[p.value,y(p.value)],velocity:fu(S,P,p.value),damping:s,stiffness:o,restDelta:l,restSpeed:u}))};return k(0),{calculatedDuration:null,next:P=>{let $=!1;return!T&&E===void 0&&($=!0,C(P),k(P)),E!==void 0&&P>=E?T.next(P-E):(!$&&C(P),p)}}}function Gp(e,t,n){const r=[],s=n||jt.mix||du,o=e.length-1;for(let i=0;i<o;i++){let a=s(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||nt:t;a=Tr(c,a)}r.push(a)}return r}function qp(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Nt(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Gp(t,r,s),c=a.length,l=u=>{if(i&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const p=hr(e[h],e[h+1],u);return a[h](p)};return n?u=>l(Mt(e[0],e[o-1],u)):l}function Xp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=hr(0,t,r);e.push(Se(n,1,s))}}function Jp(e){const t=[0];return Xp(t,e.length-1),t}function Qp(e,t){return e.map(n=>n*t)}function e0(e,t){return e.map(()=>t||eu).splice(0,e.length-1)}function Tn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=fp(r)?r.map(rc):rc(r),o={done:!1,value:t[0]},i=Qp(n&&n.length===t.length?n:Jp(t),e),a=qp(i,t,{ease:Array.isArray(s)?s:e0(t,s)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const t0=e=>e!==null;function sa(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(t0),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const n0={decay:Jo,inertia:Jo,tween:Tn,keyframes:Tn,spring:ys};function hu(e){typeof e.type=="string"&&(e.type=n0[e.type])}class oa{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const r0=e=>e/100;class ia extends oa{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Ue.now()&&this.tick(Ue.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;hu(t);const{type:n=Tn,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const c=n||Tn;process.env.NODE_ENV!=="production"&&c!==Tn&&Nt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Tn&&typeof a[0]!="number"&&(this.mixKeyframes=Tr(r0,du(a[0],a[1])),a=[0,100]);const l=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),l.calculatedDuration===null&&(l.calculatedDuration=ra(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:u,repeat:h,repeatType:p,repeatDelay:g,type:y,onUpdate:f,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-l*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,C=r;if(h){const P=Math.min(this.currentTime,s)/a;let $=Math.floor(P),x=P%1;!x&&P>=1&&(x=1),x===1&&$--,$=Math.min($,h+1),!!($%2)&&(p==="reverse"?(x=1-x,g&&(x-=g/a)):p==="mirror"&&(C=i)),S=Mt(0,1,x)*a}const E=b?{done:!1,value:u[0]}:C.next(S);o&&(E.value=o(E.value));let{done:T}=E;!b&&c!==null&&(T=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return k&&y!==Jo&&(E.value=sa(u,this.options,v,this.speed)),f&&f(E.value),k&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return vt(this.calculatedDuration)}get time(){return vt(this.currentTime)}set time(t){var n;t=at(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ue.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=vt(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=Fp,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ue.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function s0(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const tn=e=>e*180/Math.PI,Qo=e=>{const t=tn(Math.atan2(e[1],e[0]));return ei(t)},o0={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Qo,rotateZ:Qo,skewX:e=>tn(Math.atan(e[1])),skewY:e=>tn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ei=e=>(e=e%360,e<0&&(e+=360),e),lc=Qo,dc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),uc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),i0={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:dc,scaleY:uc,scale:e=>(dc(e)+uc(e))/2,rotateX:e=>ei(tn(Math.atan2(e[6],e[5]))),rotateY:e=>ei(tn(Math.atan2(-e[2],e[0]))),rotateZ:lc,rotate:lc,skewX:e=>tn(Math.atan(e[4])),skewY:e=>tn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ti(e){return e.includes("scale")?1:0}function ni(e,t){if(!e||e==="none")return ti(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=i0,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=o0,s=a}if(!s)return ti(t);const o=r[t],i=s[1].split(",").map(c0);return typeof o=="function"?o(i):i[o]}const a0=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ni(n,t)};function c0(e){return parseFloat(e.trim())}const Wn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Zn=new Set(Wn),fc=e=>e===Un||e===re,l0=new Set(["x","y","z"]),d0=Wn.filter(e=>!l0.has(e));function u0(e){const t=[];return d0.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const rn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ni(t,"x"),y:(e,{transform:t})=>ni(t,"y")};rn.translateX=rn.x;rn.translateY=rn.y;const sn=new Set;let ri=!1,si=!1,oi=!1;function mu(){if(si){const e=Array.from(sn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=u0(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var a;(a=r.getValue(o))==null||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}si=!1,ri=!1,sn.forEach(e=>e.complete(oi)),sn.clear()}function pu(){sn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(si=!0)})}function f0(){oi=!0,pu(),mu(),oi=!1}class aa{constructor(t,n,r,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(sn.add(this),ri||(ri=!0,be.read(pu),be.resolveKeyframes(mu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),s&&o===void 0&&s.set(t[0])}s0(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),sn.delete(this)}cancel(){this.state==="scheduled"&&(sn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const h0=e=>e.startsWith("--");function m0(e,t,n){h0(t)?e.style.setProperty(t,n):e.style[t]=n}const p0=Ki(()=>window.ScrollTimeline!==void 0),g0={};function y0(e,t){const n=Ki(e);return()=>g0[t]??n()}const gu=y0(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),sr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,hc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:sr([0,.65,.55,1]),circOut:sr([.55,0,1,.45]),backIn:sr([.31,.01,.66,-.59]),backOut:sr([.33,1.53,.69,.99])};function yu(e,t){if(e)return typeof e=="function"?gu()?uu(e,t):"ease-out":tu(e)?sr(e):Array.isArray(e)?e.map(n=>yu(n,t)||hc.easeOut):hc[e]}function v0(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[t]:n};c&&(u.offset=c);const h=yu(a,s);Array.isArray(h)&&(u.easing=h);const p={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return l&&(p.pseudoElement=l),e.animate(u,p)}function vu(e){return typeof e=="function"&&"applyToOptions"in e}function x0({type:e,...t}){return vu(e)&&gu()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class b0 extends oa{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,Nt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=x0(t);this.animation=v0(n,r,s,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=sa(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):m0(n,r,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return vt(Number(t))}get time(){return vt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=at(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&p0()?(this.animation.timeline=t,nt):n(this)}}const xu={anticipate:Xd,backInOut:qd,circInOut:Qd};function w0(e){return e in xu}function S0(e){typeof e.ease=="string"&&w0(e.ease)&&(e.ease=xu[e.ease])}const mc=10;class C0 extends b0{constructor(t){S0(t),hu(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ia({...i,autoplay:!1}),c=at(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-mc).value,a.sample(c).value,mc),a.stop()}}const pc=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ft.test(e)||e==="0")&&!e.startsWith("url("));function E0(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function k0(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=pc(s,t),a=pc(o,t);return zn(i===a,`You are trying to animate ${t} from "${s}" to "${o}". "${i?o:s}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:E0(e)||(n==="spring"||vu(n))&&r}function ii(e){e.duration=0,e.type}const T0=new Set(["opacity","clipPath","filter","transform"]),A0=Ki(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function P0(e){var u;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:i}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return A0()&&n&&T0.has(n)&&(n!=="transform"||!l)&&!c&&!r&&s!=="mirror"&&o!==0&&i!=="inertia"}const M0=40;class N0 extends oa{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:c,motionValue:l,element:u,...h}){var y;super(),this.stop=()=>{var f,v;this._animation&&(this._animation.stop(),(f=this.stopTimeline)==null||f.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Ue.now();const p={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,name:c,motionValue:l,element:u,...h},g=(u==null?void 0:u.KeyframeResolver)||aa;this.keyframeResolver=new g(a,(f,v,w)=>this.onKeyframesResolved(f,v,p,!w),c,l,u),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:c,isHandoff:l,onUpdate:u}=r;this.resolvedAt=Ue.now(),k0(t,o,i,a)||((jt.instantAnimations||!c)&&(u==null||u(sa(t,r,n))),t[0]=t[t.length-1],ii(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>M0?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!l&&P0(p)?new C0({...p,element:p.motionValue.owner.current}):new ia(p);g.finished.then(()=>this.notifyFinished()).catch(nt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),f0()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const j0=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function R0(e){const t=j0.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const V0=4;function bu(e,t,n=1){Nt(n<=V0,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=R0(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return Hd(i)?parseFloat(i):i}return Qi(s)?bu(s,t,n+1):s}function ca(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const wu=new Set(["width","height","top","left","right","bottom",...Wn]),I0={test:e=>e==="auto",parse:e=>e},Su=e=>t=>t.test(e),Cu=[Un,re,xt,$t,Ep,Cp,I0],gc=e=>Cu.find(Su(e));function D0(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ud(e):!0}const O0=new Set(["brightness","contrast","saturate","opacity"]);function $0(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ea)||[];if(!r)return e;const s=n.replace(r,"");let o=O0.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const L0=/\b([a-z-]*)\(.*?\)/gu,ai={...Ft,getAnimatableNone:e=>{const t=e.match(L0);return t?t.map($0).join(" "):e}},yc={...Un,transform:Math.round},_0={rotate:$t,rotateX:$t,rotateY:$t,rotateZ:$t,scale:Lr,scaleX:Lr,scaleY:Lr,scaleZ:Lr,skew:$t,skewX:$t,skewY:$t,distance:re,translateX:re,translateY:re,translateZ:re,x:re,y:re,z:re,perspective:re,transformPerspective:re,opacity:mr,originX:sc,originY:sc,originZ:re},la={borderWidth:re,borderTopWidth:re,borderRightWidth:re,borderBottomWidth:re,borderLeftWidth:re,borderRadius:re,radius:re,borderTopLeftRadius:re,borderTopRightRadius:re,borderBottomRightRadius:re,borderBottomLeftRadius:re,width:re,maxWidth:re,height:re,maxHeight:re,top:re,right:re,bottom:re,left:re,padding:re,paddingTop:re,paddingRight:re,paddingBottom:re,paddingLeft:re,margin:re,marginTop:re,marginRight:re,marginBottom:re,marginLeft:re,backgroundPositionX:re,backgroundPositionY:re,..._0,zIndex:yc,fillOpacity:mr,strokeOpacity:mr,numOctaves:yc},F0={...la,color:Re,backgroundColor:Re,outlineColor:Re,fill:Re,stroke:Re,borderColor:Re,borderTopColor:Re,borderRightColor:Re,borderBottomColor:Re,borderLeftColor:Re,filter:ai,WebkitFilter:ai},Eu=e=>F0[e];function ku(e,t){let n=Eu(e);return n!==ai&&(n=Ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const B0=new Set(["auto","none","0"]);function H0(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!B0.has(o)&&pr(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=ku(n,s)}class z0 extends aa{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),Qi(l))){const u=bu(l,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!wu.has(r)||t.length!==2)return;const[s,o]=t,i=gc(s),a=gc(o);if(i!==a)if(fc(i)&&fc(a))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else rn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||D0(t[s]))&&r.push(s);r.length&&H0(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=rn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function U0(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const Tu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Au(e){return zd(e)&&"offsetHeight"in e}const vc=30,W0=e=>!isNaN(parseFloat(e));class Z0{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=Ue.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ue.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=W0(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Gi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Yi);const r=this.events[t].add(n);return t==="change"?()=>{r(),be.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ue.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vc);return Wd(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $n(e,t){return new Z0(e,t)}const{schedule:da}=nu(queueMicrotask,!1),ot={x:!1,y:!1};function Pu(){return ot.x||ot.y}function K0(e){return e==="x"||e==="y"?ot[e]?null:(ot[e]=!0,()=>{ot[e]=!1}):ot.x||ot.y?null:(ot.x=ot.y=!0,()=>{ot.x=ot.y=!1})}function Mu(e,t){const n=U0(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function xc(e){return!(e.pointerType==="touch"||Pu())}function Y0(e,t,n={}){const[r,s,o]=Mu(e,n),i=a=>{if(!xc(a))return;const{target:c}=a,l=t(c,a);if(typeof l!="function"||!c)return;const u=h=>{xc(h)&&(l(h),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",i,s)}),o}const Nu=(e,t)=>t?e===t?!0:Nu(e,t.parentElement):!1,ua=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,G0=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function q0(e){return G0.has(e.tagName)||e.tabIndex!==-1}const rs=new WeakSet;function bc(e){return t=>{t.key==="Enter"&&e(t)}}function ho(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const X0=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=bc(()=>{if(rs.has(n))return;ho(n,"down");const s=bc(()=>{ho(n,"up")}),o=()=>ho(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function wc(e){return ua(e)&&!Pu()}function J0(e,t,n={}){const[r,s,o]=Mu(e,n),i=a=>{const c=a.currentTarget;if(!wc(a))return;rs.add(c);const l=t(c,a),u=(g,y)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),rs.has(c)&&rs.delete(c),wc(g)&&typeof l=="function"&&l(g,{success:y})},h=g=>{u(g,c===window||c===document||n.useGlobalTarget||Nu(c,g.target))},p=g=>{u(g,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",p,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,s),Au(a)&&(a.addEventListener("focus",l=>X0(l,s)),!q0(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function ju(e){return zd(e)&&"ownerSVGElement"in e}function Q0(e){return ju(e)&&e.tagName==="svg"}const He=e=>!!(e&&e.getVelocity),eg=[...Cu,Re,Ft],tg=e=>eg.find(Su(e)),fa=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class ng extends m.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=Au(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function rg({children:e,isPresent:t,anchorX:n,root:r}){const s=A.useId(),o=A.useRef(null),i=A.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=A.useContext(fa);return A.useInsertionEffect(()=>{const{width:c,height:l,top:u,left:h,right:p}=i.current;if(t||!o.current||!c||!l)return;const g=n==="left"?`left: ${h}`:`right: ${p}`;o.current.dataset.motionPopId=s;const y=document.createElement("style");a&&(y.nonce=a);const f=r??document.head;return f.appendChild(y),y.sheet&&y.sheet.insertRule(`
1
+ "use strict";var ip=Object.defineProperty;var ap=(e,t,n)=>t in e?ip(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ne=(e,t,n)=>ap(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("react"),d=require("react/jsx-runtime"),te=require("livekit-client"),Me=require("@livekit/components-react"),Fi=require("react-dom"),Ms=require("class-variance-authority"),Bi=require("clsx");function Fd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=Fd(A),Rs=Fd(Fi),Hi=A.createContext({});function zi(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ui=typeof window<"u",Bd=Ui?A.useLayoutEffect:A.useEffect,Ns=A.createContext(null);function Wi(e,t){e.indexOf(t)===-1&&e.push(t)}function Zi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Mt=(e,t,n)=>n>t?t:n<e?e:n;function Yo(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let zn=()=>{},Rt=()=>{};process.env.NODE_ENV!=="production"&&(zn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Yo(t,n))},Rt=(e,t,n)=>{if(!e)throw new Error(Yo(t,n))});const Nt={},Hd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function zd(e){return typeof e=="object"&&e!==null}const Ud=e=>/^0[^.\s]+$/u.test(e);function Ki(e){let t;return()=>(t===void 0&&(t=e()),t)}const nt=e=>e,cp=(e,t)=>n=>t(e(n)),Tr=(...e)=>e.reduce(cp),hr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Yi{constructor(){this.subscriptions=[]}add(t){return Wi(this.subscriptions,t),()=>Zi(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const at=e=>e*1e3,vt=e=>e/1e3;function Wd(e,t){return t?e*(1e3/t):0}const tc=new Set;function Gi(e,t,n){e||tc.has(t)||(console.warn(Yo(t,n)),tc.add(t))}const Zd=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lp=1e-7,dp=12;function up(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=Zd(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>lp&&++a<dp);return i}function Ar(e,t,n,r){if(e===t&&n===r)return nt;const s=o=>up(o,0,1,e,n);return o=>o===0||o===1?o:Zd(s(o),t,r)}const Kd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Yd=e=>t=>1-e(1-t),Gd=Ar(.33,1.53,.69,.99),qi=Yd(Gd),qd=Kd(qi),Xd=e=>(e*=2)<1?.5*qi(e):.5*(2-Math.pow(2,-10*(e-1))),Xi=e=>1-Math.sin(Math.acos(e)),Jd=Yd(Xi),Qd=Kd(Xi),fp=Ar(.42,0,1,1),hp=Ar(0,0,.58,1),eu=Ar(.42,0,.58,1),mp=e=>Array.isArray(e)&&typeof e[0]!="number",tu=e=>Array.isArray(e)&&typeof e[0]=="number",nc={linear:nt,easeIn:fp,easeInOut:eu,easeOut:hp,circIn:Xi,circInOut:Qd,circOut:Jd,backIn:qi,backInOut:qd,backOut:Gd,anticipate:Xd},pp=e=>typeof e=="string",rc=e=>{if(tu(e)){Rt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return Ar(t,n,r,s)}else if(pp(e))return Rt(nc[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),nc[e];return e},$r=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function gp(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){i.has(u)&&(l.schedule(u),e()),u(a)}const l={schedule:(u,h=!1,p=!1)=>{const y=p&&s?n:r;return h&&i.add(u),y.has(u)||y.add(u),u},cancel:u=>{r.delete(u),i.delete(u)},process:u=>{if(a=u,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),n.clear(),s=!1,o&&(o=!1,l.process(u))}};return l}const yp=40;function nu(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=$r.reduce((S,C)=>(S[C]=gp(o),S),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:h,preRender:p,render:g,postRender:y}=i,f=()=>{const S=Nt.useManualTiming?s.timestamp:performance.now();n=!1,Nt.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(S-s.timestamp,yp),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),c.process(s),l.process(s),u.process(s),h.process(s),p.process(s),g.process(s),y.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(f))},v=()=>{n=!0,r=!0,s.isProcessing||e(f)};return{schedule:$r.reduce((S,C)=>{const E=i[C];return S[C]=(T,k=!1,P=!1)=>(n||v(),E.schedule(T,k,P)),S},{}),cancel:S=>{for(let C=0;C<$r.length;C++)i[$r[C]].cancel(S)},state:s,steps:i}}const{schedule:be,cancel:_t,state:Oe,steps:ao}=nu(typeof requestAnimationFrame<"u"?requestAnimationFrame:nt,!0);let ns;function vp(){ns=void 0}const Ue={now:()=>(ns===void 0&&Ue.set(Oe.isProcessing||Nt.useManualTiming?Oe.timestamp:performance.now()),ns),set:e=>{ns=e,queueMicrotask(vp)}},ru=e=>t=>typeof t=="string"&&t.startsWith(e),Ji=ru("--"),xp=ru("var(--"),Qi=e=>xp(e)?bp.test(e.split("/*")[0].trim()):!1,bp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Un={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mr={...Un,transform:e=>Mt(0,1,e)},Lr={...Un,default:1},cr=e=>Math.round(e*1e5)/1e5,ea=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wp(e){return e==null}const Sp=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ta=(e,t)=>n=>!!(typeof n=="string"&&Sp.test(n)&&n.startsWith(e)||t&&!wp(n)&&Object.prototype.hasOwnProperty.call(n,t)),su=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(ea);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Cp=e=>Mt(0,255,e),co={...Un,transform:e=>Math.round(Cp(e))},en={test:ta("rgb","red"),parse:su("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+co.transform(e)+", "+co.transform(t)+", "+co.transform(n)+", "+cr(mr.transform(r))+")"};function Ep(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Go={test:ta("#"),parse:Ep,transform:en.transform},Pr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$t=Pr("deg"),xt=Pr("%"),re=Pr("px"),kp=Pr("vh"),Tp=Pr("vw"),sc={...xt,parse:e=>xt.parse(e)/100,transform:e=>xt.transform(e*100)},kn={test:ta("hsl","hue"),parse:su("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xt.transform(cr(t))+", "+xt.transform(cr(n))+", "+cr(mr.transform(r))+")"},je={test:e=>en.test(e)||Go.test(e)||kn.test(e),parse:e=>en.test(e)?en.parse(e):kn.test(e)?kn.parse(e):Go.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?en.transform(e):kn.transform(e),getAnimatableNone:e=>{const t=je.parse(e);return t.alpha=0,je.transform(t)}},Ap=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Pp(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ea))==null?void 0:t.length)||0)+(((n=e.match(Ap))==null?void 0:n.length)||0)>0}const ou="number",iu="color",Mp="var",Rp="var(",oc="${}",Np=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Np,c=>(je.test(c)?(r.color.push(o),s.push(iu),n.push(je.parse(c))):c.startsWith(Rp)?(r.var.push(o),s.push(Mp),n.push(c)):(r.number.push(o),s.push(ou),n.push(parseFloat(c))),++o,oc)).split(oc);return{values:n,split:a,indexes:r,types:s}}function au(e){return pr(e).values}function cu(e){const{split:t,types:n}=pr(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const a=n[i];a===ou?o+=cr(s[i]):a===iu?o+=je.transform(s[i]):o+=s[i]}return o}}const jp=e=>typeof e=="number"?0:je.test(e)?je.getAnimatableNone(e):e;function Vp(e){const t=au(e);return cu(e)(t.map(jp))}const Ft={test:Pp,parse:au,createTransformer:cu,getAnimatableNone:Vp};function lo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ip({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=lo(c,a,e+1/3),o=lo(c,a,e),i=lo(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function ps(e,t){return n=>n>0?t:e}const Se=(e,t,n)=>e+(t-e)*n,uo=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Dp=[Go,en,kn],Op=e=>Dp.find(t=>t.test(e));function ic(e){const t=Op(e);if(zn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===kn&&(n=Ip(n)),n}const ac=(e,t)=>{const n=ic(e),r=ic(t);if(!n||!r)return ps(e,t);const s={...n};return o=>(s.red=uo(n.red,r.red,o),s.green=uo(n.green,r.green,o),s.blue=uo(n.blue,r.blue,o),s.alpha=Se(n.alpha,r.alpha,o),en.transform(s))},qo=new Set(["none","hidden"]);function $p(e,t){return qo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Lp(e,t){return n=>Se(e,t,n)}function na(e){return typeof e=="number"?Lp:typeof e=="string"?Qi(e)?ps:je.test(e)?ac:Bp:Array.isArray(e)?lu:typeof e=="object"?je.test(e)?ac:_p:ps}function lu(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>na(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function _p(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=na(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function Fp(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],a=e.values[i]??0;n[s]=a,r[o]++}return n}const Bp=(e,t)=>{const n=Ft.createTransformer(t),r=pr(e),s=pr(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?qo.has(e)&&!s.values.length||qo.has(t)&&!r.values.length?$p(e,t):Tr(lu(Fp(r,s),s.values),n):(zn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ps(e,t))};function du(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Se(e,t,n):na(e)(e,t)}const Hp=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>be.update(t,n),stop:()=>_t(t),now:()=>Oe.isProcessing?Oe.timestamp:Ue.now()}},uu=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},gs=2e4;function ra(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<gs;)t+=n,r=e.next(t);return t>=gs?1/0:t}function zp(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(ra(r),gs);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:vt(s)}}const Up=5;function fu(e,t,n){const r=Math.max(t-Up,0);return Wd(n-e(r),t-r)}const we={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},fo=.001;function Wp({duration:e=we.duration,bounce:t=we.bounce,velocity:n=we.velocity,mass:r=we.mass}){let s,o;zn(e<=at(we.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Mt(we.minDamping,we.maxDamping,i),e=Mt(we.minDuration,we.maxDuration,vt(e)),i<1?(s=l=>{const u=l*i,h=u*e,p=u-n,g=Xo(l,i),y=Math.exp(-h);return fo-p/g*y},o=l=>{const h=l*i*e,p=h*n+n,g=Math.pow(i,2)*Math.pow(l,2)*e,y=Math.exp(-h),f=Xo(Math.pow(l,2),i);return(-s(l)+fo>0?-1:1)*((p-g)*y)/f}):(s=l=>{const u=Math.exp(-l*e),h=(l-n)*e+1;return-fo+u*h},o=l=>{const u=Math.exp(-l*e),h=(n-l)*(e*e);return u*h});const a=5/e,c=Kp(s,o,a);if(e=at(e),isNaN(c))return{stiffness:we.stiffness,damping:we.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:i*2*Math.sqrt(r*l),duration:e}}}const Zp=12;function Kp(e,t,n){let r=n;for(let s=1;s<Zp;s++)r=r-e(r)/t(r);return r}function Xo(e,t){return e*Math.sqrt(1-t*t)}const Yp=["duration","bounce"],Gp=["stiffness","damping","mass"];function cc(e,t){return t.some(n=>e[n]!==void 0)}function qp(e){let t={velocity:we.velocity,stiffness:we.stiffness,damping:we.damping,mass:we.mass,isResolvedFromDuration:!1,...e};if(!cc(e,Gp)&&cc(e,Yp))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Mt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:we.mass,stiffness:s,damping:o}}else{const n=Wp(e);t={...t,...n,mass:we.mass},t.isResolvedFromDuration=!0}return t}function ys(e=we.visualDuration,t=we.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:l,mass:u,duration:h,velocity:p,isResolvedFromDuration:g}=qp({...n,velocity:-vt(n.velocity||0)}),y=p||0,f=l/(2*Math.sqrt(c*u)),v=i-o,w=vt(Math.sqrt(c/u)),b=Math.abs(v)<5;r||(r=b?we.restSpeed.granular:we.restSpeed.default),s||(s=b?we.restDelta.granular:we.restDelta.default);let S;if(f<1){const E=Xo(w,f);S=T=>{const k=Math.exp(-f*w*T);return i-k*((y+f*w*v)/E*Math.sin(E*T)+v*Math.cos(E*T))}}else if(f===1)S=E=>i-Math.exp(-w*E)*(v+(y+w*v)*E);else{const E=w*Math.sqrt(f*f-1);S=T=>{const k=Math.exp(-f*w*T),P=Math.min(E*T,300);return i-k*((y+f*w*v)*Math.sinh(P)+E*v*Math.cosh(P))/E}}const C={calculatedDuration:g&&h||null,next:E=>{const T=S(E);if(g)a.done=E>=h;else{let k=E===0?y:0;f<1&&(k=E===0?at(y):fu(S,E,T));const P=Math.abs(k)<=r,$=Math.abs(i-T)<=s;a.done=P&&$}return a.value=a.done?i:T,a},toString:()=>{const E=Math.min(ra(C),gs),T=uu(k=>C.next(E*k).value,E,30);return E+"ms "+T},toTransition:()=>{}};return C}ys.applyToOptions=e=>{const t=zp(e,100,ys);return e.ease=t.ease,e.duration=at(t.duration),e.type="keyframes",e};function Jo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:c,restDelta:l=.5,restSpeed:u}){const h=e[0],p={done:!1,value:h},g=P=>a!==void 0&&P<a||c!==void 0&&P>c,y=P=>a===void 0?c:c===void 0||Math.abs(a-P)<Math.abs(c-P)?a:c;let f=n*t;const v=h+f,w=i===void 0?v:i(v);w!==v&&(f=w-h);const b=P=>-f*Math.exp(-P/r),S=P=>w+b(P),C=P=>{const $=b(P),x=S(P);p.done=Math.abs($)<=l,p.value=p.done?w:x};let E,T;const k=P=>{g(p.value)&&(E=P,T=ys({keyframes:[p.value,y(p.value)],velocity:fu(S,P,p.value),damping:s,stiffness:o,restDelta:l,restSpeed:u}))};return k(0),{calculatedDuration:null,next:P=>{let $=!1;return!T&&E===void 0&&($=!0,C(P),k(P)),E!==void 0&&P>=E?T.next(P-E):(!$&&C(P),p)}}}function Xp(e,t,n){const r=[],s=n||Nt.mix||du,o=e.length-1;for(let i=0;i<o;i++){let a=s(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||nt:t;a=Tr(c,a)}r.push(a)}return r}function Jp(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Rt(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Xp(t,r,s),c=a.length,l=u=>{if(i&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const p=hr(e[h],e[h+1],u);return a[h](p)};return n?u=>l(Mt(e[0],e[o-1],u)):l}function Qp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=hr(0,t,r);e.push(Se(n,1,s))}}function e0(e){const t=[0];return Qp(t,e.length-1),t}function t0(e,t){return e.map(n=>n*t)}function n0(e,t){return e.map(()=>t||eu).splice(0,e.length-1)}function Tn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=mp(r)?r.map(rc):rc(r),o={done:!1,value:t[0]},i=t0(n&&n.length===t.length?n:e0(t),e),a=Jp(i,t,{ease:Array.isArray(s)?s:n0(t,s)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const r0=e=>e!==null;function sa(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(r0),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const s0={decay:Jo,inertia:Jo,tween:Tn,keyframes:Tn,spring:ys};function hu(e){typeof e.type=="string"&&(e.type=s0[e.type])}class oa{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const o0=e=>e/100;class ia extends oa{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Ue.now()&&this.tick(Ue.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;hu(t);const{type:n=Tn,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const c=n||Tn;process.env.NODE_ENV!=="production"&&c!==Tn&&Rt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Tn&&typeof a[0]!="number"&&(this.mixKeyframes=Tr(o0,du(a[0],a[1])),a=[0,100]);const l=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),l.calculatedDuration===null&&(l.calculatedDuration=ra(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:u,repeat:h,repeatType:p,repeatDelay:g,type:y,onUpdate:f,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-l*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,C=r;if(h){const P=Math.min(this.currentTime,s)/a;let $=Math.floor(P),x=P%1;!x&&P>=1&&(x=1),x===1&&$--,$=Math.min($,h+1),!!($%2)&&(p==="reverse"?(x=1-x,g&&(x-=g/a)):p==="mirror"&&(C=i)),S=Mt(0,1,x)*a}const E=b?{done:!1,value:u[0]}:C.next(S);o&&(E.value=o(E.value));let{done:T}=E;!b&&c!==null&&(T=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return k&&y!==Jo&&(E.value=sa(u,this.options,v,this.speed)),f&&f(E.value),k&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return vt(this.calculatedDuration)}get time(){return vt(this.currentTime)}set time(t){var n;t=at(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ue.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=vt(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=Hp,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ue.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function i0(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const tn=e=>e*180/Math.PI,Qo=e=>{const t=tn(Math.atan2(e[1],e[0]));return ei(t)},a0={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Qo,rotateZ:Qo,skewX:e=>tn(Math.atan(e[1])),skewY:e=>tn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ei=e=>(e=e%360,e<0&&(e+=360),e),lc=Qo,dc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),uc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),c0={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:dc,scaleY:uc,scale:e=>(dc(e)+uc(e))/2,rotateX:e=>ei(tn(Math.atan2(e[6],e[5]))),rotateY:e=>ei(tn(Math.atan2(-e[2],e[0]))),rotateZ:lc,rotate:lc,skewX:e=>tn(Math.atan(e[4])),skewY:e=>tn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ti(e){return e.includes("scale")?1:0}function ni(e,t){if(!e||e==="none")return ti(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=c0,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=a0,s=a}if(!s)return ti(t);const o=r[t],i=s[1].split(",").map(d0);return typeof o=="function"?o(i):i[o]}const l0=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ni(n,t)};function d0(e){return parseFloat(e.trim())}const Wn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Zn=new Set(Wn),fc=e=>e===Un||e===re,u0=new Set(["x","y","z"]),f0=Wn.filter(e=>!u0.has(e));function h0(e){const t=[];return f0.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const rn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ni(t,"x"),y:(e,{transform:t})=>ni(t,"y")};rn.translateX=rn.x;rn.translateY=rn.y;const sn=new Set;let ri=!1,si=!1,oi=!1;function mu(){if(si){const e=Array.from(sn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=h0(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var a;(a=r.getValue(o))==null||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}si=!1,ri=!1,sn.forEach(e=>e.complete(oi)),sn.clear()}function pu(){sn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(si=!0)})}function m0(){oi=!0,pu(),mu(),oi=!1}class aa{constructor(t,n,r,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(sn.add(this),ri||(ri=!0,be.read(pu),be.resolveKeyframes(mu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),s&&o===void 0&&s.set(t[0])}i0(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),sn.delete(this)}cancel(){this.state==="scheduled"&&(sn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const p0=e=>e.startsWith("--");function g0(e,t,n){p0(t)?e.style.setProperty(t,n):e.style[t]=n}const y0=Ki(()=>window.ScrollTimeline!==void 0),v0={};function x0(e,t){const n=Ki(e);return()=>v0[t]??n()}const gu=x0(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),sr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,hc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:sr([0,.65,.55,1]),circOut:sr([.55,0,1,.45]),backIn:sr([.31,.01,.66,-.59]),backOut:sr([.33,1.53,.69,.99])};function yu(e,t){if(e)return typeof e=="function"?gu()?uu(e,t):"ease-out":tu(e)?sr(e):Array.isArray(e)?e.map(n=>yu(n,t)||hc.easeOut):hc[e]}function b0(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[t]:n};c&&(u.offset=c);const h=yu(a,s);Array.isArray(h)&&(u.easing=h);const p={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return l&&(p.pseudoElement=l),e.animate(u,p)}function vu(e){return typeof e=="function"&&"applyToOptions"in e}function w0({type:e,...t}){return vu(e)&&gu()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class S0 extends oa{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,Rt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=w0(t);this.animation=b0(n,r,s,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=sa(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):g0(n,r,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return vt(Number(t))}get time(){return vt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=at(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&y0()?(this.animation.timeline=t,nt):n(this)}}const xu={anticipate:Xd,backInOut:qd,circInOut:Qd};function C0(e){return e in xu}function E0(e){typeof e.ease=="string"&&C0(e.ease)&&(e.ease=xu[e.ease])}const mc=10;class k0 extends S0{constructor(t){E0(t),hu(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ia({...i,autoplay:!1}),c=at(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-mc).value,a.sample(c).value,mc),a.stop()}}const pc=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ft.test(e)||e==="0")&&!e.startsWith("url("));function T0(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function A0(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=pc(s,t),a=pc(o,t);return zn(i===a,`You are trying to animate ${t} from "${s}" to "${o}". "${i?o:s}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:T0(e)||(n==="spring"||vu(n))&&r}function ii(e){e.duration=0,e.type}const P0=new Set(["opacity","clipPath","filter","transform"]),M0=Ki(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function R0(e){var u;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:i}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return M0()&&n&&P0.has(n)&&(n!=="transform"||!l)&&!c&&!r&&s!=="mirror"&&o!==0&&i!=="inertia"}const N0=40;class j0 extends oa{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:c,motionValue:l,element:u,...h}){var y;super(),this.stop=()=>{var f,v;this._animation&&(this._animation.stop(),(f=this.stopTimeline)==null||f.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Ue.now();const p={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,name:c,motionValue:l,element:u,...h},g=(u==null?void 0:u.KeyframeResolver)||aa;this.keyframeResolver=new g(a,(f,v,w)=>this.onKeyframesResolved(f,v,p,!w),c,l,u),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:c,isHandoff:l,onUpdate:u}=r;this.resolvedAt=Ue.now(),A0(t,o,i,a)||((Nt.instantAnimations||!c)&&(u==null||u(sa(t,r,n))),t[0]=t[t.length-1],ii(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>N0?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!l&&R0(p)?new k0({...p,element:p.motionValue.owner.current}):new ia(p);g.finished.then(()=>this.notifyFinished()).catch(nt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),m0()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const V0=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function I0(e){const t=V0.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const D0=4;function bu(e,t,n=1){Rt(n<=D0,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=I0(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return Hd(i)?parseFloat(i):i}return Qi(s)?bu(s,t,n+1):s}function ca(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const wu=new Set(["width","height","top","left","right","bottom",...Wn]),O0={test:e=>e==="auto",parse:e=>e},Su=e=>t=>t.test(e),Cu=[Un,re,xt,$t,Tp,kp,O0],gc=e=>Cu.find(Su(e));function $0(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ud(e):!0}const L0=new Set(["brightness","contrast","saturate","opacity"]);function _0(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ea)||[];if(!r)return e;const s=n.replace(r,"");let o=L0.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const F0=/\b([a-z-]*)\(.*?\)/gu,ai={...Ft,getAnimatableNone:e=>{const t=e.match(F0);return t?t.map(_0).join(" "):e}},yc={...Un,transform:Math.round},B0={rotate:$t,rotateX:$t,rotateY:$t,rotateZ:$t,scale:Lr,scaleX:Lr,scaleY:Lr,scaleZ:Lr,skew:$t,skewX:$t,skewY:$t,distance:re,translateX:re,translateY:re,translateZ:re,x:re,y:re,z:re,perspective:re,transformPerspective:re,opacity:mr,originX:sc,originY:sc,originZ:re},la={borderWidth:re,borderTopWidth:re,borderRightWidth:re,borderBottomWidth:re,borderLeftWidth:re,borderRadius:re,radius:re,borderTopLeftRadius:re,borderTopRightRadius:re,borderBottomRightRadius:re,borderBottomLeftRadius:re,width:re,maxWidth:re,height:re,maxHeight:re,top:re,right:re,bottom:re,left:re,padding:re,paddingTop:re,paddingRight:re,paddingBottom:re,paddingLeft:re,margin:re,marginTop:re,marginRight:re,marginBottom:re,marginLeft:re,backgroundPositionX:re,backgroundPositionY:re,...B0,zIndex:yc,fillOpacity:mr,strokeOpacity:mr,numOctaves:yc},H0={...la,color:je,backgroundColor:je,outlineColor:je,fill:je,stroke:je,borderColor:je,borderTopColor:je,borderRightColor:je,borderBottomColor:je,borderLeftColor:je,filter:ai,WebkitFilter:ai},Eu=e=>H0[e];function ku(e,t){let n=Eu(e);return n!==ai&&(n=Ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const z0=new Set(["auto","none","0"]);function U0(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!z0.has(o)&&pr(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=ku(n,s)}class W0 extends aa{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),Qi(l))){const u=bu(l,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!wu.has(r)||t.length!==2)return;const[s,o]=t,i=gc(s),a=gc(o);if(i!==a)if(fc(i)&&fc(a))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else rn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||$0(t[s]))&&r.push(s);r.length&&U0(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=rn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function Z0(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const Tu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Au(e){return zd(e)&&"offsetHeight"in e}const vc=30,K0=e=>!isNaN(parseFloat(e));class Y0{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=Ue.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ue.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=K0(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Gi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Yi);const r=this.events[t].add(n);return t==="change"?()=>{r(),be.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ue.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vc);return Wd(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $n(e,t){return new Y0(e,t)}const{schedule:da}=nu(queueMicrotask,!1),ot={x:!1,y:!1};function Pu(){return ot.x||ot.y}function G0(e){return e==="x"||e==="y"?ot[e]?null:(ot[e]=!0,()=>{ot[e]=!1}):ot.x||ot.y?null:(ot.x=ot.y=!0,()=>{ot.x=ot.y=!1})}function Mu(e,t){const n=Z0(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function xc(e){return!(e.pointerType==="touch"||Pu())}function q0(e,t,n={}){const[r,s,o]=Mu(e,n),i=a=>{if(!xc(a))return;const{target:c}=a,l=t(c,a);if(typeof l!="function"||!c)return;const u=h=>{xc(h)&&(l(h),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",i,s)}),o}const Ru=(e,t)=>t?e===t?!0:Ru(e,t.parentElement):!1,ua=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,X0=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function J0(e){return X0.has(e.tagName)||e.tabIndex!==-1}const rs=new WeakSet;function bc(e){return t=>{t.key==="Enter"&&e(t)}}function ho(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Q0=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=bc(()=>{if(rs.has(n))return;ho(n,"down");const s=bc(()=>{ho(n,"up")}),o=()=>ho(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function wc(e){return ua(e)&&!Pu()}function eg(e,t,n={}){const[r,s,o]=Mu(e,n),i=a=>{const c=a.currentTarget;if(!wc(a))return;rs.add(c);const l=t(c,a),u=(g,y)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),rs.has(c)&&rs.delete(c),wc(g)&&typeof l=="function"&&l(g,{success:y})},h=g=>{u(g,c===window||c===document||n.useGlobalTarget||Ru(c,g.target))},p=g=>{u(g,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",p,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,s),Au(a)&&(a.addEventListener("focus",l=>Q0(l,s)),!J0(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Nu(e){return zd(e)&&"ownerSVGElement"in e}function tg(e){return Nu(e)&&e.tagName==="svg"}const He=e=>!!(e&&e.getVelocity),ng=[...Cu,je,Ft],rg=e=>ng.find(Su(e)),fa=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class sg extends m.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=Au(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function og({children:e,isPresent:t,anchorX:n,root:r}){const s=A.useId(),o=A.useRef(null),i=A.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=A.useContext(fa);return A.useInsertionEffect(()=>{const{width:c,height:l,top:u,left:h,right:p}=i.current;if(t||!o.current||!c||!l)return;const g=n==="left"?`left: ${h}`:`right: ${p}`;o.current.dataset.motionPopId=s;const y=document.createElement("style");a&&(y.nonce=a);const f=r??document.head;return f.appendChild(y),y.sheet&&y.sheet.insertRule(`
2
2
  [data-motion-pop-id="${s}"] {
3
3
  position: absolute !important;
4
4
  width: ${c}px !important;
@@ -6,8 +6,8 @@
6
6
  ${g}px !important;
7
7
  top: ${u}px !important;
8
8
  }
9
- `),()=>{f.contains(y)&&f.removeChild(y)}},[t]),d.jsx(ng,{isPresent:t,childRef:o,sizeRef:i,children:m.cloneElement(e,{ref:o})})}const sg=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:i,anchorX:a,root:c})=>{const l=zi(og),u=A.useId();let h=!0,p=A.useMemo(()=>(h=!1,{id:u,initial:t,isPresent:n,custom:s,onExitComplete:g=>{l.set(g,!0);for(const y of l.values())if(!y)return;r&&r()},register:g=>(l.set(g,!1),()=>l.delete(g))}),[n,l,r]);return o&&h&&(p={...p}),A.useMemo(()=>{l.forEach((g,y)=>l.set(y,!1))},[n]),m.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=d.jsx(rg,{isPresent:n,anchorX:a,root:c,children:e})),d.jsx(js.Provider,{value:p,children:e})};function og(){return new Map}function Ru(e=!0){const t=A.useContext(js);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=A.useId();A.useEffect(()=>{if(e)return s(o)},[e]);const i=A.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}const _r=e=>e.key||"";function Sc(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const jn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",root:c})=>{const[l,u]=Ru(i),h=A.useMemo(()=>Sc(e),[e]),p=i&&!l?[]:h.map(_r),g=A.useRef(!0),y=A.useRef(h),f=zi(()=>new Map),[v,w]=A.useState(h),[b,S]=A.useState(h);Bd(()=>{g.current=!1,y.current=h;for(let T=0;T<b.length;T++){const k=_r(b[T]);p.includes(k)?f.delete(k):f.get(k)!==!0&&f.set(k,!1)}},[b,p.length,p.join("-")]);const C=[];if(h!==v){let T=[...h];for(let k=0;k<b.length;k++){const P=b[k],$=_r(P);p.includes($)||(T.splice(k,0,P),C.push(P))}return o==="wait"&&C.length&&(T=C),S(Sc(T)),w(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:E}=A.useContext(Hi);return d.jsx(d.Fragment,{children:b.map(T=>{const k=_r(T),P=i&&!l?!1:h===b||p.includes(k),$=()=>{if(f.has(k))f.set(k,!0);else return;let x=!0;f.forEach(I=>{I||(x=!1)}),x&&(E==null||E(),S(y.current),i&&(u==null||u()),r&&r())};return d.jsx(sg,{isPresent:P,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:c,onExitComplete:P?void 0:$,anchorX:a,children:T},k)})})},Vu=A.createContext({strict:!1}),Cc={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ln={};for(const e in Cc)Ln[e]={isEnabled:t=>Cc[e].some(n=>!!t[n])};function ig(e){for(const t in e)Ln[t]={...Ln[t],...e[t]}}const ag=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function vs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ag.has(e)}let Iu=e=>!vs(e);function cg(e){typeof e=="function"&&(Iu=t=>t.startsWith("on")?!vs(t):e(t))}try{cg(require("@emotion/is-prop-valid").default)}catch{}function lg(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(Iu(s)||n===!0&&vs(s)||!t&&!vs(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Rs=A.createContext({});function Vs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function gr(e){return typeof e=="string"||Array.isArray(e)}const ha=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ma=["initial",...ha];function Is(e){return Vs(e.animate)||ma.some(t=>gr(e[t]))}function Du(e){return!!(Is(e)||e.variants)}function dg(e,t){if(Is(e)){const{initial:n,animate:r}=e;return{initial:n===!1||gr(n)?n:void 0,animate:gr(r)?r:void 0}}return e.inherit!==!1?t:{}}function ug(e){const{initial:t,animate:n}=dg(e,A.useContext(Rs));return A.useMemo(()=>({initial:t,animate:n}),[Ec(t),Ec(n)])}function Ec(e){return Array.isArray(e)?e.join(" "):e}const yr={};function fg(e){for(const t in e)yr[t]=e[t],Ji(t)&&(yr[t].isCSSVariable=!0)}function Ou(e,{layout:t,layoutId:n}){return Zn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yr[e]||e==="opacity")}const hg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mg=Wn.length;function pg(e,t,n){let r="",s=!0;for(let o=0;o<mg;o++){const i=Wn[o],a=e[i];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(i.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const l=Tu(a,la[i]);if(!c){s=!1;const u=hg[i]||i;r+=`${u}(${l}) `}n&&(t[i]=l)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function pa(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,a=!1;for(const c in t){const l=t[c];if(Zn.has(c)){i=!0;continue}else if(Ji(c)){s[c]=l;continue}else{const u=Tu(l,la[c]);c.startsWith("origin")?(a=!0,o[c]=u):r[c]=u}}if(t.transform||(i||n?r.transform=pg(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=o;r.transformOrigin=`${c} ${l} ${u}`}}const ga=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $u(e,t,n){for(const r in t)!He(t[r])&&!Ou(r,n)&&(e[r]=t[r])}function gg({transformTemplate:e},t){return A.useMemo(()=>{const n=ga();return pa(n,t,e),Object.assign({},n.vars,n.style)},[t])}function yg(e,t){const n=e.style||{},r={};return $u(r,n,e),Object.assign(r,gg(e,t)),r}function vg(e,t){const n={},r=yg(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const xg={offset:"stroke-dashoffset",array:"stroke-dasharray"},bg={offset:"strokeDashoffset",array:"strokeDasharray"};function wg(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?xg:bg;e[o.offset]=re.transform(-r);const i=re.transform(t),a=re.transform(n);e[o.array]=`${i} ${a}`}function Lu(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...a},c,l,u){if(pa(e,a,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&wg(h,s,o,i,!1)}const _u=()=>({...ga(),attrs:{}}),Fu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Sg(e,t,n,r){const s=A.useMemo(()=>{const o=_u();return Lu(o,t,Fu(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};$u(o,e.style,e),s.style={...o,...s.style}}return s}const Cg=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ya(e){return typeof e!="string"||e.includes("-")?!1:!!(Cg.indexOf(e)>-1||/[A-Z]/u.test(e))}function Eg(e,t,n,{latestValues:r},s,o=!1){const a=(ya(e)?Sg:vg)(t,r,s,e),c=lg(t,typeof e=="string",o),l=e!==A.Fragment?{...c,...a,ref:n}:{},{children:u}=t,h=A.useMemo(()=>He(u)?u.get():u,[u]);return A.createElement(e,{...l,children:h})}function kc(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function va(e,t,n,r){if(typeof t=="function"){const[s,o]=kc(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=kc(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function ss(e){return He(e)?e.get():e}function kg({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Tg(n,r,s,e),renderState:t()}}function Tg(e,t,n,r){const s={},o=r(e,{});for(const p in o)s[p]=ss(o[p]);let{initial:i,animate:a}=e;const c=Is(e),l=Du(e);t&&l&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const h=u?a:i;if(h&&typeof h!="boolean"&&!Vs(h)){const p=Array.isArray(h)?h:[h];for(let g=0;g<p.length;g++){const y=va(e,p[g]);if(y){const{transitionEnd:f,transition:v,...w}=y;for(const b in w){let S=w[b];if(Array.isArray(S)){const C=u?S.length-1:0;S=S[C]}S!==null&&(s[b]=S)}for(const b in f)s[b]=f[b]}}}return s}const Bu=e=>(t,n)=>{const r=A.useContext(Rs),s=A.useContext(js),o=()=>kg(e,t,r,s);return n?o():zi(o)};function xa(e,t,n){var o;const{style:r}=e,s={};for(const i in r)(He(r[i])||t.style&&He(t.style[i])||Ou(i,e)||((o=n==null?void 0:n.getValue(i))==null?void 0:o.liveStyle)!==void 0)&&(s[i]=r[i]);return s}const Ag=Bu({scrapeMotionValuesFromProps:xa,createRenderState:ga});function Hu(e,t,n){const r=xa(e,t,n);for(const s in e)if(He(e[s])||He(t[s])){const o=Wn.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const Pg=Bu({scrapeMotionValuesFromProps:Hu,createRenderState:_u}),Mg=Symbol.for("motionComponentSymbol");function An(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ng(e,t,n){return A.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):An(n)&&(n.current=r))},[t])}const ba=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),jg="framerAppearId",zu="data-"+ba(jg),Uu=A.createContext({});function Rg(e,t,n,r,s){var f,v;const{visualElement:o}=A.useContext(Rs),i=A.useContext(Vu),a=A.useContext(js),c=A.useContext(fa).reducedMotion,l=A.useRef(null);r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=l.current,h=A.useContext(Uu);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&Vg(l.current,n,s,h);const p=A.useRef(!1);A.useInsertionEffect(()=>{u&&p.current&&u.update(n,a)});const g=n[zu],y=A.useRef(!!g&&!((f=window.MotionHandoffIsComplete)!=null&&f.call(window,g))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,g)));return Bd(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),y.current&&u.animationState&&u.animationState.animateChanges())}),A.useEffect(()=>{u&&(!y.current&&u.animationState&&u.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,g)}),y.current=!1),u.enteringChildren=void 0)}),u}function Vg(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Wu(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&An(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function Wu(e){if(e)return e.options.allowProjection!==!1?e.projection:Wu(e.parent)}function mo(e,{forwardMotionProps:t=!1}={},n,r){n&&ig(n);const s=ya(e)?Pg:Ag;function o(a,c){let l;const u={...A.useContext(fa),...a,layoutId:Ig(a)},{isStatic:h}=u,p=ug(a),g=s(a,h);if(!h&&Ui){Dg(u,n);const y=Og(u);l=y.MeasureLayout,p.visualElement=Rg(e,g,u,r,y.ProjectionNode)}return d.jsxs(Rs.Provider,{value:p,children:[l&&p.visualElement?d.jsx(l,{visualElement:p.visualElement,...u}):null,Eg(e,a,Ng(g,p.visualElement,c),g,h,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const i=A.forwardRef(o);return i[Mg]=e,i}function Ig({layoutId:e}){const t=A.useContext(Hi).id;return t&&e!==void 0?t+"-"+e:e}function Dg(e,t){const n=A.useContext(Vu).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?zn(!1,r,"lazy-strict-mode"):Nt(!1,r,"lazy-strict-mode")}}function Og(e){const{drag:t,layout:n}=Ln;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function $g(e,t){if(typeof Proxy>"u")return mo;const n=new Map,r=(o,i)=>mo(o,i,e,t),s=(o,i)=>(process.env.NODE_ENV!=="production"&&Gi(!1,"motion() is deprecated. Use motion.create() instead."),r(o,i));return new Proxy(s,{get:(o,i)=>i==="create"?r:(n.has(i)||n.set(i,mo(i,void 0,e,t)),n.get(i))})}function Zu({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Lg({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function _g(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function po(e){return e===void 0||e===1}function ci({scale:e,scaleX:t,scaleY:n}){return!po(e)||!po(t)||!po(n)}function Qt(e){return ci(e)||Ku(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ku(e){return Tc(e.x)||Tc(e.y)}function Tc(e){return e&&e!=="0%"}function xs(e,t,n){const r=e-n,s=t*r;return n+s}function Ac(e,t,n,r,s){return s!==void 0&&(e=xs(e,s,r)),xs(e,n,r)+t}function li(e,t=0,n=1,r,s){e.min=Ac(e.min,t,n,r,s),e.max=Ac(e.max,t,n,r,s)}function Yu(e,{x:t,y:n}){li(e.x,t.translate,t.scale,t.originPoint),li(e.y,n.translate,n.scale,n.originPoint)}const Pc=.999999999999,Mc=1.0000000000001;function Fg(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,i;for(let a=0;a<s;a++){o=n[a],i=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Mn(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Yu(e,i)),r&&Qt(o.latestValues)&&Mn(e,o.latestValues))}t.x<Mc&&t.x>Pc&&(t.x=1),t.y<Mc&&t.y>Pc&&(t.y=1)}function Pn(e,t){e.min=e.min+t,e.max=e.max+t}function Nc(e,t,n,r,s=.5){const o=Se(e.min,e.max,s);li(e,t,n,o,r)}function Mn(e,t){Nc(e.x,t.x,t.scaleX,t.scale,t.originX),Nc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Gu(e,t){return Zu(_g(e.getBoundingClientRect(),t))}function Bg(e,t,n){const r=Gu(e,n),{scroll:s}=t;return s&&(Pn(r.x,s.offset.x),Pn(r.y,s.offset.y)),r}const jc=()=>({translate:0,scale:1,origin:0,originPoint:0}),Nn=()=>({x:jc(),y:jc()}),Rc=()=>({min:0,max:0}),Ae=()=>({x:Rc(),y:Rc()}),di={current:null},qu={current:!1};function Hg(){if(qu.current=!0,!!Ui)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>di.current=e.matches;e.addEventListener("change",t),t()}else di.current=!1}const zg=new WeakMap;function Ug(e,t,n){for(const r in t){const s=t[r],o=n[r];if(He(s))e.addValue(r,s);else if(He(o))e.addValue(r,$n(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,$n(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Wg{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=aa,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Ue.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,be.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=i;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Is(n),this.isVariantNode=Du(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const g=h[p];c[p]!==void 0&&He(g)&&g.set(c[p])}}mount(t){var n;this.current=t,zg.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,s)=>this.bindToMotionValue(s,r)),qu.current||Hg(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:di.current,process.env.NODE_ENV!=="production"&&Gi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),_t(this.notifyUpdate),_t(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Zn.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&be.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ln){const n=Ln[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ae()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Vc.length;r++){const s=Vc[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=Ug(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=$n(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Hd(r)||Ud(r))?r=parseFloat(r):!tg(r)&&Ft.test(n)&&(r=ku(t,n)),this.setBaseTarget(t,He(r)?r.get():r)),He(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=va(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!He(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Yi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){da.render(this.render)}}class Xu extends Wg{constructor(){super(...arguments),this.KeyframeResolver=z0}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;He(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ju(e,{style:t,vars:n},r,s){const o=e.style;let i;for(i in t)o[i]=t[i];s==null||s.applyProjectionStyles(o,r);for(i in n)o.setProperty(i,n[i])}function Zg(e){return window.getComputedStyle(e)}class Kg extends Xu{constructor(){super(...arguments),this.type="html",this.renderInstance=Ju}readValueFromInstance(t,n){var r;if(Zn.has(n))return(r=this.projection)!=null&&r.isProjecting?ti(n):a0(t,n);{const s=Zg(t),o=(Ji(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Gu(t,n)}build(t,n,r){pa(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return xa(t,n,r)}}const Qu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Yg(e,t,n,r){Ju(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Qu.has(s)?s:ba(s),t.attrs[s])}class Gg extends Xu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ae}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Zn.has(n)){const r=Eu(n);return r&&r.default||0}return n=Qu.has(n)?n:ba(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Hu(t,n,r)}build(t,n,r){Lu(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){Yg(t,n,r,s)}mount(t){this.isSVGTag=Fu(t.tagName),super.mount(t)}}const qg=(e,t)=>ya(e)?new Gg(t):new Kg(t,{allowProjection:e!==A.Fragment});function Rn(e,t,n){const r=e.getProps();return va(r,t,n!==void 0?n:r.custom,e)}const ui=e=>Array.isArray(e);function Xg(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$n(n))}function Jg(e){return ui(e)?e[e.length-1]||0:e}function Qg(e,t){const n=Rn(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=Jg(o[i]);Xg(e,i,a)}}function ey(e){return!!(He(e)&&e.add)}function fi(e,t){const n=e.getValue("willChange");if(ey(n))return n.add(t);if(!n&&jt.WillChange){const r=new jt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ef(e){return e.props[zu]}const ty=e=>e!==null;function ny(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(ty),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const ry={type:"spring",stiffness:500,damping:25,restSpeed:10},sy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),oy={type:"keyframes",duration:.8},iy={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ay=(e,{keyframes:t})=>t.length>2?oy:Zn.has(e)?e.startsWith("scale")?sy(t[1]):ry:iy;function cy({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const wa=(e,t,n,r={},s,o)=>i=>{const a=ca(r,e)||{},c=a.delay||r.delay||0;let{elapsed:l=0}=r;l=l-at(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-l,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};cy(a)||Object.assign(u,ay(e,u)),u.duration&&(u.duration=at(u.duration)),u.repeatDelay&&(u.repeatDelay=at(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ii(u),u.delay===0&&(h=!0)),(jt.instantAnimations||jt.skipAnimations)&&(h=!0,ii(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&t.get()!==void 0){const p=ny(u.keyframes,a);if(p!==void 0){be.update(()=>{u.onUpdate(p),u.onComplete()});return}}return a.isSync?new ia(u):new N0(u)};function ly({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function tf(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...a}=t;r&&(o=r);const c=[],l=s&&e.animationState&&e.animationState.getState()[s];for(const u in a){const h=e.getValue(u,e.latestValues[u]??null),p=a[u];if(p===void 0||l&&ly(l,u))continue;const g={delay:n,...ca(o||{},u)},y=h.get();if(y!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===y&&!g.velocity)continue;let f=!1;if(window.MotionHandoffAnimation){const w=ef(e);if(w){const b=window.MotionHandoffAnimation(w,u,be);b!==null&&(g.startTime=b,f=!0)}}fi(e,u),h.start(wa(u,h,p,e.shouldReduceMotion&&wu.has(u)?{type:!1}:g,e,f));const v=h.animation;v&&c.push(v)}return i&&Promise.all(c).then(()=>{be.update(()=>{i&&Qg(e,i)})}),c}function nf(e,t,n,r=0,s=1){const o=Array.from(e).sort((l,u)=>l.sortNodePosition(u)).indexOf(t),i=e.size,a=(i-1)*r;return typeof n=="function"?n(o,i):s===1?o*r:a-o*r}function hi(e,t,n={}){var c;const r=Rn(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(tf(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:p}=s;return dy(e,t,l,u,h,p,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,u]=a==="beforeChildren"?[o,i]:[i,o];return l().then(()=>u())}else return Promise.all([o(),i(n.delay)])}function dy(e,t,n=0,r=0,s=0,o=1,i){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(hi(c,t,{...i,delay:n+(typeof r=="function"?0:r)+nf(e.variantChildren,c,r,s,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function uy(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>hi(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=hi(e,t,n);else{const s=typeof t=="function"?Rn(e,t,n.custom):t;r=Promise.all(tf(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function rf(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const fy=ma.length;function sf(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?sf(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<fy;n++){const r=ma[n],s=e.props[r];(gr(s)||s===!1)&&(t[r]=s)}return t}const hy=[...ha].reverse(),my=ha.length;function py(e){return t=>Promise.all(t.map(({animation:n,options:r})=>uy(e,n,r)))}function gy(e){let t=py(e),n=Ic(),r=!0;const s=c=>(l,u)=>{var p;const h=Rn(e,u,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:g,transitionEnd:y,...f}=h;l={...l,...f,...y}}return l};function o(c){t=c(e)}function i(c){const{props:l}=e,u=sf(e.parent)||{},h=[],p=new Set;let g={},y=1/0;for(let v=0;v<my;v++){const w=hy[v],b=n[w],S=l[w]!==void 0?l[w]:u[w],C=gr(S),E=w===c?b.isActive:null;E===!1&&(y=v);let T=S===u[w]&&S!==l[w]&&C;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),b.protectedKeys={...g},!b.isActive&&E===null||!S&&!b.prevProp||Vs(S)||typeof S=="boolean")continue;const k=yy(b.prevProp,S);let P=k||w===c&&b.isActive&&!T&&C||v>y&&C,$=!1;const x=Array.isArray(S)?S:[S];let I=x.reduce(s(w),{});E===!1&&(I={});const{prevResolvedValues:_={}}=b,K={..._,...I},Y=U=>{P=!0,p.has(U)&&($=!0,p.delete(U)),b.needsAnimating[U]=!0;const M=e.getValue(U);M&&(M.liveStyle=!1)};for(const U in K){const M=I[U],q=_[U];if(g.hasOwnProperty(U))continue;let j=!1;ui(M)&&ui(q)?j=!rf(M,q):j=M!==q,j?M!=null?Y(U):p.add(U):M!==void 0&&p.has(U)?Y(U):b.protectedKeys[U]=!0}b.prevProp=S,b.prevResolvedValues=I,b.isActive&&(g={...g,...I}),r&&e.blockInitialAnimation&&(P=!1);const X=T&&k;P&&(!X||$)&&h.push(...x.map(U=>{const M={type:w};if(typeof U=="string"&&r&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,j=Rn(q,U);if(q.enteringChildren&&j){const{delayChildren:V}=j.transition||{};M.delay=nf(q.enteringChildren,e,V)}}return{animation:U,options:M}}))}if(p.size){const v={};if(typeof l.initial!="boolean"){const w=Rn(e,Array.isArray(l.initial)?l.initial[0]:l.initial);w&&w.transition&&(v.transition=w.transition)}p.forEach(w=>{const b=e.getBaseTarget(w),S=e.getValue(w);S&&(S.liveStyle=!0),v[w]=b??null}),h.push({animation:v})}let f=!!h.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(h):Promise.resolve()}function a(c,l){var h;if(n[c].isActive===l)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var g;return(g=p.animationState)==null?void 0:g.setActive(c,l)}),n[c].isActive=l;const u=i(c);for(const p in n)n[p].protectedKeys={};return u}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Ic(),r=!0}}}function yy(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rf(t,e):!1}function Xt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ic(){return{animate:Xt(!0),whileInView:Xt(),whileHover:Xt(),whileTap:Xt(),whileDrag:Xt(),whileFocus:Xt(),exit:Xt()}}class Wt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class vy extends Wt{constructor(t){super(t),t.animationState||(t.animationState=gy(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let xy=0;class by extends Wt{constructor(){super(...arguments),this.id=xy++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const wy={animation:{Feature:vy},exit:{Feature:by}};function vr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Mr(e){return{point:{x:e.pageX,y:e.pageY}}}const Sy=e=>t=>ua(t)&&e(t,Mr(t));function lr(e,t,n,r){return vr(e,t,Sy(n),r)}const of=1e-4,Cy=1-of,Ey=1+of,af=.01,ky=0-af,Ty=0+af;function ze(e){return e.max-e.min}function Ay(e,t,n){return Math.abs(e-t)<=n}function Dc(e,t,n,r=.5){e.origin=r,e.originPoint=Se(t.min,t.max,e.origin),e.scale=ze(n)/ze(t),e.translate=Se(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Cy&&e.scale<=Ey||isNaN(e.scale))&&(e.scale=1),(e.translate>=ky&&e.translate<=Ty||isNaN(e.translate))&&(e.translate=0)}function dr(e,t,n,r){Dc(e.x,t.x,n.x,r?r.originX:void 0),Dc(e.y,t.y,n.y,r?r.originY:void 0)}function Oc(e,t,n){e.min=n.min+t.min,e.max=e.min+ze(t)}function Py(e,t,n){Oc(e.x,t.x,n.x),Oc(e.y,t.y,n.y)}function $c(e,t,n){e.min=t.min-n.min,e.max=e.min+ze(t)}function ur(e,t,n){$c(e.x,t.x,n.x),$c(e.y,t.y,n.y)}function Qe(e){return[e("x"),e("y")]}const cf=({current:e})=>e?e.ownerDocument.defaultView:null,Lc=(e,t)=>Math.abs(e-t);function My(e,t){const n=Lc(e.x,t.x),r=Lc(e.y,t.y);return Math.sqrt(n**2+r**2)}class lf{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=yo(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=My(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:f}=p,{timestamp:v}=Oe;this.history.push({...f,timestamp:v});const{onStart:w,onMove:b}=this.handlers;g||(w&&w(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=go(g,this.transformPagePoint),be.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:y,onSessionEnd:f,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=yo(p.type==="pointercancel"?this.lastMoveEventInfo:go(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,w),f&&f(p,w)},!ua(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=s||window;const a=Mr(t),c=go(a,this.transformPagePoint),{point:l}=c,{timestamp:u}=Oe;this.history=[{...l,timestamp:u}];const{onSessionStart:h}=n;h&&h(t,yo(c,this.history)),this.removeListeners=Tr(lr(this.contextWindow,"pointermove",this.handlePointerMove),lr(this.contextWindow,"pointerup",this.handlePointerUp),lr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_t(this.updatePoint)}}function go(e,t){return t?{point:t(e.point)}:e}function _c(e,t){return{x:e.x-t.x,y:e.y-t.y}}function yo({point:e},t){return{point:e,delta:_c(e,df(t)),offset:_c(e,Ny(t)),velocity:jy(t,.1)}}function Ny(e){return e[0]}function df(e){return e[e.length-1]}function jy(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=df(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>at(t)));)n--;if(!r)return{x:0,y:0};const o=vt(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const i={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Ry(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Se(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Se(n,e,r.max):Math.min(e,n)),e}function Fc(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Vy(e,{top:t,left:n,bottom:r,right:s}){return{x:Fc(e.x,n,s),y:Fc(e.y,t,r)}}function Bc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Iy(e,t){return{x:Bc(e.x,t.x),y:Bc(e.y,t.y)}}function Dy(e,t){let n=.5;const r=ze(e),s=ze(t);return s>r?n=hr(t.min,t.max-r,e.min):r>s&&(n=hr(e.min,e.max-s,t.min)),Mt(0,1,n)}function Oy(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const mi=.35;function $y(e=mi){return e===!1?e=0:e===!0&&(e=mi),{x:Hc(e,"left","right"),y:Hc(e,"top","bottom")}}function Hc(e,t,n){return{min:zc(e,t),max:zc(e,n)}}function zc(e,t){return typeof e=="number"?e:e[t]||0}const Ly=new WeakMap;class _y{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ae(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Mr(h).point)},i=(h,p)=>{const{drag:g,dragPropagation:y,onDragStart:f}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=K0(g),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qe(w=>{let b=this.getAxisMotionValue(w).get()||0;if(xt.test(b)){const{projection:S}=this.visualElement;if(S&&S.layout){const C=S.layout.layoutBox[w];C&&(b=ze(C)*(parseFloat(b)/100))}}this.originPoint[w]=b}),f&&be.postRender(()=>f(h,p)),fi(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:f,onDrag:v}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:w}=p;if(y&&this.currentDirection===null){this.currentDirection=Fy(w),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",p.point,w),this.updateAxis("y",p.point,w),this.visualElement.render(),v&&v(h,p)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>Qe(h=>{var p;return this.getAnimationState(h)==="paused"&&((p=this.getAxisMotionValue(h).animation)==null?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new lf(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:cf(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:i}=s;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&be.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Fr(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=Ry(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&An(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Vy(r.layoutBox,t):this.constraints=!1,this.elastic=$y(n),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Qe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Oy(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!An(t))return!1;const r=t.current;Nt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=Bg(r,s.root,this.visualElement.getTransformPagePoint());let i=Iy(s.layout.layoutBox,o);if(n){const a=n(Lg(i));this.hasMutatedConstraints=!!a,a&&(i=Zu(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=Qe(u=>{if(!Fr(u,n,this.currentDirection))return;let h=c&&c[u]||{};i&&(h={min:0,max:0});const p=s?200:1e6,g=s?40:1e7,y={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,y)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return fi(this.visualElement,t),r.start(wa(t,r,0,n,this.visualElement,!1))}stopAnimation(){Qe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Qe(n=>{const{drag:r}=this.getProps();if(!Fr(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:a}=s.layout.layoutBox[n];o.set(t[n]-Se(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!An(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Qe(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const c=a.get();s[i]=Dy({min:c,max:c},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Qe(i=>{if(!Fr(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:l}=this.constraints[i];a.set(Se(c,l,s[i]))})}addListeners(){if(!this.visualElement.current)return;Ly.set(this.visualElement,this);const t=this.visualElement.current,n=lr(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();An(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),be.read(r);const i=vr(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(Qe(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())});return()=>{i(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:i=mi,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Fr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Fy(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class By extends Wt{constructor(t){super(t),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new _y(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Uc=e=>(t,n)=>{e&&be.postRender(()=>e(t,n))};class Hy extends Wt{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(t){this.session=new lf(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:cf(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Uc(t),onStart:Uc(n),onMove:r,onEnd:(o,i)=>{delete this.session,s&&be.postRender(()=>s(o,i))}}}mount(){this.removePointerDownListener=lr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const os={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const er={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(re.test(e))e=parseFloat(e);else return e;const n=Wc(e,t.target.x),r=Wc(e,t.target.y);return`${n}% ${r}%`}},zy={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ft.parse(e);if(s.length>5)return r;const o=Ft.createTransformer(e),i=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;s[0+i]/=a,s[1+i]/=c;const l=Se(a,c,.5);return typeof s[2+i]=="number"&&(s[2+i]/=l),typeof s[3+i]=="number"&&(s[3+i]/=l),o(s)}};let vo=!1;class Uy extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;fg(Wy),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),vo&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),os.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:i}=r;return i&&(i.isPresent=o,vo=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||be.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),da.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;vo=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function uf(e){const[t,n]=Ru(),r=A.useContext(Hi);return d.jsx(Uy,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(Uu),isPresent:t,safeToRemove:n})}const Wy={borderRadius:{...er,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:er,borderTopRightRadius:er,borderBottomLeftRadius:er,borderBottomRightRadius:er,boxShadow:zy};function Zy(e,t,n){const r=He(e)?e:$n(e);return r.start(wa("",r,t,n)),r.animation}const Ky=(e,t)=>e.depth-t.depth;class Yy{constructor(){this.children=[],this.isDirty=!1}add(t){Wi(this.children,t),this.isDirty=!0}remove(t){Zi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ky),this.isDirty=!1,this.children.forEach(t)}}function Gy(e,t){const n=Ue.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(_t(r),e(o-t))};return be.setup(r,!0),()=>_t(r)}const ff=["TopLeft","TopRight","BottomLeft","BottomRight"],qy=ff.length,Zc=e=>typeof e=="string"?parseFloat(e):e,Kc=e=>typeof e=="number"||re.test(e);function Xy(e,t,n,r,s,o){s?(e.opacity=Se(0,n.opacity??1,Jy(r)),e.opacityExit=Se(t.opacity??1,0,Qy(r))):o&&(e.opacity=Se(t.opacity??1,n.opacity??1,r));for(let i=0;i<qy;i++){const a=`border${ff[i]}Radius`;let c=Yc(t,a),l=Yc(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||Kc(c)===Kc(l)?(e[a]=Math.max(Se(Zc(c),Zc(l),r),0),(xt.test(l)||xt.test(c))&&(e[a]+="%")):e[a]=l}(t.rotate||n.rotate)&&(e.rotate=Se(t.rotate||0,n.rotate||0,r))}function Yc(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Jy=hf(0,.5,Jd),Qy=hf(.5,.95,nt);function hf(e,t,n){return r=>r<e?0:r>t?1:n(hr(e,t,r))}function Gc(e,t){e.min=t.min,e.max=t.max}function Je(e,t){Gc(e.x,t.x),Gc(e.y,t.y)}function qc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Xc(e,t,n,r,s){return e-=t,e=xs(e,1/n,r),s!==void 0&&(e=xs(e,1/s,r)),e}function e1(e,t=0,n=1,r=.5,s,o=e,i=e){if(xt.test(t)&&(t=parseFloat(t),t=Se(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Se(o.min,o.max,r);e===o&&(a-=t),e.min=Xc(e.min,t,n,a,s),e.max=Xc(e.max,t,n,a,s)}function Jc(e,t,[n,r,s],o,i){e1(e,t[n],t[r],t[s],t.scale,o,i)}const t1=["x","scaleX","originX"],n1=["y","scaleY","originY"];function Qc(e,t,n,r){Jc(e.x,t,t1,n?n.x:void 0,r?r.x:void 0),Jc(e.y,t,n1,n?n.y:void 0,r?r.y:void 0)}function el(e){return e.translate===0&&e.scale===1}function mf(e){return el(e.x)&&el(e.y)}function tl(e,t){return e.min===t.min&&e.max===t.max}function r1(e,t){return tl(e.x,t.x)&&tl(e.y,t.y)}function nl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function pf(e,t){return nl(e.x,t.x)&&nl(e.y,t.y)}function rl(e){return ze(e.x)/ze(e.y)}function sl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class s1{constructor(){this.members=[]}add(t){Wi(this.members,t),t.scheduleRender()}remove(t){if(Zi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function o1(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((s||o||i)&&(r=`translate3d(${s}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:h,rotateY:p,skewX:g,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),u&&(r+=`rotate(${u}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const xo=["","X","Y","Z"],i1=1e3;let a1=0;function bo(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gf(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ef(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",be,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&gf(r)}function yf({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(i={},a=t==null?void 0:t()){this.id=a1++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(d1),this.nodes.forEach(m1),this.nodes.forEach(p1),this.nodes.forEach(u1)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Yy)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Yi),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const c=this.eventHandlers.get(i);c&&c.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=ju(i)&&!Q0(i),this.instance=i;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,h=0;const p=()=>this.root.updateBlockedByResize=!1;be.read(()=>{h=window.innerWidth}),e(i,()=>{const g=window.innerWidth;g!==h&&(h=g,this.root.updateBlockedByResize=!0,u&&u(),u=Gy(p,250),os.hasAnimatedSinceResize&&(os.hasAnimatedSinceResize=!1,this.nodes.forEach(al)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||b1,{onLayoutAnimationStart:f,onLayoutAnimationComplete:v}=l.getProps(),w=!this.targetLayout||!pf(this.targetLayout,g),b=!h&&p;if(this.options.layoutRoot||this.resumeFrom||b||h&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...ca(y,"layout"),onPlay:f,onComplete:v};(l.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(u,b)}else h||al(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),_t(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(g1),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ol);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(il);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(h1),this.nodes.forEach(c1),this.nodes.forEach(l1)):this.nodes.forEach(il),this.clearAllSnapshots();const a=Ue.now();Oe.delta=Mt(0,1e3/60,a-Oe.timestamp),Oe.timestamp=a,Oe.isProcessing=!0,ao.update.process(Oe),ao.preRender.process(Oe),ao.render.process(Oe),Oe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,da.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(f1),this.sharedNodes.forEach(y1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,be.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){be.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ze(this.snapshot.measuredBox.x)&&!ze(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ae(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!mf(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;i&&this.instance&&(a||Qt(this.latestValues)||u)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return i&&(c=this.removeTransform(c)),w1(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:i}=this.options;if(!i)return Ae();const a=i.measureViewportBox();if(!(((l=this.scroll)==null?void 0:l.wasRoot)||this.path.some(S1))){const{scroll:u}=this.root;u&&(Pn(a.x,u.offset.x),Pn(a.y,u.offset.y))}return a}removeElementScroll(i){var c;const a=Ae();if(Je(a,i),(c=this.scroll)!=null&&c.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:h,options:p}=u;u!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&Je(a,i),Pn(a.x,h.offset.x),Pn(a.y,h.offset.y))}return a}applyTransform(i,a=!1){const c=Ae();Je(c,i);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Mn(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Qt(u.latestValues)&&Mn(c,u.latestValues)}return Qt(this.latestValues)&&Mn(c,this.latestValues),c}removeTransform(i){const a=Ae();Je(a,i);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!Qt(l.latestValues))continue;ci(l.latestValues)&&l.updateSnapshot();const u=Ae(),h=l.measurePageBox();Je(u,h),Qc(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return Qt(this.latestValues)&&Qc(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Oe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var p;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!(!this.layout||!(u||h))){if(this.resolvedRelativeTargetAt=Oe.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ae(),this.relativeTargetOrigin=Ae(),ur(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Je(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ae(),this.targetWithTransforms=Ae()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Py(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Je(this.target,this.layout.layoutBox),Yu(this.target,this.targetDelta)):Je(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ae(),this.relativeTargetOrigin=Ae(),ur(this.relativeTargetOrigin,this.target,g.target),Je(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ci(this.parent.latestValues)||Ku(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Oe.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;Je(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;Fg(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Ae());const{target:g}=i;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(qc(this.prevProjectionDelta.x,this.projectionDelta.x),qc(this.prevProjectionDelta.y,this.projectionDelta.y)),dr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!sl(this.projectionDelta.x,this.prevProjectionDelta.x)||!sl(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Nn(),this.projectionDelta=Nn(),this.projectionDeltaWithTransform=Nn()}setAnimationOrigin(i,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},h=Nn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=Ae(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,f=g!==y,v=this.getStack(),w=!v||v.members.length<=1,b=!!(f&&!w&&this.options.crossfade===!0&&!this.path.some(x1));this.animationProgress=0;let S;this.mixTargetDelta=C=>{const E=C/1e3;cl(h.x,i.x,E),cl(h.y,i.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ur(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),v1(this.relativeTarget,this.relativeTargetOrigin,p,E),S&&r1(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Ae()),Je(S,this.relativeTarget)),f&&(this.animationValues=u,Xy(u,l,this.latestValues,E,b,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,c,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(l=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||l.stop(),this.pendingAnimation&&(_t(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=be.update(()=>{os.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$n(0)),this.currentAnimation=Zy(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),i.onUpdate&&i.onUpdate(u)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(i1),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=i;if(!(!a||!c||!l)){if(this!==i&&this.layout&&l&&vf(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ae();const h=ze(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+h;const p=ze(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+p}Je(a,c),Mn(a,u),dr(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new s1),this.sharedNodes.get(i).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&bo("z",i,l,this.animationValues);for(let u=0;u<xo.length;u++)bo(`rotate${xo[u]}`,i,l,this.animationValues),bo(`skew${xo[u]}`,i,l,this.animationValues);i.render();for(const u in l)i.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=ss(a==null?void 0:a.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=ss(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Qt(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let h=o1(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),i.transform=h;const{x:p,y:g}=this.projectionDelta;i.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,l.animationValues?i.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in yr){if(u[y]===void 0)continue;const{correct:f,applyTo:v,isCSSVariable:w}=yr[y],b=h==="none"?u[y]:f(u[y],l);if(v){const S=v.length;for(let C=0;C<S;C++)i[v[C]]=b}else w?this.options.visualElement.renderState.vars[y]=b:i[y]=b}this.options.layoutId&&(i.pointerEvents=l===this?ss(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ol),this.root.sharedNodes.clear()}}}function c1(e){e.updateLayout()}function l1(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?Qe(h=>{const p=i?t.measuredBox[h]:t.layoutBox[h],g=ze(p);p.min=r[h].min,p.max=p.min+g}):vf(o,t.layoutBox,r)&&Qe(h=>{const p=i?t.measuredBox[h]:t.layoutBox[h],g=ze(r[h]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const a=Nn();dr(a,r,t.layoutBox);const c=Nn();i?dr(c,e.applyTransform(s,!0),t.measuredBox):dr(c,r,t.layoutBox);const l=!mf(a);let u=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:g}=h;if(p&&g){const y=Ae();ur(y,t.layoutBox,p.layoutBox);const f=Ae();ur(f,r,g.layoutBox),pf(y,f)||(u=!0),h.options.layoutRoot&&(e.relativeTarget=f,e.relativeTargetOrigin=y,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function d1(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function u1(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function f1(e){e.clearSnapshot()}function ol(e){e.clearMeasurements()}function il(e){e.isLayoutDirty=!1}function h1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function al(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function m1(e){e.resolveTargetDelta()}function p1(e){e.calcProjection()}function g1(e){e.resetSkewAndRotation()}function y1(e){e.removeLeadSnapshot()}function cl(e,t,n){e.translate=Se(t.translate,0,n),e.scale=Se(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ll(e,t,n,r){e.min=Se(t.min,n.min,r),e.max=Se(t.max,n.max,r)}function v1(e,t,n,r){ll(e.x,t.x,n.x,r),ll(e.y,t.y,n.y,r)}function x1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const b1={duration:.45,ease:[.4,0,.1,1]},dl=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ul=dl("applewebkit/")&&!dl("chrome/")?Math.round:nt;function fl(e){e.min=ul(e.min),e.max=ul(e.max)}function w1(e){fl(e.x),fl(e.y)}function vf(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ay(rl(t),rl(n),.2)}function S1(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const C1=yf({attachResizeListener:(e,t)=>vr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wo={current:void 0},xf=yf({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wo.current){const e=new C1({});e.mount(window),e.setOptions({layoutScroll:!0}),wo.current=e}return wo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),E1={pan:{Feature:Hy},drag:{Feature:By,ProjectionNode:xf,MeasureLayout:uf}};function hl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&be.postRender(()=>o(t,Mr(t)))}class k1 extends Wt{mount(){const{current:t}=this.node;t&&(this.unmount=Y0(t,(n,r)=>(hl(this.node,r,"Start"),s=>hl(this.node,s,"End"))))}unmount(){}}class T1 extends Wt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Tr(vr(this.node.current,"focus",()=>this.onFocus()),vr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ml(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&be.postRender(()=>o(t,Mr(t)))}class A1 extends Wt{mount(){const{current:t}=this.node;t&&(this.unmount=J0(t,(n,r)=>(ml(this.node,r,"Start"),(s,{success:o})=>ml(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pi=new WeakMap,So=new WeakMap,P1=e=>{const t=pi.get(e.target);t&&t(e)},M1=e=>{e.forEach(P1)};function N1({root:e,...t}){const n=e||document;So.has(n)||So.set(n,{});const r=So.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(M1,{root:e,...t})),r[s]}function j1(e,t,n){const r=N1(t);return pi.set(e,n),r.observe(e),()=>{pi.delete(e),r.unobserve(e)}}const R1={some:0,all:1};class V1 extends Wt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:R1[s]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),p=l?u:h;p&&p(c)};return j1(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(I1(t,n))&&this.startObserver()}unmount(){}}function I1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const D1={inView:{Feature:V1},tap:{Feature:A1},focus:{Feature:T1},hover:{Feature:k1}},O1={layout:{ProjectionNode:xf,MeasureLayout:uf}},$1={...wy,...D1,...E1,...O1},ae=$g($1,qg);function L1(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Array(12).fill(0);let gi=1;class _1{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...s}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:gi++,i=this.toasts.find(c=>c.id===o),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...t,id:o,title:r}),{...c,...t,id:o,dismissible:a,title:r}):c):this.addToast({title:r,...s,dismissible:a,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,i;const a=s.then(async l=>{if(i=["resolve",l],A.isValidElement(l))o=!1,this.create({id:r,type:"default",message:l});else if(B1(l)&&!l.ok){o=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${l.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${l.status}`):n.description,y=typeof h=="object"&&!A.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:p,...y})}else if(l instanceof Error){o=!1;const h=typeof n.error=="function"?await n.error(l):n.error,p=typeof n.description=="function"?await n.description(l):n.description,y=typeof h=="object"&&!A.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:p,...y})}else if(n.success!==void 0){o=!1;const h=typeof n.success=="function"?await n.success(l):n.success,p=typeof n.description=="function"?await n.description(l):n.description,y=typeof h=="object"&&!A.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:p,...y})}}).catch(async l=>{if(i=["reject",l],n.error!==void 0){o=!1;const u=typeof n.error=="function"?await n.error(l):n.error,h=typeof n.description=="function"?await n.description(l):n.description,g=typeof u=="object"&&!A.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...g})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((l,u)=>a.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||gi++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const et=new _1,F1=(e,t)=>{const n=(t==null?void 0:t.id)||gi++;return et.addToast({title:e,...t,id:n}),n},B1=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",H1=F1,z1=()=>et.toasts,U1=()=>et.getActiveToasts(),bf=Object.assign(H1,{success:et.success,info:et.info,warning:et.warning,error:et.error,custom:et.custom,message:et.message,promise:et.promise,dismiss:et.dismiss,loading:et.loading},{getHistory:z1,getToasts:U1});L1("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const dt=m.forwardRef((e,t)=>{const{alt:n,color:r="currentColor",size:s="1em",weight:o="regular",mirrored:i=!1,children:a,weights:c,...l}=e;return m.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:r,viewBox:"0 0 256 256",transform:i?"scale(-1, 1)":void 0,...l},!!n&&m.createElement("title",null,n),a,c.get(o))});dt.displayName="SSRBase";const W1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),m.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),Sa=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:W1}));Sa.displayName="CaretDownIcon";const Z1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),m.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),wf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:Z1}));wf.displayName="CaretUpIcon";const K1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,44H40A20,20,0,0,0,20,64V224A19.82,19.82,0,0,0,31.56,242.1a20.14,20.14,0,0,0,8.49,1.9,19.91,19.91,0,0,0,12.82-4.72l.12-.11L84.47,212H216a20,20,0,0,0,20-20V64A20,20,0,0,0,216,44Zm-4,144H80a11.93,11.93,0,0,0-7.84,2.92L44,215.23V68H212ZM84,108A12,12,0,0,1,96,96h64a12,12,0,1,1,0,24H96A12,12,0,0,1,84,108Zm0,40a12,12,0,0,1,12-12h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,148Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,64V192a8,8,0,0,1-8,8H80L45.15,230.11A8,8,0,0,1,32,224V64a8,8,0,0,1,8-8H216A8,8,0,0,1,224,64Z",opacity:"0.2"}),m.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.84,15.84,0,0,0,9.25,14.5A16.05,16.05,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM160,152H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,50H40A14,14,0,0,0,26,64V224a13.88,13.88,0,0,0,8.09,12.69A14.11,14.11,0,0,0,40,238a13.87,13.87,0,0,0,9-3.31l.06-.05L82.23,206H216a14,14,0,0,0,14-14V64A14,14,0,0,0,216,50Zm2,142a2,2,0,0,1-2,2H80a6,6,0,0,0-3.92,1.46L41.26,225.53A2,2,0,0,1,38,224V64a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Zm-52-80a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,112Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,144Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,52H40A12,12,0,0,0,28,64V224a11.89,11.89,0,0,0,6.93,10.88A12.17,12.17,0,0,0,40,236a11.89,11.89,0,0,0,7.69-2.83l0,0L81.49,204H216a12,12,0,0,0,12-12V64A12,12,0,0,0,216,52Zm4,140a4,4,0,0,1-4,4H80a4,4,0,0,0-2.62,1L42.56,227.06A4,4,0,0,1,36,224V64a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Zm-56-80a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,112Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,144Z"}))]]),Sf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:K1}));Sf.displayName="ChatTextIcon";const Y1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),m.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),Cf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:Y1}));Cf.displayName="CheckIcon";const G1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),m.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,6,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"}))]]),Ef=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:G1}));Ef.displayName="MicrophoneIcon";const q1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M56.88,39.93A12,12,0,1,0,39.12,56.07L76,96.64V128a52,52,0,0,0,72.11,48l11.26,12.39A67.34,67.34,0,0,1,128,196a68.07,68.07,0,0,1-68-68,12,12,0,0,0-24,0,92.14,92.14,0,0,0,80,91.22V240a12,12,0,0,0,24,0V219.23a90.39,90.39,0,0,0,35.92-12.68l23.2,25.52a12,12,0,0,0,17.76-16.14ZM128,156a28,28,0,0,1-28-28v-5l29.9,32.89C129.27,156,128.64,156,128,156Zm63-2.42A67.63,67.63,0,0,0,196,128a12,12,0,0,1,24,0,91.48,91.48,0,0,1-6.74,34.61,12,12,0,0,1-22.23-9ZM85.7,33.75A52,52,0,0,1,180,64v56.54a12,12,0,0,1-24,0V64a28,28,0,0,0-50.79-16.28,12,12,0,0,1-19.51-14Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),m.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M213.38,229.92a8,8,0,0,1-11.3-.54l-30.92-34A78.83,78.83,0,0,1,136,207.59V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64.07,64.07,0,0,0,64,64,63.41,63.41,0,0,0,32.21-8.68l-11.1-12.2A48,48,0,0,1,80,128V95.09L42.08,53.38A8,8,0,0,1,53.92,42.62l160,176A8,8,0,0,1,213.38,229.92Zm-24.19-63.13a7.88,7.88,0,0,0,3.51.82,8,8,0,0,0,7.19-4.49A79.16,79.16,0,0,0,208,128a8,8,0,0,0-16,0,63.32,63.32,0,0,1-6.48,28.09A8,8,0,0,0,189.19,166.79Zm-27.33-29.22A8,8,0,0,0,175.74,133a49.49,49.49,0,0,0,.26-5V64A48,48,0,0,0,84,44.87a8,8,0,0,0,1.41,8.57Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M212.44,220,52.44,44A6,6,0,0,0,43.56,52L82,94.32V128a46,46,0,0,0,67.56,40.64l13.75,15.12A65.26,65.26,0,0,1,128,194a66.08,66.08,0,0,1-66-66,6,6,0,0,0-12,0,78.09,78.09,0,0,0,72,77.75V240a6,6,0,0,0,12,0V205.77a76.93,76.93,0,0,0,37.48-13L203.56,228a6,6,0,0,0,8.88-8.08ZM128,162a34,34,0,0,1-34-34V107.52l47.12,51.84A33.82,33.82,0,0,1,128,162Zm59.32-5A65.38,65.38,0,0,0,194,128a6,6,0,0,1,12,0,77.33,77.33,0,0,1-7.9,34.25A6,6,0,1,1,187.32,157ZM85.8,45.67A46,46,0,0,1,174,64v64a45.17,45.17,0,0,1-.25,4.81,6,6,0,0,1-6,5.38q-.31,0-.63,0a6,6,0,0,1-5.34-6.59A35.41,35.41,0,0,0,162,128V64A34,34,0,0,0,96.8,50.45a6,6,0,0,1-11-4.78Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M211,221.31,51,45.31A4,4,0,0,0,45,50.69L84,93.55V128a44,44,0,0,0,66,38.12l16.38,18A67.21,67.21,0,0,1,128,196a68.07,68.07,0,0,1-68-68,4,4,0,0,0-8,0,76.09,76.09,0,0,0,72,75.89V240a4,4,0,0,0,8,0V203.89a75.1,75.1,0,0,0,39.79-13.77L205,226.69a4,4,0,1,0,5.92-5.38ZM128,164a36,36,0,0,1-36-36V102.35L144.43,160A35.83,35.83,0,0,1,128,164Zm61.12-6.15A67.44,67.44,0,0,0,196,128a4,4,0,0,1,8,0,75.28,75.28,0,0,1-7.7,33.37,4,4,0,0,1-7.18-3.52ZM87.63,46.46A44,44,0,0,1,172,64v64a44.2,44.2,0,0,1-.24,4.61,4,4,0,0,1-4,3.58l-.42,0a4,4,0,0,1-3.57-4.39A36.67,36.67,0,0,0,164,128V64A36,36,0,0,0,95,49.66a4,4,0,0,1-7.34-3.2Z"}))]]),kf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:q1}));kf.displayName="MicrophoneSlashIcon";const X1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,36H48A28,28,0,0,0,20,64V176a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V64A28,28,0,0,0,208,36Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40,52a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,228ZM160.49,103.51a12,12,0,0,1-17,17L140,117v35a12,12,0,0,1-24,0V117l-3.51,3.52a12,12,0,0,1-17-17l24-24a12,12,0,0,1,17,0Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,64V176a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208A16,16,0,0,1,224,64Z",opacity:"0.2"}),m.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M168,224a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64Zm-74.34,42.34-24-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,11.32,11.32L120,107.31V152a8,8,0,0,0,16,0V107.31l10.34,10.35a8,8,0,0,0,11.32-11.32Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Zm-9.76-116.24a6,6,0,1,1-8.48,8.48L134,102.49V152a6,6,0,0,1-12,0V102.49l-13.76,13.75a6,6,0,0,1-8.48-8.48l24-24a6,6,0,0,1,8.48,0Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Zm-9.17-114.83a4,4,0,0,1-5.66,5.66L132,97.66V152a4,4,0,0,1-8,0V97.66l-17.17,17.17a4,4,0,0,1-5.66-5.66l24-24a4,4,0,0,1,5.66,0Z"}))]]),Tf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:X1}));Tf.displayName="MonitorArrowUpIcon";const J1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),m.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),Ca=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:J1}));Ca.displayName="SpinnerIcon";const Q1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V167.57l24.94,18.14A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM188,180H36V76H188Zm44-27.57-20-14.54V118.11l20-14.54Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),m.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M192,72V184a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V72A16,16,0,0,1,32,56H176A16,16,0,0,1,192,72Zm58,.25a8.23,8.23,0,0,0-6.63,1.22L209.78,95.86A4,4,0,0,0,208,99.19v57.62a4,4,0,0,0,1.78,3.33l33.78,22.52a8,8,0,0,0,8.58.19,8.33,8.33,0,0,0,3.86-7.17V80A8,8,0,0,0,250,72.25Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V155.21L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM194,184a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2Zm48-19.21-36-24V115.21l36-24Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V151.47l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM196,184a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4Zm48-15.47-40-26.67V114.14l40-26.67Z"}))]]),Af=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:Q1}));Af.displayName="VideoCameraIcon";const ev=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H123.88a12,12,0,0,0,0,24H188v68a12,12,0,0,0,4.46,9.33c.15.13.31.25.48.38l44,32A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM232,152.43l-20-14.54V118.11l20-14.54ZM56.88,31.93A12,12,0,1,0,39.12,48.07L42.69,52H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H180.87l18.25,20.07a12,12,0,0,0,17.76-16.14ZM36,180V76H64.51l94.55,104Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),m.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M256,80.23v95.45a8.33,8.33,0,0,1-3.86,7.17,8,8,0,0,1-8.58-.19l-33.78-22.52a4,4,0,0,1-1.78-3.33V99.19a4,4,0,0,1,1.78-3.32l33.78-22.53a8,8,0,0,1,9.73.66A8.23,8.23,0,0,1,256,80.23ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM185,155.07a4,4,0,0,0,7-2.7V72a16,16,0,0,0-16-16H104a4,4,0,0,0-3,6.69Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H113.06a6,6,0,0,0,0,12H192a2,2,0,0,1,2,2v87.63a6,6,0,0,0,12,0v-4.42L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM242,164.79l-36-24V115.21l36-24ZM52.44,36A6,6,0,0,0,43.56,44L56.25,58H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H183.53l20,22a6,6,0,0,0,8.88-8.08ZM32,186a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H67.16L172.62,186Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H113.06a4,4,0,0,0,0,8H192a4,4,0,0,1,4,4v87.63a4,4,0,0,0,8,0v-8.16l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM244,168.53l-40-26.67V114.14l40-26.67ZM51,37.31A4,4,0,0,0,45,42.69L60.78,60H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H184.41L205,218.69a4,4,0,1,0,5.92-5.38ZM32,188a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H68.05L177.14,188Z"}))]]),Pf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:ev}));Pf.displayName="VideoCameraSlashIcon";const tv=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),m.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),nv=A.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Mf=m.forwardRef((e,t)=>{const{alt:n,color:r,size:s,weight:o,mirrored:i,children:a,weights:c,...l}=e,{color:u="currentColor",size:h,weight:p="regular",mirrored:g=!1,...y}=m.useContext(nv);return m.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:s??h,height:s??h,fill:r??u,viewBox:"0 0 256 256",transform:i||g?"scale(-1, 1)":void 0,...y,...l},!!n&&m.createElement("title",null,n),a,c.get(o??p))});Mf.displayName="IconBase";const Nf=m.forwardRef((e,t)=>m.createElement(Mf,{ref:t,...e,weights:tv}));Nf.displayName="WarningIcon";const Ea="-",rv=e=>{const t=ov(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Ea);return a[0]===""&&a.length!==1&&a.shift(),jf(a,t)||sv(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},jf=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?jf(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Ea);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},pl=/^\[(.+)\]$/,sv=e=>{if(pl.test(e)){const t=pl.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ov=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const s in n)yi(n[s],r,s,t);return r},yi=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:gl(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(iv(s)){yi(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{yi(i,gl(t,o),n,r)})})},gl=(e,t)=>{let n=e;return t.split(Ea).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},iv=e=>e.isThemeGetter,av=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},vi="!",xi=":",cv=xi.length,lv=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let i=0,a=0,c=0,l;for(let y=0;y<s.length;y++){let f=s[y];if(i===0&&a===0){if(f===xi){o.push(s.slice(c,y)),c=y+cv;continue}if(f==="/"){l=y;continue}}f==="["?i++:f==="]"?i--:f==="("?a++:f===")"&&a--}const u=o.length===0?s:s.substring(c),h=dv(u),p=h!==u,g=l&&l>c?l-c:void 0;return{modifiers:o,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const s=t+xi,o=r;r=i=>i.startsWith(s)?o(i.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},dv=e=>e.endsWith(vi)?e.substring(0,e.length-1):e.startsWith(vi)?e.substring(1):e,uv=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let o=[];return r.forEach(i=>{i[0]==="["||t[i]?(s.push(...o.sort(),i),o=[]):o.push(i)}),s.push(...o.sort()),s}},fv=e=>({cache:av(e.cacheSize),parseClassName:lv(e),sortModifiers:uv(e),...rv(e)}),hv=/\s+/,mv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,i=[],a=e.trim().split(hv);let c="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{isExternal:h,modifiers:p,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:f}=n(u);if(h){c=u+(c.length>0?" "+c:c);continue}let v=!!f,w=r(v?y.substring(0,f):y);if(!w){if(!v){c=u+(c.length>0?" "+c:c);continue}if(w=r(y),!w){c=u+(c.length>0?" "+c:c);continue}v=!1}const b=o(p).join(":"),S=g?b+vi:b,C=S+w;if(i.includes(C))continue;i.push(C);const E=s(w,v);for(let T=0;T<E.length;++T){const k=E[T];i.push(S+k)}c=u+(c.length>0?" "+c:c)}return c};function pv(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Rf(t))&&(r&&(r+=" "),r+=n);return r}const Rf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Rf(e[r]))&&(n&&(n+=" "),n+=t);return n};function gv(e,...t){let n,r,s,o=i;function i(c){const l=t.reduce((u,h)=>h(u),e());return n=fv(l),r=n.cache.get,s=n.cache.set,o=a,a(c)}function a(c){const l=r(c);if(l)return l;const u=mv(c,n);return s(c,u),u}return function(){return o(pv.apply(null,arguments))}}const Ie=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Vf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,If=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yv=/^\d+\/\d+$/,vv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mn=e=>yv.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),Ot=e=>!!e&&Number.isInteger(Number(e)),Co=e=>e.endsWith("%")&&oe(e.slice(0,-1)),kt=e=>vv.test(e),Cv=()=>!0,Ev=e=>xv.test(e)&&!bv.test(e),Df=()=>!1,kv=e=>wv.test(e),Tv=e=>Sv.test(e),Av=e=>!Q(e)&&!ee(e),Pv=e=>Kn(e,Lf,Df),Q=e=>Vf.test(e),Jt=e=>Kn(e,_f,Ev),Eo=e=>Kn(e,Vv,oe),yl=e=>Kn(e,Of,Df),Mv=e=>Kn(e,$f,Tv),Br=e=>Kn(e,Ff,kv),ee=e=>If.test(e),tr=e=>Yn(e,_f),Nv=e=>Yn(e,Iv),vl=e=>Yn(e,Of),jv=e=>Yn(e,Lf),Rv=e=>Yn(e,$f),Hr=e=>Yn(e,Ff,!0),Kn=(e,t,n)=>{const r=Vf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Yn=(e,t,n=!1)=>{const r=If.exec(e);return r?r[1]?t(r[1]):n:!1},Of=e=>e==="position"||e==="percentage",$f=e=>e==="image"||e==="url",Lf=e=>e==="length"||e==="size"||e==="bg-size",_f=e=>e==="length",Vv=e=>e==="number",Iv=e=>e==="family-name",Ff=e=>e==="shadow",Dv=()=>{const e=Ie("color"),t=Ie("font"),n=Ie("text"),r=Ie("font-weight"),s=Ie("tracking"),o=Ie("leading"),i=Ie("breakpoint"),a=Ie("container"),c=Ie("spacing"),l=Ie("radius"),u=Ie("shadow"),h=Ie("inset-shadow"),p=Ie("text-shadow"),g=Ie("drop-shadow"),y=Ie("blur"),f=Ie("perspective"),v=Ie("aspect"),w=Ie("ease"),b=Ie("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...C(),ee,Q],T=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],P=()=>[ee,Q,c],$=()=>[mn,"full","auto",...P()],x=()=>[Ot,"none","subgrid",ee,Q],I=()=>["auto",{span:["full",Ot,ee,Q]},Ot,ee,Q],_=()=>[Ot,"auto",ee,Q],K=()=>["auto","min","max","fr",ee,Q],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...P()],U=()=>[mn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],M=()=>[e,ee,Q],q=()=>[...C(),vl,yl,{position:[ee,Q]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",jv,Pv,{size:[ee,Q]}],Z=()=>[Co,tr,Jt],N=()=>["","none","full",l,ee,Q],B=()=>["",oe,tr,Jt],z=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>[oe,Co,vl,yl],F=()=>["","none",y,ee,Q],W=()=>["none",oe,ee,Q],L=()=>["none",oe,ee,Q],J=()=>[oe,ee,Q],O=()=>[mn,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[kt],breakpoint:[kt],color:[Cv],container:[kt],"drop-shadow":[kt],ease:["in","out","in-out"],font:[Av],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[kt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[kt],shadow:[kt],spacing:["px",oe],text:[kt],"text-shadow":[kt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mn,Q,ee,v]}],container:["container"],columns:[{columns:[oe,Q,ee,a]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Ot,"auto",ee,Q]}],basis:[{basis:[mn,"full","auto",a,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,mn,"auto","initial","none",Q]}],grow:[{grow:["",oe,ee,Q]}],shrink:[{shrink:["",oe,ee,Q]}],order:[{order:[Ot,"first","last","none",ee,Q]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[a,"screen",...U()]}],"min-w":[{"min-w":[a,"screen","none",...U()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,tr,Jt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ee,Eo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Co,Q]}],"font-family":[{font:[Nv,Q,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ee,Q]}],"line-clamp":[{"line-clamp":[oe,"none",ee,Eo]}],leading:[{leading:[o,...P()]}],"list-image":[{"list-image":["none",ee,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",ee,Jt]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[oe,"auto",ee,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ot,ee,Q],radial:["",ee,Q],conic:[Ot,ee,Q]},Rv,Mv]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[oe,ee,Q]}],"outline-w":[{outline:["",oe,tr,Jt]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",u,Hr,Br]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",h,Hr,Br]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[oe,Jt]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",p,Hr,Br]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[oe,ee,Q]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[ee,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Q]}],filter:[{filter:["","none",ee,Q]}],blur:[{blur:F()}],brightness:[{brightness:[oe,ee,Q]}],contrast:[{contrast:[oe,ee,Q]}],"drop-shadow":[{"drop-shadow":["","none",g,Hr,Br]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",oe,ee,Q]}],"hue-rotate":[{"hue-rotate":[oe,ee,Q]}],invert:[{invert:["",oe,ee,Q]}],saturate:[{saturate:[oe,ee,Q]}],sepia:[{sepia:["",oe,ee,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Q]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[oe,ee,Q]}],"backdrop-contrast":[{"backdrop-contrast":[oe,ee,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,ee,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,ee,Q]}],"backdrop-invert":[{"backdrop-invert":["",oe,ee,Q]}],"backdrop-opacity":[{"backdrop-opacity":[oe,ee,Q]}],"backdrop-saturate":[{"backdrop-saturate":[oe,ee,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,ee,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",ee,Q]}],ease:[{ease:["linear","initial",w,ee,Q]}],delay:[{delay:[oe,ee,Q]}],animate:[{animate:["none",b,ee,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,ee,Q]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:L()}],"scale-x":[{"scale-x":L()}],"scale-y":[{"scale-y":L()}],"scale-z":[{"scale-z":L()}],"scale-3d":["scale-3d"],skew:[{skew:J()}],"skew-x":[{"skew-x":J()}],"skew-y":[{"skew-y":J()}],transform:[{transform:[ee,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:O()}],"translate-x":[{"translate-x":O()}],"translate-y":[{"translate-y":O()}],"translate-z":[{"translate-z":O()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,Q]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[oe,tr,Jt,Eo]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ov=gv(Dv);function ne(...e){return Ov(Bi.clsx(e))}function $v(e,t){return{id:e.streamInfo.id,timestamp:e.streamInfo.timestamp,message:e.text,from:e.participantInfo.identity===t.localParticipant.identity?t.localParticipant:Array.from(t.remoteParticipants.values()).find(n=>n.identity===e.participantInfo.identity)}}const Lv=Ms.cva(["relative w-full rounded-lg border px-4 py-3 text-sm grid grid-cols-[0_1fr] gap-y-0.5 items-start","has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current"],{variants:{variant:{default:"bg-card text-card-foreground",destructive:["text-destructive-foreground bg-destructive border-destructive-border","[&>svg]:text-current *:data-[slot=alert-description]:text-destructive-foreground/90"]}},defaultVariants:{variant:"default"}});function _v({className:e,variant:t,...n}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:ne(Lv({variant:t}),e),...n})}function Fv({className:e,...t}){return d.jsx("div",{"data-slot":"alert-title",className:ne("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Bv({className:e,...t}){return d.jsx("div",{"data-slot":"alert-description",className:ne("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function zr(e){return bf.custom(t=>d.jsx(Hv,{id:t,title:e.title,description:e.description}),{duration:1e4})}function Hv(e){const{title:t,id:n,description:r}=e;return d.jsxs(_v,{onClick:()=>bf.dismiss(n),className:"bg-gradient-to-br from-[#181825] to-[#232336] border border-[#232336] shadow-lg shadow-black/40 rounded-xl px-4 py-3 flex items-start gap-3 hover:shadow-xl transition-all duration-200",style:{color:"#F3F4F6"},children:[d.jsx(Nf,{weight:"bold",className:"text-yellow-400 mt-1 flex-shrink-0",size:24}),d.jsxs("div",{className:"flex flex-col",children:[d.jsx(Fv,{className:"text-base font-semibold text-white mb-1",children:t}),d.jsx(Bv,{className:"text-sm text-gray-300 leading-snug",children:r})]})]})}function xl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Bf(...e){return t=>{let n=!1;const r=e.map(s=>{const o=xl(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():xl(e[s],null)}}}}function Le(...e){return m.useCallback(Bf(...e),e)}function xr(e){const t=Uv(e),n=m.forwardRef((r,s)=>{const{children:o,...i}=r,a=m.Children.toArray(o),c=a.find(Zv);if(c){const l=c.props.children,u=a.map(h=>h===c?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...i,ref:s,children:m.isValidElement(l)?m.cloneElement(l,void 0,u):null})}return d.jsx(t,{...i,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var zv=xr("Slot");function Uv(e){const t=m.forwardRef((n,r)=>{const{children:s,...o}=n;if(m.isValidElement(s)){const i=Yv(s),a=Kv(o,s.props);return s.type!==m.Fragment&&(a.ref=r?Bf(r,i):i),m.cloneElement(s,a)}return m.Children.count(s)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wv=Symbol("radix.slottable");function Zv(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wv}function Kv(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const c=o(...a);return s(...a),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function Yv(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Gv=Ms.cva(["text-xs font-bold tracking-wider uppercase whitespace-nowrap","inline-flex items-center justify-center gap-2 shrink-0 rounded-full cursor-pointer outline-none transition-colors duration-300","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50","aria-invalid:ring-destructive/20 aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40 ","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button text-button-foreground hover:bg-muted focus:bg-muted",destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive-hover focus:bg-destructive-hover focus-visible:ring-destructive-foreground/20","dark:focus-visible:ring-destructive-foreground/40"],outline:["border bg-background","hover:bg-accent hover:text-accent-foreground","dark:bg-input/30 dark:border-input dark:hover:bg-input/50"],primary:"",secondary:"bg-secondary text-secondary-foregroun hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function qv({className:e,variant:t,size:n,asChild:r=!1,...s}){const o=r?zv:"button";return d.jsx(o,{"data-slot":"button",className:ne(Gv({variant:t,size:n,className:e})),...s})}function Xv({onSend:e,className:t,disabled:n,...r}){const s=A.useRef(null),[o,i]=A.useState(""),a=l=>{var u,h;l.preventDefault(),(u=r.onSubmit)==null||u.call(r,l),e==null||e(o),i(""),(h=s.current)==null||h.focus({preventScroll:!0})},c=n||o.trim().length===0;return d.jsxs("form",{...r,onSubmit:a,className:ne("flex items-center rounded-md pl-1 text-sm",t),children:[d.jsx("input",{ref:s,type:"text",className:"flex-1 focus:outline-none",placeholder:"Type something...",value:o,onChange:l=>i(l.target.value),disabled:n}),d.jsx(qv,{size:"sm",type:"submit",variant:c?"secondary":"primary",disabled:c,className:"font-mono",children:"SEND"})]})}function Pe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}var We=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},Jv=m[" useInsertionEffect ".trim().toString()]||We;function bi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,i]=Qv({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:s;{const u=m.useRef(e!==void 0);m.useEffect(()=>{const h=u.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"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.`),u.current=a},[a,r])}const l=m.useCallback(u=>{var h;if(a){const p=ex(u)?u(e):u;p!==e&&((h=i.current)==null||h.call(i,p))}else o(u)},[a,e,o,i]);return[c,l]}function Qv({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),s=m.useRef(n),o=m.useRef(t);return Jv(()=>{o.current=t},[t]),m.useEffect(()=>{var i;s.current!==n&&((i=o.current)==null||i.call(o,n),s.current=n)},[n,s]),[n,r,o]}function ex(e){return typeof e=="function"}var tx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Te=tx.reduce((e,t)=>{const n=xr(`Primitive.${t}`),r=m.forwardRef((s,o)=>{const{asChild:i,...a}=s,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function nx(e,t){e&&Ns.flushSync(()=>e.dispatchEvent(t))}var Hf="Toggle",zf=m.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:s,...o}=e,[i,a]=bi({prop:n,onChange:s,defaultProp:r??!1,caller:Hf});return d.jsx(Te.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:Pe(e.onClick,()=>{e.disabled||a(!i)})})});zf.displayName=Hf;var rx=zf;const sx=Ms.cva(["inline-flex items-center justify-center gap-2 rounded-full","text-sm font-medium whitespace-nowrap","cursor-pointer outline-none transition-[color,border,background-color]","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0 aria-invalid:border-0","disabled:pointer-events-none disabled:opacity-50 disabled:not-allowed","data-[state=on]:bg-button-selected data-[state=on]:border-button-border-selected","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button hover:bg-muted focus:bg-muted hover:text-muted-foreground focus:text-muted-foreground",primary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=off]:bg-button-primary hover:data-[state=off]:bg-button-hover data-[state=off]:text-button-primary-foreground",secondary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=on]:bg-button-secondary hover:data-[state=on]:bg-button-secondary data-[state=on]:text-button-secondary-foreground",outline:["border border-button-border bg-button text-button-foreground","hover:bg-background focus:bg-background"]},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Uf({className:e,variant:t,size:n,...r}){return d.jsx(rx,{"data-slot":"toggle",className:ne(sx({variant:t,size:n,className:e})),...r})}function ox(e){const[t,n]=A.useState(()=>e.getPublishPermissions());return A.useEffect(()=>{const r=()=>{n(e.getPublishPermissions())},s=()=>{r()};return e.on("connection.connected",s),e.on("connection.disconnected",s),()=>{e.off("connection.connected",s),e.off("connection.disconnected",s)}},[e]),t}function ix(e){const[t,n]=A.useState(()=>e.getLocalParticipant()),[r,s]=A.useState(()=>e.getMicrophoneTrack());return A.useEffect(()=>{const o=()=>{const a=e.getLocalParticipant(),c=e.getMicrophoneTrack();console.log("🎤 useVoxketLocalParticipant: Updating state:",{hasParticipant:!!a,hasMicTrack:!!c,isMicEnabled:e.isMicrophoneEnabled,trackPublications:a?a.trackPublications.size:0}),n(a),s(c)};o(),e.on("connection.connected",o),e.on("connection.disconnected",o),e.on("track.muted",o),e.on("track.unmuted",o);const i=e.getRoom();if(i){const a=()=>{console.log("🎤 Track published, updating participant state"),o()},c=()=>{console.log("🎤 Track unpublished, updating participant state"),o()};return i.on("localTrackPublished",a),i.on("localTrackUnpublished",c),()=>{e.off("connection.connected",o),e.off("connection.disconnected",o),e.off("track.muted",o),e.off("track.unmuted",o),i.off("localTrackPublished",a),i.off("localTrackUnpublished",c)}}else return()=>{e.off("connection.connected",o),e.off("connection.disconnected",o),e.off("track.muted",o),e.off("track.unmuted",o)}},[e]),{localParticipant:t,microphoneTrack:r}}function ko(e,t,n){const[r,s]=A.useState(!1),[o,i]=A.useState(!1);return A.useEffect(()=>{const c=()=>{let l=!1;switch(t){case"microphone":l=e.isMicrophoneEnabled;break;case"camera":l=e.isCameraEnabled;break;case"screenShare":l=e.isScreenShareEnabled;break}console.log(`useVoxketTrackToggle: ${t} enabled state updated to:`,l),s(l)};return c(),e.on("track.muted",c),e.on("track.unmuted",c),e.on("connection.connected",c),()=>{e.off("track.muted",c),e.off("track.unmuted",c),e.off("connection.connected",c)}},[e,t]),{enabled:r,pending:o,toggle:async c=>{var l;try{i(!0);const u=c!==void 0?c:!r;switch(t){case"microphone":await e.toggleMicrophone(u);break;case"camera":await e.toggleCamera(u);break;case"screenShare":u?await e.startScreenShare():await e.stopScreenShare();break}}catch(u){(l=n==null?void 0:n.onDeviceError)==null||l.call(n,u)}finally{i(!1)}}}}function ax(e){const[t,n]=A.useState(()=>e.getRoom()),[r,s]=A.useState(()=>e.getConnectionState());return A.useEffect(()=>{const o=()=>{n(e.getRoom()),s(e.getConnectionState())};return e.on("connection.connected",o),e.on("connection.disconnected",o),e.on("connection.connecting",o),()=>{e.off("connection.connected",o),e.off("connection.disconnected",o),e.off("connection.connecting",o)}},[e]),t}function cx(e,t){const[n,r]=A.useState([]),[s,o]=A.useState("");return A.useEffect(()=>{var l;const a=async()=>{try{const u=t==="audioinput"?await e.getAudioInputDevices():await e.getVideoInputDevices();r(u)}catch(u){console.error("Failed to load devices:",u)}};a();const c=()=>{a()};return(l=navigator.mediaDevices)==null||l.addEventListener("devicechange",c),()=>{var u;(u=navigator.mediaDevices)==null||u.removeEventListener("devicechange",c)}},[e,t]),{devices:n,activeDeviceId:s,setActiveMediaDevice:async a=>{try{t==="audioinput"?await e.setAudioInputDevice(a):await e.setVideoInputDevice(a),o(a)}catch(c){console.error("Failed to set device:",c)}}}}function lx(e){const{preventSave:t=!1}=e||{};return{saveAudioInputEnabled:i=>{t||localStorage.setItem("voxket-audio-input-enabled",i.toString())},saveAudioInputDeviceId:i=>{t||localStorage.setItem("voxket-audio-input-device-id",i)},saveVideoInputEnabled:i=>{t||localStorage.setItem("voxket-video-input-enabled",i.toString())},saveVideoInputDeviceId:i=>{t||localStorage.setItem("voxket-video-input-device-id",i)}}}function bl(e,[t,n]){return Math.min(n,Math.max(t,e))}function ka(e,t=[]){let n=[];function r(o,i){const a=m.createContext(i),c=n.length;n=[...n,i];const l=h=>{var w;const{scope:p,children:g,...y}=h,f=((w=p==null?void 0:p[e])==null?void 0:w[c])||a,v=m.useMemo(()=>y,Object.values(y));return d.jsx(f.Provider,{value:v,children:g})};l.displayName=o+"Provider";function u(h,p){var f;const g=((f=p==null?void 0:p[e])==null?void 0:f[c])||a,y=m.useContext(g);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[l,u]}const s=()=>{const o=n.map(i=>m.createContext(i));return function(a){const c=(a==null?void 0:a[e])||o;return m.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[r,dx(s,...t)]}function dx(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const h=c(o)[`__scope${l}`];return{...a,...h}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function ux(e){const t=e+"CollectionProvider",[n,r]=ka(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=f=>{const{scope:v,children:w}=f,b=A.useRef(null),S=A.useRef(new Map).current;return d.jsx(s,{scope:v,itemMap:S,collectionRef:b,children:w})};i.displayName=t;const a=e+"CollectionSlot",c=xr(a),l=A.forwardRef((f,v)=>{const{scope:w,children:b}=f,S=o(a,w),C=Le(v,S.collectionRef);return d.jsx(c,{ref:C,children:b})});l.displayName=a;const u=e+"CollectionItemSlot",h="data-radix-collection-item",p=xr(u),g=A.forwardRef((f,v)=>{const{scope:w,children:b,...S}=f,C=A.useRef(null),E=Le(v,C),T=o(u,w);return A.useEffect(()=>(T.itemMap.set(C,{ref:C,...S}),()=>void T.itemMap.delete(C))),d.jsx(p,{[h]:"",ref:E,children:b})});g.displayName=u;function y(f){const v=o(e+"CollectionConsumer",f);return A.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const S=Array.from(b.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((T,k)=>S.indexOf(T.ref.current)-S.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:l,ItemSlot:g},y,r]}var fx=m.createContext(void 0);function hx(e){const t=m.useContext(fx);return e||t||"ltr"}function cn(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function mx(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e);m.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var px="DismissableLayer",wi="dismissableLayer.update",gx="dismissableLayer.pointerDownOutside",yx="dismissableLayer.focusOutside",wl,Wf=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zf=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...c}=e,l=m.useContext(Wf),[u,h]=m.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=m.useState({}),y=Le(t,k=>h(k)),f=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=f.indexOf(v),b=u?f.indexOf(u):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,C=b>=w,E=bx(k=>{const P=k.target,$=[...l.branches].some(x=>x.contains(P));!C||$||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},p),T=wx(k=>{const P=k.target;[...l.branches].some(x=>x.contains(P))||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},p);return mx(k=>{b===l.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},p),m.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(wl=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Sl(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=wl)}},[u,p,n,l]),m.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Sl())},[u,l]),m.useEffect(()=>{const k=()=>g({});return document.addEventListener(wi,k),()=>document.removeEventListener(wi,k)},[]),d.jsx(Te.div,{...c,ref:y,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:Pe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Pe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Pe(e.onPointerDownCapture,E.onPointerDownCapture)})});Zf.displayName=px;var vx="DismissableLayerBranch",xx=m.forwardRef((e,t)=>{const n=m.useContext(Wf),r=m.useRef(null),s=Le(t,r);return m.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),d.jsx(Te.div,{...e,ref:s})});xx.displayName=vx;function bx(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let c=function(){Kf(gx,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function wx(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=m.useRef(!1);return m.useEffect(()=>{const s=o=>{o.target&&!r.current&&Kf(yx,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Sl(){const e=new CustomEvent(wi);document.dispatchEvent(e)}function Kf(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?nx(s,o):s.dispatchEvent(o)}var To=0;function Sx(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cl()),document.body.insertAdjacentElement("beforeend",e[1]??Cl()),To++,()=>{To===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),To--}},[])}function Cl(){const 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 Ao="focusScope.autoFocusOnMount",Po="focusScope.autoFocusOnUnmount",El={bubbles:!1,cancelable:!0},Cx="FocusScope",Yf=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,c]=m.useState(null),l=cn(s),u=cn(o),h=m.useRef(null),p=Le(t,f=>c(f)),g=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let f=function(S){if(g.paused||!a)return;const C=S.target;a.contains(C)?h.current=C:Lt(h.current,{select:!0})},v=function(S){if(g.paused||!a)return;const C=S.relatedTarget;C!==null&&(a.contains(C)||Lt(h.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Lt(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const b=new MutationObserver(w);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),b.disconnect()}}},[r,a,g.paused]),m.useEffect(()=>{if(a){Tl.add(g);const f=document.activeElement;if(!a.contains(f)){const w=new CustomEvent(Ao,El);a.addEventListener(Ao,l),a.dispatchEvent(w),w.defaultPrevented||(Ex(Mx(Gf(a)),{select:!0}),document.activeElement===f&&Lt(a))}return()=>{a.removeEventListener(Ao,l),setTimeout(()=>{const w=new CustomEvent(Po,El);a.addEventListener(Po,u),a.dispatchEvent(w),w.defaultPrevented||Lt(f??document.body,{select:!0}),a.removeEventListener(Po,u),Tl.remove(g)},0)}}},[a,l,u,g]);const y=m.useCallback(f=>{if(!n&&!r||g.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,w=document.activeElement;if(v&&w){const b=f.currentTarget,[S,C]=kx(b);S&&C?!f.shiftKey&&w===C?(f.preventDefault(),n&&Lt(S,{select:!0})):f.shiftKey&&w===S&&(f.preventDefault(),n&&Lt(C,{select:!0})):w===b&&f.preventDefault()}},[n,r,g.paused]);return d.jsx(Te.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Yf.displayName=Cx;function Ex(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lt(r,{select:t}),document.activeElement!==n)return}function kx(e){const t=Gf(e),n=kl(t,e),r=kl(t.reverse(),e);return[n,r]}function Gf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function kl(e,t){for(const n of e)if(!Tx(n,{upTo:t}))return n}function Tx(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 Ax(e){return e instanceof HTMLInputElement&&"select"in e}function Lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ax(e)&&t&&e.select()}}var Tl=Px();function Px(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Al(e,t),e.unshift(t)},remove(t){var n;e=Al(e,t),(n=e[0])==null||n.resume()}}}function Al(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Mx(e){return e.filter(t=>t.tagName!=="A")}var Nx=m[" useId ".trim().toString()]||(()=>{}),jx=0;function Ta(e){const[t,n]=m.useState(Nx());return We(()=>{n(r=>r??String(jx++))},[e]),e||(t?`radix-${t}`:"")}const Rx=["top","right","bottom","left"],Bt=Math.min,Ke=Math.max,bs=Math.round,Ur=Math.floor,bt=e=>({x:e,y:e}),Vx={left:"right",right:"left",bottom:"top",top:"bottom"},Ix={start:"end",end:"start"};function Si(e,t,n){return Ke(e,Bt(t,n))}function Rt(e,t){return typeof e=="function"?e(t):e}function Vt(e){return e.split("-")[0]}function Gn(e){return e.split("-")[1]}function Aa(e){return e==="x"?"y":"x"}function Pa(e){return e==="y"?"height":"width"}const Dx=new Set(["top","bottom"]);function yt(e){return Dx.has(Vt(e))?"y":"x"}function Ma(e){return Aa(yt(e))}function Ox(e,t,n){n===void 0&&(n=!1);const r=Gn(e),s=Ma(e),o=Pa(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ws(i)),[i,ws(i)]}function $x(e){const t=ws(e);return[Ci(e),t,Ci(t)]}function Ci(e){return e.replace(/start|end/g,t=>Ix[t])}const Pl=["left","right"],Ml=["right","left"],Lx=["top","bottom"],_x=["bottom","top"];function Fx(e,t,n){switch(e){case"top":case"bottom":return n?t?Ml:Pl:t?Pl:Ml;case"left":case"right":return t?Lx:_x;default:return[]}}function Bx(e,t,n,r){const s=Gn(e);let o=Fx(Vt(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Ci)))),o}function ws(e){return e.replace(/left|right|bottom|top/g,t=>Vx[t])}function Hx(e){return{top:0,right:0,bottom:0,left:0,...e}}function qf(e){return typeof e!="number"?Hx(e):{top:e,right:e,bottom:e,left:e}}function Ss(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Nl(e,t,n){let{reference:r,floating:s}=e;const o=yt(t),i=Ma(t),a=Pa(i),c=Vt(t),l=o==="y",u=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let g;switch(c){case"top":g={x:u,y:r.y-s.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-s.width,y:h};break;default:g={x:r.x,y:r.y}}switch(Gn(t)){case"start":g[i]-=p*(n&&l?-1:1);break;case"end":g[i]+=p*(n&&l?-1:1);break}return g}const zx=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:h}=Nl(l,r,c),p=r,g={},y=0;for(let f=0;f<a.length;f++){const{name:v,fn:w}=a[f],{x:b,y:S,data:C,reset:E}=await w({x:u,y:h,initialPlacement:r,placement:p,strategy:s,middlewareData:g,rects:l,platform:i,elements:{reference:e,floating:t}});u=b??u,h=S??h,g={...g,[v]:{...g[v],...C}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(l=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:u,y:h}=Nl(l,p,c)),f=-1)}return{x:u,y:h,placement:p,strategy:s,middlewareData:g}};async function br(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=Rt(t,e),y=qf(g),v=a[p?h==="floating"?"reference":"floating":h],w=Ss(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),b=h==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},E=Ss(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:S,strategy:c}):b);return{top:(w.top-E.top+y.top)/C.y,bottom:(E.bottom-w.bottom+y.bottom)/C.y,left:(w.left-E.left+y.left)/C.x,right:(E.right-w.right+y.right)/C.x}}const Ux=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=Rt(e,t)||{};if(l==null)return{};const h=qf(u),p={x:n,y:r},g=Ma(s),y=Pa(g),f=await i.getDimensions(l),v=g==="y",w=v?"top":"left",b=v?"bottom":"right",S=v?"clientHeight":"clientWidth",C=o.reference[y]+o.reference[g]-p[g]-o.floating[y],E=p[g]-o.reference[g],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let k=T?T[S]:0;(!k||!await(i.isElement==null?void 0:i.isElement(T)))&&(k=a.floating[S]||o.floating[y]);const P=C/2-E/2,$=k/2-f[y]/2-1,x=Bt(h[w],$),I=Bt(h[b],$),_=x,K=k-f[y]-I,Y=k/2-f[y]/2+P,X=Si(_,Y,K),G=!c.arrow&&Gn(s)!=null&&Y!==X&&o.reference[y]/2-(Y<_?x:I)-f[y]/2<0,U=G?Y<_?Y-_:Y-K:0;return{[g]:p[g]+U,data:{[g]:X,centerOffset:Y-X-U,...G&&{alignmentOffset:U}},reset:G}}}),Wx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:f=!0,...v}=Rt(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Vt(s),b=yt(a),S=Vt(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),E=p||(S||!f?[ws(a)]:$x(a)),T=y!=="none";!p&&T&&E.push(...Bx(a,f,y,C));const k=[a,...E],P=await br(t,v),$=[];let x=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&$.push(P[w]),h){const Y=Ox(s,i,C);$.push(P[Y[0]],P[Y[1]])}if(x=[...x,{placement:s,overflows:$}],!$.every(Y=>Y<=0)){var I,_;const Y=(((I=o.flip)==null?void 0:I.index)||0)+1,X=k[Y];if(X&&(!(h==="alignment"?b!==yt(X):!1)||x.every(M=>M.overflows[0]>0&&yt(M.placement)===b)))return{data:{index:Y,overflows:x},reset:{placement:X}};let G=(_=x.filter(U=>U.overflows[0]<=0).sort((U,M)=>U.overflows[1]-M.overflows[1])[0])==null?void 0:_.placement;if(!G)switch(g){case"bestFit":{var K;const U=(K=x.filter(M=>{if(T){const q=yt(M.placement);return q===b||q==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(q=>q>0).reduce((q,j)=>q+j,0)]).sort((M,q)=>M[1]-q[1])[0])==null?void 0:K[0];U&&(G=U);break}case"initialPlacement":G=a;break}if(s!==G)return{reset:{placement:G}}}return{}}}};function jl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Rl(e){return Rx.some(t=>e[t]>=0)}const Zx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Rt(e,t);switch(r){case"referenceHidden":{const o=await br(t,{...s,elementContext:"reference"}),i=jl(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Rl(i)}}}case"escaped":{const o=await br(t,{...s,altBoundary:!0}),i=jl(o,n.floating);return{data:{escapedOffsets:i,escaped:Rl(i)}}}default:return{}}}}},Xf=new Set(["left","top"]);async function Kx(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Vt(n),a=Gn(n),c=yt(n)==="y",l=Xf.has(i)?-1:1,u=o&&c?-1:1,h=Rt(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof y=="number"&&(g=a==="end"?y*-1:y),c?{x:g*u,y:p*l}:{x:p*l,y:g*u}}const Yx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,c=await Kx(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},Gx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:v=>{let{x:w,y:b}=v;return{x:w,y:b}}},...c}=Rt(e,t),l={x:n,y:r},u=await br(t,c),h=yt(Vt(s)),p=Aa(h);let g=l[p],y=l[h];if(o){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",b=g+u[v],S=g-u[w];g=Si(b,g,S)}if(i){const v=h==="y"?"top":"left",w=h==="y"?"bottom":"right",b=y+u[v],S=y-u[w];y=Si(b,y,S)}const f=a.fn({...t,[p]:g,[h]:y});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[p]:o,[h]:i}}}}}},qx=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Rt(e,t),u={x:n,y:r},h=yt(s),p=Aa(h);let g=u[p],y=u[h];const f=Rt(a,t),v=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const S=p==="y"?"height":"width",C=o.reference[p]-o.floating[S]+v.mainAxis,E=o.reference[p]+o.reference[S]-v.mainAxis;g<C?g=C:g>E&&(g=E)}if(l){var w,b;const S=p==="y"?"width":"height",C=Xf.has(Vt(s)),E=o.reference[h]-o.floating[S]+(C&&((w=i.offset)==null?void 0:w[h])||0)+(C?0:v.crossAxis),T=o.reference[h]+o.reference[S]+(C?0:((b=i.offset)==null?void 0:b[h])||0)-(C?v.crossAxis:0);y<E?y=E:y>T&&(y=T)}return{[p]:g,[h]:y}}}},Xx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:c=()=>{},...l}=Rt(e,t),u=await br(t,l),h=Vt(s),p=Gn(s),g=yt(s)==="y",{width:y,height:f}=o.floating;let v,w;h==="top"||h==="bottom"?(v=h,w=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(w=h,v=p==="end"?"top":"bottom");const b=f-u.top-u.bottom,S=y-u.left-u.right,C=Bt(f-u[v],b),E=Bt(y-u[w],S),T=!t.middlewareData.shift;let k=C,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=b),T&&!p){const x=Ke(u.left,0),I=Ke(u.right,0),_=Ke(u.top,0),K=Ke(u.bottom,0);g?P=y-2*(x!==0||I!==0?x+I:Ke(u.left,u.right)):k=f-2*(_!==0||K!==0?_+K:Ke(u.top,u.bottom))}await c({...t,availableWidth:P,availableHeight:k});const $=await i.getDimensions(a.floating);return y!==$.width||f!==$.height?{reset:{rects:!0}}:{}}}};function Ds(){return typeof window<"u"}function qn(e){return Jf(e)?(e.nodeName||"").toLowerCase():"#document"}function Ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ct(e){var t;return(t=(Jf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jf(e){return Ds()?e instanceof Node||e instanceof Ge(e).Node:!1}function ct(e){return Ds()?e instanceof Element||e instanceof Ge(e).Element:!1}function St(e){return Ds()?e instanceof HTMLElement||e instanceof Ge(e).HTMLElement:!1}function Vl(e){return!Ds()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ge(e).ShadowRoot}const Jx=new Set(["inline","contents"]);function Nr(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=lt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jx.has(s)}const Qx=new Set(["table","td","th"]);function eb(e){return Qx.has(qn(e))}const tb=[":popover-open",":modal"];function Os(e){return tb.some(t=>{try{return e.matches(t)}catch{return!1}})}const nb=["transform","translate","scale","rotate","perspective"],rb=["transform","translate","scale","rotate","perspective","filter"],sb=["paint","layout","strict","content"];function Na(e){const t=ja(),n=ct(e)?lt(e):e;return nb.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||rb.some(r=>(n.willChange||"").includes(r))||sb.some(r=>(n.contain||"").includes(r))}function ob(e){let t=Ht(e);for(;St(t)&&!_n(t);){if(Na(t))return t;if(Os(t))return null;t=Ht(t)}return null}function ja(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ib=new Set(["html","body","#document"]);function _n(e){return ib.has(qn(e))}function lt(e){return Ge(e).getComputedStyle(e)}function $s(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ht(e){if(qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vl(e)&&e.host||Ct(e);return Vl(t)?t.host:t}function Qf(e){const t=Ht(e);return _n(t)?e.ownerDocument?e.ownerDocument.body:e.body:St(t)&&Nr(t)?t:Qf(t)}function wr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Qf(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Ge(s);if(o){const a=Ei(i);return t.concat(i,i.visualViewport||[],Nr(s)?s:[],a&&n?wr(a):[])}return t.concat(s,wr(s,[],n))}function Ei(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eh(e){const t=lt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=St(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=bs(n)!==o||bs(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function Ra(e){return ct(e)?e:e.contextElement}function Vn(e){const t=Ra(e);if(!St(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=eh(t);let i=(o?bs(n.width):n.width)/r,a=(o?bs(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ab=bt(0);function th(e){const t=Ge(e);return!ja()||!t.visualViewport?ab:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ge(e)?!1:t}function ln(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=Ra(e);let i=bt(1);t&&(r?ct(r)&&(i=Vn(r)):i=Vn(e));const a=cb(o,n,r)?th(o):bt(0);let c=(s.left+a.x)/i.x,l=(s.top+a.y)/i.y,u=s.width/i.x,h=s.height/i.y;if(o){const p=Ge(o),g=r&&ct(r)?Ge(r):r;let y=p,f=Ei(y);for(;f&&r&&g!==y;){const v=Vn(f),w=f.getBoundingClientRect(),b=lt(f),S=w.left+(f.clientLeft+parseFloat(b.paddingLeft))*v.x,C=w.top+(f.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,h*=v.y,c+=S,l+=C,y=Ge(f),f=Ei(y)}}return Ss({width:u,height:h,x:c,y:l})}function Va(e,t){const n=$s(e).scrollLeft;return t?t.left+n:ln(Ct(e)).left+n}function nh(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Va(e,r)),o=r.top+t.scrollTop;return{x:s,y:o}}function lb(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=Ct(r),a=t?Os(t.floating):!1;if(r===i||a&&o)return n;let c={scrollLeft:0,scrollTop:0},l=bt(1);const u=bt(0),h=St(r);if((h||!h&&!o)&&((qn(r)!=="body"||Nr(i))&&(c=$s(r)),St(r))){const g=ln(r);l=Vn(r),u.x=g.x+r.clientLeft,u.y=g.y+r.clientTop}const p=i&&!h&&!o?nh(i,c,!0):bt(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+p.x,y:n.y*l.y-c.scrollTop*l.y+u.y+p.y}}function db(e){return Array.from(e.getClientRects())}function ub(e){const t=Ct(e),n=$s(e),r=e.ownerDocument.body,s=Ke(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ke(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Va(e);const a=-n.scrollTop;return lt(r).direction==="rtl"&&(i+=Ke(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function fb(e,t){const n=Ge(e),r=Ct(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,c=0;if(s){o=s.width,i=s.height;const l=ja();(!l||l&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:a,y:c}}const hb=new Set(["absolute","fixed"]);function mb(e,t){const n=ln(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=St(e)?Vn(e):bt(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,c=s*o.x,l=r*o.y;return{width:i,height:a,x:c,y:l}}function Il(e,t,n){let r;if(t==="viewport")r=fb(e,n);else if(t==="document")r=ub(Ct(e));else if(ct(t))r=mb(t,n);else{const s=th(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Ss(r)}function rh(e,t){const n=Ht(e);return n===t||!ct(n)||_n(n)?!1:lt(n).position==="fixed"||rh(n,t)}function pb(e,t){const n=t.get(e);if(n)return n;let r=wr(e,[],!1).filter(a=>ct(a)&&qn(a)!=="body"),s=null;const o=lt(e).position==="fixed";let i=o?Ht(e):e;for(;ct(i)&&!_n(i);){const a=lt(i),c=Na(i);!c&&a.position==="fixed"&&(s=null),(o?!c&&!s:!c&&a.position==="static"&&!!s&&hb.has(s.position)||Nr(i)&&!c&&rh(e,i))?r=r.filter(u=>u!==i):s=a,i=Ht(i)}return t.set(e,r),r}function gb(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?Os(t)?[]:pb(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,u)=>{const h=Il(t,u,s);return l.top=Ke(h.top,l.top),l.right=Bt(h.right,l.right),l.bottom=Bt(h.bottom,l.bottom),l.left=Ke(h.left,l.left),l},Il(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yb(e){const{width:t,height:n}=eh(e);return{width:t,height:n}}function vb(e,t,n){const r=St(t),s=Ct(t),o=n==="fixed",i=ln(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=bt(0);function l(){c.x=Va(s)}if(r||!r&&!o)if((qn(t)!=="body"||Nr(s))&&(a=$s(t)),r){const g=ln(t,!0,o,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else s&&l();o&&!r&&s&&l();const u=s&&!r&&!o?nh(s,a):bt(0),h=i.left+a.scrollLeft-c.x-u.x,p=i.top+a.scrollTop-c.y-u.y;return{x:h,y:p,width:i.width,height:i.height}}function Mo(e){return lt(e).position==="static"}function Dl(e,t){if(!St(e)||lt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ct(e)===n&&(n=n.ownerDocument.body),n}function sh(e,t){const n=Ge(e);if(Os(e))return n;if(!St(e)){let s=Ht(e);for(;s&&!_n(s);){if(ct(s)&&!Mo(s))return s;s=Ht(s)}return n}let r=Dl(e,t);for(;r&&eb(r)&&Mo(r);)r=Dl(r,t);return r&&_n(r)&&Mo(r)&&!Na(r)?n:r||ob(e)||n}const xb=async function(e){const t=this.getOffsetParent||sh,n=this.getDimensions,r=await n(e.floating);return{reference:vb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bb(e){return lt(e).direction==="rtl"}const wb={convertOffsetParentRelativeRectToViewportRelativeRect:lb,getDocumentElement:Ct,getClippingRect:gb,getOffsetParent:sh,getElementRects:xb,getClientRects:db,getDimensions:yb,getScale:Vn,isElement:ct,isRTL:bb};function oh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sb(e,t){let n=null,r;const s=Ct(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const l=e.getBoundingClientRect(),{left:u,top:h,width:p,height:g}=l;if(a||t(),!p||!g)return;const y=Ur(h),f=Ur(s.clientWidth-(u+p)),v=Ur(s.clientHeight-(h+g)),w=Ur(u),S={rootMargin:-y+"px "+-f+"px "+-v+"px "+-w+"px",threshold:Ke(0,Bt(1,c))||1};let C=!0;function E(T){const k=T[0].intersectionRatio;if(k!==c){if(!C)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!oh(l,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(E,{...S,root:s.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return i(!0),o}function Cb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Ra(e),u=s||o?[...l?wr(l):[],...wr(t)]:[];u.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const h=l&&a?Sb(l,n):null;let p=-1,g=null;i&&(g=new ResizeObserver(w=>{let[b]=w;b&&b.target===l&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=g)==null||S.observe(t)})),n()}),l&&!c&&g.observe(l),g.observe(t));let y,f=c?ln(e):null;c&&v();function v(){const w=ln(e);f&&!oh(f,w)&&n(),f=w,y=requestAnimationFrame(v)}return n(),()=>{var w;u.forEach(b=>{s&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),h==null||h(),(w=g)==null||w.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const Eb=Yx,kb=Gx,Tb=Wx,Ab=Xx,Pb=Zx,Ol=Ux,Mb=qx,Nb=(e,t,n)=>{const r=new Map,s={platform:wb,...n},o={...s.platform,_c:r};return zx(e,t,{...s,platform:o})};var jb=typeof document<"u",Rb=function(){},is=jb?A.useLayoutEffect:Rb;function Cs(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,s;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(!Cs(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!Cs(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ih(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $l(e,t){const n=ih(e);return Math.round(t*n)/n}function No(e){const t=m.useRef(e);return is(()=>{t.current=e}),t}function Vb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,h]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=m.useState(r);Cs(p,r)||g(r);const[y,f]=m.useState(null),[v,w]=m.useState(null),b=m.useCallback(M=>{M!==T.current&&(T.current=M,f(M))},[]),S=m.useCallback(M=>{M!==k.current&&(k.current=M,w(M))},[]),C=o||y,E=i||v,T=m.useRef(null),k=m.useRef(null),P=m.useRef(u),$=c!=null,x=No(c),I=No(s),_=No(l),K=m.useCallback(()=>{if(!T.current||!k.current)return;const M={placement:t,strategy:n,middleware:p};I.current&&(M.platform=I.current),Nb(T.current,k.current,M).then(q=>{const j={...q,isPositioned:_.current!==!1};Y.current&&!Cs(P.current,j)&&(P.current=j,Ns.flushSync(()=>{h(j)}))})},[p,t,n,I,_]);is(()=>{l===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,h(M=>({...M,isPositioned:!1})))},[l]);const Y=m.useRef(!1);is(()=>(Y.current=!0,()=>{Y.current=!1}),[]),is(()=>{if(C&&(T.current=C),E&&(k.current=E),C&&E){if(x.current)return x.current(C,E,K);K()}},[C,E,K,x,$]);const X=m.useMemo(()=>({reference:T,floating:k,setReference:b,setFloating:S}),[b,S]),G=m.useMemo(()=>({reference:C,floating:E}),[C,E]),U=m.useMemo(()=>{const M={position:n,left:0,top:0};if(!G.floating)return M;const q=$l(G.floating,u.x),j=$l(G.floating,u.y);return a?{...M,transform:"translate("+q+"px, "+j+"px)",...ih(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:j}},[n,a,G.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:K,refs:X,elements:G,floatingStyles:U}),[u,K,X,G,U])}const Ib=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ol({element:r.current,padding:s}).fn(n):{}:r?Ol({element:r,padding:s}).fn(n):{}}}},Db=(e,t)=>({...Eb(e),options:[e,t]}),Ob=(e,t)=>({...kb(e),options:[e,t]}),$b=(e,t)=>({...Mb(e),options:[e,t]}),Lb=(e,t)=>({...Tb(e),options:[e,t]}),_b=(e,t)=>({...Ab(e),options:[e,t]}),Fb=(e,t)=>({...Pb(e),options:[e,t]}),Bb=(e,t)=>({...Ib(e),options:[e,t]});var Hb="Arrow",ah=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return d.jsx(Te.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});ah.displayName=Hb;var zb=ah;function Ub(e){const[t,n]=m.useState(void 0);return We(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ia="Popper",[ch,lh]=ka(Ia),[Wb,dh]=ch(Ia),uh=e=>{const{__scopePopper:t,children:n}=e,[r,s]=m.useState(null);return d.jsx(Wb,{scope:t,anchor:r,onAnchorChange:s,children:n})};uh.displayName=Ia;var fh="PopperAnchor",hh=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=dh(fh,n),i=m.useRef(null),a=Le(t,i);return m.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:d.jsx(Te.div,{...s,ref:a})});hh.displayName=fh;var Da="PopperContent",[Zb,Kb]=ch(Da),mh=m.forwardRef((e,t)=>{var R,F,W,L,J,O;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:y,...f}=e,v=dh(Da,n),[w,b]=m.useState(null),S=Le(t,se=>b(se)),[C,E]=m.useState(null),T=Ub(C),k=(T==null?void 0:T.width)??0,P=(T==null?void 0:T.height)??0,$=r+(o!=="center"?"-"+o:""),x=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},I=Array.isArray(l)?l:[l],_=I.length>0,K={padding:x,boundary:I.filter(Gb),altBoundary:_},{refs:Y,floatingStyles:X,placement:G,isPositioned:U,middlewareData:M}=Vb({strategy:"fixed",placement:$,whileElementsMounted:(...se)=>Cb(...se,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Db({mainAxis:s+P,alignmentAxis:i}),c&&Ob({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?$b():void 0,...K}),c&&Lb({...K}),_b({...K,apply:({elements:se,rects:le,availableWidth:De,availableHeight:ut})=>{const{width:Gt,height:qt}=le.reference,ft=se.floating.style;ft.setProperty("--radix-popper-available-width",`${De}px`),ft.setProperty("--radix-popper-available-height",`${ut}px`),ft.setProperty("--radix-popper-anchor-width",`${Gt}px`),ft.setProperty("--radix-popper-anchor-height",`${qt}px`)}}),C&&Bb({element:C,padding:a}),qb({arrowWidth:k,arrowHeight:P}),p&&Fb({strategy:"referenceHidden",...K})]}),[q,j]=yh(G),V=cn(y);We(()=>{U&&(V==null||V())},[U,V]);const Z=(R=M.arrow)==null?void 0:R.x,N=(F=M.arrow)==null?void 0:F.y,B=((W=M.arrow)==null?void 0:W.centerOffset)!==0,[z,H]=m.useState();return We(()=>{w&&H(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:U?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(L=M.transformOrigin)==null?void 0:L.x,(J=M.transformOrigin)==null?void 0:J.y].join(" "),...((O=M.hide)==null?void 0:O.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Zb,{scope:n,placedSide:q,onArrowChange:E,arrowX:Z,arrowY:N,shouldHideArrow:B,children:d.jsx(Te.div,{"data-side":q,"data-align":j,...f,ref:S,style:{...f.style,animation:U?void 0:"none"}})})})});mh.displayName=Da;var ph="PopperArrow",Yb={top:"bottom",right:"left",bottom:"top",left:"right"},gh=m.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=Kb(ph,r),i=Yb[o.placedSide];return d.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:d.jsx(zb,{...s,ref:n,style:{...s.style,display:"block"}})})});gh.displayName=ph;function Gb(e){return e!==null}var qb=e=>({name:"transformOrigin",options:e,fn(t){var v,w,b;const{placement:n,rects:r,middlewareData:s}=t,i=((v=s.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,u]=yh(n),h={start:"0%",center:"50%",end:"100%"}[u],p=(((w=s.arrow)==null?void 0:w.x)??0)+a/2,g=(((b=s.arrow)==null?void 0:b.y)??0)+c/2;let y="",f="";return l==="bottom"?(y=i?h:`${p}px`,f=`${-c}px`):l==="top"?(y=i?h:`${p}px`,f=`${r.floating.height+c}px`):l==="right"?(y=`${-c}px`,f=i?h:`${g}px`):l==="left"&&(y=`${r.floating.width+c}px`,f=i?h:`${g}px`),{data:{x:y,y:f}}}});function yh(e){const[t,n="center"]=e.split("-");return[t,n]}var Xb=uh,Jb=hh,Qb=mh,e2=gh,t2="Portal",vh=m.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=m.useState(!1);We(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Fi.createPortal(d.jsx(Te.div,{...r,ref:t}),i):null});vh.displayName=t2;function n2(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xh=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"}),r2="VisuallyHidden",s2=m.forwardRef((e,t)=>d.jsx(Te.span,{...e,ref:t,style:{...xh,...e.style}}));s2.displayName=r2;var o2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pn=new WeakMap,Wr=new WeakMap,Zr={},jo=0,bh=function(e){return e&&(e.host||bh(e.parentNode))},i2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=bh(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},a2=function(e,t,n,r){var s=i2(t,Array.isArray(e)?e:[e]);Zr[n]||(Zr[n]=new WeakMap);var o=Zr[n],i=[],a=new Set,c=new Set(s),l=function(h){!h||a.has(h)||(a.add(h),l(h.parentNode))};s.forEach(l);var u=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))u(p);else try{var g=p.getAttribute(r),y=g!==null&&g!=="false",f=(pn.get(p)||0)+1,v=(o.get(p)||0)+1;pn.set(p,f),o.set(p,v),i.push(p),f===1&&y&&Wr.set(p,!0),v===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return u(t),a.clear(),jo++,function(){i.forEach(function(h){var p=pn.get(h)-1,g=o.get(h)-1;pn.set(h,p),o.set(h,g),p||(Wr.has(h)||h.removeAttribute(r),Wr.delete(h)),g||h.removeAttribute(n)}),jo--,jo||(pn=new WeakMap,pn=new WeakMap,Wr=new WeakMap,Zr={})}},c2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=o2(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),a2(r,s,n,"aria-hidden")):function(){return null}},gt=function(){return gt=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},gt.apply(this,arguments)};function wh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function l2(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var as="right-scroll-bar-position",cs="width-before-scroll-bar",d2="with-scroll-bars-hidden",u2="--removed-body-scroll-bar-size";function Ro(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function f2(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var h2=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ll=new WeakMap;function m2(e,t){var n=f2(null,function(r){return e.forEach(function(s){return Ro(s,r)})});return h2(function(){var r=Ll.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(a){o.has(a)||Ro(a,null)}),o.forEach(function(a){s.has(a)||Ro(a,i)})}Ll.set(n,e)},[e]),n}function p2(e){return e}function g2(e,t){t===void 0&&(t=p2);var n=[],r=!1,s={read:function(){if(r)throw new 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(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var c=function(){var u=i;i=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){i.push(u),l()},filter:function(u){return i=i.filter(u),n}}}};return s}function y2(e){e===void 0&&(e={});var t=g2(null);return t.options=gt({async:!0,ssr:!1},e),t}var Sh=function(e){var t=e.sideCar,n=wh(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,gt({},n))};Sh.isSideCarExport=!0;function v2(e,t){return e.useMedium(t),Sh}var Ch=y2(),Vo=function(){},Ls=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Vo,onWheelCapture:Vo,onTouchMoveCapture:Vo}),s=r[0],o=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,h=e.shards,p=e.sideCar,g=e.noRelative,y=e.noIsolation,f=e.inert,v=e.allowPinchZoom,w=e.as,b=w===void 0?"div":w,S=e.gapMode,C=wh(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,T=m2([n,t]),k=gt(gt({},C),s);return m.createElement(m.Fragment,null,u&&m.createElement(E,{sideCar:Ch,removeScrollBar:l,shards:h,noRelative:g,noIsolation:y,inert:f,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:S}),i?m.cloneElement(m.Children.only(a),gt(gt({},k),{ref:T})):m.createElement(b,gt({},k,{className:c,ref:T}),a))});Ls.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ls.classNames={fullWidth:cs,zeroRight:as};var x2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function b2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=x2();return t&&e.setAttribute("nonce",t),e}function w2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function S2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var C2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=b2())&&(w2(t,n),S2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},E2=function(){var e=C2();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Eh=function(){var e=E2(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},k2={left:0,top:0,right:0,gap:0},Io=function(e){return parseInt(e||"",10)||0},T2=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Io(n),Io(r),Io(s)]},A2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return k2;var t=T2(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])}},P2=Eh(),In="data-scroll-locked",M2=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
10
- .`.concat(d2,` {
9
+ `),()=>{f.contains(y)&&f.removeChild(y)}},[t]),d.jsx(sg,{isPresent:t,childRef:o,sizeRef:i,children:m.cloneElement(e,{ref:o})})}const ig=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:i,anchorX:a,root:c})=>{const l=zi(ag),u=A.useId();let h=!0,p=A.useMemo(()=>(h=!1,{id:u,initial:t,isPresent:n,custom:s,onExitComplete:g=>{l.set(g,!0);for(const y of l.values())if(!y)return;r&&r()},register:g=>(l.set(g,!1),()=>l.delete(g))}),[n,l,r]);return o&&h&&(p={...p}),A.useMemo(()=>{l.forEach((g,y)=>l.set(y,!1))},[n]),m.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),i==="popLayout"&&(e=d.jsx(og,{isPresent:n,anchorX:a,root:c,children:e})),d.jsx(Ns.Provider,{value:p,children:e})};function ag(){return new Map}function ju(e=!0){const t=A.useContext(Ns);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=A.useId();A.useEffect(()=>{if(e)return s(o)},[e]);const i=A.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}const _r=e=>e.key||"";function Sc(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const Nn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",root:c})=>{const[l,u]=ju(i),h=A.useMemo(()=>Sc(e),[e]),p=i&&!l?[]:h.map(_r),g=A.useRef(!0),y=A.useRef(h),f=zi(()=>new Map),[v,w]=A.useState(h),[b,S]=A.useState(h);Bd(()=>{g.current=!1,y.current=h;for(let T=0;T<b.length;T++){const k=_r(b[T]);p.includes(k)?f.delete(k):f.get(k)!==!0&&f.set(k,!1)}},[b,p.length,p.join("-")]);const C=[];if(h!==v){let T=[...h];for(let k=0;k<b.length;k++){const P=b[k],$=_r(P);p.includes($)||(T.splice(k,0,P),C.push(P))}return o==="wait"&&C.length&&(T=C),S(Sc(T)),w(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:E}=A.useContext(Hi);return d.jsx(d.Fragment,{children:b.map(T=>{const k=_r(T),P=i&&!l?!1:h===b||p.includes(k),$=()=>{if(f.has(k))f.set(k,!0);else return;let x=!0;f.forEach(I=>{I||(x=!1)}),x&&(E==null||E(),S(y.current),i&&(u==null||u()),r&&r())};return d.jsx(ig,{isPresent:P,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:c,onExitComplete:P?void 0:$,anchorX:a,children:T},k)})})},Vu=A.createContext({strict:!1}),Cc={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ln={};for(const e in Cc)Ln[e]={isEnabled:t=>Cc[e].some(n=>!!t[n])};function cg(e){for(const t in e)Ln[t]={...Ln[t],...e[t]}}const lg=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function vs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lg.has(e)}let Iu=e=>!vs(e);function dg(e){typeof e=="function"&&(Iu=t=>t.startsWith("on")?!vs(t):e(t))}try{dg(require("@emotion/is-prop-valid").default)}catch{}function ug(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(Iu(s)||n===!0&&vs(s)||!t&&!vs(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const js=A.createContext({});function Vs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function gr(e){return typeof e=="string"||Array.isArray(e)}const ha=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ma=["initial",...ha];function Is(e){return Vs(e.animate)||ma.some(t=>gr(e[t]))}function Du(e){return!!(Is(e)||e.variants)}function fg(e,t){if(Is(e)){const{initial:n,animate:r}=e;return{initial:n===!1||gr(n)?n:void 0,animate:gr(r)?r:void 0}}return e.inherit!==!1?t:{}}function hg(e){const{initial:t,animate:n}=fg(e,A.useContext(js));return A.useMemo(()=>({initial:t,animate:n}),[Ec(t),Ec(n)])}function Ec(e){return Array.isArray(e)?e.join(" "):e}const yr={};function mg(e){for(const t in e)yr[t]=e[t],Ji(t)&&(yr[t].isCSSVariable=!0)}function Ou(e,{layout:t,layoutId:n}){return Zn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yr[e]||e==="opacity")}const pg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gg=Wn.length;function yg(e,t,n){let r="",s=!0;for(let o=0;o<gg;o++){const i=Wn[o],a=e[i];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(i.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const l=Tu(a,la[i]);if(!c){s=!1;const u=pg[i]||i;r+=`${u}(${l}) `}n&&(t[i]=l)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function pa(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,a=!1;for(const c in t){const l=t[c];if(Zn.has(c)){i=!0;continue}else if(Ji(c)){s[c]=l;continue}else{const u=Tu(l,la[c]);c.startsWith("origin")?(a=!0,o[c]=u):r[c]=u}}if(t.transform||(i||n?r.transform=yg(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=o;r.transformOrigin=`${c} ${l} ${u}`}}const ga=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $u(e,t,n){for(const r in t)!He(t[r])&&!Ou(r,n)&&(e[r]=t[r])}function vg({transformTemplate:e},t){return A.useMemo(()=>{const n=ga();return pa(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xg(e,t){const n=e.style||{},r={};return $u(r,n,e),Object.assign(r,vg(e,t)),r}function bg(e,t){const n={},r=xg(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const wg={offset:"stroke-dashoffset",array:"stroke-dasharray"},Sg={offset:"strokeDashoffset",array:"strokeDasharray"};function Cg(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?wg:Sg;e[o.offset]=re.transform(-r);const i=re.transform(t),a=re.transform(n);e[o.array]=`${i} ${a}`}function Lu(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...a},c,l,u){if(pa(e,a,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&Cg(h,s,o,i,!1)}const _u=()=>({...ga(),attrs:{}}),Fu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Eg(e,t,n,r){const s=A.useMemo(()=>{const o=_u();return Lu(o,t,Fu(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};$u(o,e.style,e),s.style={...o,...s.style}}return s}const kg=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ya(e){return typeof e!="string"||e.includes("-")?!1:!!(kg.indexOf(e)>-1||/[A-Z]/u.test(e))}function Tg(e,t,n,{latestValues:r},s,o=!1){const a=(ya(e)?Eg:bg)(t,r,s,e),c=ug(t,typeof e=="string",o),l=e!==A.Fragment?{...c,...a,ref:n}:{},{children:u}=t,h=A.useMemo(()=>He(u)?u.get():u,[u]);return A.createElement(e,{...l,children:h})}function kc(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function va(e,t,n,r){if(typeof t=="function"){const[s,o]=kc(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=kc(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function ss(e){return He(e)?e.get():e}function Ag({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Pg(n,r,s,e),renderState:t()}}function Pg(e,t,n,r){const s={},o=r(e,{});for(const p in o)s[p]=ss(o[p]);let{initial:i,animate:a}=e;const c=Is(e),l=Du(e);t&&l&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const h=u?a:i;if(h&&typeof h!="boolean"&&!Vs(h)){const p=Array.isArray(h)?h:[h];for(let g=0;g<p.length;g++){const y=va(e,p[g]);if(y){const{transitionEnd:f,transition:v,...w}=y;for(const b in w){let S=w[b];if(Array.isArray(S)){const C=u?S.length-1:0;S=S[C]}S!==null&&(s[b]=S)}for(const b in f)s[b]=f[b]}}}return s}const Bu=e=>(t,n)=>{const r=A.useContext(js),s=A.useContext(Ns),o=()=>Ag(e,t,r,s);return n?o():zi(o)};function xa(e,t,n){var o;const{style:r}=e,s={};for(const i in r)(He(r[i])||t.style&&He(t.style[i])||Ou(i,e)||((o=n==null?void 0:n.getValue(i))==null?void 0:o.liveStyle)!==void 0)&&(s[i]=r[i]);return s}const Mg=Bu({scrapeMotionValuesFromProps:xa,createRenderState:ga});function Hu(e,t,n){const r=xa(e,t,n);for(const s in e)if(He(e[s])||He(t[s])){const o=Wn.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const Rg=Bu({scrapeMotionValuesFromProps:Hu,createRenderState:_u}),Ng=Symbol.for("motionComponentSymbol");function An(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function jg(e,t,n){return A.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):An(n)&&(n.current=r))},[t])}const ba=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vg="framerAppearId",zu="data-"+ba(Vg),Uu=A.createContext({});function Ig(e,t,n,r,s){var f,v;const{visualElement:o}=A.useContext(js),i=A.useContext(Vu),a=A.useContext(Ns),c=A.useContext(fa).reducedMotion,l=A.useRef(null);r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=l.current,h=A.useContext(Uu);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&Dg(l.current,n,s,h);const p=A.useRef(!1);A.useInsertionEffect(()=>{u&&p.current&&u.update(n,a)});const g=n[zu],y=A.useRef(!!g&&!((f=window.MotionHandoffIsComplete)!=null&&f.call(window,g))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,g)));return Bd(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),y.current&&u.animationState&&u.animationState.animateChanges())}),A.useEffect(()=>{u&&(!y.current&&u.animationState&&u.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,g)}),y.current=!1),u.enteringChildren=void 0)}),u}function Dg(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Wu(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&An(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function Wu(e){if(e)return e.options.allowProjection!==!1?e.projection:Wu(e.parent)}function mo(e,{forwardMotionProps:t=!1}={},n,r){n&&cg(n);const s=ya(e)?Rg:Mg;function o(a,c){let l;const u={...A.useContext(fa),...a,layoutId:Og(a)},{isStatic:h}=u,p=hg(a),g=s(a,h);if(!h&&Ui){$g(u,n);const y=Lg(u);l=y.MeasureLayout,p.visualElement=Ig(e,g,u,r,y.ProjectionNode)}return d.jsxs(js.Provider,{value:p,children:[l&&p.visualElement?d.jsx(l,{visualElement:p.visualElement,...u}):null,Tg(e,a,jg(g,p.visualElement,c),g,h,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const i=A.forwardRef(o);return i[Ng]=e,i}function Og({layoutId:e}){const t=A.useContext(Hi).id;return t&&e!==void 0?t+"-"+e:e}function $g(e,t){const n=A.useContext(Vu).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?zn(!1,r,"lazy-strict-mode"):Rt(!1,r,"lazy-strict-mode")}}function Lg(e){const{drag:t,layout:n}=Ln;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function _g(e,t){if(typeof Proxy>"u")return mo;const n=new Map,r=(o,i)=>mo(o,i,e,t),s=(o,i)=>(process.env.NODE_ENV!=="production"&&Gi(!1,"motion() is deprecated. Use motion.create() instead."),r(o,i));return new Proxy(s,{get:(o,i)=>i==="create"?r:(n.has(i)||n.set(i,mo(i,void 0,e,t)),n.get(i))})}function Zu({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Fg({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Bg(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function po(e){return e===void 0||e===1}function ci({scale:e,scaleX:t,scaleY:n}){return!po(e)||!po(t)||!po(n)}function Qt(e){return ci(e)||Ku(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ku(e){return Tc(e.x)||Tc(e.y)}function Tc(e){return e&&e!=="0%"}function xs(e,t,n){const r=e-n,s=t*r;return n+s}function Ac(e,t,n,r,s){return s!==void 0&&(e=xs(e,s,r)),xs(e,n,r)+t}function li(e,t=0,n=1,r,s){e.min=Ac(e.min,t,n,r,s),e.max=Ac(e.max,t,n,r,s)}function Yu(e,{x:t,y:n}){li(e.x,t.translate,t.scale,t.originPoint),li(e.y,n.translate,n.scale,n.originPoint)}const Pc=.999999999999,Mc=1.0000000000001;function Hg(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,i;for(let a=0;a<s;a++){o=n[a],i=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Mn(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Yu(e,i)),r&&Qt(o.latestValues)&&Mn(e,o.latestValues))}t.x<Mc&&t.x>Pc&&(t.x=1),t.y<Mc&&t.y>Pc&&(t.y=1)}function Pn(e,t){e.min=e.min+t,e.max=e.max+t}function Rc(e,t,n,r,s=.5){const o=Se(e.min,e.max,s);li(e,t,n,o,r)}function Mn(e,t){Rc(e.x,t.x,t.scaleX,t.scale,t.originX),Rc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Gu(e,t){return Zu(Bg(e.getBoundingClientRect(),t))}function zg(e,t,n){const r=Gu(e,n),{scroll:s}=t;return s&&(Pn(r.x,s.offset.x),Pn(r.y,s.offset.y)),r}const Nc=()=>({translate:0,scale:1,origin:0,originPoint:0}),Rn=()=>({x:Nc(),y:Nc()}),jc=()=>({min:0,max:0}),Ae=()=>({x:jc(),y:jc()}),di={current:null},qu={current:!1};function Ug(){if(qu.current=!0,!!Ui)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>di.current=e.matches;e.addEventListener("change",t),t()}else di.current=!1}const Wg=new WeakMap;function Zg(e,t,n){for(const r in t){const s=t[r],o=n[r];if(He(s))e.addValue(r,s);else if(He(o))e.addValue(r,$n(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,$n(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Kg{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=aa,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Ue.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,be.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=i;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Is(n),this.isVariantNode=Du(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const g=h[p];c[p]!==void 0&&He(g)&&g.set(c[p])}}mount(t){var n;this.current=t,Wg.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,s)=>this.bindToMotionValue(s,r)),qu.current||Ug(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:di.current,process.env.NODE_ENV!=="production"&&Gi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),_t(this.notifyUpdate),_t(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Zn.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&be.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ln){const n=Ln[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ae()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Vc.length;r++){const s=Vc[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=Zg(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=$n(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Hd(r)||Ud(r))?r=parseFloat(r):!rg(r)&&Ft.test(n)&&(r=ku(t,n)),this.setBaseTarget(t,He(r)?r.get():r)),He(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=va(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!He(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Yi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){da.render(this.render)}}class Xu extends Kg{constructor(){super(...arguments),this.KeyframeResolver=W0}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;He(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ju(e,{style:t,vars:n},r,s){const o=e.style;let i;for(i in t)o[i]=t[i];s==null||s.applyProjectionStyles(o,r);for(i in n)o.setProperty(i,n[i])}function Yg(e){return window.getComputedStyle(e)}class Gg extends Xu{constructor(){super(...arguments),this.type="html",this.renderInstance=Ju}readValueFromInstance(t,n){var r;if(Zn.has(n))return(r=this.projection)!=null&&r.isProjecting?ti(n):l0(t,n);{const s=Yg(t),o=(Ji(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Gu(t,n)}build(t,n,r){pa(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return xa(t,n,r)}}const Qu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function qg(e,t,n,r){Ju(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Qu.has(s)?s:ba(s),t.attrs[s])}class Xg extends Xu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ae}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Zn.has(n)){const r=Eu(n);return r&&r.default||0}return n=Qu.has(n)?n:ba(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Hu(t,n,r)}build(t,n,r){Lu(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){qg(t,n,r,s)}mount(t){this.isSVGTag=Fu(t.tagName),super.mount(t)}}const Jg=(e,t)=>ya(e)?new Xg(t):new Gg(t,{allowProjection:e!==A.Fragment});function jn(e,t,n){const r=e.getProps();return va(r,t,n!==void 0?n:r.custom,e)}const ui=e=>Array.isArray(e);function Qg(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$n(n))}function ey(e){return ui(e)?e[e.length-1]||0:e}function ty(e,t){const n=jn(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=ey(o[i]);Qg(e,i,a)}}function ny(e){return!!(He(e)&&e.add)}function fi(e,t){const n=e.getValue("willChange");if(ny(n))return n.add(t);if(!n&&Nt.WillChange){const r=new Nt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ef(e){return e.props[zu]}const ry=e=>e!==null;function sy(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(ry),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const oy={type:"spring",stiffness:500,damping:25,restSpeed:10},iy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ay={type:"keyframes",duration:.8},cy={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ly=(e,{keyframes:t})=>t.length>2?ay:Zn.has(e)?e.startsWith("scale")?iy(t[1]):oy:cy;function dy({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const wa=(e,t,n,r={},s,o)=>i=>{const a=ca(r,e)||{},c=a.delay||r.delay||0;let{elapsed:l=0}=r;l=l-at(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-l,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};dy(a)||Object.assign(u,ly(e,u)),u.duration&&(u.duration=at(u.duration)),u.repeatDelay&&(u.repeatDelay=at(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ii(u),u.delay===0&&(h=!0)),(Nt.instantAnimations||Nt.skipAnimations)&&(h=!0,ii(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&t.get()!==void 0){const p=sy(u.keyframes,a);if(p!==void 0){be.update(()=>{u.onUpdate(p),u.onComplete()});return}}return a.isSync?new ia(u):new j0(u)};function uy({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function tf(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...a}=t;r&&(o=r);const c=[],l=s&&e.animationState&&e.animationState.getState()[s];for(const u in a){const h=e.getValue(u,e.latestValues[u]??null),p=a[u];if(p===void 0||l&&uy(l,u))continue;const g={delay:n,...ca(o||{},u)},y=h.get();if(y!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===y&&!g.velocity)continue;let f=!1;if(window.MotionHandoffAnimation){const w=ef(e);if(w){const b=window.MotionHandoffAnimation(w,u,be);b!==null&&(g.startTime=b,f=!0)}}fi(e,u),h.start(wa(u,h,p,e.shouldReduceMotion&&wu.has(u)?{type:!1}:g,e,f));const v=h.animation;v&&c.push(v)}return i&&Promise.all(c).then(()=>{be.update(()=>{i&&ty(e,i)})}),c}function nf(e,t,n,r=0,s=1){const o=Array.from(e).sort((l,u)=>l.sortNodePosition(u)).indexOf(t),i=e.size,a=(i-1)*r;return typeof n=="function"?n(o,i):s===1?o*r:a-o*r}function hi(e,t,n={}){var c;const r=jn(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(tf(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:p}=s;return fy(e,t,l,u,h,p,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,u]=a==="beforeChildren"?[o,i]:[i,o];return l().then(()=>u())}else return Promise.all([o(),i(n.delay)])}function fy(e,t,n=0,r=0,s=0,o=1,i){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(hi(c,t,{...i,delay:n+(typeof r=="function"?0:r)+nf(e.variantChildren,c,r,s,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function hy(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>hi(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=hi(e,t,n);else{const s=typeof t=="function"?jn(e,t,n.custom):t;r=Promise.all(tf(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function rf(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const my=ma.length;function sf(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?sf(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<my;n++){const r=ma[n],s=e.props[r];(gr(s)||s===!1)&&(t[r]=s)}return t}const py=[...ha].reverse(),gy=ha.length;function yy(e){return t=>Promise.all(t.map(({animation:n,options:r})=>hy(e,n,r)))}function vy(e){let t=yy(e),n=Ic(),r=!0;const s=c=>(l,u)=>{var p;const h=jn(e,u,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:g,transitionEnd:y,...f}=h;l={...l,...f,...y}}return l};function o(c){t=c(e)}function i(c){const{props:l}=e,u=sf(e.parent)||{},h=[],p=new Set;let g={},y=1/0;for(let v=0;v<gy;v++){const w=py[v],b=n[w],S=l[w]!==void 0?l[w]:u[w],C=gr(S),E=w===c?b.isActive:null;E===!1&&(y=v);let T=S===u[w]&&S!==l[w]&&C;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),b.protectedKeys={...g},!b.isActive&&E===null||!S&&!b.prevProp||Vs(S)||typeof S=="boolean")continue;const k=xy(b.prevProp,S);let P=k||w===c&&b.isActive&&!T&&C||v>y&&C,$=!1;const x=Array.isArray(S)?S:[S];let I=x.reduce(s(w),{});E===!1&&(I={});const{prevResolvedValues:_={}}=b,K={..._,...I},Y=U=>{P=!0,p.has(U)&&($=!0,p.delete(U)),b.needsAnimating[U]=!0;const M=e.getValue(U);M&&(M.liveStyle=!1)};for(const U in K){const M=I[U],q=_[U];if(g.hasOwnProperty(U))continue;let N=!1;ui(M)&&ui(q)?N=!rf(M,q):N=M!==q,N?M!=null?Y(U):p.add(U):M!==void 0&&p.has(U)?Y(U):b.protectedKeys[U]=!0}b.prevProp=S,b.prevResolvedValues=I,b.isActive&&(g={...g,...I}),r&&e.blockInitialAnimation&&(P=!1);const X=T&&k;P&&(!X||$)&&h.push(...x.map(U=>{const M={type:w};if(typeof U=="string"&&r&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,N=jn(q,U);if(q.enteringChildren&&N){const{delayChildren:V}=N.transition||{};M.delay=nf(q.enteringChildren,e,V)}}return{animation:U,options:M}}))}if(p.size){const v={};if(typeof l.initial!="boolean"){const w=jn(e,Array.isArray(l.initial)?l.initial[0]:l.initial);w&&w.transition&&(v.transition=w.transition)}p.forEach(w=>{const b=e.getBaseTarget(w),S=e.getValue(w);S&&(S.liveStyle=!0),v[w]=b??null}),h.push({animation:v})}let f=!!h.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(h):Promise.resolve()}function a(c,l){var h;if(n[c].isActive===l)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var g;return(g=p.animationState)==null?void 0:g.setActive(c,l)}),n[c].isActive=l;const u=i(c);for(const p in n)n[p].protectedKeys={};return u}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Ic(),r=!0}}}function xy(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rf(t,e):!1}function Xt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ic(){return{animate:Xt(!0),whileInView:Xt(),whileHover:Xt(),whileTap:Xt(),whileDrag:Xt(),whileFocus:Xt(),exit:Xt()}}class Wt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class by extends Wt{constructor(t){super(t),t.animationState||(t.animationState=vy(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let wy=0;class Sy extends Wt{constructor(){super(...arguments),this.id=wy++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Cy={animation:{Feature:by},exit:{Feature:Sy}};function vr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Mr(e){return{point:{x:e.pageX,y:e.pageY}}}const Ey=e=>t=>ua(t)&&e(t,Mr(t));function lr(e,t,n,r){return vr(e,t,Ey(n),r)}const of=1e-4,ky=1-of,Ty=1+of,af=.01,Ay=0-af,Py=0+af;function ze(e){return e.max-e.min}function My(e,t,n){return Math.abs(e-t)<=n}function Dc(e,t,n,r=.5){e.origin=r,e.originPoint=Se(t.min,t.max,e.origin),e.scale=ze(n)/ze(t),e.translate=Se(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ky&&e.scale<=Ty||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ay&&e.translate<=Py||isNaN(e.translate))&&(e.translate=0)}function dr(e,t,n,r){Dc(e.x,t.x,n.x,r?r.originX:void 0),Dc(e.y,t.y,n.y,r?r.originY:void 0)}function Oc(e,t,n){e.min=n.min+t.min,e.max=e.min+ze(t)}function Ry(e,t,n){Oc(e.x,t.x,n.x),Oc(e.y,t.y,n.y)}function $c(e,t,n){e.min=t.min-n.min,e.max=e.min+ze(t)}function ur(e,t,n){$c(e.x,t.x,n.x),$c(e.y,t.y,n.y)}function Qe(e){return[e("x"),e("y")]}const cf=({current:e})=>e?e.ownerDocument.defaultView:null,Lc=(e,t)=>Math.abs(e-t);function Ny(e,t){const n=Lc(e.x,t.x),r=Lc(e.y,t.y);return Math.sqrt(n**2+r**2)}class lf{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=yo(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=Ny(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:f}=p,{timestamp:v}=Oe;this.history.push({...f,timestamp:v});const{onStart:w,onMove:b}=this.handlers;g||(w&&w(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=go(g,this.transformPagePoint),be.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:y,onSessionEnd:f,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=yo(p.type==="pointercancel"?this.lastMoveEventInfo:go(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,w),f&&f(p,w)},!ua(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=s||window;const a=Mr(t),c=go(a,this.transformPagePoint),{point:l}=c,{timestamp:u}=Oe;this.history=[{...l,timestamp:u}];const{onSessionStart:h}=n;h&&h(t,yo(c,this.history)),this.removeListeners=Tr(lr(this.contextWindow,"pointermove",this.handlePointerMove),lr(this.contextWindow,"pointerup",this.handlePointerUp),lr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_t(this.updatePoint)}}function go(e,t){return t?{point:t(e.point)}:e}function _c(e,t){return{x:e.x-t.x,y:e.y-t.y}}function yo({point:e},t){return{point:e,delta:_c(e,df(t)),offset:_c(e,jy(t)),velocity:Vy(t,.1)}}function jy(e){return e[0]}function df(e){return e[e.length-1]}function Vy(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=df(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>at(t)));)n--;if(!r)return{x:0,y:0};const o=vt(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const i={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Iy(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Se(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Se(n,e,r.max):Math.min(e,n)),e}function Fc(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Dy(e,{top:t,left:n,bottom:r,right:s}){return{x:Fc(e.x,n,s),y:Fc(e.y,t,r)}}function Bc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Oy(e,t){return{x:Bc(e.x,t.x),y:Bc(e.y,t.y)}}function $y(e,t){let n=.5;const r=ze(e),s=ze(t);return s>r?n=hr(t.min,t.max-r,e.min):r>s&&(n=hr(e.min,e.max-s,t.min)),Mt(0,1,n)}function Ly(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const mi=.35;function _y(e=mi){return e===!1?e=0:e===!0&&(e=mi),{x:Hc(e,"left","right"),y:Hc(e,"top","bottom")}}function Hc(e,t,n){return{min:zc(e,t),max:zc(e,n)}}function zc(e,t){return typeof e=="number"?e:e[t]||0}const Fy=new WeakMap;class By{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ae(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Mr(h).point)},i=(h,p)=>{const{drag:g,dragPropagation:y,onDragStart:f}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=G0(g),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qe(w=>{let b=this.getAxisMotionValue(w).get()||0;if(xt.test(b)){const{projection:S}=this.visualElement;if(S&&S.layout){const C=S.layout.layoutBox[w];C&&(b=ze(C)*(parseFloat(b)/100))}}this.originPoint[w]=b}),f&&be.postRender(()=>f(h,p)),fi(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:f,onDrag:v}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:w}=p;if(y&&this.currentDirection===null){this.currentDirection=Hy(w),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",p.point,w),this.updateAxis("y",p.point,w),this.visualElement.render(),v&&v(h,p)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>Qe(h=>{var p;return this.getAnimationState(h)==="paused"&&((p=this.getAxisMotionValue(h).animation)==null?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new lf(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:cf(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:i}=s;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&be.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Fr(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=Iy(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&An(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Dy(r.layoutBox,t):this.constraints=!1,this.elastic=_y(n),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Qe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Ly(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!An(t))return!1;const r=t.current;Rt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=zg(r,s.root,this.visualElement.getTransformPagePoint());let i=Oy(s.layout.layoutBox,o);if(n){const a=n(Fg(i));this.hasMutatedConstraints=!!a,a&&(i=Zu(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=Qe(u=>{if(!Fr(u,n,this.currentDirection))return;let h=c&&c[u]||{};i&&(h={min:0,max:0});const p=s?200:1e6,g=s?40:1e7,y={type:"inertia",velocity:r?t[u]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,y)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return fi(this.visualElement,t),r.start(wa(t,r,0,n,this.visualElement,!1))}stopAnimation(){Qe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Qe(n=>{const{drag:r}=this.getProps();if(!Fr(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:a}=s.layout.layoutBox[n];o.set(t[n]-Se(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!An(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Qe(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const c=a.get();s[i]=$y({min:c,max:c},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Qe(i=>{if(!Fr(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:l}=this.constraints[i];a.set(Se(c,l,s[i]))})}addListeners(){if(!this.visualElement.current)return;Fy.set(this.visualElement,this);const t=this.visualElement.current,n=lr(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();An(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),be.read(r);const i=vr(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(Qe(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())});return()=>{i(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:i=mi,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Fr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Hy(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class zy extends Wt{constructor(t){super(t),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new By(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Uc=e=>(t,n)=>{e&&be.postRender(()=>e(t,n))};class Uy extends Wt{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(t){this.session=new lf(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:cf(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Uc(t),onStart:Uc(n),onMove:r,onEnd:(o,i)=>{delete this.session,s&&be.postRender(()=>s(o,i))}}}mount(){this.removePointerDownListener=lr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const os={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Wc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const er={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(re.test(e))e=parseFloat(e);else return e;const n=Wc(e,t.target.x),r=Wc(e,t.target.y);return`${n}% ${r}%`}},Wy={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ft.parse(e);if(s.length>5)return r;const o=Ft.createTransformer(e),i=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;s[0+i]/=a,s[1+i]/=c;const l=Se(a,c,.5);return typeof s[2+i]=="number"&&(s[2+i]/=l),typeof s[3+i]=="number"&&(s[3+i]/=l),o(s)}};let vo=!1;class Zy extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;mg(Ky),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),vo&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),os.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:i}=r;return i&&(i.isPresent=o,vo=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||be.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),da.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;vo=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function uf(e){const[t,n]=ju(),r=A.useContext(Hi);return d.jsx(Zy,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(Uu),isPresent:t,safeToRemove:n})}const Ky={borderRadius:{...er,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:er,borderTopRightRadius:er,borderBottomLeftRadius:er,borderBottomRightRadius:er,boxShadow:Wy};function Yy(e,t,n){const r=He(e)?e:$n(e);return r.start(wa("",r,t,n)),r.animation}const Gy=(e,t)=>e.depth-t.depth;class qy{constructor(){this.children=[],this.isDirty=!1}add(t){Wi(this.children,t),this.isDirty=!0}remove(t){Zi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Gy),this.isDirty=!1,this.children.forEach(t)}}function Xy(e,t){const n=Ue.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(_t(r),e(o-t))};return be.setup(r,!0),()=>_t(r)}const ff=["TopLeft","TopRight","BottomLeft","BottomRight"],Jy=ff.length,Zc=e=>typeof e=="string"?parseFloat(e):e,Kc=e=>typeof e=="number"||re.test(e);function Qy(e,t,n,r,s,o){s?(e.opacity=Se(0,n.opacity??1,e1(r)),e.opacityExit=Se(t.opacity??1,0,t1(r))):o&&(e.opacity=Se(t.opacity??1,n.opacity??1,r));for(let i=0;i<Jy;i++){const a=`border${ff[i]}Radius`;let c=Yc(t,a),l=Yc(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||Kc(c)===Kc(l)?(e[a]=Math.max(Se(Zc(c),Zc(l),r),0),(xt.test(l)||xt.test(c))&&(e[a]+="%")):e[a]=l}(t.rotate||n.rotate)&&(e.rotate=Se(t.rotate||0,n.rotate||0,r))}function Yc(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const e1=hf(0,.5,Jd),t1=hf(.5,.95,nt);function hf(e,t,n){return r=>r<e?0:r>t?1:n(hr(e,t,r))}function Gc(e,t){e.min=t.min,e.max=t.max}function Je(e,t){Gc(e.x,t.x),Gc(e.y,t.y)}function qc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Xc(e,t,n,r,s){return e-=t,e=xs(e,1/n,r),s!==void 0&&(e=xs(e,1/s,r)),e}function n1(e,t=0,n=1,r=.5,s,o=e,i=e){if(xt.test(t)&&(t=parseFloat(t),t=Se(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Se(o.min,o.max,r);e===o&&(a-=t),e.min=Xc(e.min,t,n,a,s),e.max=Xc(e.max,t,n,a,s)}function Jc(e,t,[n,r,s],o,i){n1(e,t[n],t[r],t[s],t.scale,o,i)}const r1=["x","scaleX","originX"],s1=["y","scaleY","originY"];function Qc(e,t,n,r){Jc(e.x,t,r1,n?n.x:void 0,r?r.x:void 0),Jc(e.y,t,s1,n?n.y:void 0,r?r.y:void 0)}function el(e){return e.translate===0&&e.scale===1}function mf(e){return el(e.x)&&el(e.y)}function tl(e,t){return e.min===t.min&&e.max===t.max}function o1(e,t){return tl(e.x,t.x)&&tl(e.y,t.y)}function nl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function pf(e,t){return nl(e.x,t.x)&&nl(e.y,t.y)}function rl(e){return ze(e.x)/ze(e.y)}function sl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class i1{constructor(){this.members=[]}add(t){Wi(this.members,t),t.scheduleRender()}remove(t){if(Zi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function a1(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((s||o||i)&&(r=`translate3d(${s}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:h,rotateY:p,skewX:g,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),u&&(r+=`rotate(${u}deg) `),h&&(r+=`rotateX(${h}deg) `),p&&(r+=`rotateY(${p}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const xo=["","X","Y","Z"],c1=1e3;let l1=0;function bo(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gf(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ef(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",be,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&gf(r)}function yf({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(i={},a=t==null?void 0:t()){this.id=l1++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(f1),this.nodes.forEach(g1),this.nodes.forEach(y1),this.nodes.forEach(h1)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new qy)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Yi),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const c=this.eventHandlers.get(i);c&&c.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Nu(i)&&!tg(i),this.instance=i;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,h=0;const p=()=>this.root.updateBlockedByResize=!1;be.read(()=>{h=window.innerWidth}),e(i,()=>{const g=window.innerWidth;g!==h&&(h=g,this.root.updateBlockedByResize=!0,u&&u(),u=Xy(p,250),os.hasAnimatedSinceResize&&(os.hasAnimatedSinceResize=!1,this.nodes.forEach(al)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||S1,{onLayoutAnimationStart:f,onLayoutAnimationComplete:v}=l.getProps(),w=!this.targetLayout||!pf(this.targetLayout,g),b=!h&&p;if(this.options.layoutRoot||this.resumeFrom||b||h&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...ca(y,"layout"),onPlay:f,onComplete:v};(l.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(u,b)}else h||al(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),_t(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(v1),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ol);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(il);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(p1),this.nodes.forEach(d1),this.nodes.forEach(u1)):this.nodes.forEach(il),this.clearAllSnapshots();const a=Ue.now();Oe.delta=Mt(0,1e3/60,a-Oe.timestamp),Oe.timestamp=a,Oe.isProcessing=!0,ao.update.process(Oe),ao.preRender.process(Oe),ao.render.process(Oe),Oe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,da.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(m1),this.sharedNodes.forEach(x1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,be.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){be.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ze(this.snapshot.measuredBox.x)&&!ze(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ae(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!mf(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;i&&this.instance&&(a||Qt(this.latestValues)||u)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return i&&(c=this.removeTransform(c)),C1(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:i}=this.options;if(!i)return Ae();const a=i.measureViewportBox();if(!(((l=this.scroll)==null?void 0:l.wasRoot)||this.path.some(E1))){const{scroll:u}=this.root;u&&(Pn(a.x,u.offset.x),Pn(a.y,u.offset.y))}return a}removeElementScroll(i){var c;const a=Ae();if(Je(a,i),(c=this.scroll)!=null&&c.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:h,options:p}=u;u!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&Je(a,i),Pn(a.x,h.offset.x),Pn(a.y,h.offset.y))}return a}applyTransform(i,a=!1){const c=Ae();Je(c,i);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Mn(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Qt(u.latestValues)&&Mn(c,u.latestValues)}return Qt(this.latestValues)&&Mn(c,this.latestValues),c}removeTransform(i){const a=Ae();Je(a,i);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!Qt(l.latestValues))continue;ci(l.latestValues)&&l.updateSnapshot();const u=Ae(),h=l.measurePageBox();Je(u,h),Qc(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return Qt(this.latestValues)&&Qc(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Oe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var p;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!(!this.layout||!(u||h))){if(this.resolvedRelativeTargetAt=Oe.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ae(),this.relativeTargetOrigin=Ae(),ur(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Je(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ae(),this.targetWithTransforms=Ae()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ry(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Je(this.target,this.layout.layoutBox),Yu(this.target,this.targetDelta)):Je(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ae(),this.relativeTargetOrigin=Ae(),ur(this.relativeTargetOrigin,this.target,g.target),Je(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ci(this.parent.latestValues)||Ku(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Oe.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;Je(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;Hg(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Ae());const{target:g}=i;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(qc(this.prevProjectionDelta.x,this.projectionDelta.x),qc(this.prevProjectionDelta.y,this.projectionDelta.y)),dr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!sl(this.projectionDelta.x,this.prevProjectionDelta.x)||!sl(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rn(),this.projectionDelta=Rn(),this.projectionDeltaWithTransform=Rn()}setAnimationOrigin(i,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},h=Rn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=Ae(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,f=g!==y,v=this.getStack(),w=!v||v.members.length<=1,b=!!(f&&!w&&this.options.crossfade===!0&&!this.path.some(w1));this.animationProgress=0;let S;this.mixTargetDelta=C=>{const E=C/1e3;cl(h.x,i.x,E),cl(h.y,i.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ur(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),b1(this.relativeTarget,this.relativeTargetOrigin,p,E),S&&o1(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Ae()),Je(S,this.relativeTarget)),f&&(this.animationValues=u,Qy(u,l,this.latestValues,E,b,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,c,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(l=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||l.stop(),this.pendingAnimation&&(_t(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=be.update(()=>{os.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$n(0)),this.currentAnimation=Yy(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),i.onUpdate&&i.onUpdate(u)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(c1),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=i;if(!(!a||!c||!l)){if(this!==i&&this.layout&&l&&vf(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ae();const h=ze(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+h;const p=ze(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+p}Je(a,c),Mn(a,u),dr(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new i1),this.sharedNodes.get(i).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&bo("z",i,l,this.animationValues);for(let u=0;u<xo.length;u++)bo(`rotate${xo[u]}`,i,l,this.animationValues),bo(`skew${xo[u]}`,i,l,this.animationValues);i.render();for(const u in l)i.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=ss(a==null?void 0:a.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=ss(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Qt(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let h=a1(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),i.transform=h;const{x:p,y:g}=this.projectionDelta;i.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,l.animationValues?i.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in yr){if(u[y]===void 0)continue;const{correct:f,applyTo:v,isCSSVariable:w}=yr[y],b=h==="none"?u[y]:f(u[y],l);if(v){const S=v.length;for(let C=0;C<S;C++)i[v[C]]=b}else w?this.options.visualElement.renderState.vars[y]=b:i[y]=b}this.options.layoutId&&(i.pointerEvents=l===this?ss(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ol),this.root.sharedNodes.clear()}}}function d1(e){e.updateLayout()}function u1(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?Qe(h=>{const p=i?t.measuredBox[h]:t.layoutBox[h],g=ze(p);p.min=r[h].min,p.max=p.min+g}):vf(o,t.layoutBox,r)&&Qe(h=>{const p=i?t.measuredBox[h]:t.layoutBox[h],g=ze(r[h]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const a=Rn();dr(a,r,t.layoutBox);const c=Rn();i?dr(c,e.applyTransform(s,!0),t.measuredBox):dr(c,r,t.layoutBox);const l=!mf(a);let u=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:g}=h;if(p&&g){const y=Ae();ur(y,t.layoutBox,p.layoutBox);const f=Ae();ur(f,r,g.layoutBox),pf(y,f)||(u=!0),h.options.layoutRoot&&(e.relativeTarget=f,e.relativeTargetOrigin=y,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function f1(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function h1(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function m1(e){e.clearSnapshot()}function ol(e){e.clearMeasurements()}function il(e){e.isLayoutDirty=!1}function p1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function al(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function g1(e){e.resolveTargetDelta()}function y1(e){e.calcProjection()}function v1(e){e.resetSkewAndRotation()}function x1(e){e.removeLeadSnapshot()}function cl(e,t,n){e.translate=Se(t.translate,0,n),e.scale=Se(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ll(e,t,n,r){e.min=Se(t.min,n.min,r),e.max=Se(t.max,n.max,r)}function b1(e,t,n,r){ll(e.x,t.x,n.x,r),ll(e.y,t.y,n.y,r)}function w1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const S1={duration:.45,ease:[.4,0,.1,1]},dl=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ul=dl("applewebkit/")&&!dl("chrome/")?Math.round:nt;function fl(e){e.min=ul(e.min),e.max=ul(e.max)}function C1(e){fl(e.x),fl(e.y)}function vf(e,t,n){return e==="position"||e==="preserve-aspect"&&!My(rl(t),rl(n),.2)}function E1(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const k1=yf({attachResizeListener:(e,t)=>vr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wo={current:void 0},xf=yf({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wo.current){const e=new k1({});e.mount(window),e.setOptions({layoutScroll:!0}),wo.current=e}return wo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),T1={pan:{Feature:Uy},drag:{Feature:zy,ProjectionNode:xf,MeasureLayout:uf}};function hl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&be.postRender(()=>o(t,Mr(t)))}class A1 extends Wt{mount(){const{current:t}=this.node;t&&(this.unmount=q0(t,(n,r)=>(hl(this.node,r,"Start"),s=>hl(this.node,s,"End"))))}unmount(){}}class P1 extends Wt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Tr(vr(this.node.current,"focus",()=>this.onFocus()),vr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ml(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&be.postRender(()=>o(t,Mr(t)))}class M1 extends Wt{mount(){const{current:t}=this.node;t&&(this.unmount=eg(t,(n,r)=>(ml(this.node,r,"Start"),(s,{success:o})=>ml(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pi=new WeakMap,So=new WeakMap,R1=e=>{const t=pi.get(e.target);t&&t(e)},N1=e=>{e.forEach(R1)};function j1({root:e,...t}){const n=e||document;So.has(n)||So.set(n,{});const r=So.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(N1,{root:e,...t})),r[s]}function V1(e,t,n){const r=j1(t);return pi.set(e,n),r.observe(e),()=>{pi.delete(e),r.unobserve(e)}}const I1={some:0,all:1};class D1 extends Wt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:I1[s]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),p=l?u:h;p&&p(c)};return V1(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(O1(t,n))&&this.startObserver()}unmount(){}}function O1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $1={inView:{Feature:D1},tap:{Feature:M1},focus:{Feature:P1},hover:{Feature:A1}},L1={layout:{ProjectionNode:xf,MeasureLayout:uf}},_1={...Cy,...$1,...T1,...L1},ae=_g(_1,Jg);function F1(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Array(12).fill(0);let gi=1;class B1{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...s}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:gi++,i=this.toasts.find(c=>c.id===o),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...t,id:o,title:r}),{...c,...t,id:o,dismissible:a,title:r}):c):this.addToast({title:r,...s,dismissible:a,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,i;const a=s.then(async l=>{if(i=["resolve",l],A.isValidElement(l))o=!1,this.create({id:r,type:"default",message:l});else if(z1(l)&&!l.ok){o=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${l.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${l.status}`):n.description,y=typeof h=="object"&&!A.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:p,...y})}else if(l instanceof Error){o=!1;const h=typeof n.error=="function"?await n.error(l):n.error,p=typeof n.description=="function"?await n.description(l):n.description,y=typeof h=="object"&&!A.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:p,...y})}else if(n.success!==void 0){o=!1;const h=typeof n.success=="function"?await n.success(l):n.success,p=typeof n.description=="function"?await n.description(l):n.description,y=typeof h=="object"&&!A.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:p,...y})}}).catch(async l=>{if(i=["reject",l],n.error!==void 0){o=!1;const u=typeof n.error=="function"?await n.error(l):n.error,h=typeof n.description=="function"?await n.description(l):n.description,g=typeof u=="object"&&!A.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:h,...g})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((l,u)=>a.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||gi++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const et=new B1,H1=(e,t)=>{const n=(t==null?void 0:t.id)||gi++;return et.addToast({title:e,...t,id:n}),n},z1=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",U1=H1,W1=()=>et.toasts,Z1=()=>et.getActiveToasts(),bf=Object.assign(U1,{success:et.success,info:et.info,warning:et.warning,error:et.error,custom:et.custom,message:et.message,promise:et.promise,dismiss:et.dismiss,loading:et.loading},{getHistory:W1,getToasts:Z1});F1("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const dt=m.forwardRef((e,t)=>{const{alt:n,color:r="currentColor",size:s="1em",weight:o="regular",mirrored:i=!1,children:a,weights:c,...l}=e;return m.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:r,viewBox:"0 0 256 256",transform:i?"scale(-1, 1)":void 0,...l},!!n&&m.createElement("title",null,n),a,c.get(o))});dt.displayName="SSRBase";const K1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),m.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),Sa=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:K1}));Sa.displayName="CaretDownIcon";const Y1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),m.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),wf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:Y1}));wf.displayName="CaretUpIcon";const G1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,44H40A20,20,0,0,0,20,64V224A19.82,19.82,0,0,0,31.56,242.1a20.14,20.14,0,0,0,8.49,1.9,19.91,19.91,0,0,0,12.82-4.72l.12-.11L84.47,212H216a20,20,0,0,0,20-20V64A20,20,0,0,0,216,44Zm-4,144H80a11.93,11.93,0,0,0-7.84,2.92L44,215.23V68H212ZM84,108A12,12,0,0,1,96,96h64a12,12,0,1,1,0,24H96A12,12,0,0,1,84,108Zm0,40a12,12,0,0,1,12-12h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,148Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,64V192a8,8,0,0,1-8,8H80L45.15,230.11A8,8,0,0,1,32,224V64a8,8,0,0,1,8-8H216A8,8,0,0,1,224,64Z",opacity:"0.2"}),m.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.84,15.84,0,0,0,9.25,14.5A16.05,16.05,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM160,152H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,50H40A14,14,0,0,0,26,64V224a13.88,13.88,0,0,0,8.09,12.69A14.11,14.11,0,0,0,40,238a13.87,13.87,0,0,0,9-3.31l.06-.05L82.23,206H216a14,14,0,0,0,14-14V64A14,14,0,0,0,216,50Zm2,142a2,2,0,0,1-2,2H80a6,6,0,0,0-3.92,1.46L41.26,225.53A2,2,0,0,1,38,224V64a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Zm-52-80a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,112Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,144Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,52H40A12,12,0,0,0,28,64V224a11.89,11.89,0,0,0,6.93,10.88A12.17,12.17,0,0,0,40,236a11.89,11.89,0,0,0,7.69-2.83l0,0L81.49,204H216a12,12,0,0,0,12-12V64A12,12,0,0,0,216,52Zm4,140a4,4,0,0,1-4,4H80a4,4,0,0,0-2.62,1L42.56,227.06A4,4,0,0,1,36,224V64a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Zm-56-80a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,112Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,144Z"}))]]),Sf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:G1}));Sf.displayName="ChatTextIcon";const q1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),m.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),Cf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:q1}));Cf.displayName="CheckIcon";const X1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),m.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,6,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"}))]]),Ef=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:X1}));Ef.displayName="MicrophoneIcon";const J1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M56.88,39.93A12,12,0,1,0,39.12,56.07L76,96.64V128a52,52,0,0,0,72.11,48l11.26,12.39A67.34,67.34,0,0,1,128,196a68.07,68.07,0,0,1-68-68,12,12,0,0,0-24,0,92.14,92.14,0,0,0,80,91.22V240a12,12,0,0,0,24,0V219.23a90.39,90.39,0,0,0,35.92-12.68l23.2,25.52a12,12,0,0,0,17.76-16.14ZM128,156a28,28,0,0,1-28-28v-5l29.9,32.89C129.27,156,128.64,156,128,156Zm63-2.42A67.63,67.63,0,0,0,196,128a12,12,0,0,1,24,0,91.48,91.48,0,0,1-6.74,34.61,12,12,0,0,1-22.23-9ZM85.7,33.75A52,52,0,0,1,180,64v56.54a12,12,0,0,1-24,0V64a28,28,0,0,0-50.79-16.28,12,12,0,0,1-19.51-14Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),m.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M213.38,229.92a8,8,0,0,1-11.3-.54l-30.92-34A78.83,78.83,0,0,1,136,207.59V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64.07,64.07,0,0,0,64,64,63.41,63.41,0,0,0,32.21-8.68l-11.1-12.2A48,48,0,0,1,80,128V95.09L42.08,53.38A8,8,0,0,1,53.92,42.62l160,176A8,8,0,0,1,213.38,229.92Zm-24.19-63.13a7.88,7.88,0,0,0,3.51.82,8,8,0,0,0,7.19-4.49A79.16,79.16,0,0,0,208,128a8,8,0,0,0-16,0,63.32,63.32,0,0,1-6.48,28.09A8,8,0,0,0,189.19,166.79Zm-27.33-29.22A8,8,0,0,0,175.74,133a49.49,49.49,0,0,0,.26-5V64A48,48,0,0,0,84,44.87a8,8,0,0,0,1.41,8.57Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M212.44,220,52.44,44A6,6,0,0,0,43.56,52L82,94.32V128a46,46,0,0,0,67.56,40.64l13.75,15.12A65.26,65.26,0,0,1,128,194a66.08,66.08,0,0,1-66-66,6,6,0,0,0-12,0,78.09,78.09,0,0,0,72,77.75V240a6,6,0,0,0,12,0V205.77a76.93,76.93,0,0,0,37.48-13L203.56,228a6,6,0,0,0,8.88-8.08ZM128,162a34,34,0,0,1-34-34V107.52l47.12,51.84A33.82,33.82,0,0,1,128,162Zm59.32-5A65.38,65.38,0,0,0,194,128a6,6,0,0,1,12,0,77.33,77.33,0,0,1-7.9,34.25A6,6,0,1,1,187.32,157ZM85.8,45.67A46,46,0,0,1,174,64v64a45.17,45.17,0,0,1-.25,4.81,6,6,0,0,1-6,5.38q-.31,0-.63,0a6,6,0,0,1-5.34-6.59A35.41,35.41,0,0,0,162,128V64A34,34,0,0,0,96.8,50.45a6,6,0,0,1-11-4.78Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M211,221.31,51,45.31A4,4,0,0,0,45,50.69L84,93.55V128a44,44,0,0,0,66,38.12l16.38,18A67.21,67.21,0,0,1,128,196a68.07,68.07,0,0,1-68-68,4,4,0,0,0-8,0,76.09,76.09,0,0,0,72,75.89V240a4,4,0,0,0,8,0V203.89a75.1,75.1,0,0,0,39.79-13.77L205,226.69a4,4,0,1,0,5.92-5.38ZM128,164a36,36,0,0,1-36-36V102.35L144.43,160A35.83,35.83,0,0,1,128,164Zm61.12-6.15A67.44,67.44,0,0,0,196,128a4,4,0,0,1,8,0,75.28,75.28,0,0,1-7.7,33.37,4,4,0,0,1-7.18-3.52ZM87.63,46.46A44,44,0,0,1,172,64v64a44.2,44.2,0,0,1-.24,4.61,4,4,0,0,1-4,3.58l-.42,0a4,4,0,0,1-3.57-4.39A36.67,36.67,0,0,0,164,128V64A36,36,0,0,0,95,49.66a4,4,0,0,1-7.34-3.2Z"}))]]),kf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:J1}));kf.displayName="MicrophoneSlashIcon";const Q1=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,36H48A28,28,0,0,0,20,64V176a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V64A28,28,0,0,0,208,36Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40,52a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,228ZM160.49,103.51a12,12,0,0,1-17,17L140,117v35a12,12,0,0,1-24,0V117l-3.51,3.52a12,12,0,0,1-17-17l24-24a12,12,0,0,1,17,0Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,64V176a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208A16,16,0,0,1,224,64Z",opacity:"0.2"}),m.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M168,224a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64Zm-74.34,42.34-24-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,11.32,11.32L120,107.31V152a8,8,0,0,0,16,0V107.31l10.34,10.35a8,8,0,0,0,11.32-11.32Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Zm-9.76-116.24a6,6,0,1,1-8.48,8.48L134,102.49V152a6,6,0,0,1-12,0V102.49l-13.76,13.75a6,6,0,0,1-8.48-8.48l24-24a6,6,0,0,1,8.48,0Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Zm-9.17-114.83a4,4,0,0,1-5.66,5.66L132,97.66V152a4,4,0,0,1-8,0V97.66l-17.17,17.17a4,4,0,0,1-5.66-5.66l24-24a4,4,0,0,1,5.66,0Z"}))]]),Tf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:Q1}));Tf.displayName="MonitorArrowUpIcon";const ev=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),m.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),Ca=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:ev}));Ca.displayName="SpinnerIcon";const tv=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V167.57l24.94,18.14A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM188,180H36V76H188Zm44-27.57-20-14.54V118.11l20-14.54Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),m.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M192,72V184a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V72A16,16,0,0,1,32,56H176A16,16,0,0,1,192,72Zm58,.25a8.23,8.23,0,0,0-6.63,1.22L209.78,95.86A4,4,0,0,0,208,99.19v57.62a4,4,0,0,0,1.78,3.33l33.78,22.52a8,8,0,0,0,8.58.19,8.33,8.33,0,0,0,3.86-7.17V80A8,8,0,0,0,250,72.25Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V155.21L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM194,184a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2Zm48-19.21-36-24V115.21l36-24Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V151.47l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM196,184a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4Zm48-15.47-40-26.67V114.14l40-26.67Z"}))]]),Af=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:tv}));Af.displayName="VideoCameraIcon";const nv=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H123.88a12,12,0,0,0,0,24H188v68a12,12,0,0,0,4.46,9.33c.15.13.31.25.48.38l44,32A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM232,152.43l-20-14.54V118.11l20-14.54ZM56.88,31.93A12,12,0,1,0,39.12,48.07L42.69,52H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H180.87l18.25,20.07a12,12,0,0,0,17.76-16.14ZM36,180V76H64.51l94.55,104Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),m.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M256,80.23v95.45a8.33,8.33,0,0,1-3.86,7.17,8,8,0,0,1-8.58-.19l-33.78-22.52a4,4,0,0,1-1.78-3.33V99.19a4,4,0,0,1,1.78-3.32l33.78-22.53a8,8,0,0,1,9.73.66A8.23,8.23,0,0,1,256,80.23ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM185,155.07a4,4,0,0,0,7-2.7V72a16,16,0,0,0-16-16H104a4,4,0,0,0-3,6.69Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H113.06a6,6,0,0,0,0,12H192a2,2,0,0,1,2,2v87.63a6,6,0,0,0,12,0v-4.42L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM242,164.79l-36-24V115.21l36-24ZM52.44,36A6,6,0,0,0,43.56,44L56.25,58H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H183.53l20,22a6,6,0,0,0,8.88-8.08ZM32,186a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H67.16L172.62,186Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H113.06a4,4,0,0,0,0,8H192a4,4,0,0,1,4,4v87.63a4,4,0,0,0,8,0v-8.16l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM244,168.53l-40-26.67V114.14l40-26.67ZM51,37.31A4,4,0,0,0,45,42.69L60.78,60H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H184.41L205,218.69a4,4,0,1,0,5.92-5.38ZM32,188a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H68.05L177.14,188Z"}))]]),Pf=m.forwardRef((e,t)=>m.createElement(dt,{ref:t,...e,weights:nv}));Pf.displayName="VideoCameraSlashIcon";const rv=new Map([["bold",m.createElement(m.Fragment,null,m.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",m.createElement(m.Fragment,null,m.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),m.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",m.createElement(m.Fragment,null,m.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",m.createElement(m.Fragment,null,m.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",m.createElement(m.Fragment,null,m.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",m.createElement(m.Fragment,null,m.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),sv=A.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Mf=m.forwardRef((e,t)=>{const{alt:n,color:r,size:s,weight:o,mirrored:i,children:a,weights:c,...l}=e,{color:u="currentColor",size:h,weight:p="regular",mirrored:g=!1,...y}=m.useContext(sv);return m.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:s??h,height:s??h,fill:r??u,viewBox:"0 0 256 256",transform:i||g?"scale(-1, 1)":void 0,...y,...l},!!n&&m.createElement("title",null,n),a,c.get(o??p))});Mf.displayName="IconBase";const Rf=m.forwardRef((e,t)=>m.createElement(Mf,{ref:t,...e,weights:rv}));Rf.displayName="WarningIcon";const Ea="-",ov=e=>{const t=av(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Ea);return a[0]===""&&a.length!==1&&a.shift(),Nf(a,t)||iv(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},Nf=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Nf(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Ea);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},pl=/^\[(.+)\]$/,iv=e=>{if(pl.test(e)){const t=pl.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},av=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const s in n)yi(n[s],r,s,t);return r},yi=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:gl(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(cv(s)){yi(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{yi(i,gl(t,o),n,r)})})},gl=(e,t)=>{let n=e;return t.split(Ea).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},cv=e=>e.isThemeGetter,lv=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},vi="!",xi=":",dv=xi.length,uv=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let i=0,a=0,c=0,l;for(let y=0;y<s.length;y++){let f=s[y];if(i===0&&a===0){if(f===xi){o.push(s.slice(c,y)),c=y+dv;continue}if(f==="/"){l=y;continue}}f==="["?i++:f==="]"?i--:f==="("?a++:f===")"&&a--}const u=o.length===0?s:s.substring(c),h=fv(u),p=h!==u,g=l&&l>c?l-c:void 0;return{modifiers:o,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:g}};if(t){const s=t+xi,o=r;r=i=>i.startsWith(s)?o(i.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},fv=e=>e.endsWith(vi)?e.substring(0,e.length-1):e.startsWith(vi)?e.substring(1):e,hv=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let o=[];return r.forEach(i=>{i[0]==="["||t[i]?(s.push(...o.sort(),i),o=[]):o.push(i)}),s.push(...o.sort()),s}},mv=e=>({cache:lv(e.cacheSize),parseClassName:uv(e),sortModifiers:hv(e),...ov(e)}),pv=/\s+/,gv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,i=[],a=e.trim().split(pv);let c="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{isExternal:h,modifiers:p,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:f}=n(u);if(h){c=u+(c.length>0?" "+c:c);continue}let v=!!f,w=r(v?y.substring(0,f):y);if(!w){if(!v){c=u+(c.length>0?" "+c:c);continue}if(w=r(y),!w){c=u+(c.length>0?" "+c:c);continue}v=!1}const b=o(p).join(":"),S=g?b+vi:b,C=S+w;if(i.includes(C))continue;i.push(C);const E=s(w,v);for(let T=0;T<E.length;++T){const k=E[T];i.push(S+k)}c=u+(c.length>0?" "+c:c)}return c};function yv(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=jf(t))&&(r&&(r+=" "),r+=n);return r}const jf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=jf(e[r]))&&(n&&(n+=" "),n+=t);return n};function vv(e,...t){let n,r,s,o=i;function i(c){const l=t.reduce((u,h)=>h(u),e());return n=mv(l),r=n.cache.get,s=n.cache.set,o=a,a(c)}function a(c){const l=r(c);if(l)return l;const u=gv(c,n);return s(c,u),u}return function(){return o(yv.apply(null,arguments))}}const Ie=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Vf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,If=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xv=/^\d+\/\d+$/,bv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Sv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Cv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ev=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mn=e=>xv.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),Ot=e=>!!e&&Number.isInteger(Number(e)),Co=e=>e.endsWith("%")&&oe(e.slice(0,-1)),kt=e=>bv.test(e),kv=()=>!0,Tv=e=>wv.test(e)&&!Sv.test(e),Df=()=>!1,Av=e=>Cv.test(e),Pv=e=>Ev.test(e),Mv=e=>!Q(e)&&!ee(e),Rv=e=>Kn(e,Lf,Df),Q=e=>Vf.test(e),Jt=e=>Kn(e,_f,Tv),Eo=e=>Kn(e,Dv,oe),yl=e=>Kn(e,Of,Df),Nv=e=>Kn(e,$f,Pv),Br=e=>Kn(e,Ff,Av),ee=e=>If.test(e),tr=e=>Yn(e,_f),jv=e=>Yn(e,Ov),vl=e=>Yn(e,Of),Vv=e=>Yn(e,Lf),Iv=e=>Yn(e,$f),Hr=e=>Yn(e,Ff,!0),Kn=(e,t,n)=>{const r=Vf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Yn=(e,t,n=!1)=>{const r=If.exec(e);return r?r[1]?t(r[1]):n:!1},Of=e=>e==="position"||e==="percentage",$f=e=>e==="image"||e==="url",Lf=e=>e==="length"||e==="size"||e==="bg-size",_f=e=>e==="length",Dv=e=>e==="number",Ov=e=>e==="family-name",Ff=e=>e==="shadow",$v=()=>{const e=Ie("color"),t=Ie("font"),n=Ie("text"),r=Ie("font-weight"),s=Ie("tracking"),o=Ie("leading"),i=Ie("breakpoint"),a=Ie("container"),c=Ie("spacing"),l=Ie("radius"),u=Ie("shadow"),h=Ie("inset-shadow"),p=Ie("text-shadow"),g=Ie("drop-shadow"),y=Ie("blur"),f=Ie("perspective"),v=Ie("aspect"),w=Ie("ease"),b=Ie("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...C(),ee,Q],T=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],P=()=>[ee,Q,c],$=()=>[mn,"full","auto",...P()],x=()=>[Ot,"none","subgrid",ee,Q],I=()=>["auto",{span:["full",Ot,ee,Q]},Ot,ee,Q],_=()=>[Ot,"auto",ee,Q],K=()=>["auto","min","max","fr",ee,Q],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...P()],U=()=>[mn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],M=()=>[e,ee,Q],q=()=>[...C(),vl,yl,{position:[ee,Q]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",Vv,Rv,{size:[ee,Q]}],Z=()=>[Co,tr,Jt],R=()=>["","none","full",l,ee,Q],B=()=>["",oe,tr,Jt],z=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>[oe,Co,vl,yl],F=()=>["","none",y,ee,Q],W=()=>["none",oe,ee,Q],L=()=>["none",oe,ee,Q],J=()=>[oe,ee,Q],O=()=>[mn,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[kt],breakpoint:[kt],color:[kv],container:[kt],"drop-shadow":[kt],ease:["in","out","in-out"],font:[Mv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[kt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[kt],shadow:[kt],spacing:["px",oe],text:[kt],"text-shadow":[kt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mn,Q,ee,v]}],container:["container"],columns:[{columns:[oe,Q,ee,a]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Ot,"auto",ee,Q]}],basis:[{basis:[mn,"full","auto",a,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,mn,"auto","initial","none",Q]}],grow:[{grow:["",oe,ee,Q]}],shrink:[{shrink:["",oe,ee,Q]}],order:[{order:[Ot,"first","last","none",ee,Q]}],"grid-cols":[{"grid-cols":x()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":x()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[a,"screen",...U()]}],"min-w":[{"min-w":[a,"screen","none",...U()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,tr,Jt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ee,Eo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Co,Q]}],"font-family":[{font:[jv,Q,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ee,Q]}],"line-clamp":[{"line-clamp":[oe,"none",ee,Eo]}],leading:[{leading:[o,...P()]}],"list-image":[{"list-image":["none",ee,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",ee,Jt]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[oe,"auto",ee,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ot,ee,Q],radial:["",ee,Q],conic:[Ot,ee,Q]},Iv,Nv]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[oe,ee,Q]}],"outline-w":[{outline:["",oe,tr,Jt]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",u,Hr,Br]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",h,Hr,Br]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[oe,Jt]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",p,Hr,Br]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[oe,ee,Q]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":j()}],"mask-image-linear-to-pos":[{"mask-linear-to":j()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":j()}],"mask-image-t-to-pos":[{"mask-t-to":j()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":j()}],"mask-image-r-to-pos":[{"mask-r-to":j()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":j()}],"mask-image-b-to-pos":[{"mask-b-to":j()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":j()}],"mask-image-l-to-pos":[{"mask-l-to":j()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":j()}],"mask-image-x-to-pos":[{"mask-x-to":j()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":j()}],"mask-image-y-to-pos":[{"mask-y-to":j()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[ee,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":j()}],"mask-image-radial-to-pos":[{"mask-radial-to":j()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":j()}],"mask-image-conic-to-pos":[{"mask-conic-to":j()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Q]}],filter:[{filter:["","none",ee,Q]}],blur:[{blur:F()}],brightness:[{brightness:[oe,ee,Q]}],contrast:[{contrast:[oe,ee,Q]}],"drop-shadow":[{"drop-shadow":["","none",g,Hr,Br]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",oe,ee,Q]}],"hue-rotate":[{"hue-rotate":[oe,ee,Q]}],invert:[{invert:["",oe,ee,Q]}],saturate:[{saturate:[oe,ee,Q]}],sepia:[{sepia:["",oe,ee,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Q]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[oe,ee,Q]}],"backdrop-contrast":[{"backdrop-contrast":[oe,ee,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,ee,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,ee,Q]}],"backdrop-invert":[{"backdrop-invert":["",oe,ee,Q]}],"backdrop-opacity":[{"backdrop-opacity":[oe,ee,Q]}],"backdrop-saturate":[{"backdrop-saturate":[oe,ee,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,ee,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",ee,Q]}],ease:[{ease:["linear","initial",w,ee,Q]}],delay:[{delay:[oe,ee,Q]}],animate:[{animate:["none",b,ee,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,ee,Q]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:L()}],"scale-x":[{"scale-x":L()}],"scale-y":[{"scale-y":L()}],"scale-z":[{"scale-z":L()}],"scale-3d":["scale-3d"],skew:[{skew:J()}],"skew-x":[{"skew-x":J()}],"skew-y":[{"skew-y":J()}],transform:[{transform:[ee,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:O()}],"translate-x":[{"translate-x":O()}],"translate-y":[{"translate-y":O()}],"translate-z":[{"translate-z":O()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,Q]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[oe,tr,Jt,Eo]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Lv=vv($v);function ne(...e){return Lv(Bi.clsx(e))}function _v(e,t){return{id:e.streamInfo.id,timestamp:e.streamInfo.timestamp,message:e.text,from:e.participantInfo.identity===t.localParticipant.identity?t.localParticipant:Array.from(t.remoteParticipants.values()).find(n=>n.identity===e.participantInfo.identity)}}const Fv=Ms.cva(["relative w-full rounded-lg border px-4 py-3 text-sm grid grid-cols-[0_1fr] gap-y-0.5 items-start","has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current"],{variants:{variant:{default:"bg-card text-card-foreground",destructive:["text-destructive-foreground bg-destructive border-destructive-border","[&>svg]:text-current *:data-[slot=alert-description]:text-destructive-foreground/90"]}},defaultVariants:{variant:"default"}});function Bv({className:e,variant:t,...n}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:ne(Fv({variant:t}),e),...n})}function Hv({className:e,...t}){return d.jsx("div",{"data-slot":"alert-title",className:ne("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function zv({className:e,...t}){return d.jsx("div",{"data-slot":"alert-description",className:ne("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function zr(e){return bf.custom(t=>d.jsx(Uv,{id:t,title:e.title,description:e.description}),{duration:1e4})}function Uv(e){const{title:t,id:n,description:r}=e;return d.jsxs(Bv,{onClick:()=>bf.dismiss(n),className:"bg-gradient-to-br from-[#181825] to-[#232336] border border-[#232336] shadow-lg shadow-black/40 rounded-xl px-4 py-3 flex items-start gap-3 hover:shadow-xl transition-all duration-200",style:{color:"#F3F4F6"},children:[d.jsx(Rf,{weight:"bold",className:"text-yellow-400 mt-1 flex-shrink-0",size:24}),d.jsxs("div",{className:"flex flex-col",children:[d.jsx(Hv,{className:"text-base font-semibold text-white mb-1",children:t}),d.jsx(zv,{className:"text-sm text-gray-300 leading-snug",children:r})]})]})}function xl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Bf(...e){return t=>{let n=!1;const r=e.map(s=>{const o=xl(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():xl(e[s],null)}}}}function Le(...e){return m.useCallback(Bf(...e),e)}function xr(e){const t=Zv(e),n=m.forwardRef((r,s)=>{const{children:o,...i}=r,a=m.Children.toArray(o),c=a.find(Yv);if(c){const l=c.props.children,u=a.map(h=>h===c?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:h);return d.jsx(t,{...i,ref:s,children:m.isValidElement(l)?m.cloneElement(l,void 0,u):null})}return d.jsx(t,{...i,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var Wv=xr("Slot");function Zv(e){const t=m.forwardRef((n,r)=>{const{children:s,...o}=n;if(m.isValidElement(s)){const i=qv(s),a=Gv(o,s.props);return s.type!==m.Fragment&&(a.ref=r?Bf(r,i):i),m.cloneElement(s,a)}return m.Children.count(s)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kv=Symbol("radix.slottable");function Yv(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kv}function Gv(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const c=o(...a);return s(...a),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function qv(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Xv=Ms.cva(["text-xs font-bold tracking-wider uppercase whitespace-nowrap","inline-flex items-center justify-center gap-2 shrink-0 rounded-full cursor-pointer outline-none transition-colors duration-300","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50","aria-invalid:ring-destructive/20 aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40 ","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button text-button-foreground hover:bg-muted focus:bg-muted",destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive-hover focus:bg-destructive-hover focus-visible:ring-destructive-foreground/20","dark:focus-visible:ring-destructive-foreground/40"],outline:["border bg-background","hover:bg-accent hover:text-accent-foreground","dark:bg-input/30 dark:border-input dark:hover:bg-input/50"],primary:"",secondary:"bg-secondary text-secondary-foregroun hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Jv({className:e,variant:t,size:n,asChild:r=!1,...s}){const o=r?Wv:"button";return d.jsx(o,{"data-slot":"button",className:ne(Xv({variant:t,size:n,className:e})),...s})}function Qv({onSend:e,className:t,disabled:n,...r}){const s=A.useRef(null),[o,i]=A.useState(""),a=l=>{var u,h;l.preventDefault(),(u=r.onSubmit)==null||u.call(r,l),e==null||e(o),i(""),(h=s.current)==null||h.focus({preventScroll:!0})},c=n||o.trim().length===0;return d.jsxs("form",{...r,onSubmit:a,className:ne("flex items-center rounded-md pl-1 text-sm",t),children:[d.jsx("input",{ref:s,type:"text",className:"flex-1 focus:outline-none",placeholder:"Type something...",value:o,onChange:l=>i(l.target.value),disabled:n}),d.jsx(Jv,{size:"sm",type:"submit",variant:c?"secondary":"primary",disabled:c,className:"font-mono",children:"SEND"})]})}function Pe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}var We=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},ex=m[" useInsertionEffect ".trim().toString()]||We;function bi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,i]=tx({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:s;{const u=m.useRef(e!==void 0);m.useEffect(()=>{const h=u.current;h!==a&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${a?"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.`),u.current=a},[a,r])}const l=m.useCallback(u=>{var h;if(a){const p=nx(u)?u(e):u;p!==e&&((h=i.current)==null||h.call(i,p))}else o(u)},[a,e,o,i]);return[c,l]}function tx({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),s=m.useRef(n),o=m.useRef(t);return ex(()=>{o.current=t},[t]),m.useEffect(()=>{var i;s.current!==n&&((i=o.current)==null||i.call(o,n),s.current=n)},[n,s]),[n,r,o]}function nx(e){return typeof e=="function"}var rx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Te=rx.reduce((e,t)=>{const n=xr(`Primitive.${t}`),r=m.forwardRef((s,o)=>{const{asChild:i,...a}=s,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function sx(e,t){e&&Rs.flushSync(()=>e.dispatchEvent(t))}var Hf="Toggle",zf=m.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:s,...o}=e,[i,a]=bi({prop:n,onChange:s,defaultProp:r??!1,caller:Hf});return d.jsx(Te.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:Pe(e.onClick,()=>{e.disabled||a(!i)})})});zf.displayName=Hf;var ox=zf;const ix=Ms.cva(["inline-flex items-center justify-center gap-2 rounded-full","text-sm font-medium whitespace-nowrap","cursor-pointer outline-none transition-[color,border,background-color]","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0 aria-invalid:border-0","disabled:pointer-events-none disabled:opacity-50 disabled:not-allowed","data-[state=on]:bg-button-selected data-[state=on]:border-button-border-selected","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button hover:bg-muted focus:bg-muted hover:text-muted-foreground focus:text-muted-foreground",primary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=off]:bg-button-primary hover:data-[state=off]:bg-button-hover data-[state=off]:text-button-primary-foreground",secondary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=on]:bg-button-secondary hover:data-[state=on]:bg-button-secondary data-[state=on]:text-button-secondary-foreground",outline:["border border-button-border bg-button text-button-foreground","hover:bg-background focus:bg-background"]},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Uf({className:e,variant:t,size:n,...r}){return d.jsx(ox,{"data-slot":"toggle",className:ne(ix({variant:t,size:n,className:e})),...r})}function ax(e){const[t,n]=A.useState(()=>e.getPublishPermissions());return A.useEffect(()=>{const r=()=>{n(e.getPublishPermissions())},s=()=>{r()};return e.on("connection.connected",s),e.on("connection.disconnected",s),()=>{e.off("connection.connected",s),e.off("connection.disconnected",s)}},[e]),t}function cx(e){const[t,n]=A.useState(()=>e.getLocalParticipant()),[r,s]=A.useState(()=>e.getMicrophoneTrack());return A.useEffect(()=>{const o=()=>{const a=e.getLocalParticipant(),c=e.getMicrophoneTrack();console.log("🎤 useVoxketLocalParticipant: Updating state:",{hasParticipant:!!a,hasMicTrack:!!c,isMicEnabled:e.isMicrophoneEnabled,trackPublications:a?a.trackPublications.size:0}),n(a),s(c)};o(),e.on("connection.connected",o),e.on("connection.disconnected",o),e.on("track.muted",o),e.on("track.unmuted",o);const i=e.getRoom();if(i){const a=()=>{console.log("🎤 Track published, updating participant state"),o()},c=()=>{console.log("🎤 Track unpublished, updating participant state"),o()};return i.on("localTrackPublished",a),i.on("localTrackUnpublished",c),()=>{e.off("connection.connected",o),e.off("connection.disconnected",o),e.off("track.muted",o),e.off("track.unmuted",o),i.off("localTrackPublished",a),i.off("localTrackUnpublished",c)}}else return()=>{e.off("connection.connected",o),e.off("connection.disconnected",o),e.off("track.muted",o),e.off("track.unmuted",o)}},[e]),{localParticipant:t,microphoneTrack:r}}function ko(e,t,n){const[r,s]=A.useState(!1),[o,i]=A.useState(!1);return A.useEffect(()=>{const c=()=>{let l=!1;switch(t){case"microphone":l=e.isMicrophoneEnabled;break;case"camera":l=e.isCameraEnabled;break;case"screenShare":l=e.isScreenShareEnabled;break}console.log(`useVoxketTrackToggle: ${t} enabled state updated to:`,l),s(l)};return c(),e.on("track.muted",c),e.on("track.unmuted",c),e.on("connection.connected",c),()=>{e.off("track.muted",c),e.off("track.unmuted",c),e.off("connection.connected",c)}},[e,t]),{enabled:r,pending:o,toggle:async c=>{var l;try{i(!0);const u=c!==void 0?c:!r;switch(t){case"microphone":await e.toggleMicrophone(u);break;case"camera":await e.toggleCamera(u);break;case"screenShare":u?await e.startScreenShare():await e.stopScreenShare();break}}catch(u){(l=n==null?void 0:n.onDeviceError)==null||l.call(n,u)}finally{i(!1)}}}}function lx(e){const[t,n]=A.useState(()=>e.getRoom()),[r,s]=A.useState(()=>e.getConnectionState());return A.useEffect(()=>{const o=()=>{n(e.getRoom()),s(e.getConnectionState())};return e.on("connection.connected",o),e.on("connection.disconnected",o),e.on("connection.connecting",o),()=>{e.off("connection.connected",o),e.off("connection.disconnected",o),e.off("connection.connecting",o)}},[e]),t}function dx(e,t){const[n,r]=A.useState([]),[s,o]=A.useState("");return A.useEffect(()=>{var l;const a=async()=>{try{const u=t==="audioinput"?await e.getAudioInputDevices():await e.getVideoInputDevices();r(u)}catch(u){console.error("Failed to load devices:",u)}};a();const c=()=>{a()};return(l=navigator.mediaDevices)==null||l.addEventListener("devicechange",c),()=>{var u;(u=navigator.mediaDevices)==null||u.removeEventListener("devicechange",c)}},[e,t]),{devices:n,activeDeviceId:s,setActiveMediaDevice:async a=>{try{t==="audioinput"?await e.setAudioInputDevice(a):await e.setVideoInputDevice(a),o(a)}catch(c){console.error("Failed to set device:",c)}}}}function ux(e){const{preventSave:t=!1}=e||{};return{saveAudioInputEnabled:i=>{t||localStorage.setItem("voxket-audio-input-enabled",i.toString())},saveAudioInputDeviceId:i=>{t||localStorage.setItem("voxket-audio-input-device-id",i)},saveVideoInputEnabled:i=>{t||localStorage.setItem("voxket-video-input-enabled",i.toString())},saveVideoInputDeviceId:i=>{t||localStorage.setItem("voxket-video-input-device-id",i)}}}function bl(e,[t,n]){return Math.min(n,Math.max(t,e))}function ka(e,t=[]){let n=[];function r(o,i){const a=m.createContext(i),c=n.length;n=[...n,i];const l=h=>{var w;const{scope:p,children:g,...y}=h,f=((w=p==null?void 0:p[e])==null?void 0:w[c])||a,v=m.useMemo(()=>y,Object.values(y));return d.jsx(f.Provider,{value:v,children:g})};l.displayName=o+"Provider";function u(h,p){var f;const g=((f=p==null?void 0:p[e])==null?void 0:f[c])||a,y=m.useContext(g);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[l,u]}const s=()=>{const o=n.map(i=>m.createContext(i));return function(a){const c=(a==null?void 0:a[e])||o;return m.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[r,fx(s,...t)]}function fx(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const h=c(o)[`__scope${l}`];return{...a,...h}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function hx(e){const t=e+"CollectionProvider",[n,r]=ka(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=f=>{const{scope:v,children:w}=f,b=A.useRef(null),S=A.useRef(new Map).current;return d.jsx(s,{scope:v,itemMap:S,collectionRef:b,children:w})};i.displayName=t;const a=e+"CollectionSlot",c=xr(a),l=A.forwardRef((f,v)=>{const{scope:w,children:b}=f,S=o(a,w),C=Le(v,S.collectionRef);return d.jsx(c,{ref:C,children:b})});l.displayName=a;const u=e+"CollectionItemSlot",h="data-radix-collection-item",p=xr(u),g=A.forwardRef((f,v)=>{const{scope:w,children:b,...S}=f,C=A.useRef(null),E=Le(v,C),T=o(u,w);return A.useEffect(()=>(T.itemMap.set(C,{ref:C,...S}),()=>void T.itemMap.delete(C))),d.jsx(p,{[h]:"",ref:E,children:b})});g.displayName=u;function y(f){const v=o(e+"CollectionConsumer",f);return A.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const S=Array.from(b.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((T,k)=>S.indexOf(T.ref.current)-S.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:l,ItemSlot:g},y,r]}var mx=m.createContext(void 0);function px(e){const t=m.useContext(mx);return e||t||"ltr"}function cn(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function gx(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e);m.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var yx="DismissableLayer",wi="dismissableLayer.update",vx="dismissableLayer.pointerDownOutside",xx="dismissableLayer.focusOutside",wl,Wf=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zf=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...c}=e,l=m.useContext(Wf),[u,h]=m.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=m.useState({}),y=Le(t,k=>h(k)),f=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=f.indexOf(v),b=u?f.indexOf(u):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,C=b>=w,E=Sx(k=>{const P=k.target,$=[...l.branches].some(x=>x.contains(P));!C||$||(s==null||s(k),i==null||i(k),k.defaultPrevented||a==null||a())},p),T=Cx(k=>{const P=k.target;[...l.branches].some(x=>x.contains(P))||(o==null||o(k),i==null||i(k),k.defaultPrevented||a==null||a())},p);return gx(k=>{b===l.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},p),m.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(wl=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Sl(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=wl)}},[u,p,n,l]),m.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Sl())},[u,l]),m.useEffect(()=>{const k=()=>g({});return document.addEventListener(wi,k),()=>document.removeEventListener(wi,k)},[]),d.jsx(Te.div,{...c,ref:y,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:Pe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Pe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Pe(e.onPointerDownCapture,E.onPointerDownCapture)})});Zf.displayName=yx;var bx="DismissableLayerBranch",wx=m.forwardRef((e,t)=>{const n=m.useContext(Wf),r=m.useRef(null),s=Le(t,r);return m.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),d.jsx(Te.div,{...e,ref:s})});wx.displayName=bx;function Sx(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let c=function(){Kf(vx,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Cx(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=m.useRef(!1);return m.useEffect(()=>{const s=o=>{o.target&&!r.current&&Kf(xx,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Sl(){const e=new CustomEvent(wi);document.dispatchEvent(e)}function Kf(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?sx(s,o):s.dispatchEvent(o)}var To=0;function Ex(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Cl()),document.body.insertAdjacentElement("beforeend",e[1]??Cl()),To++,()=>{To===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),To--}},[])}function Cl(){const 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 Ao="focusScope.autoFocusOnMount",Po="focusScope.autoFocusOnUnmount",El={bubbles:!1,cancelable:!0},kx="FocusScope",Yf=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,c]=m.useState(null),l=cn(s),u=cn(o),h=m.useRef(null),p=Le(t,f=>c(f)),g=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let f=function(S){if(g.paused||!a)return;const C=S.target;a.contains(C)?h.current=C:Lt(h.current,{select:!0})},v=function(S){if(g.paused||!a)return;const C=S.relatedTarget;C!==null&&(a.contains(C)||Lt(h.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Lt(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const b=new MutationObserver(w);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),b.disconnect()}}},[r,a,g.paused]),m.useEffect(()=>{if(a){Tl.add(g);const f=document.activeElement;if(!a.contains(f)){const w=new CustomEvent(Ao,El);a.addEventListener(Ao,l),a.dispatchEvent(w),w.defaultPrevented||(Tx(Nx(Gf(a)),{select:!0}),document.activeElement===f&&Lt(a))}return()=>{a.removeEventListener(Ao,l),setTimeout(()=>{const w=new CustomEvent(Po,El);a.addEventListener(Po,u),a.dispatchEvent(w),w.defaultPrevented||Lt(f??document.body,{select:!0}),a.removeEventListener(Po,u),Tl.remove(g)},0)}}},[a,l,u,g]);const y=m.useCallback(f=>{if(!n&&!r||g.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,w=document.activeElement;if(v&&w){const b=f.currentTarget,[S,C]=Ax(b);S&&C?!f.shiftKey&&w===C?(f.preventDefault(),n&&Lt(S,{select:!0})):f.shiftKey&&w===S&&(f.preventDefault(),n&&Lt(C,{select:!0})):w===b&&f.preventDefault()}},[n,r,g.paused]);return d.jsx(Te.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Yf.displayName=kx;function Tx(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lt(r,{select:t}),document.activeElement!==n)return}function Ax(e){const t=Gf(e),n=kl(t,e),r=kl(t.reverse(),e);return[n,r]}function Gf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function kl(e,t){for(const n of e)if(!Px(n,{upTo:t}))return n}function Px(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 Mx(e){return e instanceof HTMLInputElement&&"select"in e}function Lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mx(e)&&t&&e.select()}}var Tl=Rx();function Rx(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Al(e,t),e.unshift(t)},remove(t){var n;e=Al(e,t),(n=e[0])==null||n.resume()}}}function Al(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nx(e){return e.filter(t=>t.tagName!=="A")}var jx=m[" useId ".trim().toString()]||(()=>{}),Vx=0;function Ta(e){const[t,n]=m.useState(jx());return We(()=>{n(r=>r??String(Vx++))},[e]),e||(t?`radix-${t}`:"")}const Ix=["top","right","bottom","left"],Bt=Math.min,Ke=Math.max,bs=Math.round,Ur=Math.floor,bt=e=>({x:e,y:e}),Dx={left:"right",right:"left",bottom:"top",top:"bottom"},Ox={start:"end",end:"start"};function Si(e,t,n){return Ke(e,Bt(t,n))}function jt(e,t){return typeof e=="function"?e(t):e}function Vt(e){return e.split("-")[0]}function Gn(e){return e.split("-")[1]}function Aa(e){return e==="x"?"y":"x"}function Pa(e){return e==="y"?"height":"width"}const $x=new Set(["top","bottom"]);function yt(e){return $x.has(Vt(e))?"y":"x"}function Ma(e){return Aa(yt(e))}function Lx(e,t,n){n===void 0&&(n=!1);const r=Gn(e),s=Ma(e),o=Pa(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ws(i)),[i,ws(i)]}function _x(e){const t=ws(e);return[Ci(e),t,Ci(t)]}function Ci(e){return e.replace(/start|end/g,t=>Ox[t])}const Pl=["left","right"],Ml=["right","left"],Fx=["top","bottom"],Bx=["bottom","top"];function Hx(e,t,n){switch(e){case"top":case"bottom":return n?t?Ml:Pl:t?Pl:Ml;case"left":case"right":return t?Fx:Bx;default:return[]}}function zx(e,t,n,r){const s=Gn(e);let o=Hx(Vt(e),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Ci)))),o}function ws(e){return e.replace(/left|right|bottom|top/g,t=>Dx[t])}function Ux(e){return{top:0,right:0,bottom:0,left:0,...e}}function qf(e){return typeof e!="number"?Ux(e):{top:e,right:e,bottom:e,left:e}}function Ss(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Rl(e,t,n){let{reference:r,floating:s}=e;const o=yt(t),i=Ma(t),a=Pa(i),c=Vt(t),l=o==="y",u=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let g;switch(c){case"top":g={x:u,y:r.y-s.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-s.width,y:h};break;default:g={x:r.x,y:r.y}}switch(Gn(t)){case"start":g[i]-=p*(n&&l?-1:1);break;case"end":g[i]+=p*(n&&l?-1:1);break}return g}const Wx=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:h}=Rl(l,r,c),p=r,g={},y=0;for(let f=0;f<a.length;f++){const{name:v,fn:w}=a[f],{x:b,y:S,data:C,reset:E}=await w({x:u,y:h,initialPlacement:r,placement:p,strategy:s,middlewareData:g,rects:l,platform:i,elements:{reference:e,floating:t}});u=b??u,h=S??h,g={...g,[v]:{...g[v],...C}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(l=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):E.rects),{x:u,y:h}=Rl(l,p,c)),f=-1)}return{x:u,y:h,placement:p,strategy:s,middlewareData:g}};async function br(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=jt(t,e),y=qf(g),v=a[p?h==="floating"?"reference":"floating":h],w=Ss(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),b=h==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(S))?await(o.getScale==null?void 0:o.getScale(S))||{x:1,y:1}:{x:1,y:1},E=Ss(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:S,strategy:c}):b);return{top:(w.top-E.top+y.top)/C.y,bottom:(E.bottom-w.bottom+y.bottom)/C.y,left:(w.left-E.left+y.left)/C.x,right:(E.right-w.right+y.right)/C.x}}const Zx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=jt(e,t)||{};if(l==null)return{};const h=qf(u),p={x:n,y:r},g=Ma(s),y=Pa(g),f=await i.getDimensions(l),v=g==="y",w=v?"top":"left",b=v?"bottom":"right",S=v?"clientHeight":"clientWidth",C=o.reference[y]+o.reference[g]-p[g]-o.floating[y],E=p[g]-o.reference[g],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let k=T?T[S]:0;(!k||!await(i.isElement==null?void 0:i.isElement(T)))&&(k=a.floating[S]||o.floating[y]);const P=C/2-E/2,$=k/2-f[y]/2-1,x=Bt(h[w],$),I=Bt(h[b],$),_=x,K=k-f[y]-I,Y=k/2-f[y]/2+P,X=Si(_,Y,K),G=!c.arrow&&Gn(s)!=null&&Y!==X&&o.reference[y]/2-(Y<_?x:I)-f[y]/2<0,U=G?Y<_?Y-_:Y-K:0;return{[g]:p[g]+U,data:{[g]:X,centerOffset:Y-X-U,...G&&{alignmentOffset:U}},reset:G}}}),Kx=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:f=!0,...v}=jt(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Vt(s),b=yt(a),S=Vt(a)===a,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),E=p||(S||!f?[ws(a)]:_x(a)),T=y!=="none";!p&&T&&E.push(...zx(a,f,y,C));const k=[a,...E],P=await br(t,v),$=[];let x=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&$.push(P[w]),h){const Y=Lx(s,i,C);$.push(P[Y[0]],P[Y[1]])}if(x=[...x,{placement:s,overflows:$}],!$.every(Y=>Y<=0)){var I,_;const Y=(((I=o.flip)==null?void 0:I.index)||0)+1,X=k[Y];if(X&&(!(h==="alignment"?b!==yt(X):!1)||x.every(M=>M.overflows[0]>0&&yt(M.placement)===b)))return{data:{index:Y,overflows:x},reset:{placement:X}};let G=(_=x.filter(U=>U.overflows[0]<=0).sort((U,M)=>U.overflows[1]-M.overflows[1])[0])==null?void 0:_.placement;if(!G)switch(g){case"bestFit":{var K;const U=(K=x.filter(M=>{if(T){const q=yt(M.placement);return q===b||q==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(q=>q>0).reduce((q,N)=>q+N,0)]).sort((M,q)=>M[1]-q[1])[0])==null?void 0:K[0];U&&(G=U);break}case"initialPlacement":G=a;break}if(s!==G)return{reset:{placement:G}}}return{}}}};function Nl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jl(e){return Ix.some(t=>e[t]>=0)}const Yx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=jt(e,t);switch(r){case"referenceHidden":{const o=await br(t,{...s,elementContext:"reference"}),i=Nl(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:jl(i)}}}case"escaped":{const o=await br(t,{...s,altBoundary:!0}),i=Nl(o,n.floating);return{data:{escapedOffsets:i,escaped:jl(i)}}}default:return{}}}}},Xf=new Set(["left","top"]);async function Gx(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Vt(n),a=Gn(n),c=yt(n)==="y",l=Xf.has(i)?-1:1,u=o&&c?-1:1,h=jt(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof y=="number"&&(g=a==="end"?y*-1:y),c?{x:g*u,y:p*l}:{x:p*l,y:g*u}}const qx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=t,c=await Gx(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},Xx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:v=>{let{x:w,y:b}=v;return{x:w,y:b}}},...c}=jt(e,t),l={x:n,y:r},u=await br(t,c),h=yt(Vt(s)),p=Aa(h);let g=l[p],y=l[h];if(o){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",b=g+u[v],S=g-u[w];g=Si(b,g,S)}if(i){const v=h==="y"?"top":"left",w=h==="y"?"bottom":"right",b=y+u[v],S=y-u[w];y=Si(b,y,S)}const f=a.fn({...t,[p]:g,[h]:y});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[p]:o,[h]:i}}}}}},Jx=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=jt(e,t),u={x:n,y:r},h=yt(s),p=Aa(h);let g=u[p],y=u[h];const f=jt(a,t),v=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const S=p==="y"?"height":"width",C=o.reference[p]-o.floating[S]+v.mainAxis,E=o.reference[p]+o.reference[S]-v.mainAxis;g<C?g=C:g>E&&(g=E)}if(l){var w,b;const S=p==="y"?"width":"height",C=Xf.has(Vt(s)),E=o.reference[h]-o.floating[S]+(C&&((w=i.offset)==null?void 0:w[h])||0)+(C?0:v.crossAxis),T=o.reference[h]+o.reference[S]+(C?0:((b=i.offset)==null?void 0:b[h])||0)-(C?v.crossAxis:0);y<E?y=E:y>T&&(y=T)}return{[p]:g,[h]:y}}}},Qx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:c=()=>{},...l}=jt(e,t),u=await br(t,l),h=Vt(s),p=Gn(s),g=yt(s)==="y",{width:y,height:f}=o.floating;let v,w;h==="top"||h==="bottom"?(v=h,w=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(w=h,v=p==="end"?"top":"bottom");const b=f-u.top-u.bottom,S=y-u.left-u.right,C=Bt(f-u[v],b),E=Bt(y-u[w],S),T=!t.middlewareData.shift;let k=C,P=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=b),T&&!p){const x=Ke(u.left,0),I=Ke(u.right,0),_=Ke(u.top,0),K=Ke(u.bottom,0);g?P=y-2*(x!==0||I!==0?x+I:Ke(u.left,u.right)):k=f-2*(_!==0||K!==0?_+K:Ke(u.top,u.bottom))}await c({...t,availableWidth:P,availableHeight:k});const $=await i.getDimensions(a.floating);return y!==$.width||f!==$.height?{reset:{rects:!0}}:{}}}};function Ds(){return typeof window<"u"}function qn(e){return Jf(e)?(e.nodeName||"").toLowerCase():"#document"}function Ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ct(e){var t;return(t=(Jf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jf(e){return Ds()?e instanceof Node||e instanceof Ge(e).Node:!1}function ct(e){return Ds()?e instanceof Element||e instanceof Ge(e).Element:!1}function St(e){return Ds()?e instanceof HTMLElement||e instanceof Ge(e).HTMLElement:!1}function Vl(e){return!Ds()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ge(e).ShadowRoot}const eb=new Set(["inline","contents"]);function Rr(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=lt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!eb.has(s)}const tb=new Set(["table","td","th"]);function nb(e){return tb.has(qn(e))}const rb=[":popover-open",":modal"];function Os(e){return rb.some(t=>{try{return e.matches(t)}catch{return!1}})}const sb=["transform","translate","scale","rotate","perspective"],ob=["transform","translate","scale","rotate","perspective","filter"],ib=["paint","layout","strict","content"];function Ra(e){const t=Na(),n=ct(e)?lt(e):e;return sb.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ob.some(r=>(n.willChange||"").includes(r))||ib.some(r=>(n.contain||"").includes(r))}function ab(e){let t=Ht(e);for(;St(t)&&!_n(t);){if(Ra(t))return t;if(Os(t))return null;t=Ht(t)}return null}function Na(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const cb=new Set(["html","body","#document"]);function _n(e){return cb.has(qn(e))}function lt(e){return Ge(e).getComputedStyle(e)}function $s(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ht(e){if(qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vl(e)&&e.host||Ct(e);return Vl(t)?t.host:t}function Qf(e){const t=Ht(e);return _n(t)?e.ownerDocument?e.ownerDocument.body:e.body:St(t)&&Rr(t)?t:Qf(t)}function wr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Qf(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),i=Ge(s);if(o){const a=Ei(i);return t.concat(i,i.visualViewport||[],Rr(s)?s:[],a&&n?wr(a):[])}return t.concat(s,wr(s,[],n))}function Ei(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eh(e){const t=lt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=St(e),o=s?e.offsetWidth:n,i=s?e.offsetHeight:r,a=bs(n)!==o||bs(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function ja(e){return ct(e)?e:e.contextElement}function Vn(e){const t=ja(e);if(!St(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=eh(t);let i=(o?bs(n.width):n.width)/r,a=(o?bs(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const lb=bt(0);function th(e){const t=Ge(e);return!Na()||!t.visualViewport?lb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function db(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ge(e)?!1:t}function ln(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=ja(e);let i=bt(1);t&&(r?ct(r)&&(i=Vn(r)):i=Vn(e));const a=db(o,n,r)?th(o):bt(0);let c=(s.left+a.x)/i.x,l=(s.top+a.y)/i.y,u=s.width/i.x,h=s.height/i.y;if(o){const p=Ge(o),g=r&&ct(r)?Ge(r):r;let y=p,f=Ei(y);for(;f&&r&&g!==y;){const v=Vn(f),w=f.getBoundingClientRect(),b=lt(f),S=w.left+(f.clientLeft+parseFloat(b.paddingLeft))*v.x,C=w.top+(f.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,h*=v.y,c+=S,l+=C,y=Ge(f),f=Ei(y)}}return Ss({width:u,height:h,x:c,y:l})}function Va(e,t){const n=$s(e).scrollLeft;return t?t.left+n:ln(Ct(e)).left+n}function nh(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Va(e,r)),o=r.top+t.scrollTop;return{x:s,y:o}}function ub(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",i=Ct(r),a=t?Os(t.floating):!1;if(r===i||a&&o)return n;let c={scrollLeft:0,scrollTop:0},l=bt(1);const u=bt(0),h=St(r);if((h||!h&&!o)&&((qn(r)!=="body"||Rr(i))&&(c=$s(r)),St(r))){const g=ln(r);l=Vn(r),u.x=g.x+r.clientLeft,u.y=g.y+r.clientTop}const p=i&&!h&&!o?nh(i,c,!0):bt(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+p.x,y:n.y*l.y-c.scrollTop*l.y+u.y+p.y}}function fb(e){return Array.from(e.getClientRects())}function hb(e){const t=Ct(e),n=$s(e),r=e.ownerDocument.body,s=Ke(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ke(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Va(e);const a=-n.scrollTop;return lt(r).direction==="rtl"&&(i+=Ke(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}function mb(e,t){const n=Ge(e),r=Ct(e),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,c=0;if(s){o=s.width,i=s.height;const l=Na();(!l||l&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:a,y:c}}const pb=new Set(["absolute","fixed"]);function gb(e,t){const n=ln(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=St(e)?Vn(e):bt(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,c=s*o.x,l=r*o.y;return{width:i,height:a,x:c,y:l}}function Il(e,t,n){let r;if(t==="viewport")r=mb(e,n);else if(t==="document")r=hb(Ct(e));else if(ct(t))r=gb(t,n);else{const s=th(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Ss(r)}function rh(e,t){const n=Ht(e);return n===t||!ct(n)||_n(n)?!1:lt(n).position==="fixed"||rh(n,t)}function yb(e,t){const n=t.get(e);if(n)return n;let r=wr(e,[],!1).filter(a=>ct(a)&&qn(a)!=="body"),s=null;const o=lt(e).position==="fixed";let i=o?Ht(e):e;for(;ct(i)&&!_n(i);){const a=lt(i),c=Ra(i);!c&&a.position==="fixed"&&(s=null),(o?!c&&!s:!c&&a.position==="static"&&!!s&&pb.has(s.position)||Rr(i)&&!c&&rh(e,i))?r=r.filter(u=>u!==i):s=a,i=Ht(i)}return t.set(e,r),r}function vb(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=[...n==="clippingAncestors"?Os(t)?[]:yb(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,u)=>{const h=Il(t,u,s);return l.top=Ke(h.top,l.top),l.right=Bt(h.right,l.right),l.bottom=Bt(h.bottom,l.bottom),l.left=Ke(h.left,l.left),l},Il(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function xb(e){const{width:t,height:n}=eh(e);return{width:t,height:n}}function bb(e,t,n){const r=St(t),s=Ct(t),o=n==="fixed",i=ln(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=bt(0);function l(){c.x=Va(s)}if(r||!r&&!o)if((qn(t)!=="body"||Rr(s))&&(a=$s(t)),r){const g=ln(t,!0,o,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else s&&l();o&&!r&&s&&l();const u=s&&!r&&!o?nh(s,a):bt(0),h=i.left+a.scrollLeft-c.x-u.x,p=i.top+a.scrollTop-c.y-u.y;return{x:h,y:p,width:i.width,height:i.height}}function Mo(e){return lt(e).position==="static"}function Dl(e,t){if(!St(e)||lt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ct(e)===n&&(n=n.ownerDocument.body),n}function sh(e,t){const n=Ge(e);if(Os(e))return n;if(!St(e)){let s=Ht(e);for(;s&&!_n(s);){if(ct(s)&&!Mo(s))return s;s=Ht(s)}return n}let r=Dl(e,t);for(;r&&nb(r)&&Mo(r);)r=Dl(r,t);return r&&_n(r)&&Mo(r)&&!Ra(r)?n:r||ab(e)||n}const wb=async function(e){const t=this.getOffsetParent||sh,n=this.getDimensions,r=await n(e.floating);return{reference:bb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sb(e){return lt(e).direction==="rtl"}const Cb={convertOffsetParentRelativeRectToViewportRelativeRect:ub,getDocumentElement:Ct,getClippingRect:vb,getOffsetParent:sh,getElementRects:wb,getClientRects:fb,getDimensions:xb,getScale:Vn,isElement:ct,isRTL:Sb};function oh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Eb(e,t){let n=null,r;const s=Ct(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const l=e.getBoundingClientRect(),{left:u,top:h,width:p,height:g}=l;if(a||t(),!p||!g)return;const y=Ur(h),f=Ur(s.clientWidth-(u+p)),v=Ur(s.clientHeight-(h+g)),w=Ur(u),S={rootMargin:-y+"px "+-f+"px "+-v+"px "+-w+"px",threshold:Ke(0,Bt(1,c))||1};let C=!0;function E(T){const k=T[0].intersectionRatio;if(k!==c){if(!C)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!oh(l,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(E,{...S,root:s.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return i(!0),o}function kb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=ja(e),u=s||o?[...l?wr(l):[],...wr(t)]:[];u.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const h=l&&a?Eb(l,n):null;let p=-1,g=null;i&&(g=new ResizeObserver(w=>{let[b]=w;b&&b.target===l&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=g)==null||S.observe(t)})),n()}),l&&!c&&g.observe(l),g.observe(t));let y,f=c?ln(e):null;c&&v();function v(){const w=ln(e);f&&!oh(f,w)&&n(),f=w,y=requestAnimationFrame(v)}return n(),()=>{var w;u.forEach(b=>{s&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),h==null||h(),(w=g)==null||w.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const Tb=qx,Ab=Xx,Pb=Kx,Mb=Qx,Rb=Yx,Ol=Zx,Nb=Jx,jb=(e,t,n)=>{const r=new Map,s={platform:Cb,...n},o={...s.platform,_c:r};return Wx(e,t,{...s,platform:o})};var Vb=typeof document<"u",Ib=function(){},is=Vb?A.useLayoutEffect:Ib;function Cs(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,s;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(!Cs(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!Cs(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ih(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $l(e,t){const n=ih(e);return Math.round(t*n)/n}function Ro(e){const t=m.useRef(e);return is(()=>{t.current=e}),t}function Db(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,h]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=m.useState(r);Cs(p,r)||g(r);const[y,f]=m.useState(null),[v,w]=m.useState(null),b=m.useCallback(M=>{M!==T.current&&(T.current=M,f(M))},[]),S=m.useCallback(M=>{M!==k.current&&(k.current=M,w(M))},[]),C=o||y,E=i||v,T=m.useRef(null),k=m.useRef(null),P=m.useRef(u),$=c!=null,x=Ro(c),I=Ro(s),_=Ro(l),K=m.useCallback(()=>{if(!T.current||!k.current)return;const M={placement:t,strategy:n,middleware:p};I.current&&(M.platform=I.current),jb(T.current,k.current,M).then(q=>{const N={...q,isPositioned:_.current!==!1};Y.current&&!Cs(P.current,N)&&(P.current=N,Rs.flushSync(()=>{h(N)}))})},[p,t,n,I,_]);is(()=>{l===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,h(M=>({...M,isPositioned:!1})))},[l]);const Y=m.useRef(!1);is(()=>(Y.current=!0,()=>{Y.current=!1}),[]),is(()=>{if(C&&(T.current=C),E&&(k.current=E),C&&E){if(x.current)return x.current(C,E,K);K()}},[C,E,K,x,$]);const X=m.useMemo(()=>({reference:T,floating:k,setReference:b,setFloating:S}),[b,S]),G=m.useMemo(()=>({reference:C,floating:E}),[C,E]),U=m.useMemo(()=>{const M={position:n,left:0,top:0};if(!G.floating)return M;const q=$l(G.floating,u.x),N=$l(G.floating,u.y);return a?{...M,transform:"translate("+q+"px, "+N+"px)",...ih(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:N}},[n,a,G.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:K,refs:X,elements:G,floatingStyles:U}),[u,K,X,G,U])}const Ob=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ol({element:r.current,padding:s}).fn(n):{}:r?Ol({element:r,padding:s}).fn(n):{}}}},$b=(e,t)=>({...Tb(e),options:[e,t]}),Lb=(e,t)=>({...Ab(e),options:[e,t]}),_b=(e,t)=>({...Nb(e),options:[e,t]}),Fb=(e,t)=>({...Pb(e),options:[e,t]}),Bb=(e,t)=>({...Mb(e),options:[e,t]}),Hb=(e,t)=>({...Rb(e),options:[e,t]}),zb=(e,t)=>({...Ob(e),options:[e,t]});var Ub="Arrow",ah=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return d.jsx(Te.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});ah.displayName=Ub;var Wb=ah;function Zb(e){const[t,n]=m.useState(void 0);return We(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ia="Popper",[ch,lh]=ka(Ia),[Kb,dh]=ch(Ia),uh=e=>{const{__scopePopper:t,children:n}=e,[r,s]=m.useState(null);return d.jsx(Kb,{scope:t,anchor:r,onAnchorChange:s,children:n})};uh.displayName=Ia;var fh="PopperAnchor",hh=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=dh(fh,n),i=m.useRef(null),a=Le(t,i);return m.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:d.jsx(Te.div,{...s,ref:a})});hh.displayName=fh;var Da="PopperContent",[Yb,Gb]=ch(Da),mh=m.forwardRef((e,t)=>{var j,F,W,L,J,O;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:y,...f}=e,v=dh(Da,n),[w,b]=m.useState(null),S=Le(t,se=>b(se)),[C,E]=m.useState(null),T=Zb(C),k=(T==null?void 0:T.width)??0,P=(T==null?void 0:T.height)??0,$=r+(o!=="center"?"-"+o:""),x=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},I=Array.isArray(l)?l:[l],_=I.length>0,K={padding:x,boundary:I.filter(Xb),altBoundary:_},{refs:Y,floatingStyles:X,placement:G,isPositioned:U,middlewareData:M}=Db({strategy:"fixed",placement:$,whileElementsMounted:(...se)=>kb(...se,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[$b({mainAxis:s+P,alignmentAxis:i}),c&&Lb({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?_b():void 0,...K}),c&&Fb({...K}),Bb({...K,apply:({elements:se,rects:le,availableWidth:De,availableHeight:ut})=>{const{width:Gt,height:qt}=le.reference,ft=se.floating.style;ft.setProperty("--radix-popper-available-width",`${De}px`),ft.setProperty("--radix-popper-available-height",`${ut}px`),ft.setProperty("--radix-popper-anchor-width",`${Gt}px`),ft.setProperty("--radix-popper-anchor-height",`${qt}px`)}}),C&&zb({element:C,padding:a}),Jb({arrowWidth:k,arrowHeight:P}),p&&Hb({strategy:"referenceHidden",...K})]}),[q,N]=yh(G),V=cn(y);We(()=>{U&&(V==null||V())},[U,V]);const Z=(j=M.arrow)==null?void 0:j.x,R=(F=M.arrow)==null?void 0:F.y,B=((W=M.arrow)==null?void 0:W.centerOffset)!==0,[z,H]=m.useState();return We(()=>{w&&H(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:U?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(L=M.transformOrigin)==null?void 0:L.x,(J=M.transformOrigin)==null?void 0:J.y].join(" "),...((O=M.hide)==null?void 0:O.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Yb,{scope:n,placedSide:q,onArrowChange:E,arrowX:Z,arrowY:R,shouldHideArrow:B,children:d.jsx(Te.div,{"data-side":q,"data-align":N,...f,ref:S,style:{...f.style,animation:U?void 0:"none"}})})})});mh.displayName=Da;var ph="PopperArrow",qb={top:"bottom",right:"left",bottom:"top",left:"right"},gh=m.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=Gb(ph,r),i=qb[o.placedSide];return d.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:d.jsx(Wb,{...s,ref:n,style:{...s.style,display:"block"}})})});gh.displayName=ph;function Xb(e){return e!==null}var Jb=e=>({name:"transformOrigin",options:e,fn(t){var v,w,b;const{placement:n,rects:r,middlewareData:s}=t,i=((v=s.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,u]=yh(n),h={start:"0%",center:"50%",end:"100%"}[u],p=(((w=s.arrow)==null?void 0:w.x)??0)+a/2,g=(((b=s.arrow)==null?void 0:b.y)??0)+c/2;let y="",f="";return l==="bottom"?(y=i?h:`${p}px`,f=`${-c}px`):l==="top"?(y=i?h:`${p}px`,f=`${r.floating.height+c}px`):l==="right"?(y=`${-c}px`,f=i?h:`${g}px`):l==="left"&&(y=`${r.floating.width+c}px`,f=i?h:`${g}px`),{data:{x:y,y:f}}}});function yh(e){const[t,n="center"]=e.split("-");return[t,n]}var Qb=uh,e2=hh,t2=mh,n2=gh,r2="Portal",vh=m.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=m.useState(!1);We(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Fi.createPortal(d.jsx(Te.div,{...r,ref:t}),i):null});vh.displayName=r2;function s2(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xh=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"}),o2="VisuallyHidden",i2=m.forwardRef((e,t)=>d.jsx(Te.span,{...e,ref:t,style:{...xh,...e.style}}));i2.displayName=o2;var a2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pn=new WeakMap,Wr=new WeakMap,Zr={},No=0,bh=function(e){return e&&(e.host||bh(e.parentNode))},c2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=bh(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},l2=function(e,t,n,r){var s=c2(t,Array.isArray(e)?e:[e]);Zr[n]||(Zr[n]=new WeakMap);var o=Zr[n],i=[],a=new Set,c=new Set(s),l=function(h){!h||a.has(h)||(a.add(h),l(h.parentNode))};s.forEach(l);var u=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))u(p);else try{var g=p.getAttribute(r),y=g!==null&&g!=="false",f=(pn.get(p)||0)+1,v=(o.get(p)||0)+1;pn.set(p,f),o.set(p,v),i.push(p),f===1&&y&&Wr.set(p,!0),v===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return u(t),a.clear(),No++,function(){i.forEach(function(h){var p=pn.get(h)-1,g=o.get(h)-1;pn.set(h,p),o.set(h,g),p||(Wr.has(h)||h.removeAttribute(r),Wr.delete(h)),g||h.removeAttribute(n)}),No--,No||(pn=new WeakMap,pn=new WeakMap,Wr=new WeakMap,Zr={})}},d2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=a2(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),l2(r,s,n,"aria-hidden")):function(){return null}},gt=function(){return gt=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},gt.apply(this,arguments)};function wh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function u2(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var as="right-scroll-bar-position",cs="width-before-scroll-bar",f2="with-scroll-bars-hidden",h2="--removed-body-scroll-bar-size";function jo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function m2(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var p2=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ll=new WeakMap;function g2(e,t){var n=m2(null,function(r){return e.forEach(function(s){return jo(s,r)})});return p2(function(){var r=Ll.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(a){o.has(a)||jo(a,null)}),o.forEach(function(a){s.has(a)||jo(a,i)})}Ll.set(n,e)},[e]),n}function y2(e){return e}function v2(e,t){t===void 0&&(t=y2);var n=[],r=!1,s={read:function(){if(r)throw new 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(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var c=function(){var u=i;i=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){i.push(u),l()},filter:function(u){return i=i.filter(u),n}}}};return s}function x2(e){e===void 0&&(e={});var t=v2(null);return t.options=gt({async:!0,ssr:!1},e),t}var Sh=function(e){var t=e.sideCar,n=wh(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,gt({},n))};Sh.isSideCarExport=!0;function b2(e,t){return e.useMedium(t),Sh}var Ch=x2(),Vo=function(){},Ls=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Vo,onWheelCapture:Vo,onTouchMoveCapture:Vo}),s=r[0],o=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,h=e.shards,p=e.sideCar,g=e.noRelative,y=e.noIsolation,f=e.inert,v=e.allowPinchZoom,w=e.as,b=w===void 0?"div":w,S=e.gapMode,C=wh(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,T=g2([n,t]),k=gt(gt({},C),s);return m.createElement(m.Fragment,null,u&&m.createElement(E,{sideCar:Ch,removeScrollBar:l,shards:h,noRelative:g,noIsolation:y,inert:f,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:S}),i?m.cloneElement(m.Children.only(a),gt(gt({},k),{ref:T})):m.createElement(b,gt({},k,{className:c,ref:T}),a))});Ls.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ls.classNames={fullWidth:cs,zeroRight:as};var w2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function S2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=w2();return t&&e.setAttribute("nonce",t),e}function C2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function E2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var k2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=S2())&&(C2(t,n),E2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},T2=function(){var e=k2();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Eh=function(){var e=T2(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},A2={left:0,top:0,right:0,gap:0},Io=function(e){return parseInt(e||"",10)||0},P2=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Io(n),Io(r),Io(s)]},M2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return A2;var t=P2(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])}},R2=Eh(),In="data-scroll-locked",N2=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
10
+ .`.concat(f2,` {
11
11
  overflow: hidden `).concat(r,`;
12
12
  padding-right: `).concat(a,"px ").concat(r,`;
13
13
  }
@@ -41,136 +41,136 @@
41
41
  }
42
42
 
43
43
  body[`).concat(In,`] {
44
- `).concat(u2,": ").concat(a,`px;
44
+ `).concat(h2,": ").concat(a,`px;
45
45
  }
46
- `)},_l=function(){var e=parseInt(document.body.getAttribute(In)||"0",10);return isFinite(e)?e:0},N2=function(){m.useEffect(function(){return document.body.setAttribute(In,(_l()+1).toString()),function(){var e=_l()-1;e<=0?document.body.removeAttribute(In):document.body.setAttribute(In,e.toString())}},[])},j2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;N2();var o=m.useMemo(function(){return A2(s)},[s]);return m.createElement(P2,{styles:M2(o,!t,s,n?"":"!important")})},ki=!1;if(typeof window<"u")try{var Kr=Object.defineProperty({},"passive",{get:function(){return ki=!0,!0}});window.addEventListener("test",Kr,Kr),window.removeEventListener("test",Kr,Kr)}catch{ki=!1}var gn=ki?{passive:!1}:!1,R2=function(e){return e.tagName==="TEXTAREA"},kh=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!R2(e)&&n[t]==="visible")},V2=function(e){return kh(e,"overflowY")},I2=function(e){return kh(e,"overflowX")},Fl=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Th(e,r);if(s){var o=Ah(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},D2=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},O2=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Th=function(e,t){return e==="v"?V2(t):I2(t)},Ah=function(e,t){return e==="v"?D2(t):O2(t)},$2=function(e,t){return e==="h"&&t==="rtl"?-1:1},L2=function(e,t,n,r,s){var o=$2(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,c=t.contains(a),l=!1,u=i>0,h=0,p=0;do{if(!a)break;var g=Ah(e,a),y=g[0],f=g[1],v=g[2],w=f-v-o*y;(y||w)&&Th(e,a)&&(h+=w,p+=y);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(h)<1||!u&&Math.abs(p)<1)&&(l=!0),l},Yr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bl=function(e){return[e.deltaX,e.deltaY]},Hl=function(e){return e&&"current"in e?e.current:e},_2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F2=function(e){return`
46
+ `)},_l=function(){var e=parseInt(document.body.getAttribute(In)||"0",10);return isFinite(e)?e:0},j2=function(){m.useEffect(function(){return document.body.setAttribute(In,(_l()+1).toString()),function(){var e=_l()-1;e<=0?document.body.removeAttribute(In):document.body.setAttribute(In,e.toString())}},[])},V2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;j2();var o=m.useMemo(function(){return M2(s)},[s]);return m.createElement(R2,{styles:N2(o,!t,s,n?"":"!important")})},ki=!1;if(typeof window<"u")try{var Kr=Object.defineProperty({},"passive",{get:function(){return ki=!0,!0}});window.addEventListener("test",Kr,Kr),window.removeEventListener("test",Kr,Kr)}catch{ki=!1}var gn=ki?{passive:!1}:!1,I2=function(e){return e.tagName==="TEXTAREA"},kh=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!I2(e)&&n[t]==="visible")},D2=function(e){return kh(e,"overflowY")},O2=function(e){return kh(e,"overflowX")},Fl=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Th(e,r);if(s){var o=Ah(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$2=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},L2=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Th=function(e,t){return e==="v"?D2(t):O2(t)},Ah=function(e,t){return e==="v"?$2(t):L2(t)},_2=function(e,t){return e==="h"&&t==="rtl"?-1:1},F2=function(e,t,n,r,s){var o=_2(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,c=t.contains(a),l=!1,u=i>0,h=0,p=0;do{if(!a)break;var g=Ah(e,a),y=g[0],f=g[1],v=g[2],w=f-v-o*y;(y||w)&&Th(e,a)&&(h+=w,p+=y);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(h)<1||!u&&Math.abs(p)<1)&&(l=!0),l},Yr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bl=function(e){return[e.deltaX,e.deltaY]},Hl=function(e){return e&&"current"in e?e.current:e},B2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},H2=function(e){return`
47
47
  .block-interactivity-`.concat(e,` {pointer-events: none;}
48
48
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
49
- `)},B2=0,yn=[];function H2(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),s=m.useState(B2++)[0],o=m.useState(Eh)[0],i=m.useRef(e);m.useEffect(function(){i.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var f=l2([e.lockRef.current],(e.shards||[]).map(Hl),!0).filter(Boolean);return f.forEach(function(v){return v.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),f.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=m.useCallback(function(f,v){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!i.current.allowPinchZoom;var w=Yr(f),b=n.current,S="deltaX"in f?f.deltaX:b[0]-w[0],C="deltaY"in f?f.deltaY:b[1]-w[1],E,T=f.target,k=Math.abs(S)>Math.abs(C)?"h":"v";if("touches"in f&&k==="h"&&T.type==="range")return!1;var P=Fl(k,T);if(!P)return!0;if(P?E=k:(E=k==="v"?"h":"v",P=Fl(k,T)),!P)return!1;if(!r.current&&"changedTouches"in f&&(S||C)&&(r.current=E),!E)return!0;var $=r.current||E;return L2($,v,f,$==="h"?S:C)},[]),c=m.useCallback(function(f){var v=f;if(!(!yn.length||yn[yn.length-1]!==o)){var w="deltaY"in v?Bl(v):Yr(v),b=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&_2(E.delta,w)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var S=(i.current.shards||[]).map(Hl).filter(Boolean).filter(function(E){return E.contains(v.target)}),C=S.length>0?a(v,S[0]):!i.current.noIsolation;C&&v.cancelable&&v.preventDefault()}}},[]),l=m.useCallback(function(f,v,w,b){var S={name:f,delta:v,target:w,should:b,shadowParent:z2(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(C){return C!==S})},1)},[]),u=m.useCallback(function(f){n.current=Yr(f),r.current=void 0},[]),h=m.useCallback(function(f){l(f.type,Bl(f),f.target,a(f,e.lockRef.current))},[]),p=m.useCallback(function(f){l(f.type,Yr(f),f.target,a(f,e.lockRef.current))},[]);m.useEffect(function(){return yn.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,gn),document.addEventListener("touchmove",c,gn),document.addEventListener("touchstart",u,gn),function(){yn=yn.filter(function(f){return f!==o}),document.removeEventListener("wheel",c,gn),document.removeEventListener("touchmove",c,gn),document.removeEventListener("touchstart",u,gn)}},[]);var g=e.removeScrollBar,y=e.inert;return m.createElement(m.Fragment,null,y?m.createElement(o,{styles:F2(s)}):null,g?m.createElement(j2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function z2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const U2=v2(Ch,H2);var Ph=m.forwardRef(function(e,t){return m.createElement(Ls,gt({},e,{ref:t,sideCar:U2}))});Ph.classNames=Ls.classNames;var W2=[" ","Enter","ArrowUp","ArrowDown"],Z2=[" ","Enter"],dn="Select",[_s,Fs,K2]=ux(dn),[Xn,lE]=ka(dn,[K2,lh]),Bs=lh(),[Y2,Zt]=Xn(dn),[G2,q2]=Xn(dn),Mh=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:h,disabled:p,required:g,form:y}=e,f=Bs(t),[v,w]=m.useState(null),[b,S]=m.useState(null),[C,E]=m.useState(!1),T=hx(l),[k,P]=bi({prop:r,defaultProp:s??!1,onChange:o,caller:dn}),[$,x]=bi({prop:i,defaultProp:a,onChange:c,caller:dn}),I=m.useRef(null),_=v?y||!!v.closest("form"):!0,[K,Y]=m.useState(new Set),X=Array.from(K).map(G=>G.props.value).join(";");return d.jsx(Xb,{...f,children:d.jsxs(Y2,{required:g,scope:t,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:E,contentId:Ta(),value:$,onValueChange:x,open:k,onOpenChange:P,dir:T,triggerPointerDownPosRef:I,disabled:p,children:[d.jsx(_s.Provider,{scope:t,children:d.jsx(G2,{scope:e.__scopeSelect,onNativeOptionAdd:m.useCallback(G=>{Y(U=>new Set(U).add(G))},[]),onNativeOptionRemove:m.useCallback(G=>{Y(U=>{const M=new Set(U);return M.delete(G),M})},[]),children:n})}),_?d.jsxs(Xh,{"aria-hidden":!0,required:g,tabIndex:-1,name:u,autoComplete:h,value:$,onChange:G=>x(G.target.value),disabled:p,form:y,children:[$===void 0?d.jsx("option",{value:""}):null,Array.from(K)]},X):null]})})};Mh.displayName=dn;var Nh="SelectTrigger",jh=m.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=Bs(n),i=Zt(Nh,n),a=i.disabled||r,c=Le(t,i.onTriggerChange),l=Fs(n),u=m.useRef("touch"),[h,p,g]=Qh(f=>{const v=l().filter(S=>!S.disabled),w=v.find(S=>S.value===i.value),b=em(v,f,w);b!==void 0&&i.onValueChange(b.value)}),y=f=>{a||(i.onOpenChange(!0),g()),f&&(i.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return d.jsx(Jb,{asChild:!0,...o,children:d.jsx(Te.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Jh(i.value)?"":void 0,...s,ref:c,onClick:Pe(s.onClick,f=>{f.currentTarget.focus(),u.current!=="mouse"&&y(f)}),onPointerDown:Pe(s.onPointerDown,f=>{u.current=f.pointerType;const v=f.target;v.hasPointerCapture(f.pointerId)&&v.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(y(f),f.preventDefault())}),onKeyDown:Pe(s.onKeyDown,f=>{const v=h.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&p(f.key),!(v&&f.key===" ")&&W2.includes(f.key)&&(y(),f.preventDefault())})})})});jh.displayName=Nh;var Rh="SelectValue",Vh=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=e,c=Zt(Rh,n),{onValueNodeHasChildrenChange:l}=c,u=o!==void 0,h=Le(t,c.onValueNodeChange);return We(()=>{l(u)},[l,u]),d.jsx(Te.span,{...a,ref:h,style:{pointerEvents:"none"},children:Jh(c.value)?d.jsx(d.Fragment,{children:i}):o})});Vh.displayName=Rh;var X2="SelectIcon",Ih=m.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return d.jsx(Te.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});Ih.displayName=X2;var J2="SelectPortal",Dh=e=>d.jsx(vh,{asChild:!0,...e});Dh.displayName=J2;var un="SelectContent",Oh=m.forwardRef((e,t)=>{const n=Zt(un,e.__scopeSelect),[r,s]=m.useState();if(We(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?Ns.createPortal(d.jsx($h,{scope:e.__scopeSelect,children:d.jsx(_s.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),o):null}return d.jsx(Lh,{...e,ref:t})});Oh.displayName=un;var it=10,[$h,Kt]=Xn(un),Q2="SelectContentImpl",ew=xr("SelectContent.RemoveScroll"),Lh=m.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:g,sticky:y,hideWhenDetached:f,avoidCollisions:v,...w}=e,b=Zt(un,n),[S,C]=m.useState(null),[E,T]=m.useState(null),k=Le(t,R=>C(R)),[P,$]=m.useState(null),[x,I]=m.useState(null),_=Fs(n),[K,Y]=m.useState(!1),X=m.useRef(!1);m.useEffect(()=>{if(S)return c2(S)},[S]),Sx();const G=m.useCallback(R=>{const[F,...W]=_().map(O=>O.ref.current),[L]=W.slice(-1),J=document.activeElement;for(const O of R)if(O===J||(O==null||O.scrollIntoView({block:"nearest"}),O===F&&E&&(E.scrollTop=0),O===L&&E&&(E.scrollTop=E.scrollHeight),O==null||O.focus(),document.activeElement!==J))return},[_,E]),U=m.useCallback(()=>G([P,S]),[G,P,S]);m.useEffect(()=>{K&&U()},[K,U]);const{onOpenChange:M,triggerPointerDownPosRef:q}=b;m.useEffect(()=>{if(S){let R={x:0,y:0};const F=L=>{var J,O;R={x:Math.abs(Math.round(L.pageX)-(((J=q.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(L.pageY)-(((O=q.current)==null?void 0:O.y)??0))}},W=L=>{R.x<=10&&R.y<=10?L.preventDefault():S.contains(L.target)||M(!1),document.removeEventListener("pointermove",F),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",F),document.addEventListener("pointerup",W,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",F),document.removeEventListener("pointerup",W,{capture:!0})}}},[S,M,q]),m.useEffect(()=>{const R=()=>M(!1);return window.addEventListener("blur",R),window.addEventListener("resize",R),()=>{window.removeEventListener("blur",R),window.removeEventListener("resize",R)}},[M]);const[j,V]=Qh(R=>{const F=_().filter(J=>!J.disabled),W=F.find(J=>J.ref.current===document.activeElement),L=em(F,R,W);L&&setTimeout(()=>L.ref.current.focus())}),Z=m.useCallback((R,F,W)=>{const L=!X.current&&!W;(b.value!==void 0&&b.value===F||L)&&($(R),L&&(X.current=!0))},[b.value]),N=m.useCallback(()=>S==null?void 0:S.focus(),[S]),B=m.useCallback((R,F,W)=>{const L=!X.current&&!W;(b.value!==void 0&&b.value===F||L)&&I(R)},[b.value]),z=r==="popper"?Ti:_h,H=z===Ti?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:g,sticky:y,hideWhenDetached:f,avoidCollisions:v}:{};return d.jsx($h,{scope:n,content:S,viewport:E,onViewportChange:T,itemRefCallback:Z,selectedItem:P,onItemLeave:N,itemTextRefCallback:B,focusSelectedItem:U,selectedItemText:x,position:r,isPositioned:K,searchRef:j,children:d.jsx(Ph,{as:ew,allowPinchZoom:!0,children:d.jsx(Yf,{asChild:!0,trapped:b.open,onMountAutoFocus:R=>{R.preventDefault()},onUnmountAutoFocus:Pe(s,R=>{var F;(F=b.trigger)==null||F.focus({preventScroll:!0}),R.preventDefault()}),children:d.jsx(Zf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:R=>R.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:d.jsx(z,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:R=>R.preventDefault(),...w,...H,onPlaced:()=>Y(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Pe(w.onKeyDown,R=>{const F=R.ctrlKey||R.altKey||R.metaKey;if(R.key==="Tab"&&R.preventDefault(),!F&&R.key.length===1&&V(R.key),["ArrowUp","ArrowDown","Home","End"].includes(R.key)){let L=_().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(R.key)&&(L=L.slice().reverse()),["ArrowUp","ArrowDown"].includes(R.key)){const J=R.target,O=L.indexOf(J);L=L.slice(O+1)}setTimeout(()=>G(L)),R.preventDefault()}})})})})})})});Lh.displayName=Q2;var tw="SelectItemAlignedPosition",_h=m.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Zt(un,n),i=Kt(un,n),[a,c]=m.useState(null),[l,u]=m.useState(null),h=Le(t,k=>u(k)),p=Fs(n),g=m.useRef(!1),y=m.useRef(!0),{viewport:f,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=i,S=m.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&l&&f&&v&&w){const k=o.trigger.getBoundingClientRect(),P=l.getBoundingClientRect(),$=o.valueNode.getBoundingClientRect(),x=w.getBoundingClientRect();if(o.dir!=="rtl"){const J=x.left-P.left,O=$.left-J,se=k.left-O,le=k.width+se,De=Math.max(le,P.width),ut=window.innerWidth-it,Gt=bl(O,[it,Math.max(it,ut-De)]);a.style.minWidth=le+"px",a.style.left=Gt+"px"}else{const J=P.right-x.right,O=window.innerWidth-$.right-J,se=window.innerWidth-k.right-O,le=k.width+se,De=Math.max(le,P.width),ut=window.innerWidth-it,Gt=bl(O,[it,Math.max(it,ut-De)]);a.style.minWidth=le+"px",a.style.right=Gt+"px"}const I=p(),_=window.innerHeight-it*2,K=f.scrollHeight,Y=window.getComputedStyle(l),X=parseInt(Y.borderTopWidth,10),G=parseInt(Y.paddingTop,10),U=parseInt(Y.borderBottomWidth,10),M=parseInt(Y.paddingBottom,10),q=X+G+K+M+U,j=Math.min(v.offsetHeight*5,q),V=window.getComputedStyle(f),Z=parseInt(V.paddingTop,10),N=parseInt(V.paddingBottom,10),B=k.top+k.height/2-it,z=_-B,H=v.offsetHeight/2,R=v.offsetTop+H,F=X+G+R,W=q-F;if(F<=B){const J=I.length>0&&v===I[I.length-1].ref.current;a.style.bottom="0px";const O=l.clientHeight-f.offsetTop-f.offsetHeight,se=Math.max(z,H+(J?N:0)+O+U),le=F+se;a.style.height=le+"px"}else{const J=I.length>0&&v===I[0].ref.current;a.style.top="0px";const se=Math.max(B,X+f.offsetTop+(J?Z:0)+H)+W;a.style.height=se+"px",f.scrollTop=F-B+f.offsetTop}a.style.margin=`${it}px 0`,a.style.minHeight=j+"px",a.style.maxHeight=_+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[p,o.trigger,o.valueNode,a,l,f,v,w,o.dir,r]);We(()=>S(),[S]);const[C,E]=m.useState();We(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const T=m.useCallback(k=>{k&&y.current===!0&&(S(),b==null||b(),y.current=!1)},[S,b]);return d.jsx(rw,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:T,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:d.jsx(Te.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});_h.displayName=tw;var nw="SelectPopperPosition",Ti=m.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=it,...o}=e,i=Bs(n);return d.jsx(Qb,{...i,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.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)"}})});Ti.displayName=nw;var[rw,Oa]=Xn(un,{}),Ai="SelectViewport",Fh=m.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=Kt(Ai,n),i=Oa(Ai,n),a=Le(t,o.onViewportChange),c=m.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("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}),d.jsx(_s.Slot,{scope:n,children:d.jsx(Te.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Pe(s.onScroll,l=>{const u=l.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&h){const g=Math.abs(c.current-u.scrollTop);if(g>0){const y=window.innerHeight-it*2,f=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),w=Math.max(f,v);if(w<y){const b=w+g,S=Math.min(y,b),C=b-S;h.style.height=S+"px",h.style.bottom==="0px"&&(u.scrollTop=C>0?C:0,h.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});Fh.displayName=Ai;var Bh="SelectGroup",[sw,ow]=Xn(Bh),iw=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Ta();return d.jsx(sw,{scope:n,id:s,children:d.jsx(Te.div,{role:"group","aria-labelledby":s,...r,ref:t})})});iw.displayName=Bh;var Hh="SelectLabel",aw=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=ow(Hh,n);return d.jsx(Te.div,{id:s.id,...r,ref:t})});aw.displayName=Hh;var Es="SelectItem",[cw,zh]=Xn(Es),Uh=m.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,a=Zt(Es,n),c=Kt(Es,n),l=a.value===r,[u,h]=m.useState(o??""),[p,g]=m.useState(!1),y=Le(t,b=>{var S;return(S=c.itemRefCallback)==null?void 0:S.call(c,b,r,s)}),f=Ta(),v=m.useRef("touch"),w=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new 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 d.jsx(cw,{scope:n,value:r,disabled:s,textId:f,isSelected:l,onItemTextChange:m.useCallback(b=>{h(S=>S||((b==null?void 0:b.textContent)??"").trim())},[]),children:d.jsx(_s.ItemSlot,{scope:n,value:r,disabled:s,textValue:u,children:d.jsx(Te.div,{role:"option","aria-labelledby":f,"data-highlighted":p?"":void 0,"aria-selected":l&&p,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:y,onFocus:Pe(i.onFocus,()=>g(!0)),onBlur:Pe(i.onBlur,()=>g(!1)),onClick:Pe(i.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:Pe(i.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:Pe(i.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:Pe(i.onPointerMove,b=>{var S;v.current=b.pointerType,s?(S=c.onItemLeave)==null||S.call(c):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Pe(i.onPointerLeave,b=>{var S;b.currentTarget===document.activeElement&&((S=c.onItemLeave)==null||S.call(c))}),onKeyDown:Pe(i.onKeyDown,b=>{var C;((C=c.searchRef)==null?void 0:C.current)!==""&&b.key===" "||(Z2.includes(b.key)&&w(),b.key===" "&&b.preventDefault())})})})})});Uh.displayName=Es;var or="SelectItemText",Wh=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=Zt(or,n),a=Kt(or,n),c=zh(or,n),l=q2(or,n),[u,h]=m.useState(null),p=Le(t,w=>h(w),c.onItemTextChange,w=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,w,c.value,c.disabled)}),g=u==null?void 0:u.textContent,y=m.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:f,onNativeOptionRemove:v}=l;return We(()=>(f(y),()=>v(y)),[f,v,y]),d.jsxs(d.Fragment,{children:[d.jsx(Te.span,{id:c.textId,...o,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ns.createPortal(o.children,i.valueNode):null]})});Wh.displayName=or;var Zh="SelectItemIndicator",Kh=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return zh(Zh,n).isSelected?d.jsx(Te.span,{"aria-hidden":!0,...r,ref:t}):null});Kh.displayName=Zh;var Pi="SelectScrollUpButton",Yh=m.forwardRef((e,t)=>{const n=Kt(Pi,e.__scopeSelect),r=Oa(Pi,e.__scopeSelect),[s,o]=m.useState(!1),i=Le(t,r.onScrollButtonChange);return We(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;o(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?d.jsx(qh,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Yh.displayName=Pi;var Mi="SelectScrollDownButton",Gh=m.forwardRef((e,t)=>{const n=Kt(Mi,e.__scopeSelect),r=Oa(Mi,e.__scopeSelect),[s,o]=m.useState(!1),i=Le(t,r.onScrollButtonChange);return We(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;o(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?d.jsx(qh,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Gh.displayName=Mi;var qh=m.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=Kt("SelectScrollButton",n),i=m.useRef(null),a=Fs(n),c=m.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return m.useEffect(()=>()=>c(),[c]),We(()=>{var u;const l=a().find(h=>h.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),d.jsx(Te.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Pe(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Pe(s.onPointerMove,()=>{var l;(l=o.onItemLeave)==null||l.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Pe(s.onPointerLeave,()=>{c()})})}),lw="SelectSeparator",dw=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(Te.div,{"aria-hidden":!0,...r,ref:t})});dw.displayName=lw;var Ni="SelectArrow",uw=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Bs(n),o=Zt(Ni,n),i=Kt(Ni,n);return o.open&&i.position==="popper"?d.jsx(e2,{...s,...r,ref:t}):null});uw.displayName=Ni;var fw="SelectBubbleInput",Xh=m.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=m.useRef(null),o=Le(r,s),i=n2(t);return m.useEffect(()=>{const a=s.current;if(!a)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&u){const h=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(h)}},[i,t]),d.jsx(Te.select,{...n,style:{...xh,...n.style},ref:o,defaultValue:t})});Xh.displayName=fw;function Jh(e){return e===""||e===void 0}function Qh(e){const t=cn(e),n=m.useRef(""),r=m.useRef(0),s=m.useCallback(i=>{const a=n.current+i;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=m.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function em(e,t,n){const s=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=hw(e,Math.max(o,0));s.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function hw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mw=Mh,pw=jh,gw=Vh,yw=Ih,vw=Dh,xw=Oh,bw=Fh,ww=Uh,Sw=Wh,Cw=Kh,Ew=Yh,kw=Gh;function zl({...e}){return d.jsx(mw,{"data-slot":"select",...e})}function Ul({...e}){return d.jsx(gw,{"data-slot":"select-value",...e})}function Wl({className:e,size:t="default",children:n,...r}){return d.jsxs(pw,{"data-slot":"select-trigger","data-size":t,className:ne(["flex w-fit cursor-pointer items-center justify-between gap-2","rounded-full px-3 py-2 text-sm whitespace-nowrap","bg-button transition-[color,border,background-color]","disabled:cursor-not-allowed disabled:opacity-50","hover:bg-muted hover:text-muted-foreground","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0","data-[placeholder]:text-muted-foreground","data-[size=default]:h-9 data-[size=sm]:h-8","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2","[&:not([class*='text-'])_svg:not([class*='text-'])]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...r,children:[n,d.jsx(yw,{asChild:!0,children:d.jsx(Sa,{weight:"bold",className:"size-4 transition-colors"})})]})}function Zl({className:e,children:t,position:n="popper",...r}){return d.jsx(vw,{children:d.jsxs(xw,{"data-slot":"select-content",className:ne(["bg-[#18182a]/90 backdrop-blur-md text-white border border-[#23233a] shadow-2xl","relative z-50 overflow-x-hidden overflow-y-auto rounded-xl","max-h-(--radix-select-content-available-height) min-w-[8rem]","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2","data-[side=right]:slide-in-from-left-2","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2"],n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[d.jsx(Tw,{}),d.jsx(bw,{className:ne("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(Aw,{})]})})}function Kl({className:e,children:t,...n}){return d.jsxs(ww,{"data-slot":"select-item",className:ne(["relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none","cursor-pointer disabled:cursor-not-allowed","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2","[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...n,children:[d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(Cw,{children:d.jsx(Cf,{className:"size-4",weight:"bold"})})}),d.jsx(Sw,{children:t})]})}function Tw({className:e,...t}){return d.jsx(Ew,{"data-slot":"select-scroll-up-button",className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(wf,{className:"size-4",weight:"bold"})})}function Aw({className:e,...t}){return d.jsx(kw,{"data-slot":"select-scroll-down-button",className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Sa,{className:"size-4",weight:"bold"})})}const Yl=Ms.cva(["w-full rounded-full px-3 py-2 text-sm cursor-pointer","disabled:not-allowed hover:bg-button-hover focus:bg-button-hover"],{variants:{size:{default:"w-[180px]",sm:"w-auto"}},defaultVariants:{size:"default"}});function Gl({kind:e,track:t,requestPermissions:n,onError:r,client:s,...o}){const i=o.size||"default";if(!s)return d.jsxs(zl,{disabled:!0,children:[d.jsx(Wl,{className:ne(Yl({size:i}),o.className),children:d.jsx(Ul,{placeholder:`Select a ${e}`})}),d.jsx(Zl,{children:d.jsx(Kl,{value:"none",children:"No devices available"})})]});const{devices:a,activeDeviceId:c,setActiveMediaDevice:l}=cx(s,e==="audioinput"?"audioinput":"videoinput");return d.jsxs(zl,{value:c,onValueChange:l,children:[d.jsx(Wl,{className:ne(Yl({size:i}),o.className,"hover:bg"),children:i!=="sm"&&d.jsx(Ul,{className:"font-mono text-sm",placeholder:`Select a ${e}`})}),d.jsx(Zl,{children:a.map(u=>d.jsx(Kl,{value:u.deviceId,className:"font-mono text-xs",children:u.label},u.deviceId))})]})}function Pw(e,t,n=!1){if(n)return Ca;switch(e){case te.Track.Source.Microphone:return t?Ef:kf;case te.Track.Source.Camera:return t?Af:Pf;case te.Track.Source.ScreenShare:return Tf;default:return m.Fragment}}function Do({source:e,pressed:t,pending:n,className:r,...s}){const o=Pw(e,t??!1,n),i=e===te.Track.Source.Microphone&&!(t??!1)&&!n,a=e===te.Track.Source.Camera&&!(t??!1)&&!n;return m.useEffect(()=>{console.log(`TrackToggle for ${e} changed: pressed=${t}, pending=${n}, actualState=${t?"enabled":"disabled"}`)},[e,t,n]),d.jsxs(Uf,{pressed:t,"aria-label":`Toggle ${e}`,className:ne(r),...s,children:[d.jsx(o,{weight:"bold",className:ne(n&&"animate-spin",i||a?"text-red-500":void 0)}),s.children]})}function Mw(e){return e?ox(e):{camera:!0,microphone:!0,screenShare:!0,data:!0}}function Nw(e={}){const{controls:t,saveUserChoices:n=!0,client:r}=e,s={leave:!0,...t};if(!r)return{micTrackRef:{participant:void 0,source:te.Track.Source.Microphone,publication:void 0},visibleControls:s,microphoneToggle:{enabled:!1,pending:!1,toggle:async()=>{}},cameraToggle:{enabled:!1,pending:!1,toggle:async()=>{}},screenShareToggle:{enabled:!1,pending:!1,toggle:async()=>{}},handleDisconnect:()=>{},handleAudioDeviceChange:()=>{},handleVideoDeviceChange:()=>{}};const{microphoneTrack:o,localParticipant:i}=ix(r),a=Mw(r);ax(r);const c=ko(r,"microphone",{onDeviceError:T=>{var k;return(k=e.onDeviceError)==null?void 0:k.call(e,{source:te.Track.Source.Microphone,error:T})}}),l=ko(r,"camera",{onDeviceError:T=>{var k;return(k=e.onDeviceError)==null?void 0:k.call(e,{source:te.Track.Source.Camera,error:T})}}),u=ko(r,"screenShare",{onDeviceError:T=>{var k;return(k=e.onDeviceError)==null?void 0:k.call(e,{source:te.Track.Source.ScreenShare,error:T})}}),h=m.useMemo(()=>{let T;if(i){for(const[,k]of i.trackPublications)if(k.source===te.Track.Source.Microphone){T=k;break}}return console.log("🎤 Creating micTrackRef:",{hasParticipant:!!i,hasPublication:!!T,isTrackSubscribed:T==null?void 0:T.isSubscribed,isMuted:T==null?void 0:T.isMuted,trackSid:T==null?void 0:T.trackSid}),{participant:i??void 0,source:te.Track.Source.Microphone,publication:T}},[i,o]);s.microphone??(s.microphone=a.microphone),s.screenShare??(s.screenShare=a.screenShare),s.camera??(s.camera=a.camera),s.chat??(s.chat=a.data);const{saveAudioInputEnabled:p,saveAudioInputDeviceId:g,saveVideoInputEnabled:y,saveVideoInputDeviceId:f}=lx({preventSave:!n}),v=m.useCallback(()=>{r&&r.disconnect()},[r]),w=m.useCallback(T=>{g(T??"default"),r&&r.setAudioInputDevice(T)},[g,r]),b=m.useCallback(T=>{f(T??"default"),r&&r.setVideoInputDevice(T)},[f,r]),S=m.useCallback(async T=>{u.enabled&&await u.toggle(!1),await l.toggle(T),y(!l.enabled)},[l,y,u]),C=m.useCallback(async T=>{await c.toggle(T),p(!c.enabled)},[c,p]),E=m.useCallback(async T=>{l.enabled&&await l.toggle(!1),await u.toggle(T)},[l,u]);return{micTrackRef:h,visibleControls:s,cameraToggle:{...l,toggle:S},microphoneToggle:{...c,toggle:C},screenShareToggle:{...u,toggle:E},handleDisconnect:v,handleAudioDeviceChange:w,handleVideoDeviceChange:b}}const jw={card:" bg-gradient-to-br from-black to-gray-900 border border-gray-900 w-full h-full flex flex-col justify-between overflow-hidden mx-auto my-auto rounded-2xl shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-black/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-gray-800/20 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-gray-600/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-gray-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-gray-400 to-gray-500 rounded-full blur-sm opacity-20 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-gray-500 to-gray-600 rounded-full blur-sm opacity-15 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-black to-gray-900 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-white via-gray-200 to-gray-300"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900",promptSlider:"absolute w-full py-3 px-2 bg-gray-900 rounded-xl text-center text-white text-sm transition-opacity duration-700 ease-in-out border border-gray-600",statusIndicator:"w-2 h-2 bg-gray-400 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-gray-600/30 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-gray-500/20 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-gray-400/15 pulse-ring"},controlBar:"border border-gray-600 rounded-3xl py-4 flex flex-col justify-end h-full bg-gray-900/50 backdrop-blur-sm",chatInput:{container:"bg-gray-900 w-full border-gray-600",textarea:"bg-gray-800 border-none text-white placeholder-gray-400",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-gray-600 text-white",other:"bg-gray-700 text-white"},chatHeader:{container:"bg-gray-900 border-gray-600",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-gray-400 mb-2",suggestedResponse:{container:"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white"},video:{container:"bg-gradient-to-br from-black to-gray-900 text-white",header:"border-gray-700 bg-gray-900/50",headerButton:"bg-gray-800 hover:bg-gray-700 text-gray-300",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-gray-900/80 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-gray-800 border border-gray-700 shadow-lg",placeholder:"bg-gray-800 text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Rw={card:" bg-gradient-to-br from-white to-gray-50 border border-gray-200 w-full h-full flex flex-col justify-between overflow-hidden mx-auto my-auto shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-white/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-blue-500/5 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-purple-500/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-pink-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full blur-sm opacity-30 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-pink-500 to-purple-500 rounded-full blur-sm opacity-20 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-white to-gray-50 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-gray-900",secondary:"text-gray-700",muted:"text-gray-500",accent:"bg-clip-text text-transparent bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600"},micButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-white",promptSlider:"absolute w-full py-3 px-2 bg-gray-100 rounded-xl text-center text-gray-700 text-sm transition-opacity duration-700 ease-in-out border border-gray-200",statusIndicator:"w-2 h-2 bg-green-500 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-blue-500/20 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-purple-500/15 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-pink-500/10 pulse-ring"},controlBar:"border border-gray-200 rounded-3xl py-4 flex flex-col justify-end h-full bg-white/80 backdrop-blur-sm",chatInput:{container:"bg-white/90 border-gray-200 shadow-sm",textarea:"bg-white border-none text-gray-900 placeholder-gray-500 ",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 disabled:opacity-50 text-white",attachButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100 bg-blue-50",endButton:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200"},chatMessage:{own:"bg-blue-50 text-gray-900 border border-blue-100",other:"bg-gray-50 text-gray-900 border border-gray-200"},chatHeader:{container:"bg-white border-gray-200",backButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100"},spinner:"w-10 h-10 animate-spin text-blue-500 mb-2",suggestedResponse:{container:"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900"},video:{container:"bg-gradient-to-br from-white to-gray-50 text-gray-900",header:"border-gray-200 bg-white/80",headerButton:"bg-gray-100 hover:bg-gray-200 text-gray-600",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-white/90 backdrop-blur-sm border-t border-gray-200",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-200 hover:bg-gray-300 text-gray-600",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-white border border-gray-200 shadow-sm",placeholder:"bg-gray-50 text-gray-600",avatar:"bg-gray-200 text-gray-600",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Vw={card:" text-white bg-gradient-to-br from-[#171727] to-[#12121F] border border-gray-800 w-full h-full flex flex-col justify-between overflow-hidden mx-auto my-auto",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-[#171727]/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-[#3B82F6]/15 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-[#8B5CF6]/25 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-[#EC4899]/20 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full blur-sm opacity-50 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-[#EC4899] to-[#8B5CF6] rounded-full blur-sm opacity-40 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-[#171727] to-[#12121F] rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-[#3B82F6] via-[#8B5CF6] to-[#EC4899]"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900 shadow-xl",promptSlider:"absolute w-full py-3 px-2 bg-[#1E1E2E] rounded-xl text-center text-gray-200 text-sm transition-opacity duration-700 ease-in-out border border-gray-700",statusIndicator:"w-2 h-2 bg-[#10B981] rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-[#3B82F6]/40 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-[#8B5CF6]/30 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-[#EC4899]/20 pulse-ring"},controlBar:"border border-border rounded-3xl py-4 flex flex-col justify-end h-full",chatInput:{container:"bg-[#1E1E2E] border-gray-700",textarea:"bg-[#1E1E2E] border-none text-white placeholder-gray-400",sendButton:"bg-[#3B82F6] hover:bg-[#2563EB] disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-[#1E1E2E]/80 text-white",other:"bg-[#1E1E2E] text-white border border-gray-700"},chatHeader:{container:"bg-[#1E1E2E] border-gray-700",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-blue-400 mb-2",suggestedResponse:{container:"bg-[#221f3f] text-white border-none"},video:{container:"bg-gradient-to-br from-[#171727] to-[#12121F] text-white",header:"border-gray-700 bg-[#1E1E2E]/80",headerButton:"bg-[#1E1E2E] hover:bg-gray-700 text-gray-300",statusDot:"bg-[#10B981] animate-pulse",controlsBackground:"bg-[#1E1E2E]/90 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-[#3B82F6] hover:bg-[#2563EB] text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-[#1E1E2E] border border-gray-700 shadow-xl",placeholder:"bg-[#1E1E2E] text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},ql={dark:jw,light:Rw,vox:Vw};function _e(e){return ql[e]||ql.vox}function Iw({controls:e,saveUserChoices:t=!0,capabilities:n,className:r,onSendMessage:s,onChatOpenChange:o,onDisconnect:i,onDeviceError:a,theme:c="vox",client:l,...u}){const[h,p]=m.useState(!1),[g,y]=m.useState(!1),f=_e(c),{micTrackRef:v,visibleControls:w,cameraToggle:b,microphoneToggle:S,screenShareToggle:C,handleAudioDeviceChange:E,handleVideoDeviceChange:T,handleDisconnect:k}=Nw({controls:e,saveUserChoices:t,client:l}),P=async $=>{y(!0);try{await(s==null?void 0:s($))}finally{y(!1)}};return m.useEffect(()=>{o==null||o(h)},[h,o]),m.useEffect(()=>{var $,x,I,_;console.log("🎤 AgentControlBar: micTrackRef changed:",{hasParticipant:!!v.participant,hasPublication:!!v.publication,source:v.source,isSubscribed:($=v.publication)==null?void 0:$.isSubscribed,isMuted:(x=v.publication)==null?void 0:x.isMuted,trackSid:(I=v.publication)==null?void 0:I.trackSid,hasTrack:!!((_=v.publication)!=null&&_.track)})},[v]),d.jsxs("div",{"aria-label":"Voice assistant controls",className:ne(f.controlBar,r),...u,children:[n.suportsChatInput&&d.jsxs("div",{inert:!h,className:ne("overflow-hidden transition-[height] relative duration-300 ease-in-out",h?"h-[64px] mb-3":"h-0"),children:[d.jsx("div",{className:"flex h-9 px-4 w-full",children:d.jsx(Xv,{onSend:P,disabled:g,className:ne("w-full",f.chatInput)})}),d.jsx("hr",{className:"border-border my-2 mx-5"})]}),d.jsxs("div",{className:ne("flex flex-row items-center gap-2 rounded-2xl mx-auto border-none backdrop-blur-lg px-2 py-2",c==="light"?"bg-white/80":"bg-[#18182a]/80"),children:[d.jsxs("div",{className:"flex gap-y-2 justify-start",children:[w.microphone&&d.jsxs("div",{className:"flex gap-y-2 items-center rounded-full overflow-hidden border-none ",children:[d.jsx(Do,{variant:"primary",source:te.Track.Source.Microphone,pressed:S.enabled,disabled:S.pending,onPressedChange:S.toggle,className:"w-auto py-2 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),d.jsx(Me.BarVisualizer,{barCount:3,trackRef:v,options:{minHeight:5},className:"flex h-full w-auto items-center justify-center gap-x-0.5",children:d.jsx("span",{className:ne(["h-full w-0.5 origin-center rounded-2xl","bg-white","group-data-[state=on]/track:bg-white group-data-[state=off]/track:bg-white","data-lk-muted:bg-muted"])})}),d.jsx(Gl,{size:"sm",kind:"audioinput",client:l,onError:a?$=>$ instanceof Error?a({source:te.Track.Source.Microphone,error:$}):void 0:void 0,onActiveDeviceChange:E,className:ne(["h-full py-2 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/30 transition-colors","min-w-[2.5rem]"])})]}),n.suportsVideoInput&&w.camera&&d.jsxs("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:[d.jsx(Do,{variant:"primary",source:te.Track.Source.Camera,pressed:b.enabled,pending:b.pending,disabled:b.pending,onPressedChange:b.toggle,className:"w-auto py-2 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),d.jsx(Gl,{size:"sm",kind:"videoinput",client:l,onError:a?$=>$ instanceof Error?a({source:te.Track.Source.Camera,error:$}):void 0:void 0,onActiveDeviceChange:T,className:ne(["h-full py-2 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors","min-w-[2.5rem]"])})]}),n.suportsScreenShare&&w.screenShare&&d.jsx("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:d.jsx(Do,{variant:"secondary",source:te.Track.Source.ScreenShare,pressed:C.enabled,disabled:C.pending,onPressedChange:C.toggle,className:"w-auto py-2 disabled:opacity-70 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"})})]}),w.chat&&d.jsx("div",{className:"flex items-center rounded-full overflow-hidden bg-secondary text-secondary-foreground border-none ",children:d.jsx(Uf,{variant:"secondary","aria-label":"Toggle chat",pressed:h,onPressedChange:$=>{p($)},className:"aspect-square h-full py-3 rounded-none border-none bg-transparent text-inherit focus:bg-secondary/80 hover:bg-secondary/80 transition-colors flex items-center",children:d.jsx(Sf,{weight:"bold",className:"h-5 w-5"})})})]})]})}const Dw=(e,t)=>{var a,c;const n=m.useMemo(()=>t?t(e.message):e.message,[e.message,t]),r=!!e.editTimestamp,s=new Date(e.timestamp),o=typeof navigator<"u"?navigator.language:"en-US",i=(a=e.from)!=null&&a.name&&e.from.name!==""?e.from.name:(c=e.from)==null?void 0:c.identity;return{message:n,hasBeenEdited:r,time:s,locale:o,name:i}},Ow=({entry:e,messageFormatter:t,className:n,participantName:r,...s})=>{var u,h;const{message:o,time:i,locale:a}=Dw(e,t),c=((u=e.from)==null?void 0:u.isLocal)??!1;ne("w-full px-3 py-2 rounded-2xl text-xs break-words whitespace-pre-line",c?" text-end border border-[#5078F2]/30":"bg-muted text-foreground border border-[#813aa7]/30","text-left");const l=ne("inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-bold flex-shrink-0",c?"bg-[#5078F2] text-white":"bg-[#813aa7] ml-1 text-white");return d.jsx("li",{title:i.toLocaleTimeString(a,{timeStyle:"full"}),className:ne("group flex mb-2",c?"justify-end":"justify-start",n),...s,children:d.jsxs("div",{className:ne("flex w-fit max-w-full rounded-2xl border",c?"flex-row-reverse items-center border-[#5078F2]/30":"flex-row items-center border-[#813aa7]/30 bg-muted text-foreground"),children:[d.jsx("span",{className:l,children:c?((h=r==null?void 0:r[0])==null?void 0:h.toUpperCase())||"U":"A"}),d.jsx("span",{className:ne("flex items-center text-xs break-words whitespace-pre-line",c?"ml-auto justify-end text-right":"justify-start text-left","px-3 py-2"),children:o})]})})};function $w(e){A.useEffect(()=>{function t(){const n=e.current;n&&(n.scrollTop=n.scrollHeight)}if(e.current){const n=new ResizeObserver(t);return n.observe(e.current),t(),()=>n.disconnect()}},[e])}const Lw=({className:e,children:t,...n})=>{const r=A.useRef(null);return $w(r),d.jsx("div",{ref:r,className:ne("flex flex-col justify-end",e),...n,children:t})},_w=({state:e,audioTrack:t,className:n,ref:r})=>d.jsx("div",{ref:r,className:ne("",n),children:d.jsx(Me.BarVisualizer,{barCount:5,state:e,options:{minHeight:5},trackRef:t,className:ne("flex aspect-video w-40 items-center justify-center gap-1"),children:d.jsx("span",{className:ne(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear","data-[lk-highlighted=true]:bg-[#5c64f6]","data-[lk-muted=true]:bg-[#222222]"])})})}),Fw=({videoTrack:e,className:t,ref:n})=>{var r,s;return d.jsx("div",{ref:n,className:ne(t),children:d.jsx(Me.VideoTrack,{trackRef:e,width:((r=e==null?void 0:e.publication.dimensions)==null?void 0:r.width)??0,height:((s=e==null?void 0:e.publication.dimensions)==null?void 0:s.height)??0,className:"rounded-md"})})},Bw=ae.create(Me.VideoTrack),Hw=({trackRef:e,className:t,ref:n})=>{var r,s;return d.jsx("div",{className:ne("bg-muted overflow-hidden rounded-md",t),children:d.jsx(Bw,{ref:n,trackRef:e,width:((r=e==null?void 0:e.publication.dimensions)==null?void 0:r.width)??0,height:((s=e==null?void 0:e.publication.dimensions)==null?void 0:s.height)??0,className:ne("h-full w-auto")})})},Xl=ae.create(Hw),zw=ae.create(_w),Uw=ae.create(Fw),Tt={initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:675,damping:75,mass:1}},vn={grid:["h-full w-full","grid gap-x-2 place-content-center","grid-cols-[1fr_1fr] grid-rows-[90px_1fr_90px]"],agentChatOpenWithSecondTile:["col-start-1 row-start-1","self-center justify-self-end"],agentChatOpenWithoutSecondTile:["col-start-1 row-start-1","col-span-2","place-content-center"],agentChatClosed:["col-start-1 row-start-1","col-span-2 row-span-3","place-content-center"],secondTileChatOpen:["col-start-2 row-start-1","self-center justify-self-start"],secondTileChatClosed:["col-start-2 row-start-3","place-content-end"]};function Ww(e){const{localParticipant:t}=Me.useLocalParticipant(),n=t.getTrackPublication(e);return A.useMemo(()=>n?{source:e,participant:t,publication:n}:void 0,[e,n,t])}function Zw({chatOpen:e}){const{state:t,audioTrack:n,videoTrack:r,agent:{isActive:s=!1}={}}=Me.useVoiceAssistant(),[o]=Me.useTracks([te.Track.Source.ScreenShare]),i=Ww(te.Track.Source.Camera),a=i&&!i.publication.isMuted,c=o&&!o.publication.isMuted,l=a||c,u={...Tt.transition,delay:e?0:.15},h={...Tt.animate,scale:e?1:3,transition:u},p={...Tt.animate,transition:u},g=u,y=u,f=r!==void 0;return d.jsx("div",{className:"relative w-full h-full z-10 flex items-center justify-center",children:d.jsx("div",{className:"relative w-full h-full max-w-2xl px-4 md:px-0",children:d.jsxs("div",{className:ne(vn.grid),children:[s&&d.jsx("div",{className:ne(["grid",!e&&vn.agentChatClosed,e&&l&&vn.agentChatOpenWithSecondTile,e&&!l&&vn.agentChatOpenWithoutSecondTile]),children:d.jsxs("div",{className:"h-full flex items-center justify-center",children:[!f&&d.jsx(zw,{layoutId:"agent",...Tt,animate:h,transition:g,state:t,audioTrack:n,className:ne(e?"h-[90px]":"h-auto w-full")},"agent"),f&&d.jsx(Uw,{layoutId:"avatar",...Tt,animate:p,transition:y,videoTrack:r,className:ne(e?"h-[90px] [&>video]:h-[90px] [&>video]:w-auto":"h-auto w-full")},"avatar")]})}),d.jsx("div",{className:ne(["grid",e&&vn.secondTileChatOpen,!e&&vn.secondTileChatClosed]),children:d.jsxs("div",{className:"w-full px-10 flex items-center shadow-2xl justify-between",children:[i&&a&&d.jsx(Xl,{layout:"position",layoutId:"camera",...Tt,trackRef:i,transition:{...Tt.transition,delay:e?0:.15},className:"h-[60px] order-1"},"camera"),c&&d.jsx(Xl,{layout:"position",layoutId:"screen",...Tt,trackRef:o,transition:{...Tt.transition,delay:e?0:.15},className:"h-[70px] order-2"},"screen")]})})]})})})}/**
49
+ `)},z2=0,yn=[];function U2(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),s=m.useState(z2++)[0],o=m.useState(Eh)[0],i=m.useRef(e);m.useEffect(function(){i.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var f=u2([e.lockRef.current],(e.shards||[]).map(Hl),!0).filter(Boolean);return f.forEach(function(v){return v.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),f.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=m.useCallback(function(f,v){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!i.current.allowPinchZoom;var w=Yr(f),b=n.current,S="deltaX"in f?f.deltaX:b[0]-w[0],C="deltaY"in f?f.deltaY:b[1]-w[1],E,T=f.target,k=Math.abs(S)>Math.abs(C)?"h":"v";if("touches"in f&&k==="h"&&T.type==="range")return!1;var P=Fl(k,T);if(!P)return!0;if(P?E=k:(E=k==="v"?"h":"v",P=Fl(k,T)),!P)return!1;if(!r.current&&"changedTouches"in f&&(S||C)&&(r.current=E),!E)return!0;var $=r.current||E;return F2($,v,f,$==="h"?S:C)},[]),c=m.useCallback(function(f){var v=f;if(!(!yn.length||yn[yn.length-1]!==o)){var w="deltaY"in v?Bl(v):Yr(v),b=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&B2(E.delta,w)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var S=(i.current.shards||[]).map(Hl).filter(Boolean).filter(function(E){return E.contains(v.target)}),C=S.length>0?a(v,S[0]):!i.current.noIsolation;C&&v.cancelable&&v.preventDefault()}}},[]),l=m.useCallback(function(f,v,w,b){var S={name:f,delta:v,target:w,should:b,shadowParent:W2(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(C){return C!==S})},1)},[]),u=m.useCallback(function(f){n.current=Yr(f),r.current=void 0},[]),h=m.useCallback(function(f){l(f.type,Bl(f),f.target,a(f,e.lockRef.current))},[]),p=m.useCallback(function(f){l(f.type,Yr(f),f.target,a(f,e.lockRef.current))},[]);m.useEffect(function(){return yn.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,gn),document.addEventListener("touchmove",c,gn),document.addEventListener("touchstart",u,gn),function(){yn=yn.filter(function(f){return f!==o}),document.removeEventListener("wheel",c,gn),document.removeEventListener("touchmove",c,gn),document.removeEventListener("touchstart",u,gn)}},[]);var g=e.removeScrollBar,y=e.inert;return m.createElement(m.Fragment,null,y?m.createElement(o,{styles:H2(s)}):null,g?m.createElement(V2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function W2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Z2=b2(Ch,U2);var Ph=m.forwardRef(function(e,t){return m.createElement(Ls,gt({},e,{ref:t,sideCar:Z2}))});Ph.classNames=Ls.classNames;var K2=[" ","Enter","ArrowUp","ArrowDown"],Y2=[" ","Enter"],dn="Select",[_s,Fs,G2]=hx(dn),[Xn,fE]=ka(dn,[G2,lh]),Bs=lh(),[q2,Zt]=Xn(dn),[X2,J2]=Xn(dn),Mh=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:i,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:h,disabled:p,required:g,form:y}=e,f=Bs(t),[v,w]=m.useState(null),[b,S]=m.useState(null),[C,E]=m.useState(!1),T=px(l),[k,P]=bi({prop:r,defaultProp:s??!1,onChange:o,caller:dn}),[$,x]=bi({prop:i,defaultProp:a,onChange:c,caller:dn}),I=m.useRef(null),_=v?y||!!v.closest("form"):!0,[K,Y]=m.useState(new Set),X=Array.from(K).map(G=>G.props.value).join(";");return d.jsx(Qb,{...f,children:d.jsxs(q2,{required:g,scope:t,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:E,contentId:Ta(),value:$,onValueChange:x,open:k,onOpenChange:P,dir:T,triggerPointerDownPosRef:I,disabled:p,children:[d.jsx(_s.Provider,{scope:t,children:d.jsx(X2,{scope:e.__scopeSelect,onNativeOptionAdd:m.useCallback(G=>{Y(U=>new Set(U).add(G))},[]),onNativeOptionRemove:m.useCallback(G=>{Y(U=>{const M=new Set(U);return M.delete(G),M})},[]),children:n})}),_?d.jsxs(Xh,{"aria-hidden":!0,required:g,tabIndex:-1,name:u,autoComplete:h,value:$,onChange:G=>x(G.target.value),disabled:p,form:y,children:[$===void 0?d.jsx("option",{value:""}):null,Array.from(K)]},X):null]})})};Mh.displayName=dn;var Rh="SelectTrigger",Nh=m.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=Bs(n),i=Zt(Rh,n),a=i.disabled||r,c=Le(t,i.onTriggerChange),l=Fs(n),u=m.useRef("touch"),[h,p,g]=Qh(f=>{const v=l().filter(S=>!S.disabled),w=v.find(S=>S.value===i.value),b=em(v,f,w);b!==void 0&&i.onValueChange(b.value)}),y=f=>{a||(i.onOpenChange(!0),g()),f&&(i.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return d.jsx(e2,{asChild:!0,...o,children:d.jsx(Te.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Jh(i.value)?"":void 0,...s,ref:c,onClick:Pe(s.onClick,f=>{f.currentTarget.focus(),u.current!=="mouse"&&y(f)}),onPointerDown:Pe(s.onPointerDown,f=>{u.current=f.pointerType;const v=f.target;v.hasPointerCapture(f.pointerId)&&v.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(y(f),f.preventDefault())}),onKeyDown:Pe(s.onKeyDown,f=>{const v=h.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&p(f.key),!(v&&f.key===" ")&&K2.includes(f.key)&&(y(),f.preventDefault())})})})});Nh.displayName=Rh;var jh="SelectValue",Vh=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:i="",...a}=e,c=Zt(jh,n),{onValueNodeHasChildrenChange:l}=c,u=o!==void 0,h=Le(t,c.onValueNodeChange);return We(()=>{l(u)},[l,u]),d.jsx(Te.span,{...a,ref:h,style:{pointerEvents:"none"},children:Jh(c.value)?d.jsx(d.Fragment,{children:i}):o})});Vh.displayName=jh;var Q2="SelectIcon",Ih=m.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return d.jsx(Te.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});Ih.displayName=Q2;var ew="SelectPortal",Dh=e=>d.jsx(vh,{asChild:!0,...e});Dh.displayName=ew;var un="SelectContent",Oh=m.forwardRef((e,t)=>{const n=Zt(un,e.__scopeSelect),[r,s]=m.useState();if(We(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?Rs.createPortal(d.jsx($h,{scope:e.__scopeSelect,children:d.jsx(_s.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),o):null}return d.jsx(Lh,{...e,ref:t})});Oh.displayName=un;var it=10,[$h,Kt]=Xn(un),tw="SelectContentImpl",nw=xr("SelectContent.RemoveScroll"),Lh=m.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:g,sticky:y,hideWhenDetached:f,avoidCollisions:v,...w}=e,b=Zt(un,n),[S,C]=m.useState(null),[E,T]=m.useState(null),k=Le(t,j=>C(j)),[P,$]=m.useState(null),[x,I]=m.useState(null),_=Fs(n),[K,Y]=m.useState(!1),X=m.useRef(!1);m.useEffect(()=>{if(S)return d2(S)},[S]),Ex();const G=m.useCallback(j=>{const[F,...W]=_().map(O=>O.ref.current),[L]=W.slice(-1),J=document.activeElement;for(const O of j)if(O===J||(O==null||O.scrollIntoView({block:"nearest"}),O===F&&E&&(E.scrollTop=0),O===L&&E&&(E.scrollTop=E.scrollHeight),O==null||O.focus(),document.activeElement!==J))return},[_,E]),U=m.useCallback(()=>G([P,S]),[G,P,S]);m.useEffect(()=>{K&&U()},[K,U]);const{onOpenChange:M,triggerPointerDownPosRef:q}=b;m.useEffect(()=>{if(S){let j={x:0,y:0};const F=L=>{var J,O;j={x:Math.abs(Math.round(L.pageX)-(((J=q.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(L.pageY)-(((O=q.current)==null?void 0:O.y)??0))}},W=L=>{j.x<=10&&j.y<=10?L.preventDefault():S.contains(L.target)||M(!1),document.removeEventListener("pointermove",F),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",F),document.addEventListener("pointerup",W,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",F),document.removeEventListener("pointerup",W,{capture:!0})}}},[S,M,q]),m.useEffect(()=>{const j=()=>M(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[M]);const[N,V]=Qh(j=>{const F=_().filter(J=>!J.disabled),W=F.find(J=>J.ref.current===document.activeElement),L=em(F,j,W);L&&setTimeout(()=>L.ref.current.focus())}),Z=m.useCallback((j,F,W)=>{const L=!X.current&&!W;(b.value!==void 0&&b.value===F||L)&&($(j),L&&(X.current=!0))},[b.value]),R=m.useCallback(()=>S==null?void 0:S.focus(),[S]),B=m.useCallback((j,F,W)=>{const L=!X.current&&!W;(b.value!==void 0&&b.value===F||L)&&I(j)},[b.value]),z=r==="popper"?Ti:_h,H=z===Ti?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:h,collisionBoundary:p,collisionPadding:g,sticky:y,hideWhenDetached:f,avoidCollisions:v}:{};return d.jsx($h,{scope:n,content:S,viewport:E,onViewportChange:T,itemRefCallback:Z,selectedItem:P,onItemLeave:R,itemTextRefCallback:B,focusSelectedItem:U,selectedItemText:x,position:r,isPositioned:K,searchRef:N,children:d.jsx(Ph,{as:nw,allowPinchZoom:!0,children:d.jsx(Yf,{asChild:!0,trapped:b.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:Pe(s,j=>{var F;(F=b.trigger)==null||F.focus({preventScroll:!0}),j.preventDefault()}),children:d.jsx(Zf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:d.jsx(z,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:j=>j.preventDefault(),...w,...H,onPlaced:()=>Y(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Pe(w.onKeyDown,j=>{const F=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!F&&j.key.length===1&&V(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let L=_().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(j.key)&&(L=L.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const J=j.target,O=L.indexOf(J);L=L.slice(O+1)}setTimeout(()=>G(L)),j.preventDefault()}})})})})})})});Lh.displayName=tw;var rw="SelectItemAlignedPosition",_h=m.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Zt(un,n),i=Kt(un,n),[a,c]=m.useState(null),[l,u]=m.useState(null),h=Le(t,k=>u(k)),p=Fs(n),g=m.useRef(!1),y=m.useRef(!0),{viewport:f,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=i,S=m.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&l&&f&&v&&w){const k=o.trigger.getBoundingClientRect(),P=l.getBoundingClientRect(),$=o.valueNode.getBoundingClientRect(),x=w.getBoundingClientRect();if(o.dir!=="rtl"){const J=x.left-P.left,O=$.left-J,se=k.left-O,le=k.width+se,De=Math.max(le,P.width),ut=window.innerWidth-it,Gt=bl(O,[it,Math.max(it,ut-De)]);a.style.minWidth=le+"px",a.style.left=Gt+"px"}else{const J=P.right-x.right,O=window.innerWidth-$.right-J,se=window.innerWidth-k.right-O,le=k.width+se,De=Math.max(le,P.width),ut=window.innerWidth-it,Gt=bl(O,[it,Math.max(it,ut-De)]);a.style.minWidth=le+"px",a.style.right=Gt+"px"}const I=p(),_=window.innerHeight-it*2,K=f.scrollHeight,Y=window.getComputedStyle(l),X=parseInt(Y.borderTopWidth,10),G=parseInt(Y.paddingTop,10),U=parseInt(Y.borderBottomWidth,10),M=parseInt(Y.paddingBottom,10),q=X+G+K+M+U,N=Math.min(v.offsetHeight*5,q),V=window.getComputedStyle(f),Z=parseInt(V.paddingTop,10),R=parseInt(V.paddingBottom,10),B=k.top+k.height/2-it,z=_-B,H=v.offsetHeight/2,j=v.offsetTop+H,F=X+G+j,W=q-F;if(F<=B){const J=I.length>0&&v===I[I.length-1].ref.current;a.style.bottom="0px";const O=l.clientHeight-f.offsetTop-f.offsetHeight,se=Math.max(z,H+(J?R:0)+O+U),le=F+se;a.style.height=le+"px"}else{const J=I.length>0&&v===I[0].ref.current;a.style.top="0px";const se=Math.max(B,X+f.offsetTop+(J?Z:0)+H)+W;a.style.height=se+"px",f.scrollTop=F-B+f.offsetTop}a.style.margin=`${it}px 0`,a.style.minHeight=N+"px",a.style.maxHeight=_+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[p,o.trigger,o.valueNode,a,l,f,v,w,o.dir,r]);We(()=>S(),[S]);const[C,E]=m.useState();We(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const T=m.useCallback(k=>{k&&y.current===!0&&(S(),b==null||b(),y.current=!1)},[S,b]);return d.jsx(ow,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:T,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:d.jsx(Te.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});_h.displayName=rw;var sw="SelectPopperPosition",Ti=m.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=it,...o}=e,i=Bs(n);return d.jsx(t2,{...i,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.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)"}})});Ti.displayName=sw;var[ow,Oa]=Xn(un,{}),Ai="SelectViewport",Fh=m.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=Kt(Ai,n),i=Oa(Ai,n),a=Le(t,o.onViewportChange),c=m.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("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}),d.jsx(_s.Slot,{scope:n,children:d.jsx(Te.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Pe(s.onScroll,l=>{const u=l.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&h){const g=Math.abs(c.current-u.scrollTop);if(g>0){const y=window.innerHeight-it*2,f=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),w=Math.max(f,v);if(w<y){const b=w+g,S=Math.min(y,b),C=b-S;h.style.height=S+"px",h.style.bottom==="0px"&&(u.scrollTop=C>0?C:0,h.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});Fh.displayName=Ai;var Bh="SelectGroup",[iw,aw]=Xn(Bh),cw=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Ta();return d.jsx(iw,{scope:n,id:s,children:d.jsx(Te.div,{role:"group","aria-labelledby":s,...r,ref:t})})});cw.displayName=Bh;var Hh="SelectLabel",lw=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=aw(Hh,n);return d.jsx(Te.div,{id:s.id,...r,ref:t})});lw.displayName=Hh;var Es="SelectItem",[dw,zh]=Xn(Es),Uh=m.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...i}=e,a=Zt(Es,n),c=Kt(Es,n),l=a.value===r,[u,h]=m.useState(o??""),[p,g]=m.useState(!1),y=Le(t,b=>{var S;return(S=c.itemRefCallback)==null?void 0:S.call(c,b,r,s)}),f=Ta(),v=m.useRef("touch"),w=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new 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 d.jsx(dw,{scope:n,value:r,disabled:s,textId:f,isSelected:l,onItemTextChange:m.useCallback(b=>{h(S=>S||((b==null?void 0:b.textContent)??"").trim())},[]),children:d.jsx(_s.ItemSlot,{scope:n,value:r,disabled:s,textValue:u,children:d.jsx(Te.div,{role:"option","aria-labelledby":f,"data-highlighted":p?"":void 0,"aria-selected":l&&p,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...i,ref:y,onFocus:Pe(i.onFocus,()=>g(!0)),onBlur:Pe(i.onBlur,()=>g(!1)),onClick:Pe(i.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:Pe(i.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:Pe(i.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:Pe(i.onPointerMove,b=>{var S;v.current=b.pointerType,s?(S=c.onItemLeave)==null||S.call(c):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Pe(i.onPointerLeave,b=>{var S;b.currentTarget===document.activeElement&&((S=c.onItemLeave)==null||S.call(c))}),onKeyDown:Pe(i.onKeyDown,b=>{var C;((C=c.searchRef)==null?void 0:C.current)!==""&&b.key===" "||(Y2.includes(b.key)&&w(),b.key===" "&&b.preventDefault())})})})})});Uh.displayName=Es;var or="SelectItemText",Wh=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,i=Zt(or,n),a=Kt(or,n),c=zh(or,n),l=J2(or,n),[u,h]=m.useState(null),p=Le(t,w=>h(w),c.onItemTextChange,w=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,w,c.value,c.disabled)}),g=u==null?void 0:u.textContent,y=m.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:f,onNativeOptionRemove:v}=l;return We(()=>(f(y),()=>v(y)),[f,v,y]),d.jsxs(d.Fragment,{children:[d.jsx(Te.span,{id:c.textId,...o,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Rs.createPortal(o.children,i.valueNode):null]})});Wh.displayName=or;var Zh="SelectItemIndicator",Kh=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return zh(Zh,n).isSelected?d.jsx(Te.span,{"aria-hidden":!0,...r,ref:t}):null});Kh.displayName=Zh;var Pi="SelectScrollUpButton",Yh=m.forwardRef((e,t)=>{const n=Kt(Pi,e.__scopeSelect),r=Oa(Pi,e.__scopeSelect),[s,o]=m.useState(!1),i=Le(t,r.onScrollButtonChange);return We(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;o(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?d.jsx(qh,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Yh.displayName=Pi;var Mi="SelectScrollDownButton",Gh=m.forwardRef((e,t)=>{const n=Kt(Mi,e.__scopeSelect),r=Oa(Mi,e.__scopeSelect),[s,o]=m.useState(!1),i=Le(t,r.onScrollButtonChange);return We(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;o(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?d.jsx(qh,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Gh.displayName=Mi;var qh=m.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=Kt("SelectScrollButton",n),i=m.useRef(null),a=Fs(n),c=m.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return m.useEffect(()=>()=>c(),[c]),We(()=>{var u;const l=a().find(h=>h.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),d.jsx(Te.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Pe(s.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Pe(s.onPointerMove,()=>{var l;(l=o.onItemLeave)==null||l.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Pe(s.onPointerLeave,()=>{c()})})}),uw="SelectSeparator",fw=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(Te.div,{"aria-hidden":!0,...r,ref:t})});fw.displayName=uw;var Ri="SelectArrow",hw=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Bs(n),o=Zt(Ri,n),i=Kt(Ri,n);return o.open&&i.position==="popper"?d.jsx(n2,{...s,...r,ref:t}):null});hw.displayName=Ri;var mw="SelectBubbleInput",Xh=m.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=m.useRef(null),o=Le(r,s),i=s2(t);return m.useEffect(()=>{const a=s.current;if(!a)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&u){const h=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(h)}},[i,t]),d.jsx(Te.select,{...n,style:{...xh,...n.style},ref:o,defaultValue:t})});Xh.displayName=mw;function Jh(e){return e===""||e===void 0}function Qh(e){const t=cn(e),n=m.useRef(""),r=m.useRef(0),s=m.useCallback(i=>{const a=n.current+i;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),o=m.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function em(e,t,n){const s=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=pw(e,Math.max(o,0));s.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function pw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gw=Mh,yw=Nh,vw=Vh,xw=Ih,bw=Dh,ww=Oh,Sw=Fh,Cw=Uh,Ew=Wh,kw=Kh,Tw=Yh,Aw=Gh;function zl({...e}){return d.jsx(gw,{"data-slot":"select",...e})}function Ul({...e}){return d.jsx(vw,{"data-slot":"select-value",...e})}function Wl({className:e,size:t="default",children:n,...r}){return d.jsxs(yw,{"data-slot":"select-trigger","data-size":t,className:ne(["flex w-fit cursor-pointer items-center justify-between gap-2","rounded-full px-3 py-2 text-sm whitespace-nowrap","bg-button transition-[color,border,background-color]","disabled:cursor-not-allowed disabled:opacity-50","hover:bg-muted hover:text-muted-foreground","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0","data-[placeholder]:text-muted-foreground","data-[size=default]:h-9 data-[size=sm]:h-8","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2","[&:not([class*='text-'])_svg:not([class*='text-'])]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...r,children:[n,d.jsx(xw,{asChild:!0,children:d.jsx(Sa,{weight:"bold",className:"size-4 transition-colors"})})]})}function Zl({className:e,children:t,position:n="popper",...r}){return d.jsx(bw,{children:d.jsxs(ww,{"data-slot":"select-content",className:ne(["bg-[#18182a]/90 backdrop-blur-md text-white border border-[#23233a] shadow-2xl","relative z-50 overflow-x-hidden overflow-y-auto rounded-xl","max-h-(--radix-select-content-available-height) min-w-[8rem]","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2","data-[side=right]:slide-in-from-left-2","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2"],n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[d.jsx(Pw,{}),d.jsx(Sw,{className:ne("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(Mw,{})]})})}function Kl({className:e,children:t,...n}){return d.jsxs(Cw,{"data-slot":"select-item",className:ne(["relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none","cursor-pointer disabled:cursor-not-allowed","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2","[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...n,children:[d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(kw,{children:d.jsx(Cf,{className:"size-4",weight:"bold"})})}),d.jsx(Ew,{children:t})]})}function Pw({className:e,...t}){return d.jsx(Tw,{"data-slot":"select-scroll-up-button",className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(wf,{className:"size-4",weight:"bold"})})}function Mw({className:e,...t}){return d.jsx(Aw,{"data-slot":"select-scroll-down-button",className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Sa,{className:"size-4",weight:"bold"})})}const Yl=Ms.cva(["w-full rounded-full px-3 py-2 text-sm cursor-pointer","disabled:not-allowed hover:bg-button-hover focus:bg-button-hover"],{variants:{size:{default:"w-[180px]",sm:"w-auto"}},defaultVariants:{size:"default"}});function Gl({kind:e,track:t,requestPermissions:n,onError:r,client:s,...o}){const i=o.size||"default";if(!s)return d.jsxs(zl,{disabled:!0,children:[d.jsx(Wl,{className:ne(Yl({size:i}),o.className),children:d.jsx(Ul,{placeholder:`Select a ${e}`})}),d.jsx(Zl,{children:d.jsx(Kl,{value:"none",children:"No devices available"})})]});const{devices:a,activeDeviceId:c,setActiveMediaDevice:l}=dx(s,e==="audioinput"?"audioinput":"videoinput");return d.jsxs(zl,{value:c,onValueChange:l,children:[d.jsx(Wl,{className:ne(Yl({size:i}),o.className,"hover:bg"),children:i!=="sm"&&d.jsx(Ul,{className:"font-mono text-sm",placeholder:`Select a ${e}`})}),d.jsx(Zl,{children:a.map(u=>d.jsx(Kl,{value:u.deviceId,className:"font-mono text-xs",children:u.label},u.deviceId))})]})}function Rw(e,t,n=!1){if(n)return Ca;switch(e){case te.Track.Source.Microphone:return t?Ef:kf;case te.Track.Source.Camera:return t?Af:Pf;case te.Track.Source.ScreenShare:return Tf;default:return m.Fragment}}function Do({source:e,pressed:t,pending:n,className:r,...s}){const o=Rw(e,t??!1,n),i=e===te.Track.Source.Microphone&&!(t??!1)&&!n,a=e===te.Track.Source.Camera&&!(t??!1)&&!n;return m.useEffect(()=>{console.log(`TrackToggle for ${e} changed: pressed=${t}, pending=${n}, actualState=${t?"enabled":"disabled"}`)},[e,t,n]),d.jsxs(Uf,{pressed:t,"aria-label":`Toggle ${e}`,className:ne(r),...s,children:[d.jsx(o,{weight:"bold",className:ne(n&&"animate-spin",i||a?"text-red-500":void 0)}),s.children]})}function Nw(e){return e?ax(e):{camera:!0,microphone:!0,screenShare:!0,data:!0}}function jw(e={}){const{controls:t,saveUserChoices:n=!0,client:r}=e,s={leave:!0,...t};if(!r)return{micTrackRef:{participant:void 0,source:te.Track.Source.Microphone,publication:void 0},visibleControls:s,microphoneToggle:{enabled:!1,pending:!1,toggle:async()=>{}},cameraToggle:{enabled:!1,pending:!1,toggle:async()=>{}},screenShareToggle:{enabled:!1,pending:!1,toggle:async()=>{}},handleDisconnect:()=>{},handleAudioDeviceChange:()=>{},handleVideoDeviceChange:()=>{}};const{microphoneTrack:o,localParticipant:i}=cx(r),a=Nw(r);lx(r);const c=ko(r,"microphone",{onDeviceError:T=>{var k;return(k=e.onDeviceError)==null?void 0:k.call(e,{source:te.Track.Source.Microphone,error:T})}}),l=ko(r,"camera",{onDeviceError:T=>{var k;return(k=e.onDeviceError)==null?void 0:k.call(e,{source:te.Track.Source.Camera,error:T})}}),u=ko(r,"screenShare",{onDeviceError:T=>{var k;return(k=e.onDeviceError)==null?void 0:k.call(e,{source:te.Track.Source.ScreenShare,error:T})}}),h=m.useMemo(()=>{let T;if(i){for(const[,k]of i.trackPublications)if(k.source===te.Track.Source.Microphone){T=k;break}}return console.log("🎤 Creating micTrackRef:",{hasParticipant:!!i,hasPublication:!!T,isTrackSubscribed:T==null?void 0:T.isSubscribed,isMuted:T==null?void 0:T.isMuted,trackSid:T==null?void 0:T.trackSid}),{participant:i??void 0,source:te.Track.Source.Microphone,publication:T}},[i,o]);s.microphone??(s.microphone=a.microphone),s.screenShare??(s.screenShare=a.screenShare),s.camera??(s.camera=a.camera),s.chat??(s.chat=a.data);const{saveAudioInputEnabled:p,saveAudioInputDeviceId:g,saveVideoInputEnabled:y,saveVideoInputDeviceId:f}=ux({preventSave:!n}),v=m.useCallback(()=>{r&&r.disconnect()},[r]),w=m.useCallback(T=>{g(T??"default"),r&&r.setAudioInputDevice(T)},[g,r]),b=m.useCallback(T=>{f(T??"default"),r&&r.setVideoInputDevice(T)},[f,r]),S=m.useCallback(async T=>{u.enabled&&await u.toggle(!1),await l.toggle(T),y(!l.enabled)},[l,y,u]),C=m.useCallback(async T=>{await c.toggle(T),p(!c.enabled)},[c,p]),E=m.useCallback(async T=>{l.enabled&&await l.toggle(!1),await u.toggle(T)},[l,u]);return{micTrackRef:h,visibleControls:s,cameraToggle:{...l,toggle:S},microphoneToggle:{...c,toggle:C},screenShareToggle:{...u,toggle:E},handleDisconnect:v,handleAudioDeviceChange:w,handleVideoDeviceChange:b}}const Vw={card:" bg-gradient-to-br from-black to-gray-900 border border-gray-900 w-full h-full flex flex-col justify-between overflow-hidden mx-auto my-auto rounded-2xl shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-black/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-gray-800/20 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-gray-600/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-gray-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-gray-400 to-gray-500 rounded-full blur-sm opacity-20 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-gray-500 to-gray-600 rounded-full blur-sm opacity-15 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-black to-gray-900 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-white via-gray-200 to-gray-300"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900",promptSlider:"absolute w-full py-3 px-2 bg-gray-900 rounded-xl text-center text-white text-sm transition-opacity duration-700 ease-in-out border border-gray-600",statusIndicator:"w-2 h-2 bg-gray-400 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-gray-600/30 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-gray-500/20 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-gray-400/15 pulse-ring"},controlBar:"border border-gray-600 rounded-3xl py-4 flex flex-col justify-end h-full bg-gray-900/50 backdrop-blur-sm",chatInput:{container:"bg-gray-900 w-full border-gray-600",textarea:"bg-gray-800 border-none text-white placeholder-gray-400",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-gray-600 text-white",other:"bg-gray-700 text-white"},chatHeader:{container:"bg-gray-900 border-gray-600",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-gray-400 mb-2",suggestedResponse:{container:"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white"},video:{container:"bg-gradient-to-br from-black to-gray-900 text-white",header:"border-gray-700 bg-gray-900/50",headerButton:"bg-gray-800 hover:bg-gray-700 text-gray-300",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-gray-900/80 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-gray-800 border border-gray-700 shadow-lg",placeholder:"bg-gray-800 text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Iw={card:" bg-gradient-to-br from-white to-gray-50 border border-gray-200 w-full h-full flex flex-col justify-between overflow-hidden mx-auto my-auto shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-white/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-blue-500/5 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-purple-500/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-pink-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full blur-sm opacity-30 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-pink-500 to-purple-500 rounded-full blur-sm opacity-20 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-white to-gray-50 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-gray-900",secondary:"text-gray-700",muted:"text-gray-500",accent:"bg-clip-text text-transparent bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600"},micButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-white",promptSlider:"absolute w-full py-3 px-2 bg-gray-100 rounded-xl text-center text-gray-700 text-sm transition-opacity duration-700 ease-in-out border border-gray-200",statusIndicator:"w-2 h-2 bg-green-500 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-blue-500/20 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-purple-500/15 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-pink-500/10 pulse-ring"},controlBar:"border border-gray-200 rounded-3xl py-4 flex flex-col justify-end h-full bg-white/80 backdrop-blur-sm",chatInput:{container:"bg-white/90 border-gray-200 shadow-sm",textarea:"bg-white border-none text-gray-900 placeholder-gray-500 ",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 disabled:opacity-50 text-white",attachButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100 bg-blue-50",endButton:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200"},chatMessage:{own:"bg-blue-50 text-gray-900 border border-blue-100",other:"bg-gray-50 text-gray-900 border border-gray-200"},chatHeader:{container:"bg-white border-gray-200",backButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100"},spinner:"w-10 h-10 animate-spin text-blue-500 mb-2",suggestedResponse:{container:"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900"},video:{container:"bg-gradient-to-br from-white to-gray-50 text-gray-900",header:"border-gray-200 bg-white/80",headerButton:"bg-gray-100 hover:bg-gray-200 text-gray-600",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-white/90 backdrop-blur-sm border-t border-gray-200",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-200 hover:bg-gray-300 text-gray-600",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-white border border-gray-200 shadow-sm",placeholder:"bg-gray-50 text-gray-600",avatar:"bg-gray-200 text-gray-600",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Dw={card:" text-white bg-gradient-to-br from-[#171727] to-[#12121F] border border-gray-800 w-full h-full flex flex-col justify-between overflow-hidden mx-auto my-auto",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-[#171727]/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-[#3B82F6]/15 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-[#8B5CF6]/25 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-[#EC4899]/20 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full blur-sm opacity-50 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-[#EC4899] to-[#8B5CF6] rounded-full blur-sm opacity-40 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-[#171727] to-[#12121F] rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-[#3B82F6] via-[#8B5CF6] to-[#EC4899]"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900 shadow-xl",promptSlider:"absolute w-full py-3 px-2 bg-[#1E1E2E] rounded-xl text-center text-gray-200 text-sm transition-opacity duration-700 ease-in-out border border-gray-700",statusIndicator:"w-2 h-2 bg-[#10B981] rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-[#3B82F6]/40 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-[#8B5CF6]/30 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-[#EC4899]/20 pulse-ring"},controlBar:"border border-border rounded-3xl py-4 flex flex-col justify-end h-full",chatInput:{container:"bg-[#1E1E2E] border-gray-700",textarea:"bg-[#1E1E2E] border-none text-white placeholder-gray-400",sendButton:"bg-[#3B82F6] hover:bg-[#2563EB] disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-[#1E1E2E]/80 text-white",other:"bg-[#1E1E2E] text-white border border-gray-700"},chatHeader:{container:"bg-[#1E1E2E] border-gray-700",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-blue-400 mb-2",suggestedResponse:{container:"bg-[#221f3f] text-white border-none"},video:{container:"bg-gradient-to-br from-[#171727] to-[#12121F] text-white",header:"border-gray-700 bg-[#1E1E2E]/80",headerButton:"bg-[#1E1E2E] hover:bg-gray-700 text-gray-300",statusDot:"bg-[#10B981] animate-pulse",controlsBackground:"bg-[#1E1E2E]/90 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-[#3B82F6] hover:bg-[#2563EB] text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-[#1E1E2E] border border-gray-700 shadow-xl",placeholder:"bg-[#1E1E2E] text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},ql={dark:Vw,light:Iw,vox:Dw};function _e(e){return ql[e]||ql.vox}function Ow({controls:e,saveUserChoices:t=!0,capabilities:n,className:r,onSendMessage:s,onChatOpenChange:o,onDisconnect:i,onDeviceError:a,theme:c="vox",client:l,...u}){const[h,p]=m.useState(!1),[g,y]=m.useState(!1),f=_e(c),{micTrackRef:v,visibleControls:w,cameraToggle:b,microphoneToggle:S,screenShareToggle:C,handleAudioDeviceChange:E,handleVideoDeviceChange:T,handleDisconnect:k}=jw({controls:e,saveUserChoices:t,client:l}),P=async $=>{y(!0);try{await(s==null?void 0:s($))}finally{y(!1)}};return m.useEffect(()=>{o==null||o(h)},[h,o]),m.useEffect(()=>{var $,x,I,_;console.log("🎤 AgentControlBar: micTrackRef changed:",{hasParticipant:!!v.participant,hasPublication:!!v.publication,source:v.source,isSubscribed:($=v.publication)==null?void 0:$.isSubscribed,isMuted:(x=v.publication)==null?void 0:x.isMuted,trackSid:(I=v.publication)==null?void 0:I.trackSid,hasTrack:!!((_=v.publication)!=null&&_.track)})},[v]),d.jsxs("div",{"aria-label":"Voice assistant controls",className:ne(f.controlBar,r),...u,children:[n.suportsChatInput&&d.jsxs("div",{inert:!h,className:ne("overflow-hidden transition-[height] relative duration-300 ease-in-out",h?"h-[64px] mb-3":"h-0"),children:[d.jsx("div",{className:"flex h-9 px-4 w-full",children:d.jsx(Qv,{onSend:P,disabled:g,className:ne("w-full",f.chatInput)})}),d.jsx("hr",{className:"border-border my-2 mx-5"})]}),d.jsxs("div",{className:ne("flex flex-row items-center gap-2 rounded-2xl mx-auto border-none backdrop-blur-lg px-2 py-2",c==="light"?"bg-white/80":"bg-[#18182a]/80"),children:[d.jsxs("div",{className:"flex gap-y-2 justify-start",children:[w.microphone&&d.jsxs("div",{className:"flex gap-y-2 items-center rounded-full overflow-hidden border-none ",children:[d.jsx(Do,{variant:"primary",source:te.Track.Source.Microphone,pressed:S.enabled,disabled:S.pending,onPressedChange:S.toggle,className:"w-auto py-2 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),d.jsx(Me.BarVisualizer,{barCount:3,trackRef:v,options:{minHeight:5},className:"flex h-full w-auto items-center justify-center gap-x-0.5",children:d.jsx("span",{className:ne(["h-full w-0.5 origin-center rounded-2xl","bg-white","group-data-[state=on]/track:bg-white group-data-[state=off]/track:bg-white","data-lk-muted:bg-muted"])})}),d.jsx(Gl,{size:"sm",kind:"audioinput",client:l,onError:a?$=>$ instanceof Error?a({source:te.Track.Source.Microphone,error:$}):void 0:void 0,onActiveDeviceChange:E,className:ne(["h-full py-2 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/30 transition-colors","min-w-[2.5rem]"])})]}),n.suportsVideoInput&&w.camera&&d.jsxs("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:[d.jsx(Do,{variant:"primary",source:te.Track.Source.Camera,pressed:b.enabled,pending:b.pending,disabled:b.pending,onPressedChange:b.toggle,className:"w-auto py-2 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),d.jsx(Gl,{size:"sm",kind:"videoinput",client:l,onError:a?$=>$ instanceof Error?a({source:te.Track.Source.Camera,error:$}):void 0:void 0,onActiveDeviceChange:T,className:ne(["h-full py-2 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors","min-w-[2.5rem]"])})]}),n.suportsScreenShare&&w.screenShare&&d.jsx("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:d.jsx(Do,{variant:"secondary",source:te.Track.Source.ScreenShare,pressed:C.enabled,disabled:C.pending,onPressedChange:C.toggle,className:"w-auto py-2 disabled:opacity-70 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"})})]}),w.chat&&d.jsx("div",{className:"flex items-center rounded-full overflow-hidden bg-secondary text-secondary-foreground border-none ",children:d.jsx(Uf,{variant:"secondary","aria-label":"Toggle chat",pressed:h,onPressedChange:$=>{p($)},className:"aspect-square h-full py-3 rounded-none border-none bg-transparent text-inherit focus:bg-secondary/80 hover:bg-secondary/80 transition-colors flex items-center",children:d.jsx(Sf,{weight:"bold",className:"h-5 w-5"})})})]})]})}const $w=(e,t)=>{var a,c;const n=m.useMemo(()=>t?t(e.message):e.message,[e.message,t]),r=!!e.editTimestamp,s=new Date(e.timestamp),o=typeof navigator<"u"?navigator.language:"en-US",i=(a=e.from)!=null&&a.name&&e.from.name!==""?e.from.name:(c=e.from)==null?void 0:c.identity;return{message:n,hasBeenEdited:r,time:s,locale:o,name:i}},Lw=({entry:e,messageFormatter:t,className:n,participantName:r,...s})=>{var u,h;const{message:o,time:i,locale:a}=$w(e,t),c=((u=e.from)==null?void 0:u.isLocal)??!1;ne("w-full px-3 py-2 rounded-2xl text-xs break-words whitespace-pre-line",c?" text-end border border-[#5078F2]/30":"bg-muted text-foreground border border-[#813aa7]/30","text-left");const l=ne("inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-bold flex-shrink-0",c?"bg-[#5078F2] text-white":"bg-[#813aa7] ml-1 text-white");return d.jsx("li",{title:i.toLocaleTimeString(a,{timeStyle:"full"}),className:ne("group flex mb-2",c?"justify-end":"justify-start",n),...s,children:d.jsxs("div",{className:ne("flex w-fit max-w-full rounded-2xl border",c?"flex-row-reverse items-center border-[#5078F2]/30":"flex-row items-center border-[#813aa7]/30 bg-muted text-foreground"),children:[d.jsx("span",{className:l,children:c?((h=r==null?void 0:r[0])==null?void 0:h.toUpperCase())||"U":"A"}),d.jsx("span",{className:ne("flex items-center text-xs break-words whitespace-pre-line",c?"ml-auto justify-end text-right":"justify-start text-left","px-3 py-2"),children:o})]})})};function _w(e){A.useEffect(()=>{function t(){const n=e.current;n&&(n.scrollTop=n.scrollHeight)}if(e.current){const n=new ResizeObserver(t);return n.observe(e.current),t(),()=>n.disconnect()}},[e])}const Fw=({className:e,children:t,...n})=>{const r=A.useRef(null);return _w(r),d.jsx("div",{ref:r,className:ne("flex flex-col justify-end",e),...n,children:t})},Bw=({state:e,audioTrack:t,className:n,ref:r})=>d.jsx("div",{ref:r,className:ne("",n),children:d.jsx(Me.BarVisualizer,{barCount:5,state:e,options:{minHeight:5},trackRef:t,className:ne("flex aspect-video w-40 items-center justify-center gap-1"),children:d.jsx("span",{className:ne(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear","data-[lk-highlighted=true]:bg-[#5c64f6]","data-[lk-muted=true]:bg-[#222222]"])})})}),Hw=({videoTrack:e,className:t,ref:n})=>{var r,s;return d.jsx("div",{ref:n,className:ne(t),children:d.jsx(Me.VideoTrack,{trackRef:e,width:((r=e==null?void 0:e.publication.dimensions)==null?void 0:r.width)??0,height:((s=e==null?void 0:e.publication.dimensions)==null?void 0:s.height)??0,className:"rounded-md"})})},zw=ae.create(Me.VideoTrack),Uw=({trackRef:e,className:t,ref:n})=>{var r,s;return d.jsx("div",{className:ne("bg-muted overflow-hidden rounded-md",t),children:d.jsx(zw,{ref:n,trackRef:e,width:((r=e==null?void 0:e.publication.dimensions)==null?void 0:r.width)??0,height:((s=e==null?void 0:e.publication.dimensions)==null?void 0:s.height)??0,className:ne("h-full w-auto")})})},Xl=ae.create(Uw),Ww=ae.create(Bw),Zw=ae.create(Hw),Tt={initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:675,damping:75,mass:1}},vn={grid:["h-full w-full","grid gap-x-2 place-content-center","grid-cols-[1fr_1fr] grid-rows-[90px_1fr_90px]"],agentChatOpenWithSecondTile:["col-start-1 row-start-1","self-center justify-self-end"],agentChatOpenWithoutSecondTile:["col-start-1 row-start-1","col-span-2","place-content-center"],agentChatClosed:["col-start-1 row-start-1","col-span-2 row-span-3","place-content-center"],secondTileChatOpen:["col-start-2 row-start-1","self-center justify-self-start"],secondTileChatClosed:["col-start-2 row-start-3","place-content-end"]};function Kw(e){const{localParticipant:t}=Me.useLocalParticipant(),n=t.getTrackPublication(e);return A.useMemo(()=>n?{source:e,participant:t,publication:n}:void 0,[e,n,t])}function Yw({chatOpen:e}){const{state:t,audioTrack:n,videoTrack:r,agent:{isActive:s=!1}={}}=Me.useVoiceAssistant(),[o]=Me.useTracks([te.Track.Source.ScreenShare]),i=Kw(te.Track.Source.Camera),a=i&&!i.publication.isMuted,c=o&&!o.publication.isMuted,l=a||c,u={...Tt.transition,delay:e?0:.15},h={...Tt.animate,scale:e?1:3,transition:u},p={...Tt.animate,transition:u},g=u,y=u,f=r!==void 0;return d.jsx("div",{className:"relative w-full h-full z-10 flex items-center justify-center",children:d.jsx("div",{className:"relative w-full h-full max-w-2xl px-4 md:px-0",children:d.jsxs("div",{className:ne(vn.grid),children:[s&&d.jsx("div",{className:ne(["grid",!e&&vn.agentChatClosed,e&&l&&vn.agentChatOpenWithSecondTile,e&&!l&&vn.agentChatOpenWithoutSecondTile]),children:d.jsxs("div",{className:"h-full flex items-center justify-center",children:[!f&&d.jsx(Ww,{layoutId:"agent",...Tt,animate:h,transition:g,state:t,audioTrack:n,className:ne(e?"h-[90px]":"h-auto w-full")},"agent"),f&&d.jsx(Zw,{layoutId:"avatar",...Tt,animate:p,transition:y,videoTrack:r,className:ne(e?"h-[90px] [&>video]:h-[90px] [&>video]:w-auto":"h-auto w-full")},"avatar")]})}),d.jsx("div",{className:ne(["grid",e&&vn.secondTileChatOpen,!e&&vn.secondTileChatClosed]),children:d.jsxs("div",{className:"w-full px-10 flex items-center shadow-2xl justify-between",children:[i&&a&&d.jsx(Xl,{layout:"position",layoutId:"camera",...Tt,trackRef:i,transition:{...Tt.transition,delay:e?0:.15},className:"h-[60px] order-1"},"camera"),c&&d.jsx(Xl,{layout:"position",layoutId:"screen",...Tt,trackRef:o,transition:{...Tt.transition,delay:e?0:.15},className:"h-[70px] order-2"},"screen")]})})]})})})}/**
50
50
  * @license lucide-react v0.522.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
- */const Kw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yw=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Jl=e=>{const t=Yw(e);return t.charAt(0).toUpperCase()+t.slice(1)},tm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Gw=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
54
+ */const Gw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),qw=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Jl=e=>{const t=qw(e);return t.charAt(0).toUpperCase()+t.slice(1)},tm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Xw=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
55
55
  * @license lucide-react v0.522.0 - ISC
56
56
  *
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
- */var qw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
59
+ */var Jw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
60
60
  * @license lucide-react v0.522.0 - ISC
61
61
  *
62
62
  * This source code is licensed under the ISC license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
- */const Xw=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},c)=>A.createElement("svg",{ref:c,...qw,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:tm("lucide",s),...!o&&!Gw(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,u])=>A.createElement(l,u)),...Array.isArray(o)?o:[o]]));/**
64
+ */const Qw=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},c)=>A.createElement("svg",{ref:c,...Jw,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:tm("lucide",s),...!o&&!Xw(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,u])=>A.createElement(l,u)),...Array.isArray(o)?o:[o]]));/**
65
65
  * @license lucide-react v0.522.0 - ISC
66
66
  *
67
67
  * This source code is licensed under the ISC license.
68
68
  * See the LICENSE file in the root directory of this source tree.
69
- */const Fe=(e,t)=>{const n=A.forwardRef(({className:r,...s},o)=>A.createElement(Xw,{ref:o,iconNode:t,className:tm(`lucide-${Kw(Jl(e))}`,`lucide-${e}`,r),...s}));return n.displayName=Jl(e),n};/**
69
+ */const Fe=(e,t)=>{const n=A.forwardRef(({className:r,...s},o)=>A.createElement(Qw,{ref:o,iconNode:t,className:tm(`lucide-${Gw(Jl(e))}`,`lucide-${e}`,r),...s}));return n.displayName=Jl(e),n};/**
70
70
  * @license lucide-react v0.522.0 - ISC
71
71
  *
72
72
  * This source code is licensed under the ISC license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
- */const Jw=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Qw=Fe("archive",Jw);/**
74
+ */const eS=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],tS=Fe("archive",eS);/**
75
75
  * @license lucide-react v0.522.0 - ISC
76
76
  *
77
77
  * This source code is licensed under the ISC license.
78
78
  * See the LICENSE file in the root directory of this source tree.
79
- */const eS=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16",key:"qmtpty"}],["path",{d:"M9.5 4h5L17 7h3a2 2 0 0 1 2 2v7.5",key:"1ufyfc"}],["path",{d:"M14.121 15.121A3 3 0 1 1 9.88 10.88",key:"11zox6"}]],nm=Fe("camera-off",eS);/**
79
+ */const nS=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16",key:"qmtpty"}],["path",{d:"M9.5 4h5L17 7h3a2 2 0 0 1 2 2v7.5",key:"1ufyfc"}],["path",{d:"M14.121 15.121A3 3 0 1 1 9.88 10.88",key:"11zox6"}]],nm=Fe("camera-off",nS);/**
80
80
  * @license lucide-react v0.522.0 - ISC
81
81
  *
82
82
  * This source code is licensed under the ISC license.
83
83
  * See the LICENSE file in the root directory of this source tree.
84
- */const tS=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],rm=Fe("camera",tS);/**
84
+ */const rS=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],rm=Fe("camera",rS);/**
85
85
  * @license lucide-react v0.522.0 - ISC
86
86
  *
87
87
  * This source code is licensed under the ISC license.
88
88
  * See the LICENSE file in the root directory of this source tree.
89
- */const nS=[["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"}]],rS=Fe("download",nS);/**
89
+ */const sS=[["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"}]],oS=Fe("download",sS);/**
90
90
  * @license lucide-react v0.522.0 - ISC
91
91
  *
92
92
  * This source code is licensed under the ISC license.
93
93
  * See the LICENSE file in the root directory of this source tree.
94
- */const sS=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],oS=Fe("file-text",sS);/**
94
+ */const iS=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],aS=Fe("file-text",iS);/**
95
95
  * @license lucide-react v0.522.0 - ISC
96
96
  *
97
97
  * This source code is licensed under the ISC license.
98
98
  * See the LICENSE file in the root directory of this source tree.
99
- */const iS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],aS=Fe("image",iS);/**
99
+ */const cS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],lS=Fe("image",cS);/**
100
100
  * @license lucide-react v0.522.0 - ISC
101
101
  *
102
102
  * This source code is licensed under the ISC license.
103
103
  * See the LICENSE file in the root directory of this source tree.
104
- */const cS=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],lS=Fe("layout-grid",cS);/**
104
+ */const dS=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],uS=Fe("layout-grid",dS);/**
105
105
  * @license lucide-react v0.522.0 - ISC
106
106
  *
107
107
  * This source code is licensed under the ISC license.
108
108
  * See the LICENSE file in the root directory of this source tree.
109
- */const dS=[["path",{d:"M17 17H4a2 2 0 0 1-2-2V5c0-1.5 1-2 1-2",key:"k0q8oc"}],["path",{d:"M22 15V5a2 2 0 0 0-2-2H9",key:"cp1ac0"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],uS=Fe("monitor-off",dS);/**
109
+ */const fS=[["path",{d:"M17 17H4a2 2 0 0 1-2-2V5c0-1.5 1-2 1-2",key:"k0q8oc"}],["path",{d:"M22 15V5a2 2 0 0 0-2-2H9",key:"cp1ac0"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],hS=Fe("monitor-off",fS);/**
110
110
  * @license lucide-react v0.522.0 - ISC
111
111
  *
112
112
  * This source code is licensed under the ISC license.
113
113
  * See the LICENSE file in the root directory of this source tree.
114
- */const fS=[["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"}]],hS=Fe("monitor",fS);/**
114
+ */const mS=[["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"}]],pS=Fe("monitor",mS);/**
115
115
  * @license lucide-react v0.522.0 - ISC
116
116
  *
117
117
  * This source code is licensed under the ISC license.
118
118
  * See the LICENSE file in the root directory of this source tree.
119
- */const mS=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],pS=Fe("music",mS);/**
119
+ */const gS=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],yS=Fe("music",gS);/**
120
120
  * @license lucide-react v0.522.0 - ISC
121
121
  *
122
122
  * This source code is licensed under the ISC license.
123
123
  * See the LICENSE file in the root directory of this source tree.
124
- */const gS=[["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=Fe("paperclip",gS);/**
124
+ */const vS=[["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"}]],xS=Fe("paperclip",vS);/**
125
125
  * @license lucide-react v0.522.0 - ISC
126
126
  *
127
127
  * This source code is licensed under the ISC license.
128
128
  * See the LICENSE file in the root directory of this source tree.
129
- */const vS=[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 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 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 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 .244.473",key:"10hv5p"}]],sm=Fe("phone-off",vS);/**
129
+ */const bS=[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 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 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 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 .244.473",key:"10hv5p"}]],sm=Fe("phone-off",bS);/**
130
130
  * @license lucide-react v0.522.0 - ISC
131
131
  *
132
132
  * This source code is licensed under the ISC license.
133
133
  * See the LICENSE file in the root directory of this source tree.
134
- */const xS=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],bS=Fe("send-horizontal",xS);/**
134
+ */const wS=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],SS=Fe("send-horizontal",wS);/**
135
135
  * @license lucide-react v0.522.0 - ISC
136
136
  *
137
137
  * This source code is licensed under the ISC license.
138
138
  * See the LICENSE file in the root directory of this source tree.
139
- */const wS=[["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"}]],SS=Fe("user",wS);/**
139
+ */const CS=[["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"}]],ES=Fe("user",CS);/**
140
140
  * @license lucide-react v0.522.0 - ISC
141
141
  *
142
142
  * This source code is licensed under the ISC license.
143
143
  * See the LICENSE file in the root directory of this source tree.
144
- */const CS=[["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"}]],ES=Fe("users",CS);/**
144
+ */const kS=[["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"}]],TS=Fe("users",kS);/**
145
145
  * @license lucide-react v0.522.0 - ISC
146
146
  *
147
147
  * This source code is licensed under the ISC license.
148
148
  * See the LICENSE file in the root directory of this source tree.
149
- */const kS=[["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"}]],TS=Fe("video",kS);/**
149
+ */const AS=[["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"}]],PS=Fe("video",AS);/**
150
150
  * @license lucide-react v0.522.0 - ISC
151
151
  *
152
152
  * This source code is licensed under the ISC license.
153
153
  * See the LICENSE file in the root directory of this source tree.
154
- */const AS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],PS=Fe("x",AS);function Ql({timeout:e}){const[t,n]=A.useState(100),r=A.useRef(null),s=A.useRef(null);return A.useEffect(()=>{if(!e||e<=0)return;n(100),s.current=Date.now();const o=()=>{if(!e||s.current===null)return;const i=Date.now()-s.current,a=Math.max(0,100-i/e*100);n(a),a>0&&(r.current=requestAnimationFrame(o))};return r.current=requestAnimationFrame(o),()=>{r.current&&cancelAnimationFrame(r.current)}},[e]),!e||e<=0?null:d.jsx("div",{className:"w-full h-1 relative top-1 rounded-t-4xl bg-gray-700 overflow-hidden",children:d.jsx(ae.div,{className:"h-1 rounded-t-4xl dark:bg-white bg-blue-200 ",initial:{width:"100%"},animate:{width:`${Math.max(t,2)}%`},transition:{duration:.1,ease:"linear"},style:{minWidth:"2%"}})})}function Fn({interaction:e,theme:t,onDismiss:n,client:r,addLocalMessage:s}){var a;if(!e||!e.isVisible||!e.component)return null;const[o]=m.useState(()=>Date.now()),i=()=>e.component?m.createElement(e.component,{handler:e.handler||void 0,timeout:e.timeout,loadData:async l=>{console.log("InteractiveComponent: Loading data:",l)},presentationMode:e.presentationMode,data:e.data,client:r,addLocalMessage:s}):d.jsx("div",{className:"p-4 text-red-500",children:"Component not found"});switch(e.presentationMode){case"fullscreen":return d.jsx(jn,{children:d.jsxs(ae.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[9999] bg-black",children:[d.jsxs("div",{className:"flex flex-col",children:[d.jsx(Ql,{timeout:e.timeout}),d.jsxs("div",{className:"flex items-center justify-between p-4 bg-black/80 text-white border-b border-gray-700",children:[d.jsx("h3",{className:"text-lg font-semibold",children:e.methodName.replace(/_/g," ").replace(/\b\w/g,c=>c.toUpperCase())}),d.jsx("button",{onClick:n||((a=e.handler)==null?void 0:a.dismissView),className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors",children:d.jsx(PS,{className:"w-5 h-5"})})]})]}),d.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:i()})]})});case"embedded":default:return d.jsx(jn,{children:d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"w-fit rounded-lg ",children:d.jsxs("div",{children:[d.jsx(Ql,{timeout:e.timeout}),i()]})})})}}function MS(){const e=Me.useTranscriptions(),t=Me.useChat(),n=Me.useRoomContext();return{messages:A.useMemo(()=>[...e.map(o=>$v(o,n)),...t.chatMessages].sort((o,i)=>o.timestamp-i.timestamp),[e,t.chatMessages,n]),send:t.send}}const NS=({logLevel:e}={})=>{const t=Me.useRoomContext();m.useEffect(()=>(te.setLogLevel(e??"debug"),window.__lk_room=t,()=>{window.__lk_room=void 0}),[t,e])},ed=e=>e,jS=()=>{let e=ed;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ed}}},RS=jS();function zt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function fn(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":zt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function VS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gr={exports:{}},qr={exports:{}},fe={};/** @license React v16.13.1
154
+ */const MS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],RS=Fe("x",MS);function Ql({timeout:e}){const[t,n]=A.useState(100),r=A.useRef(null),s=A.useRef(null);return A.useEffect(()=>{if(!e||e<=0)return;n(100),s.current=Date.now();const o=()=>{if(!e||s.current===null)return;const i=Date.now()-s.current,a=Math.max(0,100-i/e*100);n(a),a>0&&(r.current=requestAnimationFrame(o))};return r.current=requestAnimationFrame(o),()=>{r.current&&cancelAnimationFrame(r.current)}},[e]),!e||e<=0?null:d.jsx("div",{className:"w-full h-1 relative top-1 rounded-t-4xl bg-gray-700 overflow-hidden",children:d.jsx(ae.div,{className:"h-1 rounded-t-4xl dark:bg-white bg-blue-200 ",initial:{width:"100%"},animate:{width:`${Math.max(t,2)}%`},transition:{duration:.1,ease:"linear"},style:{minWidth:"2%"}})})}function Fn({interaction:e,theme:t,onDismiss:n,client:r,addLocalMessage:s}){var a;if(!e||!e.isVisible||!e.component)return null;const[o]=m.useState(()=>Date.now()),i=()=>e.component?m.createElement(e.component,{handler:e.handler||void 0,timeout:e.timeout,loadData:async l=>{console.log("InteractiveComponent: Loading data:",l)},presentationMode:e.presentationMode,data:e.data,client:r,addLocalMessage:s}):d.jsx("div",{className:"p-4 text-red-500",children:"Component not found"});switch(e.presentationMode){case"fullscreen":return d.jsx(Nn,{children:d.jsxs(ae.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[9999] bg-black",children:[d.jsxs("div",{className:"flex flex-col",children:[d.jsx(Ql,{timeout:e.timeout}),d.jsxs("div",{className:"flex items-center justify-between p-4 bg-black/80 text-white border-b border-gray-700",children:[d.jsx("h3",{className:"text-lg font-semibold",children:e.methodName.replace(/_/g," ").replace(/\b\w/g,c=>c.toUpperCase())}),d.jsx("button",{onClick:n||((a=e.handler)==null?void 0:a.dismissView),className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors",children:d.jsx(RS,{className:"w-5 h-5"})})]})]}),d.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:i()})]})});case"embedded":default:return d.jsx(Nn,{children:d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"w-fit rounded-lg ",children:d.jsxs("div",{children:[d.jsx(Ql,{timeout:e.timeout}),i()]})})})}}function NS(){const e=Me.useTranscriptions(),t=Me.useChat(),n=Me.useRoomContext();return{messages:A.useMemo(()=>[...e.map(o=>_v(o,n)),...t.chatMessages].sort((o,i)=>o.timestamp-i.timestamp),[e,t.chatMessages,n]),send:t.send}}const jS=({logLevel:e}={})=>{const t=Me.useRoomContext();m.useEffect(()=>(te.setLogLevel(e??"debug"),window.__lk_room=t,()=>{window.__lk_room=void 0}),[t,e])},ed=e=>e,VS=()=>{let e=ed;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ed}}},IS=VS();function zt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function fn(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":zt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function DS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gr={exports:{}},qr={exports:{}},fe={};/** @license React v16.13.1
155
155
  * react-is.production.min.js
156
156
  *
157
157
  * Copyright (c) Facebook, Inc. and its affiliates.
158
158
  *
159
159
  * This source code is licensed under the MIT license found in the
160
160
  * LICENSE file in the root directory of this source tree.
161
- */var td;function IS(){if(td)return fe;td=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(E){if(typeof E=="object"&&E!==null){var T=E.$$typeof;switch(T){case t:switch(E=E.type,E){case c:case l:case r:case o:case s:case h:return E;default:switch(E=E&&E.$$typeof,E){case a:case u:case y:case g:case i:return E;default:return T}}case n:return T}}}function C(E){return S(E)===l}return fe.AsyncMode=c,fe.ConcurrentMode=l,fe.ContextConsumer=a,fe.ContextProvider=i,fe.Element=t,fe.ForwardRef=u,fe.Fragment=r,fe.Lazy=y,fe.Memo=g,fe.Portal=n,fe.Profiler=o,fe.StrictMode=s,fe.Suspense=h,fe.isAsyncMode=function(E){return C(E)||S(E)===c},fe.isConcurrentMode=C,fe.isContextConsumer=function(E){return S(E)===a},fe.isContextProvider=function(E){return S(E)===i},fe.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},fe.isForwardRef=function(E){return S(E)===u},fe.isFragment=function(E){return S(E)===r},fe.isLazy=function(E){return S(E)===y},fe.isMemo=function(E){return S(E)===g},fe.isPortal=function(E){return S(E)===n},fe.isProfiler=function(E){return S(E)===o},fe.isStrictMode=function(E){return S(E)===s},fe.isSuspense=function(E){return S(E)===h},fe.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===o||E===s||E===h||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===y||E.$$typeof===g||E.$$typeof===i||E.$$typeof===a||E.$$typeof===u||E.$$typeof===v||E.$$typeof===w||E.$$typeof===b||E.$$typeof===f)},fe.typeOf=S,fe}var he={};/** @license React v16.13.1
161
+ */var td;function OS(){if(td)return fe;td=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(E){if(typeof E=="object"&&E!==null){var T=E.$$typeof;switch(T){case t:switch(E=E.type,E){case c:case l:case r:case o:case s:case h:return E;default:switch(E=E&&E.$$typeof,E){case a:case u:case y:case g:case i:return E;default:return T}}case n:return T}}}function C(E){return S(E)===l}return fe.AsyncMode=c,fe.ConcurrentMode=l,fe.ContextConsumer=a,fe.ContextProvider=i,fe.Element=t,fe.ForwardRef=u,fe.Fragment=r,fe.Lazy=y,fe.Memo=g,fe.Portal=n,fe.Profiler=o,fe.StrictMode=s,fe.Suspense=h,fe.isAsyncMode=function(E){return C(E)||S(E)===c},fe.isConcurrentMode=C,fe.isContextConsumer=function(E){return S(E)===a},fe.isContextProvider=function(E){return S(E)===i},fe.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},fe.isForwardRef=function(E){return S(E)===u},fe.isFragment=function(E){return S(E)===r},fe.isLazy=function(E){return S(E)===y},fe.isMemo=function(E){return S(E)===g},fe.isPortal=function(E){return S(E)===n},fe.isProfiler=function(E){return S(E)===o},fe.isStrictMode=function(E){return S(E)===s},fe.isSuspense=function(E){return S(E)===h},fe.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===o||E===s||E===h||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===y||E.$$typeof===g||E.$$typeof===i||E.$$typeof===a||E.$$typeof===u||E.$$typeof===v||E.$$typeof===w||E.$$typeof===b||E.$$typeof===f)},fe.typeOf=S,fe}var he={};/** @license React v16.13.1
162
162
  * react-is.development.js
163
163
  *
164
164
  * Copyright (c) Facebook, Inc. and its affiliates.
165
165
  *
166
166
  * This source code is licensed under the MIT license found in the
167
167
  * LICENSE file in the root directory of this source tree.
168
- */var nd;function DS(){return nd||(nd=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(O){return typeof O=="string"||typeof O=="function"||O===r||O===l||O===o||O===s||O===h||O===p||typeof O=="object"&&O!==null&&(O.$$typeof===y||O.$$typeof===g||O.$$typeof===i||O.$$typeof===a||O.$$typeof===u||O.$$typeof===v||O.$$typeof===w||O.$$typeof===b||O.$$typeof===f)}function C(O){if(typeof O=="object"&&O!==null){var se=O.$$typeof;switch(se){case t:var le=O.type;switch(le){case c:case l:case r:case o:case s:case h:return le;default:var De=le&&le.$$typeof;switch(De){case a:case u:case y:case g:case i:return De;default:return se}}case n:return se}}}var E=c,T=l,k=a,P=i,$=t,x=u,I=r,_=y,K=g,Y=n,X=o,G=s,U=h,M=!1;function q(O){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(O)||C(O)===c}function j(O){return C(O)===l}function V(O){return C(O)===a}function Z(O){return C(O)===i}function N(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function B(O){return C(O)===u}function z(O){return C(O)===r}function H(O){return C(O)===y}function R(O){return C(O)===g}function F(O){return C(O)===n}function W(O){return C(O)===o}function L(O){return C(O)===s}function J(O){return C(O)===h}he.AsyncMode=E,he.ConcurrentMode=T,he.ContextConsumer=k,he.ContextProvider=P,he.Element=$,he.ForwardRef=x,he.Fragment=I,he.Lazy=_,he.Memo=K,he.Portal=Y,he.Profiler=X,he.StrictMode=G,he.Suspense=U,he.isAsyncMode=q,he.isConcurrentMode=j,he.isContextConsumer=V,he.isContextProvider=Z,he.isElement=N,he.isForwardRef=B,he.isFragment=z,he.isLazy=H,he.isMemo=R,he.isPortal=F,he.isProfiler=W,he.isStrictMode=L,he.isSuspense=J,he.isValidElementType=S,he.typeOf=C}()),he}var rd;function om(){return rd||(rd=1,process.env.NODE_ENV==="production"?qr.exports=IS():qr.exports=DS()),qr.exports}/*
168
+ */var nd;function $S(){return nd||(nd=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(O){return typeof O=="string"||typeof O=="function"||O===r||O===l||O===o||O===s||O===h||O===p||typeof O=="object"&&O!==null&&(O.$$typeof===y||O.$$typeof===g||O.$$typeof===i||O.$$typeof===a||O.$$typeof===u||O.$$typeof===v||O.$$typeof===w||O.$$typeof===b||O.$$typeof===f)}function C(O){if(typeof O=="object"&&O!==null){var se=O.$$typeof;switch(se){case t:var le=O.type;switch(le){case c:case l:case r:case o:case s:case h:return le;default:var De=le&&le.$$typeof;switch(De){case a:case u:case y:case g:case i:return De;default:return se}}case n:return se}}}var E=c,T=l,k=a,P=i,$=t,x=u,I=r,_=y,K=g,Y=n,X=o,G=s,U=h,M=!1;function q(O){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(O)||C(O)===c}function N(O){return C(O)===l}function V(O){return C(O)===a}function Z(O){return C(O)===i}function R(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function B(O){return C(O)===u}function z(O){return C(O)===r}function H(O){return C(O)===y}function j(O){return C(O)===g}function F(O){return C(O)===n}function W(O){return C(O)===o}function L(O){return C(O)===s}function J(O){return C(O)===h}he.AsyncMode=E,he.ConcurrentMode=T,he.ContextConsumer=k,he.ContextProvider=P,he.Element=$,he.ForwardRef=x,he.Fragment=I,he.Lazy=_,he.Memo=K,he.Portal=Y,he.Profiler=X,he.StrictMode=G,he.Suspense=U,he.isAsyncMode=q,he.isConcurrentMode=N,he.isContextConsumer=V,he.isContextProvider=Z,he.isElement=R,he.isForwardRef=B,he.isFragment=z,he.isLazy=H,he.isMemo=j,he.isPortal=F,he.isProfiler=W,he.isStrictMode=L,he.isSuspense=J,he.isValidElementType=S,he.typeOf=C}()),he}var rd;function om(){return rd||(rd=1,process.env.NODE_ENV==="production"?qr.exports=OS():qr.exports=$S()),qr.exports}/*
169
169
  object-assign
170
170
  (c) Sindre Sorhus
171
171
  @license MIT
172
- */var Oo,sd;function OS(){if(sd)return Oo;sd=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function s(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Oo=s()?Object.assign:function(o,i){for(var a,c=r(o),l,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var h in a)t.call(a,h)&&(c[h]=a[h]);if(e){l=e(a);for(var p=0;p<l.length;p++)n.call(a,l[p])&&(c[l[p]]=a[l[p]])}}return c},Oo}var $o,od;function $a(){if(od)return $o;od=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $o=e,$o}var Lo,id;function im(){return id||(id=1,Lo=Function.call.bind(Object.prototype.hasOwnProperty)),Lo}var _o,ad;function $S(){if(ad)return _o;ad=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=$a(),n={},r=im();e=function(o){var i="Warning: "+o;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(o,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var u in o)if(r(o,u)){var h;try{if(typeof o[u]!="function"){var p=Error((c||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=o[u](i,u,c,a,null,t)}catch(y){h=y}if(h&&!(h instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var g=l?l():"";e("Failed "+a+" type: "+h.message+(g??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},_o=s,_o}var Fo,cd;function LS(){if(cd)return Fo;cd=1;var e=om(),t=OS(),n=$a(),r=im(),s=$S(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return Fo=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function h(j){var V=j&&(l&&j[l]||j[u]);if(typeof V=="function")return V}var p="<<anonymous>>",g={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:b(),arrayOf:S,element:C(),elementType:E(),instanceOf:T,node:x(),objectOf:P,oneOf:k,oneOfType:$,shape:_,exact:K};function y(j,V){return j===V?j!==0||1/j===1/V:j!==j&&V!==V}function f(j,V){this.message=j,this.data=V&&typeof V=="object"?V:{},this.stack=""}f.prototype=Error.prototype;function v(j){if(process.env.NODE_ENV!=="production")var V={},Z=0;function N(z,H,R,F,W,L,J){if(F=F||p,L=L||R,J!==n){if(c){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=F+":"+R;!V[se]&&Z<3&&(o("You are manually calling a React.PropTypes validation function for the `"+L+"` prop on `"+F+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[se]=!0,Z++)}}return H[R]==null?z?H[R]===null?new f("The "+W+" `"+L+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new f("The "+W+" `"+L+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:j(H,R,F,W,L)}var B=N.bind(null,!1);return B.isRequired=N.bind(null,!0),B}function w(j){function V(Z,N,B,z,H,R){var F=Z[N],W=G(F);if(W!==j){var L=U(F);return new f("Invalid "+z+" `"+H+"` of type "+("`"+L+"` supplied to `"+B+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return v(V)}function b(){return v(i)}function S(j){function V(Z,N,B,z,H){if(typeof j!="function")return new f("Property `"+H+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var R=Z[N];if(!Array.isArray(R)){var F=G(R);return new f("Invalid "+z+" `"+H+"` of type "+("`"+F+"` supplied to `"+B+"`, expected an array."))}for(var W=0;W<R.length;W++){var L=j(R,W,B,z,H+"["+W+"]",n);if(L instanceof Error)return L}return null}return v(V)}function C(){function j(V,Z,N,B,z){var H=V[Z];if(!a(H)){var R=G(H);return new f("Invalid "+B+" `"+z+"` of type "+("`"+R+"` supplied to `"+N+"`, expected a single ReactElement."))}return null}return v(j)}function E(){function j(V,Z,N,B,z){var H=V[Z];if(!e.isValidElementType(H)){var R=G(H);return new f("Invalid "+B+" `"+z+"` of type "+("`"+R+"` supplied to `"+N+"`, expected a single ReactElement type."))}return null}return v(j)}function T(j){function V(Z,N,B,z,H){if(!(Z[N]instanceof j)){var R=j.name||p,F=q(Z[N]);return new f("Invalid "+z+" `"+H+"` of type "+("`"+F+"` supplied to `"+B+"`, expected ")+("instance of `"+R+"`."))}return null}return v(V)}function k(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),i;function V(Z,N,B,z,H){for(var R=Z[N],F=0;F<j.length;F++)if(y(R,j[F]))return null;var W=JSON.stringify(j,function(J,O){var se=U(O);return se==="symbol"?String(O):O});return new f("Invalid "+z+" `"+H+"` of value `"+String(R)+"` "+("supplied to `"+B+"`, expected one of "+W+"."))}return v(V)}function P(j){function V(Z,N,B,z,H){if(typeof j!="function")return new f("Property `"+H+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var R=Z[N],F=G(R);if(F!=="object")return new f("Invalid "+z+" `"+H+"` of type "+("`"+F+"` supplied to `"+B+"`, expected an object."));for(var W in R)if(r(R,W)){var L=j(R,W,B,z,H+"."+W,n);if(L instanceof Error)return L}return null}return v(V)}function $(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var V=0;V<j.length;V++){var Z=j[V];if(typeof Z!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(Z)+" at index "+V+"."),i}function N(B,z,H,R,F){for(var W=[],L=0;L<j.length;L++){var J=j[L],O=J(B,z,H,R,F,n);if(O==null)return null;O.data&&r(O.data,"expectedType")&&W.push(O.data.expectedType)}var se=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new f("Invalid "+R+" `"+F+"` supplied to "+("`"+H+"`"+se+"."))}return v(N)}function x(){function j(V,Z,N,B,z){return Y(V[Z])?null:new f("Invalid "+B+" `"+z+"` supplied to "+("`"+N+"`, expected a ReactNode."))}return v(j)}function I(j,V,Z,N,B){return new f((j||"React class")+": "+V+" type `"+Z+"."+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function _(j){function V(Z,N,B,z,H){var R=Z[N],F=G(R);if(F!=="object")return new f("Invalid "+z+" `"+H+"` of type `"+F+"` "+("supplied to `"+B+"`, expected `object`."));for(var W in j){var L=j[W];if(typeof L!="function")return I(B,z,H,W,U(L));var J=L(R,W,B,z,H+"."+W,n);if(J)return J}return null}return v(V)}function K(j){function V(Z,N,B,z,H){var R=Z[N],F=G(R);if(F!=="object")return new f("Invalid "+z+" `"+H+"` of type `"+F+"` "+("supplied to `"+B+"`, expected `object`."));var W=t({},Z[N],j);for(var L in W){var J=j[L];if(r(j,L)&&typeof J!="function")return I(B,z,H,L,U(J));if(!J)return new f("Invalid "+z+" `"+H+"` key `"+L+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(Z[N],null," ")+`
173
- Valid keys: `+JSON.stringify(Object.keys(j),null," "));var O=J(R,L,B,z,H+"."+L,n);if(O)return O}return null}return v(V)}function Y(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(Y);if(j===null||a(j))return!0;var V=h(j);if(V){var Z=V.call(j),N;if(V!==j.entries){for(;!(N=Z.next()).done;)if(!Y(N.value))return!1}else for(;!(N=Z.next()).done;){var B=N.value;if(B&&!Y(B[1]))return!1}}else return!1;return!0;default:return!1}}function X(j,V){return j==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function G(j){var V=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":X(V,j)?"symbol":V}function U(j){if(typeof j>"u"||j===null)return""+j;var V=G(j);if(V==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return V}function M(j){var V=U(j);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function q(j){return!j.constructor||!j.constructor.name?p:j.constructor.name}return g.checkPropTypes=s,g.resetWarningCache=s.resetWarningCache,g.PropTypes=g,g},Fo}var Bo,ld;function _S(){if(ld)return Bo;ld=1;var e=$a();function t(){}function n(){}return n.resetWarningCache=t,Bo=function(){function r(i,a,c,l,u,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function s(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Bo}var dd;function FS(){if(dd)return Gr.exports;if(dd=1,process.env.NODE_ENV!=="production"){var e=om(),t=!0;Gr.exports=LS()(e.isElement,t)}else Gr.exports=_S()();return Gr.exports}var BS=FS();const ce=VS(BS);function HS(e,t,n=void 0){const r={};for(const s in e){const o=e[s];let i="",a=!0;for(let c=0;c<o.length;c+=1){const l=o[c];l&&(i+=(a===!0?"":" ")+t(l),a=!1,n&&n[l]&&(i+=" "+n[l]))}r[s]=i}return r}var Xr={exports:{}},me={};/**
172
+ */var Oo,sd;function LS(){if(sd)return Oo;sd=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function s(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Oo=s()?Object.assign:function(o,i){for(var a,c=r(o),l,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var h in a)t.call(a,h)&&(c[h]=a[h]);if(e){l=e(a);for(var p=0;p<l.length;p++)n.call(a,l[p])&&(c[l[p]]=a[l[p]])}}return c},Oo}var $o,od;function $a(){if(od)return $o;od=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $o=e,$o}var Lo,id;function im(){return id||(id=1,Lo=Function.call.bind(Object.prototype.hasOwnProperty)),Lo}var _o,ad;function _S(){if(ad)return _o;ad=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=$a(),n={},r=im();e=function(o){var i="Warning: "+o;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(o,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var u in o)if(r(o,u)){var h;try{if(typeof o[u]!="function"){var p=Error((c||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=o[u](i,u,c,a,null,t)}catch(y){h=y}if(h&&!(h instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var g=l?l():"";e("Failed "+a+" type: "+h.message+(g??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},_o=s,_o}var Fo,cd;function FS(){if(cd)return Fo;cd=1;var e=om(),t=LS(),n=$a(),r=im(),s=_S(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return Fo=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function h(N){var V=N&&(l&&N[l]||N[u]);if(typeof V=="function")return V}var p="<<anonymous>>",g={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:b(),arrayOf:S,element:C(),elementType:E(),instanceOf:T,node:x(),objectOf:P,oneOf:k,oneOfType:$,shape:_,exact:K};function y(N,V){return N===V?N!==0||1/N===1/V:N!==N&&V!==V}function f(N,V){this.message=N,this.data=V&&typeof V=="object"?V:{},this.stack=""}f.prototype=Error.prototype;function v(N){if(process.env.NODE_ENV!=="production")var V={},Z=0;function R(z,H,j,F,W,L,J){if(F=F||p,L=L||j,J!==n){if(c){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=F+":"+j;!V[se]&&Z<3&&(o("You are manually calling a React.PropTypes validation function for the `"+L+"` prop on `"+F+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[se]=!0,Z++)}}return H[j]==null?z?H[j]===null?new f("The "+W+" `"+L+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new f("The "+W+" `"+L+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:N(H,j,F,W,L)}var B=R.bind(null,!1);return B.isRequired=R.bind(null,!0),B}function w(N){function V(Z,R,B,z,H,j){var F=Z[R],W=G(F);if(W!==N){var L=U(F);return new f("Invalid "+z+" `"+H+"` of type "+("`"+L+"` supplied to `"+B+"`, expected ")+("`"+N+"`."),{expectedType:N})}return null}return v(V)}function b(){return v(i)}function S(N){function V(Z,R,B,z,H){if(typeof N!="function")return new f("Property `"+H+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var j=Z[R];if(!Array.isArray(j)){var F=G(j);return new f("Invalid "+z+" `"+H+"` of type "+("`"+F+"` supplied to `"+B+"`, expected an array."))}for(var W=0;W<j.length;W++){var L=N(j,W,B,z,H+"["+W+"]",n);if(L instanceof Error)return L}return null}return v(V)}function C(){function N(V,Z,R,B,z){var H=V[Z];if(!a(H)){var j=G(H);return new f("Invalid "+B+" `"+z+"` of type "+("`"+j+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return v(N)}function E(){function N(V,Z,R,B,z){var H=V[Z];if(!e.isValidElementType(H)){var j=G(H);return new f("Invalid "+B+" `"+z+"` of type "+("`"+j+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return v(N)}function T(N){function V(Z,R,B,z,H){if(!(Z[R]instanceof N)){var j=N.name||p,F=q(Z[R]);return new f("Invalid "+z+" `"+H+"` of type "+("`"+F+"` supplied to `"+B+"`, expected ")+("instance of `"+j+"`."))}return null}return v(V)}function k(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),i;function V(Z,R,B,z,H){for(var j=Z[R],F=0;F<N.length;F++)if(y(j,N[F]))return null;var W=JSON.stringify(N,function(J,O){var se=U(O);return se==="symbol"?String(O):O});return new f("Invalid "+z+" `"+H+"` of value `"+String(j)+"` "+("supplied to `"+B+"`, expected one of "+W+"."))}return v(V)}function P(N){function V(Z,R,B,z,H){if(typeof N!="function")return new f("Property `"+H+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var j=Z[R],F=G(j);if(F!=="object")return new f("Invalid "+z+" `"+H+"` of type "+("`"+F+"` supplied to `"+B+"`, expected an object."));for(var W in j)if(r(j,W)){var L=N(j,W,B,z,H+"."+W,n);if(L instanceof Error)return L}return null}return v(V)}function $(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var V=0;V<N.length;V++){var Z=N[V];if(typeof Z!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(Z)+" at index "+V+"."),i}function R(B,z,H,j,F){for(var W=[],L=0;L<N.length;L++){var J=N[L],O=J(B,z,H,j,F,n);if(O==null)return null;O.data&&r(O.data,"expectedType")&&W.push(O.data.expectedType)}var se=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new f("Invalid "+j+" `"+F+"` supplied to "+("`"+H+"`"+se+"."))}return v(R)}function x(){function N(V,Z,R,B,z){return Y(V[Z])?null:new f("Invalid "+B+" `"+z+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return v(N)}function I(N,V,Z,R,B){return new f((N||"React class")+": "+V+" type `"+Z+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function _(N){function V(Z,R,B,z,H){var j=Z[R],F=G(j);if(F!=="object")return new f("Invalid "+z+" `"+H+"` of type `"+F+"` "+("supplied to `"+B+"`, expected `object`."));for(var W in N){var L=N[W];if(typeof L!="function")return I(B,z,H,W,U(L));var J=L(j,W,B,z,H+"."+W,n);if(J)return J}return null}return v(V)}function K(N){function V(Z,R,B,z,H){var j=Z[R],F=G(j);if(F!=="object")return new f("Invalid "+z+" `"+H+"` of type `"+F+"` "+("supplied to `"+B+"`, expected `object`."));var W=t({},Z[R],N);for(var L in W){var J=N[L];if(r(N,L)&&typeof J!="function")return I(B,z,H,L,U(J));if(!J)return new f("Invalid "+z+" `"+H+"` key `"+L+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(Z[R],null," ")+`
173
+ Valid keys: `+JSON.stringify(Object.keys(N),null," "));var O=J(j,L,B,z,H+"."+L,n);if(O)return O}return null}return v(V)}function Y(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every(Y);if(N===null||a(N))return!0;var V=h(N);if(V){var Z=V.call(N),R;if(V!==N.entries){for(;!(R=Z.next()).done;)if(!Y(R.value))return!1}else for(;!(R=Z.next()).done;){var B=R.value;if(B&&!Y(B[1]))return!1}}else return!1;return!0;default:return!1}}function X(N,V){return N==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function G(N){var V=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":X(V,N)?"symbol":V}function U(N){if(typeof N>"u"||N===null)return""+N;var V=G(N);if(V==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return V}function M(N){var V=U(N);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function q(N){return!N.constructor||!N.constructor.name?p:N.constructor.name}return g.checkPropTypes=s,g.resetWarningCache=s.resetWarningCache,g.PropTypes=g,g},Fo}var Bo,ld;function BS(){if(ld)return Bo;ld=1;var e=$a();function t(){}function n(){}return n.resetWarningCache=t,Bo=function(){function r(i,a,c,l,u,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function s(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Bo}var dd;function HS(){if(dd)return Gr.exports;if(dd=1,process.env.NODE_ENV!=="production"){var e=om(),t=!0;Gr.exports=FS()(e.isElement,t)}else Gr.exports=BS()();return Gr.exports}var zS=HS();const ce=DS(zS);function US(e,t,n=void 0){const r={};for(const s in e){const o=e[s];let i="",a=!0;for(let c=0;c<o.length;c+=1){const l=o[c];l&&(i+=(a===!0?"":" ")+t(l),a=!1,n&&n[l]&&(i+=" "+n[l]))}r[s]=i}return r}var Xr={exports:{}},me={};/**
174
174
  * @license React
175
175
  * react-is.production.js
176
176
  *
@@ -178,7 +178,7 @@ Valid keys: `+JSON.stringify(Object.keys(j),null," "));var O=J(R,L,B,z,H+"."+L,
178
178
  *
179
179
  * This source code is licensed under the MIT license found in the
180
180
  * LICENSE file in the root directory of this source tree.
181
- */var ud;function zS(){if(ud)return me;ud=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function y(f){if(typeof f=="object"&&f!==null){var v=f.$$typeof;switch(v){case e:switch(f=f.type,f){case n:case s:case r:case c:case l:case p:return f;default:switch(f=f&&f.$$typeof,f){case i:case a:case h:case u:return f;case o:return f;default:return v}}case t:return v}}}return me.ContextConsumer=o,me.ContextProvider=i,me.Element=e,me.ForwardRef=a,me.Fragment=n,me.Lazy=h,me.Memo=u,me.Portal=t,me.Profiler=s,me.StrictMode=r,me.Suspense=c,me.SuspenseList=l,me.isContextConsumer=function(f){return y(f)===o},me.isContextProvider=function(f){return y(f)===i},me.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===e},me.isForwardRef=function(f){return y(f)===a},me.isFragment=function(f){return y(f)===n},me.isLazy=function(f){return y(f)===h},me.isMemo=function(f){return y(f)===u},me.isPortal=function(f){return y(f)===t},me.isProfiler=function(f){return y(f)===s},me.isStrictMode=function(f){return y(f)===r},me.isSuspense=function(f){return y(f)===c},me.isSuspenseList=function(f){return y(f)===l},me.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===n||f===s||f===r||f===c||f===l||typeof f=="object"&&f!==null&&(f.$$typeof===h||f.$$typeof===u||f.$$typeof===i||f.$$typeof===o||f.$$typeof===a||f.$$typeof===g||f.getModuleId!==void 0)},me.typeOf=y,me}var pe={};/**
181
+ */var ud;function WS(){if(ud)return me;ud=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function y(f){if(typeof f=="object"&&f!==null){var v=f.$$typeof;switch(v){case e:switch(f=f.type,f){case n:case s:case r:case c:case l:case p:return f;default:switch(f=f&&f.$$typeof,f){case i:case a:case h:case u:return f;case o:return f;default:return v}}case t:return v}}}return me.ContextConsumer=o,me.ContextProvider=i,me.Element=e,me.ForwardRef=a,me.Fragment=n,me.Lazy=h,me.Memo=u,me.Portal=t,me.Profiler=s,me.StrictMode=r,me.Suspense=c,me.SuspenseList=l,me.isContextConsumer=function(f){return y(f)===o},me.isContextProvider=function(f){return y(f)===i},me.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===e},me.isForwardRef=function(f){return y(f)===a},me.isFragment=function(f){return y(f)===n},me.isLazy=function(f){return y(f)===h},me.isMemo=function(f){return y(f)===u},me.isPortal=function(f){return y(f)===t},me.isProfiler=function(f){return y(f)===s},me.isStrictMode=function(f){return y(f)===r},me.isSuspense=function(f){return y(f)===c},me.isSuspenseList=function(f){return y(f)===l},me.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===n||f===s||f===r||f===c||f===l||typeof f=="object"&&f!==null&&(f.$$typeof===h||f.$$typeof===u||f.$$typeof===i||f.$$typeof===o||f.$$typeof===a||f.$$typeof===g||f.getModuleId!==void 0)},me.typeOf=y,me}var pe={};/**
182
182
  * @license React
183
183
  * react-is.development.js
184
184
  *
@@ -186,20 +186,20 @@ Valid keys: `+JSON.stringify(Object.keys(j),null," "));var O=J(R,L,B,z,H+"."+L,
186
186
  *
187
187
  * This source code is licensed under the MIT license found in the
188
188
  * LICENSE file in the root directory of this source tree.
189
- */var fd;function US(){return fd||(fd=1,process.env.NODE_ENV!=="production"&&function(){function e(f){if(typeof f=="object"&&f!==null){var v=f.$$typeof;switch(v){case t:switch(f=f.type,f){case r:case o:case s:case l:case u:case g:return f;default:switch(f=f&&f.$$typeof,f){case a:case c:case p:case h:return f;case i:return f;default:return v}}case n:return v}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");pe.ContextConsumer=i,pe.ContextProvider=a,pe.Element=t,pe.ForwardRef=c,pe.Fragment=r,pe.Lazy=p,pe.Memo=h,pe.Portal=n,pe.Profiler=o,pe.StrictMode=s,pe.Suspense=l,pe.SuspenseList=u,pe.isContextConsumer=function(f){return e(f)===i},pe.isContextProvider=function(f){return e(f)===a},pe.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===t},pe.isForwardRef=function(f){return e(f)===c},pe.isFragment=function(f){return e(f)===r},pe.isLazy=function(f){return e(f)===p},pe.isMemo=function(f){return e(f)===h},pe.isPortal=function(f){return e(f)===n},pe.isProfiler=function(f){return e(f)===o},pe.isStrictMode=function(f){return e(f)===s},pe.isSuspense=function(f){return e(f)===l},pe.isSuspenseList=function(f){return e(f)===u},pe.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===r||f===o||f===s||f===l||f===u||typeof f=="object"&&f!==null&&(f.$$typeof===p||f.$$typeof===h||f.$$typeof===a||f.$$typeof===i||f.$$typeof===c||f.$$typeof===y||f.getModuleId!==void 0)},pe.typeOf=e}()),pe}var hd;function WS(){return hd||(hd=1,process.env.NODE_ENV==="production"?Xr.exports=zS():Xr.exports=US()),Xr.exports}var ks=WS();function Pt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function am(e){if(m.isValidElement(e)||ks.isValidElementType(e)||!Pt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=am(e[n])}),t}function qe(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Pt(e)&&Pt(t)&&Object.keys(t).forEach(s=>{m.isValidElement(t[s])||ks.isValidElementType(t[s])?r[s]=t[s]:Pt(t[s])&&Object.prototype.hasOwnProperty.call(e,s)&&Pt(e[s])?r[s]=qe(e[s],t[s],n):n.clone?r[s]=Pt(t[s])?am(t[s]):t[s]:r[s]=t[s]}),r}function fr(e,t){return t?qe(e,t,{clone:!1}):e}const Yt=process.env.NODE_ENV!=="production"?ce.oneOfType([ce.number,ce.string,ce.object,ce.array]):{};function md(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,s)=>{var i,a;const o=/min-width:\s*([0-9.]+)/;return+(((i=r.match(o))==null?void 0:i[1])||0)-+(((a=s.match(o))==null?void 0:a[1])||0)});return n.length?n.reduce((r,s)=>{const o=t[s];return delete r[s],r[s]=o,r},{...t}):t}function ZS(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function KS(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
190
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:zt(18,`(${t})`));return null}const[,r,s]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(s).up(o)}function YS(e){const t=(o,i)=>o.replace("@media",i?`@container ${i}`:"@container");function n(o,i){o.up=(...a)=>t(e.breakpoints.up(...a),i),o.down=(...a)=>t(e.breakpoints.down(...a),i),o.between=(...a)=>t(e.breakpoints.between(...a),i),o.only=(...a)=>t(e.breakpoints.only(...a),i),o.not=(...a)=>{const c=t(e.breakpoints.not(...a),i);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},s=o=>(n(r,o),r);return n(s),{...e,containerQueries:s}}const Hs={xs:0,sm:600,md:900,lg:1200,xl:1536},pd={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Hs[e]}px)`},GS={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Hs[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function It(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||pd;return t.reduce((i,a,c)=>(i[o.up(o.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const o=r.breakpoints||pd;return Object.keys(t).reduce((i,a)=>{if(ZS(o.keys,a)){const c=KS(r.containerQueries?r:GS,a);c&&(i[c]=n(t[a],a))}else if(Object.keys(o.values||Hs).includes(a)){const c=o.up(a);i[c]=n(t[a],a)}else{const c=a;i[c]=t[c]}return i},{})}return n(t)}function qS(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,s)=>{const o=e.up(s);return r[o]={},r},{}))||{}}function gd(e,t){return e.reduce((n,r)=>{const s=n[r];return(!s||Object.keys(s).length===0)&&delete n[r],n},t)}function zs(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((s,o)=>s&&s[o]?s[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,s)=>r&&r[s]!=null?r[s]:null,e)}function Ts(e,t,n,r=n){let s;return typeof e=="function"?s=e(n):Array.isArray(e)?s=e[n]||r:s=zs(e,n)||r,t&&(s=t(s,r,e)),s}function Ne(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:s}=e,o=i=>{if(i[t]==null)return null;const a=i[t],c=i.theme,l=zs(c,r)||{};return It(i,a,h=>{let p=Ts(l,s,h);return h===p&&typeof h=="string"&&(p=Ts(l,s,`${t}${h==="default"?"":fn(h)}`,h)),n===!1?p:{[n]:p}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:Yt}:{},o.filterProps=[t],o}function XS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const JS={m:"margin",p:"padding"},QS={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},yd={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},e4=XS(e=>{if(e.length>2)if(yd[e])e=yd[e];else return[e];const[t,n]=e.split(""),r=JS[t],s=QS[n]||"";return Array.isArray(s)?s.map(o=>r+o):[r+s]}),Us=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ws=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],t4=[...Us,...Ws];function jr(e,t,n,r){const s=zs(e,t,!0)??n;return typeof s=="number"||typeof s=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${o}.`),typeof s=="string"?s.startsWith("var(")&&o===0?0:s.startsWith("var(")&&o===1?s:`calc(${o} * ${s})`:s*o):Array.isArray(s)?o=>{if(typeof o=="string")return o;const i=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>s.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(s)}.`,`${i} > ${s.length-1}, you need to add the missing values.`].join(`
189
+ */var fd;function ZS(){return fd||(fd=1,process.env.NODE_ENV!=="production"&&function(){function e(f){if(typeof f=="object"&&f!==null){var v=f.$$typeof;switch(v){case t:switch(f=f.type,f){case r:case o:case s:case l:case u:case g:return f;default:switch(f=f&&f.$$typeof,f){case a:case c:case p:case h:return f;case i:return f;default:return v}}case n:return v}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");pe.ContextConsumer=i,pe.ContextProvider=a,pe.Element=t,pe.ForwardRef=c,pe.Fragment=r,pe.Lazy=p,pe.Memo=h,pe.Portal=n,pe.Profiler=o,pe.StrictMode=s,pe.Suspense=l,pe.SuspenseList=u,pe.isContextConsumer=function(f){return e(f)===i},pe.isContextProvider=function(f){return e(f)===a},pe.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===t},pe.isForwardRef=function(f){return e(f)===c},pe.isFragment=function(f){return e(f)===r},pe.isLazy=function(f){return e(f)===p},pe.isMemo=function(f){return e(f)===h},pe.isPortal=function(f){return e(f)===n},pe.isProfiler=function(f){return e(f)===o},pe.isStrictMode=function(f){return e(f)===s},pe.isSuspense=function(f){return e(f)===l},pe.isSuspenseList=function(f){return e(f)===u},pe.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===r||f===o||f===s||f===l||f===u||typeof f=="object"&&f!==null&&(f.$$typeof===p||f.$$typeof===h||f.$$typeof===a||f.$$typeof===i||f.$$typeof===c||f.$$typeof===y||f.getModuleId!==void 0)},pe.typeOf=e}()),pe}var hd;function KS(){return hd||(hd=1,process.env.NODE_ENV==="production"?Xr.exports=WS():Xr.exports=ZS()),Xr.exports}var ks=KS();function Pt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function am(e){if(m.isValidElement(e)||ks.isValidElementType(e)||!Pt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=am(e[n])}),t}function qe(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Pt(e)&&Pt(t)&&Object.keys(t).forEach(s=>{m.isValidElement(t[s])||ks.isValidElementType(t[s])?r[s]=t[s]:Pt(t[s])&&Object.prototype.hasOwnProperty.call(e,s)&&Pt(e[s])?r[s]=qe(e[s],t[s],n):n.clone?r[s]=Pt(t[s])?am(t[s]):t[s]:r[s]=t[s]}),r}function fr(e,t){return t?qe(e,t,{clone:!1}):e}const Yt=process.env.NODE_ENV!=="production"?ce.oneOfType([ce.number,ce.string,ce.object,ce.array]):{};function md(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,s)=>{var i,a;const o=/min-width:\s*([0-9.]+)/;return+(((i=r.match(o))==null?void 0:i[1])||0)-+(((a=s.match(o))==null?void 0:a[1])||0)});return n.length?n.reduce((r,s)=>{const o=t[s];return delete r[s],r[s]=o,r},{...t}):t}function YS(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function GS(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
190
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:zt(18,`(${t})`));return null}const[,r,s]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(s).up(o)}function qS(e){const t=(o,i)=>o.replace("@media",i?`@container ${i}`:"@container");function n(o,i){o.up=(...a)=>t(e.breakpoints.up(...a),i),o.down=(...a)=>t(e.breakpoints.down(...a),i),o.between=(...a)=>t(e.breakpoints.between(...a),i),o.only=(...a)=>t(e.breakpoints.only(...a),i),o.not=(...a)=>{const c=t(e.breakpoints.not(...a),i);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},s=o=>(n(r,o),r);return n(s),{...e,containerQueries:s}}const Hs={xs:0,sm:600,md:900,lg:1200,xl:1536},pd={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Hs[e]}px)`},XS={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Hs[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function It(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||pd;return t.reduce((i,a,c)=>(i[o.up(o.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const o=r.breakpoints||pd;return Object.keys(t).reduce((i,a)=>{if(YS(o.keys,a)){const c=GS(r.containerQueries?r:XS,a);c&&(i[c]=n(t[a],a))}else if(Object.keys(o.values||Hs).includes(a)){const c=o.up(a);i[c]=n(t[a],a)}else{const c=a;i[c]=t[c]}return i},{})}return n(t)}function JS(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,s)=>{const o=e.up(s);return r[o]={},r},{}))||{}}function gd(e,t){return e.reduce((n,r)=>{const s=n[r];return(!s||Object.keys(s).length===0)&&delete n[r],n},t)}function zs(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((s,o)=>s&&s[o]?s[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,s)=>r&&r[s]!=null?r[s]:null,e)}function Ts(e,t,n,r=n){let s;return typeof e=="function"?s=e(n):Array.isArray(e)?s=e[n]||r:s=zs(e,n)||r,t&&(s=t(s,r,e)),s}function Re(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:s}=e,o=i=>{if(i[t]==null)return null;const a=i[t],c=i.theme,l=zs(c,r)||{};return It(i,a,h=>{let p=Ts(l,s,h);return h===p&&typeof h=="string"&&(p=Ts(l,s,`${t}${h==="default"?"":fn(h)}`,h)),n===!1?p:{[n]:p}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:Yt}:{},o.filterProps=[t],o}function QS(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const e4={m:"margin",p:"padding"},t4={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},yd={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},n4=QS(e=>{if(e.length>2)if(yd[e])e=yd[e];else return[e];const[t,n]=e.split(""),r=e4[t],s=t4[n]||"";return Array.isArray(s)?s.map(o=>r+o):[r+s]}),Us=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ws=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],r4=[...Us,...Ws];function Nr(e,t,n,r){const s=zs(e,t,!0)??n;return typeof s=="number"||typeof s=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${o}.`),typeof s=="string"?s.startsWith("var(")&&o===0?0:s.startsWith("var(")&&o===1?s:`calc(${o} * ${s})`:s*o):Array.isArray(s)?o=>{if(typeof o=="string")return o;const i=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(i)?i>s.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(s)}.`,`${i} > ${s.length-1}, you need to add the missing values.`].join(`
191
191
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
192
192
  `)));const a=s[i];return o>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof s=="function"?s:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${s}) is invalid.`,"It should be a number, an array or a function."].join(`
193
- `)),()=>{})}function La(e){return jr(e,"spacing",8,"spacing")}function Rr(e,t){return typeof t=="string"||t==null?t:e(t)}function n4(e,t){return n=>e.reduce((r,s)=>(r[s]=Rr(t,n),r),{})}function r4(e,t,n,r){if(!t.includes(n))return null;const s=e4(n),o=n4(s,r),i=e[n];return It(e,i,o)}function cm(e,t){const n=La(e.theme);return Object.keys(e).map(r=>r4(e,t,r,n)).reduce(fr,{})}function Ee(e){return cm(e,Us)}Ee.propTypes=process.env.NODE_ENV!=="production"?Us.reduce((e,t)=>(e[t]=Yt,e),{}):{};Ee.filterProps=Us;function ke(e){return cm(e,Ws)}ke.propTypes=process.env.NODE_ENV!=="production"?Ws.reduce((e,t)=>(e[t]=Yt,e),{}):{};ke.filterProps=Ws;process.env.NODE_ENV!=="production"&&t4.reduce((e,t)=>(e[t]=Yt,e),{});function Zs(...e){const t=e.reduce((r,s)=>(s.filterProps.forEach(o=>{r[o]=s}),r),{}),n=r=>Object.keys(r).reduce((s,o)=>t[o]?fr(s,t[o](r)):s,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,s)=>Object.assign(r,s.propTypes),{}):{},n.filterProps=e.reduce((r,s)=>r.concat(s.filterProps),[]),n}function tt(e){return typeof e!="number"?e:`${e}px solid`}function rt(e,t){return Ne({prop:e,themeKey:"borders",transform:t})}const s4=rt("border",tt),o4=rt("borderTop",tt),i4=rt("borderRight",tt),a4=rt("borderBottom",tt),c4=rt("borderLeft",tt),l4=rt("borderColor"),d4=rt("borderTopColor"),u4=rt("borderRightColor"),f4=rt("borderBottomColor"),h4=rt("borderLeftColor"),m4=rt("outline",tt),p4=rt("outlineColor"),Ks=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=jr(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Rr(t,r)});return It(e,e.borderRadius,n)}return null};Ks.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Yt}:{};Ks.filterProps=["borderRadius"];Zs(s4,o4,i4,a4,c4,l4,d4,u4,f4,h4,Ks,m4,p4);const Ys=e=>{if(e.gap!==void 0&&e.gap!==null){const t=jr(e.theme,"spacing",8,"gap"),n=r=>({gap:Rr(t,r)});return It(e,e.gap,n)}return null};Ys.propTypes=process.env.NODE_ENV!=="production"?{gap:Yt}:{};Ys.filterProps=["gap"];const Gs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=jr(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Rr(t,r)});return It(e,e.columnGap,n)}return null};Gs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Yt}:{};Gs.filterProps=["columnGap"];const qs=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=jr(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Rr(t,r)});return It(e,e.rowGap,n)}return null};qs.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Yt}:{};qs.filterProps=["rowGap"];const g4=Ne({prop:"gridColumn"}),y4=Ne({prop:"gridRow"}),v4=Ne({prop:"gridAutoFlow"}),x4=Ne({prop:"gridAutoColumns"}),b4=Ne({prop:"gridAutoRows"}),w4=Ne({prop:"gridTemplateColumns"}),S4=Ne({prop:"gridTemplateRows"}),C4=Ne({prop:"gridTemplateAreas"}),E4=Ne({prop:"gridArea"});Zs(Ys,Gs,qs,g4,y4,v4,x4,b4,w4,S4,C4,E4);function Dn(e,t){return t==="grey"?t:e}const k4=Ne({prop:"color",themeKey:"palette",transform:Dn}),T4=Ne({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Dn}),A4=Ne({prop:"backgroundColor",themeKey:"palette",transform:Dn});Zs(k4,T4,A4);function Ye(e){return e<=1&&e!==0?`${e*100}%`:e}const P4=Ne({prop:"width",transform:Ye}),_a=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var s,o,i,a,c;const r=((i=(o=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:o.values)==null?void 0:i[n])||Hs[n];return r?((c=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Ye(n)}};return It(e,e.maxWidth,t)}return null};_a.filterProps=["maxWidth"];const M4=Ne({prop:"minWidth",transform:Ye}),N4=Ne({prop:"height",transform:Ye}),j4=Ne({prop:"maxHeight",transform:Ye}),R4=Ne({prop:"minHeight",transform:Ye});Ne({prop:"size",cssProperty:"width",transform:Ye});Ne({prop:"size",cssProperty:"height",transform:Ye});const V4=Ne({prop:"boxSizing"});Zs(P4,_a,M4,N4,j4,R4,V4);const Xs={border:{themeKey:"borders",transform:tt},borderTop:{themeKey:"borders",transform:tt},borderRight:{themeKey:"borders",transform:tt},borderBottom:{themeKey:"borders",transform:tt},borderLeft:{themeKey:"borders",transform:tt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:tt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ks},color:{themeKey:"palette",transform:Dn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Dn},backgroundColor:{themeKey:"palette",transform:Dn},p:{style:ke},pt:{style:ke},pr:{style:ke},pb:{style:ke},pl:{style:ke},px:{style:ke},py:{style:ke},padding:{style:ke},paddingTop:{style:ke},paddingRight:{style:ke},paddingBottom:{style:ke},paddingLeft:{style:ke},paddingX:{style:ke},paddingY:{style:ke},paddingInline:{style:ke},paddingInlineStart:{style:ke},paddingInlineEnd:{style:ke},paddingBlock:{style:ke},paddingBlockStart:{style:ke},paddingBlockEnd:{style:ke},m:{style:Ee},mt:{style:Ee},mr:{style:Ee},mb:{style:Ee},ml:{style:Ee},mx:{style:Ee},my:{style:Ee},margin:{style:Ee},marginTop:{style:Ee},marginRight:{style:Ee},marginBottom:{style:Ee},marginLeft:{style:Ee},marginX:{style:Ee},marginY:{style:Ee},marginInline:{style:Ee},marginInlineStart:{style:Ee},marginInlineEnd:{style:Ee},marginBlock:{style:Ee},marginBlockStart:{style:Ee},marginBlockEnd:{style:Ee},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ys},rowGap:{style:qs},columnGap:{style:Gs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ye},maxWidth:{style:_a},minWidth:{transform:Ye},height:{transform:Ye},maxHeight:{transform:Ye},minHeight:{transform:Ye},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function I4(...e){const t=e.reduce((r,s)=>r.concat(Object.keys(s)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function D4(e,t){return typeof e=="function"?e(t):e}function O4(){function e(n,r,s,o){const i={[n]:r,theme:s},a=o[n];if(!a)return{[n]:r};const{cssProperty:c=n,themeKey:l,transform:u,style:h}=a;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const p=zs(s,l)||{};return h?h(i):It(i,r,y=>{let f=Ts(p,u,y);return y===f&&typeof y=="string"&&(f=Ts(p,u,`${n}${y==="default"?"":fn(y)}`,y)),c===!1?f:{[c]:f}})}function t(n){const{sx:r,theme:s={},nested:o}=n||{};if(!r)return null;const i=s.unstable_sxConfig??Xs;function a(c){let l=c;if(typeof c=="function")l=c(s);else if(typeof c!="object")return c;if(!l)return null;const u=qS(s.breakpoints),h=Object.keys(u);let p=u;return Object.keys(l).forEach(g=>{const y=D4(l[g],s);if(y!=null)if(typeof y=="object")if(i[g])p=fr(p,e(g,y,s,i));else{const f=It({theme:s},y,v=>({[g]:v}));I4(f,y)?p[g]=t({sx:y,theme:s,nested:!0}):p=fr(p,f)}else p=fr(p,e(g,y,s,i))}),!o&&s.modularCssLayers?{"@layer sx":md(s,gd(h,p))}:md(s,gd(h,p))}return Array.isArray(r)?r.map(a):a(r)}return t}const Bn=O4();Bn.filterProps=["sx"];function ji(){return ji=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ji.apply(null,arguments)}function $4(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function L4(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var _4=function(){function e(n){var r=this;this._insertTag=function(s){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,o),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(L4(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var o=$4(s);try{o.insertRule(r,o.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Be="-ms-",As="-moz-",de="-webkit-",lm="comm",Fa="rule",Ba="decl",F4="@import",dm="@keyframes",B4="@layer",H4=Math.abs,Js=String.fromCharCode,z4=Object.assign;function U4(e,t){return $e(e,0)^45?(((t<<2^$e(e,0))<<2^$e(e,1))<<2^$e(e,2))<<2^$e(e,3):0}function um(e){return e.trim()}function W4(e,t){return(e=t.exec(e))?e[0]:e}function ue(e,t,n){return e.replace(t,n)}function Ri(e,t){return e.indexOf(t)}function $e(e,t){return e.charCodeAt(t)|0}function Sr(e,t,n){return e.slice(t,n)}function mt(e){return e.length}function Ha(e){return e.length}function Jr(e,t){return t.push(e),e}function Z4(e,t){return e.map(t).join("")}var Qs=1,Hn=1,fm=0,Ze=0,Ve=0,Jn="";function eo(e,t,n,r,s,o,i){return{value:e,root:t,parent:n,type:r,props:s,children:o,line:Qs,column:Hn,length:i,return:""}}function nr(e,t){return z4(eo("",null,null,"",null,null,0),e,{length:-e.length},t)}function K4(){return Ve}function Y4(){return Ve=Ze>0?$e(Jn,--Ze):0,Hn--,Ve===10&&(Hn=1,Qs--),Ve}function Xe(){return Ve=Ze<fm?$e(Jn,Ze++):0,Hn++,Ve===10&&(Hn=1,Qs++),Ve}function wt(){return $e(Jn,Ze)}function ls(){return Ze}function Vr(e,t){return Sr(Jn,e,t)}function Cr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function hm(e){return Qs=Hn=1,fm=mt(Jn=e),Ze=0,[]}function mm(e){return Jn="",e}function ds(e){return um(Vr(Ze-1,Vi(e===91?e+2:e===40?e+1:e)))}function G4(e){for(;(Ve=wt())&&Ve<33;)Xe();return Cr(e)>2||Cr(Ve)>3?"":" "}function q4(e,t){for(;--t&&Xe()&&!(Ve<48||Ve>102||Ve>57&&Ve<65||Ve>70&&Ve<97););return Vr(e,ls()+(t<6&&wt()==32&&Xe()==32))}function Vi(e){for(;Xe();)switch(Ve){case e:return Ze;case 34:case 39:e!==34&&e!==39&&Vi(Ve);break;case 40:e===41&&Vi(e);break;case 92:Xe();break}return Ze}function X4(e,t){for(;Xe()&&e+Ve!==57;)if(e+Ve===84&&wt()===47)break;return"/*"+Vr(t,Ze-1)+"*"+Js(e===47?e:Xe())}function J4(e){for(;!Cr(wt());)Xe();return Vr(e,Ze)}function Q4(e){return mm(us("",null,null,null,[""],e=hm(e),0,[0],e))}function us(e,t,n,r,s,o,i,a,c){for(var l=0,u=0,h=i,p=0,g=0,y=0,f=1,v=1,w=1,b=0,S="",C=s,E=o,T=r,k=S;v;)switch(y=b,b=Xe()){case 40:if(y!=108&&$e(k,h-1)==58){Ri(k+=ue(ds(b),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:k+=ds(b);break;case 9:case 10:case 13:case 32:k+=G4(y);break;case 92:k+=q4(ls()-1,7);continue;case 47:switch(wt()){case 42:case 47:Jr(eC(X4(Xe(),ls()),t,n),c);break;default:k+="/"}break;case 123*f:a[l++]=mt(k)*w;case 125*f:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:w==-1&&(k=ue(k,/\f/g,"")),g>0&&mt(k)-h&&Jr(g>32?xd(k+";",r,n,h-1):xd(ue(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(Jr(T=vd(k,t,n,l,u,s,a,S,C=[],E=[],h),o),b===123)if(u===0)us(k,t,T,T,C,o,h,a,E);else switch(p===99&&$e(k,3)===110?100:p){case 100:case 108:case 109:case 115:us(e,T,T,r&&Jr(vd(e,T,T,0,0,s,a,S,s,C=[],h),E),s,E,h,a,r?C:E);break;default:us(k,T,T,T,[""],E,0,a,E)}}l=u=g=0,f=w=1,S=k="",h=i;break;case 58:h=1+mt(k),g=y;default:if(f<1){if(b==123)--f;else if(b==125&&f++==0&&Y4()==125)continue}switch(k+=Js(b),b*f){case 38:w=u>0?1:(k+="\f",-1);break;case 44:a[l++]=(mt(k)-1)*w,w=1;break;case 64:wt()===45&&(k+=ds(Xe())),p=wt(),u=h=mt(S=k+=J4(ls())),b++;break;case 45:y===45&&mt(k)==2&&(f=0)}}return o}function vd(e,t,n,r,s,o,i,a,c,l,u){for(var h=s-1,p=s===0?o:[""],g=Ha(p),y=0,f=0,v=0;y<r;++y)for(var w=0,b=Sr(e,h+1,h=H4(f=i[y])),S=e;w<g;++w)(S=um(f>0?p[w]+" "+b:ue(b,/&\f/g,p[w])))&&(c[v++]=S);return eo(e,t,n,s===0?Fa:a,c,l,u)}function eC(e,t,n){return eo(e,t,n,lm,Js(K4()),Sr(e,2,-2),0)}function xd(e,t,n,r){return eo(e,t,n,Ba,Sr(e,0,r),Sr(e,r+1,-1),r)}function On(e,t){for(var n="",r=Ha(e),s=0;s<r;s++)n+=t(e[s],s,e,t)||"";return n}function tC(e,t,n,r){switch(e.type){case B4:if(e.children.length)break;case F4:case Ba:return e.return=e.return||e.value;case lm:return"";case dm:return e.return=e.value+"{"+On(e.children,r)+"}";case Fa:e.value=e.props.join(",")}return mt(n=On(e.children,r))?e.return=e.value+"{"+n+"}":""}function nC(e){var t=Ha(e);return function(n,r,s,o){for(var i="",a=0;a<t;a++)i+=e[a](n,r,s,o)||"";return i}}function rC(e){return function(t){t.root||(t=t.return)&&e(t)}}function pm(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var sC=function(t,n,r){for(var s=0,o=0;s=o,o=wt(),s===38&&o===12&&(n[r]=1),!Cr(o);)Xe();return Vr(t,Ze)},oC=function(t,n){var r=-1,s=44;do switch(Cr(s)){case 0:s===38&&wt()===12&&(n[r]=1),t[r]+=sC(Ze-1,n,r);break;case 2:t[r]+=ds(s);break;case 4:if(s===44){t[++r]=wt()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Js(s)}while(s=Xe());return t},iC=function(t,n){return mm(oC(hm(t),n))},bd=new WeakMap,aC=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,s=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!bd.get(r))&&!s){bd.set(t,!0);for(var o=[],i=iC(n,o),a=r.props,c=0,l=0;c<i.length;c++)for(var u=0;u<a.length;u++,l++)t.props[l]=o[c]?i[c].replace(/&\f/g,a[u]):a[u]+" "+i[c]}}},cC=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function gm(e,t){switch(U4(e,t)){case 5103:return de+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return de+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return de+e+As+e+Be+e+e;case 6828:case 4268:return de+e+Be+e+e;case 6165:return de+e+Be+"flex-"+e+e;case 5187:return de+e+ue(e,/(\w+).+(:[^]+)/,de+"box-$1$2"+Be+"flex-$1$2")+e;case 5443:return de+e+Be+"flex-item-"+ue(e,/flex-|-self/,"")+e;case 4675:return de+e+Be+"flex-line-pack"+ue(e,/align-content|flex-|-self/,"")+e;case 5548:return de+e+Be+ue(e,"shrink","negative")+e;case 5292:return de+e+Be+ue(e,"basis","preferred-size")+e;case 6060:return de+"box-"+ue(e,"-grow","")+de+e+Be+ue(e,"grow","positive")+e;case 4554:return de+ue(e,/([^-])(transform)/g,"$1"+de+"$2")+e;case 6187:return ue(ue(ue(e,/(zoom-|grab)/,de+"$1"),/(image-set)/,de+"$1"),e,"")+e;case 5495:case 3959:return ue(e,/(image-set\([^]*)/,de+"$1$`$1");case 4968:return ue(ue(e,/(.+:)(flex-)?(.*)/,de+"box-pack:$3"+Be+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+de+e+e;case 4095:case 3583:case 4068:case 2532:return ue(e,/(.+)-inline(.+)/,de+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(mt(e)-1-t>6)switch($e(e,t+1)){case 109:if($e(e,t+4)!==45)break;case 102:return ue(e,/(.+:)(.+)-([^]+)/,"$1"+de+"$2-$3$1"+As+($e(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ri(e,"stretch")?gm(ue(e,"stretch","fill-available"),t)+e:e}break;case 4949:if($e(e,t+1)!==115)break;case 6444:switch($e(e,mt(e)-3-(~Ri(e,"!important")&&10))){case 107:return ue(e,":",":"+de)+e;case 101:return ue(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+de+($e(e,14)===45?"inline-":"")+"box$3$1"+de+"$2$3$1"+Be+"$2box$3")+e}break;case 5936:switch($e(e,t+11)){case 114:return de+e+Be+ue(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return de+e+Be+ue(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return de+e+Be+ue(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return de+e+Be+e+e}return e}var lC=function(t,n,r,s){if(t.length>-1&&!t.return)switch(t.type){case Ba:t.return=gm(t.value,t.length);break;case dm:return On([nr(t,{value:ue(t.value,"@","@"+de)})],s);case Fa:if(t.length)return Z4(t.props,function(o){switch(W4(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return On([nr(t,{props:[ue(o,/:(read-\w+)/,":"+As+"$1")]})],s);case"::placeholder":return On([nr(t,{props:[ue(o,/:(plac\w+)/,":"+de+"input-$1")]}),nr(t,{props:[ue(o,/:(plac\w+)/,":"+As+"$1")]}),nr(t,{props:[ue(o,/:(plac\w+)/,Be+"input-$1")]})],s)}return""})}},dC=[lC],uC=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(f){var v=f.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(f),f.setAttribute("data-s",""))})}var s=t.stylisPlugins||dC,o={},i,a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(f){for(var v=f.getAttribute("data-emotion").split(" "),w=1;w<v.length;w++)o[v[w]]=!0;a.push(f)});var c,l=[aC,cC];{var u,h=[tC,rC(function(f){u.insert(f)})],p=nC(l.concat(s,h)),g=function(v){return On(Q4(v),p)};c=function(v,w,b,S){u=b,g(v?v+"{"+w.styles+"}":w.styles),S&&(y.inserted[w.name]=!0)}}var y={key:n,sheet:new _4({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:c};return y.sheet.hydrate(a),y},fC=!0;function hC(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(r+=s+" ")}),r}var ym=function(t,n,r){var s=t.key+"-"+n.name;(r===!1||fC===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},mC=function(t,n,r){ym(t,n,r);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+s:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function pC(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var gC={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},yC=/[A-Z]|^ms/g,vC=/_EMO_([^_]+?)_([^]*?)_EMO_/g,vm=function(t){return t.charCodeAt(1)===45},wd=function(t){return t!=null&&typeof t!="boolean"},Ho=pm(function(e){return vm(e)?e:e.replace(yC,"-$&").toLowerCase()}),Sd=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(vC,function(r,s,o){return pt={name:s,styles:o,next:pt},s})}return gC[t]!==1&&!vm(t)&&typeof n=="number"&&n!==0?n+"px":n};function Er(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return pt={name:s.name,styles:s.styles,next:pt},s.name;var o=n;if(o.styles!==void 0){var i=o.next;if(i!==void 0)for(;i!==void 0;)pt={name:i.name,styles:i.styles,next:pt},i=i.next;var a=o.styles+";";return a}return xC(e,t,n)}case"function":{if(e!==void 0){var c=pt,l=n(e);return pt=c,Er(e,t,l)}break}}var u=n;if(t==null)return u;var h=t[u];return h!==void 0?h:u}function xC(e,t,n){var r="";if(Array.isArray(n))for(var s=0;s<n.length;s++)r+=Er(e,t,n[s])+";";else for(var o in n){var i=n[o];if(typeof i!="object"){var a=i;t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":wd(a)&&(r+=Ho(o)+":"+Sd(o,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var c=0;c<i.length;c++)wd(i[c])&&(r+=Ho(o)+":"+Sd(o,i[c])+";");else{var l=Er(e,t,i);switch(o){case"animation":case"animationName":{r+=Ho(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var Cd=/label:\s*([^\s;{]+)\s*(;|$)/g,pt;function xm(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,s="";pt=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,s+=Er(n,t,o);else{var i=o;s+=i[0]}for(var a=1;a<e.length;a++)if(s+=Er(n,t,e[a]),r){var c=o;s+=c[a]}Cd.lastIndex=0;for(var l="",u;(u=Cd.exec(s))!==null;)l+="-"+u[1];var h=pC(s)+l;return{name:h,styles:s,next:pt}}var bC=function(t){return t()},wC=m.useInsertionEffect?m.useInsertionEffect:!1,SC=wC||bC,bm=m.createContext(typeof HTMLElement<"u"?uC({key:"css"}):null);bm.Provider;var CC=function(t){return A.forwardRef(function(n,r){var s=A.useContext(bm);return t(n,s,r)})},EC=m.createContext({}),kC=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,TC=pm(function(e){return kC.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),AC=TC,PC=function(t){return t!=="theme"},Ed=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?AC:PC},kd=function(t,n,r){var s;if(n){var o=n.shouldForwardProp;s=t.__emotion_forwardProp&&o?function(i){return t.__emotion_forwardProp(i)&&o(i)}:o}return typeof s!="function"&&r&&(s=t.__emotion_forwardProp),s},MC=function(t){var n=t.cache,r=t.serialized,s=t.isStringTag;return ym(n,r,s),SC(function(){return mC(n,r,s)}),null},NC=function e(t,n){var r=t.__emotion_real===t,s=r&&t.__emotion_base||t,o,i;n!==void 0&&(o=n.label,i=n.target);var a=kd(t,n,r),c=a||Ed(s),l=!c("as");return function(){var u=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)h.push.apply(h,u);else{var p=u[0];h.push(p[0]);for(var g=u.length,y=1;y<g;y++)h.push(u[y],p[y])}var f=CC(function(v,w,b){var S=l&&v.as||s,C="",E=[],T=v;if(v.theme==null){T={};for(var k in v)T[k]=v[k];T.theme=m.useContext(EC)}typeof v.className=="string"?C=hC(w.registered,E,v.className):v.className!=null&&(C=v.className+" ");var P=xm(h.concat(E),w.registered,T);C+=w.key+"-"+P.name,i!==void 0&&(C+=" "+i);var $=l&&a===void 0?Ed(S):c,x={};for(var I in v)l&&I==="as"||$(I)&&(x[I]=v[I]);return x.className=C,b&&(x.ref=b),m.createElement(m.Fragment,null,m.createElement(MC,{cache:w,serialized:P,isStringTag:typeof S=="string"}),m.createElement(S,x))});return f.displayName=o!==void 0?o:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",f.defaultProps=t.defaultProps,f.__emotion_real=f,f.__emotion_base=s,f.__emotion_styles=h,f.__emotion_forwardProp=a,Object.defineProperty(f,"toString",{value:function(){return"."+i}}),f.withComponent=function(v,w){var b=e(v,ji({},n,w,{shouldForwardProp:kd(f,w,!0)}));return b.apply(void 0,h)},f}},jC=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Ii=NC.bind(null);jC.forEach(function(e){Ii[e]=Ii(e)});/**
193
+ `)),()=>{})}function La(e){return Nr(e,"spacing",8,"spacing")}function jr(e,t){return typeof t=="string"||t==null?t:e(t)}function s4(e,t){return n=>e.reduce((r,s)=>(r[s]=jr(t,n),r),{})}function o4(e,t,n,r){if(!t.includes(n))return null;const s=n4(n),o=s4(s,r),i=e[n];return It(e,i,o)}function cm(e,t){const n=La(e.theme);return Object.keys(e).map(r=>o4(e,t,r,n)).reduce(fr,{})}function Ee(e){return cm(e,Us)}Ee.propTypes=process.env.NODE_ENV!=="production"?Us.reduce((e,t)=>(e[t]=Yt,e),{}):{};Ee.filterProps=Us;function ke(e){return cm(e,Ws)}ke.propTypes=process.env.NODE_ENV!=="production"?Ws.reduce((e,t)=>(e[t]=Yt,e),{}):{};ke.filterProps=Ws;process.env.NODE_ENV!=="production"&&r4.reduce((e,t)=>(e[t]=Yt,e),{});function Zs(...e){const t=e.reduce((r,s)=>(s.filterProps.forEach(o=>{r[o]=s}),r),{}),n=r=>Object.keys(r).reduce((s,o)=>t[o]?fr(s,t[o](r)):s,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,s)=>Object.assign(r,s.propTypes),{}):{},n.filterProps=e.reduce((r,s)=>r.concat(s.filterProps),[]),n}function tt(e){return typeof e!="number"?e:`${e}px solid`}function rt(e,t){return Re({prop:e,themeKey:"borders",transform:t})}const i4=rt("border",tt),a4=rt("borderTop",tt),c4=rt("borderRight",tt),l4=rt("borderBottom",tt),d4=rt("borderLeft",tt),u4=rt("borderColor"),f4=rt("borderTopColor"),h4=rt("borderRightColor"),m4=rt("borderBottomColor"),p4=rt("borderLeftColor"),g4=rt("outline",tt),y4=rt("outlineColor"),Ks=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Nr(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:jr(t,r)});return It(e,e.borderRadius,n)}return null};Ks.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Yt}:{};Ks.filterProps=["borderRadius"];Zs(i4,a4,c4,l4,d4,u4,f4,h4,m4,p4,Ks,g4,y4);const Ys=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Nr(e.theme,"spacing",8,"gap"),n=r=>({gap:jr(t,r)});return It(e,e.gap,n)}return null};Ys.propTypes=process.env.NODE_ENV!=="production"?{gap:Yt}:{};Ys.filterProps=["gap"];const Gs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Nr(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:jr(t,r)});return It(e,e.columnGap,n)}return null};Gs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Yt}:{};Gs.filterProps=["columnGap"];const qs=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Nr(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:jr(t,r)});return It(e,e.rowGap,n)}return null};qs.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Yt}:{};qs.filterProps=["rowGap"];const v4=Re({prop:"gridColumn"}),x4=Re({prop:"gridRow"}),b4=Re({prop:"gridAutoFlow"}),w4=Re({prop:"gridAutoColumns"}),S4=Re({prop:"gridAutoRows"}),C4=Re({prop:"gridTemplateColumns"}),E4=Re({prop:"gridTemplateRows"}),k4=Re({prop:"gridTemplateAreas"}),T4=Re({prop:"gridArea"});Zs(Ys,Gs,qs,v4,x4,b4,w4,S4,C4,E4,k4,T4);function Dn(e,t){return t==="grey"?t:e}const A4=Re({prop:"color",themeKey:"palette",transform:Dn}),P4=Re({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Dn}),M4=Re({prop:"backgroundColor",themeKey:"palette",transform:Dn});Zs(A4,P4,M4);function Ye(e){return e<=1&&e!==0?`${e*100}%`:e}const R4=Re({prop:"width",transform:Ye}),_a=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var s,o,i,a,c;const r=((i=(o=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:o.values)==null?void 0:i[n])||Hs[n];return r?((c=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Ye(n)}};return It(e,e.maxWidth,t)}return null};_a.filterProps=["maxWidth"];const N4=Re({prop:"minWidth",transform:Ye}),j4=Re({prop:"height",transform:Ye}),V4=Re({prop:"maxHeight",transform:Ye}),I4=Re({prop:"minHeight",transform:Ye});Re({prop:"size",cssProperty:"width",transform:Ye});Re({prop:"size",cssProperty:"height",transform:Ye});const D4=Re({prop:"boxSizing"});Zs(R4,_a,N4,j4,V4,I4,D4);const Xs={border:{themeKey:"borders",transform:tt},borderTop:{themeKey:"borders",transform:tt},borderRight:{themeKey:"borders",transform:tt},borderBottom:{themeKey:"borders",transform:tt},borderLeft:{themeKey:"borders",transform:tt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:tt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ks},color:{themeKey:"palette",transform:Dn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Dn},backgroundColor:{themeKey:"palette",transform:Dn},p:{style:ke},pt:{style:ke},pr:{style:ke},pb:{style:ke},pl:{style:ke},px:{style:ke},py:{style:ke},padding:{style:ke},paddingTop:{style:ke},paddingRight:{style:ke},paddingBottom:{style:ke},paddingLeft:{style:ke},paddingX:{style:ke},paddingY:{style:ke},paddingInline:{style:ke},paddingInlineStart:{style:ke},paddingInlineEnd:{style:ke},paddingBlock:{style:ke},paddingBlockStart:{style:ke},paddingBlockEnd:{style:ke},m:{style:Ee},mt:{style:Ee},mr:{style:Ee},mb:{style:Ee},ml:{style:Ee},mx:{style:Ee},my:{style:Ee},margin:{style:Ee},marginTop:{style:Ee},marginRight:{style:Ee},marginBottom:{style:Ee},marginLeft:{style:Ee},marginX:{style:Ee},marginY:{style:Ee},marginInline:{style:Ee},marginInlineStart:{style:Ee},marginInlineEnd:{style:Ee},marginBlock:{style:Ee},marginBlockStart:{style:Ee},marginBlockEnd:{style:Ee},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ys},rowGap:{style:qs},columnGap:{style:Gs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ye},maxWidth:{style:_a},minWidth:{transform:Ye},height:{transform:Ye},maxHeight:{transform:Ye},minHeight:{transform:Ye},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function O4(...e){const t=e.reduce((r,s)=>r.concat(Object.keys(s)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function $4(e,t){return typeof e=="function"?e(t):e}function L4(){function e(n,r,s,o){const i={[n]:r,theme:s},a=o[n];if(!a)return{[n]:r};const{cssProperty:c=n,themeKey:l,transform:u,style:h}=a;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const p=zs(s,l)||{};return h?h(i):It(i,r,y=>{let f=Ts(p,u,y);return y===f&&typeof y=="string"&&(f=Ts(p,u,`${n}${y==="default"?"":fn(y)}`,y)),c===!1?f:{[c]:f}})}function t(n){const{sx:r,theme:s={},nested:o}=n||{};if(!r)return null;const i=s.unstable_sxConfig??Xs;function a(c){let l=c;if(typeof c=="function")l=c(s);else if(typeof c!="object")return c;if(!l)return null;const u=JS(s.breakpoints),h=Object.keys(u);let p=u;return Object.keys(l).forEach(g=>{const y=$4(l[g],s);if(y!=null)if(typeof y=="object")if(i[g])p=fr(p,e(g,y,s,i));else{const f=It({theme:s},y,v=>({[g]:v}));O4(f,y)?p[g]=t({sx:y,theme:s,nested:!0}):p=fr(p,f)}else p=fr(p,e(g,y,s,i))}),!o&&s.modularCssLayers?{"@layer sx":md(s,gd(h,p))}:md(s,gd(h,p))}return Array.isArray(r)?r.map(a):a(r)}return t}const Bn=L4();Bn.filterProps=["sx"];function Ni(){return Ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ni.apply(null,arguments)}function _4(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function F4(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var B4=function(){function e(n){var r=this;this._insertTag=function(s){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,o),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(F4(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var o=_4(s);try{o.insertRule(r,o.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Be="-ms-",As="-moz-",de="-webkit-",lm="comm",Fa="rule",Ba="decl",H4="@import",dm="@keyframes",z4="@layer",U4=Math.abs,Js=String.fromCharCode,W4=Object.assign;function Z4(e,t){return $e(e,0)^45?(((t<<2^$e(e,0))<<2^$e(e,1))<<2^$e(e,2))<<2^$e(e,3):0}function um(e){return e.trim()}function K4(e,t){return(e=t.exec(e))?e[0]:e}function ue(e,t,n){return e.replace(t,n)}function ji(e,t){return e.indexOf(t)}function $e(e,t){return e.charCodeAt(t)|0}function Sr(e,t,n){return e.slice(t,n)}function mt(e){return e.length}function Ha(e){return e.length}function Jr(e,t){return t.push(e),e}function Y4(e,t){return e.map(t).join("")}var Qs=1,Hn=1,fm=0,Ze=0,Ve=0,Jn="";function eo(e,t,n,r,s,o,i){return{value:e,root:t,parent:n,type:r,props:s,children:o,line:Qs,column:Hn,length:i,return:""}}function nr(e,t){return W4(eo("",null,null,"",null,null,0),e,{length:-e.length},t)}function G4(){return Ve}function q4(){return Ve=Ze>0?$e(Jn,--Ze):0,Hn--,Ve===10&&(Hn=1,Qs--),Ve}function Xe(){return Ve=Ze<fm?$e(Jn,Ze++):0,Hn++,Ve===10&&(Hn=1,Qs++),Ve}function wt(){return $e(Jn,Ze)}function ls(){return Ze}function Vr(e,t){return Sr(Jn,e,t)}function Cr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function hm(e){return Qs=Hn=1,fm=mt(Jn=e),Ze=0,[]}function mm(e){return Jn="",e}function ds(e){return um(Vr(Ze-1,Vi(e===91?e+2:e===40?e+1:e)))}function X4(e){for(;(Ve=wt())&&Ve<33;)Xe();return Cr(e)>2||Cr(Ve)>3?"":" "}function J4(e,t){for(;--t&&Xe()&&!(Ve<48||Ve>102||Ve>57&&Ve<65||Ve>70&&Ve<97););return Vr(e,ls()+(t<6&&wt()==32&&Xe()==32))}function Vi(e){for(;Xe();)switch(Ve){case e:return Ze;case 34:case 39:e!==34&&e!==39&&Vi(Ve);break;case 40:e===41&&Vi(e);break;case 92:Xe();break}return Ze}function Q4(e,t){for(;Xe()&&e+Ve!==57;)if(e+Ve===84&&wt()===47)break;return"/*"+Vr(t,Ze-1)+"*"+Js(e===47?e:Xe())}function eC(e){for(;!Cr(wt());)Xe();return Vr(e,Ze)}function tC(e){return mm(us("",null,null,null,[""],e=hm(e),0,[0],e))}function us(e,t,n,r,s,o,i,a,c){for(var l=0,u=0,h=i,p=0,g=0,y=0,f=1,v=1,w=1,b=0,S="",C=s,E=o,T=r,k=S;v;)switch(y=b,b=Xe()){case 40:if(y!=108&&$e(k,h-1)==58){ji(k+=ue(ds(b),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:k+=ds(b);break;case 9:case 10:case 13:case 32:k+=X4(y);break;case 92:k+=J4(ls()-1,7);continue;case 47:switch(wt()){case 42:case 47:Jr(nC(Q4(Xe(),ls()),t,n),c);break;default:k+="/"}break;case 123*f:a[l++]=mt(k)*w;case 125*f:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:w==-1&&(k=ue(k,/\f/g,"")),g>0&&mt(k)-h&&Jr(g>32?xd(k+";",r,n,h-1):xd(ue(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(Jr(T=vd(k,t,n,l,u,s,a,S,C=[],E=[],h),o),b===123)if(u===0)us(k,t,T,T,C,o,h,a,E);else switch(p===99&&$e(k,3)===110?100:p){case 100:case 108:case 109:case 115:us(e,T,T,r&&Jr(vd(e,T,T,0,0,s,a,S,s,C=[],h),E),s,E,h,a,r?C:E);break;default:us(k,T,T,T,[""],E,0,a,E)}}l=u=g=0,f=w=1,S=k="",h=i;break;case 58:h=1+mt(k),g=y;default:if(f<1){if(b==123)--f;else if(b==125&&f++==0&&q4()==125)continue}switch(k+=Js(b),b*f){case 38:w=u>0?1:(k+="\f",-1);break;case 44:a[l++]=(mt(k)-1)*w,w=1;break;case 64:wt()===45&&(k+=ds(Xe())),p=wt(),u=h=mt(S=k+=eC(ls())),b++;break;case 45:y===45&&mt(k)==2&&(f=0)}}return o}function vd(e,t,n,r,s,o,i,a,c,l,u){for(var h=s-1,p=s===0?o:[""],g=Ha(p),y=0,f=0,v=0;y<r;++y)for(var w=0,b=Sr(e,h+1,h=U4(f=i[y])),S=e;w<g;++w)(S=um(f>0?p[w]+" "+b:ue(b,/&\f/g,p[w])))&&(c[v++]=S);return eo(e,t,n,s===0?Fa:a,c,l,u)}function nC(e,t,n){return eo(e,t,n,lm,Js(G4()),Sr(e,2,-2),0)}function xd(e,t,n,r){return eo(e,t,n,Ba,Sr(e,0,r),Sr(e,r+1,-1),r)}function On(e,t){for(var n="",r=Ha(e),s=0;s<r;s++)n+=t(e[s],s,e,t)||"";return n}function rC(e,t,n,r){switch(e.type){case z4:if(e.children.length)break;case H4:case Ba:return e.return=e.return||e.value;case lm:return"";case dm:return e.return=e.value+"{"+On(e.children,r)+"}";case Fa:e.value=e.props.join(",")}return mt(n=On(e.children,r))?e.return=e.value+"{"+n+"}":""}function sC(e){var t=Ha(e);return function(n,r,s,o){for(var i="",a=0;a<t;a++)i+=e[a](n,r,s,o)||"";return i}}function oC(e){return function(t){t.root||(t=t.return)&&e(t)}}function pm(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var iC=function(t,n,r){for(var s=0,o=0;s=o,o=wt(),s===38&&o===12&&(n[r]=1),!Cr(o);)Xe();return Vr(t,Ze)},aC=function(t,n){var r=-1,s=44;do switch(Cr(s)){case 0:s===38&&wt()===12&&(n[r]=1),t[r]+=iC(Ze-1,n,r);break;case 2:t[r]+=ds(s);break;case 4:if(s===44){t[++r]=wt()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Js(s)}while(s=Xe());return t},cC=function(t,n){return mm(aC(hm(t),n))},bd=new WeakMap,lC=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,s=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!bd.get(r))&&!s){bd.set(t,!0);for(var o=[],i=cC(n,o),a=r.props,c=0,l=0;c<i.length;c++)for(var u=0;u<a.length;u++,l++)t.props[l]=o[c]?i[c].replace(/&\f/g,a[u]):a[u]+" "+i[c]}}},dC=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function gm(e,t){switch(Z4(e,t)){case 5103:return de+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return de+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return de+e+As+e+Be+e+e;case 6828:case 4268:return de+e+Be+e+e;case 6165:return de+e+Be+"flex-"+e+e;case 5187:return de+e+ue(e,/(\w+).+(:[^]+)/,de+"box-$1$2"+Be+"flex-$1$2")+e;case 5443:return de+e+Be+"flex-item-"+ue(e,/flex-|-self/,"")+e;case 4675:return de+e+Be+"flex-line-pack"+ue(e,/align-content|flex-|-self/,"")+e;case 5548:return de+e+Be+ue(e,"shrink","negative")+e;case 5292:return de+e+Be+ue(e,"basis","preferred-size")+e;case 6060:return de+"box-"+ue(e,"-grow","")+de+e+Be+ue(e,"grow","positive")+e;case 4554:return de+ue(e,/([^-])(transform)/g,"$1"+de+"$2")+e;case 6187:return ue(ue(ue(e,/(zoom-|grab)/,de+"$1"),/(image-set)/,de+"$1"),e,"")+e;case 5495:case 3959:return ue(e,/(image-set\([^]*)/,de+"$1$`$1");case 4968:return ue(ue(e,/(.+:)(flex-)?(.*)/,de+"box-pack:$3"+Be+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+de+e+e;case 4095:case 3583:case 4068:case 2532:return ue(e,/(.+)-inline(.+)/,de+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(mt(e)-1-t>6)switch($e(e,t+1)){case 109:if($e(e,t+4)!==45)break;case 102:return ue(e,/(.+:)(.+)-([^]+)/,"$1"+de+"$2-$3$1"+As+($e(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ji(e,"stretch")?gm(ue(e,"stretch","fill-available"),t)+e:e}break;case 4949:if($e(e,t+1)!==115)break;case 6444:switch($e(e,mt(e)-3-(~ji(e,"!important")&&10))){case 107:return ue(e,":",":"+de)+e;case 101:return ue(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+de+($e(e,14)===45?"inline-":"")+"box$3$1"+de+"$2$3$1"+Be+"$2box$3")+e}break;case 5936:switch($e(e,t+11)){case 114:return de+e+Be+ue(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return de+e+Be+ue(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return de+e+Be+ue(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return de+e+Be+e+e}return e}var uC=function(t,n,r,s){if(t.length>-1&&!t.return)switch(t.type){case Ba:t.return=gm(t.value,t.length);break;case dm:return On([nr(t,{value:ue(t.value,"@","@"+de)})],s);case Fa:if(t.length)return Y4(t.props,function(o){switch(K4(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return On([nr(t,{props:[ue(o,/:(read-\w+)/,":"+As+"$1")]})],s);case"::placeholder":return On([nr(t,{props:[ue(o,/:(plac\w+)/,":"+de+"input-$1")]}),nr(t,{props:[ue(o,/:(plac\w+)/,":"+As+"$1")]}),nr(t,{props:[ue(o,/:(plac\w+)/,Be+"input-$1")]})],s)}return""})}},fC=[uC],hC=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(f){var v=f.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(f),f.setAttribute("data-s",""))})}var s=t.stylisPlugins||fC,o={},i,a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(f){for(var v=f.getAttribute("data-emotion").split(" "),w=1;w<v.length;w++)o[v[w]]=!0;a.push(f)});var c,l=[lC,dC];{var u,h=[rC,oC(function(f){u.insert(f)})],p=sC(l.concat(s,h)),g=function(v){return On(tC(v),p)};c=function(v,w,b,S){u=b,g(v?v+"{"+w.styles+"}":w.styles),S&&(y.inserted[w.name]=!0)}}var y={key:n,sheet:new B4({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:c};return y.sheet.hydrate(a),y},mC=!0;function pC(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(r+=s+" ")}),r}var ym=function(t,n,r){var s=t.key+"-"+n.name;(r===!1||mC===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},gC=function(t,n,r){ym(t,n,r);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+s:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function yC(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var vC={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},xC=/[A-Z]|^ms/g,bC=/_EMO_([^_]+?)_([^]*?)_EMO_/g,vm=function(t){return t.charCodeAt(1)===45},wd=function(t){return t!=null&&typeof t!="boolean"},Ho=pm(function(e){return vm(e)?e:e.replace(xC,"-$&").toLowerCase()}),Sd=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(bC,function(r,s,o){return pt={name:s,styles:o,next:pt},s})}return vC[t]!==1&&!vm(t)&&typeof n=="number"&&n!==0?n+"px":n};function Er(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return pt={name:s.name,styles:s.styles,next:pt},s.name;var o=n;if(o.styles!==void 0){var i=o.next;if(i!==void 0)for(;i!==void 0;)pt={name:i.name,styles:i.styles,next:pt},i=i.next;var a=o.styles+";";return a}return wC(e,t,n)}case"function":{if(e!==void 0){var c=pt,l=n(e);return pt=c,Er(e,t,l)}break}}var u=n;if(t==null)return u;var h=t[u];return h!==void 0?h:u}function wC(e,t,n){var r="";if(Array.isArray(n))for(var s=0;s<n.length;s++)r+=Er(e,t,n[s])+";";else for(var o in n){var i=n[o];if(typeof i!="object"){var a=i;t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":wd(a)&&(r+=Ho(o)+":"+Sd(o,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var c=0;c<i.length;c++)wd(i[c])&&(r+=Ho(o)+":"+Sd(o,i[c])+";");else{var l=Er(e,t,i);switch(o){case"animation":case"animationName":{r+=Ho(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var Cd=/label:\s*([^\s;{]+)\s*(;|$)/g,pt;function xm(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,s="";pt=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,s+=Er(n,t,o);else{var i=o;s+=i[0]}for(var a=1;a<e.length;a++)if(s+=Er(n,t,e[a]),r){var c=o;s+=c[a]}Cd.lastIndex=0;for(var l="",u;(u=Cd.exec(s))!==null;)l+="-"+u[1];var h=yC(s)+l;return{name:h,styles:s,next:pt}}var SC=function(t){return t()},CC=m.useInsertionEffect?m.useInsertionEffect:!1,EC=CC||SC,bm=m.createContext(typeof HTMLElement<"u"?hC({key:"css"}):null);bm.Provider;var kC=function(t){return A.forwardRef(function(n,r){var s=A.useContext(bm);return t(n,s,r)})},TC=m.createContext({}),AC=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,PC=pm(function(e){return AC.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),MC=PC,RC=function(t){return t!=="theme"},Ed=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?MC:RC},kd=function(t,n,r){var s;if(n){var o=n.shouldForwardProp;s=t.__emotion_forwardProp&&o?function(i){return t.__emotion_forwardProp(i)&&o(i)}:o}return typeof s!="function"&&r&&(s=t.__emotion_forwardProp),s},NC=function(t){var n=t.cache,r=t.serialized,s=t.isStringTag;return ym(n,r,s),EC(function(){return gC(n,r,s)}),null},jC=function e(t,n){var r=t.__emotion_real===t,s=r&&t.__emotion_base||t,o,i;n!==void 0&&(o=n.label,i=n.target);var a=kd(t,n,r),c=a||Ed(s),l=!c("as");return function(){var u=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)h.push.apply(h,u);else{var p=u[0];h.push(p[0]);for(var g=u.length,y=1;y<g;y++)h.push(u[y],p[y])}var f=kC(function(v,w,b){var S=l&&v.as||s,C="",E=[],T=v;if(v.theme==null){T={};for(var k in v)T[k]=v[k];T.theme=m.useContext(TC)}typeof v.className=="string"?C=pC(w.registered,E,v.className):v.className!=null&&(C=v.className+" ");var P=xm(h.concat(E),w.registered,T);C+=w.key+"-"+P.name,i!==void 0&&(C+=" "+i);var $=l&&a===void 0?Ed(S):c,x={};for(var I in v)l&&I==="as"||$(I)&&(x[I]=v[I]);return x.className=C,b&&(x.ref=b),m.createElement(m.Fragment,null,m.createElement(NC,{cache:w,serialized:P,isStringTag:typeof S=="string"}),m.createElement(S,x))});return f.displayName=o!==void 0?o:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",f.defaultProps=t.defaultProps,f.__emotion_real=f,f.__emotion_base=s,f.__emotion_styles=h,f.__emotion_forwardProp=a,Object.defineProperty(f,"toString",{value:function(){return"."+i}}),f.withComponent=function(v,w){var b=e(v,Ni({},n,w,{shouldForwardProp:kd(f,w,!0)}));return b.apply(void 0,h)},f}},VC=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Ii=jC.bind(null);VC.forEach(function(e){Ii[e]=Ii(e)});/**
194
194
  * @mui/styled-engine v7.2.0
195
195
  *
196
196
  * @license MIT
197
197
  * This source code is licensed under the MIT license found in the
198
198
  * LICENSE file in the root directory of this source tree.
199
- */function RC(e,t){const n=Ii(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const s=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${s})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
200
- `)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${s})(...args) API requires all its args to be defined.`),n(...r)}:n}function VC(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Td=[];function on(e){return Td[0]=e,xm(Td)}const IC=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function DC(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...s}=e,o=IC(t),i=Object.keys(o);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function l(p,g){const y=i.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(y!==-1&&typeof t[i[y]]=="number"?t[i[y]]:g)-r/100}${n})`}function u(p){return i.indexOf(p)+1<i.length?l(p,i[i.indexOf(p)+1]):a(p)}function h(p){const g=i.indexOf(p);return g===0?a(i[1]):g===i.length-1?c(i[g]):l(p,i[i.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:i,values:o,up:a,down:c,between:l,only:u,not:h,unit:n,...s}}const OC={borderRadius:4};function wm(e=8,t=La({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(o=>{const i=t(o);return typeof i=="number"?`${i}px`:i}).join(" "));return n.mui=!0,n}function $C(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let s=n.getColorSchemeSelector(e);return s==="&"?t:((s.includes("data-")||s.includes("."))&&(s=`*:where(${s.replace(/\s*&$/,"")}) &`),{[s]:t})}return n.palette.mode===e?t:{}}function Sm(e={},...t){const{breakpoints:n={},palette:r={},spacing:s,shape:o={},...i}=e,a=DC(n),c=wm(s);let l=qe({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...OC,...o}},i);return l=YS(l),l.applyStyles=$C,l=t.reduce((u,h)=>qe(u,h),l),l.unstable_sxConfig={...Xs,...i==null?void 0:i.unstable_sxConfig},l.unstable_sx=function(h){return Bn({sx:h,theme:this})},l}const LC={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function za(e,t,n="Mui"){const r=LC[t];return r?`${n}-${r}`:`${RS.generate(e)}-${t}`}function _C(e,t,n="Mui"){const r={};return t.forEach(s=>{r[s]=za(e,s,n)}),r}function Cm(e,t=""){return e.displayName||e.name||t}function Ad(e,t,n){const r=Cm(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function FC(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Cm(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ks.ForwardRef:return Ad(e,e.render,"ForwardRef");case ks.Memo:return Ad(e,e.type,"memo");default:return}}}function Em(e){const{variants:t,...n}=e,r={variants:t,style:on(n),isProcessed:!0};return r.style===n||t&&t.forEach(s=>{typeof s.style!="function"&&(s.style=on(s.style))}),r}const BC=Sm();function zo(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function nn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function HC(e){return e?(t,n)=>n[e]:null}function zC(e,t,n){e.theme=KC(e.theme)?n:e.theme[t]||e.theme}function fs(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(s=>fs(e,s,n));if(Array.isArray(r==null?void 0:r.variants)){let s;if(r.isProcessed)s=n?nn(r.style,n):r.style;else{const{variants:o,...i}=r;s=n?nn(on(i),n):i}return km(e,r.variants,[s],n)}return r!=null&&r.isProcessed?n?nn(on(r.style),n):r.style:n?nn(on(r),n):r}function km(e,t,n=[],r=void 0){var o;let s;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(s??(s={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(s))continue}else for(const c in a.props)if(e[c]!==a.props[c]&&((o=e.ownerState)==null?void 0:o[c])!==a.props[c])continue e;typeof a.style=="function"?(s??(s={...e,...e.ownerState,ownerState:e.ownerState}),n.push(r?nn(on(a.style(s)),r):a.style(s))):n.push(r?nn(on(a.style),r):a.style)}return n}function UC(e={}){const{themeId:t,defaultTheme:n=BC,rootShouldForwardProp:r=zo,slotShouldForwardProp:s=zo}=e;function o(a){zC(a,t,n)}return(a,c={})=>{VC(a,T=>T.filter(k=>k!==Bn));const{name:l,slot:u,skipVariantsResolver:h,skipSx:p,overridesResolver:g=HC(Tm(u)),...y}=c,f=l&&l.startsWith("Mui")||u?"components":"custom",v=h!==void 0?h:u&&u!=="Root"&&u!=="root"||!1,w=p||!1;let b=zo;u==="Root"||u==="root"?b=r:u?b=s:YC(a)&&(b=void 0);const S=RC(a,{shouldForwardProp:b,label:ZC(l,u),...y}),C=T=>{if(T.__emotion_real===T)return T;if(typeof T=="function")return function(P){return fs(P,T,P.theme.modularCssLayers?f:void 0)};if(Pt(T)){const k=Em(T);return function($){return k.variants?fs($,k,$.theme.modularCssLayers?f:void 0):$.theme.modularCssLayers?nn(k.style,f):k.style}}return T},E=(...T)=>{const k=[],P=T.map(C),$=[];if(k.push(o),l&&g&&$.push(function(K){var U,M;const X=(M=(U=K.theme.components)==null?void 0:U[l])==null?void 0:M.styleOverrides;if(!X)return null;const G={};for(const q in X)G[q]=fs(K,X[q],K.theme.modularCssLayers?"theme":void 0);return g(K,G)}),l&&!v&&$.push(function(K){var G,U;const Y=K.theme,X=(U=(G=Y==null?void 0:Y.components)==null?void 0:G[l])==null?void 0:U.variants;return X?km(K,X,[],K.theme.modularCssLayers?"theme":void 0):null}),w||$.push(Bn),Array.isArray(P[0])){const _=P.shift(),K=new Array(k.length).fill(""),Y=new Array($.length).fill("");let X;X=[...K,..._,...Y],X.raw=[...K,..._.raw,...Y],k.unshift(X)}const x=[...k,...P,...$],I=S(...x);return a.muiName&&(I.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(I.displayName=WC(l,u,a)),I};return S.withConfig&&(E.withConfig=S.withConfig),E}}function WC(e,t,n){return e?`${e}${fn(t||"")}`:`Styled(${FC(n)})`}function ZC(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Tm(t||"Root")}`),n}function KC(e){for(const t in e)return!1;return!0}function YC(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Tm(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Di(e,t,n=!1){const r={...t};for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)){const o=s;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)r[o]=i||{};else if(!i)r[o]=a;else{r[o]={...a};for(const c in i)if(Object.prototype.hasOwnProperty.call(i,c)){const l=c;r[o][l]=Di(i[l],a[l],n)}}}else o==="className"&&n&&t.className?r.className=Bi(e==null?void 0:e.className,t==null?void 0:t.className):o==="style"&&n&&t.style?r.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:r[o]===void 0&&(r[o]=e[o])}return r}function GC(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Ua(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),GC(e,t,n)}function qC(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,s)=>s<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Ut(e){if(e.type)return e;if(e.charAt(0)==="#")return Ut(qC(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
199
+ */function IC(e,t){const n=Ii(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const s=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${s})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
200
+ `)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${s})(...args) API requires all its args to be defined.`),n(...r)}:n}function DC(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Td=[];function on(e){return Td[0]=e,xm(Td)}const OC=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function $C(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...s}=e,o=OC(t),i=Object.keys(o);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function c(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function l(p,g){const y=i.indexOf(g);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(y!==-1&&typeof t[i[y]]=="number"?t[i[y]]:g)-r/100}${n})`}function u(p){return i.indexOf(p)+1<i.length?l(p,i[i.indexOf(p)+1]):a(p)}function h(p){const g=i.indexOf(p);return g===0?a(i[1]):g===i.length-1?c(i[g]):l(p,i[i.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:i,values:o,up:a,down:c,between:l,only:u,not:h,unit:n,...s}}const LC={borderRadius:4};function wm(e=8,t=La({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(o=>{const i=t(o);return typeof i=="number"?`${i}px`:i}).join(" "));return n.mui=!0,n}function _C(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let s=n.getColorSchemeSelector(e);return s==="&"?t:((s.includes("data-")||s.includes("."))&&(s=`*:where(${s.replace(/\s*&$/,"")}) &`),{[s]:t})}return n.palette.mode===e?t:{}}function Sm(e={},...t){const{breakpoints:n={},palette:r={},spacing:s,shape:o={},...i}=e,a=$C(n),c=wm(s);let l=qe({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...LC,...o}},i);return l=qS(l),l.applyStyles=_C,l=t.reduce((u,h)=>qe(u,h),l),l.unstable_sxConfig={...Xs,...i==null?void 0:i.unstable_sxConfig},l.unstable_sx=function(h){return Bn({sx:h,theme:this})},l}const FC={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function za(e,t,n="Mui"){const r=FC[t];return r?`${n}-${r}`:`${IS.generate(e)}-${t}`}function BC(e,t,n="Mui"){const r={};return t.forEach(s=>{r[s]=za(e,s,n)}),r}function Cm(e,t=""){return e.displayName||e.name||t}function Ad(e,t,n){const r=Cm(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function HC(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Cm(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ks.ForwardRef:return Ad(e,e.render,"ForwardRef");case ks.Memo:return Ad(e,e.type,"memo");default:return}}}function Em(e){const{variants:t,...n}=e,r={variants:t,style:on(n),isProcessed:!0};return r.style===n||t&&t.forEach(s=>{typeof s.style!="function"&&(s.style=on(s.style))}),r}const zC=Sm();function zo(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function nn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function UC(e){return e?(t,n)=>n[e]:null}function WC(e,t,n){e.theme=GC(e.theme)?n:e.theme[t]||e.theme}function fs(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(s=>fs(e,s,n));if(Array.isArray(r==null?void 0:r.variants)){let s;if(r.isProcessed)s=n?nn(r.style,n):r.style;else{const{variants:o,...i}=r;s=n?nn(on(i),n):i}return km(e,r.variants,[s],n)}return r!=null&&r.isProcessed?n?nn(on(r.style),n):r.style:n?nn(on(r),n):r}function km(e,t,n=[],r=void 0){var o;let s;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(s??(s={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(s))continue}else for(const c in a.props)if(e[c]!==a.props[c]&&((o=e.ownerState)==null?void 0:o[c])!==a.props[c])continue e;typeof a.style=="function"?(s??(s={...e,...e.ownerState,ownerState:e.ownerState}),n.push(r?nn(on(a.style(s)),r):a.style(s))):n.push(r?nn(on(a.style),r):a.style)}return n}function ZC(e={}){const{themeId:t,defaultTheme:n=zC,rootShouldForwardProp:r=zo,slotShouldForwardProp:s=zo}=e;function o(a){WC(a,t,n)}return(a,c={})=>{DC(a,T=>T.filter(k=>k!==Bn));const{name:l,slot:u,skipVariantsResolver:h,skipSx:p,overridesResolver:g=UC(Tm(u)),...y}=c,f=l&&l.startsWith("Mui")||u?"components":"custom",v=h!==void 0?h:u&&u!=="Root"&&u!=="root"||!1,w=p||!1;let b=zo;u==="Root"||u==="root"?b=r:u?b=s:qC(a)&&(b=void 0);const S=IC(a,{shouldForwardProp:b,label:YC(l,u),...y}),C=T=>{if(T.__emotion_real===T)return T;if(typeof T=="function")return function(P){return fs(P,T,P.theme.modularCssLayers?f:void 0)};if(Pt(T)){const k=Em(T);return function($){return k.variants?fs($,k,$.theme.modularCssLayers?f:void 0):$.theme.modularCssLayers?nn(k.style,f):k.style}}return T},E=(...T)=>{const k=[],P=T.map(C),$=[];if(k.push(o),l&&g&&$.push(function(K){var U,M;const X=(M=(U=K.theme.components)==null?void 0:U[l])==null?void 0:M.styleOverrides;if(!X)return null;const G={};for(const q in X)G[q]=fs(K,X[q],K.theme.modularCssLayers?"theme":void 0);return g(K,G)}),l&&!v&&$.push(function(K){var G,U;const Y=K.theme,X=(U=(G=Y==null?void 0:Y.components)==null?void 0:G[l])==null?void 0:U.variants;return X?km(K,X,[],K.theme.modularCssLayers?"theme":void 0):null}),w||$.push(Bn),Array.isArray(P[0])){const _=P.shift(),K=new Array(k.length).fill(""),Y=new Array($.length).fill("");let X;X=[...K,..._,...Y],X.raw=[...K,..._.raw,...Y],k.unshift(X)}const x=[...k,...P,...$],I=S(...x);return a.muiName&&(I.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(I.displayName=KC(l,u,a)),I};return S.withConfig&&(E.withConfig=S.withConfig),E}}function KC(e,t,n){return e?`${e}${fn(t||"")}`:`Styled(${HC(n)})`}function YC(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Tm(t||"Root")}`),n}function GC(e){for(const t in e)return!1;return!0}function qC(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Tm(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Di(e,t,n=!1){const r={...t};for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)){const o=s;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)r[o]=i||{};else if(!i)r[o]=a;else{r[o]={...a};for(const c in i)if(Object.prototype.hasOwnProperty.call(i,c)){const l=c;r[o][l]=Di(i[l],a[l],n)}}}else o==="className"&&n&&t.className?r.className=Bi(e==null?void 0:e.className,t==null?void 0:t.className):o==="style"&&n&&t.style?r.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:r[o]===void 0&&(r[o]=e[o])}return r}function XC(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Ua(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),XC(e,t,n)}function JC(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,s)=>s<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Ut(e){if(e.type)return e;if(e.charAt(0)==="#")return Ut(JC(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
201
201
  The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:zt(9,e));let r=e.substring(t+1,e.length-1),s;if(n==="color"){if(r=r.split(" "),s=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(s))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${s}\` color space.
202
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:zt(10,s))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:s}}const XC=e=>{const t=Ut(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},ir=(e,t)=>{try{return XC(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function to(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((s,o)=>o<3?parseInt(s,10):s):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Am(e){e=Ut(e);const{values:t}=e,n=t[0],r=t[1]/100,s=t[2]/100,o=r*Math.min(s,1-s),i=(l,u=(l+n/30)%12)=>s-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const c=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(a+="a",c.push(t[3])),to({type:a,values:c})}function Oi(e){e=Ut(e);let t=e.type==="hsl"||e.type==="hsla"?Ut(Am(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Pd(e,t){const n=Oi(e),r=Oi(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function JC(e,t){return e=Ut(e),t=Ua(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,to(e)}function Qr(e,t,n){try{return JC(e,t)}catch{return e}}function Wa(e,t){if(e=Ut(e),t=Ua(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return to(e)}function ye(e,t,n){try{return Wa(e,t)}catch{return e}}function Za(e,t){if(e=Ut(e),t=Ua(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return to(e)}function ve(e,t,n){try{return Za(e,t)}catch{return e}}function QC(e,t=.15){return Oi(e)>.5?Wa(e,t):Za(e,t)}function es(e,t,n){try{return QC(e,t)}catch{return e}}const e8=m.createContext(void 0);process.env.NODE_ENV!=="production"&&(ce.node,ce.object);function t8(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const s=t.components[n];return s.defaultProps?Di(s.defaultProps,r,t.components.mergeClassNameAndStyle):!s.styleOverrides&&!s.variants?Di(s,r,t.components.mergeClassNameAndStyle):r}function n8({props:e,name:t}){const n=m.useContext(e8);return t8({props:e,name:t,theme:{components:n}})}const Md={theme:void 0};function r8(e){let t,n;return function(s){let o=t;return(o===void 0||s.theme!==n)&&(Md.theme=s.theme,o=Em(e(Md)),t=o,n=s.theme),o}}function s8(e=""){function t(...r){if(!r.length)return"";const s=r[0];return typeof s=="string"&&!s.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${s}${t(...r.slice(1))})`:`, ${s}`}return(r,...s)=>`var(--${e?`${e}-`:""}${r}${t(...s)})`}const Nd=(e,t,n,r=[])=>{let s=e;t.forEach((o,i)=>{i===t.length-1?Array.isArray(s)?s[Number(o)]=n:s&&typeof s=="object"&&(s[o]=n):s&&typeof s=="object"&&(s[o]||(s[o]=r.includes(o)?[]:{}),s=s[o])})},o8=(e,t,n)=>{function r(s,o=[],i=[]){Object.entries(s).forEach(([a,c])=>{(!n||n&&!n([...o,a]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,a],Array.isArray(c)?[...i,a]:i):t([...o,a],c,i))})}r(e)},i8=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Uo(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},s={},o={},i={};return o8(e,(a,c,l)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(a,c))){const u=`--${n?`${n}-`:""}${a.join("-")}`,h=i8(a,c);Object.assign(s,{[u]:h}),Nd(o,a,`var(${u})`,l),Nd(i,a,`var(${u}, ${h})`,l)}},a=>a[0]==="vars"),{css:s,vars:o,varsWithDefaults:i}}function a8(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:s}=t,{colorSchemes:o={},components:i,defaultColorScheme:a="light",...c}=e,{vars:l,css:u,varsWithDefaults:h}=Uo(c,t);let p=h;const g={},{[a]:y,...f}=o;if(Object.entries(f||{}).forEach(([S,C])=>{const{vars:E,css:T,varsWithDefaults:k}=Uo(C,t);p=qe(p,k),g[S]={css:T,vars:E}}),y){const{css:S,vars:C,varsWithDefaults:E}=Uo(y,t);p=qe(p,E),g[a]={css:S,vars:C}}function v(S,C){var T,k;let E=s;if(s==="class"&&(E=".%s"),s==="data"&&(E="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(E=`[${s}="%s"]`),S){if(E==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((k=(T=o[S])==null?void 0:T.palette)==null?void 0:k.mode)||S})`]:{":root":C}};if(E)return e.defaultColorScheme===S?`:root, ${E.replace("%s",String(S))}`:E.replace("%s",String(S))}return":root"}return{vars:p,generateThemeVars:()=>{let S={...l};return Object.entries(g).forEach(([,{vars:C}])=>{S=qe(S,C)}),S},generateStyleSheets:()=>{var P,$;const S=[],C=e.defaultColorScheme||"light";function E(x,I){Object.keys(I).length&&S.push(typeof x=="string"?{[x]:{...I}}:x)}E(n(void 0,{...u}),u);const{[C]:T,...k}=g;if(T){const{css:x}=T,I=($=(P=o[C])==null?void 0:P.palette)==null?void 0:$.mode,_=!r&&I?{colorScheme:I,...x}:{...x};E(n(C,{..._}),_)}return Object.entries(k).forEach(([x,{css:I}])=>{var Y,X;const _=(X=(Y=o[x])==null?void 0:Y.palette)==null?void 0:X.mode,K=!r&&_?{colorScheme:_,...I}:{...I};E(n(x,{...K}),K)}),S}}}function c8(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const kr={black:"#000",white:"#fff"},l8={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},xn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},bn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},rr={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},wn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Sn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Cn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Pm(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:kr.white,default:kr.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const d8=Pm();function Mm(){return{text:{primary:kr.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:kr.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const jd=Mm();function Rd(e,t,n,r){const s=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Za(e.main,s):t==="dark"&&(e.dark=Wa(e.main,o)))}function u8(e="light"){return e==="dark"?{main:wn[200],light:wn[50],dark:wn[400]}:{main:wn[700],light:wn[400],dark:wn[800]}}function f8(e="light"){return e==="dark"?{main:xn[200],light:xn[50],dark:xn[400]}:{main:xn[500],light:xn[300],dark:xn[700]}}function h8(e="light"){return e==="dark"?{main:bn[500],light:bn[300],dark:bn[700]}:{main:bn[700],light:bn[400],dark:bn[800]}}function m8(e="light"){return e==="dark"?{main:Sn[400],light:Sn[300],dark:Sn[700]}:{main:Sn[700],light:Sn[500],dark:Sn[900]}}function p8(e="light"){return e==="dark"?{main:Cn[400],light:Cn[300],dark:Cn[700]}:{main:Cn[800],light:Cn[500],dark:Cn[900]}}function g8(e="light"){return e==="dark"?{main:rr[400],light:rr[300],dark:rr[700]}:{main:"#ed6c02",light:rr[500],dark:rr[900]}}function Ka(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...s}=e,o=e.primary||u8(t),i=e.secondary||f8(t),a=e.error||h8(t),c=e.info||m8(t),l=e.success||p8(t),u=e.warning||g8(t);function h(f){const v=Pd(f,jd.text.primary)>=n?jd.text.primary:d8.text.primary;if(process.env.NODE_ENV!=="production"){const w=Pd(f,v);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${v} on ${f}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
202
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:zt(10,s))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:s}}const QC=e=>{const t=Ut(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},ir=(e,t)=>{try{return QC(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function to(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((s,o)=>o<3?parseInt(s,10):s):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Am(e){e=Ut(e);const{values:t}=e,n=t[0],r=t[1]/100,s=t[2]/100,o=r*Math.min(s,1-s),i=(l,u=(l+n/30)%12)=>s-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const c=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(a+="a",c.push(t[3])),to({type:a,values:c})}function Oi(e){e=Ut(e);let t=e.type==="hsl"||e.type==="hsla"?Ut(Am(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Pd(e,t){const n=Oi(e),r=Oi(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function e8(e,t){return e=Ut(e),t=Ua(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,to(e)}function Qr(e,t,n){try{return e8(e,t)}catch{return e}}function Wa(e,t){if(e=Ut(e),t=Ua(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return to(e)}function ye(e,t,n){try{return Wa(e,t)}catch{return e}}function Za(e,t){if(e=Ut(e),t=Ua(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return to(e)}function ve(e,t,n){try{return Za(e,t)}catch{return e}}function t8(e,t=.15){return Oi(e)>.5?Wa(e,t):Za(e,t)}function es(e,t,n){try{return t8(e,t)}catch{return e}}const n8=m.createContext(void 0);process.env.NODE_ENV!=="production"&&(ce.node,ce.object);function r8(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const s=t.components[n];return s.defaultProps?Di(s.defaultProps,r,t.components.mergeClassNameAndStyle):!s.styleOverrides&&!s.variants?Di(s,r,t.components.mergeClassNameAndStyle):r}function s8({props:e,name:t}){const n=m.useContext(n8);return r8({props:e,name:t,theme:{components:n}})}const Md={theme:void 0};function o8(e){let t,n;return function(s){let o=t;return(o===void 0||s.theme!==n)&&(Md.theme=s.theme,o=Em(e(Md)),t=o,n=s.theme),o}}function i8(e=""){function t(...r){if(!r.length)return"";const s=r[0];return typeof s=="string"&&!s.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${s}${t(...r.slice(1))})`:`, ${s}`}return(r,...s)=>`var(--${e?`${e}-`:""}${r}${t(...s)})`}const Rd=(e,t,n,r=[])=>{let s=e;t.forEach((o,i)=>{i===t.length-1?Array.isArray(s)?s[Number(o)]=n:s&&typeof s=="object"&&(s[o]=n):s&&typeof s=="object"&&(s[o]||(s[o]=r.includes(o)?[]:{}),s=s[o])})},a8=(e,t,n)=>{function r(s,o=[],i=[]){Object.entries(s).forEach(([a,c])=>{(!n||n&&!n([...o,a]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,a],Array.isArray(c)?[...i,a]:i):t([...o,a],c,i))})}r(e)},c8=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Uo(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},s={},o={},i={};return a8(e,(a,c,l)=>{if((typeof c=="string"||typeof c=="number")&&(!r||!r(a,c))){const u=`--${n?`${n}-`:""}${a.join("-")}`,h=c8(a,c);Object.assign(s,{[u]:h}),Rd(o,a,`var(${u})`,l),Rd(i,a,`var(${u}, ${h})`,l)}},a=>a[0]==="vars"),{css:s,vars:o,varsWithDefaults:i}}function l8(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:s}=t,{colorSchemes:o={},components:i,defaultColorScheme:a="light",...c}=e,{vars:l,css:u,varsWithDefaults:h}=Uo(c,t);let p=h;const g={},{[a]:y,...f}=o;if(Object.entries(f||{}).forEach(([S,C])=>{const{vars:E,css:T,varsWithDefaults:k}=Uo(C,t);p=qe(p,k),g[S]={css:T,vars:E}}),y){const{css:S,vars:C,varsWithDefaults:E}=Uo(y,t);p=qe(p,E),g[a]={css:S,vars:C}}function v(S,C){var T,k;let E=s;if(s==="class"&&(E=".%s"),s==="data"&&(E="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(E=`[${s}="%s"]`),S){if(E==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((k=(T=o[S])==null?void 0:T.palette)==null?void 0:k.mode)||S})`]:{":root":C}};if(E)return e.defaultColorScheme===S?`:root, ${E.replace("%s",String(S))}`:E.replace("%s",String(S))}return":root"}return{vars:p,generateThemeVars:()=>{let S={...l};return Object.entries(g).forEach(([,{vars:C}])=>{S=qe(S,C)}),S},generateStyleSheets:()=>{var P,$;const S=[],C=e.defaultColorScheme||"light";function E(x,I){Object.keys(I).length&&S.push(typeof x=="string"?{[x]:{...I}}:x)}E(n(void 0,{...u}),u);const{[C]:T,...k}=g;if(T){const{css:x}=T,I=($=(P=o[C])==null?void 0:P.palette)==null?void 0:$.mode,_=!r&&I?{colorScheme:I,...x}:{...x};E(n(C,{..._}),_)}return Object.entries(k).forEach(([x,{css:I}])=>{var Y,X;const _=(X=(Y=o[x])==null?void 0:Y.palette)==null?void 0:X.mode,K=!r&&_?{colorScheme:_,...I}:{...I};E(n(x,{...K}),K)}),S}}}function d8(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const kr={black:"#000",white:"#fff"},u8={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},xn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},bn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},rr={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},wn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Sn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Cn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Pm(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:kr.white,default:kr.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const f8=Pm();function Mm(){return{text:{primary:kr.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:kr.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Nd=Mm();function jd(e,t,n,r){const s=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Za(e.main,s):t==="dark"&&(e.dark=Wa(e.main,o)))}function h8(e="light"){return e==="dark"?{main:wn[200],light:wn[50],dark:wn[400]}:{main:wn[700],light:wn[400],dark:wn[800]}}function m8(e="light"){return e==="dark"?{main:xn[200],light:xn[50],dark:xn[400]}:{main:xn[500],light:xn[300],dark:xn[700]}}function p8(e="light"){return e==="dark"?{main:bn[500],light:bn[300],dark:bn[700]}:{main:bn[700],light:bn[400],dark:bn[800]}}function g8(e="light"){return e==="dark"?{main:Sn[400],light:Sn[300],dark:Sn[700]}:{main:Sn[700],light:Sn[500],dark:Sn[900]}}function y8(e="light"){return e==="dark"?{main:Cn[400],light:Cn[300],dark:Cn[700]}:{main:Cn[800],light:Cn[500],dark:Cn[900]}}function v8(e="light"){return e==="dark"?{main:rr[400],light:rr[300],dark:rr[700]}:{main:"#ed6c02",light:rr[500],dark:rr[900]}}function Ka(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...s}=e,o=e.primary||h8(t),i=e.secondary||m8(t),a=e.error||p8(t),c=e.info||g8(t),l=e.success||y8(t),u=e.warning||v8(t);function h(f){const v=Pd(f,Nd.text.primary)>=n?Nd.text.primary:f8.text.primary;if(process.env.NODE_ENV!=="production"){const w=Pd(f,v);w<3&&console.error([`MUI: The contrast ratio of ${w}:1 for ${v} on ${f}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
203
203
  `))}return v}const p=({color:f,name:v,mainShade:w=500,lightShade:b=300,darkShade:S=700})=>{if(f={...f},!f.main&&f[w]&&(f.main=f[w]),!f.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
204
204
  The color object needs to have a \`main\` property or a \`${w}\` property.`:zt(11,v?` (${v})`:"",w));if(typeof f.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
205
205
  \`color.main\` should be a string, but \`${JSON.stringify(f.main)}\` was provided instead.
@@ -214,40 +214,40 @@ const theme1 = createTheme({ palette: {
214
214
 
215
215
  const theme2 = createTheme({ palette: {
216
216
  primary: { main: green[500] },
217
- } });`:zt(12,v?` (${v})`:"",JSON.stringify(f.main)));return Rd(f,"light",b,r),Rd(f,"dark",S,r),f.contrastText||(f.contrastText=h(f.main)),f};let g;return t==="light"?g=Pm():t==="dark"&&(g=Mm()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),qe({common:{...kr},mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:l,name:"success"}),grey:l8,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r,...g},s)}function y8(e){const t={};return Object.entries(e).forEach(r=>{const[s,o]=r;typeof o=="object"&&(t[s]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function v8(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function x8(e){return Math.round(e*1e5)/1e5}const Vd={textTransform:"uppercase"},Id='"Roboto", "Helvetica", "Arial", sans-serif';function b8(e,t){const{fontFamily:n=Id,fontSize:r=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...h}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,g=u||(v=>`${v/c*p}rem`),y=(v,w,b,S,C)=>({fontFamily:n,fontWeight:v,fontSize:g(w),lineHeight:b,...n===Id?{letterSpacing:`${x8(S/w)}em`}:{},...C,...l}),f={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(o,48,1.167,0),h4:y(o,34,1.235,.25),h5:y(o,24,1.334,0),h6:y(i,20,1.6,.15),subtitle1:y(o,16,1.75,.15),subtitle2:y(i,14,1.57,.1),body1:y(o,16,1.5,.15),body2:y(o,14,1.43,.15),button:y(i,14,1.75,.4,Vd),caption:y(o,12,1.66,.4),overline:y(o,12,2.66,1,Vd),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return qe({htmlFontSize:c,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:i,fontWeightBold:a,...f},h,{clone:!1})}const w8=.2,S8=.14,C8=.12;function xe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${w8})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${S8})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${C8})`].join(",")}const E8=["none",xe(0,2,1,-1,0,1,1,0,0,1,3,0),xe(0,3,1,-2,0,2,2,0,0,1,5,0),xe(0,3,3,-2,0,3,4,0,0,1,8,0),xe(0,2,4,-1,0,4,5,0,0,1,10,0),xe(0,3,5,-1,0,5,8,0,0,1,14,0),xe(0,3,5,-1,0,6,10,0,0,1,18,0),xe(0,4,5,-2,0,7,10,1,0,2,16,1),xe(0,5,5,-3,0,8,10,1,0,3,14,2),xe(0,5,6,-3,0,9,12,1,0,3,16,2),xe(0,6,6,-3,0,10,14,1,0,4,18,3),xe(0,6,7,-4,0,11,15,1,0,4,20,3),xe(0,7,8,-4,0,12,17,2,0,5,22,4),xe(0,7,8,-4,0,13,19,2,0,5,24,4),xe(0,7,9,-4,0,14,21,2,0,5,26,4),xe(0,8,9,-5,0,15,22,2,0,6,28,5),xe(0,8,10,-5,0,16,24,2,0,6,30,5),xe(0,8,11,-5,0,17,26,2,0,6,32,5),xe(0,9,11,-5,0,18,28,2,0,7,34,6),xe(0,9,12,-6,0,19,29,2,0,7,36,6),xe(0,10,13,-6,0,20,31,3,0,8,38,7),xe(0,10,13,-6,0,21,33,3,0,8,40,7),xe(0,10,14,-6,0,22,35,3,0,8,42,7),xe(0,11,14,-7,0,23,36,3,0,9,44,8),xe(0,11,15,-7,0,24,38,3,0,9,46,8)],k8={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},T8={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Dd(e){return`${Math.round(e)}ms`}function A8(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function P8(e){const t={...k8,...e.easing},n={...T8,...e.duration};return{getAutoHeightDuration:A8,create:(s=["all"],o={})=>{const{duration:i=n.standard,easing:a=t.easeInOut,delay:c=0,...l}=o;if(process.env.NODE_ENV!=="production"){const u=p=>typeof p=="string",h=p=>!Number.isNaN(parseFloat(p));!u(s)&&!Array.isArray(s)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(i)&&!u(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),u(a)||console.error('MUI: Argument "easing" must be a string.'),!h(c)&&!u(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
218
- `)),Object.keys(l).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(l).join(",")}].`)}return(Array.isArray(s)?s:[s]).map(u=>`${u} ${typeof i=="string"?i:Dd(i)} ${a} ${typeof c=="string"?c:Dd(c)}`).join(",")},...e,easing:t,duration:n}}const M8={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function N8(e){return Pt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Nm(e={}){const t={...e};function n(r){const s=Object.entries(r);for(let o=0;o<s.length;o++){const[i,a]=s[o];!N8(a)||i.startsWith("unstable_")?delete r[i]:Pt(a)&&(r[i]={...a},n(r[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
217
+ } });`:zt(12,v?` (${v})`:"",JSON.stringify(f.main)));return jd(f,"light",b,r),jd(f,"dark",S,r),f.contrastText||(f.contrastText=h(f.main)),f};let g;return t==="light"?g=Pm():t==="dark"&&(g=Mm()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),qe({common:{...kr},mode:t,primary:p({color:o,name:"primary"}),secondary:p({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:a,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:l,name:"success"}),grey:u8,contrastThreshold:n,getContrastText:h,augmentColor:p,tonalOffset:r,...g},s)}function x8(e){const t={};return Object.entries(e).forEach(r=>{const[s,o]=r;typeof o=="object"&&(t[s]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function b8(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function w8(e){return Math.round(e*1e5)/1e5}const Vd={textTransform:"uppercase"},Id='"Roboto", "Helvetica", "Arial", sans-serif';function S8(e,t){const{fontFamily:n=Id,fontSize:r=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...h}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,g=u||(v=>`${v/c*p}rem`),y=(v,w,b,S,C)=>({fontFamily:n,fontWeight:v,fontSize:g(w),lineHeight:b,...n===Id?{letterSpacing:`${w8(S/w)}em`}:{},...C,...l}),f={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(o,48,1.167,0),h4:y(o,34,1.235,.25),h5:y(o,24,1.334,0),h6:y(i,20,1.6,.15),subtitle1:y(o,16,1.75,.15),subtitle2:y(i,14,1.57,.1),body1:y(o,16,1.5,.15),body2:y(o,14,1.43,.15),button:y(i,14,1.75,.4,Vd),caption:y(o,12,1.66,.4),overline:y(o,12,2.66,1,Vd),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return qe({htmlFontSize:c,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:i,fontWeightBold:a,...f},h,{clone:!1})}const C8=.2,E8=.14,k8=.12;function xe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${C8})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${E8})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${k8})`].join(",")}const T8=["none",xe(0,2,1,-1,0,1,1,0,0,1,3,0),xe(0,3,1,-2,0,2,2,0,0,1,5,0),xe(0,3,3,-2,0,3,4,0,0,1,8,0),xe(0,2,4,-1,0,4,5,0,0,1,10,0),xe(0,3,5,-1,0,5,8,0,0,1,14,0),xe(0,3,5,-1,0,6,10,0,0,1,18,0),xe(0,4,5,-2,0,7,10,1,0,2,16,1),xe(0,5,5,-3,0,8,10,1,0,3,14,2),xe(0,5,6,-3,0,9,12,1,0,3,16,2),xe(0,6,6,-3,0,10,14,1,0,4,18,3),xe(0,6,7,-4,0,11,15,1,0,4,20,3),xe(0,7,8,-4,0,12,17,2,0,5,22,4),xe(0,7,8,-4,0,13,19,2,0,5,24,4),xe(0,7,9,-4,0,14,21,2,0,5,26,4),xe(0,8,9,-5,0,15,22,2,0,6,28,5),xe(0,8,10,-5,0,16,24,2,0,6,30,5),xe(0,8,11,-5,0,17,26,2,0,6,32,5),xe(0,9,11,-5,0,18,28,2,0,7,34,6),xe(0,9,12,-6,0,19,29,2,0,7,36,6),xe(0,10,13,-6,0,20,31,3,0,8,38,7),xe(0,10,13,-6,0,21,33,3,0,8,40,7),xe(0,10,14,-6,0,22,35,3,0,8,42,7),xe(0,11,14,-7,0,23,36,3,0,9,44,8),xe(0,11,15,-7,0,24,38,3,0,9,46,8)],A8={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},P8={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Dd(e){return`${Math.round(e)}ms`}function M8(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function R8(e){const t={...A8,...e.easing},n={...P8,...e.duration};return{getAutoHeightDuration:M8,create:(s=["all"],o={})=>{const{duration:i=n.standard,easing:a=t.easeInOut,delay:c=0,...l}=o;if(process.env.NODE_ENV!=="production"){const u=p=>typeof p=="string",h=p=>!Number.isNaN(parseFloat(p));!u(s)&&!Array.isArray(s)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(i)&&!u(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),u(a)||console.error('MUI: Argument "easing" must be a string.'),!h(c)&&!u(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
218
+ `)),Object.keys(l).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(l).join(",")}].`)}return(Array.isArray(s)?s:[s]).map(u=>`${u} ${typeof i=="string"?i:Dd(i)} ${a} ${typeof c=="string"?c:Dd(c)}`).join(",")},...e,easing:t,duration:n}}const N8={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function j8(e){return Pt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Rm(e={}){const t={...e};function n(r){const s=Object.entries(r);for(let o=0;o<s.length;o++){const[i,a]=s[o];!j8(a)||i.startsWith("unstable_")?delete r[i]:Pt(a)&&(r[i]={...a},n(r[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
219
219
 
220
220
  const theme = ${JSON.stringify(t,null,2)};
221
221
 
222
222
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
223
223
  theme.transitions = createTransitions(theme.transitions || {});
224
224
 
225
- export default theme;`}function $i(e={},...t){const{breakpoints:n,mixins:r={},spacing:s,palette:o={},transitions:i={},typography:a={},shape:c,...l}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":zt(20));const u=Ka(o),h=Sm(e);let p=qe(h,{mixins:v8(h.breakpoints,r),palette:u,shadows:E8.slice(),typography:b8(u,a),transitions:P8(i),zIndex:{...M8}});if(p=qe(p,l),p=t.reduce((g,y)=>qe(g,y),p),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],y=(f,v)=>{let w;for(w in f){const b=f[w];if(g.includes(w)&&Object.keys(b).length>0){if(process.env.NODE_ENV!=="production"){const S=za("",w);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${w}\` internal state.`,"You can not override it like this: ",JSON.stringify(f,null,2),"",`Instead, you need to use the '&.${S}' syntax:`,JSON.stringify({root:{[`&.${S}`]:b}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
226
- `))}f[w]={}}}};Object.keys(p.components).forEach(f=>{const v=p.components[f].styleOverrides;v&&f.startsWith("Mui")&&y(v,f)})}return p.unstable_sxConfig={...Xs,...l==null?void 0:l.unstable_sxConfig},p.unstable_sx=function(y){return Bn({sx:y,theme:this})},p.toRuntimeSource=Nm,p}function j8(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const R8=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=j8(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function jm(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Rm(e){return e==="dark"?R8:[]}function V8(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...s}=e,o=Ka(t);return{palette:o,opacity:{...jm(o.mode),...n},overlays:r||Rm(o.mode),...s}}function I8(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const D8=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],O8=e=>(t,n)=>{const r=e.rootSelector||":root",s=e.colorSchemeSelector;let o=s;if(s==="class"&&(o=".%s"),s==="data"&&(o="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(o=`[${s}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return D8(e.cssVarPrefix).forEach(a=>{i[a]=n[a],delete n[a]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:o?{[o.replace("%s",t)]:i,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:{...n,...i}}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function $8(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function D(e,t,n){!e[t]&&n&&(e[t]=n)}function ar(e){return typeof e!="string"||!e.startsWith("hsl")?e:Am(e)}function At(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ir(ar(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
227
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function L8(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ht=e=>{try{return e()}catch{}},_8=(e="mui")=>s8(e);function Wo(e,t,n,r){if(!t)return;t=t===!0?{}:t;const s=r==="dark"?"dark":"light";if(!n){e[r]=V8({...t,palette:{mode:s,...t==null?void 0:t.palette}});return}const{palette:o,...i}=$i({...n,palette:{mode:s,...t==null?void 0:t.palette}});return e[r]={...t,palette:o,opacity:{...jm(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Rm(s)},i}function F8(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:s=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:i=I8,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...l}=e,u=Object.keys(n)[0],h=r||(n.light&&u!=="light"?"light":u),p=_8(o),{[h]:g,light:y,dark:f,...v}=n,w={...v};let b=g;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(b=!0),!b)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${h}\` option is either missing or invalid.`:zt(21,h));const S=Wo(w,b,l,h);y&&!w.light&&Wo(w,y,void 0,"light"),f&&!w.dark&&Wo(w,f,void 0,"dark");let C={defaultColorScheme:h,...S,cssVarPrefix:o,colorSchemeSelector:a,rootSelector:c,getCssVar:p,colorSchemes:w,font:{...y8(S.typography),...S.font},spacing:L8(l.spacing)};Object.keys(C.colorSchemes).forEach($=>{const x=C.colorSchemes[$].palette,I=_=>{const K=_.split("-"),Y=K[1],X=K[2];return p(_,x[Y][X])};if(x.mode==="light"&&(D(x.common,"background","#fff"),D(x.common,"onBackground","#000")),x.mode==="dark"&&(D(x.common,"background","#000"),D(x.common,"onBackground","#fff")),$8(x,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),x.mode==="light"){D(x.Alert,"errorColor",ye(x.error.light,.6)),D(x.Alert,"infoColor",ye(x.info.light,.6)),D(x.Alert,"successColor",ye(x.success.light,.6)),D(x.Alert,"warningColor",ye(x.warning.light,.6)),D(x.Alert,"errorFilledBg",I("palette-error-main")),D(x.Alert,"infoFilledBg",I("palette-info-main")),D(x.Alert,"successFilledBg",I("palette-success-main")),D(x.Alert,"warningFilledBg",I("palette-warning-main")),D(x.Alert,"errorFilledColor",ht(()=>x.getContrastText(x.error.main))),D(x.Alert,"infoFilledColor",ht(()=>x.getContrastText(x.info.main))),D(x.Alert,"successFilledColor",ht(()=>x.getContrastText(x.success.main))),D(x.Alert,"warningFilledColor",ht(()=>x.getContrastText(x.warning.main))),D(x.Alert,"errorStandardBg",ve(x.error.light,.9)),D(x.Alert,"infoStandardBg",ve(x.info.light,.9)),D(x.Alert,"successStandardBg",ve(x.success.light,.9)),D(x.Alert,"warningStandardBg",ve(x.warning.light,.9)),D(x.Alert,"errorIconColor",I("palette-error-main")),D(x.Alert,"infoIconColor",I("palette-info-main")),D(x.Alert,"successIconColor",I("palette-success-main")),D(x.Alert,"warningIconColor",I("palette-warning-main")),D(x.AppBar,"defaultBg",I("palette-grey-100")),D(x.Avatar,"defaultBg",I("palette-grey-400")),D(x.Button,"inheritContainedBg",I("palette-grey-300")),D(x.Button,"inheritContainedHoverBg",I("palette-grey-A100")),D(x.Chip,"defaultBorder",I("palette-grey-400")),D(x.Chip,"defaultAvatarColor",I("palette-grey-700")),D(x.Chip,"defaultIconColor",I("palette-grey-700")),D(x.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),D(x.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),D(x.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),D(x.LinearProgress,"primaryBg",ve(x.primary.main,.62)),D(x.LinearProgress,"secondaryBg",ve(x.secondary.main,.62)),D(x.LinearProgress,"errorBg",ve(x.error.main,.62)),D(x.LinearProgress,"infoBg",ve(x.info.main,.62)),D(x.LinearProgress,"successBg",ve(x.success.main,.62)),D(x.LinearProgress,"warningBg",ve(x.warning.main,.62)),D(x.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.11)`),D(x.Slider,"primaryTrack",ve(x.primary.main,.62)),D(x.Slider,"secondaryTrack",ve(x.secondary.main,.62)),D(x.Slider,"errorTrack",ve(x.error.main,.62)),D(x.Slider,"infoTrack",ve(x.info.main,.62)),D(x.Slider,"successTrack",ve(x.success.main,.62)),D(x.Slider,"warningTrack",ve(x.warning.main,.62));const _=es(x.background.default,.8);D(x.SnackbarContent,"bg",_),D(x.SnackbarContent,"color",ht(()=>x.getContrastText(_))),D(x.SpeedDialAction,"fabHoverBg",es(x.background.paper,.15)),D(x.StepConnector,"border",I("palette-grey-400")),D(x.StepContent,"border",I("palette-grey-400")),D(x.Switch,"defaultColor",I("palette-common-white")),D(x.Switch,"defaultDisabledColor",I("palette-grey-100")),D(x.Switch,"primaryDisabledColor",ve(x.primary.main,.62)),D(x.Switch,"secondaryDisabledColor",ve(x.secondary.main,.62)),D(x.Switch,"errorDisabledColor",ve(x.error.main,.62)),D(x.Switch,"infoDisabledColor",ve(x.info.main,.62)),D(x.Switch,"successDisabledColor",ve(x.success.main,.62)),D(x.Switch,"warningDisabledColor",ve(x.warning.main,.62)),D(x.TableCell,"border",ve(Qr(x.divider,1),.88)),D(x.Tooltip,"bg",Qr(x.grey[700],.92))}if(x.mode==="dark"){D(x.Alert,"errorColor",ve(x.error.light,.6)),D(x.Alert,"infoColor",ve(x.info.light,.6)),D(x.Alert,"successColor",ve(x.success.light,.6)),D(x.Alert,"warningColor",ve(x.warning.light,.6)),D(x.Alert,"errorFilledBg",I("palette-error-dark")),D(x.Alert,"infoFilledBg",I("palette-info-dark")),D(x.Alert,"successFilledBg",I("palette-success-dark")),D(x.Alert,"warningFilledBg",I("palette-warning-dark")),D(x.Alert,"errorFilledColor",ht(()=>x.getContrastText(x.error.dark))),D(x.Alert,"infoFilledColor",ht(()=>x.getContrastText(x.info.dark))),D(x.Alert,"successFilledColor",ht(()=>x.getContrastText(x.success.dark))),D(x.Alert,"warningFilledColor",ht(()=>x.getContrastText(x.warning.dark))),D(x.Alert,"errorStandardBg",ye(x.error.light,.9)),D(x.Alert,"infoStandardBg",ye(x.info.light,.9)),D(x.Alert,"successStandardBg",ye(x.success.light,.9)),D(x.Alert,"warningStandardBg",ye(x.warning.light,.9)),D(x.Alert,"errorIconColor",I("palette-error-main")),D(x.Alert,"infoIconColor",I("palette-info-main")),D(x.Alert,"successIconColor",I("palette-success-main")),D(x.Alert,"warningIconColor",I("palette-warning-main")),D(x.AppBar,"defaultBg",I("palette-grey-900")),D(x.AppBar,"darkBg",I("palette-background-paper")),D(x.AppBar,"darkColor",I("palette-text-primary")),D(x.Avatar,"defaultBg",I("palette-grey-600")),D(x.Button,"inheritContainedBg",I("palette-grey-800")),D(x.Button,"inheritContainedHoverBg",I("palette-grey-700")),D(x.Chip,"defaultBorder",I("palette-grey-700")),D(x.Chip,"defaultAvatarColor",I("palette-grey-300")),D(x.Chip,"defaultIconColor",I("palette-grey-300")),D(x.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),D(x.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),D(x.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),D(x.LinearProgress,"primaryBg",ye(x.primary.main,.5)),D(x.LinearProgress,"secondaryBg",ye(x.secondary.main,.5)),D(x.LinearProgress,"errorBg",ye(x.error.main,.5)),D(x.LinearProgress,"infoBg",ye(x.info.main,.5)),D(x.LinearProgress,"successBg",ye(x.success.main,.5)),D(x.LinearProgress,"warningBg",ye(x.warning.main,.5)),D(x.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.13)`),D(x.Slider,"primaryTrack",ye(x.primary.main,.5)),D(x.Slider,"secondaryTrack",ye(x.secondary.main,.5)),D(x.Slider,"errorTrack",ye(x.error.main,.5)),D(x.Slider,"infoTrack",ye(x.info.main,.5)),D(x.Slider,"successTrack",ye(x.success.main,.5)),D(x.Slider,"warningTrack",ye(x.warning.main,.5));const _=es(x.background.default,.98);D(x.SnackbarContent,"bg",_),D(x.SnackbarContent,"color",ht(()=>x.getContrastText(_))),D(x.SpeedDialAction,"fabHoverBg",es(x.background.paper,.15)),D(x.StepConnector,"border",I("palette-grey-600")),D(x.StepContent,"border",I("palette-grey-600")),D(x.Switch,"defaultColor",I("palette-grey-300")),D(x.Switch,"defaultDisabledColor",I("palette-grey-600")),D(x.Switch,"primaryDisabledColor",ye(x.primary.main,.55)),D(x.Switch,"secondaryDisabledColor",ye(x.secondary.main,.55)),D(x.Switch,"errorDisabledColor",ye(x.error.main,.55)),D(x.Switch,"infoDisabledColor",ye(x.info.main,.55)),D(x.Switch,"successDisabledColor",ye(x.success.main,.55)),D(x.Switch,"warningDisabledColor",ye(x.warning.main,.55)),D(x.TableCell,"border",ye(Qr(x.divider,1),.68)),D(x.Tooltip,"bg",Qr(x.grey[700],.92))}At(x.background,"default"),At(x.background,"paper"),At(x.common,"background"),At(x.common,"onBackground"),At(x,"divider"),Object.keys(x).forEach(_=>{const K=x[_];_!=="tonalOffset"&&K&&typeof K=="object"&&(K.main&&D(x[_],"mainChannel",ir(ar(K.main))),K.light&&D(x[_],"lightChannel",ir(ar(K.light))),K.dark&&D(x[_],"darkChannel",ir(ar(K.dark))),K.contrastText&&D(x[_],"contrastTextChannel",ir(ar(K.contrastText))),_==="text"&&(At(x[_],"primary"),At(x[_],"secondary")),_==="action"&&(K.active&&At(x[_],"active"),K.selected&&At(x[_],"selected")))})}),C=t.reduce(($,x)=>qe($,x),C);const E={prefix:o,disableCssColorScheme:s,shouldSkipGeneratingVar:i,getSelector:O8(C)},{vars:T,generateThemeVars:k,generateStyleSheets:P}=a8(C,E);return C.vars=T,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([$,x])=>{C[$]=x}),C.generateThemeVars=k,C.generateStyleSheets=P,C.generateSpacing=function(){return wm(l.spacing,La(this))},C.getColorSchemeSelector=c8(a),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=i,C.unstable_sxConfig={...Xs,...l==null?void 0:l.unstable_sxConfig},C.unstable_sx=function(x){return Bn({sx:x,theme:this})},C.toRuntimeSource=Nm,C}function Od(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Ka({...n===!0?{}:n.palette,mode:t})})}function B8(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:s=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode,...i}=e,a=o||"light",c=s==null?void 0:s[a],l={...s,...n?{[a]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return $i(e,...t);let u=n;"palette"in e||l[a]&&(l[a]!==!0?u=l[a].palette:a==="dark"&&(u={mode:"dark"}));const h=$i({...e,palette:u},...t);return h.defaultColorScheme=a,h.colorSchemes=l,h.palette.mode==="light"&&(h.colorSchemes.light={...l.light!==!0&&l.light,palette:h.palette},Od(h,"dark",l.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:h.palette},Od(h,"light",l.light)),h}return!n&&!("light"in l)&&a==="light"&&(l.light=!0),F8({...i,colorSchemes:l,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const H8=B8(),z8="$$material";function U8(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const W8=e=>U8(e)&&e!=="classes",Z8=UC({themeId:z8,defaultTheme:H8,rootShouldForwardProp:W8}),K8=r8;process.env.NODE_ENV!=="production"&&(ce.node,ce.object.isRequired);function Y8(e){return n8(e)}function G8(e){return za("MuiSvgIcon",e)}_C("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const q8=e=>{const{color:t,fontSize:n,classes:r}=e,s={root:["root",t!=="inherit"&&`color${fn(t)}`,`fontSize${fn(n)}`]};return HS(s,G8,r)},X8=Z8("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${fn(n.color)}`],t[`fontSize${fn(n.fontSize)}`]]}})(K8(({theme:e})=>{var t,n,r,s,o,i,a,c,l,u,h,p,g,y;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(t=e.transitions)==null?void 0:t.create)==null?void 0:s.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:f=>!f.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((i=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:i.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:u.call(l,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,f])=>f&&f.main).map(([f])=>{var v,w;return{props:{color:f},style:{color:(w=(v=(e.vars??e).palette)==null?void 0:v[f])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(p=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(y=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:y.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ps=m.forwardRef(function(t,n){const r=Y8({props:t,name:"MuiSvgIcon"}),{children:s,className:o,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:l,inheritViewBox:u=!1,titleAccess:h,viewBox:p="0 0 24 24",...g}=r,y=m.isValidElement(s)&&s.type==="svg",f={...r,color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:y},v={};u||(v.viewBox=p);const w=q8(f);return d.jsxs(X8,{as:a,className:Bi(w.root,o),focusable:"false",color:l,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n,...v,...g,...y&&s.props,ownerState:f,children:[y?s.props.children:s,h?d.jsx("title",{children:h}):null]})});process.env.NODE_ENV!=="production"&&(Ps.propTypes={children:ce.node,classes:ce.object,className:ce.string,color:ce.oneOfType([ce.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ce.string]),component:ce.elementType,fontSize:ce.oneOfType([ce.oneOf(["inherit","large","medium","small"]),ce.string]),htmlColor:ce.string,inheritViewBox:ce.bool,shapeRendering:ce.string,sx:ce.oneOfType([ce.arrayOf(ce.oneOfType([ce.func,ce.object,ce.bool])),ce.func,ce.object]),titleAccess:ce.string,viewBox:ce.string});Ps.muiName="SvgIcon";function Qn(e,t){function n(r,s){return d.jsx(Ps,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:s,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Ps.muiName,m.memo(m.forwardRef(n))}const J8=Qn(d.jsx("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile"),Q8=Qn(d.jsx("path",{d:"M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .39-.23.74-.56.9-.98.49-1.87 1.12-2.66 1.85-.18.18-.43.28-.7.28-.28 0-.53-.11-.71-.29L.29 13.08c-.18-.17-.29-.42-.29-.7s.11-.53.29-.71C3.34 8.78 7.46 7 12 7s8.66 1.78 11.71 4.67c.18.18.29.43.29.71s-.11.53-.29.71l-2.48 2.48c-.18.18-.43.29-.71.29-.27 0-.52-.11-.7-.28-.79-.74-1.69-1.36-2.67-1.85-.33-.16-.56-.5-.56-.9v-3.1C15.15 9.25 13.6 9 12 9"}),"CallEnd"),e6=Qn([d.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),d.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Vm=Qn(d.jsx("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 9h12v2H6zm8 5H6v-2h8zm4-6H6V6h12z"}),"Chat"),Im=Qn(d.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3m5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72z"}),"Mic"),Dm=Qn(d.jsx("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11z"}),"Videocam"),t6=({disabled:e,capabilities:t,sessionStarted:n,ref:r,participantName:s="User",loadingText:o="Waiting for agent to connect...",theme:i="vox",client:a,displayType:c="widget",onBack:l})=>{var Y,X,G,U,M,q,j;const[u,h]=A.useState(!1),[p,g]=A.useState(!1),[y,f]=A.useState(()=>{var Z;const V=(Z=a==null?void 0:a.getCurrentInteraction)==null?void 0:Z.call(a);return console.log("SessionView: Initializing with existing interaction:",(V==null?void 0:V.methodName)||"none"),V||null}),{messages:v,send:w}=MS(),b=A.useRef(null),S=A.useRef(null),{agent:{isActive:C=!1}={}}=Me.useVoiceAssistant(),E=_e(i),T=A.useMemo(()=>a&&typeof a.getCurrentSession=="function"?!!a.getCurrentSession():!1,[a]),k=C||T;A.useEffect(()=>{var V,Z;console.log("🤖 SessionView agent state:",{isAgentActive:C,hasActiveSession:T,effectiveAgentActive:k,sessionStarted:n,clientSession:(Z=(V=a==null?void 0:a.getCurrentSession)==null?void 0:V.call(a))==null?void 0:Z.id})},[C,T,k,n,a]),A.useEffect(()=>{console.log("🤖 Agent active state changed:",C)},[C]),A.useEffect(()=>{console.log("📋 Session state changed:",{sessionStarted:n,disabled:e,participantName:s,effectiveAgentActive:k,chatOpen:u,currentInteraction:(y==null?void 0:y.methodName)||"none"})},[n,e,s,k,u,y]),A.useEffect(()=>{if(n&&!C){console.log("⏰ Starting agent timeout detection...");const V=setTimeout(()=>{console.log("⚠️ Agent timeout: Agent did not become active within 30 seconds"),g(!0)},3e4);return()=>{clearTimeout(V)}}else C&&(console.log("✅ Agent is active, clearing timeout"),g(!1))},[n,C]),A.useEffect(()=>{if(!a)return;const V=()=>{console.log("🔄 Client connection state changed:",a.connected)},Z=N=>{console.log("🔴 Client disconnected:",N),f(null),h(!1),g(!1)};return a.on("connection.connected",V),a.on("connection.disconnected",Z),()=>{a.off("connection.connected",V),a.off("connection.disconnected",Z)}},[a]),A.useEffect(()=>{if(!a)return;const V=z=>{console.log("🎯 SessionView: RPC Interaction started:",z);const H=a.getCurrentInteraction();H&&(console.log("📱 SessionView: Setting current interaction:",H.methodName,"mode:",H.presentationMode),f(H))},Z=z=>{console.log("✅ SessionView: RPC Interaction completed:",z),f(null)},N=async z=>{console.log("⏰ SessionView: RPC Interaction timeout:",z),f(null)},B=async z=>{console.log("❌ SessionView: RPC Interaction dismissed:",z),f(null)};return a.on("rpc.interaction.started",V),a.on("rpc.interaction.completed",Z),a.on("rpc.interaction.timeout",N),a.on("rpc.interaction.dismissed",B),()=>{a.off("rpc.interaction.started",V),a.off("rpc.interaction.completed",Z),a.off("rpc.interaction.timeout",N),a.off("rpc.interaction.dismissed",B)}},[a]),A.useEffect(()=>{if(!a)return;const V=a.getCurrentInteraction();V?(console.log("🔄 SessionView: Syncing with existing interaction:",V.methodName),f(V)):f(null)},[a]),A.useEffect(()=>{console.log("🎭 SessionView: Current interaction changed:",(y==null?void 0:y.methodName)||"none","mode:",(y==null?void 0:y.presentationMode)||"none")},[y]),A.useEffect(()=>{var V,Z,N;console.log("📱 SessionView: Display type changed to:",c),console.log("📱 SessionView: Current session state during display change:",{sessionStarted:n,effectiveAgentActive:k,hasSession:!!((V=a==null?void 0:a.getCurrentSession)!=null&&V.call(a)),sessionId:(N=(Z=a==null?void 0:a.getCurrentSession)==null?void 0:Z.call(a))==null?void 0:N.id})},[c,n,k,a]),A.useEffect(()=>{console.log("💬 SessionView: Chat open state changed:",u)},[u]),A.useEffect(()=>{y&&u&&(console.log("🎭 SessionView: Interactive UI appeared, closing chat"),h(!1))},[y,u]),NS(),A.useEffect(()=>{b.current&&u&&v.length>0&&(console.log("📜 SessionView: Auto-scrolling to latest message, count:",v.length),setTimeout(()=>{if(b.current){let V=b.current.parentElement;for(;V&&V.scrollHeight<=V.clientHeight;)V=V.parentElement;V?(console.log("📜 SessionView: Scrolling container found, scrolling to bottom"),V.scrollTo({top:V.scrollHeight,behavior:"smooth"})):(console.log("📜 SessionView: Using fallback scroll method"),b.current.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}))}},100))},[v.length,u]),A.useEffect(()=>{var N,B;console.log("📝 SessionView: Messages updated, count:",v.length),v.length>0&&console.log("📝 SessionView: Latest messages:",v.slice(-3).map(z=>{var H,R,F,W,L,J,O;return{id:z.id,message:z.message,timestamp:z.timestamp,from:((H=z.from)==null?void 0:H.name)||((R=z.from)==null?void 0:R.identity),fromType:z.from===void 0?"unknown":"participant",isLocal:((F=z.from)==null?void 0:F.identity)===((J=(L=(W=a==null?void 0:a.getCurrentSession)==null?void 0:W.call(a))==null?void 0:L.localParticipant)==null?void 0:J.identity),messageLength:((O=z.message)==null?void 0:O.length)||0}}));const V=((N=a==null?void 0:a.getTranscriptions)==null?void 0:N.call(a))||[],Z=((B=a==null?void 0:a.getChatMessages)==null?void 0:B.call(a))||[];console.log("📝 SessionView: Raw transcriptions count:",V.length),console.log("📝 SessionView: Raw chat messages count:",Z.length)},[v.length,v,a]),A.useEffect(()=>{console.log("💬 SessionView: Chat state changed:",{chatOpen:u,messagesCount:v.length,displayType:c,hasMessages:v.length>0})},[u,v.length,c]);async function P(V){await w(V)}const $=A.useCallback(V=>{console.log("📝 SessionView: Adding local message for voice session context:",V)},[]),x=A.useCallback(async V=>{try{a&&typeof a.sendAttachments=="function"&&(await a.sendAttachments(V),console.log("📎 SessionView: Attachments sent successfully:",V.map(Z=>Z.name)))}catch(Z){console.error("❌ SessionView: Failed to send attachments:",Z)}},[a]),I=A.useCallback(()=>{try{console.log("📞 SessionView: Ending call..."),console.log("📞 SessionView: Current state before ending:",{sessionStarted:n,effectiveAgentActive:k,chatOpen:u,currentInteraction:y==null?void 0:y.methodName,hasOnBack:!!l}),y&&(console.log("🎭 SessionView: Dismissing current interaction:",y.methodName),f(null),a&&typeof a.dismissCurrentInteraction=="function"&&a.dismissCurrentInteraction()),h(!1),g(!1),console.log("✅ SessionView: Local state reset"),a&&typeof a.endSession=="function"&&(a.endSession(),console.log("✅ SessionView: Session ended via client.endSession()")),a&&typeof a.disconnect=="function"&&(a.disconnect(),console.log("✅ SessionView: Client disconnected")),l?(console.log("🔄 SessionView: Calling onBack to return to welcome..."),setTimeout(()=>{l(),console.log("✅ SessionView: onBack called")},150)):console.warn("⚠️ SessionView: No onBack function provided - cannot return to welcome"),console.log("🏁 SessionView: Call ended and cleanup completed")}catch(V){console.error("❌ SessionView: Failed to end call:",V),f(null),h(!1),g(!1),l&&(console.log("🔄 SessionView: Error occurred, still calling onBack..."),l())}},[a,l,y,n,k,u]);A.useEffect(()=>(console.log("🔄 SessionView: Component mounted/props changed:",{sessionStarted:n,disabled:e,participantName:s,displayType:c,hasOnBack:!!l,hasClient:!!a}),()=>{console.log("🧹 SessionView: Component unmounting or props changing")}),[n,e,s,c,l,a]),A.useEffect(()=>{console.log("🔗 SessionView: onBack prop:",{hasOnBack:!!l,onBackType:typeof l})},[l]),A.useEffect(()=>{var Z,N;const V=((N=(Z=a==null?void 0:a.getCurrentSession)==null?void 0:Z.call(a))==null?void 0:N.id)||null;S.current&&!V&&console.warn("⚠️ SessionView: Session was lost unexpectedly!",{previousSession:S.current,currentSession:V,displayType:c,sessionStarted:n,effectiveAgentActive:k}),S.current=V},[a,c,n,k]);const _=ne("w-full flex flex-col items-center justify-center",c==="fullscreen"?"w-full max-w-none mx-0 h-full":"w-full mx-auto",E.main,c==="fullscreen"?"max-w-none":"","overflow-hidden","h-full"),K=l&&(c==="popup"||c==="fullscreen");return d.jsxs("main",{ref:r,inert:e,className:ne(_,"relative"),style:{minHeight:0},children:[K&&d.jsx("div",{className:`flex items-center justify-between w-full p-4 border-b ${((Y=E.chatHeader)==null?void 0:Y.container)||"border-gray-200"}`,children:d.jsx("div",{className:"flex items-center",children:d.jsxs("div",{children:[d.jsx("h3",{className:`font-semibold ${E.text.primary}`,children:"Voice Session"}),d.jsx("p",{className:`text-sm ${E.text.muted}`,children:s})]})})}),d.jsxs("div",{className:"w-full flex-1 flex flex-col items-center px-0 min-h-0 overflow-hidden",children:[!k&&d.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full min-h-[180px]",children:[d.jsx(ae.div,{animate:{rotate:360,scale:[1,1.1,1]},transition:{rotate:{duration:2,repeat:1/0,ease:"linear"},scale:{duration:1,repeat:1/0,ease:"easeInOut"}},className:"w-12 h-12 mb-4",children:d.jsx(Ca,{className:E.spinner,weight:"bold"})}),d.jsx(ae.span,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`text-sm opacity-80 ${E.text.muted} text-center max-w-xs`,children:p?"Agent is taking longer than expected...":o}),d.jsx(ae.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:2},className:`text-xs ${E.text.muted} mt-2 text-center opacity-60`,children:p?"Please check your connection or try again.":"Agent is connecting... This may take a moment."}),p&&l&&d.jsx(ae.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.5},onClick:l,className:`mt-4 px-4 py-2 rounded-lg ${((X=E.chatHeader)==null?void 0:X.backButton)||"bg-gray-100 hover:bg-gray-200"} transition-colors`,children:"Go Back"})]}),k&&d.jsxs(d.Fragment,{children:[u&&d.jsxs("div",{className:ne("absolute inset-0 w-full h-full flex flex-col transition-[opacity,translate] duration-300 ease-out z-10",i==="light"?"bg-white":"bg-gray-900/95 backdrop-blur-sm",u?"translate-y-0 opacity-100 delay-200":"translate-y-10 opacity-0"),children:[d.jsxs("div",{className:ne("flex-shrink-0 px-4 py-3 border-b",c==="fullscreen"?"px-8":"px-5",((G=E.chatHeader)==null?void 0:G.container)||"border-gray-200 dark:border-gray-700"),children:[d.jsx("h3",{className:ne("font-semibold text-lg",((U=E.text)==null?void 0:U.primary)||"text-gray-900 dark:text-white"),children:"Transcription & Chat"}),d.jsxs("p",{className:ne("text-sm",((M=E.text)==null?void 0:M.muted)||"text-gray-600 dark:text-gray-400"),children:[v.length," messages"]})]}),d.jsx("div",{className:ne("flex-1 flex flex-col min-h-0",c==="fullscreen"?"px-8":"px-5"),children:d.jsx(Lw,{className:"flex-1 flex flex-col min-h-0 h-full",children:d.jsxs("div",{className:`flex-1 flex flex-col h-full ${ne("overflow-y-auto scrollbar-hide py-4")}`,style:{scrollbarWidth:"none",scrollBehavior:"smooth",paddingBottom:"120px"},children:[v.length===0&&d.jsx("div",{className:"flex-1 flex items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx("p",{className:ne("text-lg font-medium mb-2",((q=E.text)==null?void 0:q.primary)||"text-gray-900 dark:text-white"),children:"Start Speaking"}),d.jsx("p",{className:ne("text-sm",((j=E.text)==null?void 0:j.muted)||"text-gray-600 dark:text-gray-400"),children:"Your conversation will appear here"})]})}),v.length>0&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"flex-1 min-h-4"}),d.jsx("div",{ref:b,className:"space-y-4 relative whitespace-pre-wrap z-0",children:d.jsx(jn,{mode:"popLayout",children:v.map((V,Z)=>d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3,ease:"easeOut",delay:Z*.02},layout:!0,children:d.jsx(Ow,{participantName:s,entry:V})},V.id||`message-${Z}`))})})]})]})})})]}),!u&&d.jsxs("div",{className:ne("flex-1 flex flex-col items-center w-full h-full min-h-0",(y==null?void 0:y.presentationMode)==="embedded"?"justify-end":"justify-center"),children:[d.jsx(ae.div,{className:"w-full flex justify-center",animate:{y:(y==null?void 0:y.presentationMode)==="embedded"?-8:0},transition:{duration:.3,ease:"easeOut"},children:d.jsx(Zw,{chatOpen:u})}),d.jsx(jn,{mode:"wait",children:y&&y.presentationMode==="embedded"&&d.jsx(ae.div,{initial:{opacity:0,y:20,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:20,height:0},transition:{duration:.3,ease:"easeOut"},className:ne("w-full relative mt-4 flex justify-center",c==="fullscreen"?"max-w-4xl":"max-w-md"),children:d.jsx("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 shadow-lg overflow-hidden",children:d.jsx(Fn,{interaction:y,theme:i,onDismiss:()=>{var V;return(V=a==null?void 0:a.dismissCurrentInteraction)==null?void 0:V.call(a)},client:a,addLocalMessage:$})})},`embedded-${y.methodName}`)})]})]})]}),d.jsx(jn,{mode:"wait",children:y&&y.presentationMode!=="embedded"&&!u&&d.jsx("div",{className:ne("absolute inset-0 z-50 flex items-center justify-center backdrop-blur-sm",c==="fullscreen"?"bg-black/70":"bg-black/50"),children:d.jsx(ae.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2,ease:"easeOut"},className:ne("relative w-full overflow-hidden",c==="fullscreen"?"max-w-2xl mx-8 max-h-[85vh]":"max-w-lg mx-4 max-h-[80vh]","bg-white dark:bg-gray-900 rounded-2xl shadow-2xl","border border-gray-200 dark:border-gray-700"),children:d.jsx(Fn,{interaction:y,theme:i,onDismiss:()=>{var V;return(V=a==null?void 0:a.dismissCurrentInteraction)==null?void 0:V.call(a)},client:a,addLocalMessage:$})},`modal-${y.methodName}`)})}),d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"absolute bottom-0 left-0 right-0 flex-shrink-0 w-full z-20",children:d.jsx(n6,{capabilities:t,onSendMessage:P,onSendAttachments:x,onEndCall:I,onChatOpenChange:h,disabled:e,theme:i,client:a,sessionStarted:n})})]})};function n6({capabilities:e,onSendMessage:t,onSendAttachments:n,onEndCall:r,onChatOpenChange:s,disabled:o=!1,theme:i,client:a,sessionStarted:c=!1}){const[l,u]=A.useState(!1),h=A.useRef(null),p=A.useRef(null);A.useEffect(()=>{const b=()=>{const S=navigator.userAgent.toLowerCase(),E=["android","iphone","ipad","mobile","tablet"].some(P=>S.includes(P)),T="ontouchstart"in window||navigator.maxTouchPoints>0,k=window.innerWidth<=768;u(E||T&&k)};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);const g=b=>{const S=b.target.files;if(S&&S.length>0){const E=Array.from(S).filter(T=>T.type.startsWith("image/"));if(E.length===0){console.warn("No valid image files selected");return}n&&n(E),h.current&&(h.current.value="")}},y=b=>{const S=b.target.files;if(S&&S.length>0){const C=S[0];C.type.startsWith("image/")&&n&&n([C]),p.current&&(p.current.value="")}},f=()=>{!o&&h.current&&h.current.click()},v=()=>{!o&&l&&p.current&&p.current.click()},w=()=>{console.log("🔴 VoiceControlPanel: End call button clicked"),console.log("🔴 VoiceControlPanel: Current state:",{disabled:o,sessionStarted:c,hasOnEndCall:!!r}),r?r():console.warn("⚠️ VoiceControlPanel: No onEndCall function provided")};return d.jsx("div",{className:ne("px-4 py-3 !w-full backdrop-blur-xl border-0 shadow-lg",i==="light"?"bg-white/95 border-t border-gray-200":"bg-gray-900/95 border-t border-gray-700"),children:d.jsxs("div",{className:"flex items-center justify-between !w-full mx-auto max-w-4xl",children:[d.jsx("input",{ref:h,type:"file",multiple:!0,onChange:g,className:"hidden",accept:"image/*"}),d.jsx("input",{ref:p,type:"file",onChange:y,className:"hidden",accept:"image/*",capture:"environment"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:f,disabled:o,className:ne("p-3 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",o?"opacity-50 cursor-not-allowed":"hover:shadow-md",i==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Attach files",children:d.jsx(J8,{className:"w-5 h-5"})}),l&&d.jsx("button",{onClick:v,disabled:o,className:ne("p-3 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",o?"opacity-50 cursor-not-allowed":"hover:shadow-md",i==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Take photo",children:d.jsx(e6,{className:"w-5 h-5"})})]}),d.jsx("div",{className:"flex-1 flex justify-center px-4",children:d.jsx(Iw,{capabilities:e,onChatOpenChange:s,onSendMessage:t,theme:i,client:a,className:"border-none py-1 rounded-xl max-w-md w-full"})}),d.jsx("div",{className:"flex items-center",children:d.jsx("button",{onClick:w,disabled:o||!c,className:ne("p-3 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",o||!c?"opacity-50 cursor-not-allowed":"hover:shadow-md","bg-red-500 hover:bg-red-600 text-white"),title:"End call",children:d.jsx(Q8,{className:"w-5 h-5"})})})]})})}function r6({onSendMessage:e,onSendAttachments:t,disabled:n,theme:r,onEndChat:s}){const[o,i]=m.useState(""),[a,c]=m.useState(!1),l=m.useRef(null),u=m.useRef(null),[h,p]=m.useState(!1),g=_e(r);m.useEffect(()=>{const C=()=>{const E=navigator.userAgent.toLowerCase(),k=["android","iphone","ipad","mobile","tablet"].some(x=>E.includes(x)),P="ontouchstart"in window||navigator.maxTouchPoints>0,$=window.innerWidth<=768;p(k||P&&$)};return C(),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const y=C=>{C.preventDefault(),o.trim()&&!n&&(e(o.trim()),i(""))},f=C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),y(C))},v=C=>{const E=C.target.files;if(E&&E.length>0){const T=Array.from(E),k=T.filter(P=>P.type.startsWith("image/"));if(k.length===0){console.warn("No valid image files selected");return}k.length!==T.length&&console.warn("Some non-image files were filtered out"),console.log("Selected image files:",k),t(k),l.current&&(l.current.value="")}},w=()=>{!n&&l.current&&l.current.click()},b=()=>{!n&&h&&u.current&&u.current.click()},S=C=>{const E=C.target.files;if(E&&E.length>0){const T=E[0];T.type.startsWith("image/")?t([T]):console.warn("Selected file is not an image"),u.current&&(u.current.value="")}};return d.jsx("div",{className:"px-4 py-3 !w-full backdrop-blur-xl border-0 shadow-lg ",children:d.jsx("form",{onSubmit:y,className:"flex items-center !w-full mx-auto max-w-4xl",children:d.jsxs("div",{className:`flex items-center gap-2 !w-full backdrop-blur-md rounded-full px-3 py-2 shadow-sm hover:shadow-md focus-within:shadow-lg focus-within:ring-2 focus-within:ring-blue-500/30 focus-within:border-blue-500/50 transition-all duration-200 border ${r==="light"?"bg-white/90 border-gray-200":g.chatInput.container}`,children:[d.jsx(ae.button,{type:"button",onClick:w,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${g.chatInput.attachButton}`,disabled:n,"aria-label":"Attach file",children:d.jsx(yS,{className:"w-4 h-4"})}),h&&d.jsx(ae.button,{type:"button",onClick:b,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${g.chatInput.attachButton}`,disabled:n,"aria-label":"Take photo",children:d.jsx(rm,{className:"w-4 h-4"})}),d.jsx("input",{ref:l,type:"file",multiple:!0,onChange:v,className:"hidden",accept:"image/*"}),d.jsx("input",{ref:u,type:"file",onChange:S,className:"hidden",accept:"image/*",capture:"environment"}),d.jsx("textarea",{value:o,onChange:C=>i(C.target.value),onKeyDown:f,onFocus:()=>c(!0),onBlur:()=>c(!1),placeholder:"Type your message...",disabled:n,className:`flex-1 px-2 py-1 bg-transparent resize-none min-h-[32px] max-h-20 focus:outline-none text-sm border-0 ${g.chatInput.textarea}`,rows:1,style:{height:"auto",minHeight:"32px"},onInput:C=>{const E=C.target;E.style.height="auto",E.style.height=`${Math.min(E.scrollHeight,80)}px`}}),d.jsx(ae.button,{type:"submit",disabled:n||!o.trim(),whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${o.trim()&&!n?g.chatInput.sendButton:r==="light"?"bg-gray-200 text-gray-400 cursor-not-allowed opacity-70":"bg-gray-600/50 text-gray-500 cursor-not-allowed opacity-50"}`,"aria-label":"Send message",children:d.jsx(bS,{className:"w-4 h-4"})}),s&&d.jsx(ae.button,{type:"button",onClick:s,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${g.chatInput.endButton}`,"aria-label":"End chat",children:d.jsx(sm,{className:"w-4 h-4"})})]})})})}function s6({text:e,isComplete:t,isRealTimeStream:n=!1,speed:r=50}){const[s,o]=m.useState(""),[i,a]=m.useState(0);return m.useEffect(()=>{if(n){o(e);return}if(t){o(e);return}if(i<e.length){const c=setTimeout(()=>{o(e.slice(0,i+1)),a(i+1)},r);return()=>clearTimeout(c)}},[e,i,t,r,n]),m.useEffect(()=>{n||(a(0),o(""))},[e,n]),d.jsxs("span",{className:"relative",children:[d.jsx("span",{className:"inline-block",children:s}),!t&&d.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(c=>d.jsx(ae.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:c*.2,ease:"easeInOut"}},c))})]})}function o6({message:e,theme:t,isOwn:n,isStreaming:r=!1}){var i,a;const s=_e(t),o=e.sender.name?e.sender.name.split(" ").map(c=>c[0]).join("").toUpperCase().slice(0,2):"U";return d.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:d.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[d.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${n?t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700":t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:o}),d.jsxs("div",{className:`
225
+ export default theme;`}function $i(e={},...t){const{breakpoints:n,mixins:r={},spacing:s,palette:o={},transitions:i={},typography:a={},shape:c,...l}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":zt(20));const u=Ka(o),h=Sm(e);let p=qe(h,{mixins:b8(h.breakpoints,r),palette:u,shadows:T8.slice(),typography:S8(u,a),transitions:R8(i),zIndex:{...N8}});if(p=qe(p,l),p=t.reduce((g,y)=>qe(g,y),p),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],y=(f,v)=>{let w;for(w in f){const b=f[w];if(g.includes(w)&&Object.keys(b).length>0){if(process.env.NODE_ENV!=="production"){const S=za("",w);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${w}\` internal state.`,"You can not override it like this: ",JSON.stringify(f,null,2),"",`Instead, you need to use the '&.${S}' syntax:`,JSON.stringify({root:{[`&.${S}`]:b}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
226
+ `))}f[w]={}}}};Object.keys(p.components).forEach(f=>{const v=p.components[f].styleOverrides;v&&f.startsWith("Mui")&&y(v,f)})}return p.unstable_sxConfig={...Xs,...l==null?void 0:l.unstable_sxConfig},p.unstable_sx=function(y){return Bn({sx:y,theme:this})},p.toRuntimeSource=Rm,p}function V8(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const I8=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=V8(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Nm(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function jm(e){return e==="dark"?I8:[]}function D8(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...s}=e,o=Ka(t);return{palette:o,opacity:{...Nm(o.mode),...n},overlays:r||jm(o.mode),...s}}function O8(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const $8=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],L8=e=>(t,n)=>{const r=e.rootSelector||":root",s=e.colorSchemeSelector;let o=s;if(s==="class"&&(o=".%s"),s==="data"&&(o="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(o=`[${s}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return $8(e.cssVarPrefix).forEach(a=>{i[a]=n[a],delete n[a]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:o?{[o.replace("%s",t)]:i,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:{...n,...i}}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function _8(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function D(e,t,n){!e[t]&&n&&(e[t]=n)}function ar(e){return typeof e!="string"||!e.startsWith("hsl")?e:Am(e)}function At(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ir(ar(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
227
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function F8(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ht=e=>{try{return e()}catch{}},B8=(e="mui")=>i8(e);function Wo(e,t,n,r){if(!t)return;t=t===!0?{}:t;const s=r==="dark"?"dark":"light";if(!n){e[r]=D8({...t,palette:{mode:s,...t==null?void 0:t.palette}});return}const{palette:o,...i}=$i({...n,palette:{mode:s,...t==null?void 0:t.palette}});return e[r]={...t,palette:o,opacity:{...Nm(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||jm(s)},i}function H8(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:s=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:i=O8,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...l}=e,u=Object.keys(n)[0],h=r||(n.light&&u!=="light"?"light":u),p=B8(o),{[h]:g,light:y,dark:f,...v}=n,w={...v};let b=g;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(b=!0),!b)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${h}\` option is either missing or invalid.`:zt(21,h));const S=Wo(w,b,l,h);y&&!w.light&&Wo(w,y,void 0,"light"),f&&!w.dark&&Wo(w,f,void 0,"dark");let C={defaultColorScheme:h,...S,cssVarPrefix:o,colorSchemeSelector:a,rootSelector:c,getCssVar:p,colorSchemes:w,font:{...x8(S.typography),...S.font},spacing:F8(l.spacing)};Object.keys(C.colorSchemes).forEach($=>{const x=C.colorSchemes[$].palette,I=_=>{const K=_.split("-"),Y=K[1],X=K[2];return p(_,x[Y][X])};if(x.mode==="light"&&(D(x.common,"background","#fff"),D(x.common,"onBackground","#000")),x.mode==="dark"&&(D(x.common,"background","#000"),D(x.common,"onBackground","#fff")),_8(x,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),x.mode==="light"){D(x.Alert,"errorColor",ye(x.error.light,.6)),D(x.Alert,"infoColor",ye(x.info.light,.6)),D(x.Alert,"successColor",ye(x.success.light,.6)),D(x.Alert,"warningColor",ye(x.warning.light,.6)),D(x.Alert,"errorFilledBg",I("palette-error-main")),D(x.Alert,"infoFilledBg",I("palette-info-main")),D(x.Alert,"successFilledBg",I("palette-success-main")),D(x.Alert,"warningFilledBg",I("palette-warning-main")),D(x.Alert,"errorFilledColor",ht(()=>x.getContrastText(x.error.main))),D(x.Alert,"infoFilledColor",ht(()=>x.getContrastText(x.info.main))),D(x.Alert,"successFilledColor",ht(()=>x.getContrastText(x.success.main))),D(x.Alert,"warningFilledColor",ht(()=>x.getContrastText(x.warning.main))),D(x.Alert,"errorStandardBg",ve(x.error.light,.9)),D(x.Alert,"infoStandardBg",ve(x.info.light,.9)),D(x.Alert,"successStandardBg",ve(x.success.light,.9)),D(x.Alert,"warningStandardBg",ve(x.warning.light,.9)),D(x.Alert,"errorIconColor",I("palette-error-main")),D(x.Alert,"infoIconColor",I("palette-info-main")),D(x.Alert,"successIconColor",I("palette-success-main")),D(x.Alert,"warningIconColor",I("palette-warning-main")),D(x.AppBar,"defaultBg",I("palette-grey-100")),D(x.Avatar,"defaultBg",I("palette-grey-400")),D(x.Button,"inheritContainedBg",I("palette-grey-300")),D(x.Button,"inheritContainedHoverBg",I("palette-grey-A100")),D(x.Chip,"defaultBorder",I("palette-grey-400")),D(x.Chip,"defaultAvatarColor",I("palette-grey-700")),D(x.Chip,"defaultIconColor",I("palette-grey-700")),D(x.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),D(x.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),D(x.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),D(x.LinearProgress,"primaryBg",ve(x.primary.main,.62)),D(x.LinearProgress,"secondaryBg",ve(x.secondary.main,.62)),D(x.LinearProgress,"errorBg",ve(x.error.main,.62)),D(x.LinearProgress,"infoBg",ve(x.info.main,.62)),D(x.LinearProgress,"successBg",ve(x.success.main,.62)),D(x.LinearProgress,"warningBg",ve(x.warning.main,.62)),D(x.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.11)`),D(x.Slider,"primaryTrack",ve(x.primary.main,.62)),D(x.Slider,"secondaryTrack",ve(x.secondary.main,.62)),D(x.Slider,"errorTrack",ve(x.error.main,.62)),D(x.Slider,"infoTrack",ve(x.info.main,.62)),D(x.Slider,"successTrack",ve(x.success.main,.62)),D(x.Slider,"warningTrack",ve(x.warning.main,.62));const _=es(x.background.default,.8);D(x.SnackbarContent,"bg",_),D(x.SnackbarContent,"color",ht(()=>x.getContrastText(_))),D(x.SpeedDialAction,"fabHoverBg",es(x.background.paper,.15)),D(x.StepConnector,"border",I("palette-grey-400")),D(x.StepContent,"border",I("palette-grey-400")),D(x.Switch,"defaultColor",I("palette-common-white")),D(x.Switch,"defaultDisabledColor",I("palette-grey-100")),D(x.Switch,"primaryDisabledColor",ve(x.primary.main,.62)),D(x.Switch,"secondaryDisabledColor",ve(x.secondary.main,.62)),D(x.Switch,"errorDisabledColor",ve(x.error.main,.62)),D(x.Switch,"infoDisabledColor",ve(x.info.main,.62)),D(x.Switch,"successDisabledColor",ve(x.success.main,.62)),D(x.Switch,"warningDisabledColor",ve(x.warning.main,.62)),D(x.TableCell,"border",ve(Qr(x.divider,1),.88)),D(x.Tooltip,"bg",Qr(x.grey[700],.92))}if(x.mode==="dark"){D(x.Alert,"errorColor",ve(x.error.light,.6)),D(x.Alert,"infoColor",ve(x.info.light,.6)),D(x.Alert,"successColor",ve(x.success.light,.6)),D(x.Alert,"warningColor",ve(x.warning.light,.6)),D(x.Alert,"errorFilledBg",I("palette-error-dark")),D(x.Alert,"infoFilledBg",I("palette-info-dark")),D(x.Alert,"successFilledBg",I("palette-success-dark")),D(x.Alert,"warningFilledBg",I("palette-warning-dark")),D(x.Alert,"errorFilledColor",ht(()=>x.getContrastText(x.error.dark))),D(x.Alert,"infoFilledColor",ht(()=>x.getContrastText(x.info.dark))),D(x.Alert,"successFilledColor",ht(()=>x.getContrastText(x.success.dark))),D(x.Alert,"warningFilledColor",ht(()=>x.getContrastText(x.warning.dark))),D(x.Alert,"errorStandardBg",ye(x.error.light,.9)),D(x.Alert,"infoStandardBg",ye(x.info.light,.9)),D(x.Alert,"successStandardBg",ye(x.success.light,.9)),D(x.Alert,"warningStandardBg",ye(x.warning.light,.9)),D(x.Alert,"errorIconColor",I("palette-error-main")),D(x.Alert,"infoIconColor",I("palette-info-main")),D(x.Alert,"successIconColor",I("palette-success-main")),D(x.Alert,"warningIconColor",I("palette-warning-main")),D(x.AppBar,"defaultBg",I("palette-grey-900")),D(x.AppBar,"darkBg",I("palette-background-paper")),D(x.AppBar,"darkColor",I("palette-text-primary")),D(x.Avatar,"defaultBg",I("palette-grey-600")),D(x.Button,"inheritContainedBg",I("palette-grey-800")),D(x.Button,"inheritContainedHoverBg",I("palette-grey-700")),D(x.Chip,"defaultBorder",I("palette-grey-700")),D(x.Chip,"defaultAvatarColor",I("palette-grey-300")),D(x.Chip,"defaultIconColor",I("palette-grey-300")),D(x.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),D(x.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),D(x.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),D(x.LinearProgress,"primaryBg",ye(x.primary.main,.5)),D(x.LinearProgress,"secondaryBg",ye(x.secondary.main,.5)),D(x.LinearProgress,"errorBg",ye(x.error.main,.5)),D(x.LinearProgress,"infoBg",ye(x.info.main,.5)),D(x.LinearProgress,"successBg",ye(x.success.main,.5)),D(x.LinearProgress,"warningBg",ye(x.warning.main,.5)),D(x.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.13)`),D(x.Slider,"primaryTrack",ye(x.primary.main,.5)),D(x.Slider,"secondaryTrack",ye(x.secondary.main,.5)),D(x.Slider,"errorTrack",ye(x.error.main,.5)),D(x.Slider,"infoTrack",ye(x.info.main,.5)),D(x.Slider,"successTrack",ye(x.success.main,.5)),D(x.Slider,"warningTrack",ye(x.warning.main,.5));const _=es(x.background.default,.98);D(x.SnackbarContent,"bg",_),D(x.SnackbarContent,"color",ht(()=>x.getContrastText(_))),D(x.SpeedDialAction,"fabHoverBg",es(x.background.paper,.15)),D(x.StepConnector,"border",I("palette-grey-600")),D(x.StepContent,"border",I("palette-grey-600")),D(x.Switch,"defaultColor",I("palette-grey-300")),D(x.Switch,"defaultDisabledColor",I("palette-grey-600")),D(x.Switch,"primaryDisabledColor",ye(x.primary.main,.55)),D(x.Switch,"secondaryDisabledColor",ye(x.secondary.main,.55)),D(x.Switch,"errorDisabledColor",ye(x.error.main,.55)),D(x.Switch,"infoDisabledColor",ye(x.info.main,.55)),D(x.Switch,"successDisabledColor",ye(x.success.main,.55)),D(x.Switch,"warningDisabledColor",ye(x.warning.main,.55)),D(x.TableCell,"border",ye(Qr(x.divider,1),.68)),D(x.Tooltip,"bg",Qr(x.grey[700],.92))}At(x.background,"default"),At(x.background,"paper"),At(x.common,"background"),At(x.common,"onBackground"),At(x,"divider"),Object.keys(x).forEach(_=>{const K=x[_];_!=="tonalOffset"&&K&&typeof K=="object"&&(K.main&&D(x[_],"mainChannel",ir(ar(K.main))),K.light&&D(x[_],"lightChannel",ir(ar(K.light))),K.dark&&D(x[_],"darkChannel",ir(ar(K.dark))),K.contrastText&&D(x[_],"contrastTextChannel",ir(ar(K.contrastText))),_==="text"&&(At(x[_],"primary"),At(x[_],"secondary")),_==="action"&&(K.active&&At(x[_],"active"),K.selected&&At(x[_],"selected")))})}),C=t.reduce(($,x)=>qe($,x),C);const E={prefix:o,disableCssColorScheme:s,shouldSkipGeneratingVar:i,getSelector:L8(C)},{vars:T,generateThemeVars:k,generateStyleSheets:P}=l8(C,E);return C.vars=T,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([$,x])=>{C[$]=x}),C.generateThemeVars=k,C.generateStyleSheets=P,C.generateSpacing=function(){return wm(l.spacing,La(this))},C.getColorSchemeSelector=d8(a),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=i,C.unstable_sxConfig={...Xs,...l==null?void 0:l.unstable_sxConfig},C.unstable_sx=function(x){return Bn({sx:x,theme:this})},C.toRuntimeSource=Rm,C}function Od(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Ka({...n===!0?{}:n.palette,mode:t})})}function z8(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:s=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode,...i}=e,a=o||"light",c=s==null?void 0:s[a],l={...s,...n?{[a]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return $i(e,...t);let u=n;"palette"in e||l[a]&&(l[a]!==!0?u=l[a].palette:a==="dark"&&(u={mode:"dark"}));const h=$i({...e,palette:u},...t);return h.defaultColorScheme=a,h.colorSchemes=l,h.palette.mode==="light"&&(h.colorSchemes.light={...l.light!==!0&&l.light,palette:h.palette},Od(h,"dark",l.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:h.palette},Od(h,"light",l.light)),h}return!n&&!("light"in l)&&a==="light"&&(l.light=!0),H8({...i,colorSchemes:l,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const U8=z8(),W8="$$material";function Z8(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const K8=e=>Z8(e)&&e!=="classes",Y8=ZC({themeId:W8,defaultTheme:U8,rootShouldForwardProp:K8}),G8=o8;process.env.NODE_ENV!=="production"&&(ce.node,ce.object.isRequired);function q8(e){return s8(e)}function X8(e){return za("MuiSvgIcon",e)}BC("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const J8=e=>{const{color:t,fontSize:n,classes:r}=e,s={root:["root",t!=="inherit"&&`color${fn(t)}`,`fontSize${fn(n)}`]};return US(s,X8,r)},Q8=Y8("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${fn(n.color)}`],t[`fontSize${fn(n.fontSize)}`]]}})(G8(({theme:e})=>{var t,n,r,s,o,i,a,c,l,u,h,p,g,y;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(t=e.transitions)==null?void 0:t.create)==null?void 0:s.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:f=>!f.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((i=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:i.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:u.call(l,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,f])=>f&&f.main).map(([f])=>{var v,w;return{props:{color:f},style:{color:(w=(v=(e.vars??e).palette)==null?void 0:v[f])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(p=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(y=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:y.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ps=m.forwardRef(function(t,n){const r=q8({props:t,name:"MuiSvgIcon"}),{children:s,className:o,color:i="inherit",component:a="svg",fontSize:c="medium",htmlColor:l,inheritViewBox:u=!1,titleAccess:h,viewBox:p="0 0 24 24",...g}=r,y=m.isValidElement(s)&&s.type==="svg",f={...r,color:i,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:y},v={};u||(v.viewBox=p);const w=J8(f);return d.jsxs(Q8,{as:a,className:Bi(w.root,o),focusable:"false",color:l,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n,...v,...g,...y&&s.props,ownerState:f,children:[y?s.props.children:s,h?d.jsx("title",{children:h}):null]})});process.env.NODE_ENV!=="production"&&(Ps.propTypes={children:ce.node,classes:ce.object,className:ce.string,color:ce.oneOfType([ce.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ce.string]),component:ce.elementType,fontSize:ce.oneOfType([ce.oneOf(["inherit","large","medium","small"]),ce.string]),htmlColor:ce.string,inheritViewBox:ce.bool,shapeRendering:ce.string,sx:ce.oneOfType([ce.arrayOf(ce.oneOfType([ce.func,ce.object,ce.bool])),ce.func,ce.object]),titleAccess:ce.string,viewBox:ce.string});Ps.muiName="SvgIcon";function Qn(e,t){function n(r,s){return d.jsx(Ps,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:s,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Ps.muiName,m.memo(m.forwardRef(n))}const e6=Qn(d.jsx("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile"),t6=Qn(d.jsx("path",{d:"M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .39-.23.74-.56.9-.98.49-1.87 1.12-2.66 1.85-.18.18-.43.28-.7.28-.28 0-.53-.11-.71-.29L.29 13.08c-.18-.17-.29-.42-.29-.7s.11-.53.29-.71C3.34 8.78 7.46 7 12 7s8.66 1.78 11.71 4.67c.18.18.29.43.29.71s-.11.53-.29.71l-2.48 2.48c-.18.18-.43.29-.71.29-.27 0-.52-.11-.7-.28-.79-.74-1.69-1.36-2.67-1.85-.33-.16-.56-.5-.56-.9v-3.1C15.15 9.25 13.6 9 12 9"}),"CallEnd"),n6=Qn([d.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),d.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Vm=Qn(d.jsx("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 9h12v2H6zm8 5H6v-2h8zm4-6H6V6h12z"}),"Chat"),Im=Qn(d.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3m5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72z"}),"Mic"),Dm=Qn(d.jsx("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11z"}),"Videocam"),r6=({disabled:e,capabilities:t,sessionStarted:n,ref:r,participantName:s="User",loadingText:o="Waiting for agent to connect...",theme:i="vox",client:a,displayType:c="widget",onBack:l})=>{var Y,X,G,U,M,q,N;const[u,h]=A.useState(!1),[p,g]=A.useState(!1),[y,f]=A.useState(()=>{var Z;const V=(Z=a==null?void 0:a.getCurrentInteraction)==null?void 0:Z.call(a);return console.log("SessionView: Initializing with existing interaction:",(V==null?void 0:V.methodName)||"none"),V||null}),{messages:v,send:w}=NS(),b=A.useRef(null),S=A.useRef(null),{agent:{isActive:C=!1}={}}=Me.useVoiceAssistant(),E=_e(i),T=A.useMemo(()=>a&&typeof a.getCurrentSession=="function"?!!a.getCurrentSession():!1,[a]),k=C||T;A.useEffect(()=>{var V,Z;console.log("🤖 SessionView agent state:",{isAgentActive:C,hasActiveSession:T,effectiveAgentActive:k,sessionStarted:n,clientSession:(Z=(V=a==null?void 0:a.getCurrentSession)==null?void 0:V.call(a))==null?void 0:Z.id})},[C,T,k,n,a]),A.useEffect(()=>{console.log("🤖 Agent active state changed:",C)},[C]),A.useEffect(()=>{console.log("📋 Session state changed:",{sessionStarted:n,disabled:e,participantName:s,effectiveAgentActive:k,chatOpen:u,currentInteraction:(y==null?void 0:y.methodName)||"none"})},[n,e,s,k,u,y]),A.useEffect(()=>{if(n&&!C){console.log("⏰ Starting agent timeout detection...");const V=setTimeout(()=>{console.log("⚠️ Agent timeout: Agent did not become active within 30 seconds"),g(!0)},3e4);return()=>{clearTimeout(V)}}else C&&(console.log("✅ Agent is active, clearing timeout"),g(!1))},[n,C]),A.useEffect(()=>{if(!a)return;const V=()=>{console.log("🔄 Client connection state changed:",a.connected)},Z=R=>{console.log("🔴 Client disconnected:",R),f(null),h(!1),g(!1)};return a.on("connection.connected",V),a.on("connection.disconnected",Z),()=>{a.off("connection.connected",V),a.off("connection.disconnected",Z)}},[a]),A.useEffect(()=>{if(!a)return;const V=z=>{console.log("🎯 SessionView: RPC Interaction started:",z);const H=a.getCurrentInteraction();H&&(console.log("📱 SessionView: Setting current interaction:",H.methodName,"mode:",H.presentationMode),f(H))},Z=z=>{console.log("✅ SessionView: RPC Interaction completed:",z),f(null)},R=async z=>{console.log("⏰ SessionView: RPC Interaction timeout:",z),f(null)},B=async z=>{console.log("❌ SessionView: RPC Interaction dismissed:",z),f(null)};return a.on("rpc.interaction.started",V),a.on("rpc.interaction.completed",Z),a.on("rpc.interaction.timeout",R),a.on("rpc.interaction.dismissed",B),()=>{a.off("rpc.interaction.started",V),a.off("rpc.interaction.completed",Z),a.off("rpc.interaction.timeout",R),a.off("rpc.interaction.dismissed",B)}},[a]),A.useEffect(()=>{if(!a)return;const V=a.getCurrentInteraction();V?(console.log("🔄 SessionView: Syncing with existing interaction:",V.methodName),f(V)):f(null)},[a]),A.useEffect(()=>{console.log("🎭 SessionView: Current interaction changed:",(y==null?void 0:y.methodName)||"none","mode:",(y==null?void 0:y.presentationMode)||"none")},[y]),A.useEffect(()=>{var V,Z,R;console.log("📱 SessionView: Display type changed to:",c),console.log("📱 SessionView: Current session state during display change:",{sessionStarted:n,effectiveAgentActive:k,hasSession:!!((V=a==null?void 0:a.getCurrentSession)!=null&&V.call(a)),sessionId:(R=(Z=a==null?void 0:a.getCurrentSession)==null?void 0:Z.call(a))==null?void 0:R.id})},[c,n,k,a]),A.useEffect(()=>{console.log("💬 SessionView: Chat open state changed:",u)},[u]),A.useEffect(()=>{y&&u&&(console.log("🎭 SessionView: Interactive UI appeared, closing chat"),h(!1))},[y,u]),jS(),A.useEffect(()=>{b.current&&u&&v.length>0&&(console.log("📜 SessionView: Auto-scrolling to latest message, count:",v.length),setTimeout(()=>{if(b.current){let V=b.current.parentElement;for(;V&&V.scrollHeight<=V.clientHeight;)V=V.parentElement;V?(console.log("📜 SessionView: Scrolling container found, scrolling to bottom"),V.scrollTo({top:V.scrollHeight,behavior:"smooth"})):(console.log("📜 SessionView: Using fallback scroll method"),b.current.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}))}},100))},[v.length,u]),A.useEffect(()=>{var R,B;console.log("📝 SessionView: Messages updated, count:",v.length),v.length>0&&console.log("📝 SessionView: Latest messages:",v.slice(-3).map(z=>{var H,j,F,W,L,J,O;return{id:z.id,message:z.message,timestamp:z.timestamp,from:((H=z.from)==null?void 0:H.name)||((j=z.from)==null?void 0:j.identity),fromType:z.from===void 0?"unknown":"participant",isLocal:((F=z.from)==null?void 0:F.identity)===((J=(L=(W=a==null?void 0:a.getCurrentSession)==null?void 0:W.call(a))==null?void 0:L.localParticipant)==null?void 0:J.identity),messageLength:((O=z.message)==null?void 0:O.length)||0}}));const V=((R=a==null?void 0:a.getTranscriptions)==null?void 0:R.call(a))||[],Z=((B=a==null?void 0:a.getChatMessages)==null?void 0:B.call(a))||[];console.log("📝 SessionView: Raw transcriptions count:",V.length),console.log("📝 SessionView: Raw chat messages count:",Z.length)},[v.length,v,a]),A.useEffect(()=>{console.log("💬 SessionView: Chat state changed:",{chatOpen:u,messagesCount:v.length,displayType:c,hasMessages:v.length>0})},[u,v.length,c]);async function P(V){await w(V)}const $=A.useCallback(V=>{console.log("📝 SessionView: Adding local message for voice session context:",V)},[]),x=A.useCallback(async V=>{try{a&&typeof a.sendAttachments=="function"&&(await a.sendAttachments(V),console.log("📎 SessionView: Attachments sent successfully:",V.map(Z=>Z.name)))}catch(Z){console.error("❌ SessionView: Failed to send attachments:",Z)}},[a]),I=A.useCallback(()=>{try{console.log("📞 SessionView: Ending call..."),console.log("📞 SessionView: Current state before ending:",{sessionStarted:n,effectiveAgentActive:k,chatOpen:u,currentInteraction:y==null?void 0:y.methodName,hasOnBack:!!l}),y&&(console.log("🎭 SessionView: Dismissing current interaction:",y.methodName),f(null),a&&typeof a.dismissCurrentInteraction=="function"&&a.dismissCurrentInteraction()),h(!1),g(!1),console.log("✅ SessionView: Local state reset"),a&&typeof a.endSession=="function"&&(a.endSession(),console.log("✅ SessionView: Session ended via client.endSession()")),a&&typeof a.disconnect=="function"&&(a.disconnect(),console.log("✅ SessionView: Client disconnected")),l?(console.log("🔄 SessionView: Calling onBack to return to welcome..."),setTimeout(()=>{l(),console.log("✅ SessionView: onBack called")},150)):console.warn("⚠️ SessionView: No onBack function provided - cannot return to welcome"),console.log("🏁 SessionView: Call ended and cleanup completed")}catch(V){console.error("❌ SessionView: Failed to end call:",V),f(null),h(!1),g(!1),l&&(console.log("🔄 SessionView: Error occurred, still calling onBack..."),l())}},[a,l,y,n,k,u]);A.useEffect(()=>(console.log("🔄 SessionView: Component mounted/props changed:",{sessionStarted:n,disabled:e,participantName:s,displayType:c,hasOnBack:!!l,hasClient:!!a}),()=>{console.log("🧹 SessionView: Component unmounting or props changing")}),[n,e,s,c,l,a]),A.useEffect(()=>{console.log("🔗 SessionView: onBack prop:",{hasOnBack:!!l,onBackType:typeof l})},[l]),A.useEffect(()=>{var Z,R;const V=((R=(Z=a==null?void 0:a.getCurrentSession)==null?void 0:Z.call(a))==null?void 0:R.id)||null;S.current&&!V&&console.warn("⚠️ SessionView: Session was lost unexpectedly!",{previousSession:S.current,currentSession:V,displayType:c,sessionStarted:n,effectiveAgentActive:k}),S.current=V},[a,c,n,k]);const _=ne("w-full flex flex-col items-center justify-center",c==="fullscreen"?"w-full max-w-none mx-0 h-full":"w-full mx-auto",E.main,c==="fullscreen"?"max-w-none":"","overflow-hidden","h-full"),K=l&&(c==="popup"||c==="fullscreen");return d.jsxs("main",{ref:r,inert:e,className:ne(_,"relative"),style:{minHeight:0},children:[K&&d.jsx("div",{className:`flex items-center justify-between w-full p-4 border-b ${((Y=E.chatHeader)==null?void 0:Y.container)||"border-gray-200"}`,children:d.jsx("div",{className:"flex items-center",children:d.jsxs("div",{children:[d.jsx("h3",{className:`font-semibold ${E.text.primary}`,children:"Voice Session"}),d.jsx("p",{className:`text-sm ${E.text.muted}`,children:s})]})})}),d.jsxs("div",{className:"w-full flex-1 flex flex-col items-center px-0 min-h-0 overflow-hidden",children:[!k&&d.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full min-h-[180px]",children:[d.jsx(ae.div,{animate:{rotate:360,scale:[1,1.1,1]},transition:{rotate:{duration:2,repeat:1/0,ease:"linear"},scale:{duration:1,repeat:1/0,ease:"easeInOut"}},className:"w-12 h-12 mb-4",children:d.jsx(Ca,{className:E.spinner,weight:"bold"})}),d.jsx(ae.span,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`text-sm opacity-80 ${E.text.muted} text-center max-w-xs`,children:p?"Agent is taking longer than expected...":o}),d.jsx(ae.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:2},className:`text-xs ${E.text.muted} mt-2 text-center opacity-60`,children:p?"Please check your connection or try again.":"Agent is connecting... This may take a moment."}),p&&l&&d.jsx(ae.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.5},onClick:l,className:`mt-4 px-4 py-2 rounded-lg ${((X=E.chatHeader)==null?void 0:X.backButton)||"bg-gray-100 hover:bg-gray-200"} transition-colors`,children:"Go Back"})]}),k&&d.jsxs(d.Fragment,{children:[u&&d.jsxs("div",{className:ne("absolute inset-0 w-full h-full flex flex-col transition-[opacity,translate] duration-300 ease-out z-10",i==="light"?"bg-white":"bg-gray-900/95 backdrop-blur-sm",u?"translate-y-0 opacity-100 delay-200":"translate-y-10 opacity-0"),children:[d.jsxs("div",{className:ne("flex-shrink-0 px-4 py-3 border-b",c==="fullscreen"?"px-8":"px-5",((G=E.chatHeader)==null?void 0:G.container)||"border-gray-200 dark:border-gray-700"),children:[d.jsx("h3",{className:ne("font-semibold text-lg",((U=E.text)==null?void 0:U.primary)||"text-gray-900 dark:text-white"),children:"Transcription & Chat"}),d.jsxs("p",{className:ne("text-sm",((M=E.text)==null?void 0:M.muted)||"text-gray-600 dark:text-gray-400"),children:[v.length," messages"]})]}),d.jsx("div",{className:ne("flex-1 flex flex-col min-h-0",c==="fullscreen"?"px-8":"px-5"),children:d.jsx(Fw,{className:"flex-1 flex flex-col min-h-0 h-full",children:d.jsxs("div",{className:`flex-1 flex flex-col h-full ${ne("overflow-y-auto scrollbar-hide py-4")}`,style:{scrollbarWidth:"none",scrollBehavior:"smooth",paddingBottom:"120px"},children:[v.length===0&&d.jsx("div",{className:"flex-1 flex items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx("p",{className:ne("text-lg font-medium mb-2",((q=E.text)==null?void 0:q.primary)||"text-gray-900 dark:text-white"),children:"Start Speaking"}),d.jsx("p",{className:ne("text-sm",((N=E.text)==null?void 0:N.muted)||"text-gray-600 dark:text-gray-400"),children:"Your conversation will appear here"})]})}),v.length>0&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"flex-1 min-h-4"}),d.jsx("div",{ref:b,className:"space-y-4 relative whitespace-pre-wrap z-0",children:d.jsx(Nn,{mode:"popLayout",children:v.map((V,Z)=>d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3,ease:"easeOut",delay:Z*.02},layout:!0,children:d.jsx(Lw,{participantName:s,entry:V})},V.id||`message-${Z}`))})})]})]})})})]}),!u&&d.jsxs("div",{className:ne("flex-1 flex flex-col items-center w-full h-full min-h-0",(y==null?void 0:y.presentationMode)==="embedded"?"justify-end":"justify-center"),children:[d.jsx(ae.div,{className:"w-full flex justify-center",animate:{y:(y==null?void 0:y.presentationMode)==="embedded"?-8:0},transition:{duration:.3,ease:"easeOut"},children:d.jsx(Yw,{chatOpen:u})}),d.jsx(Nn,{mode:"wait",children:y&&y.presentationMode==="embedded"&&d.jsx(ae.div,{initial:{opacity:0,y:20,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:20,height:0},transition:{duration:.3,ease:"easeOut"},className:ne("w-full relative mt-4 flex justify-center",c==="fullscreen"?"max-w-4xl":"max-w-md"),children:d.jsx("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 shadow-lg overflow-hidden",children:d.jsx(Fn,{interaction:y,theme:i,onDismiss:()=>{var V;return(V=a==null?void 0:a.dismissCurrentInteraction)==null?void 0:V.call(a)},client:a,addLocalMessage:$})})},`embedded-${y.methodName}`)})]})]})]}),d.jsx(Nn,{mode:"wait",children:y&&y.presentationMode!=="embedded"&&!u&&d.jsx("div",{className:ne("absolute inset-0 z-50 flex items-center justify-center backdrop-blur-sm",c==="fullscreen"?"bg-black/70":"bg-black/50"),children:d.jsx(ae.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2,ease:"easeOut"},className:ne("relative w-full overflow-hidden",c==="fullscreen"?"max-w-2xl mx-8 max-h-[85vh]":"max-w-lg mx-4 max-h-[80vh]","bg-white dark:bg-gray-900 rounded-2xl shadow-2xl","border border-gray-200 dark:border-gray-700"),children:d.jsx(Fn,{interaction:y,theme:i,onDismiss:()=>{var V;return(V=a==null?void 0:a.dismissCurrentInteraction)==null?void 0:V.call(a)},client:a,addLocalMessage:$})},`modal-${y.methodName}`)})}),d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"absolute bottom-0 left-0 right-0 flex-shrink-0 w-full z-20",children:d.jsx(s6,{capabilities:t,onSendMessage:P,onSendAttachments:x,onEndCall:I,onChatOpenChange:h,disabled:e,theme:i,client:a,sessionStarted:n})})]})};function s6({capabilities:e,onSendMessage:t,onSendAttachments:n,onEndCall:r,onChatOpenChange:s,disabled:o=!1,theme:i,client:a,sessionStarted:c=!1}){const[l,u]=A.useState(!1),h=A.useRef(null),p=A.useRef(null);A.useEffect(()=>{const b=()=>{const S=navigator.userAgent.toLowerCase(),E=["android","iphone","ipad","mobile","tablet"].some(P=>S.includes(P)),T="ontouchstart"in window||navigator.maxTouchPoints>0,k=window.innerWidth<=768;u(E||T&&k)};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);const g=b=>{const S=b.target.files;if(S&&S.length>0){const E=Array.from(S).filter(T=>T.type.startsWith("image/"));if(E.length===0){console.warn("No valid image files selected");return}n&&n(E),h.current&&(h.current.value="")}},y=b=>{const S=b.target.files;if(S&&S.length>0){const C=S[0];C.type.startsWith("image/")&&n&&n([C]),p.current&&(p.current.value="")}},f=()=>{!o&&h.current&&h.current.click()},v=()=>{!o&&l&&p.current&&p.current.click()},w=()=>{console.log("🔴 VoiceControlPanel: End call button clicked"),console.log("🔴 VoiceControlPanel: Current state:",{disabled:o,sessionStarted:c,hasOnEndCall:!!r}),r?r():console.warn("⚠️ VoiceControlPanel: No onEndCall function provided")};return d.jsx("div",{className:ne("px-4 py-3 !w-full backdrop-blur-xl border-0 shadow-lg",i==="light"?"bg-white/95 border-t border-gray-200":"bg-gray-900/95 border-t border-gray-700"),children:d.jsxs("div",{className:"flex items-center justify-between !w-full mx-auto max-w-4xl",children:[d.jsx("input",{ref:h,type:"file",multiple:!0,onChange:g,className:"hidden",accept:"image/*"}),d.jsx("input",{ref:p,type:"file",onChange:y,className:"hidden",accept:"image/*",capture:"environment"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:f,disabled:o,className:ne("p-3 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",o?"opacity-50 cursor-not-allowed":"hover:shadow-md",i==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Attach files",children:d.jsx(e6,{className:"w-5 h-5"})}),l&&d.jsx("button",{onClick:v,disabled:o,className:ne("p-3 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",o?"opacity-50 cursor-not-allowed":"hover:shadow-md",i==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Take photo",children:d.jsx(n6,{className:"w-5 h-5"})})]}),d.jsx("div",{className:"flex-1 flex justify-center px-4",children:d.jsx(Ow,{capabilities:e,onChatOpenChange:s,onSendMessage:t,theme:i,client:a,className:"border-none py-1 rounded-xl max-w-md w-full"})}),d.jsx("div",{className:"flex items-center",children:d.jsx("button",{onClick:w,disabled:o||!c,className:ne("p-3 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",o||!c?"opacity-50 cursor-not-allowed":"hover:shadow-md","bg-red-500 hover:bg-red-600 text-white"),title:"End call",children:d.jsx(t6,{className:"w-5 h-5"})})})]})})}function o6({onSendMessage:e,onSendAttachments:t,disabled:n,theme:r,onEndChat:s}){const[o,i]=m.useState(""),[a,c]=m.useState(!1),l=m.useRef(null),u=m.useRef(null),[h,p]=m.useState(!1),g=_e(r);m.useEffect(()=>{const C=()=>{const E=navigator.userAgent.toLowerCase(),k=["android","iphone","ipad","mobile","tablet"].some(x=>E.includes(x)),P="ontouchstart"in window||navigator.maxTouchPoints>0,$=window.innerWidth<=768;p(k||P&&$)};return C(),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const y=C=>{C.preventDefault(),o.trim()&&!n&&(e(o.trim()),i(""))},f=C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),y(C))},v=C=>{const E=C.target.files;if(E&&E.length>0){const T=Array.from(E),k=T.filter(P=>P.type.startsWith("image/"));if(k.length===0){console.warn("No valid image files selected");return}k.length!==T.length&&console.warn("Some non-image files were filtered out"),console.log("Selected image files:",k),t(k),l.current&&(l.current.value="")}},w=()=>{!n&&l.current&&l.current.click()},b=()=>{!n&&h&&u.current&&u.current.click()},S=C=>{const E=C.target.files;if(E&&E.length>0){const T=E[0];T.type.startsWith("image/")?t([T]):console.warn("Selected file is not an image"),u.current&&(u.current.value="")}};return d.jsx("div",{className:"px-4 py-3 !w-full backdrop-blur-xl border-0 shadow-lg ",children:d.jsx("form",{onSubmit:y,className:"flex items-center !w-full mx-auto max-w-4xl",children:d.jsxs("div",{className:`flex items-center gap-2 !w-full backdrop-blur-md rounded-full px-3 py-2 shadow-sm hover:shadow-md focus-within:shadow-lg focus-within:ring-2 focus-within:ring-blue-500/30 focus-within:border-blue-500/50 transition-all duration-200 border ${r==="light"?"bg-white/90 border-gray-200":g.chatInput.container}`,children:[d.jsx(ae.button,{type:"button",onClick:w,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${g.chatInput.attachButton}`,disabled:n,"aria-label":"Attach file",children:d.jsx(xS,{className:"w-4 h-4"})}),h&&d.jsx(ae.button,{type:"button",onClick:b,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${g.chatInput.attachButton}`,disabled:n,"aria-label":"Take photo",children:d.jsx(rm,{className:"w-4 h-4"})}),d.jsx("input",{ref:l,type:"file",multiple:!0,onChange:v,className:"hidden",accept:"image/*"}),d.jsx("input",{ref:u,type:"file",onChange:S,className:"hidden",accept:"image/*",capture:"environment"}),d.jsx("textarea",{value:o,onChange:C=>i(C.target.value),onKeyDown:f,onFocus:()=>c(!0),onBlur:()=>c(!1),placeholder:"Type your message...",disabled:n,className:`flex-1 px-2 py-1 bg-transparent resize-none min-h-[32px] max-h-20 focus:outline-none text-sm border-0 ${g.chatInput.textarea}`,rows:1,style:{height:"auto",minHeight:"32px"},onInput:C=>{const E=C.target;E.style.height="auto",E.style.height=`${Math.min(E.scrollHeight,80)}px`}}),d.jsx(ae.button,{type:"submit",disabled:n||!o.trim(),whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${o.trim()&&!n?g.chatInput.sendButton:r==="light"?"bg-gray-200 text-gray-400 cursor-not-allowed opacity-70":"bg-gray-600/50 text-gray-500 cursor-not-allowed opacity-50"}`,"aria-label":"Send message",children:d.jsx(SS,{className:"w-4 h-4"})}),s&&d.jsx(ae.button,{type:"button",onClick:s,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${g.chatInput.endButton}`,"aria-label":"End chat",children:d.jsx(sm,{className:"w-4 h-4"})})]})})})}function i6({text:e,isComplete:t,isRealTimeStream:n=!1,speed:r=50}){const[s,o]=m.useState(""),[i,a]=m.useState(0);return m.useEffect(()=>{if(n){o(e);return}if(t){o(e);return}if(i<e.length){const c=setTimeout(()=>{o(e.slice(0,i+1)),a(i+1)},r);return()=>clearTimeout(c)}},[e,i,t,r,n]),m.useEffect(()=>{n||(a(0),o(""))},[e,n]),d.jsxs("span",{className:"relative",children:[d.jsx("span",{className:"inline-block",children:s}),!t&&d.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(c=>d.jsx(ae.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:c*.2,ease:"easeInOut"}},c))})]})}function a6({message:e,theme:t,isOwn:n,isStreaming:r=!1}){var i,a;const s=_e(t),o=e.sender.name?e.sender.name.split(" ").map(c=>c[0]).join("").toUpperCase().slice(0,2):"U";return d.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:d.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[d.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${n?t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700":t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:o}),d.jsxs("div",{className:`
228
228
  relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover
229
229
  ${n?`${s.chatMessage.own} rounded-br-md`:`${s.chatMessage.other} rounded-bl-md`}
230
230
  ${r?"shimmer":""}
231
231
  transition-all duration-200 group-hover:scale-[1.02]
232
- `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[d.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:((i=e.metadata)==null?void 0:i.type)==="attachment"?d.jsx(c6,{message:e,theme:t,isOwn:n}):r&&!n?d.jsx(s6,{text:e.content,isComplete:!r,isRealTimeStream:((a=e.metadata)==null?void 0:a.streaming)===!0,speed:35}):e.content}),d.jsx("div",{className:"text-xs",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}function i6(e,t){return e.startsWith("image/")?aS:e.startsWith("video/")?TS:e.startsWith("audio/")?pS:e.includes("zip")||e.includes("rar")||e.includes("archive")?Qw:oS}function a6(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}function c6({message:e,theme:t,isOwn:n}){const r=_e(t),s=e.metadata,o=(s==null?void 0:s.fileName)||"Unknown file",i=(s==null?void 0:s.fileSize)||0,a=(s==null?void 0:s.mimeType)||"application/octet-stream",c=s==null?void 0:s.downloading,l=s==null?void 0:s.uploading,u=(s==null?void 0:s.downloadProgress)||0,h=(s==null?void 0:s.uploadProgress)||0,p=s==null?void 0:s.downloadUrl,g=s==null?void 0:s.file,y=i6(a),f=c||l,v=c?u:h,w=c?"Downloading...":l?"Uploading...":"Complete",[b,S]=m.useState(null);m.useEffect(()=>{if(p)S(p);else if(g&&a.startsWith("image/")){const k=URL.createObjectURL(g);return S(k),()=>URL.revokeObjectURL(k)}else S(null)},[p,g,a]);const C=()=>{if(p){const k=document.createElement("a");k.href=p,k.download=o,k.click()}},T=a.startsWith("image/")&&b;return d.jsxs("div",{className:"flex flex-col gap-2 max-w-sm",children:[T&&d.jsxs("div",{className:"relative rounded-lg overflow-hidden",children:[d.jsx("img",{src:b,alt:o,className:"max-w-full h-auto max-h-48 object-cover rounded-lg cursor-pointer",onClick:C}),d.jsx("div",{className:"absolute inset-0 bg-black/0 hover:bg-black/10 transition-colors duration-200 cursor-pointer"})]}),d.jsxs("div",{className:`
232
+ `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[d.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:((i=e.metadata)==null?void 0:i.type)==="attachment"?d.jsx(d6,{message:e,theme:t,isOwn:n}):r&&!n?d.jsx(i6,{text:e.content,isComplete:!r,isRealTimeStream:((a=e.metadata)==null?void 0:a.streaming)===!0,speed:35}):e.content}),d.jsx("div",{className:"text-xs",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}function c6(e,t){return e.startsWith("image/")?lS:e.startsWith("video/")?PS:e.startsWith("audio/")?yS:e.includes("zip")||e.includes("rar")||e.includes("archive")?tS:aS}function l6(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}function d6({message:e,theme:t,isOwn:n}){const r=_e(t),s=e.metadata,o=(s==null?void 0:s.fileName)||"Unknown file",i=(s==null?void 0:s.fileSize)||0,a=(s==null?void 0:s.mimeType)||"application/octet-stream",c=s==null?void 0:s.downloading,l=s==null?void 0:s.uploading,u=(s==null?void 0:s.downloadProgress)||0,h=(s==null?void 0:s.uploadProgress)||0,p=s==null?void 0:s.downloadUrl,g=s==null?void 0:s.file,y=c6(a),f=c||l,v=c?u:h,w=c?"Downloading...":l?"Uploading...":"Complete",[b,S]=m.useState(null);m.useEffect(()=>{if(p)S(p);else if(g&&a.startsWith("image/")){const k=URL.createObjectURL(g);return S(k),()=>URL.revokeObjectURL(k)}else S(null)},[p,g,a]);const C=()=>{if(p){const k=document.createElement("a");k.href=p,k.download=o,k.click()}},T=a.startsWith("image/")&&b;return d.jsxs("div",{className:"flex flex-col gap-2 max-w-sm",children:[T&&d.jsxs("div",{className:"relative rounded-lg overflow-hidden",children:[d.jsx("img",{src:b,alt:o,className:"max-w-full h-auto max-h-48 object-cover rounded-lg cursor-pointer",onClick:C}),d.jsx("div",{className:"absolute inset-0 bg-black/0 hover:bg-black/10 transition-colors duration-200 cursor-pointer"})]}),d.jsxs("div",{className:`
233
233
  flex items-center gap-3 p-3 rounded-lg border transition-all duration-200
234
234
  ${t==="light"?"bg-gray-50 border-gray-200 hover:bg-gray-100":"bg-gray-800/50 border-gray-700 hover:bg-gray-700/50"}
235
235
  `,children:[d.jsx("div",{className:`
236
236
  p-2 rounded-lg flex-shrink-0
237
237
  ${t==="light"?"bg-blue-100 text-blue-600":"bg-blue-900/50 text-blue-400"}
238
- `,children:d.jsx(y,{className:"w-5 h-5"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("div",{className:`font-medium text-sm truncate ${r.text.primary}`,children:o}),d.jsxs("div",{className:`text-xs ${r.text.muted}`,children:[i>0&&a6(i),f&&d.jsxs(d.Fragment,{children:[i>0&&" • ",w," ",Math.round(v*100),"%"]})]}),f&&d.jsx("div",{className:`
238
+ `,children:d.jsx(y,{className:"w-5 h-5"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("div",{className:`font-medium text-sm truncate ${r.text.primary}`,children:o}),d.jsxs("div",{className:`text-xs ${r.text.muted}`,children:[i>0&&l6(i),f&&d.jsxs(d.Fragment,{children:[i>0&&" • ",w," ",Math.round(v*100),"%"]})]}),f&&d.jsx("div",{className:`
239
239
  w-full h-1 rounded-full mt-1 overflow-hidden
240
240
  ${t==="light"?"bg-gray-200":"bg-gray-700"}
241
241
  `,children:d.jsx(ae.div,{className:`h-full ${t==="light"?"bg-blue-500":"bg-blue-400"}`,initial:{width:0},animate:{width:`${v*100}%`},transition:{duration:.3}})})]}),p&&!f&&d.jsx(ae.button,{onClick:C,whileHover:{scale:1.05},whileTap:{scale:.95},className:`
242
242
  p-2 rounded-lg transition-colors duration-200
243
243
  ${t==="light"?"hover:bg-gray-200 text-gray-600 hover:text-gray-800":"hover:bg-gray-600 text-gray-400 hover:text-gray-200"}
244
- `,"aria-label":"Download file",children:d.jsx(rS,{className:"w-4 h-4"})})]})]})}function l6(){return d.jsxs("div",{className:"max-w-xs mx-auto bg-green-50 border border-green-200 rounded-lg shadow p-3 flex flex-col items-center",children:[d.jsx("div",{className:"text-2xl mb-2",children:"✅"}),d.jsx("div",{className:"text-green-700 font-semibold text-sm mb-1",children:"Success!"}),d.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"Your action was completed successfully."})]})}function d6(){return d.jsxs("div",{className:"max-w-xs mx-auto bg-yellow-50 border border-yellow-200 rounded-lg shadow p-3 flex flex-col items-center",children:[d.jsx("div",{className:"text-2xl mb-2",children:"⏰"}),d.jsx("div",{className:"text-yellow-700 font-semibold text-sm mb-1",children:"Interaction timed out"}),d.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"No response was provided in time."})]})}function u6({client:e,theme:t="vox",onBack:n,disabled:r=!1,displayType:s="widget",onEndChat:o}){const[i,a]=m.useState(()=>{if(e&&typeof e.getChatMessages=="function"){const N=e.getChatMessages();return console.log("🔄 ChatView: Initializing with existing messages:",N.length),N}return[]}),[c,l]=m.useState(!0),[u,h]=m.useState(()=>{const N=e&&typeof e.getCurrentSession=="function"&&!!e.getCurrentSession(),B=e&&typeof e.getChatMessages=="function"&&e.getChatMessages().length>0;return!N&&!B}),[p,g]=m.useState(new Set),[y,f]=m.useState([]),[v,w]=m.useState(!1),[b,S]=m.useState(!1),[C,E]=m.useState(()=>{const N=e.getCurrentInteraction();return console.log("ChatView: Initializing with existing interaction:",(N==null?void 0:N.methodName)||"none"),N}),T=m.useRef(null),k=_e(t);m.useEffect(()=>{const N=()=>{const B=navigator.userAgent.toLowerCase(),H=["android","iphone","ipad","mobile","tablet"].some(L=>B.includes(L)),R="ontouchstart"in window||navigator.maxTouchPoints>0,F=window.innerWidth<=768,W=H||R&&F;w(W),W&&s==="widget"&&S(!0)};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[s]),m.useEffect(()=>(b&&v&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%",document.documentElement.requestFullscreen&&document.documentElement.requestFullscreen().catch(console.log)),()=>{b&&v&&(document.body.style.overflow="unset",document.body.style.position="unset",document.body.style.width="unset",document.body.style.height="unset",document.fullscreenElement&&document.exitFullscreen().catch(console.log))}),[b,v]);const P=e.getCurrentAgentInfo(),$=(P==null?void 0:P.name)||"AI Assistant",x=$.split(" ").map(N=>N[0]).join("").toUpperCase().slice(0,2),I=m.useCallback(N=>{const B={id:`local_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:N,timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{isLocal:!0}};a(z=>(console.log("ChatView: Adding local message:",B.id),[...z,B]))},[]);m.useEffect(()=>{var N,B,z,H,R;console.log("💬 ChatView loading state:",{isLoading:u,hasActiveSession:!!((N=e==null?void 0:e.getCurrentSession)!=null&&N.call(e)),messagesCount:i.length,sessionId:(z=(B=e==null?void 0:e.getCurrentSession)==null?void 0:B.call(e))==null?void 0:z.id,hasStoredMessages:!!((R=(H=e==null?void 0:e.getChatMessages)==null?void 0:H.call(e))!=null&&R.length),isMobile:v,isFullscreen:b})},[u,i.length,e,v,b]);const _=m.useCallback((N=!1)=>{T.current&&(N?T.current.scrollIntoView({behavior:"auto"}):T.current.scrollIntoView({behavior:"smooth"}))},[]);m.useEffect(()=>{_(!0);const N=setTimeout(()=>{_(!1)},10);return()=>clearTimeout(N)},[i.length,_]),m.useEffect(()=>{if(C){_(!0);const N=setTimeout(()=>{_(!1)},50);return()=>clearTimeout(N)}},[C,_]),m.useEffect(()=>{const N=H=>{if(console.log("ChatView: Received message:",H),h(!1),C&&H.sender.type==="agent"){console.log("ChatView: Queuing agent message due to active interaction:",C.methodName),f(R=>[...R,H]);return}H.sender.type==="agent"&&l(!1),a(R=>{var W;if(R.some(L=>L.id===H.id))return console.log("ChatView: Message already exists, skipping:",H.id),R;if(console.log("ChatView: Adding new message:",H.id),H.sender.type==="agent"&&(g(L=>new Set(L).add(H.id)),!((W=H.metadata)!=null&&W.streaming))){const L=H.content.length*35+1e3;setTimeout(()=>{g(J=>{const O=new Set(J);return O.delete(H.id),O})},L)}return[...R,H]}),setTimeout(()=>_(!0),0)},B=H=>{var R;if(console.log("ChatView: Updated message:",H),C&&H.sender.type==="agent"){console.log("ChatView: Queuing agent message update due to active interaction:",C.methodName),f(F=>{const W=F.findIndex(L=>L.id===H.id);if(W>=0){const L=[...F];return L[W]=H,L}else return[...F,H]});return}a(F=>F.map(W=>W.id===H.id?{...H}:W)),setTimeout(()=>_(!0),0),(R=H.metadata)!=null&&R.streaming||g(F=>{const W=new Set(F);return W.delete(H.id),W})},z=H=>{console.log("ChatView: Sent message:",H),h(!1),a(R=>R.some(W=>W.id===H.id)?(console.log("ChatView: Sent message already exists, skipping:",H.id),R):(console.log("ChatView: Adding sent message:",H.id),[...R,H])),setTimeout(()=>_(!0),0)};return e.on("chat.message.received",N),e.on("chat.message.updated",B),e.on("chat.message.sent",z),()=>{e.off("chat.message.received",N),e.off("chat.message.updated",B),e.off("chat.message.sent",z)}},[e,C]),m.useEffect(()=>{const N=R=>{console.log("ChatView: RPC interaction started:",R);const F=e.getCurrentInteraction();console.log("ChatView: Got interaction from client:",F==null?void 0:F.methodName),E(F),l(!1),_(!0),setTimeout(()=>{_(!1)},100)},B=R=>{if(console.log("ChatView: RPC interaction completed:",R),E(null),y.length>0&&(console.log("ChatView: Processing",y.length,"queued messages"),a(F=>{const W=[...F];return y.forEach(L=>{var O;if(!W.some(se=>se.id===L.id)&&(console.log("ChatView: Adding queued message:",L.id),W.push(L),L.sender.type==="agent"&&(g(se=>new Set(se).add(L.id)),!((O=L.metadata)!=null&&O.streaming)))){const se=L.content.length*35+1e3;setTimeout(()=>{g(le=>{const De=new Set(le);return De.delete(L.id),De})},se)}}),W}),f([]),setTimeout(()=>_(!0),0)),R&&R.response&&R.response.success){let F=null;R.response.successView?F=R.response.successView:R.successView&&(F=R.successView),a(W=>{const L=[...W].reverse().findIndex(le=>le.sender.type==="participant");let J=W.length;L!==-1&&(J=W.length-L);const O={id:`success_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{type:"successView",view:F||d.jsx(l6,{})}};e&&typeof e.addChatMessage=="function"&&e.addChatMessage(O);const se=[...W];return se.splice(J,0,O),se})}},z=async R=>{C&&(console.log("ChatView: Dismissing active interaction due to timeout"),e.dismissCurrentInteraction()),E(null),y.length>0&&(console.log("ChatView: Processing",y.length,"queued messages after timeout"),a(W=>{const L=[...W];return y.forEach(J=>{var se;if(!L.some(le=>le.id===J.id)&&(L.push(J),J.sender.type==="agent"&&(g(le=>new Set(le).add(J.id)),!((se=J.metadata)!=null&&se.streaming)))){const le=J.content.length*35+1e3;setTimeout(()=>{g(De=>{const ut=new Set(De);return ut.delete(J.id),ut})},le)}}),L}),f([]),setTimeout(()=>_(!0),0));let F=null;R&&R.response&&R.response.timeoutView?F=R.response.timeoutView:R&&R.timeoutView&&(F=R.timeoutView),a(W=>{const L={id:`timeout_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"agent",name:$,type:"agent"},metadata:{type:"timeoutView",view:F||d.jsx(d6,{})}};return e&&typeof e.addChatMessage=="function"&&e.addChatMessage(L),[...W,L]}),setTimeout(()=>{e.getCurrentInteraction()||E(null)},100)},H=async R=>{console.log("ChatView: RPC interaction dismissed:",R),console.log("ChatView: Current interaction before dismiss:",C==null?void 0:C.methodName),E(null),y.length>0&&(console.log("ChatView: Processing",y.length,"queued messages after dismissal"),a(F=>{const W=[...F];return y.forEach(L=>{var O;if(!W.some(se=>se.id===L.id)&&(W.push(L),L.sender.type==="agent"&&(g(se=>new Set(se).add(L.id)),!((O=L.metadata)!=null&&O.streaming)))){const se=L.content.length*35+1e3;setTimeout(()=>{g(le=>{const De=new Set(le);return De.delete(L.id),De})},se)}}),W}),f([]),setTimeout(()=>_(!0),0)),setTimeout(()=>{const F=e.getCurrentInteraction();console.log("ChatView: Latest interaction from client after dismiss:",(F==null?void 0:F.methodName)||"null"),F===null&&E(null)},50),console.log("ChatView: Set currentInteraction to null after dismiss")};return e.on("rpc.interaction.started",N),e.on("rpc.interaction.completed",B),e.on("rpc.interaction.timeout",z),e.on("rpc.interaction.dismissed",H),()=>{e.off("rpc.interaction.started",N),e.off("rpc.interaction.completed",B),e.off("rpc.interaction.timeout",z),e.off("rpc.interaction.dismissed",H)}},[e]),m.useEffect(()=>{const N=()=>{if(console.log("ChatView: Agent is thinking"),C){console.log("ChatView: Suppressing thinking indicator due to active interaction:",C.methodName);return}l(!0)},B=()=>{console.log("ChatView: Agent is speaking"),l(!1)};return e.on("agent.thinking",N),e.on("agent.speaking",B),()=>{e.off("agent.thinking",N),e.off("agent.speaking",B)}},[e,C]),m.useEffect(()=>{const N=e.getCurrentInteraction();N?(console.log("ChatView: Restoring interaction state on mount/client change:",N.methodName),E(N)):E(null)},[e]),m.useEffect(()=>{console.log("ChatView: Display type changed to:",s,"Current interaction:",(C==null?void 0:C.methodName)||"none")},[s,C]);const K=async N=>{try{C&&(console.log("ChatView: Dismissing active interaction due to user message send"),e.dismissCurrentInteraction(),E(null)),await e.sendChatMessage(N)}catch(B){console.error("Failed to send message:",B)}},Y=async N=>{try{C&&(console.log("ChatView: Dismissing active interaction due to user attachment send"),e.dismissCurrentInteraction(),E(null)),await e.sendAttachments(N),console.log("Attachments sent successfully:",N.map(B=>B.name))}catch(B){console.error("Failed to send attachments:",B)}},[X,G]=m.useState([]);if(m.useEffect(()=>{const N=B=>{G(Array.isArray(B)?B:["tes","hello how are you","algebra make me learn that ","what is the meaning of life"])};return e.on("suggested.response",N),()=>{e.off("suggested.response",N)}},[e]),u){const N=b&&v?"fixed inset-0 z-[9999] flex flex-col items-center justify-center h-screen w-screen bg-black":"flex w-full flex-col items-center justify-center h-full p-8";return d.jsxs("div",{className:N,children:[d.jsx("div",{className:`${k.spinner} w-12 h-12 mb-6`}),d.jsxs("p",{className:`text-sm text-center ${b&&v?"text-white":""}`,children:["Connecting to ",$,"..."]})]})}const U=b&&v?"fullscreen":s,M=U==="fullscreen"?b&&v?"fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black":"flex flex-col h-full w-full max-w-none":"flex flex-col h-full w-full backdrop-blur-sm",q=U==="fullscreen"?b&&v?"flex items-center w-full justify-between px-4 pt-3 pb-3 bg-black/80 text-white border-b border-gray-700":`flex items-center w-full justify-between px-6 pt-5 pb-4 border-b ${k.chatHeader.container}`:`flex items-center w-full justify-between px-4 pt-5 pb-4 border-b ${k.chatHeader.container}`,j=U==="fullscreen"?b&&v?"flex-1 overflow-y-auto scrollbar-hide p-4 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto scrollbar-hide p-6 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto scrollbar-hide w-full p-4 chat-scrollable min-h-0",V="flex-shrink-0 !w-full",Z=()=>{S(!1),n&&n()};return d.jsxs("div",{className:M,children:[d.jsx("div",{className:q,children:d.jsxs("div",{className:"flex items-center gap-2",children:[b&&v&&d.jsx(ae.button,{onClick:Z,whileHover:{scale:1.05},whileTap:{scale:.95},className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors mr-2","aria-label":"Exit fullscreen",children:"✕"}),d.jsxs("div",{children:[d.jsx("h3",{className:`font-semibold text-base leading-tight ${b&&v?"text-white":k.text.primary}`,children:$}),d.jsxs("p",{className:`text-xs flex items-center gap-1.5 mt-0.5 ${b&&v?"text-gray-300":k.text.muted}`,children:[d.jsx("span",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),"Online"]})]})]})}),d.jsxs("div",{className:`${j} flex flex-col`,style:{scrollBehavior:"smooth",scrollbarWidth:"none"},children:[" ",i.length===0?d.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center py-12",children:[d.jsx(ae.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl",children:x}),d.jsxs("p",{className:`text-base mb-2 ${b&&v?"text-white":k.text.secondary}`,children:[$," is joining..."]}),d.jsx("p",{className:`text-xs ${b&&v?"text-gray-300":k.text.muted}`,children:"Your conversation will begin shortly"})]}):d.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:d.jsxs("div",{className:"space-y-3",children:[i.map((N,B)=>{var z,H;return d.jsx("div",{children:((z=N.metadata)==null?void 0:z.type)==="successView"?d.jsx("div",{className:"flex w-full justify-end mb-4 px-1",children:d.jsxs("div",{className:"relative group flex-row-reverse flex items-end gap-3 max-w-[85%]",children:[d.jsx(ae.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:"Y"}),d.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-br-md message-hover border-gray-200 dark:border-gray-700 ${k.chatMessage.own}`,children:[N.metadata.view,d.jsx("div",{className:`text-xs ${k.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:N.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):((H=N.metadata)==null?void 0:H.type)==="timeoutView"?d.jsx("div",{className:"flex w-full justify-start mb-4 px-1",children:d.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[d.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:x}),d.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${k.chatMessage.other}`,children:[N.metadata.view,d.jsx("div",{className:`text-xs ${k.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:N.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):d.jsx(o6,{message:N,theme:t,isOwn:N.sender.type==="participant",isStreaming:p.has(N.id)})},N.id)}),c&&!C&&d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:i.length*.1},className:"flex w-full justify-start mb-4 px-1",children:d.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[d.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:x}),d.jsx("div",{className:`relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover ${k.chatMessage.other} rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]`,style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:d.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(N=>d.jsx(ae.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:N*.2,ease:"easeInOut"}},N))})})]})}),C&&C.presentationMode==="embedded"&&d.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[d.jsx(ae.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:x}),d.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${k.chatMessage.other}`,children:[d.jsx(Fn,{interaction:C,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:I},C.methodName),d.jsx(ae.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},className:`text-xs ${k.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),d.jsx("div",{ref:T})]})})]}),X.length>0&&d.jsx("div",{className:"w-full flex overflow-x-auto gap-2 px-4 py-2 mb-1 scrollbar-hide",children:X.map((N,B)=>{var z;return d.jsx("button",{className:`whitespace-nowrap px-3 py-1 rounded-full border shadow-sm flex-shrink-0 transition-all duration-150 font-medium text-sm focus:outline-none focus:ring-2 focus:ring-blue-400/40
244
+ `,"aria-label":"Download file",children:d.jsx(oS,{className:"w-4 h-4"})})]})]})}function u6(){return d.jsxs("div",{className:"max-w-xs mx-auto bg-green-50 border border-green-200 rounded-lg shadow p-3 flex flex-col items-center",children:[d.jsx("div",{className:"text-2xl mb-2",children:"✅"}),d.jsx("div",{className:"text-green-700 font-semibold text-sm mb-1",children:"Success!"}),d.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"Your action was completed successfully."})]})}function f6(){return d.jsxs("div",{className:"max-w-xs mx-auto bg-yellow-50 border border-yellow-200 rounded-lg shadow p-3 flex flex-col items-center",children:[d.jsx("div",{className:"text-2xl mb-2",children:"⏰"}),d.jsx("div",{className:"text-yellow-700 font-semibold text-sm mb-1",children:"Interaction timed out"}),d.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"No response was provided in time."})]})}function h6({client:e,theme:t="vox",onBack:n,disabled:r=!1,displayType:s="widget",onEndChat:o}){const[i,a]=m.useState(()=>{if(e&&typeof e.getChatMessages=="function"){const R=e.getChatMessages();return console.log("🔄 ChatView: Initializing with existing messages:",R.length),R}return[]}),[c,l]=m.useState(!0),[u,h]=m.useState(()=>{const R=e&&typeof e.getCurrentSession=="function"&&!!e.getCurrentSession(),B=e&&typeof e.getChatMessages=="function"&&e.getChatMessages().length>0;return!R&&!B}),[p,g]=m.useState(new Set),[y,f]=m.useState([]),[v,w]=m.useState(!1),[b,S]=m.useState(!1),[C,E]=m.useState(()=>{const R=e.getCurrentInteraction();return console.log("ChatView: Initializing with existing interaction:",(R==null?void 0:R.methodName)||"none"),R}),T=m.useRef(null),k=_e(t);m.useEffect(()=>{const R=()=>{const B=navigator.userAgent.toLowerCase(),H=["android","iphone","ipad","mobile","tablet"].some(L=>B.includes(L)),j="ontouchstart"in window||navigator.maxTouchPoints>0,F=window.innerWidth<=768,W=H||j&&F;w(W),W&&s==="widget"&&S(!0)};return R(),window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[s]),m.useEffect(()=>(b&&v&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%",document.documentElement.requestFullscreen&&document.documentElement.requestFullscreen().catch(console.log)),()=>{b&&v&&(document.body.style.overflow="unset",document.body.style.position="unset",document.body.style.width="unset",document.body.style.height="unset",document.fullscreenElement&&document.exitFullscreen().catch(console.log))}),[b,v]);const P=e.getCurrentAgentInfo(),$=(P==null?void 0:P.name)||"AI Assistant",x=$.split(" ").map(R=>R[0]).join("").toUpperCase().slice(0,2),I=m.useCallback(R=>{const B={id:`local_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:R,timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{isLocal:!0}};a(z=>(console.log("ChatView: Adding local message:",B.id),[...z,B]))},[]);m.useEffect(()=>{var R,B,z,H,j;console.log("💬 ChatView loading state:",{isLoading:u,hasActiveSession:!!((R=e==null?void 0:e.getCurrentSession)!=null&&R.call(e)),messagesCount:i.length,sessionId:(z=(B=e==null?void 0:e.getCurrentSession)==null?void 0:B.call(e))==null?void 0:z.id,hasStoredMessages:!!((j=(H=e==null?void 0:e.getChatMessages)==null?void 0:H.call(e))!=null&&j.length),isMobile:v,isFullscreen:b})},[u,i.length,e,v,b]);const _=m.useCallback((R=!1)=>{T.current&&(R?T.current.scrollIntoView({behavior:"auto"}):T.current.scrollIntoView({behavior:"smooth"}))},[]);m.useEffect(()=>{_(!0);const R=setTimeout(()=>{_(!1)},10);return()=>clearTimeout(R)},[i.length,_]),m.useEffect(()=>{if(C){_(!0);const R=setTimeout(()=>{_(!1)},50);return()=>clearTimeout(R)}},[C,_]),m.useEffect(()=>{const R=H=>{if(console.log("ChatView: Received message:",H),h(!1),C&&H.sender.type==="agent"){console.log("ChatView: Queuing agent message due to active interaction:",C.methodName),f(j=>[...j,H]);return}H.sender.type==="agent"&&l(!1),a(j=>{var W;if(j.some(L=>L.id===H.id))return console.log("ChatView: Message already exists, skipping:",H.id),j;if(console.log("ChatView: Adding new message:",H.id),H.sender.type==="agent"&&(g(L=>new Set(L).add(H.id)),!((W=H.metadata)!=null&&W.streaming))){const L=H.content.length*35+1e3;setTimeout(()=>{g(J=>{const O=new Set(J);return O.delete(H.id),O})},L)}return[...j,H]}),setTimeout(()=>_(!0),0)},B=H=>{var j;if(console.log("ChatView: Updated message:",H),C&&H.sender.type==="agent"){console.log("ChatView: Queuing agent message update due to active interaction:",C.methodName),f(F=>{const W=F.findIndex(L=>L.id===H.id);if(W>=0){const L=[...F];return L[W]=H,L}else return[...F,H]});return}a(F=>F.map(W=>W.id===H.id?{...H}:W)),setTimeout(()=>_(!0),0),(j=H.metadata)!=null&&j.streaming||g(F=>{const W=new Set(F);return W.delete(H.id),W})},z=H=>{console.log("ChatView: Sent message:",H),h(!1),a(j=>j.some(W=>W.id===H.id)?(console.log("ChatView: Sent message already exists, skipping:",H.id),j):(console.log("ChatView: Adding sent message:",H.id),[...j,H])),setTimeout(()=>_(!0),0)};return e.on("chat.message.received",R),e.on("chat.message.updated",B),e.on("chat.message.sent",z),()=>{e.off("chat.message.received",R),e.off("chat.message.updated",B),e.off("chat.message.sent",z)}},[e,C]),m.useEffect(()=>{const R=j=>{console.log("ChatView: RPC interaction started:",j);const F=e.getCurrentInteraction();console.log("ChatView: Got interaction from client:",F==null?void 0:F.methodName),E(F),l(!1),_(!0),setTimeout(()=>{_(!1)},100)},B=j=>{if(console.log("ChatView: RPC interaction completed:",j),E(null),y.length>0&&(console.log("ChatView: Processing",y.length,"queued messages"),a(F=>{const W=[...F];return y.forEach(L=>{var O;if(!W.some(se=>se.id===L.id)&&(console.log("ChatView: Adding queued message:",L.id),W.push(L),L.sender.type==="agent"&&(g(se=>new Set(se).add(L.id)),!((O=L.metadata)!=null&&O.streaming)))){const se=L.content.length*35+1e3;setTimeout(()=>{g(le=>{const De=new Set(le);return De.delete(L.id),De})},se)}}),W}),f([]),setTimeout(()=>_(!0),0)),j&&j.response&&j.response.success){let F=null;j.response.successView?F=j.response.successView:j.successView&&(F=j.successView),a(W=>{const L=[...W].reverse().findIndex(le=>le.sender.type==="participant");let J=W.length;L!==-1&&(J=W.length-L);const O={id:`success_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{type:"successView",view:F||d.jsx(u6,{})}};e&&typeof e.addChatMessage=="function"&&e.addChatMessage(O);const se=[...W];return se.splice(J,0,O),se})}},z=async j=>{C&&(console.log("ChatView: Dismissing active interaction due to timeout"),e.dismissCurrentInteraction()),E(null),y.length>0&&(console.log("ChatView: Processing",y.length,"queued messages after timeout"),a(W=>{const L=[...W];return y.forEach(J=>{var se;if(!L.some(le=>le.id===J.id)&&(L.push(J),J.sender.type==="agent"&&(g(le=>new Set(le).add(J.id)),!((se=J.metadata)!=null&&se.streaming)))){const le=J.content.length*35+1e3;setTimeout(()=>{g(De=>{const ut=new Set(De);return ut.delete(J.id),ut})},le)}}),L}),f([]),setTimeout(()=>_(!0),0));let F=null;j&&j.response&&j.response.timeoutView?F=j.response.timeoutView:j&&j.timeoutView&&(F=j.timeoutView),a(W=>{const L={id:`timeout_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"agent",name:$,type:"agent"},metadata:{type:"timeoutView",view:F||d.jsx(f6,{})}};return e&&typeof e.addChatMessage=="function"&&e.addChatMessage(L),[...W,L]}),setTimeout(()=>{e.getCurrentInteraction()||E(null)},100)},H=async j=>{console.log("ChatView: RPC interaction dismissed:",j),console.log("ChatView: Current interaction before dismiss:",C==null?void 0:C.methodName),E(null),y.length>0&&(console.log("ChatView: Processing",y.length,"queued messages after dismissal"),a(F=>{const W=[...F];return y.forEach(L=>{var O;if(!W.some(se=>se.id===L.id)&&(W.push(L),L.sender.type==="agent"&&(g(se=>new Set(se).add(L.id)),!((O=L.metadata)!=null&&O.streaming)))){const se=L.content.length*35+1e3;setTimeout(()=>{g(le=>{const De=new Set(le);return De.delete(L.id),De})},se)}}),W}),f([]),setTimeout(()=>_(!0),0)),setTimeout(()=>{const F=e.getCurrentInteraction();console.log("ChatView: Latest interaction from client after dismiss:",(F==null?void 0:F.methodName)||"null"),F===null&&E(null)},50),console.log("ChatView: Set currentInteraction to null after dismiss")};return e.on("rpc.interaction.started",R),e.on("rpc.interaction.completed",B),e.on("rpc.interaction.timeout",z),e.on("rpc.interaction.dismissed",H),()=>{e.off("rpc.interaction.started",R),e.off("rpc.interaction.completed",B),e.off("rpc.interaction.timeout",z),e.off("rpc.interaction.dismissed",H)}},[e]),m.useEffect(()=>{const R=()=>{if(console.log("ChatView: Agent is thinking"),C){console.log("ChatView: Suppressing thinking indicator due to active interaction:",C.methodName);return}l(!0)},B=()=>{console.log("ChatView: Agent is speaking"),l(!1)};return e.on("agent.thinking",R),e.on("agent.speaking",B),()=>{e.off("agent.thinking",R),e.off("agent.speaking",B)}},[e,C]),m.useEffect(()=>{const R=e.getCurrentInteraction();R?(console.log("ChatView: Restoring interaction state on mount/client change:",R.methodName),E(R)):E(null)},[e]),m.useEffect(()=>{console.log("ChatView: Display type changed to:",s,"Current interaction:",(C==null?void 0:C.methodName)||"none")},[s,C]);const K=async R=>{try{C&&(console.log("ChatView: Dismissing active interaction due to user message send"),e.dismissCurrentInteraction(),E(null)),await e.sendChatMessage(R)}catch(B){console.error("Failed to send message:",B)}},Y=async R=>{try{C&&(console.log("ChatView: Dismissing active interaction due to user attachment send"),e.dismissCurrentInteraction(),E(null)),await e.sendAttachments(R),console.log("Attachments sent successfully:",R.map(B=>B.name))}catch(B){console.error("Failed to send attachments:",B)}},[X,G]=m.useState([]);if(m.useEffect(()=>{const R=B=>{G(Array.isArray(B)?B:["tes","hello how are you","algebra make me learn that ","what is the meaning of life"])};return e.on("suggested.response",R),()=>{e.off("suggested.response",R)}},[e]),u){const R=b&&v?"fixed inset-0 z-[9999] flex flex-col items-center justify-center h-screen w-screen bg-black":"flex w-full flex-col items-center justify-center h-full p-8";return d.jsxs("div",{className:R,children:[d.jsx("div",{className:`${k.spinner} w-12 h-12 mb-6`}),d.jsxs("p",{className:`text-sm text-center ${b&&v?"text-white":""}`,children:["Connecting to ",$,"..."]})]})}const U=b&&v?"fullscreen":s,M=U==="fullscreen"?b&&v?"fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black":"flex flex-col h-full w-full max-w-none":"flex flex-col h-full w-full backdrop-blur-sm",q=U==="fullscreen"?b&&v?"flex items-center w-full justify-between px-4 pt-3 pb-3 bg-black/80 text-white border-b border-gray-700":`flex items-center w-full justify-between px-6 pt-5 pb-4 border-b ${k.chatHeader.container}`:`flex items-center w-full justify-between px-4 pt-5 pb-4 border-b ${k.chatHeader.container}`,N=U==="fullscreen"?b&&v?"flex-1 overflow-y-auto scrollbar-hide p-4 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto scrollbar-hide p-6 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto scrollbar-hide w-full p-4 chat-scrollable min-h-0",V="flex-shrink-0 !w-full",Z=()=>{S(!1),n&&n()};return d.jsxs("div",{className:M,children:[d.jsx("div",{className:q,children:d.jsxs("div",{className:"flex items-center gap-2",children:[b&&v&&d.jsx(ae.button,{onClick:Z,whileHover:{scale:1.05},whileTap:{scale:.95},className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors mr-2","aria-label":"Exit fullscreen",children:"✕"}),d.jsxs("div",{children:[d.jsx("h3",{className:`font-semibold text-base leading-tight ${b&&v?"text-white":k.text.primary}`,children:$}),d.jsxs("p",{className:`text-xs flex items-center gap-1.5 mt-0.5 ${b&&v?"text-gray-300":k.text.muted}`,children:[d.jsx("span",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),"Online"]})]})]})}),d.jsxs("div",{className:`${N} flex flex-col`,style:{scrollBehavior:"smooth",scrollbarWidth:"none"},children:[" ",i.length===0?d.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center py-12",children:[d.jsx(ae.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl",children:x}),d.jsxs("p",{className:`text-base mb-2 ${b&&v?"text-white":k.text.secondary}`,children:[$," is joining..."]}),d.jsx("p",{className:`text-xs ${b&&v?"text-gray-300":k.text.muted}`,children:"Your conversation will begin shortly"})]}):d.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:d.jsxs("div",{className:"space-y-3",children:[i.map((R,B)=>{var z,H;return d.jsx("div",{children:((z=R.metadata)==null?void 0:z.type)==="successView"?d.jsx("div",{className:"flex w-full justify-end mb-4 px-1",children:d.jsxs("div",{className:"relative group flex-row-reverse flex items-end gap-3 max-w-[85%]",children:[d.jsx(ae.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:"Y"}),d.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-br-md message-hover border-gray-200 dark:border-gray-700 ${k.chatMessage.own}`,children:[R.metadata.view,d.jsx("div",{className:`text-xs ${k.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:R.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):((H=R.metadata)==null?void 0:H.type)==="timeoutView"?d.jsx("div",{className:"flex w-full justify-start mb-4 px-1",children:d.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[d.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:x}),d.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${k.chatMessage.other}`,children:[R.metadata.view,d.jsx("div",{className:`text-xs ${k.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:R.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):d.jsx(a6,{message:R,theme:t,isOwn:R.sender.type==="participant",isStreaming:p.has(R.id)})},R.id)}),c&&!C&&d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:i.length*.1},className:"flex w-full justify-start mb-4 px-1",children:d.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[d.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:x}),d.jsx("div",{className:`relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover ${k.chatMessage.other} rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]`,style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:d.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(R=>d.jsx(ae.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:R*.2,ease:"easeInOut"}},R))})})]})}),C&&C.presentationMode==="embedded"&&d.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[d.jsx(ae.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:x}),d.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${k.chatMessage.other}`,children:[d.jsx(Fn,{interaction:C,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:I},C.methodName),d.jsx(ae.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},className:`text-xs ${k.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),d.jsx("div",{ref:T})]})})]}),X.length>0&&d.jsx("div",{className:"w-full flex overflow-x-auto gap-2 px-4 py-2 mb-1 scrollbar-hide",children:X.map((R,B)=>{var z;return d.jsx("button",{className:`whitespace-nowrap px-3 py-1 rounded-full border shadow-sm flex-shrink-0 transition-all duration-150 font-medium text-sm focus:outline-none focus:ring-2 focus:ring-blue-400/40
245
245
  ${t==="light"?"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900":t==="dark"?"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white":((z=k.suggestedResponse)==null?void 0:z.container)||"bg-gradient-to-br from-blue-500 to-purple-600 text-white border-blue-400 hover:from-blue-600 hover:to-purple-700"}
246
- `,style:{boxShadow:t==="vox"?"0 2px 8px 0 rgba(80,60,200,0.10)":void 0,borderWidth:1},onClick:()=>{K(N),G([])},children:N},N+B)})}),C&&C.presentationMode!=="embedded"&&d.jsx(Fn,{interaction:C,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:I},C.methodName),d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:V,children:d.jsx(r6,{onSendMessage:K,onSendAttachments:Y,disabled:r,theme:t,onEndChat:o})})]})}function f6({onToggleCamera:e,onToggleScreenShare:t,onEndCall:n,onBack:r,theme:s,cameraEnabled:o,screenShareEnabled:i,isCameraLoading:a,isScreenShareLoading:c,disabled:l}){const u=_e(s);return d.jsxs("div",{className:`flex items-center justify-center gap-3 p-4 ${u.video.controlsBackground}`,children:[d.jsx("button",{onClick:e,disabled:l||a,className:`p-3 rounded-full transition-all duration-200 ${o?u.video.controlEnabled:u.video.controlDisabled} ${l?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:o?"Turn off camera":"Turn on camera",children:a?d.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):o?d.jsx(rm,{className:"w-5 h-5"}):d.jsx(nm,{className:"w-5 h-5"})}),d.jsx("button",{onClick:t,disabled:l||c,className:`p-3 rounded-full transition-all duration-200 ${i?u.video.controlEnabled:u.video.controlDisabled} ${l?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:i?"Stop screen share":"Share screen",children:c?d.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):i?d.jsx(uS,{className:"w-5 h-5"}):d.jsx(hS,{className:"w-5 h-5"})}),n&&d.jsx("button",{onClick:n,disabled:l,className:`p-3 rounded-full transition-all duration-200 ${u.video.endCall} ${l?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"End call",children:d.jsx(sm,{className:"w-5 h-5"})}),r&&d.jsx("button",{onClick:r,disabled:l,className:`p-3 rounded-full transition-all duration-200 ${u.video.controlDisabled} ${l?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"Back",children:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})})})]})}function $d({trackRef:e,participant:t,isLocal:n=!1,className:r="",theme:s}){var c;const o=_e(s),i=(t==null?void 0:t.name)||(t==null?void 0:t.identity)||(n?"You":"Participant"),a=(e==null?void 0:e.publication)&&!e.publication.isMuted;return d.jsxs("div",{className:`relative rounded-lg overflow-hidden ${o.video.tile} ${r}`,children:[a?d.jsx(Me.VideoTrack,{trackRef:e,className:"w-full h-full object-cover"}):d.jsx("div",{className:`w-full h-full flex items-center justify-center ${o.video.placeholder}`,children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:`w-16 h-16 mx-auto mb-2 rounded-full flex items-center justify-center ${o.video.avatar}`,children:d.jsx(SS,{className:"w-8 h-8"})}),d.jsx("p",{className:"text-sm opacity-80",children:i}),d.jsx("p",{className:"text-xs opacity-60",children:"Camera off"})]})}),d.jsx("div",{className:`absolute bottom-2 left-2 px-2 py-1 rounded text-xs ${o.video.nameOverlay}`,children:i}),((c=e==null?void 0:e.publication)==null?void 0:c.isMuted)&&d.jsx("div",{className:`absolute top-2 right-2 p-1 rounded ${o.video.mutedIndicator}`,children:d.jsx(nm,{className:"w-4 h-4"})})]})}function h6({trackRefs:e,participants:t,theme:n,localParticipant:r}){const s=e.find(u=>u.source===te.Track.Source.Camera&&u.participant===r),o=e.filter(u=>u.participant!==r),i=e.length,a=i<=1?1:i<=4?2:3,c="grid gap-2 h-full",l={gridTemplateColumns:`repeat(${a}, 1fr)`,gridAutoRows:"minmax(0, 1fr)"};return d.jsxs("div",{className:c,style:l,children:[s&&r&&d.jsx($d,{trackRef:s,participant:r,isLocal:!0,theme:n,className:"min-h-0"}),o.map((u,h)=>{var p;return d.jsx($d,{trackRef:u,participant:u.participant,isLocal:!1,theme:n,className:"min-h-0"},((p=u.publication)==null?void 0:p.trackSid)||h)}),i===0&&d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsxs("div",{className:"text-center",children:[d.jsx(ES,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),d.jsx("p",{className:"text-lg opacity-70",children:"Waiting for participants..."}),d.jsx("p",{className:"text-sm opacity-50",children:"Turn on your camera to start the video call"})]})})]})}function m6({client:e,theme:t="vox",onBack:n,disabled:r=!1,displayType:s,onEndCall:o}){const i=_e(t),a=Me.useMaybeRoomContext(),[c,l]=m.useState(!1),[u,h]=m.useState(!1),[p,g]=m.useState(!1),[y,f]=m.useState(!1),[v,w]=m.useState(null),b=Me.useTracks([te.Track.Source.Camera,te.Track.Source.ScreenShare],{onlySubscribed:!1});b.filter(k=>k.source===te.Track.Source.Camera),b.filter(k=>k.source===te.Track.Source.ScreenShare);const S=m.useMemo(()=>a?Array.from(a.remoteParticipants.values()):[],[a]),C=m.useCallback(async()=>{if(!(!a||p)){g(!0);try{const k=a.localParticipant;c?(await k.setCameraEnabled(!1),l(!1)):(await k.setCameraEnabled(!0),l(!0))}catch(k){console.error("Failed to toggle camera:",k)}finally{g(!1)}}},[a,c,p]),E=m.useCallback(async()=>{if(!(!a||y)){f(!0);try{const k=a.localParticipant;u?(await k.setScreenShareEnabled(!1),h(!1)):(await k.setScreenShareEnabled(!0),h(!0))}catch(k){console.error("Failed to toggle screen share:",k)}finally{f(!1)}}},[a,u,y]),T=m.useCallback(()=>{o?o():n&&n()},[o,n]);return m.useEffect(()=>{if(!e)return;const k=P=>{console.log("📺 Video: Interactive UI state updated:",P),w(P)};return e.on("interactive.ui.update",k),e.on("interactive.ui.show",k),()=>{e.off("interactive.ui.update",k),e.off("interactive.ui.show",k)}},[e]),d.jsxs("div",{className:`flex flex-col h-full ${i.video.container}`,children:[d.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${i.video.header}`,children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:`w-3 h-3 rounded-full ${i.video.statusDot}`}),d.jsx("span",{className:"font-medium",children:"Video Call"}),d.jsxs("span",{className:"text-sm opacity-70",children:[S.length+1," participant",S.length!==0?"s":""]})]}),d.jsx("div",{className:"flex items-center gap-2",children:d.jsx("button",{className:`p-2 rounded-lg transition-colors ${i.video.headerButton}`,title:"Layout options",children:d.jsx(lS,{className:"w-4 h-4"})})})]}),d.jsx("div",{className:"flex-1 p-4 min-h-0",children:d.jsx(h6,{trackRefs:b,participants:S,localParticipant:a==null?void 0:a.localParticipant,theme:t})}),v&&d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"absolute inset-4 z-10",children:d.jsx(Fn,{interaction:v,onDismiss:()=>w(null),theme:t})}),d.jsx(f6,{onToggleCamera:C,onToggleScreenShare:E,onEndCall:T,onBack:n,theme:t,cameraEnabled:c,screenShareEnabled:u,isCameraLoading:p,isScreenShareLoading:y,disabled:r})]})}function ts({onClick:e,disabled:t,theme:n}){const r=_e(n);return d.jsx("button",{className:r.micButton,onClick:e,disabled:t,"aria-label":"Start Voice Session",type:"button",children:d.jsx(Im,{})})}function Zo({onClick:e,disabled:t,theme:n}){const r=_e(n);return d.jsx("button",{className:r.chatButton,onClick:e,disabled:t,"aria-label":"Start Chat Session",type:"button",children:d.jsx(Vm,{})})}function Ko({onClick:e,disabled:t,theme:n}){const r=_e(n);return d.jsx("button",{className:r.videoButton,onClick:e,disabled:t,"aria-label":"Start Video Session",type:"button",children:d.jsx(Dm,{})})}function p6({prompts:e,theme:t}){const n=_e(t),[r,s]=A.useState(0);return A.useEffect(()=>{const o=setInterval(()=>{s(i=>(i+1)%e.length)},3e3);return()=>clearInterval(o)},[e.length]),d.jsx("div",{className:"w-96 min-h-[3rem] h-12 relative overflow-hidden flex items-center justify-center",children:e.map((o,i)=>d.jsx("div",{className:`
246
+ `,style:{boxShadow:t==="vox"?"0 2px 8px 0 rgba(80,60,200,0.10)":void 0,borderWidth:1},onClick:()=>{K(R),G([])},children:R},R+B)})}),C&&C.presentationMode!=="embedded"&&d.jsx(Fn,{interaction:C,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:I},C.methodName),d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:V,children:d.jsx(o6,{onSendMessage:K,onSendAttachments:Y,disabled:r,theme:t,onEndChat:o})})]})}function m6({onToggleCamera:e,onToggleScreenShare:t,onEndCall:n,onBack:r,theme:s,cameraEnabled:o,screenShareEnabled:i,isCameraLoading:a,isScreenShareLoading:c,disabled:l}){const u=_e(s);return d.jsxs("div",{className:`flex items-center justify-center gap-3 p-4 ${u.video.controlsBackground}`,children:[d.jsx("button",{onClick:e,disabled:l||a,className:`p-3 rounded-full transition-all duration-200 ${o?u.video.controlEnabled:u.video.controlDisabled} ${l?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:o?"Turn off camera":"Turn on camera",children:a?d.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):o?d.jsx(rm,{className:"w-5 h-5"}):d.jsx(nm,{className:"w-5 h-5"})}),d.jsx("button",{onClick:t,disabled:l||c,className:`p-3 rounded-full transition-all duration-200 ${i?u.video.controlEnabled:u.video.controlDisabled} ${l?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:i?"Stop screen share":"Share screen",children:c?d.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):i?d.jsx(hS,{className:"w-5 h-5"}):d.jsx(pS,{className:"w-5 h-5"})}),n&&d.jsx("button",{onClick:n,disabled:l,className:`p-3 rounded-full transition-all duration-200 ${u.video.endCall} ${l?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"End call",children:d.jsx(sm,{className:"w-5 h-5"})}),r&&d.jsx("button",{onClick:r,disabled:l,className:`p-3 rounded-full transition-all duration-200 ${u.video.controlDisabled} ${l?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"Back",children:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})})})]})}function $d({trackRef:e,participant:t,isLocal:n=!1,className:r="",theme:s}){var c;const o=_e(s),i=(t==null?void 0:t.name)||(t==null?void 0:t.identity)||(n?"You":"Participant"),a=(e==null?void 0:e.publication)&&!e.publication.isMuted;return d.jsxs("div",{className:`relative rounded-lg overflow-hidden ${o.video.tile} ${r}`,children:[a?d.jsx(Me.VideoTrack,{trackRef:e,className:"w-full h-full object-cover"}):d.jsx("div",{className:`w-full h-full flex items-center justify-center ${o.video.placeholder}`,children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:`w-16 h-16 mx-auto mb-2 rounded-full flex items-center justify-center ${o.video.avatar}`,children:d.jsx(ES,{className:"w-8 h-8"})}),d.jsx("p",{className:"text-sm opacity-80",children:i}),d.jsx("p",{className:"text-xs opacity-60",children:"Camera off"})]})}),d.jsx("div",{className:`absolute bottom-2 left-2 px-2 py-1 rounded text-xs ${o.video.nameOverlay}`,children:i}),((c=e==null?void 0:e.publication)==null?void 0:c.isMuted)&&d.jsx("div",{className:`absolute top-2 right-2 p-1 rounded ${o.video.mutedIndicator}`,children:d.jsx(nm,{className:"w-4 h-4"})})]})}function p6({trackRefs:e,participants:t,theme:n,localParticipant:r}){const s=e.find(u=>u.source===te.Track.Source.Camera&&u.participant===r),o=e.filter(u=>u.participant!==r),i=e.length,a=i<=1?1:i<=4?2:3,c="grid gap-2 h-full",l={gridTemplateColumns:`repeat(${a}, 1fr)`,gridAutoRows:"minmax(0, 1fr)"};return d.jsxs("div",{className:c,style:l,children:[s&&r&&d.jsx($d,{trackRef:s,participant:r,isLocal:!0,theme:n,className:"min-h-0"}),o.map((u,h)=>{var p;return d.jsx($d,{trackRef:u,participant:u.participant,isLocal:!1,theme:n,className:"min-h-0"},((p=u.publication)==null?void 0:p.trackSid)||h)}),i===0&&d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsxs("div",{className:"text-center",children:[d.jsx(TS,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),d.jsx("p",{className:"text-lg opacity-70",children:"Waiting for participants..."}),d.jsx("p",{className:"text-sm opacity-50",children:"Turn on your camera to start the video call"})]})})]})}function g6({client:e,theme:t="vox",onBack:n,disabled:r=!1,displayType:s,onEndCall:o}){const i=_e(t),a=Me.useMaybeRoomContext(),[c,l]=m.useState(!1),[u,h]=m.useState(!1),[p,g]=m.useState(!1),[y,f]=m.useState(!1),[v,w]=m.useState(null),b=Me.useTracks([te.Track.Source.Camera,te.Track.Source.ScreenShare],{onlySubscribed:!1});b.filter(k=>k.source===te.Track.Source.Camera),b.filter(k=>k.source===te.Track.Source.ScreenShare);const S=m.useMemo(()=>a?Array.from(a.remoteParticipants.values()):[],[a]),C=m.useCallback(async()=>{if(!(!a||p)){g(!0);try{const k=a.localParticipant;c?(await k.setCameraEnabled(!1),l(!1)):(await k.setCameraEnabled(!0),l(!0))}catch(k){console.error("Failed to toggle camera:",k)}finally{g(!1)}}},[a,c,p]),E=m.useCallback(async()=>{if(!(!a||y)){f(!0);try{const k=a.localParticipant;u?(await k.setScreenShareEnabled(!1),h(!1)):(await k.setScreenShareEnabled(!0),h(!0))}catch(k){console.error("Failed to toggle screen share:",k)}finally{f(!1)}}},[a,u,y]),T=m.useCallback(()=>{o?o():n&&n()},[o,n]);return m.useEffect(()=>{if(!e)return;const k=P=>{console.log("📺 Video: Interactive UI state updated:",P),w(P)};return e.on("interactive.ui.update",k),e.on("interactive.ui.show",k),()=>{e.off("interactive.ui.update",k),e.off("interactive.ui.show",k)}},[e]),d.jsxs("div",{className:`flex flex-col h-full ${i.video.container}`,children:[d.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${i.video.header}`,children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:`w-3 h-3 rounded-full ${i.video.statusDot}`}),d.jsx("span",{className:"font-medium",children:"Video Call"}),d.jsxs("span",{className:"text-sm opacity-70",children:[S.length+1," participant",S.length!==0?"s":""]})]}),d.jsx("div",{className:"flex items-center gap-2",children:d.jsx("button",{className:`p-2 rounded-lg transition-colors ${i.video.headerButton}`,title:"Layout options",children:d.jsx(uS,{className:"w-4 h-4"})})})]}),d.jsx("div",{className:"flex-1 p-4 min-h-0",children:d.jsx(p6,{trackRefs:b,participants:S,localParticipant:a==null?void 0:a.localParticipant,theme:t})}),v&&d.jsx(ae.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"absolute inset-4 z-10",children:d.jsx(Fn,{interaction:v,onDismiss:()=>w(null),theme:t})}),d.jsx(m6,{onToggleCamera:C,onToggleScreenShare:E,onEndCall:T,onBack:n,theme:t,cameraEnabled:c,screenShareEnabled:u,isCameraLoading:p,isScreenShareLoading:y,disabled:r})]})}function ts({onClick:e,disabled:t,theme:n}){const r=_e(n);return d.jsx("button",{className:r.micButton,onClick:e,disabled:t,"aria-label":"Start Voice Session",type:"button",children:d.jsx(Im,{})})}function Zo({onClick:e,disabled:t,theme:n}){const r=_e(n);return d.jsx("button",{className:r.chatButton,onClick:e,disabled:t,"aria-label":"Start Chat Session",type:"button",children:d.jsx(Vm,{})})}function Ko({onClick:e,disabled:t,theme:n}){const r=_e(n);return d.jsx("button",{className:r.videoButton,onClick:e,disabled:t,"aria-label":"Start Video Session",type:"button",children:d.jsx(Dm,{})})}function y6({prompts:e,theme:t}){const n=_e(t),[r,s]=A.useState(0);return A.useEffect(()=>{const o=setInterval(()=>{s(i=>(i+1)%e.length)},3e3);return()=>clearInterval(o)},[e.length]),d.jsx("div",{className:"w-96 min-h-[3rem] h-12 relative overflow-hidden flex items-center justify-center",children:e.map((o,i)=>d.jsx("div",{className:`
247
247
  ${n.promptSlider}
248
248
  ${i===r?"opacity-100":"opacity-0"}
249
249
  whitespace-pre-line break-words
250
- `,style:{minHeight:"2.5rem",display:i===r?"block":"none"},children:o},i))})}function g6({statusMessage:e,theme:t}){const n=_e(t);return d.jsxs("div",{className:"z-10 flex items-center space-x-2 mt-2 pb-2",children:[d.jsx("div",{className:n.statusIndicator}),d.jsx("span",{className:`text-xs ${n.text.muted}`,children:e})]})}const y6=({disabled:e,onStartCall:t,onStartChat:n,onStartVideo:r,prompts:s=['"Book a meeting with the marketing team"',`"What's the status of project Alpha?"`,`"Summarize yesterday's sales report"`,'"Find a good Italian restaurant nearby"','"Remind me to call John tomorrow at 10 AM"'],statusMessage:o="Agent is ready",title:i="Choose how to interact",subTitle:a="Ask me anything or give me a task to complete",theme:c="vox",modalities:l=["voice","chat","video"]})=>{const u=_e(c),h=l.includes("voice"),p=l.includes("chat"),g=l.includes("video"),y=[h,p,g].filter(Boolean).length;return console.log("🎯 Welcome component debug:",{modalities:l,hasVoice:h,hasChat:p,hasVideo:g,totalButtons:y,onStartVideo:!!r}),d.jsxs("div",{inert:e,className:"flex p-8 flex-col items-center h-full justify-center w-full",children:[d.jsxs("div",{className:"mt-1 relative flex items-center justify-center mb-8 w-full",style:{minHeight:"120px"},children:[d.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[d.jsx("div",{className:u.pulseRings.ring1}),d.jsx("div",{className:u.pulseRings.ring2,style:{animationDelay:"0.5s"}}),d.jsx("div",{className:u.pulseRings.ring3,style:{animationDelay:"1s"}})]}),d.jsx("div",{className:"relative z-10 flex items-center justify-center",children:h&&p&&g?d.jsxs("div",{className:"flex gap-4 items-center justify-center",children:[d.jsx(ts,{onClick:t,disabled:e,theme:c}),d.jsx(Zo,{onClick:n,disabled:e,theme:c}),d.jsx(Ko,{onClick:r||t,disabled:e,theme:c})]}):y>1?d.jsxs("div",{className:"flex gap-6 items-center justify-center",children:[h&&d.jsx(ts,{onClick:t,disabled:e,theme:c}),p&&d.jsx(Zo,{onClick:n,disabled:e,theme:c}),g&&r&&d.jsx(Ko,{onClick:r,disabled:e,theme:c})]}):d.jsx("div",{className:"flex items-center justify-center",children:h?d.jsx(ts,{onClick:t,disabled:e,theme:c}):p?d.jsx(Zo,{onClick:n,disabled:e,theme:c}):g&&r?d.jsx(Ko,{onClick:r,disabled:e,theme:c}):d.jsx(ts,{onClick:t,disabled:e,theme:c})})})]}),d.jsxs("div",{className:"text-center flex flex-col items-center gap-y-2 mb-6 w-full",children:[d.jsx("h3",{className:`text-xl font-semibold mb-2 ${u.text.accent}`,children:i}),d.jsx("p",{className:`text-sm leading-relaxed px-4 ${u.text.secondary}`,children:a}),y>1&&d.jsxs("div",{className:"flex gap-6 mt-4 text-xs justify-center",children:[h&&d.jsxs("div",{className:"flex flex-col items-center gap-1",children:[d.jsx(Im,{className:"w-4 h-4"}),d.jsx("span",{className:u.text.muted,children:"Voice"})]}),p&&d.jsxs("div",{className:"flex flex-col items-center gap-1",children:[d.jsx(Vm,{className:"w-4 h-4"}),d.jsx("span",{className:u.text.muted,children:"Chat"})]}),g&&d.jsxs("div",{className:"flex flex-col items-center gap-1",children:[d.jsx(Dm,{className:"w-4 h-4"}),d.jsx("span",{className:u.text.muted,children:"Video"})]})]})]}),d.jsx(p6,{prompts:s,theme:c}),d.jsx(g6,{statusMessage:o,theme:c})]})};function Om({room:e,onSessionEnd:t,onSessionStart:n,enableConsoleLogging:r=!0,enableLocalStorage:s=!0,voxketSessionId:o}={}){const[i,a]=m.useState(null),[c,l]=m.useState([]),[u,h]=m.useState(null),[p,g]=m.useState([]),y=m.useCallback((b,S)=>{const C={timestamp:new Date,event:b,data:S,sessionId:i==null?void 0:i.sessionId,participantId:u==null?void 0:u.identity};if(l(E=>[...E,C]),s){const E=JSON.parse(localStorage.getItem("voxket-session-logs")||"[]");E.push(C),localStorage.setItem("voxket-session-logs",JSON.stringify(E))}return C},[i==null?void 0:i.sessionId,u==null?void 0:u.identity,r,s]);m.useEffect(()=>{if(!e)return;const b=()=>{const x=o||`session-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,I=new Date,_={sessionId:x,startTime:I,totalMessages:0,connectionIssues:0,participantCount:p.length,events:[]};a(_),y("SESSION_STARTED",{sessionId:x,startTime:I}),n==null||n(x)},S=()=>{if(i){const x=new Date,I=x.getTime()-i.startTime.getTime(),_={...i,endTime:x,duration:I,events:c};y("SESSION_ENDED",{sessionId:i.sessionId,duration:`${Math.round(I/1e3)}s`,totalMessages:i.totalMessages,connectionIssues:i.connectionIssues}),t==null||t(_),a(null),l([])}},C=x=>{y("CONNECTION_STATE_CHANGED",{state:x}),x===te.ConnectionState.Reconnecting&&i&&(a(I=>I?{...I,connectionIssues:I.connectionIssues+1}:null),y("CONNECTION_ISSUE",{type:"reconnecting"}))},E=x=>{y("TRACK_PUBLISHED",{trackKind:x.kind,trackSource:x.source})},T=x=>{y("TRACK_UNPUBLISHED",{trackKind:x.kind,trackSource:x.source})},k=(x,I)=>{i&&a(_=>_?{..._,totalMessages:_.totalMessages+1}:null),y("DATA_RECEIVED",{participantId:I==null?void 0:I.identity,dataSize:x.length})},P=x=>{y("PARTICIPANT_CONNECTED",{participantId:x.identity,participantName:x.name}),g(I=>[...I,x]),i&&a(I=>I?{...I,participantCount:I.participantCount+1}:null)},$=x=>{y("PARTICIPANT_DISCONNECTED",{participantId:x.identity,participantName:x.name}),g(I=>I.filter(_=>_.identity!==x.identity))};return e.localParticipant&&h(e.localParticipant),e.on(te.RoomEvent.Connected,b),e.on(te.RoomEvent.Disconnected,S),e.on(te.RoomEvent.ConnectionStateChanged,C),e.on(te.RoomEvent.TrackPublished,E),e.on(te.RoomEvent.TrackUnpublished,T),e.on(te.RoomEvent.DataReceived,k),e.on(te.RoomEvent.ParticipantConnected,P),e.on(te.RoomEvent.ParticipantDisconnected,$),()=>{e.off(te.RoomEvent.Connected,b),e.off(te.RoomEvent.Disconnected,S),e.off(te.RoomEvent.ConnectionStateChanged,C),e.off(te.RoomEvent.TrackPublished,E),e.off(te.RoomEvent.TrackUnpublished,T),e.off(te.RoomEvent.DataReceived,k),e.off(te.RoomEvent.ParticipantConnected,P),e.off(te.RoomEvent.ParticipantDisconnected,$)}},[e,i,c,p.length,y,t,n]);const f=m.useCallback(()=>s?JSON.parse(localStorage.getItem("voxket-session-logs")||"[]"):c,[c,s]),v=m.useCallback(()=>{s&&localStorage.removeItem("voxket-session-logs"),l([])},[s]),w=m.useCallback(()=>{const b=f(),S=JSON.stringify(b,null,2),C="data:application/json;charset=utf-8,"+encodeURIComponent(S),E=`voxket-session-logs-${new Date().toISOString().split("T")[0]}.json`,T=document.createElement("a");T.setAttribute("href",C),T.setAttribute("download",E),T.click()},[f]);return{sessionMetrics:i,sessionLogs:c,logEvent:y,getSessionLogs:f,clearSessionLogs:v,exportSessionLogs:w}}var En={},Ld;function v6(){if(Ld)return En;Ld=1;var e=Fi;if(process.env.NODE_ENV==="production")En.createRoot=e.createRoot,En.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;En.createRoot=function(n,r){t.usingClientEntryPoint=!0;try{return e.createRoot(n,r)}finally{t.usingClientEntryPoint=!1}},En.hydrateRoot=function(n,r,s){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(n,r,s)}finally{t.usingClientEntryPoint=!1}}}return En}var x6=v6();class Ya{constructor(){je(this,"listeners",{})}on(t,n){return this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n),()=>this.off(t,n)}once(t,n){const r=(...s)=>{this.off(t,r),n(...s)};return this.on(t,r)}off(t,n){const r=this.listeners[t];if(!r)return;const s=r.indexOf(n);s>-1&&r.splice(s,1)}removeAllListeners(t){t?delete this.listeners[t]:this.listeners={}}emit(t,...n){const r=this.listeners[t];if(!r)return;const s=[...r];for(const o of s)try{o(...n)}catch(i){console.error(`Error in event listener for ${String(t)}:`,i)}}listenerCount(t){var n;return((n=this.listeners[t])==null?void 0:n.length)??0}eventNames(){return Object.keys(this.listeners)}}class $m{constructor(t){je(this,"plugins",new Map);je(this,"installedPlugins",new Set);je(this,"context");this.context={client:t,emit:t.emit.bind(t),on:t.on.bind(t),config:{}}}register(t){if(this.plugins.has(t.name))throw new Error(`Plugin '${t.name}' is already registered`);if(t.dependencies){for(const n of t.dependencies)if(!this.plugins.has(n))throw new Error(`Plugin '${t.name}' depends on '${n}' which is not registered`)}this.plugins.set(t.name,t)}async install(t,n){const r=this.plugins.get(t);if(!r)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t))throw new Error(`Plugin '${t}' is already installed`);if(r.dependencies)for(const o of r.dependencies)this.installedPlugins.has(o)||await this.install(o);const s={...this.context,config:{...r.config,...n}};r.install&&await r.install(s),this.installedPlugins.add(t),this.setupPluginEvents(r,s)}async uninstall(t){var r;const n=this.plugins.get(t);if(!n)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t)){for(const[s,o]of this.plugins)if(this.installedPlugins.has(s)&&((r=o.dependencies)!=null&&r.includes(t)))throw new Error(`Cannot uninstall '${t}' because '${s}' depends on it`);n.uninstall&&await n.uninstall(this.context),this.installedPlugins.delete(t)}}isInstalled(t){return this.installedPlugins.has(t)}getInstalledPlugins(){return Array.from(this.installedPlugins)}getAvailablePlugins(){return Array.from(this.plugins.keys())}getPluginInfo(t){return this.plugins.get(t)}setupPluginEvents(t,n){t.onSessionStart&&n.on("session.started",r=>{t.onSessionStart(n,r.id)}),t.onSessionEnd&&n.on("session.ended",r=>{t.onSessionEnd(n,r.id)}),t.onAgentResponse&&n.on("agent.response",r=>{t.onAgentResponse(n,r)})}}function b6(e){return e}function Ga(e,t,n){return{name:e,version:"1.0.0",description:`${t} modality plugin`,install:async r=>{n.onActivate&&await n.onActivate(r)},uninstall:async r=>{n.onDeactivate&&await n.onDeactivate(r)},onAgentResponse:n.onMessage}}const w6={name:"analytics",version:"1.0.0",description:"Built-in analytics tracking",install:async e=>{console.log("Analytics plugin installed"),e.on("session.started",t=>{console.log("Analytics: Session started",t.id)}),e.on("session.ended",(t,n)=>{console.log("Analytics: Session ended",t.id,n)}),e.on("chat.message.sent",t=>{console.log("Analytics: User message sent",t.content.length)})}},S6={name:"debug",version:"1.0.0",description:"Debug logging and development tools",install:async e=>{console.log("Debug plugin installed");const t=e.emit;e.emit=(n,...r)=>(console.log(`[Debug] Event: ${String(n)}`,r),t(n,...r))}},C6={name:"metrics",version:"1.0.0",description:"Advanced metrics collection",install:async e=>{console.log("Metrics plugin installed");const t=new Map;e.on("session.started",n=>{t.set(n.id,{startTime:Date.now(),events:[]})}),e.on("agent.response",n=>{console.log("Metrics: Agent response analyzed",{type:n.type,length:n.content.length,timestamp:n.timestamp})})}},Lm=A.createContext(null);function _m({config:e,children:t,autoConnect:n=!1}){const[r,s]=A.useState(null),[o,i]=A.useState(!1),[a,c]=A.useState(!1),[l,u]=A.useState(null),[h,p]=A.useState(null),[g,y]=A.useState("idle"),[f,v]=A.useState(null),[w,b]=A.useState([]),[S,C]=A.useState([]),[E,T]=A.useState([]);A.useEffect(()=>{const M=new Ir(e);return s(M),k(M),n&&P(M),()=>{M.disconnect().catch(console.error)}},[e,n]);const k=M=>{M.on("connection.connecting",()=>{c(!0),u(null)}),M.on("connection.connected",()=>{i(!0),c(!1),u(null)}),M.on("connection.disconnected",()=>{i(!1),c(!1),p(null),y("idle"),b([]),C([]),T([])}),M.on("connection.error",q=>{u(q),c(!1)}),M.on("session.created",q=>{p(q),y(q.state)}),M.on("session.state.changed",q=>{y(q),h&&p({...h,state:q})}),M.on("session.ended",(q,j)=>{p(null),y("idle"),v(j),b([]),C([]),T([])}),M.on("participant.joined",q=>{b(j=>[...j,q])}),M.on("participant.left",q=>{b(j=>j.filter(V=>V.id!==q.id))}),M.on("chat.message.received",q=>{C(j=>[...j,q])}),M.on("chat.message.sent",q=>{C(j=>[...j,q])}),M.on("transcription.received",q=>{T(j=>[...j,q])})},P=async M=>{const q=M||r;if(q)try{await q.connect()}catch(j){console.error("Failed to connect:",j)}},U={client:r,isConnected:o,isConnecting:a,connectionError:l,currentSession:h,sessionState:g,sessionMetrics:f,participants:w,chatMessages:S,transcriptions:E,connect:()=>P(),disconnect:async()=>{if(r)try{await r.disconnect()}catch(M){console.error("Failed to disconnect:",M)}},createSession:async(M,q={})=>{if(!r)throw new Error("Client not initialized");const j={agentId:M,participantName:q.participantName||"User",metadata:q.metadata,modalities:q.modalities||["voice"]};return await r.createSession(j)},endSession:async()=>r?await r.endSession():null,sendChatMessage:async M=>{if(!r)throw new Error("Client not initialized");await r.sendChatMessage(M)},setMicrophoneEnabled:async M=>{if(!r)throw new Error("Client not initialized");await r.setMicrophoneEnabled(M)},setCameraEnabled:async M=>{if(!r)throw new Error("Client not initialized");await r.setCameraEnabled(M)},startScreenShare:async()=>{if(!r)throw new Error("Client not initialized");await r.startScreenShare()},stopScreenShare:async()=>{if(!r)throw new Error("Client not initialized");await r.stopScreenShare()}};return d.jsx(Lm.Provider,{value:U,children:t})}function Et(){const e=A.useContext(Lm);if(!e)throw new Error("useVoxket must be used within a VoxketProvider");return e}class E6 extends Ya{constructor(n){super();je(this,"room",null);je(this,"registeredMethods",new Map);je(this,"activeInteractions",new Map);je(this,"currentInteraction",null);n&&this.setRoom(n)}setRoom(n){this.room=n}async registerFrontendRPC(n,r,s="embedded"){if(console.log(`RpcManager: Starting registration for method '${n}'`),!this.room)throw console.error(`RpcManager: Cannot register '${n}' - no room instance`),new Error("Room not initialized. Cannot register RPC method.");if(!this.room.localParticipant)throw console.error(`RpcManager: Cannot register '${n}' - no local participant`),new Error("Local participant not available for RPC registration");console.log(`RpcManager: Room state: ${this.room.state}`),console.log(`RpcManager: Local participant: ${this.room.localParticipant.identity}`),console.log(`RpcManager: Registering frontend RPC method: ${n}`);const o={methodName:n,component:r,presentationMode:s};this.registeredMethods.set(n,o);try{this.room.registerRpcMethod(n,async i=>{console.log(`RpcManager: RPC method '${n}' called by ${i.callerIdentity}`),console.log("RpcManager: Payload:",i.payload),this.emit("rpc.method.called",{methodName:n,data:i});let a;console.log(`RpcManager: Current registration for '${n}':`,o);let c=i.responseTimeout||30;try{a=JSON.parse(i.payload)}catch{a=i.payload}try{const l=await this.awaitUserInteraction(n,r,s,a,c);return JSON.stringify(l)}catch(l){throw console.error(`RpcManager: Error in RPC method '${n}':`,l),l}}),this.emit("rpc.method.registered",{methodName:n}),console.log(`RpcManager: Successfully registered RPC method: ${n}`)}catch(i){throw console.error(`RpcManager: Failed to register RPC method '${n}':`,i),i}}async awaitUserInteraction(n,r,s,o,i){return new Promise((a,c)=>{const l=`${n}_${Date.now()}`;console.log(`RpcManager: Starting user interaction for method: ${n}, timeout: ${i} seconds`);const u={didSuccess:(p,g)=>{console.log(`RpcManager: User interaction successful for method: ${n}`,p),this.clearInteraction(l),this.currentInteraction=null;const y={success:!0,message:"User interaction completed successfully",data:p,timestamp:new Date,...g?{successView:g}:{}};this.emit("rpc.interaction.completed",{methodName:n,response:y}),a(y)},didFail:p=>{console.log(`RpcManager: User interaction failed for method: ${n}`,p),this.clearInteraction(l);const g={success:!1,message:"User interaction failed",error:p,timestamp:new Date};this.emit("rpc.interaction.completed",{methodName:n,response:g}),a(g)},dismissView:()=>{var g;console.log(`RpcManager: User dismissed interaction for method: ${n}`),console.log("RpcManager: Current interaction before dismiss:",(g=this.currentInteraction)==null?void 0:g.methodName),this.clearInteraction(l),this.currentInteraction=null,console.log("RpcManager: Current interaction after dismiss:",this.currentInteraction);const p={success:!0,data:{dismissed:!0,reason:"User dismissed the interaction"},message:"User interaction dismissed",timestamp:new Date};this.emit("rpc.interaction.dismissed",{methodName:n,response:p}),this.emit("rpc.interaction.completed",{methodName:n,response:p}),setTimeout(()=>{var y;((y=this.currentInteraction)==null?void 0:y.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(p)},didTimeout:p=>{console.log(`RpcManager: User interaction timeout for method: ${n}`),this.clearInteraction(l),this.currentInteraction=null;const g={success:!0,message:`User interaction timed out after ${i} seconds, it should be considered as declined, agent don't need to retry`,timestamp:new Date,...p?{timeoutView:p}:{}};this.emit("rpc.interaction.timeout",{methodName:n,response:g}),setTimeout(()=>{var y;((y=this.currentInteraction)==null?void 0:y.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(g)}},h=setTimeout(()=>{u.didTimeout&&u.didTimeout()},i);this.activeInteractions.set(l,{resolve:p=>a(JSON.parse(p)),reject:c,timeoutId:h}),this.currentInteraction={isVisible:!0,methodName:n,component:r,presentationMode:s,timeout:i,data:o,handler:u},this.emit("rpc.interaction.started",{methodName:n,presentationMode:s}),setTimeout(async()=>{var p;if((p=this.currentInteraction)!=null&&p.handler)try{console.log(`RpcManager: Component created for method: ${n} with data:`,o)}catch(g){console.error("RpcManager: Error loading data into component:",g),u.didFail({error:"Failed to load data into component"})}},100)})}clearInteraction(n){const r=this.activeInteractions.get(n);r&&(console.log(`RpcManager: Clearing interaction: ${n}`),clearTimeout(r.timeoutId),this.activeInteractions.delete(n))}getCurrentInteraction(){return this.currentInteraction}dismissCurrentInteraction(){var n;this.currentInteraction&&(console.log(`RpcManager: Dismissing current interaction: ${this.currentInteraction.methodName}`),(n=this.currentInteraction.handler)==null||n.dismissView(),setTimeout(()=>{this.currentInteraction&&(console.log("RpcManager: Force clearing lingering interaction"),this.currentInteraction=null)},0))}getRegisteredMethods(){return Array.from(this.registeredMethods.keys())}unregisterMethod(n){this.registeredMethods.delete(n),console.log(`RpcManager: Unregistered RPC method: ${n}`)}clear(){for(const[n,r]of this.activeInteractions)clearTimeout(r.timeoutId);this.activeInteractions.clear(),this.registeredMethods.clear(),this.currentInteraction=null,console.log("RpcManager: Cleared all registrations and interactions")}}class ge extends Error{constructor(t,n,r){super(t),this.code=n,this.details=r,this.name="VoxketError"}}class Ir extends Ya{constructor(n){super();je(this,"config");je(this,"room",null);je(this,"pluginManager");je(this,"rpcManager");je(this,"isConnected",!1);je(this,"currentSession",null);je(this,"connectionState",te.ConnectionState.Disconnected);je(this,"renderedComponents",new Map);je(this,"textStreamHandlersRegistered",!1);je(this,"currentAgentInfo",null);je(this,"chatMessages",[]);this.config=n,this.pluginManager=new $m(this),this.rpcManager=new E6,this.setupEventListeners(),this.initializeClient()}setupEventListeners(){this.on("connection.connected",()=>{var n,r;this.isConnected=!0,(r=(n=this.config).onConnected)==null||r.call(n)}),this.on("connection.disconnected",n=>{var r,s;this.isConnected=!1,(s=(r=this.config).onDisconnected)==null||s.call(r,n)}),this.on("connection.error",n=>{var r,s;(s=(r=this.config).onError)==null||s.call(r,n)}),this.on("chat.message.received",n=>{var r,s;this.addChatMessage(n),(s=(r=this.config).onMessageReceived)==null||s.call(r,n)}),this.on("chat.message.updated",n=>{this.updateChatMessage(n)}),this.on("chat.message.sent",n=>{this.addChatMessage(n)}),this.on("transcription.received",n=>{var r,s;(s=(r=this.config).onTranscriptionReceived)==null||s.call(r,n)}),this.on("session.state.changed",n=>{var r,s;(s=(r=this.config).onSessionStateChanged)==null||s.call(r,n)}),this.on("session.created",n=>{var r,s;(s=(r=this.config).onSessionStart)==null||s.call(r,n.id)}),this.on("session.ended",(n,r)=>{var s,o;(o=(s=this.config).onSessionEnd)==null||o.call(s,r)}),this.on("participant.joined",n=>{var r,s;(s=(r=this.config).onUserJoined)==null||s.call(r,n.id)}),this.on("participant.left",n=>{var r,s;(s=(r=this.config).onUserLeft)==null||s.call(r,n.id)}),this.setupRpcEventForwarding()}setupRpcEventForwarding(){if(!this.rpcManager){console.warn("RpcManager not initialized, skipping event forwarding setup");return}this.rpcManager.on("rpc.method.registered",n=>this.emit("rpc.method.registered",n)),this.rpcManager.on("rpc.method.called",n=>this.emit("rpc.method.called",n)),this.rpcManager.on("rpc.interaction.started",n=>this.emit("rpc.interaction.started",n)),this.rpcManager.on("rpc.interaction.completed",n=>this.emit("rpc.interaction.completed",n)),this.rpcManager.on("rpc.interaction.timeout",n=>this.emit("rpc.interaction.timeout",n)),this.rpcManager.on("rpc.interaction.dismissed",n=>this.emit("rpc.interaction.dismissed",n))}initializeClient(){this.room=new te.Room,this.setupRoomEventListeners()}setupRoomEventListeners(){this.room&&(this.room.on(te.RoomEvent.Connected,()=>{var n,r;this.connectionState=te.ConnectionState.Connected,this.emit("connection.connected"),this.rpcManager.setRoom(this.room),(r=(n=this.currentSession)==null?void 0:n.activeModalities)!=null&&r.includes("voice")&&setTimeout(async()=>{var s;try{(s=this.room)!=null&&s.localParticipant&&(this.room.localParticipant.isMicrophoneEnabled?this.emit("track.unmuted",{source:"microphone",enabled:!0}):(await this.room.localParticipant.setMicrophoneEnabled(!0),this.emit("track.unmuted",{source:"microphone",enabled:!0})))}catch(o){console.warn("VoxketClient: Failed to enable microphone after room connection:",o)}},1e3),this.textStreamHandlersRegistered||this.setupTextStreamHandlers()}),this.room.on(te.RoomEvent.Disconnected,n=>{this.connectionState=te.ConnectionState.Disconnected,this.textStreamHandlersRegistered=!1,this.emit("connection.disconnected",n==null?void 0:n.toString())}),this.room.on(te.RoomEvent.ConnectionStateChanged,n=>{this.connectionState=n,n===te.ConnectionState.Connecting&&this.emit("connection.connecting")}),this.room.on(te.RoomEvent.ParticipantConnected,n=>{const r={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.joined",r)}),this.room.on(te.RoomEvent.ParticipantDisconnected,n=>{const r={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.left",r)}))}setupTextStreamHandlers(){if(this.room){try{this.room.registerTextStreamHandler("lk.chat",async(n,r)=>{try{const s=await n.readAll(),o={id:`msg_${Date.now()}_${r.identity||"user"}_${Math.random().toString(36).substr(2,9)}`,content:s,timestamp:new Date,sender:{id:r.identity||"user",name:r.identity||"User",type:"participant"},metadata:{topic:"lk.chat"}};this.emit("chat.message.received",o)}catch(s){console.error("VoxketClient: Failed to process lk.chat message:",s)}})}catch(n){console.warn("VoxketClient: lk.chat handler already registered, skipping:",n)}try{this.room.registerTextStreamHandler("lk.transcription",async(n,r)=>{var s,o;try{const i=`msg_${Date.now()}_agent_transcription_${Math.random().toString(36).substr(2,9)}`;let a="";const c=((s=this.currentAgentInfo)==null?void 0:s.name)||r.identity||"AI Assistant",l={id:i,content:"",timestamp:new Date,sender:{id:r.identity||"agent",name:c,type:"agent"},metadata:{topic:"lk.transcription",streaming:!0}};this.emit("chat.message.received",l);for await(const p of n){a+=p;const g=this.convertMarkdownToText(a),y={...l,content:g,metadata:{...l.metadata,streaming:!0}};this.emit("chat.message.updated",y)}const u=this.convertMarkdownToText(a),h={...l,content:u,metadata:{...l.metadata,streaming:!1}};this.emit("chat.message.updated",h)}catch(i){console.error("VoxketClient: Failed to process lk.transcription message:",i);try{const a=await n.readAll(),c=((o=this.currentAgentInfo)==null?void 0:o.name)||r.identity||"AI Assistant",l={id:`msg_${Date.now()}_agent_transcription_${Math.random().toString(36).substr(2,9)}`,content:a,timestamp:new Date,sender:{id:r.identity||"agent",name:c,type:"agent"},metadata:{topic:"lk.transcription"}};this.emit("chat.message.received",l)}catch(a){console.error("VoxketClient: Fallback failed for lk.transcription:",a)}}})}catch(n){console.warn("VoxketClient: lk.transcription handler already registered, skipping:",n)}try{this.room.registerTextStreamHandler("suggested_response",async n=>{const r=await n.readAll();let s=[];try{s=["tes","hello how are you","algebra make me learn that ","what is the meaning of life"]}catch(o){console.warn("VoxketClient: Failed to parse suggested_response:",o,r)}this.emit("suggested.response",s)})}catch(n){console.warn("VoxketClient: suggested_response handler already registered, skipping:",n)}try{this.room.registerTextStreamHandler("agent_state_changed",async(n,r)=>{const s=await n.readAll();let o={};try{o=typeof s=="string"?JSON.parse(s.replace(/'/g,'"')):s}catch(i){console.warn("VoxketClient: Failed to parse agent_state_changed:",i,s)}o.new_state==="speaking"?this.emit("agent.speaking",o):o.new_state==="thinking"&&this.emit("agent.thinking",o)})}catch(n){console.warn("VoxketClient: conversation_item_added handler already registered, skipping:",n)}try{this.room.registerTextStreamHandler("images",async(n,r)=>{try{const s=await n.readAll()}catch(s){console.error("VoxketClient: Error processing images stream:",s)}})}catch(n){console.warn("VoxketClient: images handler already registered, skipping:",n)}try{this.room.registerByteStreamHandler("images",async(n,r)=>{var s,o;try{const i=n.info,a={id:`img_${Date.now()}_${r.identity||"agent"}_${Math.random().toString(36).substr(2,9)}`,content:`�️ ${i.name||"Image"}`,sender:{id:r.identity||"agent",name:r.identity||"Agent",type:r.identity===((o=(s=this.room)==null?void 0:s.localParticipant)==null?void 0:o.identity)?"participant":"agent"},timestamp:new Date,metadata:{type:"attachment",fileName:i.name,fileSize:i.size,mimeType:i.mimeType,streamId:i.id,downloading:!0}};this.emit("chat.message.received",a),n.onProgress&&(n.onProgress=p=>{const g={...a,metadata:{...a.metadata,downloadProgress:p||0}};this.emit("chat.message.updated",g)});const c=[];for await(const p of n)c.push(p);const l=new Blob(c,{type:i.mimeType||"application/octet-stream"}),u=URL.createObjectURL(l),h={...a,metadata:{...a.metadata,downloading:!1,downloadProgress:1,downloadUrl:u,blob:l}};this.emit("chat.message.updated",h)}catch(i){console.error("VoxketClient: Error processing image attachment:",i)}})}catch(n){console.warn("VoxketClient: image handler already registered, skipping:",n)}this.textStreamHandlersRegistered=!0}}async fetchConnectionDetails(n,r,s){const o=n||this.config.agentId||"default-agent",i=r||this.config.participantName||"User",a=s||this.config.modalities||["voice"];try{const c={agent_id:o,participant_name:i,participant_metadata:{user_id:""},modality:a[0]},l=await fetch(`${this.config.baseUrl}/api/live/agent/session`,{method:"POST",headers:{accept:"application/json","X-APP-ID":this.config.appId,"X-APP-SECRET":this.config.appSecret,"Content-Type":"application/json"},body:JSON.stringify(c)});if(!l.ok){let p=`HTTP ${l.status}: Failed to fetch connection details`;try{const g=await l.json();g&&(g.error?p=`API Error: ${g.error}`:g.detail?p=`API Error: ${g.detail}`:g.message&&(p=`API Error: ${g.message}`))}catch{try{const y=await l.text();y&&(p=`API Error: ${y}`)}catch{}}throw new Error(p)}const u=await l.json();let h;return u.agent_info&&(h={id:u.agent_info.id||o,name:u.agent_info.name||"AI Assistant",avatar:u.agent_info.avatar,capabilities:u.agent_info.capabilities||["voice_interaction","text_chat"],metadata:u.agent_info.metadata||{}},this.currentAgentInfo=h),{serverUrl:u.wss_url,participantToken:u.token,voxketSessionId:u.session_id,agentInfo:h}}catch(c){console.error("VoxketClient: fetchConnectionDetails failed:",c);const l=new ge(`Failed to fetch connection details: ${c instanceof Error?c.message:"Unknown error"}`,"CONNECTION_FAILED",c);throw this.emit("connection.error",l),l}}async connect(n,r,s){var o;try{this.emit("connection.connecting");const i=await this.fetchConnectionDetails(n,r,s);return await((o=this.room)==null?void 0:o.connect(i.serverUrl,i.participantToken)),this.isConnected=!0,i}catch(i){console.error("VoxketClient: Connection failed:",i);const a=new ge(`Failed to connect to Voxket services: ${i instanceof Error?i.message:"Unknown error"}`,"CONNECTION_FAILED",i);throw this.emit("connection.error",a),a}}async disconnect(){var n;try{await((n=this.room)==null?void 0:n.disconnect()),this.isConnected=!1,this.currentSession=null,this.currentAgentInfo=null,this.textStreamHandlersRegistered=!1,this.clearChatMessages(),this.room=new te.Room,this.setupRoomEventListeners()}catch(r){const s=new ge("Failed to disconnect properly","NETWORK_ERROR",r);throw this.emit("connection.error",s),s}}async createSession(n){var r,s;try{const o=await this.connect(n.agentId,n.participantName,n.modalities),i={id:o.voxketSessionId,agentId:n.agentId,state:"connecting",startedAt:new Date,metadata:n.metadata||{},activeModalities:n.modalities||["voice"],agentInfo:o.agentInfo||this.currentAgentInfo};if(this.currentSession=i,this.emit("session.created",i),(r=n.modalities)!=null&&r.includes("voice"))try{await new Promise(a=>setTimeout(a,500)),(s=this.room)!=null&&s.localParticipant?(await this.room.localParticipant.setMicrophoneEnabled(!0,void 0,{preConnectBuffer:!0}),this.emit("track.unmuted",{source:"microphone",enabled:!0})):console.warn("VoxketClient: No local participant found, microphone not enabled")}catch(a){console.warn("VoxketClient: Failed to enable microphone, but continuing with session:",a)}return setTimeout(()=>{this.currentSession&&(this.currentSession.state="active",this.emit("session.state.changed","active",this.currentSession.state))},1e3),i}catch(o){throw console.error("VoxketClient: Failed to create session:",o),o instanceof ge?o:o instanceof TypeError&&o.message.includes("fetch")?new ge("Network connection failed","CONNECTION_FAILED",o):o instanceof Error&&o.message.includes("Failed to fetch connection details")?new ge(`API connection failed: ${o.message}`,"CONNECTION_FAILED",o):new ge(`Failed to create session: ${o instanceof Error?o.message:"Unknown error"}`,"SESSION_NOT_FOUND",o)}}async startSession(n,r){const s={agentId:n||this.config.agentId||"default-agent",participantName:(r==null?void 0:r.participantName)||this.config.participantName||"User",modalities:(r==null?void 0:r.modalities)||this.config.modalities||["voice","chat"],metadata:r==null?void 0:r.metadata};return this.createSession(s)}async endSession(){var n,r;if(!this.currentSession)return null;try{const s={sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((r=this.room)==null?void 0:r.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]};return this.currentSession.endedAt=new Date,this.currentSession.state="disconnected",this.emit("session.ended",this.currentSession,s),await this.disconnect(),s}catch(s){throw new ge("Failed to end session","SESSION_NOT_FOUND",s)}}getCurrentSession(){return this.currentSession}getCurrentAgentInfo(){return this.currentAgentInfo}getChatMessages(){return[...this.chatMessages]}addChatMessage(n){this.chatMessages.some(s=>s.id===n.id)||this.chatMessages.push(n)}updateChatMessage(n){const r=this.chatMessages.findIndex(s=>s.id===n.id);r!==-1&&(this.chatMessages[r]=n)}clearChatMessages(){this.chatMessages=[],this.dismissCurrentInteraction(),this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays(),this.emit("chat.history.cleared")}renderUI(n={}){var c,l,u;const r=this.resolveTarget(n.target||"body"),s=this.getTargetKey(r),o=this.renderedComponents.get(s);o&&o.target===r||this.removeUI(r);const i=(o==null?void 0:o.root)||x6.createRoot(r),a={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((c=n.modality)==null?void 0:c.includes("chat"))!==!1,suportsVideoInput:((l=n.modality)==null?void 0:l.includes("video"))===!0,suportsScreenShare:((u=n.modality)==null?void 0:u.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};i.render(m.createElement(_m,{config:this.config,autoConnect:n.autoStart||!1,children:m.createElement(Fm,a)})),this.renderedComponents.set(s,{root:i,target:r})}removeUI(n){const r=n?this.resolveTarget(n):null;if(r){const s=this.getTargetKey(r),o=this.renderedComponents.get(s);o&&(o.root.unmount(),this.renderedComponents.delete(s),r.querySelectorAll('[id*="voxket"], [class*="voxket"], .fixed.inset-0.z-50').forEach(a=>{try{a.remove()}catch(c){console.warn("Failed to remove element:",c)}}),r===document.body&&r.querySelectorAll(".fixed.z-50, .fixed.inset-0").forEach(c=>{if(c.classList.contains("bg-black")&&c.classList.contains("backdrop-blur-sm"))try{c.remove()}catch(l){console.warn("Failed to remove fixed element:",l)}}))}}removeAllUI(){for(const[n,r]of this.renderedComponents)r.root.unmount();this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays()}forceCleanupFullscreenOverlays(){document.body.querySelectorAll(".fixed.inset-0.z-50").forEach(r=>{if(r.classList.contains("bg-black")&&(r.classList.contains("backdrop-blur-sm")||r.classList.contains("bg-opacity-30")))try{r.remove()}catch(s){console.warn("Failed to remove overlay:",s)}})}resolveTarget(n){if(typeof n=="string"){const r=document.querySelector(n);if(!r)throw new Error(`Target element not found: ${n}`);return r}return n}getTargetKey(n){return n.id?n.id:n.className?n.tagName+"_"+n.className.replace(/\s+/g,"_"):n.tagName+"_"+n.outerHTML.length%1e3}async sendMessage(n,r){var s;if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new ge("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new ge("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new ge("No local participant","CONNECTION_FAILED");this.dismissCurrentInteraction();try{const o={id:`msg_${Date.now()}`,content:n,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:r||{}},i=await((s=this.room)==null?void 0:s.localParticipant.sendText(n,{topic:"lk.chat",destinationIdentities:[]}));this.emit("chat.message.sent",o)}catch(o){throw console.error("VoxketClient: Failed to send chat message:",o),new ge("Failed to send message","NETWORK_ERROR",o)}}async sendChatMessage(n,r){return this.sendMessage(n,r)}async sendAttachments(n,r){if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new ge("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new ge("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new ge("No local participant","CONNECTION_FAILED");if(!n||n.length===0)throw new ge("No files provided","INVALID_PARAMETER");this.dismissCurrentInteraction();const s=n.filter(o=>o.type.startsWith("image/"));if(s.length===0)throw new ge("Only image files are allowed","INVALID_PARAMETER");s.length!==n.length&&console.warn("VoxketClient: Some non-image files were filtered out");try{const o=s.map(async(i,a)=>{const l={id:`att_${Date.now()}_${a}`,content:`📎 ${i.name}`,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:{...r,type:"attachment",fileName:i.name,fileSize:i.size,mimeType:i.type,uploading:!0}};this.emit("chat.message.sent",l);const u=await this.room.localParticipant.sendFile(i,{mimeType:i.type,topic:"images",onProgress:p=>{const g={...l,metadata:{...l.metadata,uploadProgress:p}};this.emit("chat.message.updated",g)}});try{const p=new FileReader,g=new Promise((v,w)=>{p.onload=()=>{typeof p.result=="string"?v(p.result):w(new Error("Failed to convert to base64"))},p.onerror=w});p.readAsDataURL(i);const f={type:"image",data:await g,filename:i.name,mimeType:i.type,size:i.size};await this.room.localParticipant.sendText(JSON.stringify(f),{topic:"images",destinationIdentities:[]})}catch(p){console.warn("VoxketClient: Failed to send image data to agent:",p);try{const g=`I've shared an image: ${i.name}`;await this.room.localParticipant.sendText(g,{topic:"lk.chat",destinationIdentities:[]})}catch(g){console.warn("VoxketClient: Failed to send image notification to agent:",g)}}const h={...l,metadata:{...l.metadata,uploading:!1,uploadProgress:1,streamId:u.id}};return this.emit("chat.message.updated",h),u});await Promise.all(o)}catch(o){throw console.error("VoxketClient: Failed to send attachments:",o),new ge("Failed to send attachments","NETWORK_ERROR",o)}}async sendAttachment(n,r){return this.sendAttachments([n],r)}toggleMicrophone(n){return this.setMicrophoneEnabled(n!==!1)}async setMicrophoneEnabled(n){var r,s;try{const o=(r=this.room)==null?void 0:r.localParticipant.isMicrophoneEnabled,i=n??!o;await((s=this.room)==null?void 0:s.localParticipant.setMicrophoneEnabled(i)),i?this.emit("track.unmuted",{source:"microphone",enabled:!0}):this.emit("track.muted",{source:"microphone",enabled:!1})}catch(o){throw console.error("VoxketClient: Failed to toggle microphone:",o),new ge("Failed to toggle microphone","PERMISSION_DENIED",o)}}toggleCamera(n){return this.setCameraEnabled(n!==!1)}async setCameraEnabled(n){var r,s;try{const o=(r=this.room)==null?void 0:r.localParticipant.isCameraEnabled,i=n??!o;await((s=this.room)==null?void 0:s.localParticipant.setCameraEnabled(i)),i?this.emit("track.unmuted",{source:"camera",enabled:!0}):this.emit("track.muted",{source:"camera",enabled:!1})}catch(o){throw console.error("VoxketClient: Failed to toggle camera:",o),new ge("Failed to toggle camera","PERMISSION_DENIED",o)}}async enableCamera(){return this.setCameraEnabled(!0)}async disableCamera(){return this.setCameraEnabled(!1)}async startScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!0))}catch(r){throw new ge("Failed to start screen share","PERMISSION_DENIED",r)}}async stopScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!1))}catch(r){throw new ge("Failed to stop screen share","PERMISSION_DENIED",r)}}async getAudioInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(r=>r.kind==="audioinput")}catch(n){throw new ge("Failed to get audio input devices","DEVICE_ERROR",n)}}async getVideoInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(r=>r.kind==="videoinput")}catch(n){throw new ge("Failed to get video input devices","DEVICE_ERROR",n)}}async setAudioInputDevice(n){var r;try{if(!((r=this.room)!=null&&r.localParticipant))throw new Error("Not connected to room")}catch(s){throw new ge("Failed to set audio input device","DEVICE_ERROR",s)}}async setVideoInputDevice(n){var r;try{if(!((r=this.room)!=null&&r.localParticipant))throw new Error("Not connected to room")}catch(s){throw new ge("Failed to set video input device","DEVICE_ERROR",s)}}getLocalParticipant(){var n;return((n=this.room)==null?void 0:n.localParticipant)??null}getRemoteParticipants(){var n;return Array.from(((n=this.room)==null?void 0:n.remoteParticipants.values())??[])}getPublishPermissions(){const n=this.getLocalParticipant();if(!n)return{camera:!1,microphone:!1,screenShare:!1,data:!1};const r=n.permissions;if(!r)return{camera:!0,microphone:!0,screenShare:!0,data:!0};const s=o=>!!r.canPublish&&(r.canPublishSources.length===0||r.canPublishSources.includes(o));return{camera:s(1),microphone:s(2),screenShare:s(3),data:r.canPublishData??!1}}canPublishSource(n){return this.getPublishPermissions()[n]}getRoom(){return this.room}getConnectionState(){return this.connectionState}get connected(){return this.isConnected&&this.connectionState===te.ConnectionState.Connected}getMicrophoneTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,r]of n.trackPublications)if(r.source===te.Track.Source.Microphone)return r.track;return null}getCameraTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,r]of n.trackPublications)if(r.source===te.Track.Source.Camera)return r.track;return null}getScreenShareTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,r]of n.trackPublications)if(r.source===te.Track.Source.ScreenShare)return r.track;return null}get isMicrophoneEnabled(){const n=this.getMicrophoneTrack();return n?!n.isMuted:!1}get isCameraEnabled(){const n=this.getCameraTrack();return n?!n.isMuted:!1}get isScreenShareEnabled(){const n=this.getScreenShareTrack();return n?!n.isMuted:!1}registerPlugin(n){this.pluginManager.register(n)}getPluginManager(){return this.pluginManager}getParticipants(){if(!this.room)return[];const n=[];return this.room.localParticipant&&n.push({id:this.room.localParticipant.identity,name:this.room.localParticipant.name||this.room.localParticipant.identity,isLocal:!0}),this.room.remoteParticipants.forEach(r=>{n.push({id:r.identity,name:r.name||r.identity,isLocal:!1})}),n}getSessionMetrics(){var n,r;return this.currentSession?{sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((r=this.room)==null?void 0:r.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]}:null}updateConfig(n){this.config={...this.config,...n}}async startRecording(){var n;try{this.emit("recording.started",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(r){throw new ge("Failed to start recording","RECORDING_ERROR",r)}}async stopRecording(){var n;try{this.emit("recording.stopped",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(r){throw new ge("Failed to stop recording","RECORDING_ERROR",r)}}async registerFrontendRPC(n,r,s="embedded"){return this.rpcManager.registerFrontendRPC(n,r,s)}getCurrentInteraction(){return this.rpcManager.getCurrentInteraction()}dismissCurrentInteraction(){this.rpcManager.dismissCurrentInteraction()}getRegisteredRpcMethods(){return this.rpcManager.getRegisteredMethods()}unregisterRpcMethod(n){this.rpcManager.unregisterMethod(n)}registerEventListener(n,r){return this.on(n,r)}registerEventEmitter(n,r){if(!this.room)throw new Error("Room not available");try{this.room.registerTextStreamHandler(n,async s=>{try{const o=await s.readAll();r(o)}catch(o){console.error(`Error processing event for topic '${n}':`,o)}})}catch(s){console.warn(`VoxketClient: Handler for topic '${n}' may already be registered:`,s)}}convertMarkdownToText(n){if(!n)return"";let r=n;return r=r.replace(/\*\*(.*?)\*\*/g,"$1"),r=r.replace(/__(.*?)__/g,"$1"),r=r.replace(/\*(.*?)\*/g,"$1"),r=r.replace(/_(.*?)_/g,"$1"),r=r.replace(/~~(.*?)~~/g,"$1"),r=r.replace(/`([^`]+)`/g,"$1"),r=r.replace(/```[\s\S]*?```/g,""),r=r.replace(/^#{1,6}\s+/gm,""),r=r.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),r.trim()}}const k6=ae.create(t6),T6=ae.create(u6),A6=ae.create(m6),P6=ae.create(y6);function M6({onClick:e,text:t="Open Chat",position:n="bottom-right",theme:r}){const s={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"},o=_e(r);return d.jsx(ae.button,{onClick:e,className:`fixed ${s[n]} z-50 px-4 py-2 rounded-full shadow-lg ${o.popupTrigger} transition-all duration-200 hover:scale-105`,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},whileHover:{scale:1.05},whileTap:{scale:.95},children:t})}function _d({children:e,theme:t,displayType:n="widget",onClose:r,popupPosition:s="bottom-right",onExpand:o}){const i=_e(t);if(n==="fullscreen")return d.jsx("div",{className:"fixed inset-0 z-50 bg-black bg-opacity-30 backdrop-blur-sm flex items-center justify-center p-8",children:d.jsxs("div",{className:"w-full h-full max-w-6xl max-h-[90vh] rounded-2xl relative bg-transparent",children:[r&&d.jsx("button",{onClick:a=>{a.preventDefault(),a.stopPropagation(),r()},className:"absolute top-4 cursor-pointer right-4 z-[100] w-12 h-12 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 shadow-lg border border-gray-700 backdrop-blur-sm",title:"Exit Fullscreen",type:"button",children:d.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:d.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})})}),d.jsxs("div",{id:"voice-card",className:`${i.card} w-full h-full flex flex-col rounded-xl shadow-2xl`,style:{minHeight:"600px"},children:[d.jsx("div",{className:i.cardTopGradient}),d.jsx("div",{className:i.cardPurpleBlur}),d.jsx("div",{className:i.cardPinkBlur}),d.jsx("div",{className:" flex flex-col h-full",children:e}),d.jsx("div",{className:i.cardPulse1}),d.jsx("div",{className:i.cardPulse2,style:{animationDelay:"1s"}})]})]})});if(n==="popup"){const a={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"};return d.jsx("div",{className:"fixed rounded-2xl inset-0 z-50 pointer-events-none",children:d.jsxs("div",{className:`fixed rounded-2xl ${a[s]} pointer-events-auto`,children:[r&&d.jsx("button",{onClick:r,className:"absolute -top-2 -right-2 z-10 w-8 h-8 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 text-sm shadow-lg border border-gray-700",children:"×"}),d.jsxs("div",{id:"voice-card",className:`${i.card} rounded-2xl flex flex-col`,style:{width:"300px",height:"450px"},children:[d.jsx("div",{className:i.cardPurpleBlur}),d.jsx("div",{className:i.cardPinkBlur}),d.jsx("div",{className:" flex flex-col h-full",children:e}),d.jsx("div",{className:i.cardPulse1}),d.jsx("div",{className:i.cardPulse2,style:{animationDelay:"1s"}})]})]})})}return d.jsxs("div",{id:"voice-card",className:`${i.card}`,children:[o&&d.jsx("button",{onClick:o,className:"absolute top-4 right-4 z-20 w-10 h-10 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 shadow-lg border border-gray-700 backdrop-blur-sm",title:"Enter Fullscreen",children:d.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:d.jsx("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})}),d.jsx("div",{className:i.cardTopGradient}),d.jsx("div",{className:i.cardPurpleBlur}),d.jsx("div",{className:i.cardPinkBlur}),e,d.jsx("div",{className:i.cardPulse1}),d.jsx("div",{className:i.cardPulse2,style:{animationDelay:"1s"}})]})}function Fm(e){if(typeof window>"u")return null;console.log("🎯 Widget component rendering with props:",{displayType:e.displayType,popupPosition:e.popupPosition,theme:e.theme});const{agentId:t,participantName:n,baseUrl:r,appSecret:s,appId:o,prompts:i,statusMessage:a,welcomeTitle:c,welcomeSubTitle:l,className:u,width:h,height:p,loadingText:g,suportsChatInput:y=!0,suportsVideoInput:f=!0,suportsScreenShare:v=!0,theme:w="vox",onSessionStart:b,onSessionEnd:S,enableSessionLogging:C=!0,onSessionLogsUpdate:E,onSessionMetricsUpdate:T,modalities:k=["voice"],displayType:P="widget",popupPosition:$="bottom-right",popupTriggerText:x="Open Chat",onPopupToggle:I,voxketClient:_,onDisplayTypeChange:K}=e,[Y,X]=m.useState(()=>_?!!_.getCurrentSession():!1),[G,U]=m.useState(!1),[M,q]=m.useState(t||""),[j,V]=m.useState(n||"User"),[Z,N]=m.useState(()=>_?_.getCurrentSession():null),[B,z]=m.useState(()=>{var ie,Dt,st;if(_){const Ce=_.getCurrentSession();if((ie=Ce==null?void 0:Ce.activeModalities)!=null&&ie.includes("chat"))return"chat";if((Dt=Ce==null?void 0:Ce.activeModalities)!=null&&Dt.includes("voice"))return"voice";if((st=Ce==null?void 0:Ce.activeModalities)!=null&&st.includes("video"))return"video"}return"welcome"}),[H,R]=m.useState(!1);m.useEffect(()=>{console.log("🎯 Widget displayType prop changed to:",P)},[P]),m.useEffect(()=>{console.log("📊 Session state changed:",{currentMode:B,sessionStarted:Y,loading:G,currentSession:Z==null?void 0:Z.id,isPopupOpen:H})},[B,Y,G,Z,H]);const F=m.useMemo(()=>{if(_)return console.log("🔄 Using passed VoxketClient to preserve session state"),_;console.log("🆕 Creating new VoxketClient instance");const ie={appId:o,appSecret:s,baseUrl:r,agentId:M,participantName:j||"User",modalities:k};return new Ir(ie)},[_,o,s,r,M,j,k]),W=k,L=m.useMemo(()=>F.getRoom()||new te.Room,[F]),J={suportsChatInput:y,suportsVideoInput:f,suportsScreenShare:v},{sessionMetrics:O,sessionLogs:se,logEvent:le}=Om({room:L,onSessionStart:b,onSessionEnd:S,enableConsoleLogging:C,enableLocalStorage:C,voxketSessionId:Z==null?void 0:Z.id});m.useEffect(()=>{E&&E(se)},[se,E]),m.useEffect(()=>{T&&O&&T(O)},[O,T]),m.useEffect(()=>{const ie=st=>{console.log("🔴 Room disconnected:",st),U(!1),X(!1),N(null),z("welcome")},Dt=st=>{console.log("📹 Media devices error:",st),zr({title:"Allow access to your microphone/camera",description:`${st.name}: ${st.message}`})};return L.on(te.RoomEvent.MediaDevicesError,Dt),L.on(te.RoomEvent.Disconnected,ie),()=>{L.off(te.RoomEvent.Disconnected,ie),L.off(te.RoomEvent.MediaDevicesError,Dt)}},[L]);const De=async()=>{try{console.log("🎤 Starting voice session...",{agentId:M,participantName:j}),console.log("🎤 Pre-start state:",{currentMode:B,sessionStarted:Y,loading:G}),U(!0),X(!0),z("voice"),console.log("🎤 State after mode change:",{currentMode:"voice",sessionStarted:!0,loading:!0}),le("USER_STARTED_VOICE_SESSION",{agentId:M,participantName:j});const ie=await F.startSession(M,{participantName:j||"User",modalities:["voice",...f?["video"]:[]]});console.log("✅ Voice session started successfully:",ie.id),N(ie),U(!1),b&&b(ie.id)}catch(ie){console.error("❌ Failed to start voice session:",ie),zr({title:"Failed to start voice session",description:ie instanceof Error?ie.message:"Unknown error occurred"}),U(!1),X(!1),z("welcome")}},ut=async()=>{try{U(!0),X(!0),z("chat"),le("USER_STARTED_CHAT_SESSION",{agentId:M,participantName:j});const ie=await F.startSession(M,{participantName:j||"User",modalities:["chat"]});N(ie),U(!1),b&&b(ie.id)}catch(ie){console.error("Failed to start chat session:",ie),zr({title:"Failed to start chat session",description:ie instanceof Error?ie.message:"Unknown error occurred"}),U(!1),X(!1),z("welcome")}},Gt=async()=>{try{console.log("📺 Starting video session...",{agentId:M,participantName:j}),console.log("📺 Pre-start state:",{currentMode:B,sessionStarted:Y,loading:G}),U(!0),X(!0),z("video"),console.log("📺 State after mode change:",{currentMode:"video",sessionStarted:!0,loading:!0}),le("USER_STARTED_VIDEO_SESSION",{agentId:M,participantName:j});const ie=await F.startSession(M,{participantName:j||"User",modalities:["video","voice"]});console.log("✅ Video session started successfully:",ie.id),N(ie),U(!1),b&&b(ie.id)}catch(ie){console.error("❌ Failed to start video session:",ie),zr({title:"Failed to start video session",description:ie instanceof Error?ie.message:"Unknown error occurred"}),U(!1),X(!1),z("welcome")}},qt=()=>{z("welcome"),K&&K(e.displayType||"widget"),Z&&Y&&(X(!1),N(null),F.disconnect()),P==="popup"&&!H&&R(!0)},ft=()=>{const ie=!H;R(ie),I&&I(ie),!ie&&!(Z&&Y)&&(z("welcome"),X(!1),N(null))},tp=()=>{console.log("🔄 Closing fullscreen, switching to widget display type"),e.onDisplayTypeChange?e.onDisplayTypeChange("widget"):console.warn("⚠️ No onDisplayTypeChange callback provided")},np=()=>{e.onDisplayTypeChange&&e.onDisplayTypeChange("fullscreen")};m.useEffect(()=>{var ie,Dt,st;if(_&&F){console.log("🔄 Syncing widget state with existing client session state");const Ce=F.getCurrentSession(),rp=F.connected;console.log("🔍 Existing session state:",{hasSession:!!Ce,sessionId:Ce==null?void 0:Ce.id,isConnected:rp,activeModalities:Ce==null?void 0:Ce.activeModalities}),Ce&&(console.log("✅ Restoring session state from existing client"),N(Ce),X(!0),U(!1),(ie=Ce.activeModalities)!=null&&ie.includes("chat")?z("chat"):(Dt=Ce.activeModalities)!=null&&Dt.includes("voice")?z("voice"):(st=Ce.activeModalities)!=null&&st.includes("video")&&z("video"))}},[_,F]),m.useEffect(()=>()=>{console.log("🧹 Cleaning up widget component"),_?console.log("🔄 Widget cleanup: preserving passed client instance"):(console.log("🧹 Widget cleanup: disconnecting self-created client"),F.disconnect())},[F,_]);let ro="w-96",so="h-[25rem]",oo={};if(h&&(h.startsWith("w-")?ro=h:(oo.width=h,ro="")),p&&(p.startsWith("h-")?so=p:(oo.height=p,so="")),P==="popup"&&!H)return console.log("🟡 Showing popup trigger button"),d.jsx(M6,{onClick:ft,text:x,position:$,theme:w});console.log("🟢 Rendering widget content, displayType:",P,"isPopupOpen:",H,"currentMode:",B,"sessionStarted:",Y,"loading:",G);let io=`voxket-widget-root theme-${w}`,Or={scrollMargin:0,scrollPadding:0,contain:"layout style paint"};P==="widget"?(io+=` flex items-center justify-center min-h-fit ${ro} ${so} ${u}`,Or={...Or,...oo}):(io=`${u||""}`,Or={});const ec=d.jsx(d.Fragment,{children:d.jsxs(jn,{mode:"wait",children:[B==="welcome"&&!G&&d.jsx(P6,{agentId:M,participantName:j||"",onAgentIdChange:q,onParticipantNameChange:V,onStartCall:De,onStartChat:ut,onStartVideo:Gt,disabled:Y||G,prompts:i,statusMessage:a,title:c,subTitle:l,theme:w,modalities:W,initial:{opacity:0,y:0},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{duration:.3,ease:"easeInOut"}},"welcome"),B==="voice"&&d.jsxs(Me.RoomContext.Provider,{value:L,children:[d.jsx(Me.RoomAudioRenderer,{}),d.jsx(Me.StartAudio,{label:"Start Audio"}),d.jsx(k6,{loadingText:g,participantName:j||"User",capabilities:J,sessionStarted:Y,disabled:!Y,theme:w,client:F,displayType:P,onBack:P==="popup"?ft:qt,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"session-view")]}),B==="chat"&&d.jsx(T6,{client:F,theme:w,displayType:P,onBack:P==="popup"?ft:qt,onEndChat:qt,disabled:!Y,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"chat-view"),B==="video"&&d.jsxs(Me.RoomContext.Provider,{value:L,children:[d.jsx(Me.RoomAudioRenderer,{}),d.jsx(Me.StartAudio,{label:"Start Audio"}),d.jsx(A6,{client:F,theme:w,displayType:P,onBack:P==="popup"?ft:qt,onEndCall:qt,disabled:!Y,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"video-view")]})]})});return P==="fullscreen"||P==="popup"?(console.log("📱 Rendering fullscreen/popup mode, displayType:",P),d.jsx(_d,{theme:w,displayType:P,popupPosition:$,onClose:P==="fullscreen"?tp:ft,children:ec})):(console.log("📦 Rendering widget mode"),d.jsx("div",{className:io,style:Or,children:d.jsx(_d,{theme:w,displayType:P,popupPosition:$,onExpand:np,children:ec})}))}function N6({logs:e,onClear:t,onExport:n}){const[r,s]=A.useState(!1),[o,i]=A.useState(""),a=e.filter(c=>!o||c.event.toLowerCase().includes(o.toLowerCase()));return r?d.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:d.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[80vh] flex flex-col m-4",children:[d.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[d.jsxs("h2",{className:"text-lg font-semibold",children:["Session Logs (",e.length,")"]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{type:"text",placeholder:"Filter events...",value:o,onChange:c=>i(c.target.value),className:"px-3 py-1 border rounded text-sm"}),d.jsx("button",{onClick:t,className:"px-3 py-1 bg-red-600 text-white rounded text-sm hover:bg-red-700",children:"Clear"}),d.jsx("button",{onClick:n,className:"px-3 py-1 bg-green-600 text-white rounded text-sm hover:bg-green-700",children:"Export"}),d.jsx("button",{onClick:()=>s(!1),className:"px-3 py-1 bg-gray-600 text-white rounded text-sm hover:bg-gray-700",children:"Close"})]})]}),d.jsx("div",{className:"flex-1 overflow-auto p-4",children:a.length===0?d.jsx("p",{className:"text-gray-500 text-center py-8",children:"No logs found"}):d.jsx("div",{className:"space-y-2",children:a.map((c,l)=>d.jsxs("div",{className:"border rounded p-3 text-sm",children:[d.jsxs("div",{className:"flex items-center justify-between mb-1",children:[d.jsx("span",{className:"font-semibold text-blue-600",children:c.event}),d.jsx("span",{className:"text-gray-500 text-xs",children:new Date(c.timestamp).toLocaleTimeString()})]}),c.sessionId&&d.jsxs("div",{className:"text-xs text-gray-600 mb-1",children:["Session: ",c.sessionId]}),c.data&&d.jsx("div",{className:"bg-gray-50 p-2 rounded text-xs",children:d.jsx("pre",{className:"whitespace-pre-wrap overflow-auto",children:JSON.stringify(c.data,null,2)})})]},l))})})]})}):d.jsxs("button",{onClick:()=>s(!0),className:"fixed bottom-4 right-4 bg-blue-600 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-blue-700 transition-colors text-sm z-50",children:["Session Logs (",e.length,")"]})}function j6({metrics:e}){return e?d.jsxs("div",{className:"bg-gray-100 p-4 rounded-lg",children:[d.jsx("h3",{className:"font-semibold mb-2",children:"Current Session"}),d.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Session ID:"}),d.jsx("div",{className:"font-mono text-xs",children:e.sessionId})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Start Time:"}),d.jsx("div",{children:new Date(e.startTime).toLocaleString()})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Messages:"}),d.jsx("div",{children:e.totalMessages})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Participants:"}),d.jsx("div",{children:e.participantCount})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Connection Issues:"}),d.jsx("div",{children:e.connectionIssues})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Duration:"}),d.jsxs("div",{children:[Math.round((Date.now()-new Date(e.startTime).getTime())/1e3),"s"]})]})]})]}):null}function hn(){const{currentSession:e,sessionState:t,sessionMetrics:n,createSession:r,endSession:s}=Et(),o=A.useCallback(async(a,c)=>await r(a,c),[r]),i=A.useCallback(async()=>await s(),[s]);return{session:e,state:t,metrics:n,isActive:e!==null&&t!=="disconnected",isConnecting:t==="connecting",isConnected:t==="connected"||t==="active",start:o,stop:i}}function Bm(){const{sessionMetrics:e,currentSession:t}=Et();return{metrics:e,sessionId:t==null?void 0:t.id,duration:e==null?void 0:e.duration,participantCount:e==null?void 0:e.participantCount,messageCount:e==null?void 0:e.messageCount,audioQuality:e==null?void 0:e.audioQuality,networkStats:e==null?void 0:e.networkStats}}function Hm(){const{setMicrophoneEnabled:e,client:t}=Et(),[n,r]=A.useState(!1),[s,o]=A.useState(!1),i=A.useCallback(async()=>{if(!s){o(!0);try{const l=!n;await e(l),r(l)}catch(l){console.error("Failed to toggle microphone:",l)}finally{o(!1)}}},[n,s,e]),a=A.useCallback(async()=>{if(!(n||s)){o(!0);try{await e(!0),r(!0)}catch(l){console.error("Failed to enable microphone:",l)}finally{o(!1)}}},[n,s,e]),c=A.useCallback(async()=>{if(!(!n||s)){o(!0);try{await e(!1),r(!1)}catch(l){console.error("Failed to disable microphone:",l)}finally{o(!1)}}},[n,s,e]);return{isEnabled:n,isLoading:s,toggle:i,enable:a,disable:c}}function zm(){const{setCameraEnabled:e}=Et(),[t,n]=A.useState(!1),[r,s]=A.useState(!1),o=A.useCallback(async()=>{if(!r){s(!0);try{const c=!t;await e(c),n(c)}catch(c){console.error("Failed to toggle camera:",c)}finally{s(!1)}}},[t,r,e]),i=A.useCallback(async()=>{if(!(t||r)){s(!0);try{await e(!0),n(!0)}catch(c){console.error("Failed to enable camera:",c)}finally{s(!1)}}},[t,r,e]),a=A.useCallback(async()=>{if(!(!t||r)){s(!0);try{await e(!1),n(!1)}catch(c){console.error("Failed to disable camera:",c)}finally{s(!1)}}},[t,r,e]);return{isEnabled:t,isLoading:r,toggle:o,enable:i,disable:a}}function Um(){const{startScreenShare:e,stopScreenShare:t}=Et(),[n,r]=A.useState(!1),[s,o]=A.useState(!1),i=A.useCallback(async()=>{if(!(n||s)){o(!0);try{await e(),r(!0)}catch(l){console.error("Failed to start screen share:",l)}finally{o(!1)}}},[n,s,e]),a=A.useCallback(async()=>{if(!(!n||s)){o(!0);try{await t(),r(!1)}catch(l){console.error("Failed to stop screen share:",l)}finally{o(!1)}}},[n,s,t]),c=A.useCallback(async()=>{n?await a():await i()},[n,i,a]);return{isSharing:n,isLoading:s,start:i,stop:a,toggle:c}}function R6(){const{client:e}=Et(),[t,n]=A.useState({tracks:[],layout:{type:"grid",showLocalVideo:!0,aspectRatio:"16:9"},isRecording:!1}),r=A.useMemo(()=>t.tracks.find(f=>f.isLocal),[t.tracks]),s=A.useMemo(()=>t.tracks.filter(f=>!f.isLocal),[t.tracks]),o=A.useCallback(async()=>{try{r!=null&&r.isEnabled?await(e==null?void 0:e.disableCamera()):await(e==null?void 0:e.enableCamera())}catch(f){throw console.error("Failed to toggle camera:",f),f}},[e,r]),i=A.useCallback(async()=>{try{t.tracks.find(v=>v.isScreenShare)?await(e==null?void 0:e.stopScreenShare()):await(e==null?void 0:e.startScreenShare())}catch(f){throw console.error("Failed to toggle screen share:",f),f}},[e,t.tracks]),a=A.useCallback(f=>{n(v=>({...v,layout:f}))},[]),c=A.useCallback(f=>{n(v=>({...v,pinnedTrack:f}))},[]),l=A.useCallback(()=>{n(f=>({...f,pinnedTrack:void 0}))},[]),u=A.useCallback(async()=>{try{await(e==null?void 0:e.startRecording()),n(f=>({...f,isRecording:!0}))}catch(f){throw console.error("Failed to start recording:",f),f}},[e]),h=A.useCallback(async()=>{try{await(e==null?void 0:e.stopRecording()),n(f=>({...f,isRecording:!1}))}catch(f){throw console.error("Failed to stop recording:",f),f}},[e]),p=A.useCallback(f=>t.tracks.find(v=>v.id===f),[t.tracks]),g=A.useCallback(f=>t.tracks.filter(v=>v.participantId===f),[t.tracks]),y=A.useCallback(f=>f.isEnabled&&t.tracks.includes(f),[t.tracks]);return A.useEffect(()=>{if(!e)return;const f=b=>{n(S=>({...S,tracks:[...S.tracks.filter(C=>C.id!==b.id),b]}))},v=b=>{n(S=>{var C;return{...S,tracks:S.tracks.filter(E=>E.id!==b),pinnedTrack:((C=S.pinnedTrack)==null?void 0:C.id)===b?void 0:S.pinnedTrack}})},w=b=>{n(S=>({...S,tracks:S.tracks.map(C=>C.id===b.id?b:C)}))};return e.on("videoTrackAdded",f),e.on("videoTrackRemoved",v),e.on("videoTrackUpdated",w),()=>{e.off("videoTrackAdded",f),e.off("videoTrackRemoved",v),e.off("videoTrackUpdated",w)}},[e]),{tracks:t.tracks,localTrack:r,remoteTraracks:s,pinnedTrack:t.pinnedTrack,layout:t.layout,isRecording:t.isRecording,toggleCamera:o,toggleScreenShare:i,setLayout:a,pinTrack:c,unpinTrack:l,startRecording:u,stopRecording:h,getTrackById:p,getTracksByParticipant:g,isTrackActive:y}}function no(){const{chatMessages:e,sendChatMessage:t,currentSession:n}=Et(),[r,s]=A.useState(!1),o=A.useCallback(async l=>{if(!(!l.trim()||r||!n)){s(!0);try{await t(l.trim())}catch(u){throw console.error("Failed to send chat message:",u),u}finally{s(!1)}}},[t,r,n]),{userMessages:i,agentMessages:a,allMessages:c}=A.useMemo(()=>{const l=e.filter(h=>h.sender.type==="participant"),u=e.filter(h=>h.sender.type==="agent");return{userMessages:l,agentMessages:u,allMessages:e}},[e]);return{messages:c,userMessages:i,agentMessages:a,messageCount:c.length,isSending:r,canSend:!!n&&!r,send:o}}function V6(){const{send:e,isSending:t,canSend:n}=no(),[r,s]=A.useState(""),o=A.useCallback(async()=>{if(!(!r.trim()||!n))try{await e(r),s("")}catch(a){throw a}},[r,e,n]),i=A.useCallback(a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),o())},[o]);return{value:r,setValue:s,send:o,handleKeyPress:i,isSending:t,canSend:n&&r.trim().length>0}}function qa(){const{isConnected:e,isConnecting:t,connectionError:n,connect:r,disconnect:s}=Et(),o=A.useCallback(async()=>{if(!(e||t))try{await r()}catch(a){throw console.error("Failed to connect:",a),a}},[r,e,t]),i=A.useCallback(async()=>{if(e)try{await s()}catch(a){throw console.error("Failed to disconnect:",a),a}},[s,e]);return{isConnected:e,isConnecting:t,isDisconnected:!e&&!t,error:n,hasError:!!n,connect:o,disconnect:i}}function Wm(){const{participants:e}=Et();return{participants:e,count:e.length,localParticipant:e.find(t=>t.isLocal),remoteParticipants:e.filter(t=>!t.isLocal)}}const Zm=A.createContext({}),Dr=()=>A.useContext(Zm);function Km({children:e,...t}){return d.jsx(Zm.Provider,{value:t,children:e})}function hs({name:e,children:t,fallback:n,className:r}){return d.jsx("div",{className:`voxket-slot voxket-slot--${e} ${r||""}`,children:t||n})}function Ym(e,t={}){return Object.assign(e,t)}function Gm({showMicrophoneControl:e=!0,showCameraControl:t=!0,showScreenShareControl:n=!0,showSessionActions:r=!0,customControls:s,className:o=""}){const i=hn(),a=Hm(),c=zm(),l=Um(),u=Dr(),h=["voxket-session-controls",`voxket-session-controls--${u.variant||"default"}`,`voxket-session-controls--${u.size||"md"}`,i.isActive?"voxket-session-controls--active":"voxket-session-controls--inactive",o].filter(Boolean).join(" ");return!i.isActive&&!r?d.jsx("div",{className:h,children:d.jsx("div",{className:"voxket-controls-inactive",children:d.jsx("p",{children:"Controls available during active session"})})}):d.jsxs("div",{className:h,children:[r&&d.jsx("div",{className:"voxket-session-actions",children:i.isActive?d.jsx("button",{onClick:i.stop,className:"voxket-button voxket-button--danger",children:"End Session"}):d.jsx(I6,{})}),i.isActive&&d.jsxs("div",{className:"voxket-media-controls",children:[e&&d.jsxs("button",{onClick:a.toggle,disabled:a.isLoading,className:`voxket-button voxket-button--media ${a.isEnabled?"voxket-button--active":""}`,title:a.isEnabled?"Mute microphone":"Unmute microphone",children:[d.jsx("span",{className:"voxket-icon",children:"🎤"}),a.isLoading?"Loading...":a.isEnabled?"Mute":"Unmute"]}),t&&d.jsxs("button",{onClick:c.toggle,disabled:c.isLoading,className:`voxket-button voxket-button--media ${c.isEnabled?"voxket-button--active":""}`,title:c.isEnabled?"Stop camera":"Start camera",children:[d.jsx("span",{className:"voxket-icon",children:"📹"}),c.isLoading?"Loading...":c.isEnabled?"Stop Video":"Start Video"]}),n&&d.jsxs("button",{onClick:l.toggle,disabled:l.isLoading,className:`voxket-button voxket-button--media ${l.isSharing?"voxket-button--active":""}`,title:l.isSharing?"Stop screen share":"Start screen share",children:[d.jsx("span",{className:"voxket-icon",children:"🖥️"}),l.isLoading?"Loading...":l.isSharing?"Stop Share":"Share Screen"]})]}),s&&d.jsx("div",{className:"voxket-custom-controls",children:s})]})}function I6(){hn();const[e,t]=A.useState(!1),n=async()=>{t(!0);try{console.log("Start session - agentId needed")}catch(r){console.error("Failed to start session:",r)}finally{t(!1)}};return d.jsx("button",{onClick:n,disabled:e,className:"voxket-button voxket-button--primary",children:e?"Starting...":"Start Session"})}function Xa({showConnectionStatus:e=!0,showSessionInfo:t=!0,showAgentInfo:n=!0,className:r=""}){const s=hn(),o=qa(),i=Dr(),a=["voxket-session-header",`voxket-session-header--${i.variant||"default"}`,`voxket-session-header--${i.size||"md"}`,r].filter(Boolean).join(" ");return d.jsxs("div",{className:a,children:[e&&d.jsxs("div",{className:"voxket-connection-status",children:[d.jsx("div",{className:`voxket-status-indicator ${o.isConnected?"connected":"disconnected"}`}),d.jsx("span",{className:"voxket-status-text",children:o.isConnecting?"Connecting...":o.isConnected?"Connected":"Disconnected"})]}),t&&s.session&&d.jsxs("div",{className:"voxket-session-info",children:[d.jsxs("div",{className:"voxket-session-id",children:["Session: ",s.session.id.slice(-8)]}),d.jsxs("div",{className:"voxket-session-state",children:["State: ",s.state]})]}),n&&s.session&&d.jsxs("div",{className:"voxket-agent-info",children:[d.jsxs("div",{className:"voxket-agent-id",children:["Agent: ",s.session.agentId]}),d.jsxs("div",{className:"voxket-modalities",children:["Modalities: ",s.session.activeModalities.join(", ")]})]}),o.error&&d.jsxs("div",{className:"voxket-error-message",children:["Error: ",o.error.message]})]})}function Ja({showChat:e=!0,showTranscriptions:t=!1,customContent:n,className:r=""}){const s=hn(),o=no(),i=Dr(),a=["voxket-session-content",`voxket-session-content--${i.variant||"default"}`,`voxket-session-content--${i.size||"md"}`,r].filter(Boolean).join(" ");return s.isActive?d.jsx("div",{className:a,children:n||d.jsxs(d.Fragment,{children:[e&&d.jsxs("div",{className:"voxket-chat-container",children:[d.jsxs("div",{className:"voxket-chat-messages",children:[o.messages.map(c=>d.jsxs("div",{className:`voxket-message voxket-message--${c.sender.type}`,children:[d.jsxs("div",{className:"voxket-message-header",children:[d.jsx("span",{className:"voxket-message-sender",children:c.sender.name}),d.jsx("span",{className:"voxket-message-time",children:c.timestamp.toLocaleTimeString()})]}),d.jsx("div",{className:"voxket-message-content",children:c.content})]},c.id)),o.messages.length===0&&d.jsx("div",{className:"voxket-empty-messages",children:d.jsx("p",{children:"No messages yet. Start the conversation!"})})]}),d.jsx(D6,{})]}),t&&d.jsx("div",{className:"voxket-transcriptions",children:d.jsx("div",{className:"voxket-transcription-placeholder",children:d.jsx("p",{children:"Voice transcriptions will appear here"})})})]})}):d.jsx("div",{className:a,children:d.jsx("div",{className:"voxket-inactive-state",children:d.jsxs("div",{className:"voxket-inactive-message",children:[d.jsx("h3",{children:"Start a conversation"}),d.jsx("p",{children:"Begin a session to start chatting with the AI agent"})]})})})}function D6(){const e=no(),[t,n]=A.useState(""),r=async()=>{if(!(!t.trim()||!e.canSend))try{await e.send(t),n("")}catch(o){console.error("Failed to send message:",o)}},s=o=>{o.key==="Enter"&&!o.shiftKey&&(o.preventDefault(),r())};return d.jsxs("div",{className:"voxket-chat-input",children:[d.jsx("input",{type:"text",value:t,onChange:o=>n(o.target.value),onKeyPress:s,placeholder:"Type your message...",disabled:!e.canSend,className:"voxket-input"}),d.jsx("button",{onClick:r,disabled:!e.canSend||!t.trim(),className:"voxket-send-button",children:e.isSending?"Sending...":"Send"})]})}function Qa({showMetrics:e=!0,showParticipants:t=!0,showStatus:n=!0,customFooter:r,className:s=""}){const o=hn(),i=Bm(),a=Wm(),c=Dr(),l=["voxket-session-footer",`voxket-session-footer--${c.variant||"default"}`,`voxket-session-footer--${c.size||"md"}`,s].filter(Boolean).join(" ");return o.isActive?d.jsx("div",{className:l,children:r||d.jsxs(d.Fragment,{children:[n&&d.jsxs("div",{className:"voxket-session-status",children:[d.jsx("div",{className:"voxket-status-indicator voxket-status-indicator--active"}),d.jsx("span",{className:"voxket-status-text",children:"Session Active"})]}),e&&i.metrics&&d.jsxs("div",{className:"voxket-session-metrics",children:[d.jsxs("div",{className:"voxket-metric",children:[d.jsx("span",{className:"voxket-metric-label",children:"Duration:"}),d.jsx("span",{className:"voxket-metric-value",children:O6(i.duration||0)})]}),d.jsxs("div",{className:"voxket-metric",children:[d.jsx("span",{className:"voxket-metric-label",children:"Messages:"}),d.jsx("span",{className:"voxket-metric-value",children:i.metrics.messageCount})]})]}),t&&d.jsxs("div",{className:"voxket-participants-info",children:[d.jsxs("span",{className:"voxket-participants-count",children:[a.count," participant",a.count!==1?"s":""]}),a.remoteParticipants.length>0&&d.jsx("div",{className:"voxket-participant-list",children:a.remoteParticipants.map(u=>d.jsx("span",{className:"voxket-participant-name",children:u.name},u.id))})]})]})}):d.jsx("div",{className:l,children:d.jsx("div",{className:"voxket-footer-inactive",children:d.jsx("span",{className:"voxket-status-text",children:"Ready to start session"})})})}function O6(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}:${(n%60).toString().padStart(2,"0")}:${(t%60).toString().padStart(2,"0")}`:`${n}:${(t%60).toString().padStart(2,"0")}`}function $6({agentId:e,sessionConfig:t,autoStart:n=!1,onSessionStart:r,onSessionEnd:s,variant:o="default",size:i="md",theme:a,className:c="",children:l}){var g;const u=hn(),h=qa();A.useEffect(()=>{n&&e&&h.isConnected&&!u.isActive&&u.start(e,t).catch(console.error)},[n,e,h.isConnected,u.isActive]),A.useEffect(()=>{var y;(y=u.session)!=null&&y.id&&r&&r(u.session.id)},[(g=u.session)==null?void 0:g.id,r]),A.useEffect(()=>()=>{u.isActive&&s&&u.stop().then(s).catch(console.error)},[]);const p=["voxket-session",`voxket-session--${o}`,`voxket-session--${i}`,u.isActive?"voxket-session--active":"voxket-session--inactive",c].filter(Boolean).join(" ");return d.jsx(Km,{variant:o,size:i,theme:a,className:c,children:d.jsx("div",{className:p,children:l||d.jsxs(d.Fragment,{children:[d.jsx(hs,{name:"header",fallback:d.jsx(Xa,{})}),d.jsx(hs,{name:"content",fallback:d.jsx(Ja,{})}),d.jsx(hs,{name:"footer",fallback:d.jsx(Qa,{})})]})})})}const qm=Ym($6,{Header:Xa,Content:Ja,Footer:Qa,Controls:Gm}),an={name:"default",colors:{primary:"#3B82F6",secondary:"#6B7280",accent:"#8B5CF6",background:"#FFFFFF",surface:"#F9FAFB",text:{primary:"#111827",secondary:"#6B7280",muted:"#9CA3AF",inverse:"#FFFFFF"},status:{success:"#10B981",warning:"#F59E0B",error:"#EF4444",info:"#3B82F6"},border:"#E5E7EB",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},typography:{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},fontWeight:{normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem"},borderRadius:{none:"0",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1)"}},Li={...an,name:"dark",colors:{primary:"#60A5FA",secondary:"#9CA3AF",accent:"#A78BFA",background:"#111827",surface:"#1F2937",text:{primary:"#F9FAFB",secondary:"#D1D5DB",muted:"#9CA3AF",inverse:"#111827"},status:{success:"#34D399",warning:"#FBBF24",error:"#F87171",info:"#60A5FA"},border:"#374151",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.3)"}},_i={...an,name:"enterprise",colors:{primary:"#1E40AF",secondary:"#64748B",accent:"#7C3AED",background:"#FFFFFF",surface:"#F8FAFC",text:{primary:"#0F172A",secondary:"#475569",muted:"#94A3B8",inverse:"#FFFFFF"},status:{success:"#059669",warning:"#D97706",error:"#DC2626",info:"#1E40AF"},border:"#CBD5E1",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},borderRadius:{none:"0",sm:"0.125rem",md:"0.25rem",lg:"0.375rem",full:"9999px"}},Xm=A.createContext(null),Jm=()=>{const e=A.useContext(Xm);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};function L6({theme:e="default",themes:t={},children:n,cssVariables:r=!0,className:s=""}){const[o,i]=A.useState(()=>{const p={default:an,dark:Li,enterprise:_i,...t};return typeof e=="string"?p[e]||an:e}),[a,c]=A.useState(()=>({default:an,dark:Li,enterprise:_i,...t})),l=p=>{if(typeof p=="string"){const g=a[p];g&&i(g)}else i(p)},u=p=>{c(g=>({...g,[p.name]:p}))};A.useEffect(()=>{if(r&&typeof document<"u"){const p=document.documentElement;Object.entries(Qm(o)).forEach(([g,y])=>{p.style.setProperty(`--voxket-${g}`,y)})}},[o,r]);const h={theme:o,setTheme:l,themes:a,registerTheme:u};return d.jsx(Xm.Provider,{value:h,children:d.jsx("div",{className:`voxket-theme voxket-theme--${o.name} ${s}`,children:n})})}function Qm(e){const t={},n=(r,s="")=>{for(const[o,i]of Object.entries(r)){const a=s?`${s}-${o}`:o;typeof i=="object"&&i!==null&&!Array.isArray(i)?n(i,a):t[a]=String(i)}};return n(e),t}function _6(e=an,t){return{...e,...t,colors:{...e.colors,...t.colors},typography:{...e.typography,...t.typography},spacing:{...e.spacing,...t.spacing},borderRadius:{...e.borderRadius,...t.borderRadius},shadows:{...e.shadows,...t.shadows}}}function F6(e){var n;const{theme:t}=Jm();return((n=t.components)==null?void 0:n[e])||{}}const B6=Ga("voice-modality","voice",{onActivate:async e=>{const t=e.config;t.enableTranscription&&H6(e),t.enableVoiceActivation&&z6(e,t),console.log("Voice modality activated",t)},onDeactivate:async e=>{console.log("Voice modality deactivated")},onMessage:async(e,t)=>{t.type==="audio"&&U6(e,t)}});function H6(e,t){e.on("participant.speaking.started",n=>{console.log("Transcription: Started for",n.name)}),e.on("participant.speaking.stopped",n=>{console.log("Transcription: Stopped for",n.name)})}function z6(e,t){const n=t.silenceThreshold||-50;console.log("Voice activation setup with threshold:",n)}function U6(e,t){console.log("Playing audio response:",t.content)}const W6=Ga("chat-modality","chat",{onActivate:async e=>{const t=e.config;t.enableRichText&&Z6(),t.enableFileUpload&&K6(e),t.enableCustomComponents&&Y6(),console.log("Chat modality activated",t)},onDeactivate:async e=>{console.log("Chat modality deactivated")},onMessage:async(e,t)=>{const n=e.config;t.type==="ui_component"?G6(e,t):t.type==="text"&&n.enableRichText&&q6(e,t)}});function Z6(e){console.log("Rich text support enabled")}function K6(e){console.log("File upload enabled"),e.on("chat.file.uploaded",t=>{console.log("File uploaded:",t.name)})}function Y6(e){console.log("Custom components enabled");const t=new Map;t.set("quick-actions",X6),t.set("form",J6),t.set("card",Q6),t.set("chart",eE)}function G6(e,t){const{componentType:n,props:r}=t.metadata;console.log("Rendering custom component:",n,r),e.emit("chat.component.render",{type:n,props:r,timestamp:new Date})}function q6(e,t){console.log("Processing rich text message:",t.content)}function X6(e){return{type:"quick-actions",actions:e.actions||[],layout:e.layout||"horizontal"}}function J6(e){return{type:"form",fields:e.fields||[],submitAction:e.submitAction,validation:e.validation}}function Q6(e){return{type:"card",title:e.title,content:e.content,actions:e.actions,variant:e.variant||"default"}}function eE(e){return{type:"chart",chartType:e.chartType||"line",data:e.data,options:e.options}}function ms({track:e,participantName:t,showControls:n=!0,showName:r=!0,showMuteIndicator:s=!0,isPinned:o=!1,className:i="",onClick:a,onPin:c,onUnpin:l}){const u=A.useRef(null),[h,p]=A.useState(!1);A.useEffect(()=>{if(!u.current||!e.isEnabled)return;const v=u.current;return v.srcObject=null,()=>{v.srcObject&&(v.srcObject=null)}},[e]);const g=()=>{a==null||a(e)},y=v=>{v.stopPropagation(),o?l==null||l(e):c==null||c(e)},f=["voxket-video-tile",e.isLocal?"voxket-video-tile--local":"voxket-video-tile--remote",e.isScreenShare?"voxket-video-tile--screen-share":"voxket-video-tile--camera",o?"voxket-video-tile--pinned":"",e.isEnabled?"":"voxket-video-tile--disabled",h?"voxket-video-tile--hovered":"",i].filter(Boolean).join(" ");return d.jsxs("div",{className:f,onClick:g,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),style:{aspectRatio:e.dimensions?`${e.dimensions.width} / ${e.dimensions.height}`:"16 / 9"},children:[d.jsx("video",{ref:u,className:"voxket-video-element",autoPlay:!0,playsInline:!0,muted:e.isLocal}),!e.isEnabled&&d.jsxs("div",{className:"voxket-video-placeholder",children:[d.jsx("div",{className:"voxket-video-placeholder-icon",children:e.isScreenShare?"🖥️":"📹"}),d.jsx("p",{className:"voxket-video-placeholder-text",children:e.isScreenShare?"Screen sharing paused":"Camera off"})]}),d.jsxs("div",{className:"voxket-video-overlay",children:[r&&t&&d.jsxs("div",{className:"voxket-video-name",children:[t,e.isLocal&&" (You)"]}),s&&!e.isEnabled&&d.jsx("div",{className:"voxket-video-mute-indicator",children:"🔇"}),n&&(h||o)&&d.jsxs("div",{className:"voxket-video-controls",children:[d.jsx("button",{className:`voxket-video-control-btn ${o?"voxket-video-control-btn--active":""}`,onClick:y,title:o?"Unpin video":"Pin video",children:"📌"}),e.isScreenShare&&d.jsx("div",{className:"voxket-video-indicator",children:"🖥️"}),e.source&&d.jsx("div",{className:"voxket-video-source",children:e.source})]})]}),!e.isEnabled&&d.jsx("div",{className:"voxket-video-loading",children:d.jsx("div",{className:"voxket-spinner"})})]})}function tE({tracks:e,layout:t,className:n="",onLayoutChange:r,onTrackClick:s,maxVisibleTracks:o=9,showPagination:i=!0}){const[a,c]=A.useState(0),[l,u]=A.useState(null),h=A.useMemo(()=>{let b=[...e];t.type==="speaker"&&l&&(b=[l,...e.filter(E=>E.id!==l.id)]);const S=a*o,C=S+o;return b.slice(S,C)},[e,t,l,a,o]),p=Math.ceil(e.length/o),g=A.useMemo(()=>{const b=h.length;switch(t.type){case"grid":const S=Math.ceil(Math.sqrt(b)),C=Math.ceil(b/S);return{display:"grid",gridTemplateColumns:`repeat(${S}, 1fr)`,gridTemplateRows:`repeat(${C}, 1fr)`,gap:"8px"};case"speaker":return{display:"flex",flexDirection:"column",gap:"8px"};case"sidebar":return{display:"flex",gap:"8px"};case"gallery":return{display:"flex",flexWrap:"wrap",gap:"8px",justifyContent:"center"};default:return{}}},[t.type,h.length]),y=b=>{u(b)},f=()=>{u(null)},v=b=>{r==null||r({...t,type:b})},w=["voxket-video-grid",`voxket-video-grid--${t.type}`,`voxket-video-grid--${h.length}-tracks`,n].filter(Boolean).join(" ");return e.length===0?d.jsx("div",{className:"voxket-video-grid-empty",children:d.jsxs("div",{className:"voxket-video-grid-empty-content",children:[d.jsx("div",{className:"voxket-video-grid-empty-icon",children:"📹"}),d.jsx("p",{children:"No video tracks available"})]})}):d.jsxs("div",{className:w,children:[d.jsxs("div",{className:"voxket-video-grid-controls",children:[d.jsx("div",{className:"voxket-video-layout-controls",children:["grid","speaker","sidebar","gallery"].map(b=>d.jsx("button",{className:`voxket-layout-btn ${t.type===b?"voxket-layout-btn--active":""}`,onClick:()=>v(b),title:`Switch to ${b} layout`,children:nE(b)},b))}),d.jsxs("div",{className:"voxket-video-count",children:[e.length," participant",e.length!==1?"s":""]})]}),d.jsx("div",{className:"voxket-video-grid-content",style:g,children:t.type==="speaker"&&l?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"voxket-video-speaker-main",children:d.jsx(ms,{track:l,participantName:`Participant ${l.participantId}`,isPinned:!0,onClick:s,onUnpin:f})}),d.jsx("div",{className:"voxket-video-speaker-sidebar",children:h.filter(b=>b.id!==l.id).map(b=>d.jsx(ms,{track:b,participantName:`Participant ${b.participantId}`,showControls:!1,onClick:s,onPin:y},b.id))})]}):h.map(b=>d.jsx(ms,{track:b,participantName:`Participant ${b.participantId}`,isPinned:(l==null?void 0:l.id)===b.id,onClick:s,onPin:y,onUnpin:f},b.id))}),i&&p>1&&d.jsxs("div",{className:"voxket-video-pagination",children:[d.jsx("button",{className:"voxket-pagination-btn",onClick:()=>c(Math.max(0,a-1)),disabled:a===0,children:"←"}),d.jsxs("span",{className:"voxket-pagination-info",children:["Page ",a+1," of ",p]}),d.jsx("button",{className:"voxket-pagination-btn",onClick:()=>c(Math.min(p-1,a+1)),disabled:a===p-1,children:"→"})]})]})}function nE(e){switch(e){case"grid":return"⊞";case"speaker":return"🎤";case"sidebar":return"⫸";case"gallery":return"⊡";case"picture-in-picture":return"⧉";default:return"⊞"}}function rE({localTrack:e,onToggleCamera:t,onToggleScreenShare:n,onLayoutChange:r,showLayoutControls:s=!0,showCameraControls:o=!0,showScreenShareControls:i=!0,className:a=""}){const c=["voxket-video-controls",a].filter(Boolean).join(" "),l=u=>{r==null||r({type:u,showLocalVideo:!0,aspectRatio:"16:9"})};return d.jsxs("div",{className:c,children:[o&&d.jsxs("div",{className:"voxket-video-controls-section",children:[d.jsx("h4",{className:"voxket-video-controls-title",children:"Camera"}),d.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isEnabled?"voxket-control-btn--active":""}`,onClick:t,title:e!=null&&e.isEnabled?"Turn off camera":"Turn on camera",children:[d.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isEnabled?"📹":"📷"}),d.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isEnabled?"Camera On":"Camera Off"})]}),(e==null?void 0:e.dimensions)&&d.jsxs("div",{className:"voxket-video-info",children:[e.dimensions.width," × ",e.dimensions.height]})]}),i&&d.jsxs("div",{className:"voxket-video-controls-section",children:[d.jsx("h4",{className:"voxket-video-controls-title",children:"Screen Share"}),d.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isScreenShare?"voxket-control-btn--active":""}`,onClick:n,title:e!=null&&e.isScreenShare?"Stop screen sharing":"Start screen sharing",children:[d.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isScreenShare?"🛑":"🖥️"}),d.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isScreenShare?"Stop Sharing":"Share Screen"})]})]}),s&&d.jsxs("div",{className:"voxket-video-controls-section",children:[d.jsx("h4",{className:"voxket-video-controls-title",children:"Layout"}),d.jsx("div",{className:"voxket-layout-buttons",children:[{type:"grid",icon:"⊞",label:"Grid"},{type:"speaker",icon:"🎤",label:"Speaker"},{type:"sidebar",icon:"⫸",label:"Sidebar"},{type:"gallery",icon:"⊡",label:"Gallery"}].map(({type:u,icon:h,label:p})=>d.jsxs("button",{className:"voxket-layout-control-btn",onClick:()=>l(u),title:`Switch to ${p} layout`,children:[d.jsx("span",{className:"voxket-control-icon",children:h}),d.jsx("span",{className:"voxket-control-label",children:p})]},u))})]}),d.jsxs("div",{className:"voxket-video-controls-section",children:[d.jsx("h4",{className:"voxket-video-controls-title",children:"Video Settings"}),d.jsxs("div",{className:"voxket-video-settings",children:[d.jsxs("div",{className:"voxket-setting-group",children:[d.jsx("label",{className:"voxket-setting-label",children:"Quality"}),d.jsxs("select",{className:"voxket-setting-select",children:[d.jsx("option",{value:"high",children:"High (720p)"}),d.jsx("option",{value:"medium",children:"Medium (480p)"}),d.jsx("option",{value:"low",children:"Low (240p)"})]})]}),d.jsxs("div",{className:"voxket-setting-group",children:[d.jsx("label",{className:"voxket-setting-label",children:"Frame Rate"}),d.jsxs("select",{className:"voxket-setting-select",children:[d.jsx("option",{value:"30",children:"30 fps"}),d.jsx("option",{value:"15",children:"15 fps"}),d.jsx("option",{value:"10",children:"10 fps"})]})]}),d.jsxs("div",{className:"voxket-setting-group",children:[d.jsx("label",{className:"voxket-setting-label",children:"Bandwidth"}),d.jsxs("select",{className:"voxket-setting-select",children:[d.jsx("option",{value:"unlimited",children:"Unlimited"}),d.jsx("option",{value:"1000",children:"1 Mbps"}),d.jsx("option",{value:"500",children:"500 Kbps"}),d.jsx("option",{value:"250",children:"250 Kbps"})]})]})]})]}),d.jsxs("div",{className:"voxket-video-controls-section",children:[d.jsx("h4",{className:"voxket-video-controls-title",children:"Statistics"}),d.jsxs("div",{className:"voxket-video-stats",children:[d.jsxs("div",{className:"voxket-stat-item",children:[d.jsx("span",{className:"voxket-stat-label",children:"Resolution:"}),d.jsx("span",{className:"voxket-stat-value",children:e!=null&&e.dimensions?`${e.dimensions.width}×${e.dimensions.height}`:"N/A"})]}),d.jsxs("div",{className:"voxket-stat-item",children:[d.jsx("span",{className:"voxket-stat-label",children:"Source:"}),d.jsx("span",{className:"voxket-stat-value",children:(e==null?void 0:e.source)||"None"})]}),d.jsxs("div",{className:"voxket-stat-item",children:[d.jsx("span",{className:"voxket-stat-label",children:"Status:"}),d.jsx("span",{className:`voxket-stat-value ${e!=null&&e.isEnabled?"voxket-stat-value--active":"voxket-stat-value--inactive"}`,children:e!=null&&e.isEnabled?"Active":"Inactive"})]})]})]})]})}const ep=({handler:e,loadData:t,data:n,client:r,addLocalMessage:s})=>{const[o,i]=m.useState(null),[a,c]=m.useState(!0),[l,u]=m.useState(!1),[h]=m.useState(Date.now());m.useEffect(()=>{(async()=>{try{if(c(!0),console.log("📋 AssignmentView: Loading assignment data..."),console.log("📋 AssignmentView: Received data from RPC:",n),n&&typeof n=="object"){const v={title:n.title||"Untitled Assignment",description:n.description||"No description provided",estimated_time_of_completion:n.estimated_time_of_completion||"Unknown"};i(v),console.log("📋 AssignmentView: Assignment loaded from RPC data:",v)}}catch(v){console.error("📋 AssignmentView: Error loading assignment:",v),i({title:"Assignment Loading Error",description:"There was an error loading the assignment details. Please try again.",estimated_time_of_completion:"Unknown"})}finally{c(!1)}})()},[n,t]);const p=({message:f,assignment:v})=>{const w=f.toLowerCase().includes("declined"),b=w?"bg-red-50 border-red-200":"bg-green-50 border-green-200",S=w?"text-red-700":"text-green-700",C=w?"❌":"🎉";return d.jsxs("div",{className:`max-w-sm mx-auto ${b} border rounded-lg shadow p-3 flex flex-col items-center`,children:[d.jsx("div",{className:"text-2xl mb-2",children:C}),d.jsx("div",{className:`${S} font-semibold text-sm mb-1`,children:f}),d.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:v.title}),d.jsx("div",{className:"text-xs text-gray-500",children:"Thank you for your response!"})]})},g=async()=>{if(!(!o||!e)){u(!0);try{const f={message:"accepted"};console.log("📋 AssignmentView: Assignment accepted:",f),e.didSuccess(f,d.jsx(p,{message:"Assignment accepted!",assignment:o}))}catch(f){console.error("📋 AssignmentView: Error accepting assignment:",f),e.didFail({error:"Failed to accept assignment"})}finally{u(!1)}}},y=async()=>{if(!(!o||!e)){u(!0);try{const f={message:"declined"};console.log("📋 AssignmentView: Assignment declined:",f),e.didSuccess(f,d.jsx(p,{message:"Assignment declined",assignment:o}))}catch(f){console.error("📋 AssignmentView: Error declining assignment:",f),e.didFail({error:"Failed to decline assignment"})}finally{u(!1)}}};return a?d.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:d.jsxs("div",{className:"flex items-center justify-center py-4",children:[d.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),d.jsx("span",{className:"ml-2 text-xs text-gray-600",children:"Loading assignment..."})]})}):o?d.jsxs("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg overflow-hidden",children:[d.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-purple-600 text-white p-3",children:d.jsx("div",{className:"flex items-center justify-between",children:d.jsx("h3",{className:"text-xs font-semibold text-white truncate",children:o.title})})}),d.jsxs("div",{className:"p-3",children:[d.jsx("div",{className:"bg-gray-50 rounded p-2 mb-3",children:d.jsx("p",{className:"text-xs text-gray-700 leading-snug",children:o.description})}),d.jsx("div",{className:"mb-3",children:d.jsxs("div",{className:"flex items-center text-xs text-gray-600",children:[d.jsx("span",{className:"text-xs mr-1",children:"📅"}),d.jsxs("span",{children:["Est: ",o.estimated_time_of_completion]})]})}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{onClick:g,disabled:l,className:"flex-1 bg-green-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:l?d.jsxs("span",{className:"flex items-center justify-center",children:[d.jsx("div",{className:"animate-spin rounded-full h-2 w-2 border-b-2 border-white mr-1"}),d.jsx("span",{className:"text-xs",children:"Processing..."})]}):"Accept"}),d.jsx("button",{onClick:y,disabled:l,className:"flex-1 bg-red-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-red-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Decline"})]})]})]}):d.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:d.jsxs("div",{className:"text-center py-4",children:[d.jsx("div",{className:"text-red-600 text-sm font-semibold mb-2",children:"⚠️ Assignment Error"}),d.jsx("p",{className:"text-xs text-gray-600 mb-3",children:"Failed to load assignment details."})]})})};function sE(){const[e,t]=m.useState(null),[n,r]=m.useState([]);m.useEffect(()=>{const a=new Ir({appId:"your-app-id",appSecret:"your-app-secret",baseUrl:"https://your-voxket-api.com",agentId:"your-agent-id",participantName:"User",modalities:["chat"]});return t(a),a.on("rpc.method.called",c=>{console.log("RPC Method Called:",c)}),a.on("rpc.interaction.completed",c=>{console.log("RPC Interaction Completed:",c)}),()=>{a.disconnect()}},[]);const s=async()=>{if(e)try{await e.registerFrontendRPC("give_assignment",ep,"embedded");const a=e.getRegisteredRpcMethods();r(a),console.log("✅ Assignment RPC registered successfully")}catch(a){console.error("❌ Failed to register assignment RPC:",a)}},o=async()=>{if(!e)return;const a=({handler:c,timeout:l})=>{const[u,h]=m.useState(""),p=[{id:"pro",name:"Pro Plan",price:"$29/month"},{id:"enterprise",name:"Enterprise Plan",price:"$99/month"},{id:"basic",name:"Basic Plan",price:"$9/month"}],g=f=>{h(f)},y=()=>{const f=p.find(v=>v.id===u);c==null||c.didSuccess({selectedProduct:u,productName:f==null?void 0:f.name,price:f==null?void 0:f.price,timestamp:new Date().toISOString()})};return d.jsxs("div",{className:"p-6 bg-white rounded-lg",children:[d.jsx("h3",{className:"text-xl font-bold mb-4",children:"Choose Your Plan"}),d.jsx("p",{className:"text-gray-600 mb-4",children:"Select the plan that best fits your needs:"}),d.jsx("div",{className:"space-y-3 mb-6",children:p.map(f=>d.jsx("div",{onClick:()=>g(f.id),className:`p-4 border rounded-lg cursor-pointer transition-all ${u===f.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"}`,children:d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsxs("div",{children:[d.jsx("h4",{className:"font-medium",children:f.name}),d.jsx("p",{className:"text-gray-600 text-sm",children:f.price})]}),d.jsx("div",{className:`w-4 h-4 rounded-full ${u===f.id?"bg-blue-500":"border-2 border-gray-300"}`})]})},f.id))}),d.jsxs("div",{className:"flex justify-end space-x-3",children:[d.jsx("button",{onClick:()=>c==null?void 0:c.dismissView(),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Cancel"}),d.jsx("button",{onClick:y,disabled:!u,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Select Plan"})]}),l&&d.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Time remaining: ",l," seconds"]})]})};try{await e.registerFrontendRPC("recommend_product",a,"modal");const c=e.getRegisteredRpcMethods();r(c),console.log("✅ Product Recommendation RPC registered successfully")}catch(c){console.error("❌ Failed to register product recommendation RPC:",c)}},i=async()=>{if(!e)return;const a=({handler:c})=>{const[l,u]=m.useState(0),[h,p]=m.useState(""),g=()=>{c==null||c.didSuccess({rating:l,comment:h,timestamp:new Date().toISOString()})};return d.jsxs("div",{className:"p-4 bg-white rounded-lg",children:[d.jsx("h3",{className:"text-lg font-semibold mb-3",children:"How was your experience?"}),d.jsxs("div",{className:"mb-4",children:[d.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Rate your experience:"}),d.jsx("div",{className:"flex space-x-1",children:[1,2,3,4,5].map(y=>d.jsx("button",{onClick:()=>u(y),className:`text-2xl ${y<=l?"text-yellow-400":"text-gray-300"}`,children:"⭐"},y))})]}),d.jsxs("div",{className:"mb-4",children:[d.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Additional comments:"}),d.jsx("textarea",{value:h,onChange:y=>p(y.target.value),className:"w-full p-2 border border-gray-300 rounded text-sm",rows:3,placeholder:"Tell us more about your experience..."})]}),d.jsxs("div",{className:"flex justify-end space-x-2",children:[d.jsx("button",{onClick:()=>c==null?void 0:c.dismissView(),className:"px-3 py-1 text-sm border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Skip"}),d.jsx("button",{onClick:g,disabled:l===0,className:"px-3 py-1 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Submit"})]})]})};try{await e.registerFrontendRPC("collect_feedback",a,"embedded");const c=e.getRegisteredRpcMethods();r(c),console.log("✅ Feedback RPC registered successfully")}catch(c){console.error("❌ Failed to register feedback RPC:",c)}};return d.jsxs("div",{className:"p-6",children:[d.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Frontend RPC Examples"}),d.jsxs("div",{className:"space-y-4 mb-6",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Register RPC Methods"}),d.jsxs("div",{className:"space-x-2",children:[d.jsx("button",{onClick:s,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Register Assignment RPC"}),d.jsx("button",{onClick:o,className:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600",children:"Register Product Recommendation RPC"}),d.jsx("button",{onClick:i,className:"px-4 py-2 bg-purple-500 text-white rounded hover:bg-purple-600",children:"Register Feedback RPC"})]})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Registered Methods"}),n.length>0?d.jsx("ul",{className:"list-disc list-inside space-y-1",children:n.map(a=>d.jsx("li",{className:"text-gray-700",children:d.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:a})},a))}):d.jsx("p",{className:"text-gray-500",children:"No methods registered yet"})]})]}),d.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[d.jsx("h3",{className:"text-lg font-semibold mb-2",children:"How it works"}),d.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-sm text-gray-700",children:[d.jsxs("li",{children:["Register RPC methods with React components using ",d.jsx("code",{children:"client.registerFrontendRPC()"})]}),d.jsx("li",{children:"When the agent calls an RPC method, the corresponding component will be displayed"}),d.jsx("li",{children:"Users interact with the component, and the response is sent back to the agent"}),d.jsx("li",{children:"Components can be displayed in different modes: embedded, modal, or fullscreen"}),d.jsx("li",{children:"Each component has a timeout and can handle success/failure scenarios"})]})]}),d.jsxs("div",{className:"mt-6 bg-blue-50 p-4 rounded-lg",children:[d.jsx("h3",{className:"text-lg font-semibold mb-2 text-blue-800",children:"Agent Side"}),d.jsx("p",{className:"text-sm text-blue-700 mb-2",children:"On the agent side, you can call these RPC methods like this:"}),d.jsx("pre",{className:"bg-white p-3 rounded text-xs text-gray-800 overflow-x-auto",children:`// Agent calls RPC method
250
+ `,style:{minHeight:"2.5rem",display:i===r?"block":"none"},children:o},i))})}function v6({statusMessage:e,theme:t}){const n=_e(t);return d.jsxs("div",{className:"z-10 flex items-center space-x-2 mt-2 pb-2",children:[d.jsx("div",{className:n.statusIndicator}),d.jsx("span",{className:`text-xs ${n.text.muted}`,children:e})]})}const x6=({disabled:e,onStartCall:t,onStartChat:n,onStartVideo:r,prompts:s=['"Book a meeting with the marketing team"',`"What's the status of project Alpha?"`,`"Summarize yesterday's sales report"`,'"Find a good Italian restaurant nearby"','"Remind me to call John tomorrow at 10 AM"'],statusMessage:o="Agent is ready",title:i="Choose how to interact",subTitle:a="Ask me anything or give me a task to complete",theme:c="vox",modalities:l=["voice","chat","video"]})=>{const u=_e(c),h=l.includes("voice"),p=l.includes("chat"),g=l.includes("video"),y=[h,p,g].filter(Boolean).length;return console.log("🎯 Welcome component debug:",{modalities:l,hasVoice:h,hasChat:p,hasVideo:g,totalButtons:y,onStartVideo:!!r}),d.jsxs("div",{inert:e,className:"flex p-8 flex-col items-center h-full justify-center w-full",children:[d.jsxs("div",{className:"mt-1 relative flex items-center justify-center mb-8 w-full",style:{minHeight:"120px"},children:[d.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[d.jsx("div",{className:u.pulseRings.ring1}),d.jsx("div",{className:u.pulseRings.ring2,style:{animationDelay:"0.5s"}}),d.jsx("div",{className:u.pulseRings.ring3,style:{animationDelay:"1s"}})]}),d.jsx("div",{className:"relative z-10 flex items-center justify-center",children:h&&p&&g?d.jsxs("div",{className:"flex gap-4 items-center justify-center",children:[d.jsx(ts,{onClick:t,disabled:e,theme:c}),d.jsx(Zo,{onClick:n,disabled:e,theme:c}),d.jsx(Ko,{onClick:r||t,disabled:e,theme:c})]}):y>1?d.jsxs("div",{className:"flex gap-6 items-center justify-center",children:[h&&d.jsx(ts,{onClick:t,disabled:e,theme:c}),p&&d.jsx(Zo,{onClick:n,disabled:e,theme:c}),g&&r&&d.jsx(Ko,{onClick:r,disabled:e,theme:c})]}):d.jsx("div",{className:"flex items-center justify-center",children:h?d.jsx(ts,{onClick:t,disabled:e,theme:c}):p?d.jsx(Zo,{onClick:n,disabled:e,theme:c}):g&&r?d.jsx(Ko,{onClick:r,disabled:e,theme:c}):d.jsx(ts,{onClick:t,disabled:e,theme:c})})})]}),d.jsxs("div",{className:"text-center flex flex-col items-center gap-y-2 mb-6 w-full",children:[d.jsx("h3",{className:`text-xl font-semibold mb-2 ${u.text.accent}`,children:i}),d.jsx("p",{className:`text-sm leading-relaxed px-4 ${u.text.secondary}`,children:a}),y>1&&d.jsxs("div",{className:"flex gap-6 mt-4 text-xs justify-center",children:[h&&d.jsxs("div",{className:"flex flex-col items-center gap-1",children:[d.jsx(Im,{className:"w-4 h-4"}),d.jsx("span",{className:u.text.muted,children:"Voice"})]}),p&&d.jsxs("div",{className:"flex flex-col items-center gap-1",children:[d.jsx(Vm,{className:"w-4 h-4"}),d.jsx("span",{className:u.text.muted,children:"Chat"})]}),g&&d.jsxs("div",{className:"flex flex-col items-center gap-1",children:[d.jsx(Dm,{className:"w-4 h-4"}),d.jsx("span",{className:u.text.muted,children:"Video"})]})]})]}),d.jsx(y6,{prompts:s,theme:c}),d.jsx(v6,{statusMessage:o,theme:c})]})};function Om({room:e,onSessionEnd:t,onSessionStart:n,enableConsoleLogging:r=!0,enableLocalStorage:s=!0,voxketSessionId:o}={}){const[i,a]=m.useState(null),[c,l]=m.useState([]),[u,h]=m.useState(null),[p,g]=m.useState([]),y=m.useCallback((b,S)=>{const C={timestamp:new Date,event:b,data:S,sessionId:i==null?void 0:i.sessionId,participantId:u==null?void 0:u.identity};if(l(E=>[...E,C]),s){const E=JSON.parse(localStorage.getItem("voxket-session-logs")||"[]");E.push(C),localStorage.setItem("voxket-session-logs",JSON.stringify(E))}return C},[i==null?void 0:i.sessionId,u==null?void 0:u.identity,r,s]);m.useEffect(()=>{if(!e)return;const b=()=>{const x=o||`session-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,I=new Date,_={sessionId:x,startTime:I,totalMessages:0,connectionIssues:0,participantCount:p.length,events:[]};a(_),y("SESSION_STARTED",{sessionId:x,startTime:I}),n==null||n(x)},S=()=>{if(i){const x=new Date,I=x.getTime()-i.startTime.getTime(),_={...i,endTime:x,duration:I,events:c};y("SESSION_ENDED",{sessionId:i.sessionId,duration:`${Math.round(I/1e3)}s`,totalMessages:i.totalMessages,connectionIssues:i.connectionIssues}),t==null||t(_),a(null),l([])}},C=x=>{y("CONNECTION_STATE_CHANGED",{state:x}),x===te.ConnectionState.Reconnecting&&i&&(a(I=>I?{...I,connectionIssues:I.connectionIssues+1}:null),y("CONNECTION_ISSUE",{type:"reconnecting"}))},E=x=>{y("TRACK_PUBLISHED",{trackKind:x.kind,trackSource:x.source})},T=x=>{y("TRACK_UNPUBLISHED",{trackKind:x.kind,trackSource:x.source})},k=(x,I)=>{i&&a(_=>_?{..._,totalMessages:_.totalMessages+1}:null),y("DATA_RECEIVED",{participantId:I==null?void 0:I.identity,dataSize:x.length})},P=x=>{y("PARTICIPANT_CONNECTED",{participantId:x.identity,participantName:x.name}),g(I=>[...I,x]),i&&a(I=>I?{...I,participantCount:I.participantCount+1}:null)},$=x=>{y("PARTICIPANT_DISCONNECTED",{participantId:x.identity,participantName:x.name}),g(I=>I.filter(_=>_.identity!==x.identity))};return e.localParticipant&&h(e.localParticipant),e.on(te.RoomEvent.Connected,b),e.on(te.RoomEvent.Disconnected,S),e.on(te.RoomEvent.ConnectionStateChanged,C),e.on(te.RoomEvent.TrackPublished,E),e.on(te.RoomEvent.TrackUnpublished,T),e.on(te.RoomEvent.DataReceived,k),e.on(te.RoomEvent.ParticipantConnected,P),e.on(te.RoomEvent.ParticipantDisconnected,$),()=>{e.off(te.RoomEvent.Connected,b),e.off(te.RoomEvent.Disconnected,S),e.off(te.RoomEvent.ConnectionStateChanged,C),e.off(te.RoomEvent.TrackPublished,E),e.off(te.RoomEvent.TrackUnpublished,T),e.off(te.RoomEvent.DataReceived,k),e.off(te.RoomEvent.ParticipantConnected,P),e.off(te.RoomEvent.ParticipantDisconnected,$)}},[e,i,c,p.length,y,t,n]);const f=m.useCallback(()=>s?JSON.parse(localStorage.getItem("voxket-session-logs")||"[]"):c,[c,s]),v=m.useCallback(()=>{s&&localStorage.removeItem("voxket-session-logs"),l([])},[s]),w=m.useCallback(()=>{const b=f(),S=JSON.stringify(b,null,2),C="data:application/json;charset=utf-8,"+encodeURIComponent(S),E=`voxket-session-logs-${new Date().toISOString().split("T")[0]}.json`,T=document.createElement("a");T.setAttribute("href",C),T.setAttribute("download",E),T.click()},[f]);return{sessionMetrics:i,sessionLogs:c,logEvent:y,getSessionLogs:f,clearSessionLogs:v,exportSessionLogs:w}}var En={},Ld;function b6(){if(Ld)return En;Ld=1;var e=Fi;if(process.env.NODE_ENV==="production")En.createRoot=e.createRoot,En.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;En.createRoot=function(n,r){t.usingClientEntryPoint=!0;try{return e.createRoot(n,r)}finally{t.usingClientEntryPoint=!1}},En.hydrateRoot=function(n,r,s){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(n,r,s)}finally{t.usingClientEntryPoint=!1}}}return En}var w6=b6();class Ya{constructor(){Ne(this,"listeners",{})}on(t,n){return this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n),()=>this.off(t,n)}once(t,n){const r=(...s)=>{this.off(t,r),n(...s)};return this.on(t,r)}off(t,n){const r=this.listeners[t];if(!r)return;const s=r.indexOf(n);s>-1&&r.splice(s,1)}removeAllListeners(t){t?delete this.listeners[t]:this.listeners={}}emit(t,...n){const r=this.listeners[t];if(!r)return;const s=[...r];for(const o of s)try{o(...n)}catch(i){console.error(`Error in event listener for ${String(t)}:`,i)}}listenerCount(t){var n;return((n=this.listeners[t])==null?void 0:n.length)??0}eventNames(){return Object.keys(this.listeners)}}class $m{constructor(t){Ne(this,"plugins",new Map);Ne(this,"installedPlugins",new Set);Ne(this,"context");this.context={client:t,emit:t.emit.bind(t),on:t.on.bind(t),config:{}}}register(t){if(this.plugins.has(t.name))throw new Error(`Plugin '${t.name}' is already registered`);if(t.dependencies){for(const n of t.dependencies)if(!this.plugins.has(n))throw new Error(`Plugin '${t.name}' depends on '${n}' which is not registered`)}this.plugins.set(t.name,t)}async install(t,n){const r=this.plugins.get(t);if(!r)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t))throw new Error(`Plugin '${t}' is already installed`);if(r.dependencies)for(const o of r.dependencies)this.installedPlugins.has(o)||await this.install(o);const s={...this.context,config:{...r.config,...n}};r.install&&await r.install(s),this.installedPlugins.add(t),this.setupPluginEvents(r,s)}async uninstall(t){var r;const n=this.plugins.get(t);if(!n)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t)){for(const[s,o]of this.plugins)if(this.installedPlugins.has(s)&&((r=o.dependencies)!=null&&r.includes(t)))throw new Error(`Cannot uninstall '${t}' because '${s}' depends on it`);n.uninstall&&await n.uninstall(this.context),this.installedPlugins.delete(t)}}isInstalled(t){return this.installedPlugins.has(t)}getInstalledPlugins(){return Array.from(this.installedPlugins)}getAvailablePlugins(){return Array.from(this.plugins.keys())}getPluginInfo(t){return this.plugins.get(t)}setupPluginEvents(t,n){t.onSessionStart&&n.on("session.started",r=>{t.onSessionStart(n,r.id)}),t.onSessionEnd&&n.on("session.ended",r=>{t.onSessionEnd(n,r.id)}),t.onAgentResponse&&n.on("agent.response",r=>{t.onAgentResponse(n,r)})}}function S6(e){return e}function Ga(e,t,n){return{name:e,version:"1.0.0",description:`${t} modality plugin`,install:async r=>{n.onActivate&&await n.onActivate(r)},uninstall:async r=>{n.onDeactivate&&await n.onDeactivate(r)},onAgentResponse:n.onMessage}}const C6={name:"analytics",version:"1.0.0",description:"Built-in analytics tracking",install:async e=>{console.log("Analytics plugin installed"),e.on("session.started",t=>{console.log("Analytics: Session started",t.id)}),e.on("session.ended",(t,n)=>{console.log("Analytics: Session ended",t.id,n)}),e.on("chat.message.sent",t=>{console.log("Analytics: User message sent",t.content.length)})}},E6={name:"debug",version:"1.0.0",description:"Debug logging and development tools",install:async e=>{console.log("Debug plugin installed");const t=e.emit;e.emit=(n,...r)=>(console.log(`[Debug] Event: ${String(n)}`,r),t(n,...r))}},k6={name:"metrics",version:"1.0.0",description:"Advanced metrics collection",install:async e=>{console.log("Metrics plugin installed");const t=new Map;e.on("session.started",n=>{t.set(n.id,{startTime:Date.now(),events:[]})}),e.on("agent.response",n=>{console.log("Metrics: Agent response analyzed",{type:n.type,length:n.content.length,timestamp:n.timestamp})})}},Lm=A.createContext(null);function _m({config:e,children:t,autoConnect:n=!1}){const[r,s]=A.useState(null),[o,i]=A.useState(!1),[a,c]=A.useState(!1),[l,u]=A.useState(null),[h,p]=A.useState(null),[g,y]=A.useState("idle"),[f,v]=A.useState(null),[w,b]=A.useState([]),[S,C]=A.useState([]),[E,T]=A.useState([]);A.useEffect(()=>{const M=new Ir(e);return s(M),k(M),n&&P(M),()=>{M.disconnect().catch(console.error)}},[e,n]);const k=M=>{M.on("connection.connecting",()=>{c(!0),u(null)}),M.on("connection.connected",()=>{i(!0),c(!1),u(null)}),M.on("connection.disconnected",()=>{i(!1),c(!1),p(null),y("idle"),b([]),C([]),T([])}),M.on("connection.error",q=>{u(q),c(!1)}),M.on("session.created",q=>{p(q),y(q.state)}),M.on("session.state.changed",q=>{y(q),h&&p({...h,state:q})}),M.on("session.ended",(q,N)=>{p(null),y("idle"),v(N),b([]),C([]),T([])}),M.on("participant.joined",q=>{b(N=>[...N,q])}),M.on("participant.left",q=>{b(N=>N.filter(V=>V.id!==q.id))}),M.on("chat.message.received",q=>{C(N=>[...N,q])}),M.on("chat.message.sent",q=>{C(N=>[...N,q])}),M.on("transcription.received",q=>{T(N=>[...N,q])})},P=async M=>{const q=M||r;if(q)try{await q.connect()}catch(N){console.error("Failed to connect:",N)}},U={client:r,isConnected:o,isConnecting:a,connectionError:l,currentSession:h,sessionState:g,sessionMetrics:f,participants:w,chatMessages:S,transcriptions:E,connect:()=>P(),disconnect:async()=>{if(r)try{await r.disconnect()}catch(M){console.error("Failed to disconnect:",M)}},createSession:async(M,q={})=>{if(!r)throw new Error("Client not initialized");const N={agentId:M,participantName:q.participantName||"User",metadata:q.metadata,modalities:q.modalities||["voice"]};return await r.createSession(N)},endSession:async()=>r?await r.endSession():null,sendChatMessage:async M=>{if(!r)throw new Error("Client not initialized");await r.sendChatMessage(M)},setMicrophoneEnabled:async M=>{if(!r)throw new Error("Client not initialized");await r.setMicrophoneEnabled(M)},setCameraEnabled:async M=>{if(!r)throw new Error("Client not initialized");await r.setCameraEnabled(M)},startScreenShare:async()=>{if(!r)throw new Error("Client not initialized");await r.startScreenShare()},stopScreenShare:async()=>{if(!r)throw new Error("Client not initialized");await r.stopScreenShare()}};return d.jsx(Lm.Provider,{value:U,children:t})}function Et(){const e=A.useContext(Lm);if(!e)throw new Error("useVoxket must be used within a VoxketProvider");return e}class T6 extends Ya{constructor(n){super();Ne(this,"room",null);Ne(this,"registeredMethods",new Map);Ne(this,"activeInteractions",new Map);Ne(this,"currentInteraction",null);n&&this.setRoom(n)}setRoom(n){this.room=n}async registerFrontendRPC(n,r,s="embedded"){if(console.log(`RpcManager: Starting registration for method '${n}'`),!this.room)throw console.error(`RpcManager: Cannot register '${n}' - no room instance`),new Error("Room not initialized. Cannot register RPC method.");if(!this.room.localParticipant)throw console.error(`RpcManager: Cannot register '${n}' - no local participant`),new Error("Local participant not available for RPC registration");console.log(`RpcManager: Room state: ${this.room.state}`),console.log(`RpcManager: Local participant: ${this.room.localParticipant.identity}`),console.log(`RpcManager: Registering frontend RPC method: ${n}`);const o={methodName:n,component:r,presentationMode:s};this.registeredMethods.set(n,o);try{this.room.registerRpcMethod(n,async i=>{console.log(`RpcManager: RPC method '${n}' called by ${i.callerIdentity}`),console.log("RpcManager: Payload:",i.payload),this.emit("rpc.method.called",{methodName:n,data:i});let a;console.log(`RpcManager: Current registration for '${n}':`,o);let c=i.responseTimeout||30;try{a=JSON.parse(i.payload)}catch{a=i.payload}try{const l=await this.awaitUserInteraction(n,r,s,a,c);return JSON.stringify(l)}catch(l){throw console.error(`RpcManager: Error in RPC method '${n}':`,l),l}}),this.emit("rpc.method.registered",{methodName:n}),console.log(`RpcManager: Successfully registered RPC method: ${n}`)}catch(i){throw console.error(`RpcManager: Failed to register RPC method '${n}':`,i),i}}async awaitUserInteraction(n,r,s,o,i){return new Promise((a,c)=>{const l=`${n}_${Date.now()}`;console.log(`RpcManager: Starting user interaction for method: ${n}, timeout: ${i} seconds`);const u={didSuccess:(p,g)=>{console.log(`RpcManager: User interaction successful for method: ${n}`,p),this.clearInteraction(l),this.currentInteraction=null;const y={success:!0,message:"User interaction completed successfully",data:p,timestamp:new Date,...g?{successView:g}:{}};this.emit("rpc.interaction.completed",{methodName:n,response:y}),a(y)},didFail:p=>{console.log(`RpcManager: User interaction failed for method: ${n}`,p),this.clearInteraction(l);const g={success:!1,message:"User interaction failed",error:p,timestamp:new Date};this.emit("rpc.interaction.completed",{methodName:n,response:g}),a(g)},dismissView:()=>{var g;console.log(`RpcManager: User dismissed interaction for method: ${n}`),console.log("RpcManager: Current interaction before dismiss:",(g=this.currentInteraction)==null?void 0:g.methodName),this.clearInteraction(l),this.currentInteraction=null,console.log("RpcManager: Current interaction after dismiss:",this.currentInteraction);const p={success:!0,data:{dismissed:!0,reason:"User dismissed the interaction"},message:"User interaction dismissed",timestamp:new Date};this.emit("rpc.interaction.dismissed",{methodName:n,response:p}),this.emit("rpc.interaction.completed",{methodName:n,response:p}),setTimeout(()=>{var y;((y=this.currentInteraction)==null?void 0:y.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(p)},didTimeout:p=>{console.log(`RpcManager: User interaction timeout for method: ${n}`),this.clearInteraction(l),this.currentInteraction=null;const g={success:!0,message:`User interaction timed out after ${i} seconds, it should be considered as declined, agent don't need to retry`,timestamp:new Date,...p?{timeoutView:p}:{}};this.emit("rpc.interaction.timeout",{methodName:n,response:g}),setTimeout(()=>{var y;((y=this.currentInteraction)==null?void 0:y.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(g)}},h=setTimeout(()=>{u.didTimeout&&u.didTimeout()},i);this.activeInteractions.set(l,{resolve:p=>a(JSON.parse(p)),reject:c,timeoutId:h}),this.currentInteraction={isVisible:!0,methodName:n,component:r,presentationMode:s,timeout:i,data:o,handler:u},this.emit("rpc.interaction.started",{methodName:n,presentationMode:s}),setTimeout(async()=>{var p;if((p=this.currentInteraction)!=null&&p.handler)try{console.log(`RpcManager: Component created for method: ${n} with data:`,o)}catch(g){console.error("RpcManager: Error loading data into component:",g),u.didFail({error:"Failed to load data into component"})}},100)})}clearInteraction(n){const r=this.activeInteractions.get(n);r&&(console.log(`RpcManager: Clearing interaction: ${n}`),clearTimeout(r.timeoutId),this.activeInteractions.delete(n))}getCurrentInteraction(){return this.currentInteraction}dismissCurrentInteraction(){var n;this.currentInteraction&&(console.log(`RpcManager: Dismissing current interaction: ${this.currentInteraction.methodName}`),(n=this.currentInteraction.handler)==null||n.dismissView(),setTimeout(()=>{this.currentInteraction&&(console.log("RpcManager: Force clearing lingering interaction"),this.currentInteraction=null)},0))}getRegisteredMethods(){return Array.from(this.registeredMethods.keys())}unregisterMethod(n){this.registeredMethods.delete(n),console.log(`RpcManager: Unregistered RPC method: ${n}`)}clear(){for(const[n,r]of this.activeInteractions)clearTimeout(r.timeoutId);this.activeInteractions.clear(),this.registeredMethods.clear(),this.currentInteraction=null,console.log("RpcManager: Cleared all registrations and interactions")}}class ge extends Error{constructor(t,n,r){super(t),this.code=n,this.details=r,this.name="VoxketError"}}class Ir extends Ya{constructor(n){super();Ne(this,"config");Ne(this,"room",null);Ne(this,"pluginManager");Ne(this,"rpcManager");Ne(this,"isConnected",!1);Ne(this,"currentSession",null);Ne(this,"connectionState",te.ConnectionState.Disconnected);Ne(this,"renderedComponents",new Map);Ne(this,"textStreamHandlersRegistered",!1);Ne(this,"currentAgentInfo",null);Ne(this,"chatMessages",[]);this.config=n,this.pluginManager=new $m(this),this.rpcManager=new T6,this.setupEventListeners(),this.initializeClient()}setupEventListeners(){this.on("connection.connected",()=>{var n,r;this.isConnected=!0,(r=(n=this.config).onConnected)==null||r.call(n)}),this.on("connection.disconnected",n=>{var r,s;this.isConnected=!1,(s=(r=this.config).onDisconnected)==null||s.call(r,n)}),this.on("connection.error",n=>{var r,s;(s=(r=this.config).onError)==null||s.call(r,n)}),this.on("chat.message.received",n=>{var r,s;this.addChatMessage(n),(s=(r=this.config).onMessageReceived)==null||s.call(r,n)}),this.on("chat.message.updated",n=>{this.updateChatMessage(n)}),this.on("chat.message.sent",n=>{this.addChatMessage(n)}),this.on("transcription.received",n=>{var r,s;(s=(r=this.config).onTranscriptionReceived)==null||s.call(r,n)}),this.on("session.state.changed",n=>{var r,s;(s=(r=this.config).onSessionStateChanged)==null||s.call(r,n)}),this.on("session.created",n=>{var r,s;(s=(r=this.config).onSessionStart)==null||s.call(r,n.id)}),this.on("session.ended",(n,r)=>{var s,o;(o=(s=this.config).onSessionEnd)==null||o.call(s,r)}),this.on("participant.joined",n=>{var r,s;(s=(r=this.config).onUserJoined)==null||s.call(r,n.id)}),this.on("participant.left",n=>{var r,s;(s=(r=this.config).onUserLeft)==null||s.call(r,n.id)}),this.setupRpcEventForwarding()}setupRpcEventForwarding(){if(!this.rpcManager){console.warn("RpcManager not initialized, skipping event forwarding setup");return}this.rpcManager.on("rpc.method.registered",n=>this.emit("rpc.method.registered",n)),this.rpcManager.on("rpc.method.called",n=>this.emit("rpc.method.called",n)),this.rpcManager.on("rpc.interaction.started",n=>this.emit("rpc.interaction.started",n)),this.rpcManager.on("rpc.interaction.completed",n=>this.emit("rpc.interaction.completed",n)),this.rpcManager.on("rpc.interaction.timeout",n=>this.emit("rpc.interaction.timeout",n)),this.rpcManager.on("rpc.interaction.dismissed",n=>this.emit("rpc.interaction.dismissed",n))}initializeClient(){this.room=new te.Room,this.setupRoomEventListeners()}setupRoomEventListeners(){this.room&&(this.room.on(te.RoomEvent.Connected,()=>{var n,r;this.connectionState=te.ConnectionState.Connected,this.emit("connection.connected"),this.rpcManager.setRoom(this.room),(r=(n=this.currentSession)==null?void 0:n.activeModalities)!=null&&r.includes("voice")&&setTimeout(async()=>{var s;try{(s=this.room)!=null&&s.localParticipant&&(this.room.localParticipant.isMicrophoneEnabled?this.emit("track.unmuted",{source:"microphone",enabled:!0}):(await this.room.localParticipant.setMicrophoneEnabled(!0),this.emit("track.unmuted",{source:"microphone",enabled:!0})))}catch(o){console.warn("VoxketClient: Failed to enable microphone after room connection:",o)}},1e3),this.textStreamHandlersRegistered||this.setupTextStreamHandlers()}),this.room.on(te.RoomEvent.Disconnected,n=>{this.connectionState=te.ConnectionState.Disconnected,this.textStreamHandlersRegistered=!1,this.emit("connection.disconnected",n==null?void 0:n.toString())}),this.room.on(te.RoomEvent.ConnectionStateChanged,n=>{this.connectionState=n,n===te.ConnectionState.Connecting&&this.emit("connection.connecting")}),this.room.on(te.RoomEvent.ParticipantConnected,n=>{const r={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.joined",r)}),this.room.on(te.RoomEvent.ParticipantDisconnected,n=>{const r={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.left",r)}))}setupTextStreamHandlers(){if(this.room){try{this.room.registerTextStreamHandler("lk.chat",async(n,r)=>{try{const s=await n.readAll(),o={id:`msg_${Date.now()}_${r.identity||"user"}_${Math.random().toString(36).substr(2,9)}`,content:s,timestamp:new Date,sender:{id:r.identity||"user",name:r.identity||"User",type:"participant"},metadata:{topic:"lk.chat"}};this.emit("chat.message.received",o)}catch(s){console.error("VoxketClient: Failed to process lk.chat message:",s)}})}catch(n){console.warn("VoxketClient: lk.chat handler already registered, skipping:",n)}try{this.room.registerTextStreamHandler("lk.transcription",async(n,r)=>{var s,o;try{const i=`msg_${Date.now()}_agent_transcription_${Math.random().toString(36).substr(2,9)}`;let a="";const c=((s=this.currentAgentInfo)==null?void 0:s.name)||r.identity||"AI Assistant",l={id:i,content:"",timestamp:new Date,sender:{id:r.identity||"agent",name:c,type:"agent"},metadata:{topic:"lk.transcription",streaming:!0}};this.emit("chat.message.received",l);for await(const p of n){a+=p;const g=this.convertMarkdownToText(a),y={...l,content:g,metadata:{...l.metadata,streaming:!0}};this.emit("chat.message.updated",y)}const u=this.convertMarkdownToText(a),h={...l,content:u,metadata:{...l.metadata,streaming:!1}};this.emit("chat.message.updated",h)}catch(i){console.error("VoxketClient: Failed to process lk.transcription message:",i);try{const a=await n.readAll(),c=((o=this.currentAgentInfo)==null?void 0:o.name)||r.identity||"AI Assistant",l={id:`msg_${Date.now()}_agent_transcription_${Math.random().toString(36).substr(2,9)}`,content:a,timestamp:new Date,sender:{id:r.identity||"agent",name:c,type:"agent"},metadata:{topic:"lk.transcription"}};this.emit("chat.message.received",l)}catch(a){console.error("VoxketClient: Fallback failed for lk.transcription:",a)}}})}catch(n){console.warn("VoxketClient: lk.transcription handler already registered, skipping:",n)}try{this.room.registerTextStreamHandler("suggested_response",async n=>{const r=await n.readAll();let s=[];try{s=["tes","hello how are you","algebra make me learn that ","what is the meaning of life"]}catch(o){console.warn("VoxketClient: Failed to parse suggested_response:",o,r)}this.emit("suggested.response",s)})}catch(n){console.warn("VoxketClient: suggested_response handler already registered, skipping:",n)}try{this.room.registerTextStreamHandler("agent_state_changed",async(n,r)=>{const s=await n.readAll();let o={};try{o=typeof s=="string"?JSON.parse(s.replace(/'/g,'"')):s}catch(i){console.warn("VoxketClient: Failed to parse agent_state_changed:",i,s)}o.new_state==="speaking"?this.emit("agent.speaking",o):o.new_state==="thinking"&&this.emit("agent.thinking",o)})}catch(n){console.warn("VoxketClient: conversation_item_added handler already registered, skipping:",n)}try{this.room.registerTextStreamHandler("images",async(n,r)=>{try{const s=await n.readAll()}catch(s){console.error("VoxketClient: Error processing images stream:",s)}})}catch(n){console.warn("VoxketClient: images handler already registered, skipping:",n)}try{this.room.registerByteStreamHandler("images",async(n,r)=>{var s,o;try{const i=n.info,a={id:`img_${Date.now()}_${r.identity||"agent"}_${Math.random().toString(36).substr(2,9)}`,content:`�️ ${i.name||"Image"}`,sender:{id:r.identity||"agent",name:r.identity||"Agent",type:r.identity===((o=(s=this.room)==null?void 0:s.localParticipant)==null?void 0:o.identity)?"participant":"agent"},timestamp:new Date,metadata:{type:"attachment",fileName:i.name,fileSize:i.size,mimeType:i.mimeType,streamId:i.id,downloading:!0}};this.emit("chat.message.received",a),n.onProgress&&(n.onProgress=p=>{const g={...a,metadata:{...a.metadata,downloadProgress:p||0}};this.emit("chat.message.updated",g)});const c=[];for await(const p of n)c.push(p);const l=new Blob(c,{type:i.mimeType||"application/octet-stream"}),u=URL.createObjectURL(l),h={...a,metadata:{...a.metadata,downloading:!1,downloadProgress:1,downloadUrl:u,blob:l}};this.emit("chat.message.updated",h)}catch(i){console.error("VoxketClient: Error processing image attachment:",i)}})}catch(n){console.warn("VoxketClient: image handler already registered, skipping:",n)}this.textStreamHandlersRegistered=!0}}async fetchConnectionDetails(n,r,s){const o=n||this.config.agentId||"default-agent",i=r||this.config.participantName||"User",a=s||this.config.modalities||["voice"];try{const c={agent_id:o,participant_name:i,participant_metadata:{user_id:""},modality:a[0]},l=await fetch(`${this.config.baseUrl}/api/live/agent/session`,{method:"POST",headers:{accept:"application/json","X-APP-ID":this.config.appId,"X-APP-SECRET":this.config.appSecret,"Content-Type":"application/json"},body:JSON.stringify(c)});if(!l.ok){let p=`HTTP ${l.status}: Failed to fetch connection details`;try{const g=await l.json();g&&(g.error?p=`API Error: ${g.error}`:g.detail?p=`API Error: ${g.detail}`:g.message&&(p=`API Error: ${g.message}`))}catch{try{const y=await l.text();y&&(p=`API Error: ${y}`)}catch{}}throw new Error(p)}const u=await l.json();let h;return u.agent_info&&(h={id:u.agent_info.id||o,name:u.agent_info.name||"AI Assistant",avatar:u.agent_info.avatar,capabilities:u.agent_info.capabilities||["voice_interaction","text_chat"],metadata:u.agent_info.metadata||{}},this.currentAgentInfo=h),{serverUrl:u.wss_url,participantToken:u.token,voxketSessionId:u.session_id,agentInfo:h}}catch(c){console.error("VoxketClient: fetchConnectionDetails failed:",c);const l=new ge(`Failed to fetch connection details: ${c instanceof Error?c.message:"Unknown error"}`,"CONNECTION_FAILED",c);throw this.emit("connection.error",l),l}}async connect(n,r,s){var o;try{this.emit("connection.connecting");const i=await this.fetchConnectionDetails(n,r,s);return await((o=this.room)==null?void 0:o.connect(i.serverUrl,i.participantToken)),this.isConnected=!0,i}catch(i){console.error("VoxketClient: Connection failed:",i);const a=new ge(`Failed to connect to Voxket services: ${i instanceof Error?i.message:"Unknown error"}`,"CONNECTION_FAILED",i);throw this.emit("connection.error",a),a}}async disconnect(){var n;try{await((n=this.room)==null?void 0:n.disconnect()),this.isConnected=!1,this.currentSession=null,this.currentAgentInfo=null,this.textStreamHandlersRegistered=!1,this.clearChatMessages(),this.room=new te.Room,this.setupRoomEventListeners()}catch(r){const s=new ge("Failed to disconnect properly","NETWORK_ERROR",r);throw this.emit("connection.error",s),s}}async createSession(n){var r,s;try{const o=await this.connect(n.agentId,n.participantName,n.modalities),i={id:o.voxketSessionId,agentId:n.agentId,state:"connecting",startedAt:new Date,metadata:n.metadata||{},activeModalities:n.modalities||["voice"],agentInfo:o.agentInfo||this.currentAgentInfo};if(this.currentSession=i,this.emit("session.created",i),(r=n.modalities)!=null&&r.includes("voice"))try{await new Promise(a=>setTimeout(a,500)),(s=this.room)!=null&&s.localParticipant?(await this.room.localParticipant.setMicrophoneEnabled(!0,void 0,{preConnectBuffer:!0}),this.emit("track.unmuted",{source:"microphone",enabled:!0})):console.warn("VoxketClient: No local participant found, microphone not enabled")}catch(a){console.warn("VoxketClient: Failed to enable microphone, but continuing with session:",a)}return setTimeout(()=>{this.currentSession&&(this.currentSession.state="active",this.emit("session.state.changed","active",this.currentSession.state))},1e3),i}catch(o){throw console.error("VoxketClient: Failed to create session:",o),o instanceof ge?o:o instanceof TypeError&&o.message.includes("fetch")?new ge("Network connection failed","CONNECTION_FAILED",o):o instanceof Error&&o.message.includes("Failed to fetch connection details")?new ge(`API connection failed: ${o.message}`,"CONNECTION_FAILED",o):new ge(`Failed to create session: ${o instanceof Error?o.message:"Unknown error"}`,"SESSION_NOT_FOUND",o)}}async startSession(n,r){const s={agentId:n||this.config.agentId||"default-agent",participantName:(r==null?void 0:r.participantName)||this.config.participantName||"User",modalities:(r==null?void 0:r.modalities)||this.config.modalities||["voice","chat"],metadata:r==null?void 0:r.metadata};return this.createSession(s)}async endSession(){var n,r;if(!this.currentSession)return null;try{const s={sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((r=this.room)==null?void 0:r.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]};return this.currentSession.endedAt=new Date,this.currentSession.state="disconnected",this.emit("session.ended",this.currentSession,s),await this.disconnect(),s}catch(s){throw new ge("Failed to end session","SESSION_NOT_FOUND",s)}}getCurrentSession(){return this.currentSession}getCurrentAgentInfo(){return this.currentAgentInfo}getChatMessages(){return[...this.chatMessages]}addChatMessage(n){this.chatMessages.some(s=>s.id===n.id)||this.chatMessages.push(n)}updateChatMessage(n){const r=this.chatMessages.findIndex(s=>s.id===n.id);r!==-1&&(this.chatMessages[r]=n)}clearChatMessages(){this.chatMessages=[],this.dismissCurrentInteraction(),this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays(),this.emit("chat.history.cleared")}renderUI(n={}){var c,l,u;const r=this.resolveTarget(n.target||"body"),s=this.getTargetKey(r),o=this.renderedComponents.get(s);o&&o.target===r||this.removeUI(r);const i=(o==null?void 0:o.root)||w6.createRoot(r),a={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((c=n.modality)==null?void 0:c.includes("chat"))!==!1,suportsVideoInput:((l=n.modality)==null?void 0:l.includes("video"))===!0,suportsScreenShare:((u=n.modality)==null?void 0:u.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};i.render(m.createElement(_m,{config:this.config,autoConnect:n.autoStart||!1,children:m.createElement(Fm,a)})),this.renderedComponents.set(s,{root:i,target:r})}removeUI(n){const r=n?this.resolveTarget(n):null;if(r){const s=this.getTargetKey(r),o=this.renderedComponents.get(s);o&&(o.root.unmount(),this.renderedComponents.delete(s),r.querySelectorAll('[id*="voxket"], [class*="voxket"], .fixed.inset-0.z-50').forEach(a=>{try{a.remove()}catch(c){console.warn("Failed to remove element:",c)}}),r===document.body&&r.querySelectorAll(".fixed.z-50, .fixed.inset-0").forEach(c=>{if(c.classList.contains("bg-black")&&c.classList.contains("backdrop-blur-sm"))try{c.remove()}catch(l){console.warn("Failed to remove fixed element:",l)}}))}}removeAllUI(){for(const[n,r]of this.renderedComponents)r.root.unmount();this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays()}forceCleanupFullscreenOverlays(){document.body.querySelectorAll(".fixed.inset-0.z-50").forEach(r=>{if(r.classList.contains("bg-black")&&(r.classList.contains("backdrop-blur-sm")||r.classList.contains("bg-opacity-30")))try{r.remove()}catch(s){console.warn("Failed to remove overlay:",s)}})}resolveTarget(n){if(typeof n=="string"){const r=document.querySelector(n);if(!r)throw new Error(`Target element not found: ${n}`);return r}return n}getTargetKey(n){return n.id?n.id:n.className?n.tagName+"_"+n.className.replace(/\s+/g,"_"):n.tagName+"_"+n.outerHTML.length%1e3}async sendMessage(n,r){var s;if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new ge("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new ge("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new ge("No local participant","CONNECTION_FAILED");this.dismissCurrentInteraction();try{const o={id:`msg_${Date.now()}`,content:n,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:r||{}},i=await((s=this.room)==null?void 0:s.localParticipant.sendText(n,{topic:"lk.chat",destinationIdentities:[]}));this.emit("chat.message.sent",o)}catch(o){throw console.error("VoxketClient: Failed to send chat message:",o),new ge("Failed to send message","NETWORK_ERROR",o)}}async sendChatMessage(n,r){return this.sendMessage(n,r)}async sendAttachments(n,r){if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new ge("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new ge("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new ge("No local participant","CONNECTION_FAILED");if(!n||n.length===0)throw new ge("No files provided","INVALID_PARAMETER");this.dismissCurrentInteraction();const s=n.filter(o=>o.type.startsWith("image/"));if(s.length===0)throw new ge("Only image files are allowed","INVALID_PARAMETER");s.length!==n.length&&console.warn("VoxketClient: Some non-image files were filtered out");try{const o=s.map(async(i,a)=>{const l={id:`att_${Date.now()}_${a}`,content:`📎 ${i.name}`,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:{...r,type:"attachment",fileName:i.name,fileSize:i.size,mimeType:i.type,uploading:!0}};this.emit("chat.message.sent",l);const u=await this.room.localParticipant.sendFile(i,{mimeType:i.type,topic:"images",onProgress:p=>{const g={...l,metadata:{...l.metadata,uploadProgress:p}};this.emit("chat.message.updated",g)}});try{const p=new FileReader,g=new Promise((v,w)=>{p.onload=()=>{typeof p.result=="string"?v(p.result):w(new Error("Failed to convert to base64"))},p.onerror=w});p.readAsDataURL(i);const f={type:"image",data:await g,filename:i.name,mimeType:i.type,size:i.size};await this.room.localParticipant.sendText(JSON.stringify(f),{topic:"images",destinationIdentities:[]})}catch(p){console.warn("VoxketClient: Failed to send image data to agent:",p);try{const g=`I've shared an image: ${i.name}`;await this.room.localParticipant.sendText(g,{topic:"lk.chat",destinationIdentities:[]})}catch(g){console.warn("VoxketClient: Failed to send image notification to agent:",g)}}const h={...l,metadata:{...l.metadata,uploading:!1,uploadProgress:1,streamId:u.id}};return this.emit("chat.message.updated",h),u});await Promise.all(o)}catch(o){throw console.error("VoxketClient: Failed to send attachments:",o),new ge("Failed to send attachments","NETWORK_ERROR",o)}}async sendAttachment(n,r){return this.sendAttachments([n],r)}toggleMicrophone(n){return this.setMicrophoneEnabled(n!==!1)}async setMicrophoneEnabled(n){var r,s;try{const o=(r=this.room)==null?void 0:r.localParticipant.isMicrophoneEnabled,i=n??!o;await((s=this.room)==null?void 0:s.localParticipant.setMicrophoneEnabled(i)),i?this.emit("track.unmuted",{source:"microphone",enabled:!0}):this.emit("track.muted",{source:"microphone",enabled:!1})}catch(o){throw console.error("VoxketClient: Failed to toggle microphone:",o),new ge("Failed to toggle microphone","PERMISSION_DENIED",o)}}toggleCamera(n){return this.setCameraEnabled(n!==!1)}async setCameraEnabled(n){var r,s;try{const o=(r=this.room)==null?void 0:r.localParticipant.isCameraEnabled,i=n??!o;await((s=this.room)==null?void 0:s.localParticipant.setCameraEnabled(i)),i?this.emit("track.unmuted",{source:"camera",enabled:!0}):this.emit("track.muted",{source:"camera",enabled:!1})}catch(o){throw console.error("VoxketClient: Failed to toggle camera:",o),new ge("Failed to toggle camera","PERMISSION_DENIED",o)}}async enableCamera(){return this.setCameraEnabled(!0)}async disableCamera(){return this.setCameraEnabled(!1)}async startScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!0))}catch(r){throw new ge("Failed to start screen share","PERMISSION_DENIED",r)}}async stopScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!1))}catch(r){throw new ge("Failed to stop screen share","PERMISSION_DENIED",r)}}async getAudioInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(r=>r.kind==="audioinput")}catch(n){throw new ge("Failed to get audio input devices","DEVICE_ERROR",n)}}async getVideoInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(r=>r.kind==="videoinput")}catch(n){throw new ge("Failed to get video input devices","DEVICE_ERROR",n)}}async setAudioInputDevice(n){var r;try{if(!((r=this.room)!=null&&r.localParticipant))throw new Error("Not connected to room")}catch(s){throw new ge("Failed to set audio input device","DEVICE_ERROR",s)}}async setVideoInputDevice(n){var r;try{if(!((r=this.room)!=null&&r.localParticipant))throw new Error("Not connected to room")}catch(s){throw new ge("Failed to set video input device","DEVICE_ERROR",s)}}getLocalParticipant(){var n;return((n=this.room)==null?void 0:n.localParticipant)??null}getRemoteParticipants(){var n;return Array.from(((n=this.room)==null?void 0:n.remoteParticipants.values())??[])}getPublishPermissions(){const n=this.getLocalParticipant();if(!n)return{camera:!1,microphone:!1,screenShare:!1,data:!1};const r=n.permissions;if(!r)return{camera:!0,microphone:!0,screenShare:!0,data:!0};const s=o=>!!r.canPublish&&(r.canPublishSources.length===0||r.canPublishSources.includes(o));return{camera:s(1),microphone:s(2),screenShare:s(3),data:r.canPublishData??!1}}canPublishSource(n){return this.getPublishPermissions()[n]}getRoom(){return this.room}getConnectionState(){return this.connectionState}get connected(){return this.isConnected&&this.connectionState===te.ConnectionState.Connected}getMicrophoneTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,r]of n.trackPublications)if(r.source===te.Track.Source.Microphone)return r.track;return null}getCameraTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,r]of n.trackPublications)if(r.source===te.Track.Source.Camera)return r.track;return null}getScreenShareTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,r]of n.trackPublications)if(r.source===te.Track.Source.ScreenShare)return r.track;return null}get isMicrophoneEnabled(){const n=this.getMicrophoneTrack();return n?!n.isMuted:!1}get isCameraEnabled(){const n=this.getCameraTrack();return n?!n.isMuted:!1}get isScreenShareEnabled(){const n=this.getScreenShareTrack();return n?!n.isMuted:!1}registerPlugin(n){this.pluginManager.register(n)}getPluginManager(){return this.pluginManager}getParticipants(){if(!this.room)return[];const n=[];return this.room.localParticipant&&n.push({id:this.room.localParticipant.identity,name:this.room.localParticipant.name||this.room.localParticipant.identity,isLocal:!0}),this.room.remoteParticipants.forEach(r=>{n.push({id:r.identity,name:r.name||r.identity,isLocal:!1})}),n}getSessionMetrics(){var n,r;return this.currentSession?{sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((r=this.room)==null?void 0:r.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]}:null}updateConfig(n){this.config={...this.config,...n}}async startRecording(){var n;try{this.emit("recording.started",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(r){throw new ge("Failed to start recording","RECORDING_ERROR",r)}}async stopRecording(){var n;try{this.emit("recording.stopped",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(r){throw new ge("Failed to stop recording","RECORDING_ERROR",r)}}async registerFrontendRPC(n,r,s="embedded"){return this.rpcManager.registerFrontendRPC(n,r,s)}getCurrentInteraction(){return this.rpcManager.getCurrentInteraction()}dismissCurrentInteraction(){this.rpcManager.dismissCurrentInteraction()}getRegisteredRpcMethods(){return this.rpcManager.getRegisteredMethods()}unregisterRpcMethod(n){this.rpcManager.unregisterMethod(n)}registerEventListener(n,r){return this.on(n,r)}registerEventEmitter(n,r){if(!this.room)throw new Error("Room not available");try{this.room.registerTextStreamHandler(n,async s=>{try{const o=await s.readAll();r(o)}catch(o){console.error(`Error processing event for topic '${n}':`,o)}})}catch(s){console.warn(`VoxketClient: Handler for topic '${n}' may already be registered:`,s)}}convertMarkdownToText(n){if(!n)return"";let r=n;return r=r.replace(/\*\*(.*?)\*\*/g,"$1"),r=r.replace(/__(.*?)__/g,"$1"),r=r.replace(/\*(.*?)\*/g,"$1"),r=r.replace(/_(.*?)_/g,"$1"),r=r.replace(/~~(.*?)~~/g,"$1"),r=r.replace(/`([^`]+)`/g,"$1"),r=r.replace(/```[\s\S]*?```/g,""),r=r.replace(/^#{1,6}\s+/gm,""),r=r.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),r.trim()}}const A6=ae.create(r6),P6=ae.create(h6),M6=ae.create(g6),R6=ae.create(x6);function N6({onClick:e,text:t="Open Chat",position:n="bottom-right",theme:r}){const s={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"},o=_e(r);return d.jsx(ae.button,{onClick:e,className:`fixed ${s[n]} z-50 px-4 py-2 rounded-full shadow-lg ${o.popupTrigger} transition-all duration-200 hover:scale-105`,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},whileHover:{scale:1.05},whileTap:{scale:.95},children:t})}function _d({children:e,theme:t,displayType:n="widget",onClose:r,popupPosition:s="bottom-right",onExpand:o}){const i=_e(t);if(n==="fullscreen")return d.jsx("div",{className:"fixed inset-0 z-50 bg-black bg-opacity-30 backdrop-blur-sm flex items-center justify-center p-8",children:d.jsxs("div",{className:"w-full h-full max-w-6xl max-h-[90vh] rounded-2xl relative bg-transparent",children:[r&&d.jsx("button",{onClick:a=>{a.preventDefault(),a.stopPropagation(),r()},className:"absolute top-4 cursor-pointer right-4 z-[100] w-12 h-12 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 shadow-lg border border-gray-700 backdrop-blur-sm",title:"Exit Fullscreen",type:"button",children:d.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:d.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})})}),d.jsxs("div",{id:"voice-card",className:`${i.card} w-full h-full flex flex-col rounded-xl shadow-2xl`,style:{minHeight:"600px"},children:[d.jsx("div",{className:i.cardTopGradient}),d.jsx("div",{className:i.cardPurpleBlur}),d.jsx("div",{className:i.cardPinkBlur}),d.jsx("div",{className:" flex flex-col h-full",children:e}),d.jsx("div",{className:i.cardPulse1}),d.jsx("div",{className:i.cardPulse2,style:{animationDelay:"1s"}})]})]})});if(n==="popup"){const a={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"};return d.jsx("div",{className:"fixed rounded-2xl inset-0 z-50 pointer-events-none",children:d.jsxs("div",{className:`fixed rounded-2xl ${a[s]} pointer-events-auto`,children:[r&&d.jsx("button",{onClick:r,className:"absolute -top-2 -right-2 z-10 w-8 h-8 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 text-sm shadow-lg border border-gray-700",children:"×"}),d.jsxs("div",{id:"voice-card",className:`${i.card} rounded-2xl flex flex-col`,style:{width:"300px",height:"450px"},children:[d.jsx("div",{className:i.cardPurpleBlur}),d.jsx("div",{className:i.cardPinkBlur}),d.jsx("div",{className:" flex flex-col h-full",children:e}),d.jsx("div",{className:i.cardPulse1}),d.jsx("div",{className:i.cardPulse2,style:{animationDelay:"1s"}})]})]})})}return d.jsxs("div",{id:"voice-card",className:`${i.card}`,children:[o&&d.jsx("button",{onClick:o,className:"absolute top-4 right-4 z-20 w-10 h-10 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 shadow-lg border border-gray-700 backdrop-blur-sm",title:"Enter Fullscreen",children:d.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:d.jsx("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})}),d.jsx("div",{className:i.cardTopGradient}),d.jsx("div",{className:i.cardPurpleBlur}),d.jsx("div",{className:i.cardPinkBlur}),e,d.jsx("div",{className:i.cardPulse1}),d.jsx("div",{className:i.cardPulse2,style:{animationDelay:"1s"}})]})}function Fm(e){if(typeof window>"u")return null;console.log("🎯 Widget component rendering with props:",{displayType:e.displayType,popupPosition:e.popupPosition,theme:e.theme});const{agentId:t,participantName:n,baseUrl:r,appSecret:s,appId:o,prompts:i,statusMessage:a,welcomeTitle:c,welcomeSubTitle:l,className:u,width:h,height:p,loadingText:g,suportsChatInput:y=!0,suportsVideoInput:f=!0,suportsScreenShare:v=!0,theme:w="vox",onSessionStart:b,onSessionEnd:S,enableSessionLogging:C=!0,onSessionLogsUpdate:E,onSessionMetricsUpdate:T,modalities:k=["voice"],displayType:P="widget",popupPosition:$="bottom-right",popupTriggerText:x="Open Chat",onPopupToggle:I,voxketClient:_,onDisplayTypeChange:K}=e,[Y,X]=m.useState(()=>_?!!_.getCurrentSession():!1),[G,U]=m.useState(!1),[M,q]=m.useState(t||""),[N,V]=m.useState(n||"User"),[Z,R]=m.useState(()=>_?_.getCurrentSession():null),[B,z]=m.useState(()=>{var ie,Dt,st;if(_){const Ce=_.getCurrentSession();if((ie=Ce==null?void 0:Ce.activeModalities)!=null&&ie.includes("chat"))return"chat";if((Dt=Ce==null?void 0:Ce.activeModalities)!=null&&Dt.includes("voice"))return"voice";if((st=Ce==null?void 0:Ce.activeModalities)!=null&&st.includes("video"))return"video"}return"welcome"}),[H,j]=m.useState(!1);m.useEffect(()=>{console.log("🎯 Widget displayType prop changed to:",P)},[P]),m.useEffect(()=>{console.log("📊 Session state changed:",{currentMode:B,sessionStarted:Y,loading:G,currentSession:Z==null?void 0:Z.id,isPopupOpen:H})},[B,Y,G,Z,H]);const F=m.useMemo(()=>{if(_)return console.log("🔄 Using passed VoxketClient to preserve session state"),_;console.log("🆕 Creating new VoxketClient instance");const ie={appId:o,appSecret:s,baseUrl:r,agentId:M,participantName:N||"User",modalities:k};return new Ir(ie)},[_,o,s,r,M,N,k]),W=k,L=m.useMemo(()=>F.getRoom()||new te.Room,[F]),J={suportsChatInput:y,suportsVideoInput:f,suportsScreenShare:v},{sessionMetrics:O,sessionLogs:se,logEvent:le}=Om({room:L,onSessionStart:b,onSessionEnd:S,enableConsoleLogging:C,enableLocalStorage:C,voxketSessionId:Z==null?void 0:Z.id});m.useEffect(()=>{E&&E(se)},[se,E]),m.useEffect(()=>{T&&O&&T(O)},[O,T]),m.useEffect(()=>{const ie=st=>{console.log("🔴 Room disconnected:",st),U(!1),X(!1),R(null),z("welcome")},Dt=st=>{console.log("📹 Media devices error:",st),zr({title:"Allow access to your microphone/camera",description:`${st.name}: ${st.message}`})};return L.on(te.RoomEvent.MediaDevicesError,Dt),L.on(te.RoomEvent.Disconnected,ie),()=>{L.off(te.RoomEvent.Disconnected,ie),L.off(te.RoomEvent.MediaDevicesError,Dt)}},[L]);const De=async()=>{try{console.log("🎤 Starting voice session...",{agentId:M,participantName:N}),console.log("🎤 Pre-start state:",{currentMode:B,sessionStarted:Y,loading:G}),U(!0),X(!0),z("voice"),console.log("🎤 State after mode change:",{currentMode:"voice",sessionStarted:!0,loading:!0}),le("USER_STARTED_VOICE_SESSION",{agentId:M,participantName:N});const ie=await F.startSession(M,{participantName:N||"User",modalities:["voice",...f?["video"]:[]]});console.log("✅ Voice session started successfully:",ie.id),R(ie),U(!1),b&&b(ie.id)}catch(ie){console.error("❌ Failed to start voice session:",ie),zr({title:"Failed to start voice session",description:ie instanceof Error?ie.message:"Unknown error occurred"}),U(!1),X(!1),z("welcome")}},ut=async()=>{try{U(!0),X(!0),z("chat"),le("USER_STARTED_CHAT_SESSION",{agentId:M,participantName:N});const ie=await F.startSession(M,{participantName:N||"User",modalities:["chat"]});R(ie),U(!1),b&&b(ie.id)}catch(ie){console.error("Failed to start chat session:",ie),zr({title:"Failed to start chat session",description:ie instanceof Error?ie.message:"Unknown error occurred"}),U(!1),X(!1),z("welcome")}},Gt=async()=>{try{console.log("📺 Starting video session...",{agentId:M,participantName:N}),console.log("📺 Pre-start state:",{currentMode:B,sessionStarted:Y,loading:G}),U(!0),X(!0),z("video"),console.log("📺 State after mode change:",{currentMode:"video",sessionStarted:!0,loading:!0}),le("USER_STARTED_VIDEO_SESSION",{agentId:M,participantName:N});const ie=await F.startSession(M,{participantName:N||"User",modalities:["video","voice"]});console.log("✅ Video session started successfully:",ie.id),R(ie),U(!1),b&&b(ie.id)}catch(ie){console.error("❌ Failed to start video session:",ie),zr({title:"Failed to start video session",description:ie instanceof Error?ie.message:"Unknown error occurred"}),U(!1),X(!1),z("welcome")}},qt=()=>{z("welcome"),K&&K(e.displayType||"widget"),Z&&Y&&(X(!1),R(null),F.disconnect()),P==="popup"&&!H&&j(!0)},ft=()=>{const ie=!H;j(ie),I&&I(ie),!ie&&!(Z&&Y)&&(z("welcome"),X(!1),R(null))},rp=()=>{console.log("🔄 Closing fullscreen, switching to widget display type"),e.onDisplayTypeChange?e.onDisplayTypeChange("widget"):console.warn("⚠️ No onDisplayTypeChange callback provided")},sp=()=>{e.onDisplayTypeChange&&e.onDisplayTypeChange("fullscreen")};m.useEffect(()=>{var ie,Dt,st;if(_&&F){console.log("🔄 Syncing widget state with existing client session state");const Ce=F.getCurrentSession(),op=F.connected;console.log("🔍 Existing session state:",{hasSession:!!Ce,sessionId:Ce==null?void 0:Ce.id,isConnected:op,activeModalities:Ce==null?void 0:Ce.activeModalities}),Ce&&(console.log("✅ Restoring session state from existing client"),R(Ce),X(!0),U(!1),(ie=Ce.activeModalities)!=null&&ie.includes("chat")?z("chat"):(Dt=Ce.activeModalities)!=null&&Dt.includes("voice")?z("voice"):(st=Ce.activeModalities)!=null&&st.includes("video")&&z("video"))}},[_,F]),m.useEffect(()=>()=>{console.log("🧹 Cleaning up widget component"),_?console.log("🔄 Widget cleanup: preserving passed client instance"):(console.log("🧹 Widget cleanup: disconnecting self-created client"),F.disconnect())},[F,_]);let ro="w-96",so="h-[25rem]",oo={};if(h&&(h.startsWith("w-")?ro=h:(oo.width=h,ro="")),p&&(p.startsWith("h-")?so=p:(oo.height=p,so="")),P==="popup"&&!H)return console.log("🟡 Showing popup trigger button"),d.jsx(N6,{onClick:ft,text:x,position:$,theme:w});console.log("🟢 Rendering widget content, displayType:",P,"isPopupOpen:",H,"currentMode:",B,"sessionStarted:",Y,"loading:",G);let io=`voxket-widget-root theme-${w}`,Or={scrollMargin:0,scrollPadding:0,contain:"layout style paint"};P==="widget"?(io+=` flex items-center justify-center min-h-fit ${ro} ${so} ${u}`,Or={...Or,...oo}):(io=`${u||""}`,Or={});const ec=d.jsx(d.Fragment,{children:d.jsxs(Nn,{mode:"wait",children:[B==="welcome"&&!G&&d.jsx(R6,{agentId:M,participantName:N||"",onAgentIdChange:q,onParticipantNameChange:V,onStartCall:De,onStartChat:ut,onStartVideo:Gt,disabled:Y||G,prompts:i,statusMessage:a,title:c,subTitle:l,theme:w,modalities:W,initial:{opacity:0,y:0},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{duration:.3,ease:"easeInOut"}},"welcome"),B==="voice"&&d.jsxs(Me.RoomContext.Provider,{value:L,children:[d.jsx(Me.RoomAudioRenderer,{}),d.jsx(Me.StartAudio,{label:"Start Audio"}),d.jsx(A6,{loadingText:g,participantName:N||"User",capabilities:J,sessionStarted:Y,disabled:!Y,theme:w,client:F,displayType:P,onBack:P==="popup"?ft:qt,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"session-view")]}),B==="chat"&&d.jsx(P6,{client:F,theme:w,displayType:P,onBack:P==="popup"?ft:qt,onEndChat:qt,disabled:!Y,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"chat-view"),B==="video"&&d.jsxs(Me.RoomContext.Provider,{value:L,children:[d.jsx(Me.RoomAudioRenderer,{}),d.jsx(Me.StartAudio,{label:"Start Audio"}),d.jsx(M6,{client:F,theme:w,displayType:P,onBack:P==="popup"?ft:qt,onEndCall:qt,disabled:!Y,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"video-view")]})]})});return P==="fullscreen"||P==="popup"?(console.log("📱 Rendering fullscreen/popup mode, displayType:",P),d.jsx(_d,{theme:w,displayType:P,popupPosition:$,onClose:P==="fullscreen"?rp:ft,children:ec})):(console.log("📦 Rendering widget mode"),d.jsx("div",{className:io,style:Or,children:d.jsx(_d,{theme:w,displayType:P,popupPosition:$,onExpand:sp,children:ec})}))}class Bm extends m.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("VoxketWidget Error:",t,n)}render(){if(this.state.hasError){if(this.props.fallback){const t=this.props.fallback;return m.createElement(t,{error:this.state.error})}return m.createElement("div",{style:{padding:"20px",border:"1px solid #ff4444",borderRadius:"8px",background:"#fff5f5",color:"#cc0000"}},"VoxketWidget encountered an error. Please check the console for details.")}return this.props.children}}function j6({logs:e,onClear:t,onExport:n}){const[r,s]=A.useState(!1),[o,i]=A.useState(""),a=e.filter(c=>!o||c.event.toLowerCase().includes(o.toLowerCase()));return r?d.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:d.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[80vh] flex flex-col m-4",children:[d.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[d.jsxs("h2",{className:"text-lg font-semibold",children:["Session Logs (",e.length,")"]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{type:"text",placeholder:"Filter events...",value:o,onChange:c=>i(c.target.value),className:"px-3 py-1 border rounded text-sm"}),d.jsx("button",{onClick:t,className:"px-3 py-1 bg-red-600 text-white rounded text-sm hover:bg-red-700",children:"Clear"}),d.jsx("button",{onClick:n,className:"px-3 py-1 bg-green-600 text-white rounded text-sm hover:bg-green-700",children:"Export"}),d.jsx("button",{onClick:()=>s(!1),className:"px-3 py-1 bg-gray-600 text-white rounded text-sm hover:bg-gray-700",children:"Close"})]})]}),d.jsx("div",{className:"flex-1 overflow-auto p-4",children:a.length===0?d.jsx("p",{className:"text-gray-500 text-center py-8",children:"No logs found"}):d.jsx("div",{className:"space-y-2",children:a.map((c,l)=>d.jsxs("div",{className:"border rounded p-3 text-sm",children:[d.jsxs("div",{className:"flex items-center justify-between mb-1",children:[d.jsx("span",{className:"font-semibold text-blue-600",children:c.event}),d.jsx("span",{className:"text-gray-500 text-xs",children:new Date(c.timestamp).toLocaleTimeString()})]}),c.sessionId&&d.jsxs("div",{className:"text-xs text-gray-600 mb-1",children:["Session: ",c.sessionId]}),c.data&&d.jsx("div",{className:"bg-gray-50 p-2 rounded text-xs",children:d.jsx("pre",{className:"whitespace-pre-wrap overflow-auto",children:JSON.stringify(c.data,null,2)})})]},l))})})]})}):d.jsxs("button",{onClick:()=>s(!0),className:"fixed bottom-4 right-4 bg-blue-600 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-blue-700 transition-colors text-sm z-50",children:["Session Logs (",e.length,")"]})}function V6({metrics:e}){return e?d.jsxs("div",{className:"bg-gray-100 p-4 rounded-lg",children:[d.jsx("h3",{className:"font-semibold mb-2",children:"Current Session"}),d.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Session ID:"}),d.jsx("div",{className:"font-mono text-xs",children:e.sessionId})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Start Time:"}),d.jsx("div",{children:new Date(e.startTime).toLocaleString()})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Messages:"}),d.jsx("div",{children:e.totalMessages})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Participants:"}),d.jsx("div",{children:e.participantCount})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Connection Issues:"}),d.jsx("div",{children:e.connectionIssues})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-gray-600",children:"Duration:"}),d.jsxs("div",{children:[Math.round((Date.now()-new Date(e.startTime).getTime())/1e3),"s"]})]})]})]}):null}function hn(){const{currentSession:e,sessionState:t,sessionMetrics:n,createSession:r,endSession:s}=Et(),o=A.useCallback(async(a,c)=>await r(a,c),[r]),i=A.useCallback(async()=>await s(),[s]);return{session:e,state:t,metrics:n,isActive:e!==null&&t!=="disconnected",isConnecting:t==="connecting",isConnected:t==="connected"||t==="active",start:o,stop:i}}function Hm(){const{sessionMetrics:e,currentSession:t}=Et();return{metrics:e,sessionId:t==null?void 0:t.id,duration:e==null?void 0:e.duration,participantCount:e==null?void 0:e.participantCount,messageCount:e==null?void 0:e.messageCount,audioQuality:e==null?void 0:e.audioQuality,networkStats:e==null?void 0:e.networkStats}}function zm(){const{setMicrophoneEnabled:e,client:t}=Et(),[n,r]=A.useState(!1),[s,o]=A.useState(!1),i=A.useCallback(async()=>{if(!s){o(!0);try{const l=!n;await e(l),r(l)}catch(l){console.error("Failed to toggle microphone:",l)}finally{o(!1)}}},[n,s,e]),a=A.useCallback(async()=>{if(!(n||s)){o(!0);try{await e(!0),r(!0)}catch(l){console.error("Failed to enable microphone:",l)}finally{o(!1)}}},[n,s,e]),c=A.useCallback(async()=>{if(!(!n||s)){o(!0);try{await e(!1),r(!1)}catch(l){console.error("Failed to disable microphone:",l)}finally{o(!1)}}},[n,s,e]);return{isEnabled:n,isLoading:s,toggle:i,enable:a,disable:c}}function Um(){const{setCameraEnabled:e}=Et(),[t,n]=A.useState(!1),[r,s]=A.useState(!1),o=A.useCallback(async()=>{if(!r){s(!0);try{const c=!t;await e(c),n(c)}catch(c){console.error("Failed to toggle camera:",c)}finally{s(!1)}}},[t,r,e]),i=A.useCallback(async()=>{if(!(t||r)){s(!0);try{await e(!0),n(!0)}catch(c){console.error("Failed to enable camera:",c)}finally{s(!1)}}},[t,r,e]),a=A.useCallback(async()=>{if(!(!t||r)){s(!0);try{await e(!1),n(!1)}catch(c){console.error("Failed to disable camera:",c)}finally{s(!1)}}},[t,r,e]);return{isEnabled:t,isLoading:r,toggle:o,enable:i,disable:a}}function Wm(){const{startScreenShare:e,stopScreenShare:t}=Et(),[n,r]=A.useState(!1),[s,o]=A.useState(!1),i=A.useCallback(async()=>{if(!(n||s)){o(!0);try{await e(),r(!0)}catch(l){console.error("Failed to start screen share:",l)}finally{o(!1)}}},[n,s,e]),a=A.useCallback(async()=>{if(!(!n||s)){o(!0);try{await t(),r(!1)}catch(l){console.error("Failed to stop screen share:",l)}finally{o(!1)}}},[n,s,t]),c=A.useCallback(async()=>{n?await a():await i()},[n,i,a]);return{isSharing:n,isLoading:s,start:i,stop:a,toggle:c}}function I6(){const{client:e}=Et(),[t,n]=A.useState({tracks:[],layout:{type:"grid",showLocalVideo:!0,aspectRatio:"16:9"},isRecording:!1}),r=A.useMemo(()=>t.tracks.find(f=>f.isLocal),[t.tracks]),s=A.useMemo(()=>t.tracks.filter(f=>!f.isLocal),[t.tracks]),o=A.useCallback(async()=>{try{r!=null&&r.isEnabled?await(e==null?void 0:e.disableCamera()):await(e==null?void 0:e.enableCamera())}catch(f){throw console.error("Failed to toggle camera:",f),f}},[e,r]),i=A.useCallback(async()=>{try{t.tracks.find(v=>v.isScreenShare)?await(e==null?void 0:e.stopScreenShare()):await(e==null?void 0:e.startScreenShare())}catch(f){throw console.error("Failed to toggle screen share:",f),f}},[e,t.tracks]),a=A.useCallback(f=>{n(v=>({...v,layout:f}))},[]),c=A.useCallback(f=>{n(v=>({...v,pinnedTrack:f}))},[]),l=A.useCallback(()=>{n(f=>({...f,pinnedTrack:void 0}))},[]),u=A.useCallback(async()=>{try{await(e==null?void 0:e.startRecording()),n(f=>({...f,isRecording:!0}))}catch(f){throw console.error("Failed to start recording:",f),f}},[e]),h=A.useCallback(async()=>{try{await(e==null?void 0:e.stopRecording()),n(f=>({...f,isRecording:!1}))}catch(f){throw console.error("Failed to stop recording:",f),f}},[e]),p=A.useCallback(f=>t.tracks.find(v=>v.id===f),[t.tracks]),g=A.useCallback(f=>t.tracks.filter(v=>v.participantId===f),[t.tracks]),y=A.useCallback(f=>f.isEnabled&&t.tracks.includes(f),[t.tracks]);return A.useEffect(()=>{if(!e)return;const f=b=>{n(S=>({...S,tracks:[...S.tracks.filter(C=>C.id!==b.id),b]}))},v=b=>{n(S=>{var C;return{...S,tracks:S.tracks.filter(E=>E.id!==b),pinnedTrack:((C=S.pinnedTrack)==null?void 0:C.id)===b?void 0:S.pinnedTrack}})},w=b=>{n(S=>({...S,tracks:S.tracks.map(C=>C.id===b.id?b:C)}))};return e.on("videoTrackAdded",f),e.on("videoTrackRemoved",v),e.on("videoTrackUpdated",w),()=>{e.off("videoTrackAdded",f),e.off("videoTrackRemoved",v),e.off("videoTrackUpdated",w)}},[e]),{tracks:t.tracks,localTrack:r,remoteTraracks:s,pinnedTrack:t.pinnedTrack,layout:t.layout,isRecording:t.isRecording,toggleCamera:o,toggleScreenShare:i,setLayout:a,pinTrack:c,unpinTrack:l,startRecording:u,stopRecording:h,getTrackById:p,getTracksByParticipant:g,isTrackActive:y}}function no(){const{chatMessages:e,sendChatMessage:t,currentSession:n}=Et(),[r,s]=A.useState(!1),o=A.useCallback(async l=>{if(!(!l.trim()||r||!n)){s(!0);try{await t(l.trim())}catch(u){throw console.error("Failed to send chat message:",u),u}finally{s(!1)}}},[t,r,n]),{userMessages:i,agentMessages:a,allMessages:c}=A.useMemo(()=>{const l=e.filter(h=>h.sender.type==="participant"),u=e.filter(h=>h.sender.type==="agent");return{userMessages:l,agentMessages:u,allMessages:e}},[e]);return{messages:c,userMessages:i,agentMessages:a,messageCount:c.length,isSending:r,canSend:!!n&&!r,send:o}}function D6(){const{send:e,isSending:t,canSend:n}=no(),[r,s]=A.useState(""),o=A.useCallback(async()=>{if(!(!r.trim()||!n))try{await e(r),s("")}catch(a){throw a}},[r,e,n]),i=A.useCallback(a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),o())},[o]);return{value:r,setValue:s,send:o,handleKeyPress:i,isSending:t,canSend:n&&r.trim().length>0}}function qa(){const{isConnected:e,isConnecting:t,connectionError:n,connect:r,disconnect:s}=Et(),o=A.useCallback(async()=>{if(!(e||t))try{await r()}catch(a){throw console.error("Failed to connect:",a),a}},[r,e,t]),i=A.useCallback(async()=>{if(e)try{await s()}catch(a){throw console.error("Failed to disconnect:",a),a}},[s,e]);return{isConnected:e,isConnecting:t,isDisconnected:!e&&!t,error:n,hasError:!!n,connect:o,disconnect:i}}function Zm(){const{participants:e}=Et();return{participants:e,count:e.length,localParticipant:e.find(t=>t.isLocal),remoteParticipants:e.filter(t=>!t.isLocal)}}const Km=A.createContext({}),Dr=()=>A.useContext(Km);function Ym({children:e,...t}){return d.jsx(Km.Provider,{value:t,children:e})}function hs({name:e,children:t,fallback:n,className:r}){return d.jsx("div",{className:`voxket-slot voxket-slot--${e} ${r||""}`,children:t||n})}function Gm(e,t={}){return Object.assign(e,t)}function qm({showMicrophoneControl:e=!0,showCameraControl:t=!0,showScreenShareControl:n=!0,showSessionActions:r=!0,customControls:s,className:o=""}){const i=hn(),a=zm(),c=Um(),l=Wm(),u=Dr(),h=["voxket-session-controls",`voxket-session-controls--${u.variant||"default"}`,`voxket-session-controls--${u.size||"md"}`,i.isActive?"voxket-session-controls--active":"voxket-session-controls--inactive",o].filter(Boolean).join(" ");return!i.isActive&&!r?d.jsx("div",{className:h,children:d.jsx("div",{className:"voxket-controls-inactive",children:d.jsx("p",{children:"Controls available during active session"})})}):d.jsxs("div",{className:h,children:[r&&d.jsx("div",{className:"voxket-session-actions",children:i.isActive?d.jsx("button",{onClick:i.stop,className:"voxket-button voxket-button--danger",children:"End Session"}):d.jsx(O6,{})}),i.isActive&&d.jsxs("div",{className:"voxket-media-controls",children:[e&&d.jsxs("button",{onClick:a.toggle,disabled:a.isLoading,className:`voxket-button voxket-button--media ${a.isEnabled?"voxket-button--active":""}`,title:a.isEnabled?"Mute microphone":"Unmute microphone",children:[d.jsx("span",{className:"voxket-icon",children:"🎤"}),a.isLoading?"Loading...":a.isEnabled?"Mute":"Unmute"]}),t&&d.jsxs("button",{onClick:c.toggle,disabled:c.isLoading,className:`voxket-button voxket-button--media ${c.isEnabled?"voxket-button--active":""}`,title:c.isEnabled?"Stop camera":"Start camera",children:[d.jsx("span",{className:"voxket-icon",children:"📹"}),c.isLoading?"Loading...":c.isEnabled?"Stop Video":"Start Video"]}),n&&d.jsxs("button",{onClick:l.toggle,disabled:l.isLoading,className:`voxket-button voxket-button--media ${l.isSharing?"voxket-button--active":""}`,title:l.isSharing?"Stop screen share":"Start screen share",children:[d.jsx("span",{className:"voxket-icon",children:"🖥️"}),l.isLoading?"Loading...":l.isSharing?"Stop Share":"Share Screen"]})]}),s&&d.jsx("div",{className:"voxket-custom-controls",children:s})]})}function O6(){hn();const[e,t]=A.useState(!1),n=async()=>{t(!0);try{console.log("Start session - agentId needed")}catch(r){console.error("Failed to start session:",r)}finally{t(!1)}};return d.jsx("button",{onClick:n,disabled:e,className:"voxket-button voxket-button--primary",children:e?"Starting...":"Start Session"})}function Xa({showConnectionStatus:e=!0,showSessionInfo:t=!0,showAgentInfo:n=!0,className:r=""}){const s=hn(),o=qa(),i=Dr(),a=["voxket-session-header",`voxket-session-header--${i.variant||"default"}`,`voxket-session-header--${i.size||"md"}`,r].filter(Boolean).join(" ");return d.jsxs("div",{className:a,children:[e&&d.jsxs("div",{className:"voxket-connection-status",children:[d.jsx("div",{className:`voxket-status-indicator ${o.isConnected?"connected":"disconnected"}`}),d.jsx("span",{className:"voxket-status-text",children:o.isConnecting?"Connecting...":o.isConnected?"Connected":"Disconnected"})]}),t&&s.session&&d.jsxs("div",{className:"voxket-session-info",children:[d.jsxs("div",{className:"voxket-session-id",children:["Session: ",s.session.id.slice(-8)]}),d.jsxs("div",{className:"voxket-session-state",children:["State: ",s.state]})]}),n&&s.session&&d.jsxs("div",{className:"voxket-agent-info",children:[d.jsxs("div",{className:"voxket-agent-id",children:["Agent: ",s.session.agentId]}),d.jsxs("div",{className:"voxket-modalities",children:["Modalities: ",s.session.activeModalities.join(", ")]})]}),o.error&&d.jsxs("div",{className:"voxket-error-message",children:["Error: ",o.error.message]})]})}function Ja({showChat:e=!0,showTranscriptions:t=!1,customContent:n,className:r=""}){const s=hn(),o=no(),i=Dr(),a=["voxket-session-content",`voxket-session-content--${i.variant||"default"}`,`voxket-session-content--${i.size||"md"}`,r].filter(Boolean).join(" ");return s.isActive?d.jsx("div",{className:a,children:n||d.jsxs(d.Fragment,{children:[e&&d.jsxs("div",{className:"voxket-chat-container",children:[d.jsxs("div",{className:"voxket-chat-messages",children:[o.messages.map(c=>d.jsxs("div",{className:`voxket-message voxket-message--${c.sender.type}`,children:[d.jsxs("div",{className:"voxket-message-header",children:[d.jsx("span",{className:"voxket-message-sender",children:c.sender.name}),d.jsx("span",{className:"voxket-message-time",children:c.timestamp.toLocaleTimeString()})]}),d.jsx("div",{className:"voxket-message-content",children:c.content})]},c.id)),o.messages.length===0&&d.jsx("div",{className:"voxket-empty-messages",children:d.jsx("p",{children:"No messages yet. Start the conversation!"})})]}),d.jsx($6,{})]}),t&&d.jsx("div",{className:"voxket-transcriptions",children:d.jsx("div",{className:"voxket-transcription-placeholder",children:d.jsx("p",{children:"Voice transcriptions will appear here"})})})]})}):d.jsx("div",{className:a,children:d.jsx("div",{className:"voxket-inactive-state",children:d.jsxs("div",{className:"voxket-inactive-message",children:[d.jsx("h3",{children:"Start a conversation"}),d.jsx("p",{children:"Begin a session to start chatting with the AI agent"})]})})})}function $6(){const e=no(),[t,n]=A.useState(""),r=async()=>{if(!(!t.trim()||!e.canSend))try{await e.send(t),n("")}catch(o){console.error("Failed to send message:",o)}},s=o=>{o.key==="Enter"&&!o.shiftKey&&(o.preventDefault(),r())};return d.jsxs("div",{className:"voxket-chat-input",children:[d.jsx("input",{type:"text",value:t,onChange:o=>n(o.target.value),onKeyPress:s,placeholder:"Type your message...",disabled:!e.canSend,className:"voxket-input"}),d.jsx("button",{onClick:r,disabled:!e.canSend||!t.trim(),className:"voxket-send-button",children:e.isSending?"Sending...":"Send"})]})}function Qa({showMetrics:e=!0,showParticipants:t=!0,showStatus:n=!0,customFooter:r,className:s=""}){const o=hn(),i=Hm(),a=Zm(),c=Dr(),l=["voxket-session-footer",`voxket-session-footer--${c.variant||"default"}`,`voxket-session-footer--${c.size||"md"}`,s].filter(Boolean).join(" ");return o.isActive?d.jsx("div",{className:l,children:r||d.jsxs(d.Fragment,{children:[n&&d.jsxs("div",{className:"voxket-session-status",children:[d.jsx("div",{className:"voxket-status-indicator voxket-status-indicator--active"}),d.jsx("span",{className:"voxket-status-text",children:"Session Active"})]}),e&&i.metrics&&d.jsxs("div",{className:"voxket-session-metrics",children:[d.jsxs("div",{className:"voxket-metric",children:[d.jsx("span",{className:"voxket-metric-label",children:"Duration:"}),d.jsx("span",{className:"voxket-metric-value",children:L6(i.duration||0)})]}),d.jsxs("div",{className:"voxket-metric",children:[d.jsx("span",{className:"voxket-metric-label",children:"Messages:"}),d.jsx("span",{className:"voxket-metric-value",children:i.metrics.messageCount})]})]}),t&&d.jsxs("div",{className:"voxket-participants-info",children:[d.jsxs("span",{className:"voxket-participants-count",children:[a.count," participant",a.count!==1?"s":""]}),a.remoteParticipants.length>0&&d.jsx("div",{className:"voxket-participant-list",children:a.remoteParticipants.map(u=>d.jsx("span",{className:"voxket-participant-name",children:u.name},u.id))})]})]})}):d.jsx("div",{className:l,children:d.jsx("div",{className:"voxket-footer-inactive",children:d.jsx("span",{className:"voxket-status-text",children:"Ready to start session"})})})}function L6(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}:${(n%60).toString().padStart(2,"0")}:${(t%60).toString().padStart(2,"0")}`:`${n}:${(t%60).toString().padStart(2,"0")}`}function _6({agentId:e,sessionConfig:t,autoStart:n=!1,onSessionStart:r,onSessionEnd:s,variant:o="default",size:i="md",theme:a,className:c="",children:l}){var g;const u=hn(),h=qa();A.useEffect(()=>{n&&e&&h.isConnected&&!u.isActive&&u.start(e,t).catch(console.error)},[n,e,h.isConnected,u.isActive]),A.useEffect(()=>{var y;(y=u.session)!=null&&y.id&&r&&r(u.session.id)},[(g=u.session)==null?void 0:g.id,r]),A.useEffect(()=>()=>{u.isActive&&s&&u.stop().then(s).catch(console.error)},[]);const p=["voxket-session",`voxket-session--${o}`,`voxket-session--${i}`,u.isActive?"voxket-session--active":"voxket-session--inactive",c].filter(Boolean).join(" ");return d.jsx(Ym,{variant:o,size:i,theme:a,className:c,children:d.jsx("div",{className:p,children:l||d.jsxs(d.Fragment,{children:[d.jsx(hs,{name:"header",fallback:d.jsx(Xa,{})}),d.jsx(hs,{name:"content",fallback:d.jsx(Ja,{})}),d.jsx(hs,{name:"footer",fallback:d.jsx(Qa,{})})]})})})}const Xm=Gm(_6,{Header:Xa,Content:Ja,Footer:Qa,Controls:qm}),an={name:"default",colors:{primary:"#3B82F6",secondary:"#6B7280",accent:"#8B5CF6",background:"#FFFFFF",surface:"#F9FAFB",text:{primary:"#111827",secondary:"#6B7280",muted:"#9CA3AF",inverse:"#FFFFFF"},status:{success:"#10B981",warning:"#F59E0B",error:"#EF4444",info:"#3B82F6"},border:"#E5E7EB",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},typography:{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},fontWeight:{normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem"},borderRadius:{none:"0",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1)"}},Li={...an,name:"dark",colors:{primary:"#60A5FA",secondary:"#9CA3AF",accent:"#A78BFA",background:"#111827",surface:"#1F2937",text:{primary:"#F9FAFB",secondary:"#D1D5DB",muted:"#9CA3AF",inverse:"#111827"},status:{success:"#34D399",warning:"#FBBF24",error:"#F87171",info:"#60A5FA"},border:"#374151",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.3)"}},_i={...an,name:"enterprise",colors:{primary:"#1E40AF",secondary:"#64748B",accent:"#7C3AED",background:"#FFFFFF",surface:"#F8FAFC",text:{primary:"#0F172A",secondary:"#475569",muted:"#94A3B8",inverse:"#FFFFFF"},status:{success:"#059669",warning:"#D97706",error:"#DC2626",info:"#1E40AF"},border:"#CBD5E1",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},borderRadius:{none:"0",sm:"0.125rem",md:"0.25rem",lg:"0.375rem",full:"9999px"}},Jm=A.createContext(null),Qm=()=>{const e=A.useContext(Jm);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};function F6({theme:e="default",themes:t={},children:n,cssVariables:r=!0,className:s=""}){const[o,i]=A.useState(()=>{const p={default:an,dark:Li,enterprise:_i,...t};return typeof e=="string"?p[e]||an:e}),[a,c]=A.useState(()=>({default:an,dark:Li,enterprise:_i,...t})),l=p=>{if(typeof p=="string"){const g=a[p];g&&i(g)}else i(p)},u=p=>{c(g=>({...g,[p.name]:p}))};A.useEffect(()=>{if(r&&typeof document<"u"){const p=document.documentElement;Object.entries(ep(o)).forEach(([g,y])=>{p.style.setProperty(`--voxket-${g}`,y)})}},[o,r]);const h={theme:o,setTheme:l,themes:a,registerTheme:u};return d.jsx(Jm.Provider,{value:h,children:d.jsx("div",{className:`voxket-theme voxket-theme--${o.name} ${s}`,children:n})})}function ep(e){const t={},n=(r,s="")=>{for(const[o,i]of Object.entries(r)){const a=s?`${s}-${o}`:o;typeof i=="object"&&i!==null&&!Array.isArray(i)?n(i,a):t[a]=String(i)}};return n(e),t}function B6(e=an,t){return{...e,...t,colors:{...e.colors,...t.colors},typography:{...e.typography,...t.typography},spacing:{...e.spacing,...t.spacing},borderRadius:{...e.borderRadius,...t.borderRadius},shadows:{...e.shadows,...t.shadows}}}function H6(e){var n;const{theme:t}=Qm();return((n=t.components)==null?void 0:n[e])||{}}const z6=Ga("voice-modality","voice",{onActivate:async e=>{const t=e.config;t.enableTranscription&&U6(e),t.enableVoiceActivation&&W6(e,t),console.log("Voice modality activated",t)},onDeactivate:async e=>{console.log("Voice modality deactivated")},onMessage:async(e,t)=>{t.type==="audio"&&Z6(e,t)}});function U6(e,t){e.on("participant.speaking.started",n=>{console.log("Transcription: Started for",n.name)}),e.on("participant.speaking.stopped",n=>{console.log("Transcription: Stopped for",n.name)})}function W6(e,t){const n=t.silenceThreshold||-50;console.log("Voice activation setup with threshold:",n)}function Z6(e,t){console.log("Playing audio response:",t.content)}const K6=Ga("chat-modality","chat",{onActivate:async e=>{const t=e.config;t.enableRichText&&Y6(),t.enableFileUpload&&G6(e),t.enableCustomComponents&&q6(),console.log("Chat modality activated",t)},onDeactivate:async e=>{console.log("Chat modality deactivated")},onMessage:async(e,t)=>{const n=e.config;t.type==="ui_component"?X6(e,t):t.type==="text"&&n.enableRichText&&J6(e,t)}});function Y6(e){console.log("Rich text support enabled")}function G6(e){console.log("File upload enabled"),e.on("chat.file.uploaded",t=>{console.log("File uploaded:",t.name)})}function q6(e){console.log("Custom components enabled");const t=new Map;t.set("quick-actions",Q6),t.set("form",eE),t.set("card",tE),t.set("chart",nE)}function X6(e,t){const{componentType:n,props:r}=t.metadata;console.log("Rendering custom component:",n,r),e.emit("chat.component.render",{type:n,props:r,timestamp:new Date})}function J6(e,t){console.log("Processing rich text message:",t.content)}function Q6(e){return{type:"quick-actions",actions:e.actions||[],layout:e.layout||"horizontal"}}function eE(e){return{type:"form",fields:e.fields||[],submitAction:e.submitAction,validation:e.validation}}function tE(e){return{type:"card",title:e.title,content:e.content,actions:e.actions,variant:e.variant||"default"}}function nE(e){return{type:"chart",chartType:e.chartType||"line",data:e.data,options:e.options}}function ms({track:e,participantName:t,showControls:n=!0,showName:r=!0,showMuteIndicator:s=!0,isPinned:o=!1,className:i="",onClick:a,onPin:c,onUnpin:l}){const u=A.useRef(null),[h,p]=A.useState(!1);A.useEffect(()=>{if(!u.current||!e.isEnabled)return;const v=u.current;return v.srcObject=null,()=>{v.srcObject&&(v.srcObject=null)}},[e]);const g=()=>{a==null||a(e)},y=v=>{v.stopPropagation(),o?l==null||l(e):c==null||c(e)},f=["voxket-video-tile",e.isLocal?"voxket-video-tile--local":"voxket-video-tile--remote",e.isScreenShare?"voxket-video-tile--screen-share":"voxket-video-tile--camera",o?"voxket-video-tile--pinned":"",e.isEnabled?"":"voxket-video-tile--disabled",h?"voxket-video-tile--hovered":"",i].filter(Boolean).join(" ");return d.jsxs("div",{className:f,onClick:g,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),style:{aspectRatio:e.dimensions?`${e.dimensions.width} / ${e.dimensions.height}`:"16 / 9"},children:[d.jsx("video",{ref:u,className:"voxket-video-element",autoPlay:!0,playsInline:!0,muted:e.isLocal}),!e.isEnabled&&d.jsxs("div",{className:"voxket-video-placeholder",children:[d.jsx("div",{className:"voxket-video-placeholder-icon",children:e.isScreenShare?"🖥️":"📹"}),d.jsx("p",{className:"voxket-video-placeholder-text",children:e.isScreenShare?"Screen sharing paused":"Camera off"})]}),d.jsxs("div",{className:"voxket-video-overlay",children:[r&&t&&d.jsxs("div",{className:"voxket-video-name",children:[t,e.isLocal&&" (You)"]}),s&&!e.isEnabled&&d.jsx("div",{className:"voxket-video-mute-indicator",children:"🔇"}),n&&(h||o)&&d.jsxs("div",{className:"voxket-video-controls",children:[d.jsx("button",{className:`voxket-video-control-btn ${o?"voxket-video-control-btn--active":""}`,onClick:y,title:o?"Unpin video":"Pin video",children:"📌"}),e.isScreenShare&&d.jsx("div",{className:"voxket-video-indicator",children:"🖥️"}),e.source&&d.jsx("div",{className:"voxket-video-source",children:e.source})]})]}),!e.isEnabled&&d.jsx("div",{className:"voxket-video-loading",children:d.jsx("div",{className:"voxket-spinner"})})]})}function rE({tracks:e,layout:t,className:n="",onLayoutChange:r,onTrackClick:s,maxVisibleTracks:o=9,showPagination:i=!0}){const[a,c]=A.useState(0),[l,u]=A.useState(null),h=A.useMemo(()=>{let b=[...e];t.type==="speaker"&&l&&(b=[l,...e.filter(E=>E.id!==l.id)]);const S=a*o,C=S+o;return b.slice(S,C)},[e,t,l,a,o]),p=Math.ceil(e.length/o),g=A.useMemo(()=>{const b=h.length;switch(t.type){case"grid":const S=Math.ceil(Math.sqrt(b)),C=Math.ceil(b/S);return{display:"grid",gridTemplateColumns:`repeat(${S}, 1fr)`,gridTemplateRows:`repeat(${C}, 1fr)`,gap:"8px"};case"speaker":return{display:"flex",flexDirection:"column",gap:"8px"};case"sidebar":return{display:"flex",gap:"8px"};case"gallery":return{display:"flex",flexWrap:"wrap",gap:"8px",justifyContent:"center"};default:return{}}},[t.type,h.length]),y=b=>{u(b)},f=()=>{u(null)},v=b=>{r==null||r({...t,type:b})},w=["voxket-video-grid",`voxket-video-grid--${t.type}`,`voxket-video-grid--${h.length}-tracks`,n].filter(Boolean).join(" ");return e.length===0?d.jsx("div",{className:"voxket-video-grid-empty",children:d.jsxs("div",{className:"voxket-video-grid-empty-content",children:[d.jsx("div",{className:"voxket-video-grid-empty-icon",children:"📹"}),d.jsx("p",{children:"No video tracks available"})]})}):d.jsxs("div",{className:w,children:[d.jsxs("div",{className:"voxket-video-grid-controls",children:[d.jsx("div",{className:"voxket-video-layout-controls",children:["grid","speaker","sidebar","gallery"].map(b=>d.jsx("button",{className:`voxket-layout-btn ${t.type===b?"voxket-layout-btn--active":""}`,onClick:()=>v(b),title:`Switch to ${b} layout`,children:sE(b)},b))}),d.jsxs("div",{className:"voxket-video-count",children:[e.length," participant",e.length!==1?"s":""]})]}),d.jsx("div",{className:"voxket-video-grid-content",style:g,children:t.type==="speaker"&&l?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"voxket-video-speaker-main",children:d.jsx(ms,{track:l,participantName:`Participant ${l.participantId}`,isPinned:!0,onClick:s,onUnpin:f})}),d.jsx("div",{className:"voxket-video-speaker-sidebar",children:h.filter(b=>b.id!==l.id).map(b=>d.jsx(ms,{track:b,participantName:`Participant ${b.participantId}`,showControls:!1,onClick:s,onPin:y},b.id))})]}):h.map(b=>d.jsx(ms,{track:b,participantName:`Participant ${b.participantId}`,isPinned:(l==null?void 0:l.id)===b.id,onClick:s,onPin:y,onUnpin:f},b.id))}),i&&p>1&&d.jsxs("div",{className:"voxket-video-pagination",children:[d.jsx("button",{className:"voxket-pagination-btn",onClick:()=>c(Math.max(0,a-1)),disabled:a===0,children:"←"}),d.jsxs("span",{className:"voxket-pagination-info",children:["Page ",a+1," of ",p]}),d.jsx("button",{className:"voxket-pagination-btn",onClick:()=>c(Math.min(p-1,a+1)),disabled:a===p-1,children:"→"})]})]})}function sE(e){switch(e){case"grid":return"⊞";case"speaker":return"🎤";case"sidebar":return"⫸";case"gallery":return"⊡";case"picture-in-picture":return"⧉";default:return"⊞"}}function oE({localTrack:e,onToggleCamera:t,onToggleScreenShare:n,onLayoutChange:r,showLayoutControls:s=!0,showCameraControls:o=!0,showScreenShareControls:i=!0,className:a=""}){const c=["voxket-video-controls",a].filter(Boolean).join(" "),l=u=>{r==null||r({type:u,showLocalVideo:!0,aspectRatio:"16:9"})};return d.jsxs("div",{className:c,children:[o&&d.jsxs("div",{className:"voxket-video-controls-section",children:[d.jsx("h4",{className:"voxket-video-controls-title",children:"Camera"}),d.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isEnabled?"voxket-control-btn--active":""}`,onClick:t,title:e!=null&&e.isEnabled?"Turn off camera":"Turn on camera",children:[d.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isEnabled?"📹":"📷"}),d.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isEnabled?"Camera On":"Camera Off"})]}),(e==null?void 0:e.dimensions)&&d.jsxs("div",{className:"voxket-video-info",children:[e.dimensions.width," × ",e.dimensions.height]})]}),i&&d.jsxs("div",{className:"voxket-video-controls-section",children:[d.jsx("h4",{className:"voxket-video-controls-title",children:"Screen Share"}),d.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isScreenShare?"voxket-control-btn--active":""}`,onClick:n,title:e!=null&&e.isScreenShare?"Stop screen sharing":"Start screen sharing",children:[d.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isScreenShare?"🛑":"🖥️"}),d.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isScreenShare?"Stop Sharing":"Share Screen"})]})]}),s&&d.jsxs("div",{className:"voxket-video-controls-section",children:[d.jsx("h4",{className:"voxket-video-controls-title",children:"Layout"}),d.jsx("div",{className:"voxket-layout-buttons",children:[{type:"grid",icon:"⊞",label:"Grid"},{type:"speaker",icon:"🎤",label:"Speaker"},{type:"sidebar",icon:"⫸",label:"Sidebar"},{type:"gallery",icon:"⊡",label:"Gallery"}].map(({type:u,icon:h,label:p})=>d.jsxs("button",{className:"voxket-layout-control-btn",onClick:()=>l(u),title:`Switch to ${p} layout`,children:[d.jsx("span",{className:"voxket-control-icon",children:h}),d.jsx("span",{className:"voxket-control-label",children:p})]},u))})]}),d.jsxs("div",{className:"voxket-video-controls-section",children:[d.jsx("h4",{className:"voxket-video-controls-title",children:"Video Settings"}),d.jsxs("div",{className:"voxket-video-settings",children:[d.jsxs("div",{className:"voxket-setting-group",children:[d.jsx("label",{className:"voxket-setting-label",children:"Quality"}),d.jsxs("select",{className:"voxket-setting-select",children:[d.jsx("option",{value:"high",children:"High (720p)"}),d.jsx("option",{value:"medium",children:"Medium (480p)"}),d.jsx("option",{value:"low",children:"Low (240p)"})]})]}),d.jsxs("div",{className:"voxket-setting-group",children:[d.jsx("label",{className:"voxket-setting-label",children:"Frame Rate"}),d.jsxs("select",{className:"voxket-setting-select",children:[d.jsx("option",{value:"30",children:"30 fps"}),d.jsx("option",{value:"15",children:"15 fps"}),d.jsx("option",{value:"10",children:"10 fps"})]})]}),d.jsxs("div",{className:"voxket-setting-group",children:[d.jsx("label",{className:"voxket-setting-label",children:"Bandwidth"}),d.jsxs("select",{className:"voxket-setting-select",children:[d.jsx("option",{value:"unlimited",children:"Unlimited"}),d.jsx("option",{value:"1000",children:"1 Mbps"}),d.jsx("option",{value:"500",children:"500 Kbps"}),d.jsx("option",{value:"250",children:"250 Kbps"})]})]})]})]}),d.jsxs("div",{className:"voxket-video-controls-section",children:[d.jsx("h4",{className:"voxket-video-controls-title",children:"Statistics"}),d.jsxs("div",{className:"voxket-video-stats",children:[d.jsxs("div",{className:"voxket-stat-item",children:[d.jsx("span",{className:"voxket-stat-label",children:"Resolution:"}),d.jsx("span",{className:"voxket-stat-value",children:e!=null&&e.dimensions?`${e.dimensions.width}×${e.dimensions.height}`:"N/A"})]}),d.jsxs("div",{className:"voxket-stat-item",children:[d.jsx("span",{className:"voxket-stat-label",children:"Source:"}),d.jsx("span",{className:"voxket-stat-value",children:(e==null?void 0:e.source)||"None"})]}),d.jsxs("div",{className:"voxket-stat-item",children:[d.jsx("span",{className:"voxket-stat-label",children:"Status:"}),d.jsx("span",{className:`voxket-stat-value ${e!=null&&e.isEnabled?"voxket-stat-value--active":"voxket-stat-value--inactive"}`,children:e!=null&&e.isEnabled?"Active":"Inactive"})]})]})]})]})}const tp=({handler:e,loadData:t,data:n,client:r,addLocalMessage:s})=>{const[o,i]=m.useState(null),[a,c]=m.useState(!0),[l,u]=m.useState(!1),[h]=m.useState(Date.now());m.useEffect(()=>{(async()=>{try{if(c(!0),console.log("📋 AssignmentView: Loading assignment data..."),console.log("📋 AssignmentView: Received data from RPC:",n),n&&typeof n=="object"){const v={title:n.title||"Untitled Assignment",description:n.description||"No description provided",estimated_time_of_completion:n.estimated_time_of_completion||"Unknown"};i(v),console.log("📋 AssignmentView: Assignment loaded from RPC data:",v)}}catch(v){console.error("📋 AssignmentView: Error loading assignment:",v),i({title:"Assignment Loading Error",description:"There was an error loading the assignment details. Please try again.",estimated_time_of_completion:"Unknown"})}finally{c(!1)}})()},[n,t]);const p=({message:f,assignment:v})=>{const w=f.toLowerCase().includes("declined"),b=w?"bg-red-50 border-red-200":"bg-green-50 border-green-200",S=w?"text-red-700":"text-green-700",C=w?"❌":"🎉";return d.jsxs("div",{className:`max-w-sm mx-auto ${b} border rounded-lg shadow p-3 flex flex-col items-center`,children:[d.jsx("div",{className:"text-2xl mb-2",children:C}),d.jsx("div",{className:`${S} font-semibold text-sm mb-1`,children:f}),d.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:v.title}),d.jsx("div",{className:"text-xs text-gray-500",children:"Thank you for your response!"})]})},g=async()=>{if(!(!o||!e)){u(!0);try{const f={message:"accepted"};console.log("📋 AssignmentView: Assignment accepted:",f),e.didSuccess(f,d.jsx(p,{message:"Assignment accepted!",assignment:o}))}catch(f){console.error("📋 AssignmentView: Error accepting assignment:",f),e.didFail({error:"Failed to accept assignment"})}finally{u(!1)}}},y=async()=>{if(!(!o||!e)){u(!0);try{const f={message:"declined"};console.log("📋 AssignmentView: Assignment declined:",f),e.didSuccess(f,d.jsx(p,{message:"Assignment declined",assignment:o}))}catch(f){console.error("📋 AssignmentView: Error declining assignment:",f),e.didFail({error:"Failed to decline assignment"})}finally{u(!1)}}};return a?d.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:d.jsxs("div",{className:"flex items-center justify-center py-4",children:[d.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),d.jsx("span",{className:"ml-2 text-xs text-gray-600",children:"Loading assignment..."})]})}):o?d.jsxs("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg overflow-hidden",children:[d.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-purple-600 text-white p-3",children:d.jsx("div",{className:"flex items-center justify-between",children:d.jsx("h3",{className:"text-xs font-semibold text-white truncate",children:o.title})})}),d.jsxs("div",{className:"p-3",children:[d.jsx("div",{className:"bg-gray-50 rounded p-2 mb-3",children:d.jsx("p",{className:"text-xs text-gray-700 leading-snug",children:o.description})}),d.jsx("div",{className:"mb-3",children:d.jsxs("div",{className:"flex items-center text-xs text-gray-600",children:[d.jsx("span",{className:"text-xs mr-1",children:"📅"}),d.jsxs("span",{children:["Est: ",o.estimated_time_of_completion]})]})}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{onClick:g,disabled:l,className:"flex-1 bg-green-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:l?d.jsxs("span",{className:"flex items-center justify-center",children:[d.jsx("div",{className:"animate-spin rounded-full h-2 w-2 border-b-2 border-white mr-1"}),d.jsx("span",{className:"text-xs",children:"Processing..."})]}):"Accept"}),d.jsx("button",{onClick:y,disabled:l,className:"flex-1 bg-red-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-red-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Decline"})]})]})]}):d.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:d.jsxs("div",{className:"text-center py-4",children:[d.jsx("div",{className:"text-red-600 text-sm font-semibold mb-2",children:"⚠️ Assignment Error"}),d.jsx("p",{className:"text-xs text-gray-600 mb-3",children:"Failed to load assignment details."})]})})};function iE(){const[e,t]=m.useState(null),[n,r]=m.useState([]);m.useEffect(()=>{const a=new Ir({appId:"your-app-id",appSecret:"your-app-secret",baseUrl:"https://your-voxket-api.com",agentId:"your-agent-id",participantName:"User",modalities:["chat"]});return t(a),a.on("rpc.method.called",c=>{console.log("RPC Method Called:",c)}),a.on("rpc.interaction.completed",c=>{console.log("RPC Interaction Completed:",c)}),()=>{a.disconnect()}},[]);const s=async()=>{if(e)try{await e.registerFrontendRPC("give_assignment",tp,"embedded");const a=e.getRegisteredRpcMethods();r(a),console.log("✅ Assignment RPC registered successfully")}catch(a){console.error("❌ Failed to register assignment RPC:",a)}},o=async()=>{if(!e)return;const a=({handler:c,timeout:l})=>{const[u,h]=m.useState(""),p=[{id:"pro",name:"Pro Plan",price:"$29/month"},{id:"enterprise",name:"Enterprise Plan",price:"$99/month"},{id:"basic",name:"Basic Plan",price:"$9/month"}],g=f=>{h(f)},y=()=>{const f=p.find(v=>v.id===u);c==null||c.didSuccess({selectedProduct:u,productName:f==null?void 0:f.name,price:f==null?void 0:f.price,timestamp:new Date().toISOString()})};return d.jsxs("div",{className:"p-6 bg-white rounded-lg",children:[d.jsx("h3",{className:"text-xl font-bold mb-4",children:"Choose Your Plan"}),d.jsx("p",{className:"text-gray-600 mb-4",children:"Select the plan that best fits your needs:"}),d.jsx("div",{className:"space-y-3 mb-6",children:p.map(f=>d.jsx("div",{onClick:()=>g(f.id),className:`p-4 border rounded-lg cursor-pointer transition-all ${u===f.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"}`,children:d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsxs("div",{children:[d.jsx("h4",{className:"font-medium",children:f.name}),d.jsx("p",{className:"text-gray-600 text-sm",children:f.price})]}),d.jsx("div",{className:`w-4 h-4 rounded-full ${u===f.id?"bg-blue-500":"border-2 border-gray-300"}`})]})},f.id))}),d.jsxs("div",{className:"flex justify-end space-x-3",children:[d.jsx("button",{onClick:()=>c==null?void 0:c.dismissView(),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Cancel"}),d.jsx("button",{onClick:y,disabled:!u,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Select Plan"})]}),l&&d.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Time remaining: ",l," seconds"]})]})};try{await e.registerFrontendRPC("recommend_product",a,"modal");const c=e.getRegisteredRpcMethods();r(c),console.log("✅ Product Recommendation RPC registered successfully")}catch(c){console.error("❌ Failed to register product recommendation RPC:",c)}},i=async()=>{if(!e)return;const a=({handler:c})=>{const[l,u]=m.useState(0),[h,p]=m.useState(""),g=()=>{c==null||c.didSuccess({rating:l,comment:h,timestamp:new Date().toISOString()})};return d.jsxs("div",{className:"p-4 bg-white rounded-lg",children:[d.jsx("h3",{className:"text-lg font-semibold mb-3",children:"How was your experience?"}),d.jsxs("div",{className:"mb-4",children:[d.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Rate your experience:"}),d.jsx("div",{className:"flex space-x-1",children:[1,2,3,4,5].map(y=>d.jsx("button",{onClick:()=>u(y),className:`text-2xl ${y<=l?"text-yellow-400":"text-gray-300"}`,children:"⭐"},y))})]}),d.jsxs("div",{className:"mb-4",children:[d.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Additional comments:"}),d.jsx("textarea",{value:h,onChange:y=>p(y.target.value),className:"w-full p-2 border border-gray-300 rounded text-sm",rows:3,placeholder:"Tell us more about your experience..."})]}),d.jsxs("div",{className:"flex justify-end space-x-2",children:[d.jsx("button",{onClick:()=>c==null?void 0:c.dismissView(),className:"px-3 py-1 text-sm border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Skip"}),d.jsx("button",{onClick:g,disabled:l===0,className:"px-3 py-1 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Submit"})]})]})};try{await e.registerFrontendRPC("collect_feedback",a,"embedded");const c=e.getRegisteredRpcMethods();r(c),console.log("✅ Feedback RPC registered successfully")}catch(c){console.error("❌ Failed to register feedback RPC:",c)}};return d.jsxs("div",{className:"p-6",children:[d.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Frontend RPC Examples"}),d.jsxs("div",{className:"space-y-4 mb-6",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Register RPC Methods"}),d.jsxs("div",{className:"space-x-2",children:[d.jsx("button",{onClick:s,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Register Assignment RPC"}),d.jsx("button",{onClick:o,className:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600",children:"Register Product Recommendation RPC"}),d.jsx("button",{onClick:i,className:"px-4 py-2 bg-purple-500 text-white rounded hover:bg-purple-600",children:"Register Feedback RPC"})]})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Registered Methods"}),n.length>0?d.jsx("ul",{className:"list-disc list-inside space-y-1",children:n.map(a=>d.jsx("li",{className:"text-gray-700",children:d.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:a})},a))}):d.jsx("p",{className:"text-gray-500",children:"No methods registered yet"})]})]}),d.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[d.jsx("h3",{className:"text-lg font-semibold mb-2",children:"How it works"}),d.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-sm text-gray-700",children:[d.jsxs("li",{children:["Register RPC methods with React components using ",d.jsx("code",{children:"client.registerFrontendRPC()"})]}),d.jsx("li",{children:"When the agent calls an RPC method, the corresponding component will be displayed"}),d.jsx("li",{children:"Users interact with the component, and the response is sent back to the agent"}),d.jsx("li",{children:"Components can be displayed in different modes: embedded, modal, or fullscreen"}),d.jsx("li",{children:"Each component has a timeout and can handle success/failure scenarios"})]})]}),d.jsxs("div",{className:"mt-6 bg-blue-50 p-4 rounded-lg",children:[d.jsx("h3",{className:"text-lg font-semibold mb-2 text-blue-800",children:"Agent Side"}),d.jsx("p",{className:"text-sm text-blue-700 mb-2",children:"On the agent side, you can call these RPC methods like this:"}),d.jsx("pre",{className:"bg-white p-3 rounded text-xs text-gray-800 overflow-x-auto",children:`// Agent calls RPC method
251
251
  const response = await participant.performRpc({
252
252
  method: 'give_assignment',
253
253
  data: JSON.stringify({
@@ -258,4 +258,4 @@ const response = await participant.performRpc({
258
258
  })
259
259
  });
260
260
 
261
- console.log('User response:', response);`})]})]})}const oE={async checkAvailableRpcs(e){const t=e.getRegisteredRpcMethods();return console.log("🔍 Agent: Available RPC methods:",t),t},async triggerAssignment(e,t){const n={title:"Complete Q4 Sales Analysis Report",description:"Please analyze the Q4 sales data and create a comprehensive report with insights, trends, and recommendations for the upcoming quarter. Include visualizations and executive summary.",estimated_time_of_completion:"2-3 hours"};try{console.log("🤖 Agent: Triggering give_assignment RPC with data:",n);const r=await e.localParticipant.performRpc(t,"give_assignment",JSON.stringify(n),{responseTimeout:12e4}),s=JSON.parse(r);return console.log("✅ Agent: Received user response:",s),await this.processAssignmentResponse(s),s}catch(r){throw console.error("❌ Agent: RPC failed:",r),r}},async processAssignmentResponse(e){console.log("🧠 Agent: Processing assignment response...");const t=e.status,n=e.assignmentId,r=e.timeSpent;return t==="accepted"?(console.log("🎉 Agent: User accepted the assignment!"),console.log(`� Assignment ID: ${n}`),console.log(`⏱️ Time to respond: ${r}ms`),console.log("💬 Agent: Sending follow-up:","Great! I've recorded that you've accepted the assignment. You'll receive the detailed requirements and access to the data shortly. Let me know if you need any clarification!")):t==="declined"?(console.log("❌ Agent: User declined the assignment"),console.log("💬 Agent: Sending follow-up:","No problem! Is there anything specific about this assignment that doesn't work for you? I can suggest alternatives or modify the requirements.")):t==="completed"&&(console.log("✅ Agent: User completed the assignment"),console.log("💬 Agent: Sending follow-up:","Excellent work! Could you please share the completed report? I'm excited to review your analysis and insights.")),{status:t,assignmentId:n,timeSpent:r,processed:!0,followupAction:t==="accepted"?"send_requirements":t==="declined"?"offer_alternatives":"request_deliverables"}},getAssignmentExamples(){return{marketing:{title:"Create Social Media Campaign",description:"Design and plan a social media campaign for our new product launch. Include content calendar, post designs, and engagement strategy.",estimated_time_of_completion:"4-5 hours"},technical:{title:"API Integration Documentation",description:"Create comprehensive documentation for our new API endpoints, including examples, error codes, and best practices for developers.",estimated_time_of_completion:"6-8 hours"},research:{title:"Market Research Analysis",description:"Research and analyze competitor pricing strategies in our target market. Provide recommendations for our pricing model.",estimated_time_of_completion:"3-4 hours"},quick:{title:"Customer Feedback Summary",description:"Review this week's customer feedback and create a summary of key themes and actionable insights.",estimated_time_of_completion:"30-45 minutes"}}}},iE=e=>typeof window>"u"?null:m.createElement(Fm,e);exports.AssignmentView=ep;exports.CompoundProvider=Km;exports.InteractiveComponent=Fn;exports.PluginManager=$m;exports.RpcExamples=sE;exports.SessionContainer=qm;exports.SessionContent=Ja;exports.SessionControls=Gm;exports.SessionFooter=Qa;exports.SessionHeader=Xa;exports.SessionLogViewer=N6;exports.SessionMetricsComponent=j6;exports.Slot=hs;exports.ThemeProvider=L6;exports.VideoControls=rE;exports.VideoGrid=tE;exports.VideoTile=ms;exports.VoxketClient=Ir;exports.VoxketEventEmitter=Ya;exports.VoxketProvider=_m;exports.VoxketSDK=Ir;exports.VoxketSessionComponent=qm;exports.agentRpcExample=oE;exports.analyticsPlugin=w6;exports.chatModalityPlugin=W6;exports.createCustomTheme=_6;exports.createModalityPlugin=Ga;exports.createPlugin=b6;exports.darkTheme=Li;exports.debugPlugin=S6;exports.default=iE;exports.defaultTheme=an;exports.enterpriseTheme=_i;exports.flattenTheme=Qm;exports.metricsPlugin=C6;exports.useComponentTheme=F6;exports.useCompoundContext=Dr;exports.useSessionLogging=Om;exports.useTheme=Jm;exports.useVoxket=Et;exports.useVoxketCamera=zm;exports.useVoxketChat=no;exports.useVoxketChatInput=V6;exports.useVoxketConnection=qa;exports.useVoxketMetrics=Bm;exports.useVoxketMicrophone=Hm;exports.useVoxketParticipants=Wm;exports.useVoxketScreenShare=Um;exports.useVoxketSession=hn;exports.useVoxketVideo=R6;exports.voiceModalityPlugin=B6;exports.withCompoundComponent=Ym;
261
+ console.log('User response:', response);`})]})]})}const aE={async checkAvailableRpcs(e){const t=e.getRegisteredRpcMethods();return console.log("🔍 Agent: Available RPC methods:",t),t},async triggerAssignment(e,t){const n={title:"Complete Q4 Sales Analysis Report",description:"Please analyze the Q4 sales data and create a comprehensive report with insights, trends, and recommendations for the upcoming quarter. Include visualizations and executive summary.",estimated_time_of_completion:"2-3 hours"};try{console.log("🤖 Agent: Triggering give_assignment RPC with data:",n);const r=await e.localParticipant.performRpc(t,"give_assignment",JSON.stringify(n),{responseTimeout:12e4}),s=JSON.parse(r);return console.log("✅ Agent: Received user response:",s),await this.processAssignmentResponse(s),s}catch(r){throw console.error("❌ Agent: RPC failed:",r),r}},async processAssignmentResponse(e){console.log("🧠 Agent: Processing assignment response...");const t=e.status,n=e.assignmentId,r=e.timeSpent;return t==="accepted"?(console.log("🎉 Agent: User accepted the assignment!"),console.log(`� Assignment ID: ${n}`),console.log(`⏱️ Time to respond: ${r}ms`),console.log("💬 Agent: Sending follow-up:","Great! I've recorded that you've accepted the assignment. You'll receive the detailed requirements and access to the data shortly. Let me know if you need any clarification!")):t==="declined"?(console.log("❌ Agent: User declined the assignment"),console.log("💬 Agent: Sending follow-up:","No problem! Is there anything specific about this assignment that doesn't work for you? I can suggest alternatives or modify the requirements.")):t==="completed"&&(console.log("✅ Agent: User completed the assignment"),console.log("💬 Agent: Sending follow-up:","Excellent work! Could you please share the completed report? I'm excited to review your analysis and insights.")),{status:t,assignmentId:n,timeSpent:r,processed:!0,followupAction:t==="accepted"?"send_requirements":t==="declined"?"offer_alternatives":"request_deliverables"}},getAssignmentExamples(){return{marketing:{title:"Create Social Media Campaign",description:"Design and plan a social media campaign for our new product launch. Include content calendar, post designs, and engagement strategy.",estimated_time_of_completion:"4-5 hours"},technical:{title:"API Integration Documentation",description:"Create comprehensive documentation for our new API endpoints, including examples, error codes, and best practices for developers.",estimated_time_of_completion:"6-8 hours"},research:{title:"Market Research Analysis",description:"Research and analyze competitor pricing strategies in our target market. Provide recommendations for our pricing model.",estimated_time_of_completion:"3-4 hours"},quick:{title:"Customer Feedback Summary",description:"Review this week's customer feedback and create a summary of key themes and actionable insights.",estimated_time_of_completion:"30-45 minutes"}}}};function np(){var t,n;const e=[];try{const r=(window==null?void 0:window.React)||(global==null?void 0:global.React);if(!r)return e.push("React not found in global scope"),{isCompatible:!1,warnings:e};const s=r.version;return parseInt((s==null?void 0:s.split(".")[0])||"0")<18?(e.push(`React version ${s} is not supported. Please use React 18 or higher.`),{isCompatible:!1,version:s,warnings:e}):(((n=(t=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:t.renderers)==null?void 0:n.size)>1&&e.push("Multiple React instances detected. This may cause issues."),{isCompatible:!0,version:s,warnings:e})}catch(r){return e.push(`Error checking React: ${r}`),{isCompatible:!1,warnings:e}}}function cE(e,t){return function(r){const s=require("react");return s.useEffect(()=>{const o=np();!o.isCompatible&&t?t(new Error("React compatibility check failed"),o.warnings):o.warnings.length>0&&console.warn("VoxketWidget warnings:",o.warnings)},[]),s.createElement(e,r)}}const lE=e=>typeof window>"u"?null:m.createElement(Bm,{children:m.createElement(Fm,e)});exports.AssignmentView=tp;exports.CompoundProvider=Ym;exports.InteractiveComponent=Fn;exports.PluginManager=$m;exports.RpcExamples=iE;exports.SessionContainer=Xm;exports.SessionContent=Ja;exports.SessionControls=qm;exports.SessionFooter=Qa;exports.SessionHeader=Xa;exports.SessionLogViewer=j6;exports.SessionMetricsComponent=V6;exports.Slot=hs;exports.ThemeProvider=F6;exports.VideoControls=oE;exports.VideoGrid=rE;exports.VideoTile=ms;exports.VoxketClient=Ir;exports.VoxketErrorBoundary=Bm;exports.VoxketEventEmitter=Ya;exports.VoxketProvider=_m;exports.VoxketSDK=Ir;exports.VoxketSessionComponent=Xm;exports.agentRpcExample=aE;exports.analyticsPlugin=C6;exports.chatModalityPlugin=K6;exports.checkReactVersion=np;exports.createCustomTheme=B6;exports.createModalityPlugin=Ga;exports.createPlugin=S6;exports.createVoxketWithCheck=cE;exports.darkTheme=Li;exports.debugPlugin=E6;exports.default=lE;exports.defaultTheme=an;exports.enterpriseTheme=_i;exports.flattenTheme=ep;exports.metricsPlugin=k6;exports.useComponentTheme=H6;exports.useCompoundContext=Dr;exports.useSessionLogging=Om;exports.useTheme=Qm;exports.useVoxket=Et;exports.useVoxketCamera=Um;exports.useVoxketChat=no;exports.useVoxketChatInput=D6;exports.useVoxketConnection=qa;exports.useVoxketMetrics=Hm;exports.useVoxketMicrophone=zm;exports.useVoxketParticipants=Zm;exports.useVoxketScreenShare=Wm;exports.useVoxketSession=hn;exports.useVoxketVideo=I6;exports.voiceModalityPlugin=z6;exports.withCompoundComponent=Gm;