@lemonsliceai/lemon-slice-widget 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
34
34
  Memoize using useCallback to avoid re-render loop or reduce the amount of state transitions the callback depends on.
35
35
  Passed callback for '`.concat(t,"' event is NOT registered."),n),l(!0);return}d.current++;var p=setTimeout(function(){d.current=0},50);return a(t,n,f),function(){clearTimeout(p),o(t,f)}}},[n,t,f,c,o,a]),Qe({event:t,eventId:f,isBlocked:c,callback:n})};function wt(e,t){var n,r;if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!wt(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(y,v){return wt(y,t.getTracks()[v])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var o=Array.from(e).sort(),a=Array.from(t).sort();return o.every(function(y,v){return wt(y,a[v])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=kf(e.entries()),c=s.next();!c.done;c=s.next()){var l=be(c.value,2),d=l[0],f=l[1];if(!t.has(d)||!wt(f,t.get(d)))return!1}}catch(y){n={error:y}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(rt(e)!=="object"||e===null||rt(t)!=="object"||t===null)return!1;var p=Object.keys(e),g=Object.keys(t);if(p.length!==g.length)return!1;for(var i=0;i<p.length;i++){var d=p[i];if(!Object.prototype.hasOwnProperty.call(t,d)||!wt(e[d],t[d]))return!1}return!0}function ts(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n],o=r!==null&&rt(r)==="object",a=i!==null&&rt(i)==="object";if(o||a){if(!wt(r,i))return!1}else if(r!==i)return!1}return!0}function pe(e){return"daily-react-"+e}function ns(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=oe(function(o){var a=e.get(r)(o),s=n.get(r);return s!=null&&e.equals(a,s)?s:(n.set(r,a),a)});t.set(r,i)}return t.get(r)}}var rs="::",xf=";",is=function(t,n){return t+rs+n},l0=function(t,n){return t+rs+n.join(xf)},ze=function(t,n){return os(is(t,n))},qn=fr(function(e){var t=oe([]);return t.debugLabel=pe("participant-property-paths-".concat(e)),t}),os=fr(function(e){var t=oe(null);return t.debugLabel=pe("participant-property-".concat(e)),t}),u0=ns({equals:ts,get:function(t){return function(n){var r=be(t.split(rs),2),i=r[0],o=r[1],a=o.split(xf);return a.map(function(s){return n(ze(i,s))})}}}),Tf=function(t,n){var r,i=Zt(Array.isArray(n)?u0(l0(t,n)):os(is(t,n)));return Qe(Array.isArray(n)?n.reduce(function(o,a,s){return o[a]=i[s],o},{}):(r={},r[n]=i,r)),i},Ji=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var as,Mf;function f0(){if(Mf)return as;Mf=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=rt(Ji)=="object"&&Ji&&Ji.Object===Object&&Ji,l=(typeof self>"u"?"undefined":rt(self))=="object"&&self&&self.Object===Object&&self,d=c||l||Function("return this")(),f=Object.prototype,p=f.toString,g=Math.max,y=Math.min,v=function(){return d.Date.now()};function b(C,A,E){var R,B,V,z,j,X,ie=0,me=!1,J=!1,F=!0;if(typeof C!="function")throw new TypeError(e);A=x(A)||0,k(E)&&(me=!!E.leading,J="maxWait"in E,V=J?g(x(E.maxWait)||0,A):V,F="trailing"in E?!!E.trailing:F);function q(P){var I=R,L=B;return R=B=void 0,ie=P,z=C.apply(L,I),z}function H(P){return ie=P,j=setTimeout(u,A),me?q(P):z}function we(P){var I=P-X,L=P-ie,$=A-I;return J?y($,V-L):$}function Xe(P){var I=P-X,L=P-ie;return X===void 0||I>=A||I<0||J&&L>=V}function u(){var P=v();if(Xe(P))return m(P);j=setTimeout(u,we(P))}function m(P){return j=void 0,F&&R?q(P):(R=B=void 0,z)}function h(){j!==void 0&&clearTimeout(j),ie=0,R=X=B=j=void 0}function w(){return j===void 0?z:m(v())}function S(){var P=v(),I=Xe(P);if(R=arguments,B=this,X=P,I){if(j===void 0)return H(X);if(J)return j=setTimeout(u,A),q(X)}return j===void 0&&(j=setTimeout(u,A)),z}return S.cancel=h,S.flush=w,S}function _(C,A,E){var R=!0,B=!0;if(typeof C!="function")throw new TypeError(e);return k(E)&&(R="leading"in E?!!E.leading:R,B="trailing"in E?!!E.trailing:B),b(C,A,{leading:R,maxWait:A,trailing:B})}function k(C){var A=rt(C);return!!C&&(A=="object"||A=="function")}function M(C){return!!C&&rt(C)=="object"}function T(C){return rt(C)=="symbol"||M(C)&&p.call(C)==n}function x(C){if(typeof C=="number")return C;if(T(C))return t;if(k(C)){var A=typeof C.valueOf=="function"?C.valueOf():C;C=k(A)?A+"":A}if(typeof C!="string")return C===0?C:+C;C=C.replace(r,"");var E=o.test(C);return E||a.test(C)?s(C.slice(2),E?2:8):i.test(C)?t:+C}return as=_,as}var h0=f0(),p0=d0(h0),qi=function(t,n,r,i){r===void 0&&(r=500),i===void 0&&(i=!1);var o=ge(Qa),a=o.off,s=o.on,c=Ne(function(){var f;return Array.isArray(t)?t.reduce(function(p,g){return p[g]=i?Za():es(),p},{}):(f={},f[t]=i?Za():es(),f)},[t,i]),l=de([]);W("call-instance-destroyed",N(function(){l.current.length=0},[]));var d=Ne(function(){return p0(function(){l.current.length!==0&&(n(l.current),l.current.length=0)},r,{trailing:!0})},[n,r]);Q(function(){if(t){var f=function(g){l.current.push(g),d()};return Array.isArray(t)?t.forEach(function(p){return s(p,f,c[p])}):s(t,f,c[t]),function(){Array.isArray(t)?t.forEach(function(p){return a(p,c[p])}):a(t,c[t])}}},[d,t,c,a,s]),Qe({event:t,eventId:c})},Cf=function(t,n,r){if(n===void 0&&(n=""),r===void 0&&(r=new Set),rt(t)!=="object"||t===null||r.has(t))return[n];r.add(t);var i=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=n?"".concat(n,".").concat(o):o;i.push.apply(i,Ue([a],be(Cf(t[o],a,r)),!1))}return r.delete(t),i},ss=function(t){return Cf(t)},m0=function(t,n){return String(n).split(".").filter(function(r){return r.length}).reduce(function(r,i){return r&&r[i]},t)},cs=function(t,n){return n.map(function(r){return m0(t,r)})},Hi=oe(null);Hi.debugLabel=pe("active-id");var Mr=oe("");Mr.debugLabel=pe("local-id");var Pf=oe(null);Pf.debugLabel=pe("local-join-date");var gn=oe([]);gn.debugLabel=pe("participant-ids");var vn=fr(function(e){var t=oe(null);return t.debugLabel=pe("participant-".concat(e)),t}),ls=oe([]);ls.debugLabel=pe("waiting-participants");var us=fr(function(e){var t=oe({awaitingAccess:{level:"full"},id:e,name:""});return t.debugLabel=pe("waiting-participant-".concat(e)),t}),g0=function(t){var n=t.children,r=_t(),i=be(Z(!1),2),o=i[0],a=i[1],s=re(N(function(d,f,p){f(Mr,p.local.session_id);var g=Object.values(p),y=g.map(function(v){return v.session_id});f(gn,y),g.forEach(function(v){f(vn(v.session_id),v);var b=ss(v);f(qn(v.session_id),b),b.forEach(function(_){var k=be(cs(v,[_]),1),M=k[0];f(ze(v.session_id,_),M)})}),a(!0)},[]));Q(function(){if(!(!r||o)){var d=setInterval(function(){var f=r.participants();"local"in f&&(s(f),clearInterval(d))},100);return function(){clearInterval(d)}}},[r,o,s]);var c=N(function(){if(r){var d=r?.participants();d.local&&s(d)}},[r,s]);W("started-camera",c,!0),W("access-state-updated",c,!0),W("joining-meeting",re(N(function(d,f){f(Pf,new Date),c()},[c])),!0),W("joined-meeting",N(function(d){s(d.participants)},[s]),!0);var l=re(N(function(d,f){f(Mr,""),f(Hi,null);var p=d(gn);p.forEach(function(g){return vn.remove(g)}),f(gn,[])},[]));return W("call-instance-destroyed",l,!0),W("left-meeting",l,!0),qi(["active-speaker-change","participant-joined","participant-updated","participant-left"],re(N(function(d,f,p){p.length&&p.forEach(function(g){switch(g.action){case"active-speaker-change":{f(Hi,g.activeSpeaker.peerId),f(vn(g.activeSpeaker.peerId),function(T){return T?ne(ne({},T),{last_active:new Date}):null});break}case"participant-joined":{f(gn,function(T){return T.includes(g.participant.session_id)?T:Ue(Ue([],be(T),!1),[g.participant.session_id],!1)}),f(vn(g.participant.session_id),g.participant);var y=ss(g.participant);f(qn(g.participant.session_id),y),y.forEach(function(T){var x=be(cs(g.participant,[T]),1),C=x[0];f(ze(g.participant.session_id,T),C)});break}case"participant-updated":{f(vn(g.participant.session_id),g.participant),g.participant.local&&f(Mr,g.participant.session_id);var y=ss(g.participant),v=d(qn(g.participant.session_id)),b=y.length!==v.length||y.some(function(x){return!v.includes(x)});b&&f(qn(g.participant.session_id),y);var _=new Set(v),k=cs(g.participant,y);y.forEach(function(x,C){var A=k[C];_.delete(x),f(ze(g.participant.session_id,x),function(E){return wt(E,A)?E:A})}),_.forEach(function(x){f(ze(g.participant.session_id,x),null)});break}case"participant-left":{f(gn,function(T){return T.includes(g.participant.session_id)?T.filter(function(x){return x!==g.participant.session_id}):T}),vn.remove(g.participant.session_id);var M=d(qn(g.participant.session_id));M.forEach(function(T){os.remove(is(g.participant.session_id,T))}),qn.remove(g.participant.session_id);break}}})},[])),100,!0),qi(["waiting-participant-added","waiting-participant-updated","waiting-participant-removed"],re(N(function(d,f,p){p.forEach(function(g){switch(g.action){case"waiting-participant-added":f(ls,function(y){return y.includes(g.participant.id)?y:Ue(Ue([],be(y),!1),[g.participant.id],!1)}),f(us(g.participant.id),g.participant);break;case"waiting-participant-updated":f(us(g.participant.id),g.participant);break;case"waiting-participant-removed":f(ls,function(y){return y.filter(function(v){return v!==g.participant.id})}),us.remove(g.participant.id);break}})},[])),100,!0),le.createElement(le.Fragment,null,n)},Gi=function(){var t=Zt(Mr);return Qe(t),t},v0=function(){return!0},y0=function(t){var n=t===void 0?{}:t,r=n.filter,i=r===void 0?v0:r,o=n.ignoreLocal,a=o===void 0?!1:o,s=Gi(),c=Zt(Hi),l=a&&c===s,d=!i?.(c),f=!l&&!d,p=be(Z(f?c:null),2),g=p[0],y=p[1];return Q(function(){l||d||y(c)},[d,l,c]),Qe(g),g},Ki=function(t){return["blocked","off"].includes(t)},Ef=";",Af=function(t,n){return"".concat(t).concat(Ef).concat(n)},Of=ns({equals:wt,get:function(t){return function(n){var r=be(t.split(Ef),2),i=r[0],o=r[1],a=n(gn);return a.filter(function(s){switch(i){case"local":case"owner":case"record":return n(ze(s,i));case"remote":return!n(ze(s,"local"));case"screen":{var c=n(ze(s,"tracks.screenAudio.state")),l=n(ze(s,"tracks.screenVideo.state"));return!Ki(c)||!Ki(l)}default:return!0}}).sort(function(s,c){switch(o){case"joined_at":case"session_id":case"user_id":case"user_name":{var l=n(ze(s,o)),d=n(ze(c,o));if(l!==void 0||d!==void 0){if(l===void 0)return-1;if(d===void 0||l>d)return 1;if(l<d)return-1}return 0}default:return 0}})}}}),yn=function(t){var n=t===void 0?{}:t,r=n.filter,i=n.onActiveSpeakerChange,o=n.onParticipantJoined,a=n.onParticipantLeft,s=n.onParticipantUpdated,c=n.sort,l=Zt(Of(Af(typeof r=="string"?r:null,typeof c=="string"?c:null))),d=typeof r=="function"||typeof c=="function",f=N(function(_){if(typeof r!="function"&&typeof c!="function")return[];var k=l.map(function(M){return _(vn(M))});return k.filter(function(M){return!!M}).filter(typeof r=="function"?r:function(){return!0}).sort(typeof c=="function"?c:function(){return 0}).map(function(M){return M.session_id}).filter(Boolean)},[r,l,c]),p=be(Z([]),2),g=p[0],y=p[1],v=re(N(function(_){if(d){var k=f(_);wt(k,g)||y(k)}},[g,f,d]));Q(function(){v()},[v]),qi(["participant-joined","participant-updated","active-speaker-change","participant-left"],N(function(_){_.length&&(_.forEach(function(k){switch(k.action){case"participant-joined":o?.(k);break;case"participant-updated":s?.(k);break;case"active-speaker-change":i?.(k);break;case"participant-left":a?.(k);break}}),v())},[v,i,o,a,s]));var b=typeof r=="function"||typeof c=="function"?g:l;return Qe(b),b},b0=ns({equals:ts,get:function(){return function(t){var n=t(Of(Af("screen",null)));return n.map(function(r){return{local:t(ze(r,"local")),screenAudio:t(ze(r,"tracks.screenAudio")),screenVideo:t(ze(r,"tracks.screenVideo")),screenId:"".concat(r,"-screen"),session_id:r}})}}}),_0=function(t){var n={},r=n.onError,i=n.onLocalScreenShareStarted,o=n.onLocalScreenShareStopped,a=_t(),s=N(function(){for(var f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];a?.startScreenShare.apply(a,Ue([],be(f),!1))},[a]),c=N(function(){for(var f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];a?.stopScreenShare.apply(a,Ue([],be(f),!1))},[a]);W("local-screen-share-started",N(function(){return i?.()},[i])),W("local-screen-share-stopped",N(function(){return o?.()},[o])),W("nonfatal-error",N(function(f){f.type==="screen-share-error"&&r?.(f)},[r]));var l=Zt(b0(void 0)),d={isSharingScreen:l.some(function(f){return f.local}),screens:l,startScreenShare:s,stopScreenShare:c};return Qe(d),d},If=function(t,n){n===void 0&&(n="video");var r=Tf(t,"tracks.".concat(n)),i=r?ne(ne({},r),{isOff:Ki(r.state)}):{isOff:!0,persistentTrack:void 0,state:"off",subscribed:!1};return Qe(i),i};function Df(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(function(n){for(var r=0;r<e.length;r++){var i=e[r];typeof i=="function"?i(n):i&&rt(i)==="object"&&(i.current=n)}},e)}var Yi=$o(it(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,o=i===void 0?"audio":i,a=Xa(e,["onPlayFailed","sessionId","type"]),s=de(null),c=If(r,o),l=Df(s,t),d=c?.subscribed;return Q(function(){var f=s.current;if(!(!f||!c?.persistentTrack)){var p=function(){f.play().catch(function(y){n?.({sessionId:r,target:f,type:o,message:y.message,name:y.name})})};if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(o," for ").concat(r)),n?.({sessionId:r,target:f,type:o,message:"MediaStream API not available",name:"MediaStream API not available"});return}return f.addEventListener("canplay",p),f.srcObject=new MediaStream([c?.persistentTrack]),function(){f?.removeEventListener("canplay",p)}}},[c?.persistentTrack,n,r,o]),W("participant-left",N(function(f){var p=s.current;f.participant.session_id!==r||!p||(p.srcObject=null)},[r])),le.createElement("audio",ne({autoPlay:!0,ref:l},a,{"data-session-id":r,"data-audio-type":o,"data-subscribed":d}))}));Yi.displayName="DailyAudioTrack";var Lf=$o(it(function(e,t){var n=e.autoSubscribeActiveSpeaker,r=n===void 0?!1:n,i=e.maxSpeakers,o=i===void 0?5:i,a=e.onPlayFailed,s=e.playLocalScreenAudio,c=s===void 0?!1:s,l=_t(),d=be(Z(new Array(o).fill("")),2),f=d[0],p=d[1],g=_0().screens,y=Gi(),v=y0({ignoreLocal:!0}),b=de(null);Oo(t,function(){return{getActiveSpeakerAudio:function(){var x,C;return(C=(x=b.current)===null||x===void 0?void 0:x.querySelector('audio[data-session-id="'.concat(v,'"][data-audio-type="audio"]')))!==null&&C!==void 0?C:null},getAllAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll("audio"))!==null&&C!==void 0?C:[])},getAudioBySessionId:function(x){var C,A;return(A=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="audio"]')))!==null&&A!==void 0?A:null},getRmpAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="rmpAudio"]'))!==null&&C!==void 0?C:[])},getScreenAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="screenAudio"]'))!==null&&C!==void 0?C:[])},getRmpAudioBySessionId:function(x){var C,A;return(A=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="rmpAudio"]')))!==null&&A!==void 0?A:null},getScreenAudioBySessionId:function(x){var C,A;return(A=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="screenAudio"]')))!==null&&A!==void 0?A:null}}},[v]);var _=re(N(function(T,x,C){return Wn(void 0,void 0,void 0,function(){var A,E,R;return Jn(this,function(B){if(A=Object.values((R=l?.participants())!==null&&R!==void 0?R:{}).filter(function(V){return!V.local&&!!V.tracks.audio.subscribed}),E=function(z){return A.some(function(j){return j.session_id===z})},!E(C))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(C,{setSubscribedTracks:{audio:!0}});else return[2];return p(function(V){var z;if(V.includes(C))return V;var j=function(H){return!H||!E(H)};if(V.some(j)){var X=V.findIndex(j);return V[X]=C,Ue([],be(V),!1)}var ie=V.findIndex(function(q){return A.some(function(H){return H.session_id===q&&Ki(H.tracks.audio.state)})});if(ie>=0)return V[ie]=C,Ue([],be(V),!1);var me=A.filter(function(q){return V.includes(q.session_id)&&q.session_id!==v}).sort(function(q,H){var we,Xe,u=(we=T(ze(q.session_id,"last_active")))!==null&&we!==void 0?we:new Date("1970-01-01"),m=(Xe=T(ze(H.session_id,"last_active")))!==null&&Xe!==void 0?Xe:new Date("1970-01-01");return u>m?1:u<m?-1:0});if(!me.length){var J=V.findIndex(function(q){return q!==v});return V[J]=C,Ue([],be(V),!1)}var F=V.indexOf((z=me[0])===null||z===void 0?void 0:z.session_id);return V[F]=C,Ue([],be(V),!1)}),[2]})})},[v,r,l])),k=N(function(T){p(function(x){if(!x.includes(T))return x;var C=Ue([],be(x),!1),A=C.indexOf(T);return C[A]="",C})},[]);qi(["active-speaker-change","track-started","participant-left"],N(function(T){T.forEach(function(x){switch(x.action){case"active-speaker-change":if(x.activeSpeaker.peerId===y)return;_(x.activeSpeaker.peerId);break;case"track-started":x.track.kind==="audio"&&x.participant&&!x.participant.local&&_(x.participant.session_id);break;case"participant-left":k(x.participant.session_id);break}})},[_,y,k]),200);var M=yn({filter:N(function(T){var x;return!!(!((x=T?.tracks)===null||x===void 0)&&x.rmpAudio)},[])});return le.createElement("div",{ref:b},f.map(function(T,x){return le.createElement(Yi,{key:"speaker-slot-".concat(x),onPlayFailed:a,sessionId:T,type:"audio"})}),g.filter(function(T){return c?!0:!T.local}).map(function(T){return le.createElement(Yi,{key:T.screenId,onPlayFailed:a,sessionId:T.session_id,type:"screenAudio"})}),M.map(function(T){return le.createElement(Yi,{key:"".concat(T,"-rmp"),onPlayFailed:a,sessionId:T,type:"rmpAudio"})}))}));Lf.displayName="DailyAudio";var jf=it(function(t,n){var r=t.automirror,i=t.fit,o=i===void 0?"contain":i,a=t.mirror,s=t.onResize,c=t.playableStyle,l=c===void 0?{}:c,d=t.sessionId,f=t.style,p=f===void 0?{}:f,g=t.type,y=g===void 0?"video":g,v=Xa(t,["automirror","fit","mirror","onResize","playableStyle","sessionId","style","type"]),b=Gi(),_=b===d,k=y==="screenVideo",M=_&&!k,T=de(null),x=Df(T,n),C=If(d,y),A=C.persistentTrack,E=M||k||!C.isOff,R=Tf(d,"tracks.".concat(y)),B=R?.subscribed,V=Ne(function(){if(typeof a=="boolean")return a;if(!r)return!1;if(!A)return M;var z=A.getSettings(),j="facingMode"in z?M&&z.facingMode==="user":M;return j},[r,M,a,A]);return Q(function(){var j=T.current;if(j){var X=function(){var H=j.play();H!==void 0&&H.then(function(){j.controls=!1}).catch(function(we){j.controls=!0,console.warn("Failed to play video",we)})},ie=function(){j.paused&&X()},me=function(){j.style.transform="scale(1)"},J=function(){j.style.transform="",setTimeout(function(){j.paused&&X()},100)},F=function(){document.visibilityState!=="hidden"&&j.paused&&X()};return j.addEventListener("canplay",ie),j.addEventListener("enterpictureinpicture",me),j.addEventListener("leavepictureinpicture",J),document.addEventListener("visibilitychange",F),function(){j.removeEventListener("canplay",ie),j.removeEventListener("enterpictureinpicture",me),j.removeEventListener("leavepictureinpicture",J),document.removeEventListener("visibilitychange",F)}}},[]),Q(function(){var j=T.current;if(!(!j||!A)){if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(y," for ").concat(d));return}return j.srcObject=new MediaStream([A]),j.load(),function(){j.srcObject=null,j.load()}}},[d,y,A,A?.id]),Q(function(){var j=T.current;if(!s||!j)return;var X;function ie(){X&&cancelAnimationFrame(X),X=requestAnimationFrame(function(){var me=T.current;if(!(!me||document.hidden)){var J=me.videoWidth,F=me.videoHeight;J&&F&&s?.({aspectRatio:J/F,height:F,width:J})}})}return ie(),j.addEventListener("loadedmetadata",ie),j.addEventListener("resize",ie),function(){X&&cancelAnimationFrame(X),j.removeEventListener("loadedmetadata",ie),j.removeEventListener("resize",ie)}},[s]),le.createElement("video",ne({autoPlay:!0,muted:!0,playsInline:!0,ref:x,"data-local":_,"data-mirrored":V||void 0,"data-playable":E||void 0,"data-session-id":d,"data-subscribed":B,"data-video-type":y,style:ne(ne({objectFit:o,transform:V?"scale(-1, 1)":""},p),E?l:{})},v))});jf.displayName="DailyVideo";var w0=Ie({refreshDevices:function(){return Promise.resolve()}}),Ae=oe("idle");Ae.debugLabel=pe("camera-state");var Oe=oe("idle");Oe.debugLabel=pe("microphone-state");var Xi=oe([]);Xi.debugLabel=pe("camera-devices");var Qi=oe([]);Qi.debugLabel=pe("microphone-devices");var Rf=oe([]);Rf.debugLabel=pe("speaker-devices");var Vf=oe(null);Vf.debugLabel=pe("last-camera-error");var k0=function(t){var n=t.children,r=_t(),i=re(N(function(a,s){return Wn(void 0,void 0,void 0,function(){var c,l,d,f,p,g,y,v,b,_,k,M;return Jn(this,function(T){switch(T.label){case 0:if(typeof((k=navigator?.mediaDevices)===null||k===void 0?void 0:k.getUserMedia)>"u"||typeof((M=navigator?.mediaDevices)===null||M===void 0?void 0:M.enumerateDevices)>"u")return s(Ae,"not-supported"),s(Oe,"not-supported"),[2];if(!r)return[2];T.label=1;case 1:return T.trys.push([1,4,,5]),[4,r.enumerateDevices()];case 2:return c=T.sent().devices,l=c.filter(function(x){return x.kind==="videoinput"&&x.deviceId!==""}),d=c.filter(function(x){return x.kind==="audioinput"&&x.deviceId!==""}),f=c.filter(function(x){return x.kind==="audiooutput"&&x.deviceId!==""}),[4,r.getInputDevices()];case 3:return p=T.sent(),g=p.camera,y=p.mic,v=p.speaker,b=function(C,A,E){var R,B=E.find(function(j){return j.device.deviceId===A.deviceId}),V="deviceId"in C&&A.deviceId===C.deviceId,z=!("deviceId"in C)&&B?.selected;return{device:A,selected:V||!!z,state:(R=B?.state)!==null&&R!==void 0?R:"granted"}},_=function(C,A){return C.device.deviceId==="default"?-1:A.device.deviceId==="default"?1:C.device.label<A.device.label?-1:C.device.label>A.device.label?1:0},s(Xi,function(x){return l.filter(Boolean).map(function(C){return b(g,C,x)}).sort(_)}),s(Qi,function(x){return d.filter(Boolean).map(function(C){return b(y,C,x)}).sort(_)}),s(Rf,function(x){return f.filter(Boolean).map(function(C){return b(v,C,x)}).sort(_)}),[3,5];case 4:return T.sent(),s(Ae,"not-supported"),s(Oe,"not-supported"),[3,5];case 5:return[2]}})})},[r])),o=re(N(function(a,s){return Wn(void 0,void 0,void 0,function(){var c,l,d,f,p,g,y,v,b,_,k,M,T,x,C,A,E,R,B,V,z,j,X,ie,me,J;return Jn(this,function(F){switch(F.label){case 0:if(!r)return[2];if(c=a(Ae),l=a(Oe),d=r.participants(),!d.local)return[2];if(f=d.local.tracks,p="prompt",g="prompt",!navigator.permissions)return[3,5];F.label=1;case 1:return F.trys.push([1,4,,5]),[4,navigator.permissions.query({name:"camera"})];case 2:return y=F.sent(),p=y.state,[4,navigator.permissions.query({name:"microphone"})];case 3:return v=F.sent(),g=v.state,[3,5];case 4:return F.sent(),[3,5];case 5:return b=p==="prompt"&&["idle","pending"].includes(c)&&f.video.state==="interrupted"&&!f.video.persistentTrack,_=["idle","pending"].includes(c)&&!f.video.persistentTrack&&!!(!((T=f.video.off)===null||T===void 0)&&T.byUser),k=g==="prompt"&&["idle","pending"].includes(l)&&f.audio.state==="interrupted"&&!f.audio.persistentTrack,M=["idle","pending"].includes(l)&&!f.audio.persistentTrack&&!!(!((x=f.audio.off)===null||x===void 0)&&x.byUser),!((A=(C=f.audio)===null||C===void 0?void 0:C.blocked)===null||A===void 0)&&A.byDeviceInUse?(s(Oe,"in-use"),s(Qi,function(q){return q.map(function(H){return H.selected?ne(ne({},H),{state:"in-use"}):H})})):!((R=(E=f.audio)===null||E===void 0?void 0:E.blocked)===null||R===void 0)&&R.byDeviceMissing?s(Oe,"not-found"):!((V=(B=f.audio)===null||B===void 0?void 0:B.blocked)===null||V===void 0)&&V.byPermissions||g==="denied"?s(Oe,"blocked"):k?s(Oe,"pending"):M?s(Oe,"idle"):(s(Oe,"granted"),s(Qi,function(q){return q.map(function(H){return H.selected?ne(ne({},H),{state:"granted"}):H})})),!((j=(z=f.video)===null||z===void 0?void 0:z.blocked)===null||j===void 0)&&j.byDeviceInUse?(s(Ae,"in-use"),s(Xi,function(q){return q.map(function(H){return H.selected?ne(ne({},H),{state:"in-use"}):H})})):!((ie=(X=f.video)===null||X===void 0?void 0:X.blocked)===null||ie===void 0)&&ie.byDeviceMissing?s(Ae,"not-found"):!((J=(me=f.video)===null||me===void 0?void 0:me.blocked)===null||J===void 0)&&J.byPermissions||p==="denied"?s(Ae,"blocked"):b?s(Ae,"pending"):_?s(Ae,"idle"):(s(Ae,"granted"),s(Xi,function(q){return q.map(function(H){return H.selected?ne(ne({},H),{state:"granted"}):H})})),i(),[2]}})})},[r,i]));return W("participant-updated",N(function(a){a.participant.local&&o()},[o])),W("available-devices-updated",i),W("selected-devices-updated",i),W("camera-error",re(N(function(a,s,c){var l,d,f,p,g,y,v;switch(s(Vf,c.error),(l=c.error)===null||l===void 0?void 0:l.type){case"cam-in-use":s(Ae,"in-use");break;case"mic-in-use":s(Oe,"in-use");break;case"cam-mic-in-use":s(Ae,"in-use"),s(Oe,"in-use");break;case"not-found":!((d=c.error)===null||d===void 0)&&d.missingMedia.includes("video")&&s(Ae,"not-found"),!((f=c.error)===null||f===void 0)&&f.missingMedia.includes("audio")&&s(Oe,"not-found");break;case"permissions":!((p=c.error)===null||p===void 0)&&p.blockedMedia.includes("video")&&s(Ae,"blocked"),!((g=c.error)===null||g===void 0)&&g.blockedMedia.includes("audio")&&s(Oe,"blocked");break;case"constraints":((y=c.error)===null||y===void 0?void 0:y.reason)==="invalid"?(s(Ae,"constraints-invalid"),s(Oe,"constraints-invalid")):((v=c.error)===null||v===void 0?void 0:v.reason)==="none-specified"&&(s(Ae,"constraints-none-specified"),s(Oe,"constraints-none-specified"));break;case"undefined-mediadevices":s(Ae,"undefined-mediadevices"),s(Oe,"undefined-mediadevices");break;case"unknown":default:s(Ae,"unknown"),s(Oe,"unknown");break}},[]))),W("started-camera",re(N(function(a,s){s(Ae,"granted"),s(Oe,"granted"),o()},[o]))),le.createElement(w0.Provider,{value:{refreshDevices:i}},n)},Cr=oe({errorMsg:void 0,isLiveStreaming:!1,layout:void 0});Cr.debugLabel=pe("live-streaming");var S0=function(t){var n=t.children;return W("live-streaming-started",re(N(function(r,i,o){i(Cr,{isLiveStreaming:!0,layout:o?.layout})},[]))),W("live-streaming-stopped",re(N(function(r,i){i(Cr,function(o){return ne(ne({},o),{isLiveStreaming:!1,layout:void 0})})},[]))),W("live-streaming-error",re(N(function(r,i,o){i(Cr,function(a){return ne(ne({},a),{errorMsg:o.errorMsg})})},[]))),W("left-meeting",re(N(function(r,i){i(Cr,{errorMsg:void 0,isLiveStreaming:!1,layout:void 0})},[]))),le.createElement(le.Fragment,null,n)},Zi=oe("new");Zi.debugLabel=pe("meeting-state");var ds=oe(null);ds.debugLabel=pe("meeting-error");var fs=oe(null);fs.debugLabel=pe("non-fatal-error");var Pr=oe({data:void 0,topology:"none"});Pr.debugLabel=pe("meeting-session-data");var x0=function(t){var n=t.children,r=_t(),i=re(N(function(a,s){if(r){var c=r.meetingState();return s(Zi,c),c}},[r]));W("loading",i),W("loaded",i),W("joining-meeting",i),W("joined-meeting",i),W("left-meeting",i),W("error",re(N(function(a,s,c){s(ds,c),i()},[i]))),W("nonfatal-error",re(N(function(a,s,c){s(fs,c)},[])));var o=re(N(function(a,s){r&&s(Pr,r.meetingSessionState())},[r]));return W("joined-meeting",o),W("meeting-session-state-updated",re(N(function(a,s,c){s(Pr,c.meetingSessionState)},[]))),W("left-meeting",re(N(function(a,s){s(Pr,{data:void 0,topology:"none"})},[]))),W("call-instance-destroyed",re(N(function(a,s){s(Zi,"new"),s(ds,null),s(fs,null),s(Pr,{data:void 0,topology:"none"})},[]))),le.createElement(le.Fragment,null,n)},Hn=oe("none");Hn.debugLabel=pe("topology");var Nf=oe("unknown"),Ff=oe([]),hs=oe(100);hs.debugLabel=pe("network-quality");var ps=oe("good");ps.debugLabel=pe("network-threshold");var T0=function(t){var n=t.children,r=_t(),i=Zt(Hn),o=re(N(function(a,s){return Wn(void 0,void 0,void 0,function(){var c;return Jn(this,function(l){switch(l.label){case 0:return r?[4,r.getNetworkTopology()]:[2];case 1:return c=l.sent(),!c||c?.topology==="none"?[2]:(s(Hn,c.topology),[2])}})})},[r]));return W("joined-meeting",o),W("network-connection",re(N(function(a,s,c){switch(c.event){case"connected":c.type==="peer-to-peer"&&s(Hn,"peer"),c.type==="sfu"&&s(Hn,"sfu");break}},[]))),W("network-quality-change",re(N(function(a,s,c){s(Nf,function(l){return l!==c.networkState?c.networkState:l}),s(Ff,function(l){var d,f=(d=c.networkStateReasons)!==null&&d!==void 0?d:[];return ts(l,f)?l:f}),s(hs,function(l){return l!==c.quality?c.quality:l}),s(ps,function(l){return l!==c.threshold?c.threshold:l})},[]))),W("left-meeting",re(N(function(a,s){s(Hn,"none"),s(Nf,"unknown"),s(Ff,[]),s(hs,100),s(ps,"good")},[]))),Q(function(){!r||i!=="none"||o()},[r,o,i]),le.createElement(le.Fragment,null,n)},bn=oe({isLocalParticipantRecorded:!1,isRecording:!1});bn.debugLabel=pe("recording-state");var M0=function(t){var n=t.children,r=Gi(),i=yn({filter:"record"}),o=re(N(function(a,s,c,l){var d=a(bn),f={isLocalParticipantRecorded:d.isLocalParticipantRecorded,isRecording:d.isRecording,local:d.local,type:d.type},p={isLocalParticipantRecorded:f?.type==="local"||!f?.type?c:f.isLocalParticipantRecorded,isRecording:f?.type==="local"||!f?.type?c:f.isRecording,local:(f?.type==="local"||!f?.type)&&c?l:f?.local,type:c?"local":d?.type};wt(f,p)||s(bn,ne(ne({},f),p))},[]));return Q(function(){var a=i.length>0,s=i.includes(r||"local");o(a,s)},[r,o,i]),W("recording-started",re(N(function(a,s,c){var l,d=!0;switch(c.type){case"cloud-beta":case"cloud":{r&&((l=c.layout)===null||l===void 0?void 0:l.preset)==="single-participant"&&c.layout.session_id!==r&&(d=!1);break}}s(bn,{error:!1,isLocalParticipantRecorded:d,isRecording:!0,layout:c?.layout,local:c?.local,recordingId:c?.recordingId,recordingStartedDate:new Date,startedBy:c?.startedBy,type:c?.type})},[r]))),W("recording-stopped",re(N(function(a,s){s(bn,function(c){return ne(ne({},c),{isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),W("recording-error",re(N(function(a,s){s(bn,function(c){return ne(ne({},c),{error:!0,isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),W("left-meeting",re(N(function(a,s){s(bn,{isLocalParticipantRecorded:!1,isRecording:!1})},[]))),le.createElement(le.Fragment,null,n)},C0=function(){var t=Zt(Zi);return Qe(t),t},ms=oe(null);ms.debugLabel=pe("room-state");var P0=function(t){var n=t.children,r=_t(),i=C0(),o=re(N(function(a,s){return Wn(void 0,void 0,void 0,function(){var c;return Jn(this,function(l){switch(l.label){case 0:return!r||i==="left-meeting"?[2]:[4,r.room()];case 1:return c=l.sent(),c&&"id"in c&&s(ms,c),[2,c]}})})},[r,i]));return W("access-state-updated",o),W("left-meeting",re(N(function(a,s){return function(){s(ms,null)}},[]))),le.createElement(le.Fragment,null,n)},Gn=oe({isTranscribing:!1,model:"general",language:"en",transcriptions:[]});Gn.debugLabel=pe("transcription-state");var E0=function(t){var n=t.children;return W("transcription-started",re(N(function(r,i,o){i(Gn,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:o.endpointing,extra:o.extra,includeRawResponse:o.includeRawResponse,instanceId:o.instanceId,language:o.language,model:o.model,profanity_filter:o.profanity_filter,punctuate:o.punctuate,redact:o.redact,startedBy:o.startedBy,tier:o.tier})},[]))),W("transcription-stopped",re(N(function(r,i,o){i(Gn,function(a){return ne(ne({},a),{updatedBy:o.updatedBy,isTranscribing:!1})})},[]))),W("transcription-error",re(N(function(r,i){i(Gn,function(o){return ne(ne({},o),{error:!0,isTranscribing:!1})})},[]))),W("left-meeting",re(N(function(r,i){i(Gn,function(o){return ne(ne({},o),{isTranscribing:!1})})},[]))),W("app-message",re(N(function(r,i,o){o?.fromId==="transcription"&&i(Gn,function(a){return ne(ne({},a),{isTranscribing:!0,transcriptions:Ue(Ue([],be(a.transcriptions),!1),[o.data],!1)})})},[]))),le.createElement(le.Fragment,null,n)},Bf={strictMode:!0},$f=function(){return!0},A0={options:Bf,shouldCreateInstance:$f},O0=function(t,n){var r=n===void 0?A0:n,i=r.parentElRef,o=r.options,a=o===void 0?Bf:o,s=r.shouldCreateInstance,c=s===void 0?$f:s,l=be(Z(null),2),d=l[0],f=l[1],p=de();return Q(function(){if(!c())return;function g(b){return Wn(this,void 0,void 0,function(){return Jn(this,function(_){switch(_.label){case 0:return[4,b.destroy()];case 1:return _.sent(),[2]}})})}var y=function(){setTimeout(function(){return f(null)},0)},v=xr.getCallInstance();if(!d&&v&&!v.isDestroyed()){v.once("call-instance-destroyed",y),f(v);return}if(d){wt(p.current,a)||g(d);return}if(!v||v.isDestroyed())try{switch(t){case"callFrame":v=i?.current?xr.createFrame(i.current,ne({},a)):xr.createFrame(ne({},a));break;case"callObject":v=xr.createCallObject(ne({},a));break}p.current=a,f(v),v.once("call-instance-destroyed",y)}catch(b){if(console.error("Error creating call instance:",b),a.strictMode)throw b}},[d,a,i,c,t]),d},I0=function(t){return O0("callObject",t)},D0=function(t){var n=t.children,r=t.jotaiStore,i=Xa(t,["children","jotaiStore"]),o=de({}),a=N(function(y){var v,b,_,k;if("action"in y){var M=y.action,T=Array.from((k=(_=o.current)===null||_===void 0?void 0:_[M])!==null&&k!==void 0?k:[]),x=T.filter(function(z){var j=be(z,1),X=j[0];return X<0}),C=T.filter(function(z){var j=be(z,1),X=j[0];return X>0}),A=Ue(Ue([],be(x),!1),be(C),!1);try{for(var E=kf(A),R=E.next();!R.done;R=E.next()){var B=be(R.value,2),V=B[1];V(y)}}catch(z){v={error:z}}finally{try{R&&!R.done&&(b=E.return)&&b.call(E)}finally{if(v)throw v.error}}}},[]),s=N(function(y){y&&Object.keys(o.current).forEach(function(v){y.off(v,a),y.isDestroyed()||y.on(v,a)})},[a]),c="callObject"in i?i.callObject:null,l=Ne(function(){return"callObject"in i?{}:i},[i]),d=I0({options:l,shouldCreateInstance:N(function(){return!("callObject"in i)},[i])}),f=c??d;Q(function(){f&&s(f)},[f,s]);var p=N(function(y,v,b){var _,k;o.current[y]||(o.current[y]=new Map,f&&(f.off(y,a),f.isDestroyed()||f.on(y,a))),!((_=o.current[y])===null||_===void 0)&&_.has(b)||(k=o.current[y])===null||k===void 0||k.set(b,v)},[f,a]),g=N(function(y,v){var b,_;(b=o.current[y])===null||b===void 0||b.delete(v),((_=o.current[y])===null||_===void 0?void 0:_.size)===0&&(f?.off(y,a),delete o.current[y])},[f,a]);return le.createElement(sv,{store:r},le.createElement(Sf.Provider,{value:f},le.createElement(Qa.Provider,{value:{on:p,off:g}},le.createElement(P0,null,le.createElement(x0,null,le.createElement(T0,null,le.createElement(g0,null,le.createElement(M0,null,le.createElement(S0,null,le.createElement(E0,null,le.createElement(k0,null,n)))))))))))},gs=function(t){var n={},r=n.onAppMessage,i=_t(),o=N(function(s,c){c===void 0&&(c="*"),i&&i.sendAppMessage(s,c)},[i]),a=N(function(s){r?.(s,o)},[r,o]);return W("app-message",a),o},L0=oe({state:"low",reason:"none"});L0.debugLabel=pe("cpu-load");var j0=oe(null);j0.debugLabel=pe("input-settings");var R0=oe({hidden:0,present:0});R0.debugLabel=pe("participant-counts");var V0=fr(function(e){var t=oe({},function(n,r,i){r(V0(e),i)});return t.debugLabel=pe("participant-receive-settings-".concat(e)),t}),N0=oe(null);N0.debugLabel=pe("send-settings");const F0='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-600:oklch(57.7% .245 27.325);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--radius-lg:.5rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-lg:16px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-gray-40:#919191}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-5{right:calc(var(--spacing)*5)}.right-15{right:calc(var(--spacing)*15)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-25{bottom:calc(var(--spacing)*25)}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-1000{z-index:1000}.mx-auto{margin-inline:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.hidden{display:none}.inline{display:inline}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-3{height:calc(var(--spacing)*3)}.h-11{height:calc(var(--spacing)*11)}.h-\\[28px\\]{height:28px}.h-\\[64px\\]{height:64px}.h-\\[180px\\]{height:180px}.h-\\[216px\\]{height:216px}.h-\\[300px\\]{height:300px}.h-\\[377px\\]{height:377px}.h-full{height:100%}.max-h-36{max-height:calc(var(--spacing)*36)}.min-h-11{min-height:calc(var(--spacing)*11)}.w-11{width:calc(var(--spacing)*11)}.w-25{width:calc(var(--spacing)*25)}.w-\\[36px\\]{width:36px}.w-\\[120px\\]{width:120px}.w-\\[144px\\]{width:144px}.w-\\[200px\\]{width:200px}.w-\\[252px\\]{width:252px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[90\\%\\]{max-width:90%}.flex-1{flex:1}.flex-none{flex:none}.scale-25{--tw-scale-x:25%;--tw-scale-y:25%;--tw-scale-z:25%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-none{scale:none}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[22px\\]{border-radius:22px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-l-3xl{border-top-left-radius:var(--radius-3xl);border-bottom-left-radius:var(--radius-3xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\\/95{background-color:#000000f2}@supports (color:color-mix(in lab,red,red)){.bg-black\\/95{background-color:color-mix(in oklab,var(--color-black)95%,transparent)}}.bg-gray-40\\/25{background-color:#91919140}@supports (color:color-mix(in lab,red,red)){.bg-gray-40\\/25{background-color:color-mix(in oklab,var(--color-gray-40)25%,transparent)}}.bg-gray-40\\/30{background-color:#9191914d}@supports (color:color-mix(in lab,red,red)){.bg-gray-40\\/30{background-color:color-mix(in oklab,var(--color-gray-40)30%,transparent)}}.bg-red-600\\/25{background-color:#e4001440}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/25{background-color:color-mix(in oklab,var(--color-red-600)25%,transparent)}}.bg-red-600\\/50{background-color:#e4001480}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/50{background-color:color-mix(in oklab,var(--color-red-600)50%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-white\\/30{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.bg-\\[linear-gradient\\(transparent\\,\\#000000\\)\\]{background-image:linear-gradient(#0000,#000)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)\\,rgba\\(0\\,0\\,0\\,1\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,0\\)_40\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%);mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,0\\)_50\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%);mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_15\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,1\\)_50\\%\\,rgba\\(0\\,0\\,0\\,0\\)_60\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%);mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,0\\)_70\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%);mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\,rgba\\(0\\,0\\,0\\,0\\)_90\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%);mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 60%,#000 80%);mask-image:linear-gradient(#0000 60%,#000 80%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_70\\%\\,rgba\\(0\\,0\\,0\\,1\\)_100\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 70%,#000 100%);mask-image:linear-gradient(#0000 70%,#000)}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{object-fit:cover}.p-2{padding:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-14{padding-right:calc(var(--spacing)*14)}.pr-\\[4px\\]{padding-right:4px}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-right{text-align:right}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-white{color:var(--color-white)}.text-white\\/75{color:#ffffffbf}@supports (color:color-mix(in lab,red,red)){.text-white\\/75{color:color-mix(in oklab,var(--color-white)75%,transparent)}}.underline{text-decoration-line:underline}.decoration-white\\/50{text-decoration-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.decoration-white\\/50{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.opacity-0{opacity:0}.opacity-100{opacity:1}.mix-blend-difference{mix-blend-mode:difference}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-sm{--tw-blur:blur(var(--blur-sm));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[4px\\]{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[8px\\]{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[16px\\]{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[32px\\]{--tw-backdrop-blur:blur(32px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[64px\\]{--tw-backdrop-blur:blur(64px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-none{--tw-backdrop-blur: ;-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[backdrop-filter\\]{transition-property:-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[scrollbar-width\\:none\\]{scrollbar-width:none}.placeholder\\:text-white\\/70::placeholder{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-white\\/70::placeholder{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.placeholder\\:opacity-0::placeholder{opacity:0}.placeholder\\:opacity-70::placeholder{opacity:.7}@media(hover:hover){.hover\\:bg-black\\/30:hover{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/30:hover{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.hover\\:bg-gray-40\\/40:hover{background-color:#91919166}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-40\\/40:hover{background-color:color-mix(in oklab,var(--color-gray-40)40%,transparent)}}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/15:hover{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.hover\\:bg-white\\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/80:hover{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:hidden::-webkit-scrollbar{display:none}.shadow-inset-white-10{box-shadow:inset 0 0 0 1px #ffffff1a}.shadow-inset-white-20{box-shadow:inset 0 0 0 1px #fff3}.shadow-focused{box-shadow:inset 0 0 0 1.5px #fff6}}@keyframes fadeInUp{0%{opacity:0;filter:blur(12px);transform:translateY(12px)}to{opacity:1;filter:blur();transform:translateY(0)}}@keyframes fadeOutUp{0%{opacity:1;filter:blur();transform:translateY(0)}to{opacity:0;filter:blur(12px);transform:translateY(-12px)}}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';function B0(){return O("style",{children:F0})}const Uf=Ie(void 0);function $0({children:e}){const[t,n]=Z(!1);return O(Uf.Provider,{value:{hasUserInteracted:t,setHasUserInteracted:n},children:e})}function Er(){const e=ge(Uf);if(!e)throw new Error("useUserInteraction must be used within a UserInteractionProvider");return e}const Le="active",lt="minimized",Ht="hidden",zf=Ie(void 0),U0=3e4;function z0({children:e,showMinimizeButton:t=!0,onSetShowMinimizeButton:n}){const{setHasUserInteracted:r}=Er(),i=gs(),o=_t(),[a,s]=Z(lt),[c,l]=Z(!1),[d,f]=Z(!1),[p,g]=Z(!1),[y,v]=Z(null),[b,_]=Z(!1),[k,M]=Z(t),[T,x]=Z(!1),[C,A]=Z(!1),E=de(null),R=de(null),B=de(null);Q(()=>{n&&n(M)},[n]);const V=N(()=>{if(o)try{const j=o.meetingState();(j==="joined-meeting"||j==="joining-meeting")&&(console.log("Sending force-end event to Daily"),i({event:"force-end"},"*"))}catch{}l(!1),r(!1),_(!1),v(null),x(!1),A(!1)},[o]),z=j=>{E.current!==null&&clearTimeout(E.current),R.current!==null&&clearTimeout(R.current),j===Le?B.current!==null&&(clearTimeout(B.current),B.current=null):a===Le&&j===lt&&(B.current=window.setTimeout(()=>{V(),B.current=null},U0)),j===Ht||a===Ht?(f(!0),E.current=window.setTimeout(()=>{s(j),f(!1),g(!0),E.current=null,R.current=window.setTimeout(()=>{g(!1),R.current=null},300)},1)):(s(j),f(!1),g(!1))};return O(zf.Provider,{value:{widgetState:a,setWidgetState:z,isAgentVideoReady:c,setIsAgentVideoReady:l,roomUrl:y,setRoomUrl:v,isTransitioning:p,isAboutToTransition:d,hasJoinedRoom:b,setHasJoinedRoom:_,resetDailyState:V,showMinimizeButton:k,setShowMinimizeButton:M,isImageChangeRequested:T,setIsImageChangeRequested:x,isImageChanging:C,setIsImageChanging:A},children:e})}function Rt(){const e=ge(zf);if(!e)throw new Error("useWidget must be used within a WidgetProvider");return e}const Wf=Ie(void 0);function W0({children:e}){const[t,n]=Z(!0),[r,i]=Z(!1),o=_t();return Q(()=>{o&&o.setLocalAudio(!t)},[t,o]),O(Wf.Provider,{value:{isMicMuted:t,setIsMicMuted:n,isAudioMuted:r,setIsAudioMuted:i},children:e})}function vs(){const e=ge(Wf);if(!e)throw new Error("useMute must be used within a MuteProvider");return e}const Jf=Ie(void 0);function J0({children:e}){const t=Ne(()=>typeof window>"u"?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),[]);return O(Jf.Provider,{value:{isMobileDevice:t},children:e})}function ys(){const e=ge(Jf);if(!e)throw new Error("useMobile must be used within a MobileProvider");return e}const qf=Ie(void 0);function q0({children:e}){const[t,n]=Z(null);return O(qf.Provider,{value:{agentData:t,setAgentData:n},children:e})}function _n(){const e=ge(qf);if(!e)throw new Error("useAgent must be used within an AgentProvider");return e}const Hf=360,H0=30,Gf=Ie(void 0);function G0({children:e}){const[t,n]=Z(""),[r,i]=Z(""),[o,a]=Z(""),s=de(null),c=de(null),{agentData:l}=_n(),{resetDailyState:d,setWidgetState:f}=Rt(),p=de(Hf),g=N(b=>{c.current!==null&&(clearTimeout(c.current),c.current=null),i(b),b&&(c.current=window.setTimeout(()=>{i(""),c.current=null},1e4))},[]),y=N(()=>{n(""),g(""),a("")},[]),v=N(()=>{s.current!==null&&clearInterval(s.current);const b=l?.max_conv_dur!=null&&l.max_conv_dur>0?l.max_conv_dur:Hf;p.current=b,a(""),s.current=window.setInterval(()=>{p.current-=1,p.current<=H0&&p.current>0?a(`• ${p.current}s left`):p.current===0&&s.current!==null&&(a(""),n(""),g(""),f(lt),d(),clearInterval(s.current),s.current=null)},1e3)},[l,f,d]);return Q(()=>{s.current!==null&&l?.max_conv_dur!=null&&l.max_conv_dur>0&&v()},[l?.max_conv_dur,v]),Q(()=>{!r&&c.current!==null&&(clearTimeout(c.current),c.current=null)},[r]),Q(()=>()=>{s.current!==null&&clearInterval(s.current),c.current!==null&&clearTimeout(c.current)},[]),O(Gf.Provider,{value:{errorMsg:t,setErrorMsg:n,nonFatalErrorMsg:r,setNonFatalErrorMsg:g,timeMsg:o,setTimeMsg:a,startMaxVideoTimer:v,resetErrors:y},children:e})}function eo(){const e=ge(Gf);if(!e)throw new Error("useError must be used within an ErrorProvider");return e}function K0(){const e=yn({filter:"remote"}),{timeMsg:t}=eo(),{agentData:n}=_n(),{isImageChanging:r}=Rt();if(e.length===0)return null;const i=e[0],o=n?.image_url;return O("div",{className:"h-full rounded-lg relative",children:[o&&O("div",{className:"absolute inset-0 bg-cover bg-center rounded-lg",style:{backgroundImage:`url(${o})`}}),O("div",{className:"relative w-full h-full",children:[O(jf,{sessionId:i,type:"video",style:{objectFit:"cover",width:"100%",height:"100%",position:"relative"}}),O("div",{className:`absolute inset-0 bg-black/95 bg-cover bg-center rounded-lg transition-opacity
36
36
  transition-[backdrop-filter] duration-300 ease-in-out
37
- ${r?"opacity-100 backdrop-blur-lg":"opacity-0 backdrop-blur-none"}`})]}),t&&O("div",{className:"absolute top-2 left-2",children:O("div",{className:"bg-red-600/50 backdrop-blur-xl rounded-3xl py-2 px-4 w-fit shadow-inset-white-10",children:O("p",{className:"text-white text-lg font-semibold text-center",children:t})})})]})}const Kf=Ie({});function Y0(e){const t=de(null);return t.current===null&&(t.current=e()),t.current}const bs=typeof window<"u",X0=bs?In:Q,_s=Ie(null);function ws(e,t){e.indexOf(t)===-1&&e.push(t)}function ks(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Vt=(e,t,n)=>n>t?t:n<e?e:n;let Ss=()=>{};const Nt={},Yf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Xf(e){return typeof e=="object"&&e!==null}const Qf=e=>/^0[^.\s]+$/u.test(e);function xs(e){let t;return()=>(t===void 0&&(t=e()),t)}const ut=e=>e,Q0=(e,t)=>n=>t(e(n)),Ar=(...e)=>e.reduce(Q0),Or=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ts{constructor(){this.subscriptions=[]}add(t){return ws(this.subscriptions,t),()=>ks(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ct=e=>e*1e3,dt=e=>e/1e3;function Zf(e,t){return t?e*(1e3/t):0}const eh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Z0=1e-7,e_=12;function t_(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=eh(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Z0&&++s<e_);return a}function Ir(e,t,n,r){if(e===t&&n===r)return ut;const i=o=>t_(o,0,1,e,n);return o=>o===0||o===1?o:eh(i(o),t,r)}const th=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,nh=e=>t=>1-e(1-t),rh=Ir(.33,1.53,.69,.99),Ms=nh(rh),ih=th(Ms),oh=e=>(e*=2)<1?.5*Ms(e):.5*(2-Math.pow(2,-10*(e-1))),Cs=e=>1-Math.sin(Math.acos(e)),ah=nh(Cs),sh=th(Cs),n_=Ir(.42,0,1,1),r_=Ir(0,0,.58,1),ch=Ir(.42,0,.58,1),i_=e=>Array.isArray(e)&&typeof e[0]!="number",lh=e=>Array.isArray(e)&&typeof e[0]=="number",o_={linear:ut,easeIn:n_,easeInOut:ch,easeOut:r_,circIn:Cs,circInOut:sh,circOut:ah,backIn:Ms,backInOut:ih,backOut:rh,anticipate:oh},a_=e=>typeof e=="string",uh=e=>{if(lh(e)){Ss(e.length===4);const[t,n,r,i]=e;return Ir(t,n,r,i)}else if(a_(e))return o_[e];return e},to=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function s_(e,t){let n=new Set,r=new Set,i=!1,o=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(l.schedule(d),e()),d(s)}const l={schedule:(d,f=!1,p=!1)=>{const y=p&&i?n:r;return f&&a.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(s=d,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(d))}};return l}const c_=40;function dh(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=to.reduce((M,T)=>(M[T]=s_(o),M),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:d,update:f,preRender:p,render:g,postRender:y}=a,v=()=>{const M=Nt.useManualTiming?i.timestamp:performance.now();n=!1,Nt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(M-i.timestamp,c_),1)),i.timestamp=M,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),d.process(i),f.process(i),p.process(i),g.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},b=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:to.reduce((M,T)=>{const x=a[T];return M[T]=(C,A=!1,E=!1)=>(n||b(),x.schedule(C,A,E)),M},{}),cancel:M=>{for(let T=0;T<to.length;T++)a[to[T]].cancel(M)},state:i,steps:a}}const{schedule:Se,cancel:Gt,state:Ve,steps:Ps}=dh(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0);let no;function l_(){no=void 0}const Ye={now:()=>(no===void 0&&Ye.set(Ve.isProcessing||Nt.useManualTiming?Ve.timestamp:performance.now()),no),set:e=>{no=e,queueMicrotask(l_)}},fh=e=>t=>typeof t=="string"&&t.startsWith(e),Es=fh("--"),u_=fh("var(--"),As=e=>u_(e)?d_.test(e.split("/*")[0].trim()):!1,d_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Kn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Dr={...Kn,transform:e=>Vt(0,1,e)},ro={...Kn,default:1},Lr=e=>Math.round(e*1e5)/1e5,Os=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function f_(e){return e==null}const h_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Is=(e,t)=>n=>!!(typeof n=="string"&&h_.test(n)&&n.startsWith(e)||t&&!f_(n)&&Object.prototype.hasOwnProperty.call(n,t)),hh=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(Os);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},p_=e=>Vt(0,255,e),Ds={...Kn,transform:e=>Math.round(p_(e))},wn={test:Is("rgb","red"),parse:hh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ds.transform(e)+", "+Ds.transform(t)+", "+Ds.transform(n)+", "+Lr(Dr.transform(r))+")"};function m_(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ls={test:Is("#"),parse:m_,transform:wn.transform},jr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kt=jr("deg"),Pt=jr("%"),G=jr("px"),g_=jr("vh"),v_=jr("vw"),ph={...Pt,parse:e=>Pt.parse(e)/100,transform:e=>Pt.transform(e*100)},Yn={test:Is("hsl","hue"),parse:hh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pt.transform(Lr(t))+", "+Pt.transform(Lr(n))+", "+Lr(Dr.transform(r))+")"},Ee={test:e=>wn.test(e)||Ls.test(e)||Yn.test(e),parse:e=>wn.test(e)?wn.parse(e):Yn.test(e)?Yn.parse(e):Ls.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?wn.transform(e):Yn.transform(e),getAnimatableNone:e=>{const t=Ee.parse(e);return t.alpha=0,Ee.transform(t)}},y_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function b_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Os)?.length||0)+(e.match(y_)?.length||0)>0}const mh="number",gh="color",__="var",w_="var(",vh="${}",k_=/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 Rr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(k_,c=>(Ee.test(c)?(r.color.push(o),i.push(gh),n.push(Ee.parse(c))):c.startsWith(w_)?(r.var.push(o),i.push(__),n.push(c)):(r.number.push(o),i.push(mh),n.push(parseFloat(c))),++o,vh)).split(vh);return{values:n,split:s,indexes:r,types:i}}function yh(e){return Rr(e).values}function bh(e){const{split:t,types:n}=Rr(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===mh?o+=Lr(i[a]):s===gh?o+=Ee.transform(i[a]):o+=i[a]}return o}}const S_=e=>typeof e=="number"?0:Ee.test(e)?Ee.getAnimatableNone(e):e;function x_(e){const t=yh(e);return bh(e)(t.map(S_))}const Yt={test:b_,parse:yh,createTransformer:bh,getAnimatableNone:x_};function js(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+(t-e)*6*n:n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function T_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=js(c,s,e+.3333333333333333),o=js(c,s,e),a=js(c,s,e-.3333333333333333)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function io(e,t){return n=>n>0?t:e}const Te=(e,t,n)=>e+(t-e)*n,Rs=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},M_=[Ls,wn,Yn],C_=e=>M_.find(t=>t.test(e));function _h(e){const t=C_(e);if(!t)return!1;let n=t.parse(e);return t===Yn&&(n=T_(n)),n}const wh=(e,t)=>{const n=_h(e),r=_h(t);if(!n||!r)return io(e,t);const i={...n};return o=>(i.red=Rs(n.red,r.red,o),i.green=Rs(n.green,r.green,o),i.blue=Rs(n.blue,r.blue,o),i.alpha=Te(n.alpha,r.alpha,o),wn.transform(i))},Vs=new Set(["none","hidden"]);function P_(e,t){return Vs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function E_(e,t){return n=>Te(e,t,n)}function Ns(e){return typeof e=="number"?E_:typeof e=="string"?As(e)?io:Ee.test(e)?wh:I_:Array.isArray(e)?kh:typeof e=="object"?Ee.test(e)?wh:A_:io}function kh(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Ns(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function A_(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ns(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function O_(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}const I_=(e,t)=>{const n=Yt.createTransformer(t),r=Rr(e),i=Rr(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Vs.has(e)&&!i.values.length||Vs.has(t)&&!r.values.length?P_(e,t):Ar(kh(O_(r,i),i.values),n):io(e,t)};function Sh(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Te(e,t,n):Ns(e)(e,t)}const D_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Se.update(t,n),stop:()=>Gt(t),now:()=>Ve.isProcessing?Ve.timestamp:Ye.now()}},xh=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},oo=2e4;function Fs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<oo;)t+=n,r=e.next(t);return t>=oo?1/0:t}function L_(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Fs(r),oo);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:dt(i)}}const j_=5;function Th(e,t,n){const r=Math.max(t-j_,0);return Zf(n-e(r),t-r)}const Me={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},Bs=.001;function R_({duration:e=Me.duration,bounce:t=Me.bounce,velocity:n=Me.velocity,mass:r=Me.mass}){let i,o,a=1-t;a=Vt(Me.minDamping,Me.maxDamping,a),e=Vt(Me.minDuration,Me.maxDuration,dt(e)),a<1?(i=l=>{const d=l*a,f=d*e,p=d-n,g=$s(l,a),y=Math.exp(-f);return Bs-p/g*y},o=l=>{const f=l*a*e,p=f*n+n,g=Math.pow(a,2)*Math.pow(l,2)*e,y=Math.exp(-f),v=$s(Math.pow(l,2),a);return(-i(l)+Bs>0?-1:1)*((p-g)*y)/v}):(i=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-Bs+d*f},o=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const s=5/e,c=N_(i,o,s);if(e=Ct(e),isNaN(c))return{stiffness:Me.stiffness,damping:Me.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const V_=12;function N_(e,t,n){let r=n;for(let i=1;i<V_;i++)r=r-e(r)/t(r);return r}function $s(e,t){return e*Math.sqrt(1-t*t)}const F_=["duration","bounce"],B_=["stiffness","damping","mass"];function Mh(e,t){return t.some(n=>e[n]!==void 0)}function $_(e){let t={velocity:Me.velocity,stiffness:Me.stiffness,damping:Me.damping,mass:Me.mass,isResolvedFromDuration:!1,...e};if(!Mh(e,B_)&&Mh(e,F_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Vt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Me.mass,stiffness:i,damping:o}}else{const n=R_(e);t={...t,...n,mass:Me.mass},t.isResolvedFromDuration=!0}return t}function ao(e=Me.visualDuration,t=Me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:d,duration:f,velocity:p,isResolvedFromDuration:g}=$_({...n,velocity:-dt(n.velocity||0)}),y=p||0,v=l/(2*Math.sqrt(c*d)),b=a-o,_=dt(Math.sqrt(c/d)),k=Math.abs(b)<5;r||(r=k?Me.restSpeed.granular:Me.restSpeed.default),i||(i=k?Me.restDelta.granular:Me.restDelta.default);let M;if(v<1){const x=$s(_,v);M=C=>{const A=Math.exp(-v*_*C);return a-A*((y+v*_*b)/x*Math.sin(x*C)+b*Math.cos(x*C))}}else if(v===1)M=x=>a-Math.exp(-_*x)*(b+(y+_*b)*x);else{const x=_*Math.sqrt(v*v-1);M=C=>{const A=Math.exp(-v*_*C),E=Math.min(x*C,300);return a-A*((y+v*_*b)*Math.sinh(E)+x*b*Math.cosh(E))/x}}const T={calculatedDuration:g&&f||null,next:x=>{const C=M(x);if(g)s.done=x>=f;else{let A=x===0?y:0;v<1&&(A=x===0?Ct(y):Th(M,x,C));const E=Math.abs(A)<=r,R=Math.abs(a-C)<=i;s.done=E&&R}return s.value=s.done?a:C,s},toString:()=>{const x=Math.min(Fs(T),oo),C=xh(A=>T.next(x*A).value,x,30);return x+"ms "+C},toTransition:()=>{}};return T}ao.applyToOptions=e=>{const t=L_(e,100,ao);return e.ease=t.ease,e.duration=Ct(t.duration),e.type="keyframes",e};function Us({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},g=E=>s!==void 0&&E<s||c!==void 0&&E>c,y=E=>s===void 0?c:c===void 0||Math.abs(s-E)<Math.abs(c-E)?s:c;let v=n*t;const b=f+v,_=a===void 0?b:a(b);_!==b&&(v=_-f);const k=E=>-v*Math.exp(-E/r),M=E=>_+k(E),T=E=>{const R=k(E),B=M(E);p.done=Math.abs(R)<=l,p.value=p.done?_:B};let x,C;const A=E=>{g(p.value)&&(x=E,C=ao({keyframes:[p.value,y(p.value)],velocity:Th(M,E,p.value),damping:i,stiffness:o,restDelta:l,restSpeed:d}))};return A(0),{calculatedDuration:null,next:E=>{let R=!1;return!C&&x===void 0&&(R=!0,T(E),A(E)),x!==void 0&&E>=x?C.next(E-x):(!R&&T(E),p)}}}function U_(e,t,n){const r=[],i=n||Nt.mix||Sh,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||ut:t;s=Ar(c,s)}r.push(s)}return r}function z_(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Ss(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=U_(t,r,i),c=s.length,l=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Or(e[f],e[f+1],d);return s[f](p)};return n?d=>l(Vt(e[0],e[o-1],d)):l}function W_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Or(0,t,r);e.push(Te(n,1,i))}}function J_(e){const t=[0];return W_(t,e.length-1),t}function q_(e,t){return e.map(n=>n*t)}function H_(e,t){return e.map(()=>t||ch).splice(0,e.length-1)}function Vr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=i_(r)?r.map(uh):uh(r),o={done:!1,value:t[0]},a=q_(n&&n.length===t.length?n:J_(t),e),s=z_(a,t,{ease:Array.isArray(i)?i:H_(t,i)});return{calculatedDuration:e,next:c=>(o.value=s(c),o.done=c>=e,o)}}const G_=e=>e!==null;function zs(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(G_),s=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const K_={decay:Us,inertia:Us,tween:Vr,keyframes:Vr,spring:ao};function Ch(e){typeof e.type=="string"&&(e.type=K_[e.type])}class Ws{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 Y_=e=>e/100;class Js extends Ws{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Ye.now()&&this.tick(Ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ch(t);const{type:n=Vr,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=t;let{keyframes:s}=t;const c=n||Vr;c!==Vr&&typeof s[0]!="number"&&(this.mixKeyframes=Ar(Y_,Sh(s[0],s[1])),s=[0,100]);const l=c({...t,keyframes:s});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...s].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=Fs(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,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:i,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:d,repeat:f,repeatType:p,repeatDelay:g,type:y,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const _=this.currentTime-l*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let M=this.currentTime,T=r;if(f){const E=Math.min(this.currentTime,i)/s;let R=Math.floor(E),B=E%1;!B&&E>=1&&(B=1),B===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(p==="reverse"?(B=1-B,g&&(B-=g/s)):p==="mirror"&&(T=a)),M=Vt(0,1,B)*s}const x=k?{done:!1,value:d[0]}:T.next(M);o&&(x.value=o(x.value));let{done:C}=x;!k&&c!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return A&&y!==Us&&(x.value=zs(d,this.options,b,this.speed)),v&&v(x.value),A&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return dt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+dt(t)}get time(){return dt(this.currentTime)}set time(t){t=Ct(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),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ye.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=dt(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=D_,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();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(Ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}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){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function X_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const kn=e=>e*180/Math.PI,qs=e=>{const t=kn(Math.atan2(e[1],e[0]));return Hs(t)},Q_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qs,rotateZ:qs,skewX:e=>kn(Math.atan(e[1])),skewY:e=>kn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Hs=e=>(e=e%360,e<0&&(e+=360),e),Ph=qs,Eh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ah=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Z_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Eh,scaleY:Ah,scale:e=>(Eh(e)+Ah(e))/2,rotateX:e=>Hs(kn(Math.atan2(e[6],e[5]))),rotateY:e=>Hs(kn(Math.atan2(-e[2],e[0]))),rotateZ:Ph,rotate:Ph,skewX:e=>kn(Math.atan(e[4])),skewY:e=>kn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Gs(e){return e.includes("scale")?1:0}function Ks(e,t){if(!e||e==="none")return Gs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Z_,i=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Q_,i=s}if(!i)return Gs(t);const o=r[t],a=i[1].split(",").map(tw);return typeof o=="function"?o(a):a[o]}const ew=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ks(n,t)};function tw(e){return parseFloat(e.trim())}const Xn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qn=new Set(Xn),Oh=e=>e===Kn||e===G,nw=new Set(["x","y","z"]),rw=Xn.filter(e=>!nw.has(e));function iw(e){const t=[];return rw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Sn={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})=>Ks(t,"x"),y:(e,{transform:t})=>Ks(t,"y")};Sn.translateX=Sn.x,Sn.translateY=Sn.y;const xn=new Set;let Ys=!1,Xs=!1,Qs=!1;function Ih(){if(Xs){const e=Array.from(xn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=iw(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{r.getValue(o)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Xs=!1,Ys=!1,xn.forEach(e=>e.complete(Qs)),xn.clear()}function Dh(){xn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xs=!0)})}function ow(){Qs=!0,Dh(),Ih(),Qs=!1}class Zs{constructor(t,n,r,i,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(xn.add(this),Ys||(Ys=!0,Se.read(Dh),Se.resolveKeyframes(Ih))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}X_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),xn.delete(this)}cancel(){this.state==="scheduled"&&(xn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const aw=e=>e.startsWith("--");function sw(e,t,n){aw(t)?e.style.setProperty(t,n):e.style[t]=n}const cw=xs(()=>window.ScrollTimeline!==void 0),lw={};function uw(e,t){const n=xs(e);return()=>lw[t]??n()}const Lh=uw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nr([0,.65,.55,1]),circOut:Nr([.55,0,1,.45]),backIn:Nr([.31,.01,.66,-.59]),backOut:Nr([.33,1.53,.69,.99])};function Rh(e,t){if(e)return typeof e=="function"?Lh()?xh(e,t):"ease-out":lh(e)?Nr(e):Array.isArray(e)?e.map(n=>Rh(n,t)||jh.easeOut):jh[e]}function dw(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const d={[t]:n};c&&(d.offset=c);const f=Rh(s,i);Array.isArray(f)&&(d.easing=f);const p={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return l&&(p.pseudoElement=l),e.animate(d,p)}function Vh(e){return typeof e=="function"&&"applyToOptions"in e}function fw({type:e,...t}){return Vh(e)&&Lh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class hw extends Ws{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:s,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,Ss(typeof t.type!="string");const l=fw(t);this.animation=dw(n,r,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=zs(i,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(d):sw(n,r,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return dt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+dt(t)}get time(){return dt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ct(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}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&cw()?(this.animation.timeline=t,ut):n(this)}}const Nh={anticipate:oh,backInOut:ih,circInOut:sh};function pw(e){return e in Nh}function mw(e){typeof e.ease=="string"&&pw(e.ease)&&(e.ease=Nh[e.ease])}const Fh=10;class gw extends hw{constructor(t){mw(t),Ch(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Js({...a,autoplay:!1}),c=Ct(this.finishedTime??this.time);n.setWithVelocity(s.sample(c-Fh).value,s.sample(c).value,Fh),s.stop()}}const Bh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Yt.test(e)||e==="0")&&!e.startsWith("url("));function vw(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 yw(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Bh(i,t),s=Bh(o,t);return!a||!s?!1:vw(e)||(n==="spring"||Vh(n))&&r}function ec(e){e.duration=0,e.type="keyframes"}const bw=new Set(["opacity","clipPath","filter","transform"]),_w=xs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ww(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return _w()&&n&&bw.has(n)&&(n!=="transform"||!l)&&!c&&!r&&i!=="mirror"&&o!==0&&a!=="inertia"}const kw=40;class Sw extends Ws{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",keyframes:s,name:c,motionValue:l,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ye.now();const p={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,name:c,motionValue:l,element:d,...f},g=d?.KeyframeResolver||Zs;this.keyframeResolver=new g(s,(y,v,b)=>this.onKeyframesResolved(y,v,p,!b),c,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:a,velocity:s,delay:c,isHandoff:l,onUpdate:d}=r;this.resolvedAt=Ye.now(),yw(t,o,a,s)||((Nt.instantAnimations||!c)&&d?.(zs(t,r,n)),t[0]=t[t.length-1],ec(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>kw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!l&&ww(p)?new gw({...p,element:p.motionValue.owner.current}):new Js(p);g.finished.then(()=>this.notifyFinished()).catch(ut),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(){return this._animation||(this.keyframeResolver?.resume(),ow()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const xw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Tw(e){const t=xw.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function $h(e,t,n=1){const[r,i]=Tw(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return Yf(a)?parseFloat(a):a}return As(i)?$h(i,t,n+1):i}function tc(e,t){return e?.[t]??e?.default??e}const Uh=new Set(["width","height","top","left","right","bottom",...Xn]),Mw={test:e=>e==="auto",parse:e=>e},zh=e=>t=>t.test(e),Wh=[Kn,G,Pt,Kt,v_,g_,Mw],Jh=e=>Wh.find(zh(e));function Cw(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Qf(e):!0}const Pw=new Set(["brightness","contrast","saturate","opacity"]);function Ew(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Os)||[];if(!r)return e;const i=n.replace(r,"");let o=Pw.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Aw=/\b([a-z-]*)\(.*?\)/gu,nc={...Yt,getAnimatableNone:e=>{const t=e.match(Aw);return t?t.map(Ew).join(" "):e}},qh={...Kn,transform:Math.round},rc={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,backgroundPositionX:G,backgroundPositionY:G,...{rotate:Kt,rotateX:Kt,rotateY:Kt,rotateZ:Kt,scale:ro,scaleX:ro,scaleY:ro,scaleZ:ro,skew:Kt,skewX:Kt,skewY:Kt,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Dr,originX:ph,originY:ph,originZ:G},zIndex:qh,fillOpacity:Dr,strokeOpacity:Dr,numOctaves:qh},Ow={...rc,color:Ee,backgroundColor:Ee,outlineColor:Ee,fill:Ee,stroke:Ee,borderColor:Ee,borderTopColor:Ee,borderRightColor:Ee,borderBottomColor:Ee,borderLeftColor:Ee,filter:nc,WebkitFilter:nc},Hh=e=>Ow[e];function Gh(e,t){let n=Hh(e);return n!==nc&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Iw=new Set(["auto","none","0"]);function Dw(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!Iw.has(o)&&Rr(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Gh(n,i)}class Lw extends Zs{constructor(t,n,r,i,o){super(t,n,r,i,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(),As(l))){const d=$h(l,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Uh.has(r)||t.length!==2)return;const[i,o]=t,a=Jh(i),s=Jh(o);if(a!==s)if(Oh(a)&&Oh(s))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Sn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Cw(t[i]))&&r.push(i);r.length&&Dw(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=Sn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,a=r[o];r[o]=Sn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,c])=>{t.getValue(s).set(c)}),this.resolveNoneKeyframes()}}function jw(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Kh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Rw(e){return Xf(e)&&"offsetHeight"in e}const Yh=30,Vw=e=>!isNaN(parseFloat(e));class Nw{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=Ye.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Vw(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ts);const r=this.events[t].add(n);return t==="change"?()=>{r(),Se.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(){this.events.change?.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=Ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Yh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Yh);return Zf(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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zn(e,t){return new Nw(e,t)}const{schedule:ic}=dh(queueMicrotask,!1),kt={x:!1,y:!1};function Xh(){return kt.x||kt.y}function Fw(e){return e==="x"||e==="y"?kt[e]?null:(kt[e]=!0,()=>{kt[e]=!1}):kt.x||kt.y?null:(kt.x=kt.y=!0,()=>{kt.x=kt.y=!1})}function Qh(e,t){const n=jw(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Zh(e){return!(e.pointerType==="touch"||Xh())}function Bw(e,t,n={}){const[r,i,o]=Qh(e,n),a=s=>{if(!Zh(s))return;const{target:c}=s,l=t(c,s);if(typeof l!="function"||!c)return;const d=f=>{Zh(f)&&(l(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,i)};return r.forEach(s=>{s.addEventListener("pointerenter",a,i)}),o}const ep=(e,t)=>t?e===t?!0:ep(e,t.parentElement):!1,oc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,$w=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Uw(e){return $w.has(e.tagName)||e.tabIndex!==-1}const so=new WeakSet;function tp(e){return t=>{t.key==="Enter"&&e(t)}}function ac(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const zw=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=tp(()=>{if(so.has(n))return;ac(n,"down");const i=tp(()=>{ac(n,"up")}),o=()=>ac(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function np(e){return oc(e)&&!Xh()}function Ww(e,t,n={}){const[r,i,o]=Qh(e,n),a=s=>{const c=s.currentTarget;if(!np(s))return;so.add(c);const l=t(c,s),d=(g,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),so.has(c)&&so.delete(c),np(g)&&typeof l=="function"&&l(g,{success:y})},f=g=>{d(g,c===window||c===document||n.useGlobalTarget||ep(c,g.target))},p=g=>{d(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",p,i)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,i),Rw(s)&&(s.addEventListener("focus",l=>zw(l,i)),!Uw(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),o}function rp(e){return Xf(e)&&"ownerSVGElement"in e}function Jw(e){return rp(e)&&e.tagName==="svg"}const We=e=>!!(e&&e.getVelocity),qw=[...Wh,Ee,Yt],Hw=e=>qw.find(zh(e)),ip=Ie({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Gw(e=!0){const t=ge(_s);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=Io();Q(()=>{if(e)return i(o)},[e]);const a=N(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const op=Ie({strict:!1}),ap={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"]},er={};for(const e in ap)er[e]={isEnabled:t=>ap[e].some(n=>!!t[n])};function Kw(e){for(const t in e)er[t]={...er[t],...e[t]}}const Yw=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 co(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Yw.has(e)}let sp=e=>!co(e);function Xw(e){typeof e=="function"&&(sp=t=>t.startsWith("on")?!co(t):e(t))}try{Xw(require("@emotion/is-prop-valid").default)}catch{}function Qw(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(sp(i)||n===!0&&co(i)||!t&&!co(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const lo=Ie({});function uo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fr(e){return typeof e=="string"||Array.isArray(e)}const sc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cc=["initial",...sc];function fo(e){return uo(e.animate)||cc.some(t=>Fr(e[t]))}function cp(e){return!!(fo(e)||e.variants)}function Zw(e,t){if(fo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fr(n)?n:void 0,animate:Fr(r)?r:void 0}}return e.inherit!==!1?t:{}}function ek(e){const{initial:t,animate:n}=Zw(e,ge(lo));return Ne(()=>({initial:t,animate:n}),[lp(t),lp(n)])}function lp(e){return Array.isArray(e)?e.join(" "):e}const Br={};function tk(e){for(const t in e)Br[t]=e[t],Es(t)&&(Br[t].isCSSVariable=!0)}function up(e,{layout:t,layoutId:n}){return Qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Br[e]||e==="opacity")}const nk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rk=Xn.length;function ik(e,t,n){let r="",i=!0;for(let o=0;o<rk;o++){const a=Xn[o],s=e[a];if(s===void 0)continue;let c=!0;if(typeof s=="number"?c=s===(a.startsWith("scale")?1:0):c=parseFloat(s)===0,!c||n){const l=Kh(s,rc[a]);if(!c){i=!1;const d=nk[a]||a;r+=`${d}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function lc(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const c in t){const l=t[c];if(Qn.has(c)){a=!0;continue}else if(Es(c)){i[c]=l;continue}else{const d=Kh(l,rc[c]);c.startsWith("origin")?(s=!0,o[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=ik(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:l="50%",originZ:d=0}=o;r.transformOrigin=`${c} ${l} ${d}`}}const uc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dp(e,t,n){for(const r in t)!We(t[r])&&!up(r,n)&&(e[r]=t[r])}function ok({transformTemplate:e},t){return Ne(()=>{const n=uc();return lc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ak(e,t){const n=e.style||{},r={};return dp(r,n,e),Object.assign(r,ok(e,t)),r}function sk(e,t){const n={},r=ak(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 ck={offset:"stroke-dashoffset",array:"stroke-dasharray"},lk={offset:"strokeDashoffset",array:"strokeDasharray"};function uk(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ck:lk;e[o.offset]=G.transform(-r);const a=G.transform(t),s=G.transform(n);e[o.array]=`${a} ${s}`}function fp(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},c,l,d){if(lc(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p}=e;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=d?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&uk(f,i,o,a,!1)}const hp=()=>({...uc(),attrs:{}}),pp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function dk(e,t,n,r){const i=Ne(()=>{const o=hp();return fp(o,t,pp(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};dp(o,e.style,e),i.style={...o,...i.style}}return i}const fk=["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 dc(e){return typeof e!="string"||e.includes("-")?!1:!!(fk.indexOf(e)>-1||/[A-Z]/u.test(e))}function hk(e,t,n,{latestValues:r},i,o=!1){const s=(dc(e)?dk:sk)(t,r,i,e),c=Qw(t,typeof e=="string",o),l=e!==Ke?{...c,...s,ref:n}:{},{children:d}=t,f=Ne(()=>We(d)?d.get():d,[d]);return ce(e,{...l,children:f})}function mp(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function fc(e,t,n,r){if(typeof t=="function"){const[i,o]=mp(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=mp(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function ho(e){return We(e)?e.get():e}function pk({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:mk(n,r,i,e),renderState:t()}}function mk(e,t,n,r){const i={},o=r(e,{});for(const p in o)i[p]=ho(o[p]);let{initial:a,animate:s}=e;const c=fo(e),l=cp(e);t&&l&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?s:a;if(f&&typeof f!="boolean"&&!uo(f)){const p=Array.isArray(f)?f:[f];for(let g=0;g<p.length;g++){const y=fc(e,p[g]);if(y){const{transitionEnd:v,transition:b,..._}=y;for(const k in _){let M=_[k];if(Array.isArray(M)){const T=d?M.length-1:0;M=M[T]}M!==null&&(i[k]=M)}for(const k in v)i[k]=v[k]}}}return i}const gp=e=>(t,n)=>{const r=ge(lo),i=ge(_s),o=()=>pk(e,t,r,i);return n?o():Y0(o)};function hc(e,t,n){const{style:r}=e,i={};for(const o in r)(We(r[o])||t.style&&We(t.style[o])||up(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}const gk=gp({scrapeMotionValuesFromProps:hc,createRenderState:uc});function vp(e,t,n){const r=hc(e,t,n);for(const i in e)if(We(e[i])||We(t[i])){const o=Xn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const vk=gp({scrapeMotionValuesFromProps:vp,createRenderState:hp}),yk=Symbol.for("motionComponentSymbol");function tr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bk(e,t,n){return N(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):tr(n)&&(n.current=r))},[t])}const pc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yp="data-"+pc("framerAppearId"),bp=Ie({});function _k(e,t,n,r,i){const{visualElement:o}=ge(lo),a=ge(op),s=ge(_s),c=ge(ip).reducedMotion,l=de(null);r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));const d=l.current,f=ge(bp);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&wk(l.current,n,i,f);const p=de(!1);Fo(()=>{d&&p.current&&d.update(n,s)});const g=n[yp],y=de(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return X0(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),y.current&&d.animationState&&d.animationState.animateChanges())}),Q(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),d.enteringChildren=void 0)}),d}function wk(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:_p(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&tr(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l})}function _p(e){if(e)return e.options.allowProjection!==!1?e.projection:_p(e.parent)}function mc(e,{forwardMotionProps:t=!1}={},n,r){n&&Kw(n);const i=dc(e)?vk:gk;function o(s,c){let l;const d={...ge(ip),...s,layoutId:kk(s)},{isStatic:f}=d,p=ek(s),g=i(s,f);if(!f&&bs){Sk();const y=xk(d);l=y.MeasureLayout,p.visualElement=_k(e,g,d,r,y.ProjectionNode)}return O(lo.Provider,{value:p,children:[l&&p.visualElement?O(l,{visualElement:p.visualElement,...d}):null,hk(e,s,bk(g,p.visualElement,c),g,f,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=it(o);return a[yk]=e,a}function kk({layoutId:e}){const t=ge(Kf).id;return t&&e!==void 0?t+"-"+e:e}function Sk(e,t){ge(op).strict}function xk(e){const{drag:t,layout:n}=er;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Tk(e,t){if(typeof Proxy>"u")return mc;const n=new Map,r=(o,a)=>mc(o,a,e,t),i=(o,a)=>r(o,a);return new Proxy(i,{get:(o,a)=>a==="create"?r:(n.has(a)||n.set(a,mc(a,void 0,e,t)),n.get(a))})}function wp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Mk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ck(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 gc(e){return e===void 0||e===1}function vc({scale:e,scaleX:t,scaleY:n}){return!gc(e)||!gc(t)||!gc(n)}function Tn(e){return vc(e)||kp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kp(e){return Sp(e.x)||Sp(e.y)}function Sp(e){return e&&e!=="0%"}function po(e,t,n){const r=e-n,i=t*r;return n+i}function xp(e,t,n,r,i){return i!==void 0&&(e=po(e,i,r)),po(e,n,r)+t}function yc(e,t=0,n=1,r,i){e.min=xp(e.min,t,n,r,i),e.max=xp(e.max,t,n,r,i)}function Tp(e,{x:t,y:n}){yc(e.x,t.translate,t.scale,t.originPoint),yc(e.y,n.translate,n.scale,n.originPoint)}const Mp=.999999999999,Cp=1.0000000000001;function Pk(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=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&&rr(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Tp(e,a)),r&&Tn(o.latestValues)&&rr(e,o.latestValues))}t.x<Cp&&t.x>Mp&&(t.x=1),t.y<Cp&&t.y>Mp&&(t.y=1)}function nr(e,t){e.min=e.min+t,e.max=e.max+t}function Pp(e,t,n,r,i=.5){const o=Te(e.min,e.max,i);yc(e,t,n,o,r)}function rr(e,t){Pp(e.x,t.x,t.scaleX,t.scale,t.originX),Pp(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ep(e,t){return wp(Ck(e.getBoundingClientRect(),t))}function Ek(e,t,n){const r=Ep(e,n),{scroll:i}=t;return i&&(nr(r.x,i.offset.x),nr(r.y,i.offset.y)),r}const Ap=()=>({translate:0,scale:1,origin:0,originPoint:0}),ir=()=>({x:Ap(),y:Ap()}),Op=()=>({min:0,max:0}),Pe=()=>({x:Op(),y:Op()}),bc={current:null},Ip={current:!1};function Ak(){if(Ip.current=!0,!!bs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>bc.current=e.matches;e.addEventListener("change",t),t()}else bc.current=!1}const Ok=new WeakMap;function Ik(e,t,n){for(const r in t){const i=t[r],o=n[r];if(We(i))e.addValue(r,i);else if(We(o))e.addValue(r,Zn(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,Zn(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Dp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Dk{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zs,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=Ye.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Se.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;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=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=fo(n),this.isVariantNode=cp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const g=f[p];c[p]!==void 0&&We(g)&&g.set(c[p])}}mount(t){this.current=t,Ok.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((n,r)=>this.bindToMotionValue(r,n)),Ip.current||Ak(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:bc.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Gt(this.notifyUpdate),Gt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.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=Qn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Se.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,()=>{i(),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 er){const n=er[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(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):Pe()}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<Dp.length;r++){const i=Dp[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Ik(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=Zn(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"&&(Yf(r)||Qf(r))?r=parseFloat(r):!Hw(r)&&Yt.test(n)&&(r=Gh(t,n)),this.setBaseTarget(t,We(r)?r.get():r)),We(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=fc(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!We(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ts),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ic.render(this.render)}}class Lp extends Dk{constructor(){super(...arguments),this.KeyframeResolver=Lw}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;We(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function jp(e,{style:t,vars:n},r,i){const o=e.style;let a;for(a in t)o[a]=t[a];i?.applyProjectionStyles(o,r);for(a in n)o.setProperty(a,n[a])}function Lk(e){return window.getComputedStyle(e)}class jk extends Lp{constructor(){super(...arguments),this.type="html",this.renderInstance=jp}readValueFromInstance(t,n){if(Qn.has(n))return this.projection?.isProjecting?Gs(n):ew(t,n);{const r=Lk(t),i=(Es(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ep(t,n)}build(t,n,r){lc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return hc(t,n,r)}}const Rp=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 Rk(e,t,n,r){jp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Rp.has(i)?i:pc(i),t.attrs[i])}class Vk extends Lp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qn.has(n)){const r=Hh(n);return r&&r.default||0}return n=Rp.has(n)?n:pc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return vp(t,n,r)}build(t,n,r){fp(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){Rk(t,n,r,i)}mount(t){this.isSVGTag=pp(t.tagName),super.mount(t)}}const Nk=(e,t)=>dc(e)?new Vk(t):new jk(t,{allowProjection:e!==Ke});function or(e,t,n){const r=e.getProps();return fc(r,t,n!==void 0?n:r.custom,e)}const _c=e=>Array.isArray(e);function Fk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zn(n))}function Bk(e){return _c(e)?e[e.length-1]||0:e}function $k(e,t){const n=or(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=Bk(o[a]);Fk(e,a,s)}}function Uk(e){return!!(We(e)&&e.add)}function wc(e,t){const n=e.getValue("willChange");if(Uk(n))return n.add(t);if(!n&&Nt.WillChange){const r=new Nt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Vp(e){return e.props[yp]}const zk=e=>e!==null;function Wk(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(zk),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Jk={type:"spring",stiffness:500,damping:25,restSpeed:10},qk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Hk={type:"keyframes",duration:.8},Gk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kk=(e,{keyframes:t})=>t.length>2?Hk:Qn.has(e)?e.startsWith("scale")?qk(t[1]):Jk:Gk;function Yk({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...d}){return!!Object.keys(d).length}const kc=(e,t,n,r={},i,o)=>a=>{const s=tc(r,e)||{},c=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ct(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};Yk(s)||Object.assign(d,Kk(e,d)),d.duration&&(d.duration=Ct(d.duration)),d.repeatDelay&&(d.repeatDelay=Ct(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(ec(d),d.delay===0&&(f=!0)),(Nt.instantAnimations||Nt.skipAnimations)&&(f=!0,ec(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,f&&!o&&t.get()!==void 0){const p=Wk(d.keyframes,s);if(p!==void 0){Se.update(()=>{d.onUpdate(p),d.onComplete()});return}}return s.isSync?new Js(d):new Sw(d)};function Xk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Np(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(o=r);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const d in s){const f=e.getValue(d,e.latestValues[d]??null),p=s[d];if(p===void 0||l&&Xk(l,d))continue;const g={delay:n,...tc(o||{},d)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===y&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const _=Vp(e);if(_){const k=window.MotionHandoffAnimation(_,d,Se);k!==null&&(g.startTime=k,v=!0)}}wc(e,d),f.start(kc(d,f,p,e.shouldReduceMotion&&Uh.has(d)?{type:!1}:g,e,v));const b=f.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{Se.update(()=>{a&&$k(e,a)})}),c}function Fp(e,t,n,r=0,i=1){const o=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(o,a):i===1?o*r:s-o*r}function Sc(e,t,n={}){const r=or(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Np(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=i;return Qk(e,t,c,l,d,f,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[c,l]=s==="beforeChildren"?[o,a]:[a,o];return c().then(()=>l())}else return Promise.all([o(),a(n.delay)])}function Qk(e,t,n=0,r=0,i=0,o=1,a){const s=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),s.push(Sc(c,t,{...a,delay:n+(typeof r=="function"?0:r)+Fp(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(s)}function Zk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Sc(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Sc(e,t,n);else{const i=typeof t=="function"?or(e,t,n.custom):t;r=Promise.all(Np(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Bp(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 eS=cc.length;function $p(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$p(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<eS;n++){const r=cc[n],i=e.props[r];(Fr(i)||i===!1)&&(t[r]=i)}return t}const tS=[...sc].reverse(),nS=sc.length;function rS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Zk(e,n,r)))}function iS(e){let t=rS(e),n=Up(),r=!0;const i=c=>(l,d)=>{const f=or(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:g,...y}=f;l={...l,...y,...g}}return l};function o(c){t=c(e)}function a(c){const{props:l}=e,d=$p(e.parent)||{},f=[],p=new Set;let g={},y=1/0;for(let b=0;b<nS;b++){const _=tS[b],k=n[_],M=l[_]!==void 0?l[_]:d[_],T=Fr(M),x=_===c?k.isActive:null;x===!1&&(y=b);let C=M===d[_]&&M!==l[_]&&T;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),k.protectedKeys={...g},!k.isActive&&x===null||!M&&!k.prevProp||uo(M)||typeof M=="boolean")continue;const A=oS(k.prevProp,M);let E=A||_===c&&k.isActive&&!C&&T||b>y&&T,R=!1;const B=Array.isArray(M)?M:[M];let V=B.reduce(i(_),{});x===!1&&(V={});const{prevResolvedValues:z={}}=k,j={...z,...V},X=J=>{E=!0,p.has(J)&&(R=!0,p.delete(J)),k.needsAnimating[J]=!0;const F=e.getValue(J);F&&(F.liveStyle=!1)};for(const J in j){const F=V[J],q=z[J];if(g.hasOwnProperty(J))continue;let H=!1;_c(F)&&_c(q)?H=!Bp(F,q):H=F!==q,H?F!=null?X(J):p.add(J):F!==void 0&&p.has(J)?X(J):k.protectedKeys[J]=!0}k.prevProp=M,k.prevResolvedValues=V,k.isActive&&(g={...g,...V}),r&&e.blockInitialAnimation&&(E=!1);const ie=C&&A;E&&(!ie||R)&&f.push(...B.map(J=>{const F={type:_};if(typeof J=="string"&&r&&!ie&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,H=or(q,J);if(q.enteringChildren&&H){const{delayChildren:we}=H.transition||{};F.delay=Fp(q.enteringChildren,e,we)}}return{animation:J,options:F}}))}if(p.size){const b={};if(typeof l.initial!="boolean"){const _=or(e,Array.isArray(l.initial)?l.initial[0]:l.initial);_&&_.transition&&(b.transition=_.transition)}p.forEach(_=>{const k=e.getBaseTarget(_),M=e.getValue(_);M&&(M.liveStyle=!0),b[_]=k??null}),f.push({animation:b})}let v=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function s(c,l){if(n[c].isActive===l)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Up()}}}function oS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Bp(t,e):!1}function Mn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Up(){return{animate:Mn(!0),whileInView:Mn(),whileHover:Mn(),whileTap:Mn(),whileDrag:Mn(),whileFocus:Mn(),exit:Mn()}}class Xt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class aS extends Xt{constructor(t){super(t),t.animationState||(t.animationState=iS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();uo(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(){this.node.animationState.reset(),this.unmountControls?.()}}let sS=0;class cS extends Xt{constructor(){super(...arguments),this.id=sS++}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 i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 lS={animation:{Feature:aS},exit:{Feature:cS}};function $r(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ur(e){return{point:{x:e.pageX,y:e.pageY}}}const uS=e=>t=>oc(t)&&e(t,Ur(t));function zr(e,t,n,r){return $r(e,t,uS(n),r)}const zp=1e-4,dS=1-zp,fS=1+zp,Wp=.01,hS=0-Wp,pS=0+Wp;function Ge(e){return e.max-e.min}function mS(e,t,n){return Math.abs(e-t)<=n}function Jp(e,t,n,r=.5){e.origin=r,e.originPoint=Te(t.min,t.max,e.origin),e.scale=Ge(n)/Ge(t),e.translate=Te(n.min,n.max,e.origin)-e.originPoint,(e.scale>=dS&&e.scale<=fS||isNaN(e.scale))&&(e.scale=1),(e.translate>=hS&&e.translate<=pS||isNaN(e.translate))&&(e.translate=0)}function Wr(e,t,n,r){Jp(e.x,t.x,n.x,r?r.originX:void 0),Jp(e.y,t.y,n.y,r?r.originY:void 0)}function qp(e,t,n){e.min=n.min+t.min,e.max=e.min+Ge(t)}function gS(e,t,n){qp(e.x,t.x,n.x),qp(e.y,t.y,n.y)}function Hp(e,t,n){e.min=t.min-n.min,e.max=e.min+Ge(t)}function Jr(e,t,n){Hp(e.x,t.x,n.x),Hp(e.y,t.y,n.y)}function ft(e){return[e("x"),e("y")]}const Gp=({current:e})=>e?e.ownerDocument.defaultView:null,Kp=(e,t)=>Math.abs(e-t);function vS(e,t){const n=Kp(e.x,t.x),r=Kp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Yp{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:a=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=Tc(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=vS(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:v}=p,{timestamp:b}=Ve;this.history.push({...v,timestamp:b});const{onStart:_,onMove:k}=this.handlers;g||(_&&_(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=xc(g,this.transformPagePoint),Se.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Tc(p.type==="pointercancel"?this.lastMoveEventInfo:xc(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,_),v&&v(p,_)},!oc(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const s=Ur(t),c=xc(s,this.transformPagePoint),{point:l}=c,{timestamp:d}=Ve;this.history=[{...l,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Tc(c,this.history)),this.removeListeners=Ar(zr(this.contextWindow,"pointermove",this.handlePointerMove),zr(this.contextWindow,"pointerup",this.handlePointerUp),zr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Gt(this.updatePoint)}}function xc(e,t){return t?{point:t(e.point)}:e}function Xp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Tc({point:e},t){return{point:e,delta:Xp(e,Qp(t)),offset:Xp(e,yS(t)),velocity:bS(t,.1)}}function yS(e){return e[0]}function Qp(e){return e[e.length-1]}function bS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Qp(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ct(t)));)n--;if(!r)return{x:0,y:0};const o=dt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function _S(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Te(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Te(n,e,r.max):Math.min(e,n)),e}function Zp(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 wS(e,{top:t,left:n,bottom:r,right:i}){return{x:Zp(e.x,n,i),y:Zp(e.y,t,r)}}function em(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 kS(e,t){return{x:em(e.x,t.x),y:em(e.y,t.y)}}function SS(e,t){let n=.5;const r=Ge(e),i=Ge(t);return i>r?n=Or(t.min,t.max-r,e.min):r>i&&(n=Or(e.min,e.max-i,t.min)),Vt(0,1,n)}function xS(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 Mc=.35;function TS(e=Mc){return e===!1?e=0:e===!0&&(e=Mc),{x:tm(e,"left","right"),y:tm(e,"top","bottom")}}function tm(e,t,n){return{min:nm(e,t),max:nm(e,n)}}function nm(e,t){return typeof e=="number"?e:e[t]||0}const MS=new WeakMap;class CS{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=Pe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ur(f).point)},a=(f,p)=>{const{drag:g,dragPropagation:y,onDragStart:v}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fw(g),!this.openDragLock))return;this.latestPointerEvent=f,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),ft(_=>{let k=this.getAxisMotionValue(_).get()||0;if(Pt.test(k)){const{projection:M}=this.visualElement;if(M&&M.layout){const T=M.layout.layoutBox[_];T&&(k=Ge(T)*(parseFloat(k)/100))}}this.originPoint[_]=k}),v&&Se.postRender(()=>v(f,p)),wc(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:v,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:_}=p;if(y&&this.currentDirection===null){this.currentDirection=PS(_),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",p.point,_),this.updateAxis("y",p.point,_),this.visualElement.render(),b&&b(f,p)},c=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>ft(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Yp(t,{onSessionStart:o,onStart:a,onMove:s,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Gp(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&Se.postRender(()=>s(r,i))}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:i}=this.getProps();if(!r||!mo(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=_S(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&tr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=wS(r.layoutBox,t):this.constraints=!1,this.elastic=TS(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ft(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=xS(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Ek(r,i.root,this.visualElement.getTransformPagePoint());let a=kS(i.layout.layoutBox,o);if(n){const s=n(Mk(a));this.hasMutatedConstraints=!!s,s&&(a=wp(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=ft(d=>{if(!mo(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const p=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wc(this.visualElement,t),r.start(kc(t,r,0,n,this.visualElement,!1))}stopAnimation(){ft(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ft(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ft(n=>{const{drag:r}=this.getProps();if(!mo(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Te(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!tr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ft(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const c=s.get();i[a]=SS({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ft(a=>{if(!mo(a,t,null))return;const s=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];s.set(Te(c,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;MS.set(this.visualElement,this);const t=this.visualElement.current,n=zr(t,"pointerdown",c=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();tr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Se.read(r);const a=$r(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(ft(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=Mc,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function mo(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function PS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class ES extends Xt{constructor(t){super(t),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new CS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const rm=e=>(t,n)=>{e&&Se.postRender(()=>e(t,n))};class AS extends Xt{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(t){this.session=new Yp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Gp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:rm(t),onStart:rm(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Se.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=zr(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 go={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function im(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=im(e,t.target.x),r=im(e,t.target.y);return`${n}% ${r}%`}},OS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Yt.parse(e);if(i.length>5)return r;const o=Yt.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=c;const l=Te(s,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}};let Cc=!1;class IS extends mt{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;tk(DS),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Cc&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),go.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:a}=r;return a&&(a.isPresent=o,Cc=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Se.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ic.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Cc=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function om(e){const[t,n]=Gw(),r=ge(Kf);return O(IS,{...e,layoutGroup:r,switchLayoutGroup:ge(bp),isPresent:t,safeToRemove:n})}const DS={borderRadius:{...qr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qr,borderTopRightRadius:qr,borderBottomLeftRadius:qr,borderBottomRightRadius:qr,boxShadow:OS};function LS(e,t,n){const r=We(e)?e:Zn(e);return r.start(kc("",r,t,n)),r.animation}const jS=(e,t)=>e.depth-t.depth;class RS{constructor(){this.children=[],this.isDirty=!1}add(t){ws(this.children,t),this.isDirty=!0}remove(t){ks(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(jS),this.isDirty=!1,this.children.forEach(t)}}function VS(e,t){const n=Ye.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Gt(r),e(o-t))};return Se.setup(r,!0),()=>Gt(r)}const am=["TopLeft","TopRight","BottomLeft","BottomRight"],NS=am.length,sm=e=>typeof e=="string"?parseFloat(e):e,cm=e=>typeof e=="number"||G.test(e);function FS(e,t,n,r,i,o){i?(e.opacity=Te(0,n.opacity??1,BS(r)),e.opacityExit=Te(t.opacity??1,0,$S(r))):o&&(e.opacity=Te(t.opacity??1,n.opacity??1,r));for(let a=0;a<NS;a++){const s=`border${am[a]}Radius`;let c=lm(t,s),l=lm(n,s);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||cm(c)===cm(l)?(e[s]=Math.max(Te(sm(c),sm(l),r),0),(Pt.test(l)||Pt.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=Te(t.rotate||0,n.rotate||0,r))}function lm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const BS=um(0,.5,ah),$S=um(.5,.95,ut);function um(e,t,n){return r=>r<e?0:r>t?1:n(Or(e,t,r))}function dm(e,t){e.min=t.min,e.max=t.max}function ht(e,t){dm(e.x,t.x),dm(e.y,t.y)}function fm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function hm(e,t,n,r,i){return e-=t,e=po(e,1/n,r),i!==void 0&&(e=po(e,1/i,r)),e}function US(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pt.test(t)&&(t=parseFloat(t),t=Te(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Te(o.min,o.max,r);e===o&&(s-=t),e.min=hm(e.min,t,n,s,i),e.max=hm(e.max,t,n,s,i)}function pm(e,t,[n,r,i],o,a){US(e,t[n],t[r],t[i],t.scale,o,a)}const zS=["x","scaleX","originX"],WS=["y","scaleY","originY"];function mm(e,t,n,r){pm(e.x,t,zS,n?n.x:void 0,r?r.x:void 0),pm(e.y,t,WS,n?n.y:void 0,r?r.y:void 0)}function gm(e){return e.translate===0&&e.scale===1}function vm(e){return gm(e.x)&&gm(e.y)}function ym(e,t){return e.min===t.min&&e.max===t.max}function JS(e,t){return ym(e.x,t.x)&&ym(e.y,t.y)}function bm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _m(e,t){return bm(e.x,t.x)&&bm(e.y,t.y)}function wm(e){return Ge(e.x)/Ge(e.y)}function km(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class qS{constructor(){this.members=[]}add(t){ws(this.members,t),t.scheduleRender()}remove(t){if(ks(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(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];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:i}=t.options;i===!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 HS(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:d,rotateX:f,rotateY:p,skewX:g,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Pc=["","X","Y","Z"],GS=1e3;let KS=0;function Ec(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Sm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vp(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Se,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Sm(r)}function xm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t?.()){this.id=KS++,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(QS),this.nodes.forEach(n1),this.nodes.forEach(r1),this.nodes.forEach(ZS)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new RS)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Ts),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const c=this.eventHandlers.get(a);c&&c.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=rp(a)&&!Jw(a),this.instance=a;const{layoutId:s,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||s)&&(this.isLayoutDirty=!0),e){let d,f=0;const p=()=>this.root.updateBlockedByResize=!1;Se.read(()=>{f=window.innerWidth}),e(a,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,d&&d(),d=VS(p,250),go.hasAnimatedSinceResize&&(go.hasAnimatedSinceResize=!1,this.nodes.forEach(Cm)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&l&&(s||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||c1,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=l.getProps(),_=!this.targetLayout||!_m(this.targetLayout,g),k=!f&&p;if(this.options.layoutRoot||this.resumeFrom||k||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const M={...tc(y,"layout"),onPlay:v,onComplete:b};(l.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M),this.setAnimationOrigin(d,k)}else f||Cm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Gt(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(i1),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Sm(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Tm);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Mm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(t1),this.nodes.forEach(YS),this.nodes.forEach(XS)):this.nodes.forEach(Mm),this.clearAllSnapshots();const s=Ye.now();Ve.delta=Vt(0,16.666666666666668,s-Ve.timestamp),Ve.timestamp=s,Ve.isProcessing=!0,Ps.update.process(Ve),Ps.preRender.process(Ve),Ps.render.process(Ve),Ve.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ic.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(e1),this.sharedNodes.forEach(o1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ge(this.snapshot.measuredBox.x)&&!Ge(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 a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!vm(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;a&&this.instance&&(s||Tn(this.latestValues)||d)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return a&&(c=this.removeTransform(c)),l1(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Pe();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(u1))){const{scroll:l}=this.root;l&&(nr(s.x,l.offset.x),nr(s.y,l.offset.y))}return s}removeElementScroll(a){const s=Pe();if(ht(s,a),this.scroll?.wasRoot)return s;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ht(s,a),nr(s.x,d.offset.x),nr(s.y,d.offset.y))}return s}applyTransform(a,s=!1){const c=Pe();ht(c,a);for(let l=0;l<this.path.length;l++){const d=this.path[l];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&rr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Tn(d.latestValues)&&rr(c,d.latestValues)}return Tn(this.latestValues)&&rr(c,this.latestValues),c}removeTransform(a){const s=Pe();ht(s,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!Tn(l.latestValues))continue;vc(l.latestValues)&&l.updateSnapshot();const d=Pe(),f=l.measurePageBox();ht(d,f),mm(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return Tn(this.latestValues)&&mm(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Ve.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==s;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Ve.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Jr(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),ht(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ht(this.target,this.layout.layoutBox),Tp(this.target,this.targetDelta)):ht(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Jr(this.relativeTargetOrigin,this.target,p.target),ht(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||vc(this.parent.latestValues)||kp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ve.timestamp&&(c=!1),c)return;const{layout:l,layoutId:d}=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||d))return;ht(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;Pk(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Pe());const{target:g}=a;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fm(this.prevProjectionDelta.x,this.projectionDelta.x),fm(this.prevProjectionDelta.y,this.projectionDelta.y)),Wr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!km(this.projectionDelta.x,this.prevProjectionDelta.x)||!km(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ir(),this.projectionDelta=ir(),this.projectionDeltaWithTransform=ir()}setAnimationOrigin(a,s=!1){const c=this.snapshot,l=c?c.latestValues:{},d={...this.latestValues},f=ir();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=Pe(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=g!==y,b=this.getStack(),_=!b||b.members.length<=1,k=!!(v&&!_&&this.options.crossfade===!0&&!this.path.some(s1));this.animationProgress=0;let M;this.mixTargetDelta=T=>{const x=T/1e3;Pm(f.x,a.x,x),Pm(f.y,a.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jr(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),a1(this.relativeTarget,this.relativeTargetOrigin,p,x),M&&JS(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=Pe()),ht(M,this.relativeTarget)),v&&(this.animationValues=d,FS(d,l,this.latestValues,x,k,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Se.update(()=>{go.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zn(0)),this.currentAnimation=LS(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(GS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:c,layout:l,latestValues:d}=a;if(!(!s||!c||!l)){if(this!==a&&this.layout&&l&&Dm(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Pe();const f=Ge(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const p=Ge(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}ht(s,c),rr(s,d),Wr(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new qS),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const l={};c.z&&Ec("z",a,l,this.animationValues);for(let d=0;d<Pc.length;d++)Ec(`rotate${Pc[d]}`,a,l,this.animationValues),Ec(`skew${Pc[d]}`,a,l,this.animationValues);a.render();for(const d in l)a.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=ho(s?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=ho(s?.pointerEvents)||""),this.hasProjected&&!Tn(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=HS(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),a.transform=f;const{x:p,y:g}=this.projectionDelta;a.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,l.animationValues?a.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const y in Br){if(d[y]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:_}=Br[y],k=f==="none"?d[y]:v(d[y],l);if(b){const M=b.length;for(let T=0;T<M;T++)a[b[T]]=k}else _?this.options.visualElement.renderState.vars[y]=k:a[y]=k}this.options.layoutId&&(a.pointerEvents=l===this?ho(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Tm),this.root.sharedNodes.clear()}}}function YS(e){e.updateLayout()}function XS(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?ft(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],p=Ge(f);f.min=n[d].min,f.max=f.min+p}):Dm(i,t.layoutBox,n)&&ft(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],p=Ge(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=ir();Wr(a,n,t.layoutBox);const s=ir();o?Wr(s,e.applyTransform(r,!0),t.measuredBox):Wr(s,n,t.layoutBox);const c=!vm(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const g=Pe();Jr(g,t.layoutBox,f.layoutBox);const y=Pe();Jr(y,n,p.layoutBox),_m(g,y)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function QS(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 ZS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function e1(e){e.clearSnapshot()}function Tm(e){e.clearMeasurements()}function Mm(e){e.isLayoutDirty=!1}function t1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Cm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function n1(e){e.resolveTargetDelta()}function r1(e){e.calcProjection()}function i1(e){e.resetSkewAndRotation()}function o1(e){e.removeLeadSnapshot()}function Pm(e,t,n){e.translate=Te(t.translate,0,n),e.scale=Te(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Em(e,t,n,r){e.min=Te(t.min,n.min,r),e.max=Te(t.max,n.max,r)}function a1(e,t,n,r){Em(e.x,t.x,n.x,r),Em(e.y,t.y,n.y,r)}function s1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const c1={duration:.45,ease:[.4,0,.1,1]},Am=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Om=Am("applewebkit/")&&!Am("chrome/")?Math.round:ut;function Im(e){e.min=Om(e.min),e.max=Om(e.max)}function l1(e){Im(e.x),Im(e.y)}function Dm(e,t,n){return e==="position"||e==="preserve-aspect"&&!mS(wm(t),wm(n),.2)}function u1(e){return e!==e.root&&e.scroll?.wasRoot}const d1=xm({attachResizeListener:(e,t)=>$r(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ac={current:void 0},Lm=xm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ac.current){const e=new d1({});e.mount(window),e.setOptions({layoutScroll:!0}),Ac.current=e}return Ac.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),f1={pan:{Feature:AS},drag:{Feature:ES,ProjectionNode:Lm,MeasureLayout:om}};function jm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&Se.postRender(()=>o(t,Ur(t)))}class h1 extends Xt{mount(){const{current:t}=this.node;t&&(this.unmount=Bw(t,(n,r)=>(jm(this.node,r,"Start"),i=>jm(this.node,i,"End"))))}unmount(){}}class p1 extends Xt{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=Ar($r(this.node.current,"focus",()=>this.onFocus()),$r(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rm(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 i="onTap"+(n==="End"?"":n),o=r[i];o&&Se.postRender(()=>o(t,Ur(t)))}class m1 extends Xt{mount(){const{current:t}=this.node;t&&(this.unmount=Ww(t,(n,r)=>(Rm(this.node,r,"Start"),(i,{success:o})=>Rm(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Oc=new WeakMap,Ic=new WeakMap,g1=e=>{const t=Oc.get(e.target);t&&t(e)},v1=e=>{e.forEach(g1)};function y1({root:e,...t}){const n=e||document;Ic.has(n)||Ic.set(n,{});const r=Ic.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(v1,{root:e,...t})),r[i]}function b1(e,t,n){const r=y1(t);return Oc.set(e,n),r.observe(e),()=>{Oc.delete(e),r.unobserve(e)}}const _1={some:0,all:1};class w1 extends Xt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:_1[i]},s=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:d,onViewportLeave:f}=this.node.getProps(),p=l?d:f;p&&p(c)};return b1(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(k1(t,n))&&this.startObserver()}unmount(){}}function k1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const S1={...lS,...{inView:{Feature:w1},tap:{Feature:m1},focus:{Feature:p1},hover:{Feature:h1}},...f1,...{layout:{ProjectionNode:Lm,MeasureLayout:om}}},vo=Tk(S1,Nk);function x1(){const{agentData:e}=_n(),[t,n]=Z(0),r=96,i=1e4,{isMobileDevice:o}=ys();Q(()=>{const s=Date.now(),c=()=>{const l=Date.now()-s,d=Math.min(l/i*100,r);n(d),d<r&&requestAnimationFrame(c)};requestAnimationFrame(c)},[]);const a=e?.image_url;return O("div",{className:"absolute inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute inset-0 w-full h-full bg-black"}),a&&O("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center scale-125",style:{backgroundImage:`url(${a})`,filter:"blur(25px) brightness(0.5)"}}),O(vo.div,{initial:{filter:"blur(12px)",opacity:0},animate:{filter:"blur(0px)",opacity:1},transition:{duration:.2,ease:"easeOut"},className:`absolute inset-0 w-full h-full flex flex-col items-center justify-center ${o?"pb-6 px-4":"pb-4 px-8 "}`,children:O("div",{className:"flex flex-col items-center text-white",children:[O("h2",{className:"text-lg font-medium mb-2 text-center",children:"You're about to speak with an AI."}),O("div",{className:"w-25 h-3 bg-white/30 rounded-full overflow-hidden mb-6",children:O("div",{className:"h-full bg-white rounded-full transition-all duration-100 ease-linear",style:{width:`${t}%`}})}),O("div",{className:"flex justify-center",children:O("span",{className:"font-light text-xs text-center text-white",children:["This call may be recorded and shared with our service providers."," ",O("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline decoration-white/50 hover:text-white transition-colors",children:"Learn more"})]})})]})})]})}const T1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),M1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Vm=e=>{const t=M1(e);return t.charAt(0).toUpperCase()+t.slice(1)},Nm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),C1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var P1={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"};const E1=it(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},c)=>ce("svg",{ref:c,...P1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Nm("lucide",i),...!o&&!C1(s)&&{"aria-hidden":"true"},...s},[...a.map(([l,d])=>ce(l,d)),...Array.isArray(o)?o:[o]]));const Hr=(e,t)=>{const n=it(({className:r,...i},o)=>ce(E1,{ref:o,iconNode:t,className:Nm(`lucide-${T1(Vm(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Vm(e),n};const A1=Hr("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const O1=Hr("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const I1=Hr("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const D1=Hr("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);const Fm=Hr("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);function Dc({msg:e,isError:t=!1,showSpinner:n=!1}){return O("div",{className:"absolute top-2 left-2 right-15 flex items-center justify-between z-10 text-white/75",children:O("div",{className:`${t?"bg-red-600/25":"bg-gray-40/25"} backdrop-blur-sm rounded-2xl py-2.5 px-4 flex-1 shadow-inset-white-10 flex items-center gap-2`,children:[n&&O(I1,{className:"animate-spin",size:16}),O("p",{className:"text-sm font-normal",children:e||"An error occurred. Please try again."})]})})}function L1(){const{agentData:e}=_n(),{errorMsg:t,resetErrors:n}=eo(),{resetDailyState:r}=Rt(),i=e?.image_url,o=()=>{r(),n()};return O("div",{className:"fixed inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute w-full h-full bg-black"}),i&&O("div",{className:"absolute w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${i})`,filter:"blur(25px) brightness(0.5)"}}),O(Dc,{msg:t,isError:!0}),O("button",{onClick:o,className:"absolute flex items-center justify-center","aria-label":"Play video",children:O("span",{className:"opacity-100 hover:opacity-80 transition-opacity cursor-pointer",children:O(Fm,{size:40,fill:"white",color:"none"})})})]})}const Bm=Ie(void 0);function j1({children:e}){const[t,n]=Z(""),[r,i]=Z(""),{hasJoinedRoom:o}=Rt(),{hasUserInteracted:a}=Er(),s=gs(),c=yn({filter:"remote"}),l=de(!1),d="hello",f=()=>{l.current=!1};return Q(()=>{if(c.length>0&&o&&a&&!l.current){l.current=!0;let g;r?(n(r),g=r):g=d,s({event:"chat-msg",message:g,name:"Guest"},"*"),i("")}},[r,o,c,a,l]),O(Bm.Provider,{value:{lastMessage:t,setLastMessage:n,queuedMessage:r,setQueuedMessage:i,resetInitMsg:f},children:e})}function $m(){const e=ge(Bm);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e}function R1({title:e,titleId:t,...n},r){return ce("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ce("title",{id:t},e):null,ce("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),ce("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const V1=it(R1);function N1({title:e,titleId:t,...n},r){return ce("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ce("title",{id:t},e):null,ce("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM12.95 3.05a.75.75 0 1 0-1.06 1.06 5.5 5.5 0 0 1 0 7.78.75.75 0 1 0 1.06 1.06 7 7 0 0 0 0-9.9Z"}),ce("path",{d:"M10.828 5.172a.75.75 0 1 0-1.06 1.06 2.5 2.5 0 0 1 0 3.536.75.75 0 1 0 1.06 1.06 4 4 0 0 0 0-5.656Z"}))}const F1=it(N1);function B1({title:e,titleId:t,...n},r){return ce("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ce("title",{id:t},e):null,ce("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22 1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94l-1.22-1.22Z"}))}const $1=it(B1);function U1({title:e,titleId:t,...n},r){return ce("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ce("title",{id:t},e):null,ce("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"}))}const Um=it(U1),z1=it(function({title:t,titleId:n,...r},i){return O("svg",{ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-labelledby":n,...r,children:[t?O("title",{id:n,children:t}):null,O("path",{d:"M3.33157 2.40868C3.66659 2.09013 4.19642 2.10349 4.51497 2.43851L17.0321 15.6032C17.3507 15.9382 17.3373 16.4681 17.0023 16.7866C16.6673 17.1051 16.1374 17.0918 15.8189 16.7568L3.30173 3.59208C2.98318 3.25705 2.99654 2.72722 3.33157 2.40868Z",fill:"currentColor"}),O("path",{d:"M4.6877 7.8125C5.20547 7.8125 5.6252 8.23223 5.6252 8.75C5.6252 11.1662 7.58395 13.125 10.0002 13.125C10.7088 13.125 11.3769 12.9543 11.9689 12.6553L13.301 14.0566C12.5948 14.4968 11.7951 14.8007 10.9377 14.9297V16.875H12.8127C13.3305 16.875 13.7502 17.2947 13.7502 17.8125C13.7502 18.3303 13.3305 18.75 12.8127 18.75H7.1877C6.66993 18.75 6.2502 18.3303 6.2502 17.8125C6.2502 17.2947 6.66993 16.875 7.1877 16.875H9.0627V14.9297C6.05569 14.4773 3.7502 11.8831 3.7502 8.75C3.7502 8.23223 4.16993 7.8125 4.6877 7.8125Z",fill:"currentColor"}),O("path",{d:"M15.3127 7.8125C15.8305 7.8125 16.2502 8.23223 16.2502 8.75C16.2502 9.94681 15.9127 11.0644 15.3293 12.0146L13.9709 10.5859C14.2295 10.0275 14.3752 9.4059 14.3752 8.75C14.3752 8.23223 14.7949 7.8125 15.3127 7.8125Z",fill:"currentColor"}),O("path",{d:"M10.5676 11.1826C10.3851 11.225 10.1956 11.25 10.0002 11.25C8.61949 11.25 7.5002 10.1307 7.5002 8.75V7.95508L10.5676 11.1826Z",fill:"currentColor"}),O("path",{d:"M10.0002 1.25C11.3809 1.25 12.5002 2.36929 12.5002 3.75V8.75C12.5002 8.8421 12.4943 8.93294 12.4846 9.02246L7.5002 3.78027V3.75C7.5002 2.36929 8.61949 1.25 10.0002 1.25Z",fill:"currentColor"})]})}),W1=5e3,J1=5e3,ar="/imagine",zm="Sunset";function q1({onClose:e}){const[t,n]=Z(0),{lastMessage:r,setLastMessage:i,setQueuedMessage:o}=$m(),{isMicMuted:a,setIsMicMuted:s,isAudioMuted:c,setIsAudioMuted:l}=vs(),{setHasUserInteracted:d}=Er(),{hasJoinedRoom:f,isAgentVideoReady:p,setIsImageChangeRequested:g}=Rt(),{agentData:y}=_n(),v=gs(),b=yn({filter:"remote"}),[_,k]=Z(""),[M,T]=Z(40),[x,C]=Z(!1),A=de(null),E=de(null),[R]=Z(!1),[B,V]=Z(!1),[z,j]=Z(!1),{isMobileDevice:X}=ys(),[ie,me]=Z("Type here"),J=de(null),[F,q]=Z(""),H=de(null),we=de(0),Xe=y?.allow_image_edits||!1;Q(()=>{if(!r){C(!1);return}return b.length>0&&p&&(C(!0),j(!1)),E.current!==null&&clearTimeout(E.current),E.current=window.setTimeout(()=>{j(!0),E.current=null},W1),()=>{E.current!==null&&(clearTimeout(E.current),E.current=null)}},[t,r,b,p]),Q(()=>{if(A.current&&_){A.current.style.height="auto";const P=A.current.scrollHeight,I=Math.min(P,128);A.current.style.height=`${P}px`,T(I)}else A.current&&!_&&(A.current.style.height="40px",T(40))},[_]),Q(()=>(Xe?(me("Type here"),J.current!==null&&clearInterval(J.current),J.current=window.setInterval(()=>{me(P=>P==="Type here"?ar:"Type here")},J1)):(me("Type here"),J.current!==null&&(clearInterval(J.current),J.current=null)),()=>{J.current!==null&&(clearInterval(J.current),J.current=null)}),[p,Xe]),Q(()=>{if(ie===ar){we.current=0,q("");const I=()=>{if(we.current<zm.length){we.current=we.current+1;const L=zm.slice(0,we.current);q(L),H.current=window.setTimeout(I,100)}};H.current=window.setTimeout(I,0)}else H.current!==null&&(clearTimeout(H.current),H.current=null),q(""),we.current=0;return()=>{H.current!==null&&(clearTimeout(H.current),H.current=null)}},[ie]);const u=()=>{if(d(!0),_.trim()){const P=_.trim();k(""),f&&b.length>0?(v({event:"chat-msg",message:P,name:"Guest"},"*"),P.toLowerCase().startsWith(ar)?g(!0):(i(P),n(I=>I+1))):P.toLowerCase().startsWith(ar)||o(P)}else k("")},m=P=>{const I=P.target;k(I.value)},h=P=>{P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),u())},w=async()=>{d(!0),s(!a)},S=()=>{l(!c)};return O(Ke,{children:[x&&O("div",{className:"absolute left-2 right-2 flex justify-center z-10",style:{bottom:`${M+24}px`},children:O("div",{onAnimationEnd:()=>{z&&(C(!1),j(!1),i(""))},style:{animation:z?"fadeOutUp 0.2s ease-out forwards":"fadeInUp 0.2s ease-out forwards"},className:"mx-auto bg-black/20 backdrop-blur-xl text-white rounded-2xl px-3 py-2 text-sm text-center max-w-[90%] overflow-hidden",children:O("div",{className:"line-clamp-4",children:r})},t)}),O("div",{className:"absolute bottom-0 left-0 right-0 p-2 flex items-end gap-1 pt-4",children:[O("div",{class:"absolute w-full h-full left-0 right-0 pointer-events-none bottom-0 z-0",children:[O("div",{class:"absolute inset-0 backdrop-blur-[1px] mask-[linear-gradient(rgba(0,0,0,0),rgba(0,0,0,1)_10%,rgba(0,0,0,1)_30%,rgba(0,0,0,0)_40%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[2px] mask-[linear-gradient(rgba(0,0,0,0)_10%,rgba(0,0,0,1)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,0)_50%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[4px] mask-[linear-gradient(rgba(0,0,0,0)_15%,rgba(0,0,0,1)_30%,rgba(0,0,0,1)_50%,rgba(0,0,0,0)_60%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[8px] mask-[linear-gradient(rgba(0,0,0,0)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,0)_70%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[16px] mask-[linear-gradient(rgba(0,0,0,0)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,1)_80%,rgba(0,0,0,0)_90%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[32px] mask-[linear-gradient(rgba(0,0,0,0)_60%,rgba(0,0,0,1)_80%)]"}),O("div",{class:"absolute inset-0 z-10 backdrop-blur-[64px] mask-[linear-gradient(rgba(0,0,0,0)_70%,rgba(0,0,0,1)_100%)]"}),O("div",{class:"absolute inset-0 bg-[linear-gradient(transparent,#000000)]"})]}),O(vo.div,{className:`flex items-center w-full z-10 ${X?"justify-between":""}`,children:[!X&&O(vo.div,{layout:!0,className:"flex-1",children:O("div",{className:`
37
+ ${r?"opacity-100 backdrop-blur-lg":"opacity-0 backdrop-blur-none"}`})]}),t&&O("div",{className:"absolute top-2 left-2",children:O("div",{className:"bg-red-600/50 backdrop-blur-xl rounded-3xl py-2 px-4 w-fit shadow-inset-white-10",children:O("p",{className:"text-white text-lg font-semibold text-center",children:t})})})]})}const Kf=Ie({});function Y0(e){const t=de(null);return t.current===null&&(t.current=e()),t.current}const bs=typeof window<"u",X0=bs?In:Q,_s=Ie(null);function ws(e,t){e.indexOf(t)===-1&&e.push(t)}function ks(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Vt=(e,t,n)=>n>t?t:n<e?e:n;let Ss=()=>{};const Nt={},Yf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Xf(e){return typeof e=="object"&&e!==null}const Qf=e=>/^0[^.\s]+$/u.test(e);function xs(e){let t;return()=>(t===void 0&&(t=e()),t)}const ut=e=>e,Q0=(e,t)=>n=>t(e(n)),Ar=(...e)=>e.reduce(Q0),Or=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ts{constructor(){this.subscriptions=[]}add(t){return ws(this.subscriptions,t),()=>ks(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ct=e=>e*1e3,dt=e=>e/1e3;function Zf(e,t){return t?e*(1e3/t):0}const eh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Z0=1e-7,e_=12;function t_(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=eh(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Z0&&++s<e_);return a}function Ir(e,t,n,r){if(e===t&&n===r)return ut;const i=o=>t_(o,0,1,e,n);return o=>o===0||o===1?o:eh(i(o),t,r)}const th=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,nh=e=>t=>1-e(1-t),rh=Ir(.33,1.53,.69,.99),Ms=nh(rh),ih=th(Ms),oh=e=>(e*=2)<1?.5*Ms(e):.5*(2-Math.pow(2,-10*(e-1))),Cs=e=>1-Math.sin(Math.acos(e)),ah=nh(Cs),sh=th(Cs),n_=Ir(.42,0,1,1),r_=Ir(0,0,.58,1),ch=Ir(.42,0,.58,1),i_=e=>Array.isArray(e)&&typeof e[0]!="number",lh=e=>Array.isArray(e)&&typeof e[0]=="number",o_={linear:ut,easeIn:n_,easeInOut:ch,easeOut:r_,circIn:Cs,circInOut:sh,circOut:ah,backIn:Ms,backInOut:ih,backOut:rh,anticipate:oh},a_=e=>typeof e=="string",uh=e=>{if(lh(e)){Ss(e.length===4);const[t,n,r,i]=e;return Ir(t,n,r,i)}else if(a_(e))return o_[e];return e},to=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function s_(e,t){let n=new Set,r=new Set,i=!1,o=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(l.schedule(d),e()),d(s)}const l={schedule:(d,f=!1,p=!1)=>{const y=p&&i?n:r;return f&&a.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(s=d,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(d))}};return l}const c_=40;function dh(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=to.reduce((M,T)=>(M[T]=s_(o),M),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:d,update:f,preRender:p,render:g,postRender:y}=a,v=()=>{const M=Nt.useManualTiming?i.timestamp:performance.now();n=!1,Nt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(M-i.timestamp,c_),1)),i.timestamp=M,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),d.process(i),f.process(i),p.process(i),g.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},b=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:to.reduce((M,T)=>{const x=a[T];return M[T]=(C,A=!1,E=!1)=>(n||b(),x.schedule(C,A,E)),M},{}),cancel:M=>{for(let T=0;T<to.length;T++)a[to[T]].cancel(M)},state:i,steps:a}}const{schedule:Se,cancel:Gt,state:Ve,steps:Ps}=dh(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0);let no;function l_(){no=void 0}const Ye={now:()=>(no===void 0&&Ye.set(Ve.isProcessing||Nt.useManualTiming?Ve.timestamp:performance.now()),no),set:e=>{no=e,queueMicrotask(l_)}},fh=e=>t=>typeof t=="string"&&t.startsWith(e),Es=fh("--"),u_=fh("var(--"),As=e=>u_(e)?d_.test(e.split("/*")[0].trim()):!1,d_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Kn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Dr={...Kn,transform:e=>Vt(0,1,e)},ro={...Kn,default:1},Lr=e=>Math.round(e*1e5)/1e5,Os=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function f_(e){return e==null}const h_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Is=(e,t)=>n=>!!(typeof n=="string"&&h_.test(n)&&n.startsWith(e)||t&&!f_(n)&&Object.prototype.hasOwnProperty.call(n,t)),hh=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(Os);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},p_=e=>Vt(0,255,e),Ds={...Kn,transform:e=>Math.round(p_(e))},wn={test:Is("rgb","red"),parse:hh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ds.transform(e)+", "+Ds.transform(t)+", "+Ds.transform(n)+", "+Lr(Dr.transform(r))+")"};function m_(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ls={test:Is("#"),parse:m_,transform:wn.transform},jr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kt=jr("deg"),Pt=jr("%"),G=jr("px"),g_=jr("vh"),v_=jr("vw"),ph={...Pt,parse:e=>Pt.parse(e)/100,transform:e=>Pt.transform(e*100)},Yn={test:Is("hsl","hue"),parse:hh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pt.transform(Lr(t))+", "+Pt.transform(Lr(n))+", "+Lr(Dr.transform(r))+")"},Ee={test:e=>wn.test(e)||Ls.test(e)||Yn.test(e),parse:e=>wn.test(e)?wn.parse(e):Yn.test(e)?Yn.parse(e):Ls.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?wn.transform(e):Yn.transform(e),getAnimatableNone:e=>{const t=Ee.parse(e);return t.alpha=0,Ee.transform(t)}},y_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function b_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Os)?.length||0)+(e.match(y_)?.length||0)>0}const mh="number",gh="color",__="var",w_="var(",vh="${}",k_=/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 Rr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(k_,c=>(Ee.test(c)?(r.color.push(o),i.push(gh),n.push(Ee.parse(c))):c.startsWith(w_)?(r.var.push(o),i.push(__),n.push(c)):(r.number.push(o),i.push(mh),n.push(parseFloat(c))),++o,vh)).split(vh);return{values:n,split:s,indexes:r,types:i}}function yh(e){return Rr(e).values}function bh(e){const{split:t,types:n}=Rr(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===mh?o+=Lr(i[a]):s===gh?o+=Ee.transform(i[a]):o+=i[a]}return o}}const S_=e=>typeof e=="number"?0:Ee.test(e)?Ee.getAnimatableNone(e):e;function x_(e){const t=yh(e);return bh(e)(t.map(S_))}const Yt={test:b_,parse:yh,createTransformer:bh,getAnimatableNone:x_};function js(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+(t-e)*6*n:n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function T_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=js(c,s,e+.3333333333333333),o=js(c,s,e),a=js(c,s,e-.3333333333333333)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function io(e,t){return n=>n>0?t:e}const Te=(e,t,n)=>e+(t-e)*n,Rs=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},M_=[Ls,wn,Yn],C_=e=>M_.find(t=>t.test(e));function _h(e){const t=C_(e);if(!t)return!1;let n=t.parse(e);return t===Yn&&(n=T_(n)),n}const wh=(e,t)=>{const n=_h(e),r=_h(t);if(!n||!r)return io(e,t);const i={...n};return o=>(i.red=Rs(n.red,r.red,o),i.green=Rs(n.green,r.green,o),i.blue=Rs(n.blue,r.blue,o),i.alpha=Te(n.alpha,r.alpha,o),wn.transform(i))},Vs=new Set(["none","hidden"]);function P_(e,t){return Vs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function E_(e,t){return n=>Te(e,t,n)}function Ns(e){return typeof e=="number"?E_:typeof e=="string"?As(e)?io:Ee.test(e)?wh:I_:Array.isArray(e)?kh:typeof e=="object"?Ee.test(e)?wh:A_:io}function kh(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Ns(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function A_(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ns(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function O_(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}const I_=(e,t)=>{const n=Yt.createTransformer(t),r=Rr(e),i=Rr(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Vs.has(e)&&!i.values.length||Vs.has(t)&&!r.values.length?P_(e,t):Ar(kh(O_(r,i),i.values),n):io(e,t)};function Sh(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Te(e,t,n):Ns(e)(e,t)}const D_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Se.update(t,n),stop:()=>Gt(t),now:()=>Ve.isProcessing?Ve.timestamp:Ye.now()}},xh=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},oo=2e4;function Fs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<oo;)t+=n,r=e.next(t);return t>=oo?1/0:t}function L_(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Fs(r),oo);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:dt(i)}}const j_=5;function Th(e,t,n){const r=Math.max(t-j_,0);return Zf(n-e(r),t-r)}const Me={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},Bs=.001;function R_({duration:e=Me.duration,bounce:t=Me.bounce,velocity:n=Me.velocity,mass:r=Me.mass}){let i,o,a=1-t;a=Vt(Me.minDamping,Me.maxDamping,a),e=Vt(Me.minDuration,Me.maxDuration,dt(e)),a<1?(i=l=>{const d=l*a,f=d*e,p=d-n,g=$s(l,a),y=Math.exp(-f);return Bs-p/g*y},o=l=>{const f=l*a*e,p=f*n+n,g=Math.pow(a,2)*Math.pow(l,2)*e,y=Math.exp(-f),v=$s(Math.pow(l,2),a);return(-i(l)+Bs>0?-1:1)*((p-g)*y)/v}):(i=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-Bs+d*f},o=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const s=5/e,c=N_(i,o,s);if(e=Ct(e),isNaN(c))return{stiffness:Me.stiffness,damping:Me.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const V_=12;function N_(e,t,n){let r=n;for(let i=1;i<V_;i++)r=r-e(r)/t(r);return r}function $s(e,t){return e*Math.sqrt(1-t*t)}const F_=["duration","bounce"],B_=["stiffness","damping","mass"];function Mh(e,t){return t.some(n=>e[n]!==void 0)}function $_(e){let t={velocity:Me.velocity,stiffness:Me.stiffness,damping:Me.damping,mass:Me.mass,isResolvedFromDuration:!1,...e};if(!Mh(e,B_)&&Mh(e,F_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Vt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Me.mass,stiffness:i,damping:o}}else{const n=R_(e);t={...t,...n,mass:Me.mass},t.isResolvedFromDuration=!0}return t}function ao(e=Me.visualDuration,t=Me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:d,duration:f,velocity:p,isResolvedFromDuration:g}=$_({...n,velocity:-dt(n.velocity||0)}),y=p||0,v=l/(2*Math.sqrt(c*d)),b=a-o,_=dt(Math.sqrt(c/d)),k=Math.abs(b)<5;r||(r=k?Me.restSpeed.granular:Me.restSpeed.default),i||(i=k?Me.restDelta.granular:Me.restDelta.default);let M;if(v<1){const x=$s(_,v);M=C=>{const A=Math.exp(-v*_*C);return a-A*((y+v*_*b)/x*Math.sin(x*C)+b*Math.cos(x*C))}}else if(v===1)M=x=>a-Math.exp(-_*x)*(b+(y+_*b)*x);else{const x=_*Math.sqrt(v*v-1);M=C=>{const A=Math.exp(-v*_*C),E=Math.min(x*C,300);return a-A*((y+v*_*b)*Math.sinh(E)+x*b*Math.cosh(E))/x}}const T={calculatedDuration:g&&f||null,next:x=>{const C=M(x);if(g)s.done=x>=f;else{let A=x===0?y:0;v<1&&(A=x===0?Ct(y):Th(M,x,C));const E=Math.abs(A)<=r,R=Math.abs(a-C)<=i;s.done=E&&R}return s.value=s.done?a:C,s},toString:()=>{const x=Math.min(Fs(T),oo),C=xh(A=>T.next(x*A).value,x,30);return x+"ms "+C},toTransition:()=>{}};return T}ao.applyToOptions=e=>{const t=L_(e,100,ao);return e.ease=t.ease,e.duration=Ct(t.duration),e.type="keyframes",e};function Us({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},g=E=>s!==void 0&&E<s||c!==void 0&&E>c,y=E=>s===void 0?c:c===void 0||Math.abs(s-E)<Math.abs(c-E)?s:c;let v=n*t;const b=f+v,_=a===void 0?b:a(b);_!==b&&(v=_-f);const k=E=>-v*Math.exp(-E/r),M=E=>_+k(E),T=E=>{const R=k(E),B=M(E);p.done=Math.abs(R)<=l,p.value=p.done?_:B};let x,C;const A=E=>{g(p.value)&&(x=E,C=ao({keyframes:[p.value,y(p.value)],velocity:Th(M,E,p.value),damping:i,stiffness:o,restDelta:l,restSpeed:d}))};return A(0),{calculatedDuration:null,next:E=>{let R=!1;return!C&&x===void 0&&(R=!0,T(E),A(E)),x!==void 0&&E>=x?C.next(E-x):(!R&&T(E),p)}}}function U_(e,t,n){const r=[],i=n||Nt.mix||Sh,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||ut:t;s=Ar(c,s)}r.push(s)}return r}function z_(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Ss(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=U_(t,r,i),c=s.length,l=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Or(e[f],e[f+1],d);return s[f](p)};return n?d=>l(Vt(e[0],e[o-1],d)):l}function W_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Or(0,t,r);e.push(Te(n,1,i))}}function J_(e){const t=[0];return W_(t,e.length-1),t}function q_(e,t){return e.map(n=>n*t)}function H_(e,t){return e.map(()=>t||ch).splice(0,e.length-1)}function Vr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=i_(r)?r.map(uh):uh(r),o={done:!1,value:t[0]},a=q_(n&&n.length===t.length?n:J_(t),e),s=z_(a,t,{ease:Array.isArray(i)?i:H_(t,i)});return{calculatedDuration:e,next:c=>(o.value=s(c),o.done=c>=e,o)}}const G_=e=>e!==null;function zs(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(G_),s=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const K_={decay:Us,inertia:Us,tween:Vr,keyframes:Vr,spring:ao};function Ch(e){typeof e.type=="string"&&(e.type=K_[e.type])}class Ws{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 Y_=e=>e/100;class Js extends Ws{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Ye.now()&&this.tick(Ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ch(t);const{type:n=Vr,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=t;let{keyframes:s}=t;const c=n||Vr;c!==Vr&&typeof s[0]!="number"&&(this.mixKeyframes=Ar(Y_,Sh(s[0],s[1])),s=[0,100]);const l=c({...t,keyframes:s});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...s].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=Fs(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,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:i,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:d,repeat:f,repeatType:p,repeatDelay:g,type:y,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const _=this.currentTime-l*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let M=this.currentTime,T=r;if(f){const E=Math.min(this.currentTime,i)/s;let R=Math.floor(E),B=E%1;!B&&E>=1&&(B=1),B===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(p==="reverse"?(B=1-B,g&&(B-=g/s)):p==="mirror"&&(T=a)),M=Vt(0,1,B)*s}const x=k?{done:!1,value:d[0]}:T.next(M);o&&(x.value=o(x.value));let{done:C}=x;!k&&c!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return A&&y!==Us&&(x.value=zs(d,this.options,b,this.speed)),v&&v(x.value),A&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return dt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+dt(t)}get time(){return dt(this.currentTime)}set time(t){t=Ct(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),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ye.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=dt(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=D_,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();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(Ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}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){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function X_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const kn=e=>e*180/Math.PI,qs=e=>{const t=kn(Math.atan2(e[1],e[0]));return Hs(t)},Q_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qs,rotateZ:qs,skewX:e=>kn(Math.atan(e[1])),skewY:e=>kn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Hs=e=>(e=e%360,e<0&&(e+=360),e),Ph=qs,Eh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ah=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Z_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Eh,scaleY:Ah,scale:e=>(Eh(e)+Ah(e))/2,rotateX:e=>Hs(kn(Math.atan2(e[6],e[5]))),rotateY:e=>Hs(kn(Math.atan2(-e[2],e[0]))),rotateZ:Ph,rotate:Ph,skewX:e=>kn(Math.atan(e[4])),skewY:e=>kn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Gs(e){return e.includes("scale")?1:0}function Ks(e,t){if(!e||e==="none")return Gs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Z_,i=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Q_,i=s}if(!i)return Gs(t);const o=r[t],a=i[1].split(",").map(tw);return typeof o=="function"?o(a):a[o]}const ew=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ks(n,t)};function tw(e){return parseFloat(e.trim())}const Xn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qn=new Set(Xn),Oh=e=>e===Kn||e===G,nw=new Set(["x","y","z"]),rw=Xn.filter(e=>!nw.has(e));function iw(e){const t=[];return rw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Sn={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})=>Ks(t,"x"),y:(e,{transform:t})=>Ks(t,"y")};Sn.translateX=Sn.x,Sn.translateY=Sn.y;const xn=new Set;let Ys=!1,Xs=!1,Qs=!1;function Ih(){if(Xs){const e=Array.from(xn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=iw(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{r.getValue(o)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Xs=!1,Ys=!1,xn.forEach(e=>e.complete(Qs)),xn.clear()}function Dh(){xn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xs=!0)})}function ow(){Qs=!0,Dh(),Ih(),Qs=!1}class Zs{constructor(t,n,r,i,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(xn.add(this),Ys||(Ys=!0,Se.read(Dh),Se.resolveKeyframes(Ih))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}X_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),xn.delete(this)}cancel(){this.state==="scheduled"&&(xn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const aw=e=>e.startsWith("--");function sw(e,t,n){aw(t)?e.style.setProperty(t,n):e.style[t]=n}const cw=xs(()=>window.ScrollTimeline!==void 0),lw={};function uw(e,t){const n=xs(e);return()=>lw[t]??n()}const Lh=uw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nr([0,.65,.55,1]),circOut:Nr([.55,0,1,.45]),backIn:Nr([.31,.01,.66,-.59]),backOut:Nr([.33,1.53,.69,.99])};function Rh(e,t){if(e)return typeof e=="function"?Lh()?xh(e,t):"ease-out":lh(e)?Nr(e):Array.isArray(e)?e.map(n=>Rh(n,t)||jh.easeOut):jh[e]}function dw(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const d={[t]:n};c&&(d.offset=c);const f=Rh(s,i);Array.isArray(f)&&(d.easing=f);const p={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return l&&(p.pseudoElement=l),e.animate(d,p)}function Vh(e){return typeof e=="function"&&"applyToOptions"in e}function fw({type:e,...t}){return Vh(e)&&Lh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class hw extends Ws{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:s,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,Ss(typeof t.type!="string");const l=fw(t);this.animation=dw(n,r,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=zs(i,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(d):sw(n,r,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return dt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+dt(t)}get time(){return dt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ct(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}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&cw()?(this.animation.timeline=t,ut):n(this)}}const Nh={anticipate:oh,backInOut:ih,circInOut:sh};function pw(e){return e in Nh}function mw(e){typeof e.ease=="string"&&pw(e.ease)&&(e.ease=Nh[e.ease])}const Fh=10;class gw extends hw{constructor(t){mw(t),Ch(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Js({...a,autoplay:!1}),c=Ct(this.finishedTime??this.time);n.setWithVelocity(s.sample(c-Fh).value,s.sample(c).value,Fh),s.stop()}}const Bh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Yt.test(e)||e==="0")&&!e.startsWith("url("));function vw(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 yw(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Bh(i,t),s=Bh(o,t);return!a||!s?!1:vw(e)||(n==="spring"||Vh(n))&&r}function ec(e){e.duration=0,e.type="keyframes"}const bw=new Set(["opacity","clipPath","filter","transform"]),_w=xs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ww(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return _w()&&n&&bw.has(n)&&(n!=="transform"||!l)&&!c&&!r&&i!=="mirror"&&o!==0&&a!=="inertia"}const kw=40;class Sw extends Ws{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",keyframes:s,name:c,motionValue:l,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ye.now();const p={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,name:c,motionValue:l,element:d,...f},g=d?.KeyframeResolver||Zs;this.keyframeResolver=new g(s,(y,v,b)=>this.onKeyframesResolved(y,v,p,!b),c,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:a,velocity:s,delay:c,isHandoff:l,onUpdate:d}=r;this.resolvedAt=Ye.now(),yw(t,o,a,s)||((Nt.instantAnimations||!c)&&d?.(zs(t,r,n)),t[0]=t[t.length-1],ec(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>kw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!l&&ww(p)?new gw({...p,element:p.motionValue.owner.current}):new Js(p);g.finished.then(()=>this.notifyFinished()).catch(ut),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(){return this._animation||(this.keyframeResolver?.resume(),ow()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const xw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Tw(e){const t=xw.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function $h(e,t,n=1){const[r,i]=Tw(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return Yf(a)?parseFloat(a):a}return As(i)?$h(i,t,n+1):i}function tc(e,t){return e?.[t]??e?.default??e}const Uh=new Set(["width","height","top","left","right","bottom",...Xn]),Mw={test:e=>e==="auto",parse:e=>e},zh=e=>t=>t.test(e),Wh=[Kn,G,Pt,Kt,v_,g_,Mw],Jh=e=>Wh.find(zh(e));function Cw(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Qf(e):!0}const Pw=new Set(["brightness","contrast","saturate","opacity"]);function Ew(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Os)||[];if(!r)return e;const i=n.replace(r,"");let o=Pw.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Aw=/\b([a-z-]*)\(.*?\)/gu,nc={...Yt,getAnimatableNone:e=>{const t=e.match(Aw);return t?t.map(Ew).join(" "):e}},qh={...Kn,transform:Math.round},rc={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,backgroundPositionX:G,backgroundPositionY:G,...{rotate:Kt,rotateX:Kt,rotateY:Kt,rotateZ:Kt,scale:ro,scaleX:ro,scaleY:ro,scaleZ:ro,skew:Kt,skewX:Kt,skewY:Kt,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Dr,originX:ph,originY:ph,originZ:G},zIndex:qh,fillOpacity:Dr,strokeOpacity:Dr,numOctaves:qh},Ow={...rc,color:Ee,backgroundColor:Ee,outlineColor:Ee,fill:Ee,stroke:Ee,borderColor:Ee,borderTopColor:Ee,borderRightColor:Ee,borderBottomColor:Ee,borderLeftColor:Ee,filter:nc,WebkitFilter:nc},Hh=e=>Ow[e];function Gh(e,t){let n=Hh(e);return n!==nc&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Iw=new Set(["auto","none","0"]);function Dw(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!Iw.has(o)&&Rr(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Gh(n,i)}class Lw extends Zs{constructor(t,n,r,i,o){super(t,n,r,i,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(),As(l))){const d=$h(l,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Uh.has(r)||t.length!==2)return;const[i,o]=t,a=Jh(i),s=Jh(o);if(a!==s)if(Oh(a)&&Oh(s))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Sn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Cw(t[i]))&&r.push(i);r.length&&Dw(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=Sn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,a=r[o];r[o]=Sn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,c])=>{t.getValue(s).set(c)}),this.resolveNoneKeyframes()}}function jw(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Kh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Rw(e){return Xf(e)&&"offsetHeight"in e}const Yh=30,Vw=e=>!isNaN(parseFloat(e));class Nw{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=Ye.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Vw(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ts);const r=this.events[t].add(n);return t==="change"?()=>{r(),Se.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(){this.events.change?.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=Ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Yh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Yh);return Zf(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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zn(e,t){return new Nw(e,t)}const{schedule:ic}=dh(queueMicrotask,!1),kt={x:!1,y:!1};function Xh(){return kt.x||kt.y}function Fw(e){return e==="x"||e==="y"?kt[e]?null:(kt[e]=!0,()=>{kt[e]=!1}):kt.x||kt.y?null:(kt.x=kt.y=!0,()=>{kt.x=kt.y=!1})}function Qh(e,t){const n=jw(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Zh(e){return!(e.pointerType==="touch"||Xh())}function Bw(e,t,n={}){const[r,i,o]=Qh(e,n),a=s=>{if(!Zh(s))return;const{target:c}=s,l=t(c,s);if(typeof l!="function"||!c)return;const d=f=>{Zh(f)&&(l(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,i)};return r.forEach(s=>{s.addEventListener("pointerenter",a,i)}),o}const ep=(e,t)=>t?e===t?!0:ep(e,t.parentElement):!1,oc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,$w=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Uw(e){return $w.has(e.tagName)||e.tabIndex!==-1}const so=new WeakSet;function tp(e){return t=>{t.key==="Enter"&&e(t)}}function ac(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const zw=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=tp(()=>{if(so.has(n))return;ac(n,"down");const i=tp(()=>{ac(n,"up")}),o=()=>ac(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function np(e){return oc(e)&&!Xh()}function Ww(e,t,n={}){const[r,i,o]=Qh(e,n),a=s=>{const c=s.currentTarget;if(!np(s))return;so.add(c);const l=t(c,s),d=(g,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),so.has(c)&&so.delete(c),np(g)&&typeof l=="function"&&l(g,{success:y})},f=g=>{d(g,c===window||c===document||n.useGlobalTarget||ep(c,g.target))},p=g=>{d(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",p,i)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,i),Rw(s)&&(s.addEventListener("focus",l=>zw(l,i)),!Uw(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),o}function rp(e){return Xf(e)&&"ownerSVGElement"in e}function Jw(e){return rp(e)&&e.tagName==="svg"}const We=e=>!!(e&&e.getVelocity),qw=[...Wh,Ee,Yt],Hw=e=>qw.find(zh(e)),ip=Ie({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Gw(e=!0){const t=ge(_s);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=Io();Q(()=>{if(e)return i(o)},[e]);const a=N(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const op=Ie({strict:!1}),ap={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"]},er={};for(const e in ap)er[e]={isEnabled:t=>ap[e].some(n=>!!t[n])};function Kw(e){for(const t in e)er[t]={...er[t],...e[t]}}const Yw=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 co(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Yw.has(e)}let sp=e=>!co(e);function Xw(e){typeof e=="function"&&(sp=t=>t.startsWith("on")?!co(t):e(t))}try{Xw(require("@emotion/is-prop-valid").default)}catch{}function Qw(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(sp(i)||n===!0&&co(i)||!t&&!co(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const lo=Ie({});function uo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fr(e){return typeof e=="string"||Array.isArray(e)}const sc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cc=["initial",...sc];function fo(e){return uo(e.animate)||cc.some(t=>Fr(e[t]))}function cp(e){return!!(fo(e)||e.variants)}function Zw(e,t){if(fo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fr(n)?n:void 0,animate:Fr(r)?r:void 0}}return e.inherit!==!1?t:{}}function ek(e){const{initial:t,animate:n}=Zw(e,ge(lo));return Ne(()=>({initial:t,animate:n}),[lp(t),lp(n)])}function lp(e){return Array.isArray(e)?e.join(" "):e}const Br={};function tk(e){for(const t in e)Br[t]=e[t],Es(t)&&(Br[t].isCSSVariable=!0)}function up(e,{layout:t,layoutId:n}){return Qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Br[e]||e==="opacity")}const nk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rk=Xn.length;function ik(e,t,n){let r="",i=!0;for(let o=0;o<rk;o++){const a=Xn[o],s=e[a];if(s===void 0)continue;let c=!0;if(typeof s=="number"?c=s===(a.startsWith("scale")?1:0):c=parseFloat(s)===0,!c||n){const l=Kh(s,rc[a]);if(!c){i=!1;const d=nk[a]||a;r+=`${d}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function lc(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const c in t){const l=t[c];if(Qn.has(c)){a=!0;continue}else if(Es(c)){i[c]=l;continue}else{const d=Kh(l,rc[c]);c.startsWith("origin")?(s=!0,o[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=ik(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:l="50%",originZ:d=0}=o;r.transformOrigin=`${c} ${l} ${d}`}}const uc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dp(e,t,n){for(const r in t)!We(t[r])&&!up(r,n)&&(e[r]=t[r])}function ok({transformTemplate:e},t){return Ne(()=>{const n=uc();return lc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ak(e,t){const n=e.style||{},r={};return dp(r,n,e),Object.assign(r,ok(e,t)),r}function sk(e,t){const n={},r=ak(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 ck={offset:"stroke-dashoffset",array:"stroke-dasharray"},lk={offset:"strokeDashoffset",array:"strokeDasharray"};function uk(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ck:lk;e[o.offset]=G.transform(-r);const a=G.transform(t),s=G.transform(n);e[o.array]=`${a} ${s}`}function fp(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},c,l,d){if(lc(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p}=e;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=d?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&uk(f,i,o,a,!1)}const hp=()=>({...uc(),attrs:{}}),pp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function dk(e,t,n,r){const i=Ne(()=>{const o=hp();return fp(o,t,pp(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};dp(o,e.style,e),i.style={...o,...i.style}}return i}const fk=["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 dc(e){return typeof e!="string"||e.includes("-")?!1:!!(fk.indexOf(e)>-1||/[A-Z]/u.test(e))}function hk(e,t,n,{latestValues:r},i,o=!1){const s=(dc(e)?dk:sk)(t,r,i,e),c=Qw(t,typeof e=="string",o),l=e!==Ke?{...c,...s,ref:n}:{},{children:d}=t,f=Ne(()=>We(d)?d.get():d,[d]);return ce(e,{...l,children:f})}function mp(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function fc(e,t,n,r){if(typeof t=="function"){const[i,o]=mp(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=mp(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function ho(e){return We(e)?e.get():e}function pk({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:mk(n,r,i,e),renderState:t()}}function mk(e,t,n,r){const i={},o=r(e,{});for(const p in o)i[p]=ho(o[p]);let{initial:a,animate:s}=e;const c=fo(e),l=cp(e);t&&l&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?s:a;if(f&&typeof f!="boolean"&&!uo(f)){const p=Array.isArray(f)?f:[f];for(let g=0;g<p.length;g++){const y=fc(e,p[g]);if(y){const{transitionEnd:v,transition:b,..._}=y;for(const k in _){let M=_[k];if(Array.isArray(M)){const T=d?M.length-1:0;M=M[T]}M!==null&&(i[k]=M)}for(const k in v)i[k]=v[k]}}}return i}const gp=e=>(t,n)=>{const r=ge(lo),i=ge(_s),o=()=>pk(e,t,r,i);return n?o():Y0(o)};function hc(e,t,n){const{style:r}=e,i={};for(const o in r)(We(r[o])||t.style&&We(t.style[o])||up(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}const gk=gp({scrapeMotionValuesFromProps:hc,createRenderState:uc});function vp(e,t,n){const r=hc(e,t,n);for(const i in e)if(We(e[i])||We(t[i])){const o=Xn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const vk=gp({scrapeMotionValuesFromProps:vp,createRenderState:hp}),yk=Symbol.for("motionComponentSymbol");function tr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bk(e,t,n){return N(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):tr(n)&&(n.current=r))},[t])}const pc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yp="data-"+pc("framerAppearId"),bp=Ie({});function _k(e,t,n,r,i){const{visualElement:o}=ge(lo),a=ge(op),s=ge(_s),c=ge(ip).reducedMotion,l=de(null);r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));const d=l.current,f=ge(bp);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&wk(l.current,n,i,f);const p=de(!1);Fo(()=>{d&&p.current&&d.update(n,s)});const g=n[yp],y=de(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return X0(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),y.current&&d.animationState&&d.animationState.animateChanges())}),Q(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),d.enteringChildren=void 0)}),d}function wk(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:_p(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&tr(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l})}function _p(e){if(e)return e.options.allowProjection!==!1?e.projection:_p(e.parent)}function mc(e,{forwardMotionProps:t=!1}={},n,r){n&&Kw(n);const i=dc(e)?vk:gk;function o(s,c){let l;const d={...ge(ip),...s,layoutId:kk(s)},{isStatic:f}=d,p=ek(s),g=i(s,f);if(!f&&bs){Sk();const y=xk(d);l=y.MeasureLayout,p.visualElement=_k(e,g,d,r,y.ProjectionNode)}return O(lo.Provider,{value:p,children:[l&&p.visualElement?O(l,{visualElement:p.visualElement,...d}):null,hk(e,s,bk(g,p.visualElement,c),g,f,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=it(o);return a[yk]=e,a}function kk({layoutId:e}){const t=ge(Kf).id;return t&&e!==void 0?t+"-"+e:e}function Sk(e,t){ge(op).strict}function xk(e){const{drag:t,layout:n}=er;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Tk(e,t){if(typeof Proxy>"u")return mc;const n=new Map,r=(o,a)=>mc(o,a,e,t),i=(o,a)=>r(o,a);return new Proxy(i,{get:(o,a)=>a==="create"?r:(n.has(a)||n.set(a,mc(a,void 0,e,t)),n.get(a))})}function wp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Mk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ck(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 gc(e){return e===void 0||e===1}function vc({scale:e,scaleX:t,scaleY:n}){return!gc(e)||!gc(t)||!gc(n)}function Tn(e){return vc(e)||kp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kp(e){return Sp(e.x)||Sp(e.y)}function Sp(e){return e&&e!=="0%"}function po(e,t,n){const r=e-n,i=t*r;return n+i}function xp(e,t,n,r,i){return i!==void 0&&(e=po(e,i,r)),po(e,n,r)+t}function yc(e,t=0,n=1,r,i){e.min=xp(e.min,t,n,r,i),e.max=xp(e.max,t,n,r,i)}function Tp(e,{x:t,y:n}){yc(e.x,t.translate,t.scale,t.originPoint),yc(e.y,n.translate,n.scale,n.originPoint)}const Mp=.999999999999,Cp=1.0000000000001;function Pk(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=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&&rr(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Tp(e,a)),r&&Tn(o.latestValues)&&rr(e,o.latestValues))}t.x<Cp&&t.x>Mp&&(t.x=1),t.y<Cp&&t.y>Mp&&(t.y=1)}function nr(e,t){e.min=e.min+t,e.max=e.max+t}function Pp(e,t,n,r,i=.5){const o=Te(e.min,e.max,i);yc(e,t,n,o,r)}function rr(e,t){Pp(e.x,t.x,t.scaleX,t.scale,t.originX),Pp(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ep(e,t){return wp(Ck(e.getBoundingClientRect(),t))}function Ek(e,t,n){const r=Ep(e,n),{scroll:i}=t;return i&&(nr(r.x,i.offset.x),nr(r.y,i.offset.y)),r}const Ap=()=>({translate:0,scale:1,origin:0,originPoint:0}),ir=()=>({x:Ap(),y:Ap()}),Op=()=>({min:0,max:0}),Pe=()=>({x:Op(),y:Op()}),bc={current:null},Ip={current:!1};function Ak(){if(Ip.current=!0,!!bs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>bc.current=e.matches;e.addEventListener("change",t),t()}else bc.current=!1}const Ok=new WeakMap;function Ik(e,t,n){for(const r in t){const i=t[r],o=n[r];if(We(i))e.addValue(r,i);else if(We(o))e.addValue(r,Zn(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,Zn(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Dp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Dk{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zs,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=Ye.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Se.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;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=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=fo(n),this.isVariantNode=cp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const g=f[p];c[p]!==void 0&&We(g)&&g.set(c[p])}}mount(t){this.current=t,Ok.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((n,r)=>this.bindToMotionValue(r,n)),Ip.current||Ak(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:bc.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Gt(this.notifyUpdate),Gt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.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=Qn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Se.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,()=>{i(),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 er){const n=er[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(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):Pe()}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<Dp.length;r++){const i=Dp[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Ik(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=Zn(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"&&(Yf(r)||Qf(r))?r=parseFloat(r):!Hw(r)&&Yt.test(n)&&(r=Gh(t,n)),this.setBaseTarget(t,We(r)?r.get():r)),We(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=fc(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!We(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ts),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ic.render(this.render)}}class Lp extends Dk{constructor(){super(...arguments),this.KeyframeResolver=Lw}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;We(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function jp(e,{style:t,vars:n},r,i){const o=e.style;let a;for(a in t)o[a]=t[a];i?.applyProjectionStyles(o,r);for(a in n)o.setProperty(a,n[a])}function Lk(e){return window.getComputedStyle(e)}class jk extends Lp{constructor(){super(...arguments),this.type="html",this.renderInstance=jp}readValueFromInstance(t,n){if(Qn.has(n))return this.projection?.isProjecting?Gs(n):ew(t,n);{const r=Lk(t),i=(Es(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ep(t,n)}build(t,n,r){lc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return hc(t,n,r)}}const Rp=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 Rk(e,t,n,r){jp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Rp.has(i)?i:pc(i),t.attrs[i])}class Vk extends Lp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qn.has(n)){const r=Hh(n);return r&&r.default||0}return n=Rp.has(n)?n:pc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return vp(t,n,r)}build(t,n,r){fp(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){Rk(t,n,r,i)}mount(t){this.isSVGTag=pp(t.tagName),super.mount(t)}}const Nk=(e,t)=>dc(e)?new Vk(t):new jk(t,{allowProjection:e!==Ke});function or(e,t,n){const r=e.getProps();return fc(r,t,n!==void 0?n:r.custom,e)}const _c=e=>Array.isArray(e);function Fk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zn(n))}function Bk(e){return _c(e)?e[e.length-1]||0:e}function $k(e,t){const n=or(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=Bk(o[a]);Fk(e,a,s)}}function Uk(e){return!!(We(e)&&e.add)}function wc(e,t){const n=e.getValue("willChange");if(Uk(n))return n.add(t);if(!n&&Nt.WillChange){const r=new Nt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Vp(e){return e.props[yp]}const zk=e=>e!==null;function Wk(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(zk),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Jk={type:"spring",stiffness:500,damping:25,restSpeed:10},qk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Hk={type:"keyframes",duration:.8},Gk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kk=(e,{keyframes:t})=>t.length>2?Hk:Qn.has(e)?e.startsWith("scale")?qk(t[1]):Jk:Gk;function Yk({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...d}){return!!Object.keys(d).length}const kc=(e,t,n,r={},i,o)=>a=>{const s=tc(r,e)||{},c=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ct(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};Yk(s)||Object.assign(d,Kk(e,d)),d.duration&&(d.duration=Ct(d.duration)),d.repeatDelay&&(d.repeatDelay=Ct(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(ec(d),d.delay===0&&(f=!0)),(Nt.instantAnimations||Nt.skipAnimations)&&(f=!0,ec(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,f&&!o&&t.get()!==void 0){const p=Wk(d.keyframes,s);if(p!==void 0){Se.update(()=>{d.onUpdate(p),d.onComplete()});return}}return s.isSync?new Js(d):new Sw(d)};function Xk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Np(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(o=r);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const d in s){const f=e.getValue(d,e.latestValues[d]??null),p=s[d];if(p===void 0||l&&Xk(l,d))continue;const g={delay:n,...tc(o||{},d)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===y&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const _=Vp(e);if(_){const k=window.MotionHandoffAnimation(_,d,Se);k!==null&&(g.startTime=k,v=!0)}}wc(e,d),f.start(kc(d,f,p,e.shouldReduceMotion&&Uh.has(d)?{type:!1}:g,e,v));const b=f.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{Se.update(()=>{a&&$k(e,a)})}),c}function Fp(e,t,n,r=0,i=1){const o=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(o,a):i===1?o*r:s-o*r}function Sc(e,t,n={}){const r=or(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Np(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=i;return Qk(e,t,c,l,d,f,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[c,l]=s==="beforeChildren"?[o,a]:[a,o];return c().then(()=>l())}else return Promise.all([o(),a(n.delay)])}function Qk(e,t,n=0,r=0,i=0,o=1,a){const s=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),s.push(Sc(c,t,{...a,delay:n+(typeof r=="function"?0:r)+Fp(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(s)}function Zk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Sc(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Sc(e,t,n);else{const i=typeof t=="function"?or(e,t,n.custom):t;r=Promise.all(Np(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Bp(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 eS=cc.length;function $p(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$p(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<eS;n++){const r=cc[n],i=e.props[r];(Fr(i)||i===!1)&&(t[r]=i)}return t}const tS=[...sc].reverse(),nS=sc.length;function rS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Zk(e,n,r)))}function iS(e){let t=rS(e),n=Up(),r=!0;const i=c=>(l,d)=>{const f=or(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:g,...y}=f;l={...l,...y,...g}}return l};function o(c){t=c(e)}function a(c){const{props:l}=e,d=$p(e.parent)||{},f=[],p=new Set;let g={},y=1/0;for(let b=0;b<nS;b++){const _=tS[b],k=n[_],M=l[_]!==void 0?l[_]:d[_],T=Fr(M),x=_===c?k.isActive:null;x===!1&&(y=b);let C=M===d[_]&&M!==l[_]&&T;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),k.protectedKeys={...g},!k.isActive&&x===null||!M&&!k.prevProp||uo(M)||typeof M=="boolean")continue;const A=oS(k.prevProp,M);let E=A||_===c&&k.isActive&&!C&&T||b>y&&T,R=!1;const B=Array.isArray(M)?M:[M];let V=B.reduce(i(_),{});x===!1&&(V={});const{prevResolvedValues:z={}}=k,j={...z,...V},X=J=>{E=!0,p.has(J)&&(R=!0,p.delete(J)),k.needsAnimating[J]=!0;const F=e.getValue(J);F&&(F.liveStyle=!1)};for(const J in j){const F=V[J],q=z[J];if(g.hasOwnProperty(J))continue;let H=!1;_c(F)&&_c(q)?H=!Bp(F,q):H=F!==q,H?F!=null?X(J):p.add(J):F!==void 0&&p.has(J)?X(J):k.protectedKeys[J]=!0}k.prevProp=M,k.prevResolvedValues=V,k.isActive&&(g={...g,...V}),r&&e.blockInitialAnimation&&(E=!1);const ie=C&&A;E&&(!ie||R)&&f.push(...B.map(J=>{const F={type:_};if(typeof J=="string"&&r&&!ie&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,H=or(q,J);if(q.enteringChildren&&H){const{delayChildren:we}=H.transition||{};F.delay=Fp(q.enteringChildren,e,we)}}return{animation:J,options:F}}))}if(p.size){const b={};if(typeof l.initial!="boolean"){const _=or(e,Array.isArray(l.initial)?l.initial[0]:l.initial);_&&_.transition&&(b.transition=_.transition)}p.forEach(_=>{const k=e.getBaseTarget(_),M=e.getValue(_);M&&(M.liveStyle=!0),b[_]=k??null}),f.push({animation:b})}let v=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function s(c,l){if(n[c].isActive===l)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Up()}}}function oS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Bp(t,e):!1}function Mn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Up(){return{animate:Mn(!0),whileInView:Mn(),whileHover:Mn(),whileTap:Mn(),whileDrag:Mn(),whileFocus:Mn(),exit:Mn()}}class Xt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class aS extends Xt{constructor(t){super(t),t.animationState||(t.animationState=iS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();uo(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(){this.node.animationState.reset(),this.unmountControls?.()}}let sS=0;class cS extends Xt{constructor(){super(...arguments),this.id=sS++}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 i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 lS={animation:{Feature:aS},exit:{Feature:cS}};function $r(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ur(e){return{point:{x:e.pageX,y:e.pageY}}}const uS=e=>t=>oc(t)&&e(t,Ur(t));function zr(e,t,n,r){return $r(e,t,uS(n),r)}const zp=1e-4,dS=1-zp,fS=1+zp,Wp=.01,hS=0-Wp,pS=0+Wp;function Ge(e){return e.max-e.min}function mS(e,t,n){return Math.abs(e-t)<=n}function Jp(e,t,n,r=.5){e.origin=r,e.originPoint=Te(t.min,t.max,e.origin),e.scale=Ge(n)/Ge(t),e.translate=Te(n.min,n.max,e.origin)-e.originPoint,(e.scale>=dS&&e.scale<=fS||isNaN(e.scale))&&(e.scale=1),(e.translate>=hS&&e.translate<=pS||isNaN(e.translate))&&(e.translate=0)}function Wr(e,t,n,r){Jp(e.x,t.x,n.x,r?r.originX:void 0),Jp(e.y,t.y,n.y,r?r.originY:void 0)}function qp(e,t,n){e.min=n.min+t.min,e.max=e.min+Ge(t)}function gS(e,t,n){qp(e.x,t.x,n.x),qp(e.y,t.y,n.y)}function Hp(e,t,n){e.min=t.min-n.min,e.max=e.min+Ge(t)}function Jr(e,t,n){Hp(e.x,t.x,n.x),Hp(e.y,t.y,n.y)}function ft(e){return[e("x"),e("y")]}const Gp=({current:e})=>e?e.ownerDocument.defaultView:null,Kp=(e,t)=>Math.abs(e-t);function vS(e,t){const n=Kp(e.x,t.x),r=Kp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Yp{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:a=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=Tc(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=vS(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:v}=p,{timestamp:b}=Ve;this.history.push({...v,timestamp:b});const{onStart:_,onMove:k}=this.handlers;g||(_&&_(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=xc(g,this.transformPagePoint),Se.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Tc(p.type==="pointercancel"?this.lastMoveEventInfo:xc(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,_),v&&v(p,_)},!oc(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const s=Ur(t),c=xc(s,this.transformPagePoint),{point:l}=c,{timestamp:d}=Ve;this.history=[{...l,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Tc(c,this.history)),this.removeListeners=Ar(zr(this.contextWindow,"pointermove",this.handlePointerMove),zr(this.contextWindow,"pointerup",this.handlePointerUp),zr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Gt(this.updatePoint)}}function xc(e,t){return t?{point:t(e.point)}:e}function Xp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Tc({point:e},t){return{point:e,delta:Xp(e,Qp(t)),offset:Xp(e,yS(t)),velocity:bS(t,.1)}}function yS(e){return e[0]}function Qp(e){return e[e.length-1]}function bS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Qp(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ct(t)));)n--;if(!r)return{x:0,y:0};const o=dt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function _S(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Te(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Te(n,e,r.max):Math.min(e,n)),e}function Zp(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 wS(e,{top:t,left:n,bottom:r,right:i}){return{x:Zp(e.x,n,i),y:Zp(e.y,t,r)}}function em(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 kS(e,t){return{x:em(e.x,t.x),y:em(e.y,t.y)}}function SS(e,t){let n=.5;const r=Ge(e),i=Ge(t);return i>r?n=Or(t.min,t.max-r,e.min):r>i&&(n=Or(e.min,e.max-i,t.min)),Vt(0,1,n)}function xS(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 Mc=.35;function TS(e=Mc){return e===!1?e=0:e===!0&&(e=Mc),{x:tm(e,"left","right"),y:tm(e,"top","bottom")}}function tm(e,t,n){return{min:nm(e,t),max:nm(e,n)}}function nm(e,t){return typeof e=="number"?e:e[t]||0}const MS=new WeakMap;class CS{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=Pe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ur(f).point)},a=(f,p)=>{const{drag:g,dragPropagation:y,onDragStart:v}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fw(g),!this.openDragLock))return;this.latestPointerEvent=f,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),ft(_=>{let k=this.getAxisMotionValue(_).get()||0;if(Pt.test(k)){const{projection:M}=this.visualElement;if(M&&M.layout){const T=M.layout.layoutBox[_];T&&(k=Ge(T)*(parseFloat(k)/100))}}this.originPoint[_]=k}),v&&Se.postRender(()=>v(f,p)),wc(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:v,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:_}=p;if(y&&this.currentDirection===null){this.currentDirection=PS(_),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",p.point,_),this.updateAxis("y",p.point,_),this.visualElement.render(),b&&b(f,p)},c=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>ft(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Yp(t,{onSessionStart:o,onStart:a,onMove:s,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Gp(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&Se.postRender(()=>s(r,i))}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:i}=this.getProps();if(!r||!mo(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=_S(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&tr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=wS(r.layoutBox,t):this.constraints=!1,this.elastic=TS(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ft(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=xS(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Ek(r,i.root,this.visualElement.getTransformPagePoint());let a=kS(i.layout.layoutBox,o);if(n){const s=n(Mk(a));this.hasMutatedConstraints=!!s,s&&(a=wp(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=ft(d=>{if(!mo(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const p=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wc(this.visualElement,t),r.start(kc(t,r,0,n,this.visualElement,!1))}stopAnimation(){ft(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ft(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ft(n=>{const{drag:r}=this.getProps();if(!mo(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Te(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!tr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ft(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const c=s.get();i[a]=SS({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ft(a=>{if(!mo(a,t,null))return;const s=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];s.set(Te(c,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;MS.set(this.visualElement,this);const t=this.visualElement.current,n=zr(t,"pointerdown",c=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();tr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Se.read(r);const a=$r(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(ft(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=Mc,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function mo(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function PS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class ES extends Xt{constructor(t){super(t),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new CS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const rm=e=>(t,n)=>{e&&Se.postRender(()=>e(t,n))};class AS extends Xt{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(t){this.session=new Yp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Gp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:rm(t),onStart:rm(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Se.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=zr(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 go={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function im(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=im(e,t.target.x),r=im(e,t.target.y);return`${n}% ${r}%`}},OS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Yt.parse(e);if(i.length>5)return r;const o=Yt.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=c;const l=Te(s,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}};let Cc=!1;class IS extends mt{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;tk(DS),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Cc&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),go.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:a}=r;return a&&(a.isPresent=o,Cc=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Se.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ic.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Cc=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function om(e){const[t,n]=Gw(),r=ge(Kf);return O(IS,{...e,layoutGroup:r,switchLayoutGroup:ge(bp),isPresent:t,safeToRemove:n})}const DS={borderRadius:{...qr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qr,borderTopRightRadius:qr,borderBottomLeftRadius:qr,borderBottomRightRadius:qr,boxShadow:OS};function LS(e,t,n){const r=We(e)?e:Zn(e);return r.start(kc("",r,t,n)),r.animation}const jS=(e,t)=>e.depth-t.depth;class RS{constructor(){this.children=[],this.isDirty=!1}add(t){ws(this.children,t),this.isDirty=!0}remove(t){ks(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(jS),this.isDirty=!1,this.children.forEach(t)}}function VS(e,t){const n=Ye.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Gt(r),e(o-t))};return Se.setup(r,!0),()=>Gt(r)}const am=["TopLeft","TopRight","BottomLeft","BottomRight"],NS=am.length,sm=e=>typeof e=="string"?parseFloat(e):e,cm=e=>typeof e=="number"||G.test(e);function FS(e,t,n,r,i,o){i?(e.opacity=Te(0,n.opacity??1,BS(r)),e.opacityExit=Te(t.opacity??1,0,$S(r))):o&&(e.opacity=Te(t.opacity??1,n.opacity??1,r));for(let a=0;a<NS;a++){const s=`border${am[a]}Radius`;let c=lm(t,s),l=lm(n,s);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||cm(c)===cm(l)?(e[s]=Math.max(Te(sm(c),sm(l),r),0),(Pt.test(l)||Pt.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=Te(t.rotate||0,n.rotate||0,r))}function lm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const BS=um(0,.5,ah),$S=um(.5,.95,ut);function um(e,t,n){return r=>r<e?0:r>t?1:n(Or(e,t,r))}function dm(e,t){e.min=t.min,e.max=t.max}function ht(e,t){dm(e.x,t.x),dm(e.y,t.y)}function fm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function hm(e,t,n,r,i){return e-=t,e=po(e,1/n,r),i!==void 0&&(e=po(e,1/i,r)),e}function US(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pt.test(t)&&(t=parseFloat(t),t=Te(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Te(o.min,o.max,r);e===o&&(s-=t),e.min=hm(e.min,t,n,s,i),e.max=hm(e.max,t,n,s,i)}function pm(e,t,[n,r,i],o,a){US(e,t[n],t[r],t[i],t.scale,o,a)}const zS=["x","scaleX","originX"],WS=["y","scaleY","originY"];function mm(e,t,n,r){pm(e.x,t,zS,n?n.x:void 0,r?r.x:void 0),pm(e.y,t,WS,n?n.y:void 0,r?r.y:void 0)}function gm(e){return e.translate===0&&e.scale===1}function vm(e){return gm(e.x)&&gm(e.y)}function ym(e,t){return e.min===t.min&&e.max===t.max}function JS(e,t){return ym(e.x,t.x)&&ym(e.y,t.y)}function bm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _m(e,t){return bm(e.x,t.x)&&bm(e.y,t.y)}function wm(e){return Ge(e.x)/Ge(e.y)}function km(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class qS{constructor(){this.members=[]}add(t){ws(this.members,t),t.scheduleRender()}remove(t){if(ks(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(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];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:i}=t.options;i===!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 HS(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:d,rotateX:f,rotateY:p,skewX:g,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Pc=["","X","Y","Z"],GS=1e3;let KS=0;function Ec(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Sm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vp(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Se,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Sm(r)}function xm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t?.()){this.id=KS++,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(QS),this.nodes.forEach(n1),this.nodes.forEach(r1),this.nodes.forEach(ZS)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new RS)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Ts),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const c=this.eventHandlers.get(a);c&&c.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=rp(a)&&!Jw(a),this.instance=a;const{layoutId:s,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||s)&&(this.isLayoutDirty=!0),e){let d,f=0;const p=()=>this.root.updateBlockedByResize=!1;Se.read(()=>{f=window.innerWidth}),e(a,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,d&&d(),d=VS(p,250),go.hasAnimatedSinceResize&&(go.hasAnimatedSinceResize=!1,this.nodes.forEach(Cm)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&l&&(s||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||c1,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=l.getProps(),_=!this.targetLayout||!_m(this.targetLayout,g),k=!f&&p;if(this.options.layoutRoot||this.resumeFrom||k||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const M={...tc(y,"layout"),onPlay:v,onComplete:b};(l.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M),this.setAnimationOrigin(d,k)}else f||Cm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Gt(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(i1),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Sm(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Tm);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Mm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(t1),this.nodes.forEach(YS),this.nodes.forEach(XS)):this.nodes.forEach(Mm),this.clearAllSnapshots();const s=Ye.now();Ve.delta=Vt(0,16.666666666666668,s-Ve.timestamp),Ve.timestamp=s,Ve.isProcessing=!0,Ps.update.process(Ve),Ps.preRender.process(Ve),Ps.render.process(Ve),Ve.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ic.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(e1),this.sharedNodes.forEach(o1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ge(this.snapshot.measuredBox.x)&&!Ge(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 a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!vm(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;a&&this.instance&&(s||Tn(this.latestValues)||d)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return a&&(c=this.removeTransform(c)),l1(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Pe();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(u1))){const{scroll:l}=this.root;l&&(nr(s.x,l.offset.x),nr(s.y,l.offset.y))}return s}removeElementScroll(a){const s=Pe();if(ht(s,a),this.scroll?.wasRoot)return s;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ht(s,a),nr(s.x,d.offset.x),nr(s.y,d.offset.y))}return s}applyTransform(a,s=!1){const c=Pe();ht(c,a);for(let l=0;l<this.path.length;l++){const d=this.path[l];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&rr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Tn(d.latestValues)&&rr(c,d.latestValues)}return Tn(this.latestValues)&&rr(c,this.latestValues),c}removeTransform(a){const s=Pe();ht(s,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!Tn(l.latestValues))continue;vc(l.latestValues)&&l.updateSnapshot();const d=Pe(),f=l.measurePageBox();ht(d,f),mm(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return Tn(this.latestValues)&&mm(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Ve.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==s;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Ve.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Jr(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),ht(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ht(this.target,this.layout.layoutBox),Tp(this.target,this.targetDelta)):ht(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Jr(this.relativeTargetOrigin,this.target,p.target),ht(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||vc(this.parent.latestValues)||kp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ve.timestamp&&(c=!1),c)return;const{layout:l,layoutId:d}=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||d))return;ht(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;Pk(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Pe());const{target:g}=a;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fm(this.prevProjectionDelta.x,this.projectionDelta.x),fm(this.prevProjectionDelta.y,this.projectionDelta.y)),Wr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!km(this.projectionDelta.x,this.prevProjectionDelta.x)||!km(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ir(),this.projectionDelta=ir(),this.projectionDeltaWithTransform=ir()}setAnimationOrigin(a,s=!1){const c=this.snapshot,l=c?c.latestValues:{},d={...this.latestValues},f=ir();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=Pe(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=g!==y,b=this.getStack(),_=!b||b.members.length<=1,k=!!(v&&!_&&this.options.crossfade===!0&&!this.path.some(s1));this.animationProgress=0;let M;this.mixTargetDelta=T=>{const x=T/1e3;Pm(f.x,a.x,x),Pm(f.y,a.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jr(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),a1(this.relativeTarget,this.relativeTargetOrigin,p,x),M&&JS(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=Pe()),ht(M,this.relativeTarget)),v&&(this.animationValues=d,FS(d,l,this.latestValues,x,k,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Se.update(()=>{go.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zn(0)),this.currentAnimation=LS(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(GS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:c,layout:l,latestValues:d}=a;if(!(!s||!c||!l)){if(this!==a&&this.layout&&l&&Dm(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Pe();const f=Ge(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const p=Ge(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}ht(s,c),rr(s,d),Wr(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new qS),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const l={};c.z&&Ec("z",a,l,this.animationValues);for(let d=0;d<Pc.length;d++)Ec(`rotate${Pc[d]}`,a,l,this.animationValues),Ec(`skew${Pc[d]}`,a,l,this.animationValues);a.render();for(const d in l)a.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=ho(s?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=ho(s?.pointerEvents)||""),this.hasProjected&&!Tn(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=HS(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),a.transform=f;const{x:p,y:g}=this.projectionDelta;a.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,l.animationValues?a.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const y in Br){if(d[y]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:_}=Br[y],k=f==="none"?d[y]:v(d[y],l);if(b){const M=b.length;for(let T=0;T<M;T++)a[b[T]]=k}else _?this.options.visualElement.renderState.vars[y]=k:a[y]=k}this.options.layoutId&&(a.pointerEvents=l===this?ho(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Tm),this.root.sharedNodes.clear()}}}function YS(e){e.updateLayout()}function XS(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?ft(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],p=Ge(f);f.min=n[d].min,f.max=f.min+p}):Dm(i,t.layoutBox,n)&&ft(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],p=Ge(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=ir();Wr(a,n,t.layoutBox);const s=ir();o?Wr(s,e.applyTransform(r,!0),t.measuredBox):Wr(s,n,t.layoutBox);const c=!vm(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const g=Pe();Jr(g,t.layoutBox,f.layoutBox);const y=Pe();Jr(y,n,p.layoutBox),_m(g,y)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function QS(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 ZS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function e1(e){e.clearSnapshot()}function Tm(e){e.clearMeasurements()}function Mm(e){e.isLayoutDirty=!1}function t1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Cm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function n1(e){e.resolveTargetDelta()}function r1(e){e.calcProjection()}function i1(e){e.resetSkewAndRotation()}function o1(e){e.removeLeadSnapshot()}function Pm(e,t,n){e.translate=Te(t.translate,0,n),e.scale=Te(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Em(e,t,n,r){e.min=Te(t.min,n.min,r),e.max=Te(t.max,n.max,r)}function a1(e,t,n,r){Em(e.x,t.x,n.x,r),Em(e.y,t.y,n.y,r)}function s1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const c1={duration:.45,ease:[.4,0,.1,1]},Am=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Om=Am("applewebkit/")&&!Am("chrome/")?Math.round:ut;function Im(e){e.min=Om(e.min),e.max=Om(e.max)}function l1(e){Im(e.x),Im(e.y)}function Dm(e,t,n){return e==="position"||e==="preserve-aspect"&&!mS(wm(t),wm(n),.2)}function u1(e){return e!==e.root&&e.scroll?.wasRoot}const d1=xm({attachResizeListener:(e,t)=>$r(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ac={current:void 0},Lm=xm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ac.current){const e=new d1({});e.mount(window),e.setOptions({layoutScroll:!0}),Ac.current=e}return Ac.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),f1={pan:{Feature:AS},drag:{Feature:ES,ProjectionNode:Lm,MeasureLayout:om}};function jm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&Se.postRender(()=>o(t,Ur(t)))}class h1 extends Xt{mount(){const{current:t}=this.node;t&&(this.unmount=Bw(t,(n,r)=>(jm(this.node,r,"Start"),i=>jm(this.node,i,"End"))))}unmount(){}}class p1 extends Xt{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=Ar($r(this.node.current,"focus",()=>this.onFocus()),$r(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rm(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 i="onTap"+(n==="End"?"":n),o=r[i];o&&Se.postRender(()=>o(t,Ur(t)))}class m1 extends Xt{mount(){const{current:t}=this.node;t&&(this.unmount=Ww(t,(n,r)=>(Rm(this.node,r,"Start"),(i,{success:o})=>Rm(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Oc=new WeakMap,Ic=new WeakMap,g1=e=>{const t=Oc.get(e.target);t&&t(e)},v1=e=>{e.forEach(g1)};function y1({root:e,...t}){const n=e||document;Ic.has(n)||Ic.set(n,{});const r=Ic.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(v1,{root:e,...t})),r[i]}function b1(e,t,n){const r=y1(t);return Oc.set(e,n),r.observe(e),()=>{Oc.delete(e),r.unobserve(e)}}const _1={some:0,all:1};class w1 extends Xt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:_1[i]},s=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:d,onViewportLeave:f}=this.node.getProps(),p=l?d:f;p&&p(c)};return b1(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(k1(t,n))&&this.startObserver()}unmount(){}}function k1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const S1={...lS,...{inView:{Feature:w1},tap:{Feature:m1},focus:{Feature:p1},hover:{Feature:h1}},...f1,...{layout:{ProjectionNode:Lm,MeasureLayout:om}}},vo=Tk(S1,Nk);function x1(){const{agentData:e}=_n(),[t,n]=Z(0),r=96,i=1e4,{isMobileDevice:o}=ys();Q(()=>{const s=Date.now(),c=()=>{const l=Date.now()-s,d=Math.min(l/i*100,r);n(d),d<r&&requestAnimationFrame(c)};requestAnimationFrame(c)},[]);const a=e?.image_url;return O("div",{className:"absolute inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute inset-0 w-full h-full bg-black"}),a&&O("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center scale-125",style:{backgroundImage:`url(${a})`,filter:"blur(25px) brightness(0.5)"}}),O(vo.div,{initial:{filter:"blur(12px)",opacity:0},animate:{filter:"blur(0px)",opacity:1},transition:{duration:.2,ease:"easeOut"},className:`absolute inset-0 w-full h-full flex flex-col items-center justify-center ${o?"pb-6 px-4":"pb-4 px-8 "}`,children:O("div",{className:"flex flex-col items-center text-white",children:[O("h2",{className:"text-lg font-medium mb-2 text-center",children:"You're about to speak with an AI."}),O("div",{className:"w-25 h-3 bg-white/30 rounded-full overflow-hidden mb-6",children:O("div",{className:"h-full bg-white rounded-full transition-all duration-100 ease-linear",style:{width:`${t}%`}})}),O("div",{className:"flex justify-center",children:O("span",{className:"font-light text-xs text-center text-white",children:["This call may be recorded and shared with our service providers."," ",O("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline decoration-white/50 hover:text-white transition-colors",children:"Learn more"})]})})]})})]})}const T1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),M1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Vm=e=>{const t=M1(e);return t.charAt(0).toUpperCase()+t.slice(1)},Nm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),C1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var P1={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"};const E1=it(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},c)=>ce("svg",{ref:c,...P1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Nm("lucide",i),...!o&&!C1(s)&&{"aria-hidden":"true"},...s},[...a.map(([l,d])=>ce(l,d)),...Array.isArray(o)?o:[o]]));const Hr=(e,t)=>{const n=it(({className:r,...i},o)=>ce(E1,{ref:o,iconNode:t,className:Nm(`lucide-${T1(Vm(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Vm(e),n};const A1=Hr("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const O1=Hr("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const I1=Hr("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const D1=Hr("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);const Fm=Hr("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);function Dc({msg:e,isError:t=!1,showSpinner:n=!1}){return O("div",{className:"absolute top-2 left-2 right-15 flex items-center justify-between z-10 text-white/75",children:O("div",{className:`${t?"bg-red-600/25":"bg-gray-40/25"} backdrop-blur-sm rounded-2xl py-2.5 px-4 flex-1 shadow-inset-white-10 flex items-center gap-2`,children:[n&&O(I1,{className:"animate-spin",size:16}),O("p",{className:"text-sm font-normal",children:e||"An error occurred. Please try again."})]})})}function L1(){const{agentData:e}=_n(),{errorMsg:t,resetErrors:n}=eo(),{resetDailyState:r}=Rt(),i=e?.image_url,o=()=>{r(),n()};return O("div",{className:"fixed inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute w-full h-full bg-black"}),i&&O("div",{className:"absolute w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${i})`,filter:"blur(25px) brightness(0.5)"}}),O(Dc,{msg:t,isError:!0}),O("button",{onClick:o,className:"absolute flex items-center justify-center","aria-label":"Play video",children:O("span",{className:"opacity-100 hover:opacity-80 transition-opacity cursor-pointer",children:O(Fm,{size:40,fill:"white",color:"none"})})})]})}const Bm=Ie(void 0);function j1({children:e}){const[t,n]=Z(""),[r,i]=Z(""),{hasJoinedRoom:o}=Rt(),{hasUserInteracted:a}=Er(),s=gs(),c=yn({filter:"remote"}),l=de(!1),d="hello",f=()=>{l.current=!1};return Q(()=>{if(c.length>0&&o&&a&&!l.current){l.current=!0;let g;r?(n(r),g=r):g=d,s({event:"chat-msg",message:g,name:"Guest"},"*"),i("")}},[r,o,c,a,l]),O(Bm.Provider,{value:{lastMessage:t,setLastMessage:n,queuedMessage:r,setQueuedMessage:i,resetInitMsg:f},children:e})}function $m(){const e=ge(Bm);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e}function R1({title:e,titleId:t,...n},r){return ce("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ce("title",{id:t},e):null,ce("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),ce("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const V1=it(R1);function N1({title:e,titleId:t,...n},r){return ce("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ce("title",{id:t},e):null,ce("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM12.95 3.05a.75.75 0 1 0-1.06 1.06 5.5 5.5 0 0 1 0 7.78.75.75 0 1 0 1.06 1.06 7 7 0 0 0 0-9.9Z"}),ce("path",{d:"M10.828 5.172a.75.75 0 1 0-1.06 1.06 2.5 2.5 0 0 1 0 3.536.75.75 0 1 0 1.06 1.06 4 4 0 0 0 0-5.656Z"}))}const F1=it(N1);function B1({title:e,titleId:t,...n},r){return ce("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ce("title",{id:t},e):null,ce("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22 1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94l-1.22-1.22Z"}))}const $1=it(B1);function U1({title:e,titleId:t,...n},r){return ce("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ce("title",{id:t},e):null,ce("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"}))}const Um=it(U1),z1=it(function({title:t,titleId:n,...r},i){return O("svg",{ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-labelledby":n,...r,children:[t?O("title",{id:n,children:t}):null,O("path",{d:"M3.33157 2.40868C3.66659 2.09013 4.19642 2.10349 4.51497 2.43851L17.0321 15.6032C17.3507 15.9382 17.3373 16.4681 17.0023 16.7866C16.6673 17.1051 16.1374 17.0918 15.8189 16.7568L3.30173 3.59208C2.98318 3.25705 2.99654 2.72722 3.33157 2.40868Z",fill:"currentColor"}),O("path",{d:"M4.6877 7.8125C5.20547 7.8125 5.6252 8.23223 5.6252 8.75C5.6252 11.1662 7.58395 13.125 10.0002 13.125C10.7088 13.125 11.3769 12.9543 11.9689 12.6553L13.301 14.0566C12.5948 14.4968 11.7951 14.8007 10.9377 14.9297V16.875H12.8127C13.3305 16.875 13.7502 17.2947 13.7502 17.8125C13.7502 18.3303 13.3305 18.75 12.8127 18.75H7.1877C6.66993 18.75 6.2502 18.3303 6.2502 17.8125C6.2502 17.2947 6.66993 16.875 7.1877 16.875H9.0627V14.9297C6.05569 14.4773 3.7502 11.8831 3.7502 8.75C3.7502 8.23223 4.16993 7.8125 4.6877 7.8125Z",fill:"currentColor"}),O("path",{d:"M15.3127 7.8125C15.8305 7.8125 16.2502 8.23223 16.2502 8.75C16.2502 9.94681 15.9127 11.0644 15.3293 12.0146L13.9709 10.5859C14.2295 10.0275 14.3752 9.4059 14.3752 8.75C14.3752 8.23223 14.7949 7.8125 15.3127 7.8125Z",fill:"currentColor"}),O("path",{d:"M10.5676 11.1826C10.3851 11.225 10.1956 11.25 10.0002 11.25C8.61949 11.25 7.5002 10.1307 7.5002 8.75V7.95508L10.5676 11.1826Z",fill:"currentColor"}),O("path",{d:"M10.0002 1.25C11.3809 1.25 12.5002 2.36929 12.5002 3.75V8.75C12.5002 8.8421 12.4943 8.93294 12.4846 9.02246L7.5002 3.78027V3.75C7.5002 2.36929 8.61949 1.25 10.0002 1.25Z",fill:"currentColor"})]})}),W1=5e3,J1=5e3,ar="/imagine",zm="Sunset";function q1({onClose:e}){const[t,n]=Z(0),{lastMessage:r,setLastMessage:i,setQueuedMessage:o}=$m(),{isMicMuted:a,setIsMicMuted:s,isAudioMuted:c,setIsAudioMuted:l}=vs(),{setHasUserInteracted:d}=Er(),{hasJoinedRoom:f,isAgentVideoReady:p,setIsImageChangeRequested:g}=Rt(),{agentData:y}=_n(),v=gs(),b=yn({filter:"remote"}),[_,k]=Z(""),[M,T]=Z(40),[x,C]=Z(!1),A=de(null),E=de(null),[R]=Z(!1),[B,V]=Z(!1),[z,j]=Z(!1),{isMobileDevice:X}=ys(),[ie,me]=Z("Type here"),J=de(null),[F,q]=Z(""),H=de(null),we=de(0),Xe=y?.allow_image_edits||!1;Q(()=>{if(!r){C(!1);return}return b.length>0&&p&&(C(!0),j(!1)),E.current!==null&&clearTimeout(E.current),E.current=window.setTimeout(()=>{j(!0),E.current=null},W1),()=>{E.current!==null&&(clearTimeout(E.current),E.current=null)}},[t,r,b,p]),Q(()=>{if(A.current&&_){A.current.style.height="auto";const P=A.current.scrollHeight,I=Math.min(P,128);A.current.style.height=`${P}px`,T(I)}else A.current&&!_&&(A.current.style.height="40px",T(40))},[_]),Q(()=>(p&&Xe?(me("Type here"),J.current!==null&&clearInterval(J.current),J.current=window.setInterval(()=>{me(P=>P==="Type here"?ar:"Type here")},J1)):(me("Type here"),J.current!==null&&(clearInterval(J.current),J.current=null)),()=>{J.current!==null&&(clearInterval(J.current),J.current=null)}),[p,Xe]),Q(()=>{if(ie===ar){we.current=0,q("");const I=()=>{if(we.current<zm.length){we.current=we.current+1;const L=zm.slice(0,we.current);q(L),H.current=window.setTimeout(I,100)}};H.current=window.setTimeout(I,0)}else H.current!==null&&(clearTimeout(H.current),H.current=null),q(""),we.current=0;return()=>{H.current!==null&&(clearTimeout(H.current),H.current=null)}},[ie]);const u=()=>{if(d(!0),_.trim()){const P=_.trim();k(""),f&&b.length>0?(v({event:"chat-msg",message:P,name:"Guest"},"*"),P.toLowerCase().startsWith(ar)?g(!0):(i(P),n(I=>I+1))):P.toLowerCase().startsWith(ar)||o(P)}else k("")},m=P=>{const I=P.target;k(I.value)},h=P=>{P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),u())},w=async()=>{d(!0),s(!a)},S=()=>{l(!c)};return O(Ke,{children:[x&&O("div",{className:"absolute left-2 right-2 flex justify-center z-10",style:{bottom:`${M+24}px`},children:O("div",{onAnimationEnd:()=>{z&&(C(!1),j(!1),i(""))},style:{animation:z?"fadeOutUp 0.2s ease-out forwards":"fadeInUp 0.2s ease-out forwards"},className:"mx-auto bg-black/20 backdrop-blur-xl text-white rounded-2xl px-3 py-2 text-sm text-center max-w-[90%] overflow-hidden",children:O("div",{className:"line-clamp-4",children:r})},t)}),O("div",{className:"absolute bottom-0 left-0 right-0 p-2 flex items-end gap-1 pt-4",children:[O("div",{class:"absolute w-full h-full left-0 right-0 pointer-events-none bottom-0 z-0",children:[O("div",{class:"absolute inset-0 backdrop-blur-[1px] mask-[linear-gradient(rgba(0,0,0,0),rgba(0,0,0,1)_10%,rgba(0,0,0,1)_30%,rgba(0,0,0,0)_40%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[2px] mask-[linear-gradient(rgba(0,0,0,0)_10%,rgba(0,0,0,1)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,0)_50%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[4px] mask-[linear-gradient(rgba(0,0,0,0)_15%,rgba(0,0,0,1)_30%,rgba(0,0,0,1)_50%,rgba(0,0,0,0)_60%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[8px] mask-[linear-gradient(rgba(0,0,0,0)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,0)_70%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[16px] mask-[linear-gradient(rgba(0,0,0,0)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,1)_80%,rgba(0,0,0,0)_90%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[32px] mask-[linear-gradient(rgba(0,0,0,0)_60%,rgba(0,0,0,1)_80%)]"}),O("div",{class:"absolute inset-0 z-10 backdrop-blur-[64px] mask-[linear-gradient(rgba(0,0,0,0)_70%,rgba(0,0,0,1)_100%)]"}),O("div",{class:"absolute inset-0 bg-[linear-gradient(transparent,#000000)]"})]}),O(vo.div,{className:`flex items-center w-full z-10 ${X?"justify-between":""}`,children:[!X&&O(vo.div,{layout:!0,className:"flex-1",children:O("div",{className:`
38
38
  relative flex gap-0 items-center w-full bg-white/10 hover:bg-white/15 transition-colors duration-150
39
39
  rounded-[22px] shadow-lg shadow-inset-white-10 min-h-11
40
40
  ${B?"shadow-focused":"shadow-inset-white-10"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemonsliceai/lemon-slice-widget",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "description": "The LemonSlice widget",
6
6
  "main": "./dist/index.js",