react-pro-messenger 1.0.29 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,14 +1,14 @@
1
- (function(fe,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(fe=typeof globalThis<"u"?globalThis:fe||self,x(fe.ReactProMessenger={},fe.React,fe.ReactDOM))})(this,function(fe,x,$e){"use strict";var Ld=Object.defineProperty;var kd=(fe,x,$e)=>x in fe?Ld(fe,x,{enumerable:!0,configurable:!0,writable:!0,value:$e}):fe[x]=$e;var Te=(fe,x,$e)=>(kd(fe,typeof x!="symbol"?x+"":x,$e),$e);function ra(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const tn=ra(x);var m={exports:{}},ct={};var _r;function sa(){if(_r)return ct;_r=1;var e=x,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(l,a,c){var u,f={},h=null,g=null;c!==void 0&&(h=""+c),a.key!==void 0&&(h=""+a.key),a.ref!==void 0&&(g=a.ref);for(u in a)r.call(a,u)&&!i.hasOwnProperty(u)&&(f[u]=a[u]);if(l&&l.defaultProps)for(u in a=l.defaultProps,a)f[u]===void 0&&(f[u]=a[u]);return{$$typeof:t,type:l,key:h,ref:g,props:f,_owner:s.current}}return ct.Fragment=n,ct.jsx=o,ct.jsxs=o,ct}var ft={};var Ir;function ia(){return Ir||(Ir=1,process.env.NODE_ENV!=="production"&&function(){var e=x,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function P(d){if(d===null||typeof d!="object")return null;var w=b&&d[b]||d[y];return typeof w=="function"?w:null}var T=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(d){{for(var w=arguments.length,A=new Array(w>1?w-1:0),F=1;F<w;F++)A[F-1]=arguments[F];E("error",d,A)}}function E(d,w,A){{var F=T.ReactDebugCurrentFrame,q=F.getStackAddendum();q!==""&&(w+="%s",A=A.concat([q]));var J=A.map(function(Y){return String(Y)});J.unshift("Warning: "+w),Function.prototype.apply.call(console[d],console,J)}}var V=!1,p=!1,M=!1,$=!1,R=!1,X;X=Symbol.for("react.module.reference");function N(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===i||R||d===s||d===c||d===u||$||d===g||V||p||M||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===f||d.$$typeof===o||d.$$typeof===l||d.$$typeof===a||d.$$typeof===X||d.getModuleId!==void 0))}function se(d,w,A){var F=d.displayName;if(F)return F;var q=w.displayName||w.name||"";return q!==""?A+"("+q+")":A}function ye(d){return d.displayName||"Context"}function ae(d){if(d==null)return null;if(typeof d.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case s:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case l:var w=d;return ye(w)+".Consumer";case o:var A=d;return ye(A._context)+".Provider";case a:return se(d,d.render,"ForwardRef");case f:var F=d.displayName||null;return F!==null?F:ae(d.type)||"Memo";case h:{var q=d,J=q._payload,Y=q._init;try{return ae(Y(J))}catch{return null}}}return null}var ne=Object.assign,ve=0,le,Z,ue,Pe,v,S,D;function _(){}_.__reactDisabledLog=!0;function O(){{if(ve===0){le=console.log,Z=console.info,ue=console.warn,Pe=console.error,v=console.group,S=console.groupCollapsed,D=console.groupEnd;var d={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}ve++}}function k(){{if(ve--,ve===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ne({},d,{value:le}),info:ne({},d,{value:Z}),warn:ne({},d,{value:ue}),error:ne({},d,{value:Pe}),group:ne({},d,{value:v}),groupCollapsed:ne({},d,{value:S}),groupEnd:ne({},d,{value:D})})}ve<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=T.ReactCurrentDispatcher,B;function U(d,w,A){{if(B===void 0)try{throw Error()}catch(q){var F=q.stack.trim().match(/\n( *(at )?)/);B=F&&F[1]||""}return`
2
- `+B+d}}var K=!1,W;{var me=typeof WeakMap=="function"?WeakMap:Map;W=new me}function j(d,w){if(!d||K)return"";{var A=W.get(d);if(A!==void 0)return A}var F;K=!0;var q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var J;J=I.current,I.current=null,O();try{if(w){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(Le){F=Le}Reflect.construct(d,[],Y)}else{try{Y.call()}catch(Le){F=Le}d.call(Y.prototype)}}else{try{throw Error()}catch(Le){F=Le}d()}}catch(Le){if(Le&&F&&typeof Le.stack=="string"){for(var z=Le.stack.split(`
3
- `),xe=F.stack.split(`
4
- `),ie=z.length-1,oe=xe.length-1;ie>=1&&oe>=0&&z[ie]!==xe[oe];)oe--;for(;ie>=1&&oe>=0;ie--,oe--)if(z[ie]!==xe[oe]){if(ie!==1||oe!==1)do if(ie--,oe--,oe<0||z[ie]!==xe[oe]){var Ee=`
5
- `+z[ie].replace(" at new "," at ");return d.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",d.displayName)),typeof d=="function"&&W.set(d,Ee),Ee}while(ie>=1&&oe>=0);break}}}finally{K=!1,I.current=J,k(),Error.prepareStackTrace=q}var ut=d?d.displayName||d.name:"",na=ut?U(ut):"";return typeof d=="function"&&W.set(d,na),na}function Ce(d,w,A){return j(d,!1)}function at(d){var w=d.prototype;return!!(w&&w.isReactComponent)}function Ge(d,w,A){if(d==null)return"";if(typeof d=="function")return j(d,at(d));if(typeof d=="string")return U(d);switch(d){case c:return U("Suspense");case u:return U("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case a:return Ce(d.render);case f:return Ge(d.type,w,A);case h:{var F=d,q=F._payload,J=F._init;try{return Ge(J(q),w,A)}catch{}}}return""}var Qt=Object.prototype.hasOwnProperty,zo={},Yo=T.ReactDebugCurrentFrame;function en(d){if(d){var w=d._owner,A=Ge(d.type,d._source,w?w.type:null);Yo.setExtraStackFrame(A)}else Yo.setExtraStackFrame(null)}function pd(d,w,A,F,q){{var J=Function.call.bind(Qt);for(var Y in d)if(J(d,Y)){var z=void 0;try{if(typeof d[Y]!="function"){var xe=Error((F||"React class")+": "+A+" type `"+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[Y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw xe.name="Invariant Violation",xe}z=d[Y](w,Y,F,A,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ie){z=ie}z&&!(z instanceof Error)&&(en(q),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",F||"React class",A,Y,typeof z),en(null)),z instanceof Error&&!(z.message in zo)&&(zo[z.message]=!0,en(q),C("Failed %s type: %s",A,z.message),en(null))}}}var md=Array.isArray;function Rr(d){return md(d)}function gd(d){{var w=typeof Symbol=="function"&&Symbol.toStringTag,A=w&&d[Symbol.toStringTag]||d.constructor.name||"Object";return A}}function yd(d){try{return Ko(d),!1}catch{return!0}}function Ko(d){return""+d}function qo(d){if(yd(d))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gd(d)),Ko(d)}var Vt=T.ReactCurrentOwner,vd={key:!0,ref:!0,__self:!0,__source:!0},Go,Ho,Vr;Vr={};function xd(d){if(Qt.call(d,"ref")){var w=Object.getOwnPropertyDescriptor(d,"ref").get;if(w&&w.isReactWarning)return!1}return d.ref!==void 0}function bd(d){if(Qt.call(d,"key")){var w=Object.getOwnPropertyDescriptor(d,"key").get;if(w&&w.isReactWarning)return!1}return d.key!==void 0}function Td(d,w){if(typeof d.ref=="string"&&Vt.current&&w&&Vt.current.stateNode!==w){var A=ae(Vt.current.type);Vr[A]||(C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',ae(Vt.current.type),d.ref),Vr[A]=!0)}}function wd(d,w){{var A=function(){Go||(Go=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};A.isReactWarning=!0,Object.defineProperty(d,"key",{get:A,configurable:!0})}}function Sd(d,w){{var A=function(){Ho||(Ho=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};A.isReactWarning=!0,Object.defineProperty(d,"ref",{get:A,configurable:!0})}}var Pd=function(d,w,A,F,q,J,Y){var z={$$typeof:t,type:d,key:w,ref:A,props:Y,_owner:J};return z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(z,"_self",{configurable:!1,enumerable:!1,writable:!1,value:F}),Object.defineProperty(z,"_source",{configurable:!1,enumerable:!1,writable:!1,value:q}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z};function Cd(d,w,A,F,q){{var J,Y={},z=null,xe=null;A!==void 0&&(qo(A),z=""+A),bd(w)&&(qo(w.key),z=""+w.key),xd(w)&&(xe=w.ref,Td(w,q));for(J in w)Qt.call(w,J)&&!vd.hasOwnProperty(J)&&(Y[J]=w[J]);if(d&&d.defaultProps){var ie=d.defaultProps;for(J in ie)Y[J]===void 0&&(Y[J]=ie[J])}if(z||xe){var oe=typeof d=="function"?d.displayName||d.name||"Unknown":d;z&&wd(Y,oe),xe&&Sd(Y,oe)}return Pd(d,z,xe,q,F,Vt.current,Y)}}var Or=T.ReactCurrentOwner,Xo=T.ReactDebugCurrentFrame;function lt(d){if(d){var w=d._owner,A=Ge(d.type,d._source,w?w.type:null);Xo.setExtraStackFrame(A)}else Xo.setExtraStackFrame(null)}var Lr;Lr=!1;function kr(d){return typeof d=="object"&&d!==null&&d.$$typeof===t}function Zo(){{if(Or.current){var d=ae(Or.current.type);if(d)return`
1
+ (function(de,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(de=typeof globalThis<"u"?globalThis:de||self,x(de.ReactProMessenger={},de.React,de.ReactDOM))})(this,function(de,x,$e){"use strict";var Ld=Object.defineProperty;var kd=(de,x,$e)=>x in de?Ld(de,x,{enumerable:!0,configurable:!0,writable:!0,value:$e}):de[x]=$e;var Te=(de,x,$e)=>(kd(de,typeof x!="symbol"?x+"":x,$e),$e);function ra(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const nn=ra(x);var p={exports:{}},ft={};var Ir;function sa(){if(Ir)return ft;Ir=1;var e=x,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(l,a,c){var u,f={},h=null,m=null;c!==void 0&&(h=""+c),a.key!==void 0&&(h=""+a.key),a.ref!==void 0&&(m=a.ref);for(u in a)r.call(a,u)&&!i.hasOwnProperty(u)&&(f[u]=a[u]);if(l&&l.defaultProps)for(u in a=l.defaultProps,a)f[u]===void 0&&(f[u]=a[u]);return{$$typeof:t,type:l,key:h,ref:m,props:f,_owner:s.current}}return ft.Fragment=n,ft.jsx=o,ft.jsxs=o,ft}var dt={};var Nr;function ia(){return Nr||(Nr=1,process.env.NODE_ENV!=="production"&&function(){var e=x,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,y="@@iterator";function S(d){if(d===null||typeof d!="object")return null;var T=v&&d[v]||d[y];return typeof T=="function"?T:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function P(d){{for(var T=arguments.length,A=new Array(T>1?T-1:0),B=1;B<T;B++)A[B-1]=arguments[B];C("error",d,A)}}function C(d,T,A){{var B=b.ReactDebugCurrentFrame,X=B.getStackAddendum();X!==""&&(T+="%s",A=A.concat([X]));var Q=A.map(function(q){return String(q)});Q.unshift("Warning: "+T),Function.prototype.apply.call(console[d],console,Q)}}var O=!1,g=!1,L=!1,Y=!1,E=!1,F;F=Symbol.for("react.module.reference");function G(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===i||E||d===s||d===c||d===u||Y||d===m||O||g||L||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===f||d.$$typeof===o||d.$$typeof===l||d.$$typeof===a||d.$$typeof===F||d.getModuleId!==void 0))}function ne(d,T,A){var B=d.displayName;if(B)return B;var X=T.displayName||T.name||"";return X!==""?A+"("+X+")":A}function ve(d){return d.displayName||"Context"}function U(d){if(d==null)return null;if(typeof d.tag=="number"&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case s:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case l:var T=d;return ve(T)+".Consumer";case o:var A=d;return ve(A._context)+".Provider";case a:return ne(d,d.render,"ForwardRef");case f:var B=d.displayName||null;return B!==null?B:U(d.type)||"Memo";case h:{var X=d,Q=X._payload,q=X._init;try{return U(q(Q))}catch{return null}}}return null}var te=Object.assign,ce=0,fe,H,ie,xe,w,V,W;function D(){}D.__reactDisabledLog=!0;function j(){{if(ce===0){fe=console.log,H=console.info,ie=console.warn,xe=console.error,w=console.group,V=console.groupCollapsed,W=console.groupEnd;var d={configurable:!0,enumerable:!0,value:D,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}ce++}}function R(){{if(ce--,ce===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},d,{value:fe}),info:te({},d,{value:H}),warn:te({},d,{value:ie}),error:te({},d,{value:xe}),group:te({},d,{value:w}),groupCollapsed:te({},d,{value:V}),groupEnd:te({},d,{value:W})})}ce<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var k=b.ReactCurrentDispatcher,_;function I(d,T,A){{if(_===void 0)try{throw Error()}catch(X){var B=X.stack.trim().match(/\n( *(at )?)/);_=B&&B[1]||""}return`
2
+ `+_+d}}var z=!1,$;{var ge=typeof WeakMap=="function"?WeakMap:Map;$=new ge}function M(d,T){if(!d||z)return"";{var A=$.get(d);if(A!==void 0)return A}var B;z=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Q;Q=k.current,k.current=null,j();try{if(T){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(Le){B=Le}Reflect.construct(d,[],q)}else{try{q.call()}catch(Le){B=Le}d.call(q.prototype)}}else{try{throw Error()}catch(Le){B=Le}d()}}catch(Le){if(Le&&B&&typeof Le.stack=="string"){for(var K=Le.stack.split(`
3
+ `),be=B.stack.split(`
4
+ `),ae=K.length-1,le=be.length-1;ae>=1&&le>=0&&K[ae]!==be[le];)le--;for(;ae>=1&&le>=0;ae--,le--)if(K[ae]!==be[le]){if(ae!==1||le!==1)do if(ae--,le--,le<0||K[ae]!==be[le]){var Ee=`
5
+ `+K[ae].replace(" at new "," at ");return d.displayName&&Ee.includes("<anonymous>")&&(Ee=Ee.replace("<anonymous>",d.displayName)),typeof d=="function"&&$.set(d,Ee),Ee}while(ae>=1&&le>=0);break}}}finally{z=!1,k.current=Q,R(),Error.prepareStackTrace=X}var ct=d?d.displayName||d.name:"",na=ct?I(ct):"";return typeof d=="function"&&$.set(d,na),na}function Ce(d,T,A){return M(d,!1)}function lt(d){var T=d.prototype;return!!(T&&T.isReactComponent)}function Ge(d,T,A){if(d==null)return"";if(typeof d=="function")return M(d,lt(d));if(typeof d=="string")return I(d);switch(d){case c:return I("Suspense");case u:return I("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case a:return Ce(d.render);case f:return Ge(d.type,T,A);case h:{var B=d,X=B._payload,Q=B._init;try{return Ge(Q(X),T,A)}catch{}}}return""}var en=Object.prototype.hasOwnProperty,zo={},Yo=b.ReactDebugCurrentFrame;function tn(d){if(d){var T=d._owner,A=Ge(d.type,d._source,T?T.type:null);Yo.setExtraStackFrame(A)}else Yo.setExtraStackFrame(null)}function pd(d,T,A,B,X){{var Q=Function.call.bind(en);for(var q in d)if(Q(d,q)){var K=void 0;try{if(typeof d[q]!="function"){var be=Error((B||"React class")+": "+A+" type `"+q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[q]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw be.name="Invariant Violation",be}K=d[q](T,q,B,A,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ae){K=ae}K&&!(K instanceof Error)&&(tn(X),P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",B||"React class",A,q,typeof K),tn(null)),K instanceof Error&&!(K.message in zo)&&(zo[K.message]=!0,tn(X),P("Failed %s type: %s",A,K.message),tn(null))}}}var md=Array.isArray;function Vr(d){return md(d)}function gd(d){{var T=typeof Symbol=="function"&&Symbol.toStringTag,A=T&&d[Symbol.toStringTag]||d.constructor.name||"Object";return A}}function yd(d){try{return Ko(d),!1}catch{return!0}}function Ko(d){return""+d}function qo(d){if(yd(d))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gd(d)),Ko(d)}var Ot=b.ReactCurrentOwner,vd={key:!0,ref:!0,__self:!0,__source:!0},Go,Ho,Or;Or={};function xd(d){if(en.call(d,"ref")){var T=Object.getOwnPropertyDescriptor(d,"ref").get;if(T&&T.isReactWarning)return!1}return d.ref!==void 0}function bd(d){if(en.call(d,"key")){var T=Object.getOwnPropertyDescriptor(d,"key").get;if(T&&T.isReactWarning)return!1}return d.key!==void 0}function Td(d,T){if(typeof d.ref=="string"&&Ot.current&&T&&Ot.current.stateNode!==T){var A=U(Ot.current.type);Or[A]||(P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',U(Ot.current.type),d.ref),Or[A]=!0)}}function wd(d,T){{var A=function(){Go||(Go=!0,P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",T))};A.isReactWarning=!0,Object.defineProperty(d,"key",{get:A,configurable:!0})}}function Sd(d,T){{var A=function(){Ho||(Ho=!0,P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",T))};A.isReactWarning=!0,Object.defineProperty(d,"ref",{get:A,configurable:!0})}}var Pd=function(d,T,A,B,X,Q,q){var K={$$typeof:t,type:d,key:T,ref:A,props:q,_owner:Q};return K._store={},Object.defineProperty(K._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(K,"_self",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.defineProperty(K,"_source",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.freeze&&(Object.freeze(K.props),Object.freeze(K)),K};function Cd(d,T,A,B,X){{var Q,q={},K=null,be=null;A!==void 0&&(qo(A),K=""+A),bd(T)&&(qo(T.key),K=""+T.key),xd(T)&&(be=T.ref,Td(T,X));for(Q in T)en.call(T,Q)&&!vd.hasOwnProperty(Q)&&(q[Q]=T[Q]);if(d&&d.defaultProps){var ae=d.defaultProps;for(Q in ae)q[Q]===void 0&&(q[Q]=ae[Q])}if(K||be){var le=typeof d=="function"?d.displayName||d.name||"Unknown":d;K&&wd(q,le),be&&Sd(q,le)}return Pd(d,K,be,X,B,Ot.current,q)}}var Lr=b.ReactCurrentOwner,Xo=b.ReactDebugCurrentFrame;function ut(d){if(d){var T=d._owner,A=Ge(d.type,d._source,T?T.type:null);Xo.setExtraStackFrame(A)}else Xo.setExtraStackFrame(null)}var kr;kr=!1;function _r(d){return typeof d=="object"&&d!==null&&d.$$typeof===t}function Zo(){{if(Lr.current){var d=U(Lr.current.type);if(d)return`
6
6
 
7
- Check the render method of \``+d+"`."}return""}}function Ed(d){{if(d!==void 0){var w=d.fileName.replace(/^.*[\\\/]/,""),A=d.lineNumber;return`
7
+ Check the render method of \``+d+"`."}return""}}function Ed(d){{if(d!==void 0){var T=d.fileName.replace(/^.*[\\\/]/,""),A=d.lineNumber;return`
8
8
 
9
- Check your code at `+w+":"+A+"."}return""}}var Jo={};function Ad(d){{var w=Zo();if(!w){var A=typeof d=="string"?d:d.displayName||d.name;A&&(w=`
9
+ Check your code at `+T+":"+A+"."}return""}}var Jo={};function jd(d){{var T=Zo();if(!T){var A=typeof d=="string"?d:d.displayName||d.name;A&&(T=`
10
10
 
11
- Check the top-level render call using <`+A+">.")}return w}}function Qo(d,w){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var A=Ad(w);if(Jo[A])return;Jo[A]=!0;var F="";d&&d._owner&&d._owner!==Or.current&&(F=" It was passed a child from "+ae(d._owner.type)+"."),lt(d),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',A,F),lt(null)}}function ea(d,w){{if(typeof d!="object")return;if(Rr(d))for(var A=0;A<d.length;A++){var F=d[A];kr(F)&&Qo(F,w)}else if(kr(d))d._store&&(d._store.validated=!0);else if(d){var q=P(d);if(typeof q=="function"&&q!==d.entries)for(var J=q.call(d),Y;!(Y=J.next()).done;)kr(Y.value)&&Qo(Y.value,w)}}}function jd(d){{var w=d.type;if(w==null||typeof w=="string")return;var A;if(typeof w=="function")A=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===a||w.$$typeof===f))A=w.propTypes;else return;if(A){var F=ae(w);pd(A,d.props,"prop",F,d)}else if(w.PropTypes!==void 0&&!Lr){Lr=!0;var q=ae(w);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",q||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Md(d){{for(var w=Object.keys(d.props),A=0;A<w.length;A++){var F=w[A];if(F!=="children"&&F!=="key"){lt(d),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",F),lt(null);break}}d.ref!==null&&(lt(d),C("Invalid attribute `ref` supplied to `React.Fragment`."),lt(null))}}function ta(d,w,A,F,q,J){{var Y=N(d);if(!Y){var z="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var xe=Ed(q);xe?z+=xe:z+=Zo();var ie;d===null?ie="null":Rr(d)?ie="array":d!==void 0&&d.$$typeof===t?(ie="<"+(ae(d.type)||"Unknown")+" />",z=" Did you accidentally export a JSX literal instead of a component?"):ie=typeof d,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ie,z)}var oe=Cd(d,w,A,q,J);if(oe==null)return oe;if(Y){var Ee=w.children;if(Ee!==void 0)if(F)if(Rr(Ee)){for(var ut=0;ut<Ee.length;ut++)ea(Ee[ut],d);Object.freeze&&Object.freeze(Ee)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ea(Ee,d)}return d===r?Md(oe):jd(oe),oe}}function Dd(d,w,A){return ta(d,w,A,!0)}function Rd(d,w,A){return ta(d,w,A,!1)}var Vd=Rd,Od=Dd;ft.Fragment=r,ft.jsx=Vd,ft.jsxs=Od}()),ft}(function(e){process.env.NODE_ENV==="production"?e.exports=sa():e.exports=ia()})(m);const _d="",oa=()=>{const e=x.useCallback(()=>{console.log("Vite + React + TypeScript + Tailwind = ❤️")},[]);return m.exports.jsx("button",{onClick:e,className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Vite is better than Webpack"})};class Ot{constructor({id:t,text:n,createdDate:r,attachmentUrl:s,attachmentType:i,attachmentFormat:o,attachmentBlob:l,user:a,isRightSided:c,symbols:u,isSending:f}){Te(this,"id","0");Te(this,"text","");Te(this,"createdDate","");Te(this,"attachmentUrl","");Te(this,"attachmentBlob");Te(this,"attachmentType");Te(this,"attachmentFormat","");Te(this,"user",{id:""});Te(this,"isRightSided",!1);Te(this,"symbols");Te(this,"isSending");Te(this,"updateId",t=>{this.id=t});Te(this,"updateIsSending",t=>{this.isSending=t});this.id=t,this.text=n,this.createdDate=r,this.attachmentUrl=s,this.attachmentType=i,this.attachmentFormat=o,this.attachmentBlob=l,this.user=a,this.isRightSided=c,this.symbols=u,this.isSending=f}}const nn=x.createContext({});function rn(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const Lt=x.createContext(null),sn=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class aa extends tn.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=s-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function la({children:e,isPresent:t,anchorX:n}){const r=x.useId(),s=x.useRef(null),i=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=x.useContext(sn);return x.useInsertionEffect(()=>{const{width:l,height:a,top:c,left:u,right:f}=i.current;if(t||!s.current||!l||!a)return;const h=n==="left"?`left: ${u}`:`right: ${f}`;s.current.dataset.motionPopId=r;const g=document.createElement("style");return o&&(g.nonce=o),document.head.appendChild(g),g.sheet&&g.sheet.insertRule(`
11
+ Check the top-level render call using <`+A+">.")}return T}}function Qo(d,T){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var A=jd(T);if(Jo[A])return;Jo[A]=!0;var B="";d&&d._owner&&d._owner!==Lr.current&&(B=" It was passed a child from "+U(d._owner.type)+"."),ut(d),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',A,B),ut(null)}}function ea(d,T){{if(typeof d!="object")return;if(Vr(d))for(var A=0;A<d.length;A++){var B=d[A];_r(B)&&Qo(B,T)}else if(_r(d))d._store&&(d._store.validated=!0);else if(d){var X=S(d);if(typeof X=="function"&&X!==d.entries)for(var Q=X.call(d),q;!(q=Q.next()).done;)_r(q.value)&&Qo(q.value,T)}}}function Ad(d){{var T=d.type;if(T==null||typeof T=="string")return;var A;if(typeof T=="function")A=T.propTypes;else if(typeof T=="object"&&(T.$$typeof===a||T.$$typeof===f))A=T.propTypes;else return;if(A){var B=U(T);pd(A,d.props,"prop",B,d)}else if(T.PropTypes!==void 0&&!kr){kr=!0;var X=U(T);P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",X||"Unknown")}typeof T.getDefaultProps=="function"&&!T.getDefaultProps.isReactClassApproved&&P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Md(d){{for(var T=Object.keys(d.props),A=0;A<T.length;A++){var B=T[A];if(B!=="children"&&B!=="key"){ut(d),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",B),ut(null);break}}d.ref!==null&&(ut(d),P("Invalid attribute `ref` supplied to `React.Fragment`."),ut(null))}}function ta(d,T,A,B,X,Q){{var q=G(d);if(!q){var K="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(K+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var be=Ed(X);be?K+=be:K+=Zo();var ae;d===null?ae="null":Vr(d)?ae="array":d!==void 0&&d.$$typeof===t?(ae="<"+(U(d.type)||"Unknown")+" />",K=" Did you accidentally export a JSX literal instead of a component?"):ae=typeof d,P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ae,K)}var le=Cd(d,T,A,X,Q);if(le==null)return le;if(q){var Ee=T.children;if(Ee!==void 0)if(B)if(Vr(Ee)){for(var ct=0;ct<Ee.length;ct++)ea(Ee[ct],d);Object.freeze&&Object.freeze(Ee)}else P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ea(Ee,d)}return d===r?Md(le):Ad(le),le}}function Dd(d,T,A){return ta(d,T,A,!0)}function Rd(d,T,A){return ta(d,T,A,!1)}var Vd=Rd,Od=Dd;dt.Fragment=r,dt.jsx=Vd,dt.jsxs=Od}()),dt}(function(e){process.env.NODE_ENV==="production"?e.exports=sa():e.exports=ia()})(p);const _d="",oa=()=>{const e=x.useCallback(()=>{console.log("Vite + React + TypeScript + Tailwind = ❤️")},[]);return p.exports.jsx("button",{onClick:e,className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Vite is better than Webpack"})};class He{constructor({id:t,text:n,createdDate:r,attachmentUrl:s,attachmentType:i,attachmentFormat:o,attachmentBlob:l,user:a,isRightSided:c,symbols:u,isSending:f,isEdited:h}){Te(this,"id","0");Te(this,"text","");Te(this,"createdDate","");Te(this,"attachmentUrl","");Te(this,"attachmentBlob");Te(this,"attachmentType");Te(this,"attachmentFormat","");Te(this,"user",{id:""});Te(this,"isRightSided",!1);Te(this,"symbols");Te(this,"isSending");Te(this,"isEdited");Te(this,"updateId",t=>{this.id=t});Te(this,"updateIsSending",t=>{this.isSending=t});this.id=t,this.text=n,this.createdDate=r,this.attachmentUrl=s,this.attachmentType=i,this.attachmentFormat=o,this.attachmentBlob=l,this.user=a,this.isRightSided=c,this.symbols=u,this.isSending=f,this.isEdited=h}}const rn=x.createContext({});function sn(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const Lt=x.createContext(null),on=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class aa extends nn.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=r instanceof HTMLElement&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=s-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function la({children:e,isPresent:t,anchorX:n}){const r=x.useId(),s=x.useRef(null),i=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=x.useContext(on);return x.useInsertionEffect(()=>{const{width:l,height:a,top:c,left:u,right:f}=i.current;if(t||!s.current||!l||!a)return;const h=n==="left"?`left: ${u}`:`right: ${f}`;s.current.dataset.motionPopId=r;const m=document.createElement("style");return o&&(m.nonce=o),document.head.appendChild(m),m.sheet&&m.sheet.insertRule(`
12
12
  [data-motion-pop-id="${r}"] {
13
13
  position: absolute !important;
14
14
  width: ${l}px !important;
@@ -16,6 +16,6 @@ Check the top-level render call using <`+A+">.")}return w}}function Qo(d,w){{if(
16
16
  ${h}px !important;
17
17
  top: ${c}px !important;
18
18
  }
19
- `),()=>{document.head.removeChild(g)}},[t]),m.exports.jsx(aa,{isPresent:t,childRef:s,sizeRef:i,children:tn.cloneElement(e,{ref:s})})}const ua=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:l})=>{const a=rn(ca),c=x.useId(),u=x.useCallback(h=>{a.set(h,!0);for(const g of a.values())if(!g)return;r&&r()},[a,r]),f=x.useMemo(()=>({id:c,initial:t,isPresent:n,custom:s,onExitComplete:u,register:h=>(a.set(h,!1),()=>a.delete(h))}),i?[Math.random(),u]:[n,u]);return x.useMemo(()=>{a.forEach((h,g)=>a.set(g,!1))},[n]),tn.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=m.exports.jsx(la,{isPresent:n,anchorX:l,children:e})),m.exports.jsx(Lt.Provider,{value:f,children:e})};function ca(){return new Map}function Fr(e=!0){const t=x.useContext(Lt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=x.useId();x.useEffect(()=>{if(e)return s(i)},[e]);const o=x.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const kt=e=>e.key||"";function Nr(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const on=typeof window<"u",Br=on?x.useLayoutEffect:x.useEffect,$r=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:l="left"})=>{const[a,c]=Fr(o),u=x.useMemo(()=>Nr(e),[e]),f=o&&!a?[]:u.map(kt),h=x.useRef(!0),g=x.useRef(u),b=rn(()=>new Map),[y,P]=x.useState(u),[T,C]=x.useState(u);Br(()=>{h.current=!1,g.current=u;for(let p=0;p<T.length;p++){const M=kt(T[p]);f.includes(M)?b.delete(M):b.get(M)!==!0&&b.set(M,!1)}},[T,f.length,f.join("-")]);const E=[];if(u!==y){let p=[...u];for(let M=0;M<T.length;M++){const $=T[M],R=kt($);f.includes(R)||(p.splice(M,0,$),E.push($))}return i==="wait"&&E.length&&(p=E),C(Nr(p)),P(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:V}=x.useContext(nn);return m.exports.jsx(m.exports.Fragment,{children:T.map(p=>{const M=kt(p),$=o&&!a?!1:u===T||f.includes(M),R=()=>{if(b.has(M))b.set(M,!0);else return;let X=!0;b.forEach(N=>{N||(X=!1)}),X&&(V==null||V(),C(g.current),o&&(c==null||c()),r&&r())};return m.exports.jsx(ua,{isPresent:$,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,onExitComplete:$?void 0:R,anchorX:l,children:p},M)})})},be=e=>e;let He=be,ke=be;process.env.NODE_ENV!=="production"&&(He=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},ke=(e,t)=>{if(!e)throw new Error(t)});function an(e){let t;return()=>(t===void 0&&(t=e()),t)}const Xe=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},je=e=>e*1e3,Ve=e=>e/1e3,Ur={skipAnimations:!1,useManualTiming:!1},_t=["read","resolveKeyframes","update","preRender","render","postRender"],_e={value:null,addProjectionMetrics:null};function fa(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},a=0;function c(f){o.has(f)&&(u.schedule(f),e()),a++,f(l)}const u={schedule:(f,h=!1,g=!1)=>{const y=g&&s?n:r;return h&&o.add(f),y.has(f)||y.add(f),f},cancel:f=>{r.delete(f),o.delete(f)},process:f=>{if(l=f,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),t&&_e.value&&_e.value.frameloop[t].push(a),a=0,n.clear(),s=!1,i&&(i=!1,u.process(f))}};return u}const da=40;function Wr(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=_t.reduce((T,C)=>(T[C]=fa(i,t?C:void 0),T),{}),{read:l,resolveKeyframes:a,update:c,preRender:u,render:f,postRender:h}=o,g=()=>{const T=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(T-s.timestamp,da),1),s.timestamp=T,s.isProcessing=!0,l.process(s),a.process(s),c.process(s),u.process(s),f.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},b=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:_t.reduce((T,C)=>{const E=o[C];return T[C]=(V,p=!1,M=!1)=>(n||b(),E.schedule(V,p,M)),T},{}),cancel:T=>{for(let C=0;C<_t.length;C++)o[_t[C]].cancel(T)},state:s,steps:o}}const{schedule:Q,cancel:Ie,state:de,steps:ln}=Wr(typeof requestAnimationFrame<"u"?requestAnimationFrame:be,!0),zr=x.createContext({strict:!1}),Yr={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"]},Ze={};for(const e in Yr)Ze[e]={isEnabled:t=>Yr[e].some(n=>!!t[n])};function ha(e){for(const t in e)Ze[t]={...Ze[t],...e[t]}}const pa=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 It(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pa.has(e)}let Kr=e=>!It(e);function ma(e){e&&(Kr=t=>t.startsWith("on")?!It(t):e(t))}try{ma(require("@emotion/is-prop-valid").default)}catch{}function ga(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(Kr(s)||n===!0&&It(s)||!t&&!It(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const qr=new Set;function Ft(e,t,n){e||qr.has(t)||(console.warn(t),n&&console.warn(n),qr.add(t))}function ya(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Ft(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const Nt=x.createContext({});function Bt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function dt(e){return typeof e=="string"||Array.isArray(e)}const un=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cn=["initial",...un];function $t(e){return Bt(e.animate)||cn.some(t=>dt(e[t]))}function Gr(e){return Boolean($t(e)||e.variants)}function va(e,t){if($t(e)){const{initial:n,animate:r}=e;return{initial:n===!1||dt(n)?n:void 0,animate:dt(r)?r:void 0}}return e.inherit!==!1?t:{}}function xa(e){const{initial:t,animate:n}=va(e,x.useContext(Nt));return x.useMemo(()=>({initial:t,animate:n}),[Hr(t),Hr(n)])}function Hr(e){return Array.isArray(e)?e.join(" "):e}const ba=Symbol.for("motionComponentSymbol");function Je(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ta(e,t,n){return x.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Je(n)&&(n.current=r))},[t])}const fn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xr="data-"+fn("framerAppearId"),{schedule:dn,cancel:Fd}=Wr(queueMicrotask,!1),Zr=x.createContext({});function wa(e,t,n,r,s){var i,o;const{visualElement:l}=x.useContext(Nt),a=x.useContext(zr),c=x.useContext(Lt),u=x.useContext(sn).reducedMotion,f=x.useRef(null);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:l,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=f.current,g=x.useContext(Zr);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&Sa(f.current,n,s,g);const b=x.useRef(!1);x.useInsertionEffect(()=>{h&&b.current&&h.update(n,c)});const y=n[Xr],P=x.useRef(Boolean(y)&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,y))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,y)));return Br(()=>{h&&(b.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),dn.render(h.render),P.current&&h.animationState&&h.animationState.animateChanges())}),x.useEffect(()=>{h&&(!P.current&&h.animationState&&h.animationState.animateChanges(),P.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)===null||T===void 0||T.call(window,y)}),P.current=!1))}),h}function Sa(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:l,layoutScroll:a,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Jr(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:Boolean(o)||l&&Je(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:a,layoutRoot:c})}function Jr(e){if(e)return e.options.allowProjection!==!1?e.projection:Jr(e.parent)}function Pa({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&ha(e);function l(c,u){let f;const h={...x.useContext(sn),...c,layoutId:Ca(c)},{isStatic:g}=h,b=xa(c),y=r(c,g);if(!g&&on){Ea(h,e);const P=Aa(h);f=P.MeasureLayout,b.visualElement=wa(s,y,h,t,P.ProjectionNode)}return m.exports.jsxs(Nt.Provider,{value:b,children:[f&&b.visualElement?m.exports.jsx(f,{visualElement:b.visualElement,...h}):null,n(s,c,Ta(y,b.visualElement,u),y,g,b.visualElement)]})}l.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const a=x.forwardRef(l);return a[ba]=s,a}function Ca({layoutId:e}){const t=x.useContext(nn).id;return t&&e!==void 0?t+"-"+e:e}function Ea(e,t){const n=x.useContext(zr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?He(!1,r):ke(!1,r)}}function Aa(e){const{drag:t,layout:n}=Ze;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Qr=e=>t=>typeof t=="string"&&t.startsWith(e),hn=Qr("--"),ja=Qr("var(--"),pn=e=>ja(e)?Ma.test(e.split("/*")[0].trim()):!1,Ma=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ht={};function Da(e){for(const t in e)ht[t]=e[t],hn(t)&&(ht[t].isCSSVariable=!0)}const Qe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ue=new Set(Qe);function es(e,{layout:t,layoutId:n}){return Ue.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ht[e]||e==="opacity")}const he=e=>Boolean(e&&e.getVelocity),ts=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Oe=(e,t,n)=>n>t?t:n<e?e:n,et={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},pt={...et,transform:e=>Oe(0,1,e)},Ut={...et,default:1},mt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Fe=mt("deg"),Me=mt("%"),L=mt("px"),Ra=mt("vh"),Va=mt("vw"),ns={...Me,parse:e=>Me.parse(e)/100,transform:e=>Me.transform(e*100)},Oa={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,backgroundPositionX:L,backgroundPositionY:L},La={rotate:Fe,rotateX:Fe,rotateY:Fe,rotateZ:Fe,scale:Ut,scaleX:Ut,scaleY:Ut,scaleZ:Ut,skew:Fe,skewX:Fe,skewY:Fe,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:pt,originX:ns,originY:ns,originZ:L},rs={...et,transform:Math.round},mn={...Oa,...La,zIndex:rs,size:L,fillOpacity:pt,strokeOpacity:pt,numOctaves:rs},ka={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_a=Qe.length;function Ia(e,t,n){let r="",s=!0;for(let i=0;i<_a;i++){const o=Qe[i],l=e[o];if(l===void 0)continue;let a=!0;if(typeof l=="number"?a=l===(o.startsWith("scale")?1:0):a=parseFloat(l)===0,!a||n){const c=ts(l,mn[o]);if(!a){s=!1;const u=ka[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function gn(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,l=!1;for(const a in t){const c=t[a];if(Ue.has(a)){o=!0;continue}else if(hn(a)){s[a]=c;continue}else{const u=ts(c,mn[a]);a.startsWith("origin")?(l=!0,i[a]=u):r[a]=u}}if(t.transform||(o||n?r.transform=Ia(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:a="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${a} ${c} ${u}`}}const yn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ss(e,t,n){for(const r in t)!he(t[r])&&!es(r,n)&&(e[r]=t[r])}function Fa({transformTemplate:e},t){return x.useMemo(()=>{const n=yn();return gn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Na(e,t){const n=e.style||{},r={};return ss(r,n,e),Object.assign(r,Fa(e,t)),r}function Ba(e,t){const n={},r=Na(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 $a=["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 vn(e){return typeof e!="string"||e.includes("-")?!1:!!($a.indexOf(e)>-1||/[A-Z]/u.test(e))}const Ua={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wa={offset:"strokeDashoffset",array:"strokeDasharray"};function za(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?Ua:Wa;e[i.offset]=L.transform(-r);const o=L.transform(t),l=L.transform(n);e[i.array]=`${o} ${l}`}function is(e,t,n){return typeof e=="string"?e:L.transform(t+n*e)}function Ya(e,t,n){const r=is(t,e.x,e.width),s=is(n,e.y,e.height);return`${r} ${s}`}function xn(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:l=1,pathOffset:a=0,...c},u,f){if(gn(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:g,dimensions:b}=e;h.transform&&(b&&(g.transform=h.transform),delete h.transform),b&&(s!==void 0||i!==void 0||g.transform)&&(g.transformOrigin=Ya(b,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&za(h,o,l,a,!1)}const os=()=>({...yn(),attrs:{}}),bn=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ka(e,t,n,r){const s=x.useMemo(()=>{const i=os();return xn(i,t,bn(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};ss(i,e.style,e),s.style={...i,...s.style}}return s}function qa(e=!1){return(n,r,s,{latestValues:i},o)=>{const a=(vn(n)?Ka:Ba)(r,i,o,n),c=ga(r,typeof n=="string",e),u=n!==x.Fragment?{...c,...a,ref:s}:{},{children:f}=r,h=x.useMemo(()=>he(f)?f.get():f,[f]);return x.createElement(n,{...u,children:h})}}function as(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Tn(e,t,n,r){if(typeof t=="function"){const[s,i]=as(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=as(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const wn=e=>Array.isArray(e),Ga=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),Ha=e=>wn(e)?e[e.length-1]||0:e;function Wt(e){const t=he(e)?e.get():e;return Ga(t)?t.toValue():t}function Xa({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:Za(r,s,i,e),renderState:t()};return n&&(o.onMount=l=>n({props:r,current:l,...o}),o.onUpdate=l=>n(l)),o}const ls=e=>(t,n)=>{const r=x.useContext(Nt),s=x.useContext(Lt),i=()=>Xa(e,t,r,s);return n?i():rn(i)};function Za(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=Wt(i[h]);let{initial:o,animate:l}=e;const a=$t(e),c=Gr(e);t&&c&&!a&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?l:o;if(f&&typeof f!="boolean"&&!Bt(f)){const h=Array.isArray(f)?f:[f];for(let g=0;g<h.length;g++){const b=Tn(e,h[g]);if(b){const{transitionEnd:y,transition:P,...T}=b;for(const C in T){let E=T[C];if(Array.isArray(E)){const V=u?E.length-1:0;E=E[V]}E!==null&&(s[C]=E)}for(const C in y)s[C]=y[C]}}}return s}function Sn(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(he(s[o])||t.style&&he(t.style[o])||es(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}const Ja={useVisualState:ls({scrapeMotionValuesFromProps:Sn,createRenderState:yn})};function us(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function cs(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const fs=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 ds(e,t,n,r){cs(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(fs.has(s)?s:fn(s),t.attrs[s])}function hs(e,t,n){const r=Sn(e,t,n);for(const s in e)if(he(e[s])||he(t[s])){const i=Qe.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}const ps=["x","y","width","height","cx","cy","r"],Qa={useVisualState:ls({scrapeMotionValuesFromProps:hs,createRenderState:os,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in s)if(Ue.has(l)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let l=0;l<ps.length;l++){const a=ps[l];e[a]!==t[a]&&(o=!0)}o&&Q.read(()=>{us(n,r),Q.render(()=>{xn(r,s,bn(n.tagName),e.transformTemplate),ds(n,r)})})}})};function el(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...vn(r)?Qa:Ja,preloadedFeatures:e,useRender:qa(s),createVisualElement:t,Component:r};return Pa(o)}}function gt(e,t,n){const r=e.getProps();return Tn(r,t,n!==void 0?n:r.custom,e)}const tl=an(()=>window.ScrollTimeline!==void 0);class nl{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(tl()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class rl extends nl{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Pn(e,t){return e?e[t]||e.default||e:void 0}const Cn=2e4;function ms(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Cn;)t+=n,r=e.next(t);return t>=Cn?1/0:t}function En(e){return typeof e=="function"}function gs(e,t){e.timeline=t,e.onfinish=null}const An=e=>Array.isArray(e)&&typeof e[0]=="number",sl={linearEasing:void 0};function il(e,t){const n=an(e);return()=>{var r;return(r=sl[t])!==null&&r!==void 0?r:n()}}const zt=il(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ys=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=e(Xe(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function vs(e){return Boolean(typeof e=="function"&&zt()||!e||typeof e=="string"&&(e in jn||zt())||An(e)||Array.isArray(e)&&e.every(vs))}const yt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function xs(e,t){if(e)return typeof e=="function"&&zt()?ys(e,t):An(e)?yt(e):Array.isArray(e)?e.map(n=>xs(n,t)||jn.easeOut):jn[e]}const Ae={x:!1,y:!1};function bs(){return Ae.x||Ae.y}function ol(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;t&&(s=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Ts(e,t){const n=ol(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function ws(e){return!(e.pointerType==="touch"||bs())}function al(e,t,n={}){const[r,s,i]=Ts(e,n),o=l=>{if(!ws(l))return;const{target:a}=l,c=t(a,l);if(typeof c!="function"||!a)return;const u=f=>{ws(f)&&(c(f),a.removeEventListener("pointerleave",u))};a.addEventListener("pointerleave",u,s)};return r.forEach(l=>{l.addEventListener("pointerenter",o,s)}),i}function Yt(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Ss=(e,t)=>t?e===t?!0:Ss(e,t.parentElement):!1,Mn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ll=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ul(e){return ll.has(e.tagName)||e.tabIndex!==-1}const vt=new WeakSet;function Ps(e){return t=>{t.key==="Enter"&&e(t)}}function Dn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const cl=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ps(()=>{if(vt.has(n))return;Dn(n,"down");const s=Ps(()=>{Dn(n,"up")}),i=()=>Dn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Cs(e){return Mn(e)&&!bs()}function fl(e,t,n={}){const[r,s,i]=Ts(e,n),o=l=>{const a=l.currentTarget;if(!a||!Cs(l)||vt.has(a))return;vt.add(a),Yt(l,"set");const c=t(a,l),u=(g,b)=>{a.removeEventListener("pointerup",f),a.removeEventListener("pointercancel",h),Yt(g,"release"),!(!Cs(g)||!vt.has(a))&&(vt.delete(a),typeof c=="function"&&c(g,{success:b}))},f=g=>{(g.isTrusted?dl(g,a instanceof Element?a.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(g,!1):u(g,!(a instanceof Element)||Ss(a,g.target))},h=g=>{u(g,!1)};a.addEventListener("pointerup",f,s),a.addEventListener("pointercancel",h,s),a.addEventListener("lostpointercapture",h,s)};return r.forEach(l=>{l=n.useGlobalTarget?window:l;let a=!1;l instanceof HTMLElement&&(a=!0,!ul(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0)),l.addEventListener("pointerdown",o,s),a&&l.addEventListener("focus",c=>cl(c,s),s)}),i}function dl(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function hl(e){return e==="x"||e==="y"?Ae[e]?null:(Ae[e]=!0,()=>{Ae[e]=!1}):Ae.x||Ae.y?null:(Ae.x=Ae.y=!0,()=>{Ae.x=Ae.y=!1})}const Es=new Set(["width","height","top","left","right","bottom",...Qe]);let Kt;function pl(){Kt=void 0}const De={now:()=>(Kt===void 0&&De.set(de.isProcessing||Ur.useManualTiming?de.timestamp:performance.now()),Kt),set:e=>{Kt=e,queueMicrotask(pl)}};function Rn(e,t){e.indexOf(t)===-1&&e.push(t)}function Vn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class On{constructor(){this.subscriptions=[]}add(t){return Rn(this.subscriptions,t),()=>Vn(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function As(e,t){return t?e*(1e3/t):0}const js=30,ml=e=>!isNaN(parseFloat(e));class gl{constructor(t,n={}){this.version="12.4.7",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=De.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=De.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ml(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ft(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new On);const r=this.events[t].add(n);return t==="change"?()=>{r(),Q.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}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()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=De.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>js)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,js);return As(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xt(e,t){return new gl(e,t)}function yl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,xt(n))}function vl(e,t){const n=gt(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const l=Ha(i[o]);yl(e,o,l)}}function xl(e){return Boolean(he(e)&&e.add)}function Ln(e,t){const n=e.getValue("willChange");if(xl(n))return n.add(t)}function Ms(e){return e.props[Xr]}const bl={current:!1},Ds=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Tl=1e-7,wl=12;function Sl(e,t,n,r,s){let i,o,l=0;do o=t+(n-t)/2,i=Ds(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>Tl&&++l<wl);return o}function bt(e,t,n,r){if(e===t&&n===r)return be;const s=i=>Sl(i,0,1,e,n);return i=>i===0||i===1?i:Ds(s(i),t,r)}const Rs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Vs=e=>t=>1-e(1-t),Os=bt(.33,1.53,.69,.99),kn=Vs(Os),Ls=Rs(kn),ks=e=>(e*=2)<1?.5*kn(e):.5*(2-Math.pow(2,-10*(e-1))),_n=e=>1-Math.sin(Math.acos(e)),_s=Vs(_n),Is=Rs(_n),Fs=e=>/^0[^.\s]+$/u.test(e);function Pl(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Fs(e):!0}const Tt=e=>Math.round(e*1e5)/1e5,In=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Cl(e){return e==null}const El=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fn=(e,t)=>n=>Boolean(typeof n=="string"&&El.test(n)&&n.startsWith(e)||t&&!Cl(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ns=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,l]=r.match(In);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},Al=e=>Oe(0,255,e),Nn={...et,transform:e=>Math.round(Al(e))},We={test:Fn("rgb","red"),parse:Ns("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nn.transform(e)+", "+Nn.transform(t)+", "+Nn.transform(n)+", "+Tt(pt.transform(r))+")"};function jl(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Bn={test:Fn("#"),parse:jl,transform:We.transform},tt={test:Fn("hsl","hue"),parse:Ns("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Me.transform(Tt(t))+", "+Me.transform(Tt(n))+", "+Tt(pt.transform(r))+")"},pe={test:e=>We.test(e)||Bn.test(e)||tt.test(e),parse:e=>We.test(e)?We.parse(e):tt.test(e)?tt.parse(e):Bn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?We.transform(e):tt.transform(e)},Ml=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Dl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(In))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Ml))===null||n===void 0?void 0:n.length)||0)>0}const Bs="number",$s="color",Rl="var",Vl="var(",Us="${}",Ol=/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 wt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const l=t.replace(Ol,a=>(pe.test(a)?(r.color.push(i),s.push($s),n.push(pe.parse(a))):a.startsWith(Vl)?(r.var.push(i),s.push(Rl),n.push(a)):(r.number.push(i),s.push(Bs),n.push(parseFloat(a))),++i,Us)).split(Us);return{values:n,split:l,indexes:r,types:s}}function Ws(e){return wt(e).values}function zs(e){const{split:t,types:n}=wt(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const l=n[o];l===Bs?i+=Tt(s[o]):l===$s?i+=pe.transform(s[o]):i+=s[o]}return i}}const Ll=e=>typeof e=="number"?0:e;function kl(e){const t=Ws(e);return zs(e)(t.map(Ll))}const Ne={test:Dl,parse:Ws,createTransformer:zs,getAnimatableNone:kl},_l=new Set(["brightness","contrast","saturate","opacity"]);function Il(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(In)||[];if(!r)return e;const s=n.replace(r,"");let i=_l.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const Fl=/\b([a-z-]*)\(.*?\)/gu,$n={...Ne,getAnimatableNone:e=>{const t=e.match(Fl);return t?t.map(Il).join(" "):e}},Nl={...mn,color:pe,backgroundColor:pe,outlineColor:pe,fill:pe,stroke:pe,borderColor:pe,borderTopColor:pe,borderRightColor:pe,borderBottomColor:pe,borderLeftColor:pe,filter:$n,WebkitFilter:$n},Un=e=>Nl[e];function Ys(e,t){let n=Un(e);return n!==$n&&(n=Ne),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Bl=new Set(["auto","none","0"]);function $l(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!Bl.has(i)&&wt(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=Ys(n,s)}const Ks=e=>e===et||e===L,qs=(e,t)=>parseFloat(e.split(", ")[t]),Gs=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return qs(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?qs(i[1],e):0}},Ul=new Set(["x","y","z"]),Wl=Qe.filter(e=>!Ul.has(e));function zl(e){const t=[];return Wl.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const nt={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:Gs(4,13),y:Gs(5,14)};nt.translateX=nt.x,nt.translateY=nt.y;const ze=new Set;let Wn=!1,zn=!1;function Hs(){if(zn){const e=Array.from(ze).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=zl(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var l;(l=r.getValue(i))===null||l===void 0||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}zn=!1,Wn=!1,ze.forEach(e=>e.complete()),ze.clear()}function Xs(){ze.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zn=!0)})}function Yl(){Xs(),Hs()}class Yn{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ze.add(this),Wn||(Wn=!0,Q.read(Xs),Q.resolveKeyframes(Hs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,l);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ze.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ze.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Zs=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Kl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ql(e){const t=Kl.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Gl=4;function Js(e,t,n=1){ke(n<=Gl,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=ql(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return Zs(o)?parseFloat(o):o}return pn(s)?Js(s,t,n+1):s}const Qs=e=>t=>t.test(e),ei=[et,L,Me,Fe,Va,Ra,{test:e=>e==="auto",parse:e=>e}],ti=e=>ei.find(Qs(e));class ni extends Yn{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let c=t[a];if(typeof c=="string"&&(c=c.trim(),pn(c))){const u=Js(c,n.current);u!==void 0&&(t[a]=u),a===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Es.has(r)||t.length!==2)return;const[s,i]=t,o=ti(s),l=ti(i);if(o!==l)if(Ks(o)&&Ks(l))for(let a=0;a<t.length;a++){const c=t[a];typeof c=="string"&&(t[a]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)Pl(t[s])&&r.push(s);r.length&&$l(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=nt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,l=s[o];s[o]=nt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([a,c])=>{n.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const ri=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ne.test(e)||e==="0")&&!e.startsWith("url("));function Hl(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 Xl(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=ri(s,t),l=ri(i,t);return He(o===l,`You are trying to animate ${t} from "${s}" to "${i}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${i} via the \`style\` property.`),!o||!l?!1:Hl(e)||(n==="spring"||En(n))&&r}const Zl=e=>e!==null;function qt(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Zl),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const Jl=40;class si{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=De.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Jl?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Yl(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=De.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:l,onUpdate:a,isGenerator:c}=this.options;if(!c&&!Xl(t,r,s,i))if(o)this.options.duration=0;else{a&&a(qt(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const St={layout:0,mainThread:0,waapi:0},ee=(e,t,n)=>e+(t-e)*n;function Kn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ql({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;s=Kn(a,l,e+1/3),i=Kn(a,l,e),o=Kn(a,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Gt(e,t){return n=>n>0?t:e}const qn=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},eu=[Bn,We,tt],tu=e=>eu.find(t=>t.test(e));function ii(e){const t=tu(e);if(He(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let n=t.parse(e);return t===tt&&(n=Ql(n)),n}const oi=(e,t)=>{const n=ii(e),r=ii(t);if(!n||!r)return Gt(e,t);const s={...n};return i=>(s.red=qn(n.red,r.red,i),s.green=qn(n.green,r.green,i),s.blue=qn(n.blue,r.blue,i),s.alpha=ee(n.alpha,r.alpha,i),We.transform(s))},nu=(e,t)=>n=>t(e(n)),Pt=(...e)=>e.reduce(nu),Gn=new Set(["none","hidden"]);function ru(e,t){return Gn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function su(e,t){return n=>ee(e,t,n)}function Hn(e){return typeof e=="number"?su:typeof e=="string"?pn(e)?Gt:pe.test(e)?oi:au:Array.isArray(e)?ai:typeof e=="object"?pe.test(e)?oi:iu:Gt}function ai(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Hn(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function iu(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Hn(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function ou(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],l=e.indexes[o][s[o]],a=(n=e.values[l])!==null&&n!==void 0?n:0;r[i]=a,s[o]++}return r}const au=(e,t)=>{const n=Ne.createTransformer(t),r=wt(e),s=wt(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Gn.has(e)&&!s.values.length||Gn.has(t)&&!r.values.length?ru(e,t):Pt(ai(ou(r,s),s.values),n):(He(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Gt(e,t))};function li(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ee(e,t,n):Hn(e)(e,t)}const lu=5;function ui(e,t,n){const r=Math.max(t-lu,0);return As(n-e(r),t-r)}const te={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},Xn=.001;function uu({duration:e=te.duration,bounce:t=te.bounce,velocity:n=te.velocity,mass:r=te.mass}){let s,i;He(e<=je(te.maxDuration),"Spring duration must be 10 seconds or less");let o=1-t;o=Oe(te.minDamping,te.maxDamping,o),e=Oe(te.minDuration,te.maxDuration,Ve(e)),o<1?(s=c=>{const u=c*o,f=u*e,h=u-n,g=Zn(c,o),b=Math.exp(-f);return Xn-h/g*b},i=c=>{const f=c*o*e,h=f*n+n,g=Math.pow(o,2)*Math.pow(c,2)*e,b=Math.exp(-f),y=Zn(Math.pow(c,2),o);return(-s(c)+Xn>0?-1:1)*((h-g)*b)/y}):(s=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Xn+u*f},i=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const l=5/e,a=fu(s,i,l);if(e=je(e),isNaN(a))return{stiffness:te.stiffness,damping:te.damping,duration:e};{const c=Math.pow(a,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const cu=12;function fu(e,t,n){let r=n;for(let s=1;s<cu;s++)r=r-e(r)/t(r);return r}function Zn(e,t){return e*Math.sqrt(1-t*t)}const du=["duration","bounce"],hu=["stiffness","damping","mass"];function ci(e,t){return t.some(n=>e[n]!==void 0)}function pu(e){let t={velocity:te.velocity,stiffness:te.stiffness,damping:te.damping,mass:te.mass,isResolvedFromDuration:!1,...e};if(!ci(e,hu)&&ci(e,du))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Oe(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:te.mass,stiffness:s,damping:i}}else{const n=uu(e);t={...t,...n,mass:te.mass},t.isResolvedFromDuration=!0}return t}function fi(e=te.visualDuration,t=te.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:a,damping:c,mass:u,duration:f,velocity:h,isResolvedFromDuration:g}=pu({...n,velocity:-Ve(n.velocity||0)}),b=h||0,y=c/(2*Math.sqrt(a*u)),P=o-i,T=Ve(Math.sqrt(a/u)),C=Math.abs(P)<5;r||(r=C?te.restSpeed.granular:te.restSpeed.default),s||(s=C?te.restDelta.granular:te.restDelta.default);let E;if(y<1){const p=Zn(T,y);E=M=>{const $=Math.exp(-y*T*M);return o-$*((b+y*T*P)/p*Math.sin(p*M)+P*Math.cos(p*M))}}else if(y===1)E=p=>o-Math.exp(-T*p)*(P+(b+T*P)*p);else{const p=T*Math.sqrt(y*y-1);E=M=>{const $=Math.exp(-y*T*M),R=Math.min(p*M,300);return o-$*((b+y*T*P)*Math.sinh(R)+p*P*Math.cosh(R))/p}}const V={calculatedDuration:g&&f||null,next:p=>{const M=E(p);if(g)l.done=p>=f;else{let $=0;y<1&&($=p===0?je(b):ui(E,p,M));const R=Math.abs($)<=r,X=Math.abs(o-M)<=s;l.done=R&&X}return l.value=l.done?o:M,l},toString:()=>{const p=Math.min(ms(V),Cn),M=ys($=>V.next(p*$).value,p,30);return p+"ms "+M}};return V}function di({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:a,restDelta:c=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},g=R=>l!==void 0&&R<l||a!==void 0&&R>a,b=R=>l===void 0?a:a===void 0||Math.abs(l-R)<Math.abs(a-R)?l:a;let y=n*t;const P=f+y,T=o===void 0?P:o(P);T!==P&&(y=T-f);const C=R=>-y*Math.exp(-R/r),E=R=>T+C(R),V=R=>{const X=C(R),N=E(R);h.done=Math.abs(X)<=c,h.value=h.done?T:N};let p,M;const $=R=>{g(h.value)&&(p=R,M=fi({keyframes:[h.value,b(h.value)],velocity:ui(E,R,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return $(0),{calculatedDuration:null,next:R=>{let X=!1;return!M&&p===void 0&&(X=!0,V(R),$(R)),p!==void 0&&R>=p?M.next(R-p):(!X&&V(R),h)}}}const mu=bt(.42,0,1,1),gu=bt(0,0,.58,1),hi=bt(.42,0,.58,1),yu=e=>Array.isArray(e)&&typeof e[0]!="number",pi={linear:be,easeIn:mu,easeInOut:hi,easeOut:gu,circIn:_n,circInOut:Is,circOut:_s,backIn:kn,backInOut:Ls,backOut:Os,anticipate:ks},mi=e=>{if(An(e)){ke(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return bt(t,n,r,s)}else if(typeof e=="string")return ke(pi[e]!==void 0,`Invalid easing type '${e}'`),pi[e];return e};function vu(e,t,n){const r=[],s=n||li,i=e.length-1;for(let o=0;o<i;o++){let l=s(e[o],e[o+1]);if(t){const a=Array.isArray(t)?t[o]||be:t;l=Pt(a,l)}r.push(l)}return r}function xu(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(ke(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=vu(t,r,s),a=l.length,c=u=>{if(o&&u<e[0])return t[0];let f=0;if(a>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=Xe(e[f],e[f+1],u);return l[f](h)};return n?u=>c(Oe(e[0],e[i-1],u)):c}function bu(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Xe(0,t,r);e.push(ee(n,1,s))}}function Tu(e){const t=[0];return bu(t,e.length-1),t}function wu(e,t){return e.map(n=>n*t)}function Su(e,t){return e.map(()=>t||hi).splice(0,e.length-1)}function Ct({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=yu(r)?r.map(mi):mi(r),i={done:!1,value:t[0]},o=wu(n&&n.length===t.length?n:Tu(t),e),l=xu(o,t,{ease:Array.isArray(s)?s:Su(t,s)});return{calculatedDuration:e,next:a=>(i.value=l(a),i.done=a>=e,i)}}const Pu=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Q.update(t,!0),stop:()=>Ie(t),now:()=>de.isProcessing?de.timestamp:De.now()}},Cu={decay:di,inertia:di,tween:Ct,keyframes:Ct,spring:fi},Eu=e=>e/100;class Jn extends si{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||Yn,l=(a,c)=>this.onKeyframesResolved(a,c);this.resolver=new o(i,l,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,l=En(n)?n:Cu[n]||Ct;let a,c;process.env.NODE_ENV!=="production"&&l!==Ct&&ke(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==Ct&&typeof t[0]!="number"&&(a=Pt(Eu,li(t[0],t[1])),t=[0,100]);const u=l({...this.options,keyframes:t});i==="mirror"&&(c=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ms(u));const{calculatedDuration:f}=u,h=f+s,g=h*(r+1)-s;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:a,calculatedDuration:f,resolvedDuration:h,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;St.mainThread++,this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:a,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:g,repeatType:b,repeatDelay:y,onUpdate:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const T=this.currentTime-h*(this.speed>=0?1:-1),C=this.speed>=0?T<0:T>u;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let E=this.currentTime,V=i;if(g){const R=Math.min(this.currentTime,u)/f;let X=Math.floor(R),N=R%1;!N&&R>=1&&(N=1),N===1&&X--,X=Math.min(X,g+1),Boolean(X%2)&&(b==="reverse"?(N=1-N,y&&(N-=y/f)):b==="mirror"&&(V=o)),E=Oe(0,1,N)*f}const p=C?{done:!1,value:a[0]}:V.next(E);l&&(p.value=l(p.value));let{done:M}=p;!C&&c!==null&&(M=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const $=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return $&&s!==void 0&&(p.value=qt(a,this.options,s)),P&&P(p.value),$&&this.finish(),p}get duration(){const{resolved:t}=this;return t?Ve(t.calculatedDuration):0}get time(){return Ve(this.currentTime)}set time(t){t=je(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ve(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Pu,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel(),St.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Au=new Set(["opacity","clipPath","filter","transform"]);function ju(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:l="easeInOut",times:a}={}){const c={[t]:n};a&&(c.offset=a);const u=xs(l,s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const Mu=an(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ht=10,Du=2e4;function Ru(e){return En(e.type)||e.type==="spring"||!vs(e.ease)}function Vu(e,t){const n=new Jn({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&i<Du;)r=n.sample(i),s.push(r.value),i+=Ht;return{times:void 0,keyframes:s,duration:i-Ht,ease:"linear"}}const gi={anticipate:ks,backInOut:Ls,circInOut:Is};function Ou(e){return e in gi}class yi extends si{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new ni(i,(o,l)=>this.onKeyframesResolved(o,l),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:l,name:a,startTime:c}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&zt()&&Ou(i)&&(i=gi[i]),Ru(this.options)){const{onComplete:f,onUpdate:h,motionValue:g,element:b,...y}=this.options,P=Vu(t,y);t=P.keyframes,t.length===1&&(t[1]=t[0]),r=P.duration,s=P.times,i=P.ease,o="keyframes"}const u=ju(l.owner.current,a,t,{...this.options,duration:r,times:s,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(gs(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(qt(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ve(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ve(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=je(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return be;const{animation:r}=n;gs(r,t)}return be}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,element:h,...g}=this.options,b=new Jn({...g,keyframes:r,duration:s,type:i,ease:o,times:l,isGenerator:!0}),y=je(this.time);c.setWithVelocity(b.sample(y-Ht).value,b.sample(y).value,Ht)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:c}=n.owner.getProps();return Mu()&&r&&Au.has(r)&&!a&&!c&&!s&&i!=="mirror"&&o!==0&&l!=="inertia"}}const Lu={type:"spring",stiffness:500,damping:25,restSpeed:10},ku=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_u={type:"keyframes",duration:.8},Iu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fu=(e,{keyframes:t})=>t.length>2?_u:Ue.has(e)?e.startsWith("scale")?ku(t[1]):Lu:Iu;function Nu({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:l,from:a,elapsed:c,...u}){return!!Object.keys(u).length}const Qn=(e,t,n,r={},s,i)=>o=>{const l=Pn(r,e)||{},a=l.delay||r.delay||0;let{elapsed:c=0}=r;c=c-je(a);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:s};Nu(l)||(u={...u,...Fu(e,u)}),u.duration&&(u.duration=je(u.duration)),u.repeatDelay&&(u.repeatDelay=je(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(f=!0)),(bl.current||Ur.skipAnimations)&&(f=!0,u.duration=0,u.delay=0),f&&!i&&t.get()!==void 0){const h=qt(u.keyframes,l);if(h!==void 0)return Q.update(()=>{u.onUpdate(h),u.onComplete()}),new rl([])}return!i&&yi.supports(u)?new yi(u):new Jn(u)};function Bu({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function vi(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...a}=t;r&&(o=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),g=a[f];if(g===void 0||u&&Bu(u,f))continue;const b={delay:n,...Pn(o||{},f)};let y=!1;if(window.MotionHandoffAnimation){const T=Ms(e);if(T){const C=window.MotionHandoffAnimation(T,f,Q);C!==null&&(b.startTime=C,y=!0)}}Ln(e,f),h.start(Qn(f,h,g,e.shouldReduceMotion&&Es.has(f)?{type:!1}:b,e,y));const P=h.animation;P&&c.push(P)}return l&&Promise.all(c).then(()=>{Q.update(()=>{l&&vl(e,l)})}),c}function er(e,t,n={}){var r;const s=gt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(vi(e,s,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=i;return $u(e,t,u+c,f,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,l]:[l,o];return c().then(()=>u())}else return Promise.all([o(),l(n.delay)])}function $u(e,t,n=0,r=0,s=1,i){const o=[],l=(e.variantChildren.size-1)*r,a=s===1?(c=0)=>c*r:(c=0)=>l-c*r;return Array.from(e.variantChildren).sort(Uu).forEach((c,u)=>{c.notify("AnimationStart",t),o.push(er(c,t,{...i,delay:n+a(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function Uu(e,t){return e.sortNodePosition(t)}function Wu(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>er(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=er(e,t,n);else{const s=typeof t=="function"?gt(e,t,n.custom):t;r=Promise.all(vi(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function xi(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 zu=cn.length;function bi(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?bi(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<zu;n++){const r=cn[n],s=e.props[r];(dt(s)||s===!1)&&(t[r]=s)}return t}const Yu=[...un].reverse(),Ku=un.length;function qu(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Wu(e,n,r)))}function Gu(e){let t=qu(e),n=Ti(),r=!0;const s=a=>(c,u)=>{var f;const h=gt(e,u,a==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:g,transitionEnd:b,...y}=h;c={...c,...y,...b}}return c};function i(a){t=a(e)}function o(a){const{props:c}=e,u=bi(e.parent)||{},f=[],h=new Set;let g={},b=1/0;for(let P=0;P<Ku;P++){const T=Yu[P],C=n[T],E=c[T]!==void 0?c[T]:u[T],V=dt(E),p=T===a?C.isActive:null;p===!1&&(b=P);let M=E===u[T]&&E!==c[T]&&V;if(M&&r&&e.manuallyAnimateOnMount&&(M=!1),C.protectedKeys={...g},!C.isActive&&p===null||!E&&!C.prevProp||Bt(E)||typeof E=="boolean")continue;const $=Hu(C.prevProp,E);let R=$||T===a&&C.isActive&&!M&&V||P>b&&V,X=!1;const N=Array.isArray(E)?E:[E];let se=N.reduce(s(T),{});p===!1&&(se={});const{prevResolvedValues:ye={}}=C,ae={...ye,...se},ne=Z=>{R=!0,h.has(Z)&&(X=!0,h.delete(Z)),C.needsAnimating[Z]=!0;const ue=e.getValue(Z);ue&&(ue.liveStyle=!1)};for(const Z in ae){const ue=se[Z],Pe=ye[Z];if(g.hasOwnProperty(Z))continue;let v=!1;wn(ue)&&wn(Pe)?v=!xi(ue,Pe):v=ue!==Pe,v?ue!=null?ne(Z):h.add(Z):ue!==void 0&&h.has(Z)?ne(Z):C.protectedKeys[Z]=!0}C.prevProp=E,C.prevResolvedValues=se,C.isActive&&(g={...g,...se}),r&&e.blockInitialAnimation&&(R=!1),R&&(!(M&&$)||X)&&f.push(...N.map(Z=>({animation:Z,options:{type:T}})))}if(h.size){const P={};if(typeof c.initial!="boolean"){const T=gt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);T&&T.transition&&(P.transition=T.transition)}h.forEach(T=>{const C=e.getBaseTarget(T),E=e.getValue(T);E&&(E.liveStyle=!0),P[T]=C??null}),f.push({animation:P})}let y=Boolean(f.length);return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function l(a,c){var u;if(n[a].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var g;return(g=h.animationState)===null||g===void 0?void 0:g.setActive(a,c)}),n[a].isActive=c;const f=o(a);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Ti(),r=!0}}}function Hu(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!xi(t,e):!1}function Ye(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ti(){return{animate:Ye(!0),whileInView:Ye(),whileHover:Ye(),whileTap:Ye(),whileDrag:Ye(),whileFocus:Ye(),exit:Ye()}}class Be{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Xu extends Be{constructor(t){super(t),t.animationState||(t.animationState=Gu(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Bt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Zu=0;class Ju extends Be{constructor(){super(...arguments),this.id=Zu++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Qu={animation:{Feature:Xu},exit:{Feature:Ju}};function Et(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function At(e){return{point:{x:e.pageX,y:e.pageY}}}const ec=e=>t=>Mn(t)&&e(t,At(t));function rt(e,t,n,r){return Et(e,t,ec(n),r)}function wi({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function nc(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}}const Si=1e-4,rc=1-Si,sc=1+Si,Pi=.01,ic=0-Pi,oc=0+Pi;function ge(e){return e.max-e.min}function ac(e,t,n){return Math.abs(e-t)<=n}function Ci(e,t,n,r=.5){e.origin=r,e.originPoint=ee(t.min,t.max,e.origin),e.scale=ge(n)/ge(t),e.translate=ee(n.min,n.max,e.origin)-e.originPoint,(e.scale>=rc&&e.scale<=sc||isNaN(e.scale))&&(e.scale=1),(e.translate>=ic&&e.translate<=oc||isNaN(e.translate))&&(e.translate=0)}function jt(e,t,n,r){Ci(e.x,t.x,n.x,r?r.originX:void 0),Ci(e.y,t.y,n.y,r?r.originY:void 0)}function Ei(e,t,n){e.min=n.min+t.min,e.max=e.min+ge(t)}function lc(e,t,n){Ei(e.x,t.x,n.x),Ei(e.y,t.y,n.y)}function Ai(e,t,n){e.min=t.min-n.min,e.max=e.min+ge(t)}function Mt(e,t,n){Ai(e.x,t.x,n.x),Ai(e.y,t.y,n.y)}const ji=()=>({translate:0,scale:1,origin:0,originPoint:0}),st=()=>({x:ji(),y:ji()}),Mi=()=>({min:0,max:0}),re=()=>({x:Mi(),y:Mi()});function we(e){return[e("x"),e("y")]}function tr(e){return e===void 0||e===1}function nr({scale:e,scaleX:t,scaleY:n}){return!tr(e)||!tr(t)||!tr(n)}function Ke(e){return nr(e)||Di(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Di(e){return Ri(e.x)||Ri(e.y)}function Ri(e){return e&&e!=="0%"}function Xt(e,t,n){const r=e-n,s=t*r;return n+s}function Vi(e,t,n,r,s){return s!==void 0&&(e=Xt(e,s,r)),Xt(e,n,r)+t}function rr(e,t=0,n=1,r,s){e.min=Vi(e.min,t,n,r,s),e.max=Vi(e.max,t,n,r,s)}function Oi(e,{x:t,y:n}){rr(e.x,t.translate,t.scale,t.originPoint),rr(e.y,n.translate,n.scale,n.originPoint)}const Li=.999999999999,ki=1.0000000000001;function uc(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:a}=i.options;a&&a.props.style&&a.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ot(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Oi(e,o)),r&&Ke(i.latestValues)&&ot(e,i.latestValues))}t.x<ki&&t.x>Li&&(t.x=1),t.y<ki&&t.y>Li&&(t.y=1)}function it(e,t){e.min=e.min+t,e.max=e.max+t}function _i(e,t,n,r,s=.5){const i=ee(e.min,e.max,s);rr(e,t,n,i,r)}function ot(e,t){_i(e.x,t.x,t.scaleX,t.scale,t.originX),_i(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ii(e,t){return wi(nc(e.getBoundingClientRect(),t))}function cc(e,t,n){const r=Ii(e,n),{scroll:s}=t;return s&&(it(r.x,s.offset.x),it(r.y,s.offset.y)),r}const Fi=(e,t)=>Math.abs(e-t);function fc(e,t){const n=Fi(e.x,t.x),r=Fi(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ni{constructor(t,n,{transformPagePoint:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=ir(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=fc(u.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:g}=u,{timestamp:b}=de;this.history.push({...g,timestamp:b});const{onStart:y,onMove:P}=this.handlers;f||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),P&&P(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{if(u.target instanceof Element&&u.target.hasPointerCapture&&u.pointerId!==void 0)try{if(!u.target.hasPointerCapture(u.pointerId))return}catch{}this.lastMoveEvent=u,this.lastMoveEventInfo=sr(f,this.transformPagePoint),Q.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{Yt(u,"release"),this.end();const{onEnd:h,onSessionEnd:g,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=ir(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:sr(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,y),g&&g(u,y)},!Mn(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r;const i=At(t),o=sr(i,this.transformPagePoint),{point:l}=o,{timestamp:a}=de;this.history=[{...l,timestamp:a}];const{onSessionStart:c}=n;c&&c(t,ir(o,this.history)),Yt(t,"set"),this.removeListeners=Pt(rt(t.currentTarget,"pointermove",this.handlePointerMove),rt(t.currentTarget,"pointerup",this.handlePointerUp),rt(t.currentTarget,"pointercancel",this.handlePointerUp),rt(t.currentTarget,"lostpointercapture",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ie(this.updatePoint)}}function sr(e,t){return t?{point:t(e.point)}:e}function Bi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ir({point:e},t){return{point:e,delta:Bi(e,$i(t)),offset:Bi(e,dc(t)),velocity:hc(t,.1)}}function dc(e){return e[0]}function $i(e){return e[e.length-1]}function hc(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=$i(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>je(t)));)n--;if(!r)return{x:0,y:0};const i=Ve(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function pc(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ee(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ee(n,e,r.max):Math.min(e,n)),e}function Ui(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 mc(e,{top:t,left:n,bottom:r,right:s}){return{x:Ui(e.x,n,s),y:Ui(e.y,t,r)}}function Wi(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 gc(e,t){return{x:Wi(e.x,t.x),y:Wi(e.y,t.y)}}function yc(e,t){let n=.5;const r=ge(e),s=ge(t);return s>r?n=Xe(t.min,t.max-r,e.min):r>s&&(n=Xe(e.min,e.max-s,t.min)),Oe(0,1,n)}function vc(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 or=.35;function xc(e=or){return e===!1?e=0:e===!0&&(e=or),{x:zi(e,"left","right"),y:zi(e,"top","bottom")}}function zi(e,t,n){return{min:Yi(e,t),max:Yi(e,n)}}function Yi(e,t){return typeof e=="number"?e:e[t]||0}const bc=new WeakMap;class Tc{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=re(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(At(u).point)},i=(u,f)=>{const{drag:h,dragPropagation:g,onDragStart:b}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=hl(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),we(P=>{let T=this.getAxisMotionValue(P).get()||0;if(Me.test(T)){const{projection:C}=this.visualElement;if(C&&C.layout){const E=C.layout.layoutBox[P];E&&(T=ge(E)*(parseFloat(T)/100))}}this.originPoint[P]=T}),b&&Q.postRender(()=>b(u,f)),Ln(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(u,f)=>{const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:b,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:P}=f;if(g&&this.currentDirection===null){this.currentDirection=wc(P),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",f.point,P),this.updateAxis("y",f.point,P),this.visualElement.render(),y&&y(u,f)},l=(u,f)=>this.stop(u,f),a=()=>we(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ni(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:l,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Q.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Zt(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=pc(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Je(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=mc(s.layoutBox,n):this.constraints=!1,this.elastic=xc(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&we(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=vc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Je(t))return!1;const r=t.current;ke(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=cc(r,s.root,this.visualElement.getTransformPagePoint());let o=gc(s.layout.layoutBox,i);if(n){const l=n(tc(o));this.hasMutatedConstraints=!!l,l&&(o=wi(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},c=we(u=>{if(!Zt(u,n,this.currentDirection))return;let f=a&&a[u]||{};o&&(f={min:0,max:0});const h=s?200:1e6,g=s?40:1e7,b={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,b)});return Promise.all(c).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ln(this.visualElement,t),r.start(Qn(t,r,0,n,this.visualElement,!1))}stopAnimation(){we(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){we(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){we(n=>{const{drag:r}=this.getProps();if(!Zt(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[n];i.set(t[n]-ee(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Je(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};we(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const a=l.get();s[o]=yc({min:a,max:a},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),we(o=>{if(!Zt(o,t,null))return;const l=this.getAxisMotionValue(o),{min:a,max:c}=this.constraints[o];l.set(ee(a,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;bc.set(this.visualElement,this);const t=this.visualElement.current,n=rt(t,"pointerdown",a=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();Je(a)&&a.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Q.read(r);const o=Et(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:a,hasLayoutChanged:c})=>{this.isDragging&&c&&(we(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=a[u].translate,f.set(f.get()+a[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=or,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function Zt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function wc(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Sc extends Be{constructor(t){super(t),this.removeGroupControls=be,this.removeListeners=be,this.controls=new Tc(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||be}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ki=e=>(t,n)=>{e&&Q.postRender(()=>e(t,n))};class Pc extends Be{constructor(){super(...arguments),this.removePointerDownListener=be}onPointerDown(t){this.session=new Ni(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ki(t),onStart:Ki(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&Q.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=rt(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 Jt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Dt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=qi(e,t.target.x),r=qi(e,t.target.y);return`${n}% ${r}%`}},Cc={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ne.parse(e);if(s.length>5)return r;const i=Ne.createTransformer(e),o=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,a=n.y.scale*t.y;s[0+o]/=l,s[1+o]/=a;const c=ee(l,a,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}};class Ec extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;Da(Ac),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Jt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||Q.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),dn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Gi(e){const[t,n]=Fr(),r=x.useContext(nn);return m.exports.jsx(Ec,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(Zr),isPresent:t,safeToRemove:n})}const Ac={borderRadius:{...Dt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Dt,borderTopRightRadius:Dt,borderBottomLeftRadius:Dt,borderBottomRightRadius:Dt,boxShadow:Cc};function jc(e,t,n){const r=he(e)?e:xt(e);return r.start(Qn("",r,t,n)),r.animation}function Mc(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Dc=(e,t)=>e.depth-t.depth;class Rc{constructor(){this.children=[],this.isDirty=!1}add(t){Rn(this.children,t),this.isDirty=!0}remove(t){Vn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dc),this.isDirty=!1,this.children.forEach(t)}}function Vc(e,t){const n=De.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ie(r),e(i-t))};return Q.read(r,!0),()=>Ie(r)}const Hi=["TopLeft","TopRight","BottomLeft","BottomRight"],Oc=Hi.length,Xi=e=>typeof e=="string"?parseFloat(e):e,Zi=e=>typeof e=="number"||L.test(e);function Lc(e,t,n,r,s,i){s?(e.opacity=ee(0,n.opacity!==void 0?n.opacity:1,kc(r)),e.opacityExit=ee(t.opacity!==void 0?t.opacity:1,0,_c(r))):i&&(e.opacity=ee(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<Oc;o++){const l=`border${Hi[o]}Radius`;let a=Ji(t,l),c=Ji(n,l);if(a===void 0&&c===void 0)continue;a||(a=0),c||(c=0),a===0||c===0||Zi(a)===Zi(c)?(e[l]=Math.max(ee(Xi(a),Xi(c),r),0),(Me.test(c)||Me.test(a))&&(e[l]+="%")):e[l]=c}(t.rotate||n.rotate)&&(e.rotate=ee(t.rotate||0,n.rotate||0,r))}function Ji(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const kc=Qi(0,.5,_s),_c=Qi(.5,.95,be);function Qi(e,t,n){return r=>r<e?0:r>t?1:n(Xe(e,t,r))}function eo(e,t){e.min=t.min,e.max=t.max}function Se(e,t){eo(e.x,t.x),eo(e.y,t.y)}function to(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function no(e,t,n,r,s){return e-=t,e=Xt(e,1/n,r),s!==void 0&&(e=Xt(e,1/s,r)),e}function Ic(e,t=0,n=1,r=.5,s,i=e,o=e){if(Me.test(t)&&(t=parseFloat(t),t=ee(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=ee(i.min,i.max,r);e===i&&(l-=t),e.min=no(e.min,t,n,l,s),e.max=no(e.max,t,n,l,s)}function ro(e,t,[n,r,s],i,o){Ic(e,t[n],t[r],t[s],t.scale,i,o)}const Fc=["x","scaleX","originX"],Nc=["y","scaleY","originY"];function so(e,t,n,r){ro(e.x,t,Fc,n?n.x:void 0,r?r.x:void 0),ro(e.y,t,Nc,n?n.y:void 0,r?r.y:void 0)}function io(e){return e.translate===0&&e.scale===1}function oo(e){return io(e.x)&&io(e.y)}function ao(e,t){return e.min===t.min&&e.max===t.max}function Bc(e,t){return ao(e.x,t.x)&&ao(e.y,t.y)}function lo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function uo(e,t){return lo(e.x,t.x)&&lo(e.y,t.y)}function co(e){return ge(e.x)/ge(e.y)}function fo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $c{constructor(){this.members=[]}add(t){Rn(this.members,t),t.scheduleRender()}remove(t){if(Vn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Uc(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:h,skewX:g,skewY:b}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),g&&(r+=`skewX(${g}deg) `),b&&(r+=`skewY(${b}deg) `)}const l=e.x.scale*t.x,a=e.y.scale*t.y;return(l!==1||a!==1)&&(r+=`scale(${l}, ${a})`),r||"none"}const qe={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ar=["","X","Y","Z"],Wc={visibility:"hidden"},ho=1e3;let zc=0;function lr(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function po(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ms(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Q,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&po(r)}function mo({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=zc++,this.animationId=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,_e.value&&(qe.nodes=qe.calculatedTargetDeltas=qe.calculatedProjections=0),this.nodes.forEach(qc),this.nodes.forEach(Jc),this.nodes.forEach(Qc),this.nodes.forEach(Gc),_e.addProjectionMetrics&&_e.addProjectionMetrics(qe)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new Rc)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new On),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const a=this.eventHandlers.get(o);a&&a.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Mc(o),this.instance=o;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(c||a)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Vc(h,250),Jt.hasAnimatedSinceResize&&(Jt.hasAnimatedSinceResize=!1,this.nodes.forEach(yo))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeLayoutChanged:g,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||sf,{onLayoutAnimationStart:P,onLayoutAnimationComplete:T}=u.getProps(),C=!this.targetLayout||!uo(this.targetLayout,b),E=!h&&g;if(this.options.layoutRoot||this.resumeFrom||E||h&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,E);const V={...Pn(y,"layout"),onPlay:P,onComplete:T};(u.shouldReduceMotion||this.options.layoutRoot)&&(V.delay=0,V.type=!1),this.startAnimation(V)}else h||yo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ie(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(ef),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&po(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:a}=this.options;if(l===void 0&&!a)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(go);return}this.isUpdating||this.nodes.forEach(Xc),this.isUpdating=!1,this.nodes.forEach(Zc),this.nodes.forEach(Yc),this.nodes.forEach(Kc),this.clearAllSnapshots();const l=De.now();de.delta=Oe(0,1e3/60,l-de.timestamp),de.timestamp=l,de.isProcessing=!0,ln.update.process(de),ln.preRender.process(de),ln.render.process(de),de.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,dn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hc),this.sharedNodes.forEach(tf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Q.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Q.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 a=0;a<this.path.length;a++)this.path[a].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=re(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const a=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:a,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:a}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!oo(this.projectionDelta),a=this.getTransformTemplate(),c=a?a(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(l||Ke(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let a=this.removeElementScroll(l);return o&&(a=this.removeTransform(a)),of(a),{animationId:this.root.animationId,measuredBox:l,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return re();const a=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(af))){const{scroll:u}=this.root;u&&(it(a.x,u.offset.x),it(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=re();if(Se(a,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:f,options:h}=u;u!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&Se(a,o),it(a.x,f.offset.x),it(a.y,f.offset.y))}return a}applyTransform(o,l=!1){const a=re();Se(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!l&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ot(a,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ke(u.latestValues)&&ot(a,u.latestValues)}return Ke(this.latestValues)&&ot(a,this.latestValues),a}removeTransform(o){const l=re();Se(l,o);for(let a=0;a<this.path.length;a++){const c=this.path[a];if(!c.instance||!Ke(c.latestValues))continue;nr(c.latestValues)&&c.updateSnapshot();const u=re(),f=c.measurePageBox();Se(u,f),so(l,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ke(this.latestValues)&&so(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==de.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=Boolean(this.resumingFrom)||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=de.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=re(),this.relativeTargetOrigin=re(),Mt(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Se(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=re(),this.targetWithTransforms=re()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lc(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Se(this.target,this.layout.layoutBox),Oi(this.target,this.targetDelta)):Se(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&Boolean(g.resumingFrom)===Boolean(this.resumingFrom)&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=re(),this.relativeTargetOrigin=re(),Mt(this.relativeTargetOrigin,this.target,g.target),Se(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}_e.value&&qe.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||nr(this.parent.latestValues)||Di(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const l=this.getLead(),a=Boolean(this.resumingFrom)||this!==l;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===de.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;Se(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,g=this.treeScale.y;uc(this.layoutCorrected,this.treeScale,this.path,a),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=re());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(to(this.prevProjectionDelta.x,this.projectionDelta.x),to(this.prevProjectionDelta.y,this.projectionDelta.y)),jt(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==g||!fo(this.projectionDelta.x,this.prevProjectionDelta.x)||!fo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b)),_e.value&&qe.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=st(),this.projectionDelta=st(),this.projectionDeltaWithTransform=st()}setAnimationOrigin(o,l=!1){const a=this.snapshot,c=a?a.latestValues:{},u={...this.latestValues},f=st();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=re(),g=a?a.source:void 0,b=this.layout?this.layout.source:void 0,y=g!==b,P=this.getStack(),T=!P||P.members.length<=1,C=Boolean(y&&!T&&this.options.crossfade===!0&&!this.path.some(rf));this.animationProgress=0;let E;this.mixTargetDelta=V=>{const p=V/1e3;vo(f.x,o.x,p),vo(f.y,o.y,p),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nf(this.relativeTarget,this.relativeTargetOrigin,h,p),E&&Bc(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=re()),Se(E,this.relativeTarget)),y&&(this.animationValues=u,Lc(u,c,this.latestValues,p,C,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=p},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ie(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Q.update(()=>{Jt.hasAnimatedSinceResize=!0,St.layout++,this.currentAnimation=jc(0,ho,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onStop:()=>{St.layout--},onComplete:()=>{St.layout--,o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ho),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:a,layout:c,latestValues:u}=o;if(!(!l||!a||!c)){if(this!==o&&this.layout&&c&&So(this.options.animationType,this.layout.layoutBox,c.layoutBox)){a=this.target||re();const f=ge(this.layout.layoutBox.x);a.x.min=o.target.x.min,a.x.max=a.x.min+f;const h=ge(this.layout.layoutBox.y);a.y.min=o.target.y.min,a.y.max=a.y.min+h}Se(l,a),ot(l,u),jt(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $c),this.sharedNodes.get(o).add(l);const c=l.options.initialPromotionConfig;l.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:a}={}){const c=this.getStack();c&&c.promote(this,a),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:a}=o;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(l=!0),!l)return;const c={};a.z&&lr("z",o,c,this.animationValues);for(let u=0;u<ar.length;u++)lr(`rotate${ar[u]}`,o,c,this.animationValues),lr(`skew${ar[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}getProjectionStyles(o){var l,a;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Wc;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Wt(o==null?void 0:o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Wt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ke(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=Uc(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:g,y:b}=this.projectionDelta;c.transformOrigin=`${g.origin*100}% ${b.origin*100}% 0`,f.animationValues?c.opacity=f===this?(a=(l=h.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&a!==void 0?a:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in ht){if(h[y]===void 0)continue;const{correct:P,applyTo:T,isCSSVariable:C}=ht[y],E=c.transform==="none"?h[y]:P(h[y],f);if(T){const V=T.length;for(let p=0;p<V;p++)c[T[p]]=E}else C?this.options.visualElement.renderState.vars[y]=E:c[y]=E}return this.options.layoutId&&(c.pointerEvents=f===this?Wt(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(go),this.root.sharedNodes.clear()}}}function Yc(e){e.updateLayout()}function Kc(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?we(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],g=ge(h);h.min=r[f].min,h.max=h.min+g}):So(i,n.layoutBox,r)&&we(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],g=ge(r[f]);h.max=h.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const l=st();jt(l,r,n.layoutBox);const a=st();o?jt(a,e.applyTransform(s,!0),n.measuredBox):jt(a,r,n.layoutBox);const c=!oo(l);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:g}=f;if(h&&g){const b=re();Mt(b,n.layoutBox,h.layoutBox);const y=re();Mt(y,r,g.layoutBox),uo(b,y)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:l,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function qc(e){_e.value&&qe.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Gc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hc(e){e.clearSnapshot()}function go(e){e.clearMeasurements()}function Xc(e){e.isLayoutDirty=!1}function Zc(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jc(e){e.resolveTargetDelta()}function Qc(e){e.calcProjection()}function ef(e){e.resetSkewAndRotation()}function tf(e){e.removeLeadSnapshot()}function vo(e,t,n){e.translate=ee(t.translate,0,n),e.scale=ee(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function xo(e,t,n,r){e.min=ee(t.min,n.min,r),e.max=ee(t.max,n.max,r)}function nf(e,t,n,r){xo(e.x,t.x,n.x,r),xo(e.y,t.y,n.y,r)}function rf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sf={duration:.45,ease:[.4,0,.1,1]},bo=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),To=bo("applewebkit/")&&!bo("chrome/")?Math.round:be;function wo(e){e.min=To(e.min),e.max=To(e.max)}function of(e){wo(e.x),wo(e.y)}function So(e,t,n){return e==="position"||e==="preserve-aspect"&&!ac(co(t),co(n),.2)}function af(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const lf=mo({attachResizeListener:(e,t)=>Et(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ur={current:void 0},Po=mo({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ur.current){const e=new lf({});e.mount(window),e.setOptions({layoutScroll:!0}),ur.current=e}return ur.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),uf={pan:{Feature:Pc},drag:{Feature:Sc,ProjectionNode:Po,MeasureLayout:Gi}};function Co(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&Q.postRender(()=>i(t,At(t)))}class cf extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=al(t,(n,r)=>(Co(this.node,r,"Start"),s=>Co(this.node,s,"End"))))}unmount(){}}class ff extends Be{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=Pt(Et(this.node.current,"focus",()=>this.onFocus()),Et(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Eo(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&Q.postRender(()=>i(t,At(t)))}class df extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=fl(t,(n,r)=>(Eo(this.node,r,"Start"),(s,{success:i})=>Eo(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const cr=new WeakMap,fr=new WeakMap,hf=e=>{const t=cr.get(e.target);t&&t(e)},pf=e=>{e.forEach(hf)};function mf({root:e,...t}){const n=e||document;fr.has(n)||fr.set(n,{});const r=fr.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(pf,{root:e,...t})),r[s]}function gf(e,t,n){const r=mf(t);return cr.set(e,n),r.observe(e),()=>{cr.delete(e),r.unobserve(e)}}const yf={some:0,all:1};class vf extends Be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:yf[s]},l=a=>{const{isIntersecting:c}=a;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(a)};return gf(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(xf(t,n))&&this.startObserver()}unmount(){}}function xf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const bf={inView:{Feature:vf},tap:{Feature:df},focus:{Feature:ff},hover:{Feature:cf}},Tf={layout:{ProjectionNode:Po,MeasureLayout:Gi}},dr={current:null},Ao={current:!1};function wf(){if(Ao.current=!0,!!on)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>dr.current=e.matches;e.addListener(t),t()}else dr.current=!1}const Sf=[...ei,pe,Ne],Pf=e=>Sf.find(Qs(e)),Cf=new WeakMap;function Ef(e,t,n){for(const r in t){const s=t[r],i=n[r];if(he(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&Ft(s.version==="12.4.7",`Attempting to mix Motion versions ${s.version} with 12.4.7 may not work as expected.`);else if(he(i))e.addValue(r,xt(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,xt(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const jo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Af{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Yn,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 g=De.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Q.render(this.render,!1,!0))};const{latestValues:a,renderState:c,onUpdate:u}=o;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=$t(n),this.isVariantNode=Gr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in h){const b=h[g];a[g]!==void 0&&he(b)&&b.set(a[g],!1)}}mount(t){this.current=t,Cf.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)),Ao.current||wf(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:dr.current,process.env.NODE_ENV!=="production"&&Ft(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ie(this.notifyUpdate),Ie(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ue.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Q.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),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 Ze){const n=Ze[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):re()}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<jo.length;r++){const s=jo[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Ef(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=xt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Zs(s)||Fs(s))?s=parseFloat(s):!Pf(s)&&Ne.test(n)&&(s=Ys(t,n)),this.setBaseTarget(t,he(s)?s.get():s)),he(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=Tn(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!he(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new On),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Mo extends Af{constructor(){super(...arguments),this.KeyframeResolver=ni}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;he(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function jf(e){return window.getComputedStyle(e)}class Mf extends Mo{constructor(){super(...arguments),this.type="html",this.renderInstance=cs}readValueFromInstance(t,n){if(Ue.has(n)){const r=Un(n);return r&&r.default||0}else{const r=jf(t),s=(hn(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ii(t,n)}build(t,n,r){gn(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Sn(t,n,r)}}class Df extends Mo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=re,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&us(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ue.has(n)){const r=Un(n);return r&&r.default||0}return n=fs.has(n)?n:fn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return hs(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Q.postRender(this.updateDimensions)}build(t,n,r){xn(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){ds(t,n,r,s)}mount(t){this.isSVGTag=bn(t.tagName),super.mount(t)}}const Rf=(e,t)=>vn(e)?new Df(t):new Mf(t,{allowProjection:e!==x.Fragment}),Vf=el({...Qu,...bf,...uf,...Tf},Rf),hr=ya(Vf),Of=({isOpen:e,onClose:t,onConfirm:n,header:r,question:s})=>e?m.exports.jsx("div",{id:"default-modal",tabIndex:-1,"aria-hidden":"true",className:"absolute z-10 w-full md:inset-0 h-full max-h-full overflow-y-auto overflow-x-hidden flex justify-center items-center bg-[rgb(0,0,0,0.6)]",children:m.exports.jsx("div",{className:"relative p-4 w-full max-w-2xl max-h-full",children:m.exports.jsxs("div",{className:"relative bg-white rounded-lg shadow-sm dark:bg-gray-700",children:[m.exports.jsxs("div",{className:"flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600 border-gray-200",children:[m.exports.jsxs("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:[r," "]}),m.exports.jsxs("button",{type:"button",className:"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 inline-flex justify-center items-center",onClick:t,children:[m.exports.jsx("svg",{className:"w-3 h-3","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14",children:m.exports.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})}),m.exports.jsx("span",{className:"sr-only",children:"Close modal"})]})]}),m.exports.jsx("div",{className:"p-4 md:p-5 space-y-4",children:m.exports.jsxs("p",{className:"text-base leading-relaxed text-gray-500 dark:text-gray-400",children:[s," "]})}),m.exports.jsxs("div",{className:"flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b dark:border-gray-600",children:[m.exports.jsx("button",{onClick:()=>{n(),t()},type:"button",className:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",children:"Yes "}),m.exports.jsx("button",{onClick:t,type:"button",className:"py-2.5 px-5 ml-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700",children:"Cancel"})]})]})})}):null,Lf=({items:e,isVisible:t,position:n,messageId:r,isCurrentUserMessage:s})=>{const i=x.useRef(null),[o,l]=x.useState(!1);return x.useEffect(()=>(i.current||(i.current=document.createElement("div"),i.current.style.zIndex="1500",i.current.style.position="fixed",i.current.style.top="0",i.current.style.left="0",i.current.style.width="100%",i.current.style.height="100%",i.current.style.pointerEvents="none",document.body.appendChild(i.current)),l(!0),()=>{i.current&&!t&&(document.body.removeChild(i.current),i.current=null)}),[t]),!i.current||!o?null:$e.createPortal(m.exports.jsx($r,{children:t&&m.exports.jsx(hr.div,{initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-10},transition:{duration:.2,ease:"easeOut"},className:"absolute z-50 bg-white shadow-lg rounded-md p-2 px-1 w-42 pointer-events-auto",style:{top:n.y,left:n.x},children:e.map((a,c)=>a!=null&&a.onlyCurrentUserMessage&&!s?null:m.exports.jsxs("button",{disabled:a==null?void 0:a.disabled,className:"cursor-pointer flex items-center gap-2 w-full rounded-md text-left px-2 py-1 disabled:opacity-20 hover:bg-gray-200",onClick:()=>a.onClick(r),children:[x.cloneElement(a.icon,{className:"text-black",size:18}),m.exports.jsx("span",{className:"ml-2 text-black",children:a.name})]},c))})}),i.current)},kf=e=>{const t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`},_f=()=>m.exports.jsx("svg",{width:"21",height:"22",viewBox:"0 0 21 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.exports.jsx("path",{d:"M9.77169 2.74358C12.1132 0.399998 15.9121 0.399998 18.2553 2.74314C20.5384 5.02621 20.5969 8.69142 18.4309 11.0454L18.2428 11.2427L9.44273 20.0409L9.40616 20.0712C7.94492 21.3879 5.69092 21.3432 4.28355 19.9358C2.96453 18.6168 2.84241 16.5541 3.9172 15.0974C3.94054 15.0521 3.96879 15.0083 4.002 14.9672L4.05556 14.9075L4.14247 14.8198L4.28355 14.6719L4.28647 14.6748L11.7222 7.22047C11.9881 6.95385 12.4047 6.92909 12.6986 7.14656L12.7829 7.21906C13.0495 7.48497 13.0742 7.9016 12.8568 8.19551L12.7843 8.27972L5.18966 15.8928C4.47202 16.7684 4.5219 18.0627 5.3393 18.8801C6.16836 19.7091 7.48801 19.7486 8.3638 18.9985L17.1965 10.1681C18.952 8.41041 18.952 5.56116 17.1946 3.8038C15.4922 2.10136 12.765 2.04816 10.9986 3.6442L10.8307 3.8038L10.8181 3.81812L1.28179 13.3544C0.988902 13.6473 0.514028 13.6473 0.221135 13.3544C-0.0451319 13.0882 -0.0693378 12.6715 0.148517 12.3779L0.221135 12.2938L9.77001 2.74314L9.77169 2.74358Z",fill:"#8A8A8A"})}),If=()=>m.exports.jsx("svg",{width:"14",height:"20",viewBox:"0 0 14 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.exports.jsx("path",{d:"M13.25 9C13.6297 9 13.9435 9.28215 13.9932 9.64823L14 9.75V10.25C14 13.8094 11.245 16.7254 7.75098 16.9817L7.75 19.25C7.75 19.6642 7.41421 20 7 20C6.6203 20 6.30651 19.7178 6.25685 19.3518L6.25 19.25L6.25002 16.9818C2.83323 16.7316 0.122835 13.938 0.00406027 10.4863L0 10.25V9.75C0 9.33579 0.335786 9 0.75 9C1.1297 9 1.44349 9.28215 1.49315 9.64823L1.5 9.75V10.25C1.5 13.077 3.73445 15.3821 6.5336 15.4956L6.75 15.5H7.25C10.077 15.5 12.3821 13.2656 12.4956 10.4664L12.5 10.25V9.75C12.5 9.33579 12.8358 9 13.25 9ZM7 0C9.20914 0 11 1.79086 11 4V10C11 12.2091 9.20914 14 7 14C4.79086 14 3 12.2091 3 10V4C3 1.79086 4.79086 0 7 0ZM7 1.5C5.61929 1.5 4.5 2.61929 4.5 4V10C4.5 11.3807 5.61929 12.5 7 12.5C8.38071 12.5 9.5 11.3807 9.5 10V4C9.5 2.61929 8.38071 1.5 7 1.5Z",fill:"#fff"})}),Do=()=>m.exports.jsx("svg",{width:"17",height:"17",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.exports.jsx("path",{d:"M10.8147 10.1974L3.28344 11.4526C3.10705 11.482 2.95979 11.6034 2.89723 11.7709L0.299335 18.7283C0.0506615 19.3678 0.720085 19.9778 1.33375 19.671L19.3337 10.671C19.8865 10.3946 19.8865 9.60573 19.3337 9.32933L1.33375 0.329334C0.720085 0.0225017 0.0506615 0.632543 0.299335 1.27199L2.89723 8.22938C2.95979 8.39691 3.10705 8.51827 3.28344 8.54767L10.8147 9.80287C10.9236 9.82103 10.9972 9.92408 10.9791 10.033C10.965 10.1173 10.899 10.1834 10.8147 10.1974Z",fill:"#fff"})}),pr=e=>m.exports.jsx("svg",{width:"17px",height:"22px",viewBox:"0 0 9 20",...e,children:m.exports.jsxs("g",{fill:"none",children:[m.exports.jsx("path",{className:"background",fill:"#ffffff",d:"M8,1 L9,1 L9,20 L8,20 L8,18 C7.807,15.161 7.124,12.233 5.950,9.218 C5.046,6.893 3.504,4.733 1.325,2.738 L1.325,2.738 C0.917,2.365 0.89,1.732 1.263,1.325 C1.452,1.118 1.72,1 2,1 L8,1 Z"}),m.exports.jsx("path",{className:" fill-gray-200",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0 L9,0 L9,20 L7,20 L7,20 L7.002,18.068 C6.816,15.333 6.156,12.504 5.018,9.58 C4.172,7.406 2.72,5.371 0.649,3.475 C-0.165,2.729 -0.221,1.464 0.525,0.649 C0.904,0.236 1.439,0 2,0 Z"}),m.exports.jsx("path",{className:"border_2x",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0.5 L9,0.5 L9,20 L7.5,20 L7.5,20 L7.501,18.034 C7.312,15.247 6.64,12.369 5.484,9.399 C4.609,7.15 3.112,5.052 0.987,3.106 C0.376,2.547 0.334,1.598 0.894,0.987 C1.178,0.677 1.579,0.5 2,0.5 Z"}),m.exports.jsx("path",{className:"border_3x",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0.667 L9,0.667 L9,20 L7.667,20 L7.667,20 L7.668,18.023 C7.477,15.218 6.802,12.324 5.64,9.338 C4.755,7.064 3.243,4.946 1.1,2.983 C0.557,2.486 0.52,1.643 1.017,1.1 C1.269,0.824 1.626,0.667 2,0.667 Z"})]})}),Ff=({onSendMessage:e,onSendVoice:t,onImageSend:n,onVideoSend:r,onFileSend:s,dynamicSymbolAssignments:i})=>{const[o,l]=x.useState(""),[a,c]=x.useState(!1),[u,f]=x.useState(0),[h,g]=x.useState(null),[b,y]=x.useState(null),[P,T]=x.useState(0),C=x.useRef(null),E=x.useRef([]),V=x.useRef(null),p=x.useRef(null),M=x.useRef(null),[$,R]=x.useState(!1),X=v=>{const S=v.target.value;l(S);const D=S.match(/(\S+)$/);N(D)},N=v=>{if(v){const S=v[0];if(h){const D=v[0].split(h)[1];y(D)}i!=null&&i.some(D=>D.symbol===S)&&g(S)}else g(null)},se=(v,S)=>{l(D=>D+S+" "),g(null),p.current.focus()},ye=()=>{o.trim()!==""&&(e(o),l(""),g(null))},ae=async()=>{c(!0),f(0),E.current=[],V.current=setInterval(()=>{f(D=>D+1)},1e3);const v=await navigator.mediaDevices.getUserMedia({audio:!0}),S=new MediaRecorder(v);C.current=S,S.ondataavailable=D=>{D.data.size>0&&E.current.push(D.data)},S.onstop=()=>{clearInterval(V.current);const D=new Blob(E.current,{type:"audio/mp3"});t(D),c(!1)},S.start()},ne=()=>{var v;(v=C.current)==null||v.stop()},ve=v=>{const{scrollTop:S,scrollHeight:D,clientHeight:_}=v.currentTarget;if(S>P){if(S+_>=D-1){const k=i==null?void 0:i.find(I=>I.symbol===h);k&&(k!=null&&k.updatePageNumber)&&(R(!0),k==null||k.updatePageNumber(k.pagNumber+1),T(S),setTimeout(()=>{R(!1)},500))}}else T(S)},le=new Set(["jpeg","png","gif","webp","bmp","svg+xml","tiff","x-icon"]),Z=new Set(["mp4","webm","ogg","mpeg","quicktime","x-msvideo","x-ms-wmv","3gpp","3gpp2"]),ue=()=>{var v;(v=M.current)==null||v.click()},Pe=v=>{var _,O;const S=(_=v.target.files)==null?void 0:_[0];if(!S)return;let D="";if(S.type){const k=S.type.split("/");k.length===2&&(D=k[1])}D||(D=((O=S.name.split(".").pop())==null?void 0:O.toLowerCase())||""),le.has(D)?n(S):Z.has(D)?r(S):s(S)};return m.exports.jsxs("div",{className:"absolute bottom-0 w-full flex items-center p-2 pr-4 z-10",children:[a?m.exports.jsxs("div",{className:"w-full flex justify-between items-center bg-white p-2 pl-4 h-11 rounded-3xl ",children:[m.exports.jsx("span",{className:"text-blue-400 font-bold flex-1",children:kf(u)}),m.exports.jsx("button",{className:"cursor-pointer p-2 flex justify-center items-center bg-green-500 text-white rounded-full",onClick:ne,children:m.exports.jsx(Do,{})})]}):m.exports.jsxs(m.exports.Fragment,{children:[m.exports.jsxs("div",{className:"w-[90%] relative ",children:[m.exports.jsx("div",{onClick:ue,className:"cursor-pointer absolute right-4 top-[11px]",children:m.exports.jsx(_f,{})}),m.exports.jsx("input",{type:"file",ref:M,style:{display:"none"},onChange:Pe}),m.exports.jsx("input",{type:"text",ref:p,className:"w-full bg-white flex-1 p-2 pl-4 border border-gray-300 outline-none rounded-tl-3xl rounded-tr-2xl rounded-bl-3xl ",placeholder:"Type a message...",value:o,onChange:X,onKeyDown:v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),ye())}}),m.exports.jsx(pr,{className:"rotate-180 absolute -right-[11.4px] top-5"})]}),m.exports.jsx("button",{className:"flex items-center justify-center cursor-pointer w-9 h-9 ml-2 p-2 bg-blue-500 text-white rounded-full hover:bg-blue-600 transition",onClick:o?ye:ae,children:o?m.exports.jsx(Do,{}):m.exports.jsx(If,{})})]}),h&&m.exports.jsxs("div",{className:"absolute bottom-full left-0 w-full bg-white shadow-xl rounded-lg border border-gray-200 p-4 z-50 max-h-60 overflow-y-auto",onScroll:ve,children:[m.exports.jsxs("div",{className:"flex justify-between items-center border-b pb-2 mb-2",children:[m.exports.jsxs("h3",{className:"text-lg font-semibold text-gray-800",children:["Select an item for"," ",m.exports.jsx("span",{className:"text-blue-500",children:h})]}),m.exports.jsx("button",{className:"text-gray-500 hover:text-gray-700",onClick:()=>g(null),children:"✕"})]}),m.exports.jsxs("div",{className:"space-y-2",children:[i?i.filter(v=>v.symbol===h).map(v=>{var _;const{component:S,lists:D}=v;return S?b?(_=D==null?void 0:D.filter(O=>O==null?void 0:O.name.includes(b)))==null?void 0:_.map((O,k)=>m.exports.jsx("div",{className:"hover:bg-gray-100 rounded-md p-2 cursor-pointer",children:m.exports.jsx(S,{listsProps:O,onClick:(I,B)=>se(I,B)})},k)):D==null?void 0:D.map((O,k)=>m.exports.jsx("div",{className:"hover:bg-gray-100 rounded-md p-2 cursor-pointer",children:m.exports.jsx(S,{listsProps:O,onClick:(I,B)=>se(I,B)})},k)):null}):null,m.exports.jsx("div",{className:"h-8",children:$&&"Loading more items..."})]})]})]})};var Re=(e=>(e[e.File=0]="File",e[e.Voice=1]="Voice",e[e.Video=2]="Video",e[e.Image=3]="Image",e))(Re||{});const Ro=({fileName:e,fileSize:t,format:n,src:r})=>{const s=()=>{const o={rar:m.exports.jsx("p",{className:"p-2 text-green-500 font-bold",children:n}),zip:m.exports.jsx("p",{className:"p-2 text-blue-500 font-bold",children:n}),pdf:m.exports.jsx("p",{className:"p-2 text-red-500 font-bold",children:n}),doc:m.exports.jsx("p",{className:"p-2 text-blue-400 font-bold",children:n}),vid:m.exports.jsx("p",{className:"p-2 text-orange-400 font-bold",children:n}),txt:m.exports.jsx("p",{className:"p-2 text-purple-500 font-bold",children:n}),xls:m.exports.jsx("p",{className:"p-2 text-green-400 font-bold",children:n}),ppt:m.exports.jsx("p",{className:"p-2 text-yellow-500 font-bold",children:n}),png:m.exports.jsx("p",{className:"p-2 text-pink-500 font-bold",children:n}),jpg:m.exports.jsx("p",{className:"p-2 text-indigo-500 font-bold",children:n}),mp3:m.exports.jsx("p",{className:"p-2 text-teal-500 font-bold",children:n}),mp4:m.exports.jsx("p",{className:"p-2 text-gray-500 font-bold",children:n}),exe:m.exports.jsx("p",{className:"p-2 text-red-400 font-bold",children:n}),html:m.exports.jsx("p",{className:"p-2 text-orange-500 font-bold",children:n}),css:m.exports.jsx("p",{className:"p-2 text-blue-300 font-bold",children:n}),js:m.exports.jsx("p",{className:"p-2 text-yellow-400 font-bold",children:n}),json:m.exports.jsx("p",{className:"p-2 text-purple-400 font-bold",children:n}),xml:m.exports.jsx("p",{className:"p-2 text-green-300 font-bold",children:n}),svg:m.exports.jsx("p",{className:"p-2 text-pink-400 font-bold",children:n}),gif:m.exports.jsx("p",{className:"p-2 text-indigo-400 font-bold",children:n}),csv:m.exports.jsx("p",{className:"p-2 text-teal-400 font-bold",children:n}),sql:m.exports.jsx("p",{className:"p-2 text-gray-400 font-bold",children:n})};return n&&o[n]?o[n]:m.exports.jsx("p",{className:"p-2 text-black ",children:n??"UN"})},i=o=>o>1048576?(o/1048576).toFixed(1)+" MB":(o/1024).toFixed(1)+" KB";return m.exports.jsxs("div",{className:"flex items-center rounded-lg",children:[m.exports.jsx("div",{className:"w-14 h-14 mr-3 flex items-center justify-center relative border border-green-900 rounded-md p-3",children:s()}),m.exports.jsxs("div",{className:"flex flex-col flex-grow",children:[m.exports.jsx("a",{href:r,download:e,className:"text-gray-900 font-medium hover:underline",children:e}),m.exports.jsx("span",{className:"text-gray-600 text-sm",children:i(t)})]}),m.exports.jsx("a",{href:r,download:e,className:"ml-2 bg-green-500 text-white px-2 py-1 text-sm rounded hover:bg-green-600",children:"Download"})]})},Nf=e=>m.exports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-play",...e,children:m.exports.jsx("polygon",{points:"6 3 20 12 6 21 6 3"})}),Bf=e=>m.exports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-pause",...e,children:[m.exports.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"}),m.exports.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"})]});let Rt=null;const $f=({src:e,className:t})=>{const[n,r]=x.useState(!1),[s,i]=x.useState(0),o=x.useRef(null);x.useEffect(()=>{const a=o.current;if(!a)return;const c=()=>{i(a.currentTime/a.duration*100)},u=()=>r(!0),f=()=>r(!1),h=()=>{r(!1),i(0)};return a.addEventListener("timeupdate",c),a.addEventListener("play",u),a.addEventListener("pause",f),a.addEventListener("ended",h),()=>{a.removeEventListener("timeupdate",c),a.removeEventListener("play",u),a.removeEventListener("pause",f),a.removeEventListener("ended",h)}},[]);const l=()=>{const a=o.current;a&&(n?a.pause():(Rt&&Rt!==a&&(Rt.pause(),Rt.currentTime=0),a.play(),Rt=a))};return m.exports.jsxs("div",{className:`flex items-center gap-2 py-2 pl-1 text-white rounded-xl w-full max-w-sm ${t}`,children:[m.exports.jsx("button",{className:"w-9 h-9 cursor-pointer flex items-center justify-center pl-[1.5px] bg-gray-700 rounded-full hover:bg-gray-600",onClick:l,children:n?m.exports.jsx(Bf,{}):m.exports.jsx(Nf,{})}),m.exports.jsx("div",{className:"relative flex-1 h-2 bg-gray-700 rounded-full overflow-hidden",children:m.exports.jsx("div",{className:"h-full bg-blue-500 transition-all",style:{width:`${s}%`}})}),m.exports.jsx("audio",{ref:o,src:e})]})},Uf=({attachmentUrl:e,attachmentType:t,attachmentFormat:n})=>e?t===Re.Voice?m.exports.jsx("div",{className:"w-full",children:m.exports.jsx($f,{src:e})}):t===Re.Image?m.exports.jsx("div",{className:"w-full",children:m.exports.jsx("img",{src:e})}):t===Re.File?m.exports.jsx("div",{className:"w-full mt-1",children:m.exports.jsx(Ro,{fileName:"productivity",fileSize:23e3,format:n??"UN",src:e})}):t===Re.Video?m.exports.jsx("div",{className:"w-full mt-1",children:m.exports.jsx(Ro,{fileName:"productivity",fileSize:23e3,format:n??"UN",src:e})}):null:null,Wf=({message:e,showUserProfile:t,handleContextMenu:n,media:r})=>{var s,i,o,l,a;return m.exports.jsxs(m.exports.Fragment,{children:[t?m.exports.jsx("img",{src:e.user.profileImageUrl,className:"w-12 h-12 bg-gray-300 rounded-full"}):null,m.exports.jsxs(hr.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.3},onContextMenu:c=>n(c,e),className:`relative ${r?"w-3/4":"w-fit max-w-3/4"}flex flex-col gap-1 md:max-w-[400px] p-2 pt-5 rounded-lg bg-green-200`,children:[m.exports.jsx("span",{className:"absolute top-1 text-xs text-orange-700",children:(s=e.user)!=null&&s.fullName&&((o=(i=e.user)==null?void 0:i.fullName)==null?void 0:o.length)>16?(l=e.user)==null?void 0:l.firstName:(a=e.user)==null?void 0:a.fullName}),r||null,m.exports.jsx("span",{children:e.text}),m.exports.jsx("div",{className:"w-full flex gap- items-center justify-end",children:m.exports.jsx("span",{className:"text-[10px]",children:new Date(e.createdDate).toLocaleTimeString().split(":")[0]+":"+new Date(e.createdDate).toLocaleTimeString().split(":")[1]})}),m.exports.jsx(pr,{className:"fill-blue-200 -rotate-180 scale-x-[-1] transition-discrete absolute -left-2 bottom-0 [&>g>path]:fill-green-200"})]})]})},zf=()=>m.exports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.exports.jsx("path",{d:"M11.6619 4.6478C11.8358 4.83691 11.8272 5.1347 11.6427 5.31294L4.36284 12.3463C4.14493 12.5568 3.80285 12.5503 3.59268 12.3317L1.13205 9.77168C0.954124 9.58658 0.956276 9.28866 1.13686 9.10628C1.31743 8.92389 1.60806 8.9261 1.78598 9.1112L3.99455 11.4089L11.013 4.62812C11.1975 4.44988 11.488 4.4587 11.6619 4.6478Z",fill:"gray"}),m.exports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.8759 4.64963C15.0492 4.83921 15.0399 5.13698 14.8549 5.31471L7.51066 12.3726C7.32572 12.5503 7.03524 12.5407 6.86185 12.3511C6.68847 12.1616 6.69784 11.8638 6.88278 11.6861L14.227 4.62818C14.412 4.45045 14.7025 4.46005 14.8759 4.64963Z",fill:"gray"})]}),Vo=({size:e=24,color:t="text-current",className:n})=>m.exports.jsx("div",{className:` ${n} animate-spin inline-flex items-center justify-center`,children:m.exports.jsxs("svg",{width:e,height:e,viewBox:"0 0 36 36",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[m.exports.jsx("defs",{children:m.exports.jsxs("linearGradient",{x1:"0%",y1:"100%",x2:"100%",y2:"100%",id:"linearGradient-1",children:[m.exports.jsx("stop",{stopColor:"currentColor",stopOpacity:"0",offset:"0%"}),m.exports.jsx("stop",{stopColor:"currentColor",stopOpacity:"0.50",offset:"39.9430698%"}),m.exports.jsx("stop",{stopColor:"currentColor",offset:"100%"})]})}),m.exports.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[m.exports.jsx("rect",{fillOpacity:"0.01",fill:"none",x:"0",y:"0",width:"36",height:"36"}),m.exports.jsx("path",{d:"M34,18 C34,9.163444 26.836556,2 18,2 C11.6597233,2 6.18078805,5.68784135 3.59122325,11.0354951",stroke:"url(#linearGradient-1)",strokeWidth:"4",strokeLinecap:"round"})]})]})}),Yf=({handleContextMenu:e,media:t,message:n})=>m.exports.jsxs(hr.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.3},onContextMenu:r=>e(r,n),className:`relative self-end ${t?"w-3/4":"max-w-3/4"} flex flex-col justify-center md:max-w-[400px] p-2 rounded-lg bg-blue-200`,children:[t||null,m.exports.jsx("span",{children:n.text}),m.exports.jsxs("div",{className:"w-full flex gap-1 items-center justify-end",children:[m.exports.jsx("span",{className:"text-[10px]",children:new Date(n.createdDate).toLocaleTimeString().split(":")[0]+":"+new Date(n.createdDate).toLocaleTimeString().split(":")[1]}),n.isSending?m.exports.jsx(Vo,{size:13,color:"text-black"}):m.exports.jsx(zf,{})]}),m.exports.jsx(pr,{className:"fill-blue-200 rotate-180 absolute -right-2 bottom-0 [&>g>path]:fill-blue-200"})]});var ce={exports:{}},mr={exports:{}},G={};var Oo;function Kf(){if(Oo)return G;Oo=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,a=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(p){if(typeof p=="object"&&p!==null){var M=p.$$typeof;switch(M){case t:switch(p=p.type,p){case a:case c:case r:case i:case s:case f:return p;default:switch(p=p&&p.$$typeof,p){case l:case u:case b:case g:case o:return p;default:return M}}case n:return M}}}function V(p){return E(p)===c}return G.AsyncMode=a,G.ConcurrentMode=c,G.ContextConsumer=l,G.ContextProvider=o,G.Element=t,G.ForwardRef=u,G.Fragment=r,G.Lazy=b,G.Memo=g,G.Portal=n,G.Profiler=i,G.StrictMode=s,G.Suspense=f,G.isAsyncMode=function(p){return V(p)||E(p)===a},G.isConcurrentMode=V,G.isContextConsumer=function(p){return E(p)===l},G.isContextProvider=function(p){return E(p)===o},G.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},G.isForwardRef=function(p){return E(p)===u},G.isFragment=function(p){return E(p)===r},G.isLazy=function(p){return E(p)===b},G.isMemo=function(p){return E(p)===g},G.isPortal=function(p){return E(p)===n},G.isProfiler=function(p){return E(p)===i},G.isStrictMode=function(p){return E(p)===s},G.isSuspense=function(p){return E(p)===f},G.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===c||p===i||p===s||p===f||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===b||p.$$typeof===g||p.$$typeof===o||p.$$typeof===l||p.$$typeof===u||p.$$typeof===P||p.$$typeof===T||p.$$typeof===C||p.$$typeof===y)},G.typeOf=E,G}var H={};var Lo;function qf(){return Lo||(Lo=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,a=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function E(j){return typeof j=="string"||typeof j=="function"||j===r||j===c||j===i||j===s||j===f||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===b||j.$$typeof===g||j.$$typeof===o||j.$$typeof===l||j.$$typeof===u||j.$$typeof===P||j.$$typeof===T||j.$$typeof===C||j.$$typeof===y)}function V(j){if(typeof j=="object"&&j!==null){var Ce=j.$$typeof;switch(Ce){case t:var at=j.type;switch(at){case a:case c:case r:case i:case s:case f:return at;default:var Ge=at&&at.$$typeof;switch(Ge){case l:case u:case b:case g:case o:return Ge;default:return Ce}}case n:return Ce}}}var p=a,M=c,$=l,R=o,X=t,N=u,se=r,ye=b,ae=g,ne=n,ve=i,le=s,Z=f,ue=!1;function Pe(j){return ue||(ue=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),v(j)||V(j)===a}function v(j){return V(j)===c}function S(j){return V(j)===l}function D(j){return V(j)===o}function _(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function O(j){return V(j)===u}function k(j){return V(j)===r}function I(j){return V(j)===b}function B(j){return V(j)===g}function U(j){return V(j)===n}function K(j){return V(j)===i}function W(j){return V(j)===s}function me(j){return V(j)===f}H.AsyncMode=p,H.ConcurrentMode=M,H.ContextConsumer=$,H.ContextProvider=R,H.Element=X,H.ForwardRef=N,H.Fragment=se,H.Lazy=ye,H.Memo=ae,H.Portal=ne,H.Profiler=ve,H.StrictMode=le,H.Suspense=Z,H.isAsyncMode=Pe,H.isConcurrentMode=v,H.isContextConsumer=S,H.isContextProvider=D,H.isElement=_,H.isForwardRef=O,H.isFragment=k,H.isLazy=I,H.isMemo=B,H.isPortal=U,H.isProfiler=K,H.isStrictMode=W,H.isSuspense=me,H.isValidElementType=E,H.typeOf=V}()),H}var ko;function _o(){return ko||(ko=1,function(e){process.env.NODE_ENV==="production"?e.exports=Kf():e.exports=qf()}(mr)),mr.exports}var gr,Io;function Gf(){if(Io)return gr;Io=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function s(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},l=0;l<10;l++)o["_"+String.fromCharCode(l)]=l;var a=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(a.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return gr=s()?Object.assign:function(i,o){for(var l,a=r(i),c,u=1;u<arguments.length;u++){l=Object(arguments[u]);for(var f in l)t.call(l,f)&&(a[f]=l[f]);if(e){c=e(l);for(var h=0;h<c.length;h++)n.call(l,c[h])&&(a[c[h]]=l[c[h]])}}return a},gr}var yr,Fo;function vr(){if(Fo)return yr;Fo=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return yr=e,yr}var xr,No;function Bo(){return No||(No=1,xr=Function.call.bind(Object.prototype.hasOwnProperty)),xr}var br,$o;function Hf(){if($o)return br;$o=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=vr(),n={},r=Bo();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function s(i,o,l,a,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var h=Error((a||"React class")+": "+l+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[u](o,u,a,l,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((a||"React class")+": type specification of "+l+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var g=c?c():"";e("Failed "+l+" type: "+f.message+(g??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},br=s,br}var Tr,Uo;function Xf(){if(Uo)return Tr;Uo=1;var e=_o(),t=Gf(),n=vr(),r=Bo(),s=Hf(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var a="Warning: "+l;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}});function o(){return null}return Tr=function(l,a){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(v){var S=v&&(c&&v[c]||v[u]);if(typeof S=="function")return S}var h="<<anonymous>>",g={array:T("array"),bigint:T("bigint"),bool:T("boolean"),func:T("function"),number:T("number"),object:T("object"),string:T("string"),symbol:T("symbol"),any:C(),arrayOf:E,element:V(),elementType:p(),instanceOf:M,node:N(),objectOf:R,oneOf:$,oneOfType:X,shape:ye,exact:ae};function b(v,S){return v===S?v!==0||1/v===1/S:v!==v&&S!==S}function y(v,S){this.message=v,this.data=S&&typeof S=="object"?S:{},this.stack=""}y.prototype=Error.prototype;function P(v){if(process.env.NODE_ENV!=="production")var S={},D=0;function _(k,I,B,U,K,W,me){if(U=U||h,W=W||B,me!==n){if(a){var j=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ce=U+":"+B;!S[Ce]&&D<3&&(i("You are manually calling a React.PropTypes validation function for the `"+W+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),S[Ce]=!0,D++)}}return I[B]==null?k?I[B]===null?new y("The "+K+" `"+W+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new y("The "+K+" `"+W+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:v(I,B,U,K,W)}var O=_.bind(null,!1);return O.isRequired=_.bind(null,!0),O}function T(v){function S(D,_,O,k,I,B){var U=D[_],K=le(U);if(K!==v){var W=Z(U);return new y("Invalid "+k+" `"+I+"` of type "+("`"+W+"` supplied to `"+O+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return P(S)}function C(){return P(o)}function E(v){function S(D,_,O,k,I){if(typeof v!="function")return new y("Property `"+I+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var B=D[_];if(!Array.isArray(B)){var U=le(B);return new y("Invalid "+k+" `"+I+"` of type "+("`"+U+"` supplied to `"+O+"`, expected an array."))}for(var K=0;K<B.length;K++){var W=v(B,K,O,k,I+"["+K+"]",n);if(W instanceof Error)return W}return null}return P(S)}function V(){function v(S,D,_,O,k){var I=S[D];if(!l(I)){var B=le(I);return new y("Invalid "+O+" `"+k+"` of type "+("`"+B+"` supplied to `"+_+"`, expected a single ReactElement."))}return null}return P(v)}function p(){function v(S,D,_,O,k){var I=S[D];if(!e.isValidElementType(I)){var B=le(I);return new y("Invalid "+O+" `"+k+"` of type "+("`"+B+"` supplied to `"+_+"`, expected a single ReactElement type."))}return null}return P(v)}function M(v){function S(D,_,O,k,I){if(!(D[_]instanceof v)){var B=v.name||h,U=Pe(D[_]);return new y("Invalid "+k+" `"+I+"` of type "+("`"+U+"` supplied to `"+O+"`, expected ")+("instance of `"+B+"`."))}return null}return P(S)}function $(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function S(D,_,O,k,I){for(var B=D[_],U=0;U<v.length;U++)if(b(B,v[U]))return null;var K=JSON.stringify(v,function(me,j){var Ce=Z(j);return Ce==="symbol"?String(j):j});return new y("Invalid "+k+" `"+I+"` of value `"+String(B)+"` "+("supplied to `"+O+"`, expected one of "+K+"."))}return P(S)}function R(v){function S(D,_,O,k,I){if(typeof v!="function")return new y("Property `"+I+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var B=D[_],U=le(B);if(U!=="object")return new y("Invalid "+k+" `"+I+"` of type "+("`"+U+"` supplied to `"+O+"`, expected an object."));for(var K in B)if(r(B,K)){var W=v(B,K,O,k,I+"."+K,n);if(W instanceof Error)return W}return null}return P(S)}function X(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var S=0;S<v.length;S++){var D=v[S];if(typeof D!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ue(D)+" at index "+S+"."),o}function _(O,k,I,B,U){for(var K=[],W=0;W<v.length;W++){var me=v[W],j=me(O,k,I,B,U,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&K.push(j.data.expectedType)}var Ce=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new y("Invalid "+B+" `"+U+"` supplied to "+("`"+I+"`"+Ce+"."))}return P(_)}function N(){function v(S,D,_,O,k){return ne(S[D])?null:new y("Invalid "+O+" `"+k+"` supplied to "+("`"+_+"`, expected a ReactNode."))}return P(v)}function se(v,S,D,_,O){return new y((v||"React class")+": "+S+" type `"+D+"."+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function ye(v){function S(D,_,O,k,I){var B=D[_],U=le(B);if(U!=="object")return new y("Invalid "+k+" `"+I+"` of type `"+U+"` "+("supplied to `"+O+"`, expected `object`."));for(var K in v){var W=v[K];if(typeof W!="function")return se(O,k,I,K,Z(W));var me=W(B,K,O,k,I+"."+K,n);if(me)return me}return null}return P(S)}function ae(v){function S(D,_,O,k,I){var B=D[_],U=le(B);if(U!=="object")return new y("Invalid "+k+" `"+I+"` of type `"+U+"` "+("supplied to `"+O+"`, expected `object`."));var K=t({},D[_],v);for(var W in K){var me=v[W];if(r(v,W)&&typeof me!="function")return se(O,k,I,W,Z(me));if(!me)return new y("Invalid "+k+" `"+I+"` key `"+W+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(D[_],null," ")+`
20
- Valid keys: `+JSON.stringify(Object.keys(v),null," "));var j=me(B,W,O,k,I+"."+W,n);if(j)return j}return null}return P(S)}function ne(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(ne);if(v===null||l(v))return!0;var S=f(v);if(S){var D=S.call(v),_;if(S!==v.entries){for(;!(_=D.next()).done;)if(!ne(_.value))return!1}else for(;!(_=D.next()).done;){var O=_.value;if(O&&!ne(O[1]))return!1}}else return!1;return!0;default:return!1}}function ve(v,S){return v==="symbol"?!0:S?S["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&S instanceof Symbol:!1}function le(v){var S=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":ve(S,v)?"symbol":S}function Z(v){if(typeof v>"u"||v===null)return""+v;var S=le(v);if(S==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return S}function ue(v){var S=Z(v);switch(S){case"array":case"object":return"an "+S;case"boolean":case"date":case"regexp":return"a "+S;default:return S}}function Pe(v){return!v.constructor||!v.constructor.name?h:v.constructor.name}return g.checkPropTypes=s,g.resetWarningCache=s.resetWarningCache,g.PropTypes=g,g},Tr}var wr,Wo;function Zf(){if(Wo)return wr;Wo=1;var e=vr();function t(){}function n(){}return n.resetWarningCache=t,wr=function(){function r(o,l,a,c,u,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function s(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},wr}if(process.env.NODE_ENV!=="production"){var Jf=_o(),Qf=!0;ce.exports=Xf()(Jf.isElement,Qf)}else ce.exports=Zf()();function Sr(){return Sr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sr.apply(this,arguments)}function ed(e,t){if(e==null)return{};var n=td(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function td(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Pr=x.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,s=e.size,i=s===void 0?24:s,o=ed(e,["color","size"]);return x.createElement("svg",Sr({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o),x.createElement("polyline",{points:"20 6 9 17 4 12"}))});Pr.propTypes={color:ce.exports.string,size:ce.exports.oneOfType([ce.exports.string,ce.exports.number])},Pr.displayName="Check";const nd=Pr;function Cr(){return Cr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cr.apply(this,arguments)}function rd(e,t){if(e==null)return{};var n=sd(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sd(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Er=x.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,s=e.size,i=s===void 0?24:s,o=rd(e,["color","size"]);return x.createElement("svg",Cr({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o),x.createElement("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),x.createElement("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))});Er.propTypes={color:ce.exports.string,size:ce.exports.oneOfType([ce.exports.string,ce.exports.number])},Er.displayName="Copy";const id=Er;function Ar(){return Ar=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ar.apply(this,arguments)}function od(e,t){if(e==null)return{};var n=ad(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ad(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var jr=x.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,s=e.size,i=s===void 0?24:s,o=od(e,["color","size"]);return x.createElement("svg",Ar({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o),x.createElement("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x.createElement("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}))});jr.propTypes={color:ce.exports.string,size:ce.exports.oneOfType([ce.exports.string,ce.exports.number])},jr.displayName="Edit";const ld=jr;function Mr(){return Mr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mr.apply(this,arguments)}function ud(e,t){if(e==null)return{};var n=cd(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cd(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Dr=x.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,s=e.size,i=s===void 0?24:s,o=ud(e,["color","size"]);return x.createElement("svg",Mr({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o),x.createElement("polyline",{points:"3 6 5 6 21 6"}),x.createElement("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}))});Dr.propTypes={color:ce.exports.string,size:ce.exports.oneOfType([ce.exports.string,ce.exports.number])},Dr.displayName="Trash";const fd=Dr,dd=({user:e,messages:t,updateMessages:n,onMessageSent:r,onEditMessage:s,onDeleteMessage:i})=>{const o=x.useRef(null),[l,a]=x.useState(!1),[c,u]=x.useState(null),[f,h]=x.useState(null),g=()=>{setTimeout(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},100)};x.useEffect(()=>{const p=()=>{h(null)};return window.addEventListener("scroll",p,!0),()=>{window.removeEventListener("scroll",p,!0)}},[h]);const b=(p,M)=>{p.preventDefault();const $=window.scrollX,R=window.scrollY;h({x:p.clientX+$,y:p.clientY+R,message:M})},y=()=>{h(null)},P=p=>{const M=new Ot({id:new Date().toString(),text:p,user:e,isRightSided:!0,createdDate:new Date().toString()});n([...t,M]),r(M),g()},T=p=>{const M=URL.createObjectURL(p),$=new Ot({id:new Date().toString(),text:"",attachmentUrl:M,attachmentType:Re.Voice,attachmentBlob:p,user:e,isRightSided:!0,createdDate:new Date().toString()});n([...t,$]),r($),g()},C=(p,M)=>{const $=URL.createObjectURL(p),R=new Ot({id:new Date().toString(),text:"",attachmentUrl:$,attachmentBlob:p,attachmentType:M,user:e,isRightSided:!0,createdDate:new Date().toString()});n([...t,R]),r(R),g()};return{handleDeleteConfirmation:()=>{c&&(i(c),u(null)),a(!1)},handleCloseContextMenu:y,contextMenuItems:[{name:"Edit",icon:m.exports.jsx(ld,{className:"text-gray-600"}),onlyCurrentUserMessage:!0,onClick:p=>{console.log("Edit clicked"),y(),s(p)}},{name:"Delete",icon:m.exports.jsx(fd,{className:"text-red-600"}),onlyCurrentUserMessage:!0,onClick:p=>{u(p),a(!0),y()}},{name:"Select",icon:m.exports.jsx(nd,{className:"text-green-600"}),disabled:!0,onClick:()=>{console.log("Select clicked"),y()}},{name:"Copy",icon:m.exports.jsx(id,{className:"text-blue-600"}),onClick:p=>{const M=t.find($=>$.id===p);M&&navigator.clipboard.writeText(M.text),y()}}],handleSendFile:C,handleSendVoice:T,handleSendMessage:P,handleContextMenu:b,isModalOpen:l,contextMenu:f,chatRef:o,setIsModalOpen:a}},hd=({width:e="400px",height:t="600px",isLoadingChat:n,className:r,style:s,messages:i,user:o,updateMessages:l,onMessageSent:a,onDeleteMessage:c,onEditMessage:u,dynamicSymbolAssignments:f,backgroundImage:h})=>{var R,X;const{handleDeleteConfirmation:g,handleCloseContextMenu:b,handleSendFile:y,handleSendVoice:P,handleSendMessage:T,handleContextMenu:C,contextMenuItems:E,isModalOpen:V,contextMenu:p,chatRef:M,setIsModalOpen:$}=dd({user:o,messages:i,updateMessages:l,onMessageSent:a,onEditMessage:u,onDeleteMessage:c});return m.exports.jsxs("div",{className:`flex flex-col !bg-cover ${r}`,style:{width:e,height:t,background:"url("+h+")",...s},onClick:b,children:[m.exports.jsx("div",{ref:M,className:`flex flex-col gap-2 flex-1 p-3 pb-16 ${p?"overflow-hidden pr-[22px]":"overflow-y-scroll"}`,children:n?m.exports.jsx(Vo,{className:"mt-3",size:27,color:"text-gray-800"}):m.exports.jsx($r,{children:i.length>0?i.map((N,se)=>{var ne,ve,le;const ye=N!=null&&N.attachmentUrl?m.exports.jsx(Uf,{attachmentUrl:N.attachmentUrl,attachmentType:N==null?void 0:N.attachmentType,attachmentFormat:N==null?void 0:N.attachmentFormat},se):null;if(N.isRightSided)return m.exports.jsx(Yf,{media:ye,handleContextMenu:C,message:N},se);const ae=((ve=(ne=i[se-1])==null?void 0:ne.user)==null?void 0:ve.id)!==((le=N==null?void 0:N.user)==null?void 0:le.id);return m.exports.jsx(Wf,{showUserProfile:ae,media:ye,handleContextMenu:C,message:N},se)}):null})}),m.exports.jsx(Of,{isOpen:V,onClose:()=>$(!1),onConfirm:g,header:"Confirm Delete",question:"Are you sure you want to delete this message?"}),p&&((R=p==null?void 0:p.message)!=null&&R.id)?m.exports.jsx(Lf,{items:E,isVisible:Boolean(p),messageId:String(p==null?void 0:p.message.id),isCurrentUserMessage:((X=p==null?void 0:p.message)==null?void 0:X.user.id)===o.id,position:{x:p==null?void 0:p.x,y:p==null?void 0:p.y}}):null,m.exports.jsx(Ff,{onSendVoice:P,onSendMessage:T,onFileSend:N=>y(N,Re.File),onImageSend:N=>y(N,Re.Image),onVideoSend:N=>y(N,Re.Video),dynamicSymbolAssignments:f})]})};fe.AttachmentTypeEnum=Re,fe.Button=oa,fe.Chat=hd,fe.MessageEntity=Ot,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})});
19
+ `),()=>{document.head.removeChild(m)}},[t]),p.exports.jsx(aa,{isPresent:t,childRef:s,sizeRef:i,children:nn.cloneElement(e,{ref:s})})}const ua=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:l})=>{const a=sn(ca),c=x.useId(),u=x.useCallback(h=>{a.set(h,!0);for(const m of a.values())if(!m)return;r&&r()},[a,r]),f=x.useMemo(()=>({id:c,initial:t,isPresent:n,custom:s,onExitComplete:u,register:h=>(a.set(h,!1),()=>a.delete(h))}),i?[Math.random(),u]:[n,u]);return x.useMemo(()=>{a.forEach((h,m)=>a.set(m,!1))},[n]),nn.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=p.exports.jsx(la,{isPresent:n,anchorX:l,children:e})),p.exports.jsx(Lt.Provider,{value:f,children:e})};function ca(){return new Map}function Fr(e=!0){const t=x.useContext(Lt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=x.useId();x.useEffect(()=>{if(e)return s(i)},[e]);const o=x.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const kt=e=>e.key||"";function Br(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const an=typeof window<"u",$r=an?x.useLayoutEffect:x.useEffect,Ur=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:l="left"})=>{const[a,c]=Fr(o),u=x.useMemo(()=>Br(e),[e]),f=o&&!a?[]:u.map(kt),h=x.useRef(!0),m=x.useRef(u),v=sn(()=>new Map),[y,S]=x.useState(u),[b,P]=x.useState(u);$r(()=>{h.current=!1,m.current=u;for(let g=0;g<b.length;g++){const L=kt(b[g]);f.includes(L)?v.delete(L):v.get(L)!==!0&&v.set(L,!1)}},[b,f.length,f.join("-")]);const C=[];if(u!==y){let g=[...u];for(let L=0;L<b.length;L++){const Y=b[L],E=kt(Y);f.includes(E)||(g.splice(L,0,Y),C.push(Y))}return i==="wait"&&C.length&&(g=C),P(Br(g)),S(u),null}process.env.NODE_ENV!=="production"&&i==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:O}=x.useContext(rn);return p.exports.jsx(p.exports.Fragment,{children:b.map(g=>{const L=kt(g),Y=o&&!a?!1:u===b||f.includes(L),E=()=>{if(v.has(L))v.set(L,!0);else return;let F=!0;v.forEach(G=>{G||(F=!1)}),F&&(O==null||O(),P(m.current),o&&(c==null||c()),r&&r())};return p.exports.jsx(ua,{isPresent:Y,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,onExitComplete:Y?void 0:E,anchorX:l,children:g},L)})})},we=e=>e;let Xe=we,ke=we;process.env.NODE_ENV!=="production"&&(Xe=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},ke=(e,t)=>{if(!e)throw new Error(t)});function ln(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ze=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ae=e=>e*1e3,Ve=e=>e/1e3,Wr={skipAnimations:!1,useManualTiming:!1},_t=["read","resolveKeyframes","update","preRender","render","postRender"],_e={value:null,addProjectionMetrics:null};function fa(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},a=0;function c(f){o.has(f)&&(u.schedule(f),e()),a++,f(l)}const u={schedule:(f,h=!1,m=!1)=>{const y=m&&s?n:r;return h&&o.add(f),y.has(f)||y.add(f),f},cancel:f=>{r.delete(f),o.delete(f)},process:f=>{if(l=f,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),t&&_e.value&&_e.value.frameloop[t].push(a),a=0,n.clear(),s=!1,i&&(i=!1,u.process(f))}};return u}const da=40;function zr(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=_t.reduce((b,P)=>(b[P]=fa(i,t?P:void 0),b),{}),{read:l,resolveKeyframes:a,update:c,preRender:u,render:f,postRender:h}=o,m=()=>{const b=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(b-s.timestamp,da),1),s.timestamp=b,s.isProcessing=!0,l.process(s),a.process(s),c.process(s),u.process(s),f.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(m))},v=()=>{n=!0,r=!0,s.isProcessing||e(m)};return{schedule:_t.reduce((b,P)=>{const C=o[P];return b[P]=(O,g=!1,L=!1)=>(n||v(),C.schedule(O,g,L)),b},{}),cancel:b=>{for(let P=0;P<_t.length;P++)o[_t[P]].cancel(b)},state:s,steps:o}}const{schedule:ee,cancel:Ie,state:he,steps:un}=zr(typeof requestAnimationFrame<"u"?requestAnimationFrame:we,!0),Yr=x.createContext({strict:!1}),Kr={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"]},Je={};for(const e in Kr)Je[e]={isEnabled:t=>Kr[e].some(n=>!!t[n])};function ha(e){for(const t in e)Je[t]={...Je[t],...e[t]}}const pa=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 It(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pa.has(e)}let qr=e=>!It(e);function ma(e){e&&(qr=t=>t.startsWith("on")?!It(t):e(t))}try{ma(require("@emotion/is-prop-valid").default)}catch{}function ga(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(qr(s)||n===!0&&It(s)||!t&&!It(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Gr=new Set;function Nt(e,t,n){e||Gr.has(t)||(console.warn(t),n&&console.warn(n),Gr.add(t))}function ya(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Nt(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const Ft=x.createContext({});function Bt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ht(e){return typeof e=="string"||Array.isArray(e)}const cn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fn=["initial",...cn];function $t(e){return Bt(e.animate)||fn.some(t=>ht(e[t]))}function Hr(e){return Boolean($t(e)||e.variants)}function va(e,t){if($t(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ht(n)?n:void 0,animate:ht(r)?r:void 0}}return e.inherit!==!1?t:{}}function xa(e){const{initial:t,animate:n}=va(e,x.useContext(Ft));return x.useMemo(()=>({initial:t,animate:n}),[Xr(t),Xr(n)])}function Xr(e){return Array.isArray(e)?e.join(" "):e}const ba=Symbol.for("motionComponentSymbol");function Qe(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ta(e,t,n){return x.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Qe(n)&&(n.current=r))},[t])}const dn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Zr="data-"+dn("framerAppearId"),{schedule:hn,cancel:Nd}=zr(queueMicrotask,!1),Jr=x.createContext({});function wa(e,t,n,r,s){var i,o;const{visualElement:l}=x.useContext(Ft),a=x.useContext(Yr),c=x.useContext(Lt),u=x.useContext(on).reducedMotion,f=x.useRef(null);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:l,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=f.current,m=x.useContext(Jr);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&Sa(f.current,n,s,m);const v=x.useRef(!1);x.useInsertionEffect(()=>{h&&v.current&&h.update(n,c)});const y=n[Zr],S=x.useRef(Boolean(y)&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,y))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,y)));return $r(()=>{h&&(v.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),hn.render(h.render),S.current&&h.animationState&&h.animationState.animateChanges())}),x.useEffect(()=>{h&&(!S.current&&h.animationState&&h.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,y)}),S.current=!1))}),h}function Sa(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:l,layoutScroll:a,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Qr(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:Boolean(o)||l&&Qe(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:a,layoutRoot:c})}function Qr(e){if(e)return e.options.allowProjection!==!1?e.projection:Qr(e.parent)}function Pa({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&ha(e);function l(c,u){let f;const h={...x.useContext(on),...c,layoutId:Ca(c)},{isStatic:m}=h,v=xa(c),y=r(c,m);if(!m&&an){Ea(h,e);const S=ja(h);f=S.MeasureLayout,v.visualElement=wa(s,y,h,t,S.ProjectionNode)}return p.exports.jsxs(Ft.Provider,{value:v,children:[f&&v.visualElement?p.exports.jsx(f,{visualElement:v.visualElement,...h}):null,n(s,c,Ta(y,v.visualElement,u),y,m,v.visualElement)]})}l.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const a=x.forwardRef(l);return a[ba]=s,a}function Ca({layoutId:e}){const t=x.useContext(rn).id;return t&&e!==void 0?t+"-"+e:e}function Ea(e,t){const n=x.useContext(Yr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Xe(!1,r):ke(!1,r)}}function ja(e){const{drag:t,layout:n}=Je;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const es=e=>t=>typeof t=="string"&&t.startsWith(e),pn=es("--"),Aa=es("var(--"),mn=e=>Aa(e)?Ma.test(e.split("/*")[0].trim()):!1,Ma=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,pt={};function Da(e){for(const t in e)pt[t]=e[t],pn(t)&&(pt[t].isCSSVariable=!0)}const et=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ue=new Set(et);function ts(e,{layout:t,layoutId:n}){return Ue.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!pt[e]||e==="opacity")}const pe=e=>Boolean(e&&e.getVelocity),ns=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Oe=(e,t,n)=>n>t?t:n<e?e:n,tt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mt={...tt,transform:e=>Oe(0,1,e)},Ut={...tt,default:1},gt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ne=gt("deg"),Me=gt("%"),N=gt("px"),Ra=gt("vh"),Va=gt("vw"),rs={...Me,parse:e=>Me.parse(e)/100,transform:e=>Me.transform(e*100)},Oa={borderWidth:N,borderTopWidth:N,borderRightWidth:N,borderBottomWidth:N,borderLeftWidth:N,borderRadius:N,radius:N,borderTopLeftRadius:N,borderTopRightRadius:N,borderBottomRightRadius:N,borderBottomLeftRadius:N,width:N,maxWidth:N,height:N,maxHeight:N,top:N,right:N,bottom:N,left:N,padding:N,paddingTop:N,paddingRight:N,paddingBottom:N,paddingLeft:N,margin:N,marginTop:N,marginRight:N,marginBottom:N,marginLeft:N,backgroundPositionX:N,backgroundPositionY:N},La={rotate:Ne,rotateX:Ne,rotateY:Ne,rotateZ:Ne,scale:Ut,scaleX:Ut,scaleY:Ut,scaleZ:Ut,skew:Ne,skewX:Ne,skewY:Ne,distance:N,translateX:N,translateY:N,translateZ:N,x:N,y:N,z:N,perspective:N,transformPerspective:N,opacity:mt,originX:rs,originY:rs,originZ:N},ss={...tt,transform:Math.round},gn={...Oa,...La,zIndex:ss,size:N,fillOpacity:mt,strokeOpacity:mt,numOctaves:ss},ka={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_a=et.length;function Ia(e,t,n){let r="",s=!0;for(let i=0;i<_a;i++){const o=et[i],l=e[o];if(l===void 0)continue;let a=!0;if(typeof l=="number"?a=l===(o.startsWith("scale")?1:0):a=parseFloat(l)===0,!a||n){const c=ns(l,gn[o]);if(!a){s=!1;const u=ka[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function yn(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,l=!1;for(const a in t){const c=t[a];if(Ue.has(a)){o=!0;continue}else if(pn(a)){s[a]=c;continue}else{const u=ns(c,gn[a]);a.startsWith("origin")?(l=!0,i[a]=u):r[a]=u}}if(t.transform||(o||n?r.transform=Ia(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:a="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${a} ${c} ${u}`}}const vn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function is(e,t,n){for(const r in t)!pe(t[r])&&!ts(r,n)&&(e[r]=t[r])}function Na({transformTemplate:e},t){return x.useMemo(()=>{const n=vn();return yn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Fa(e,t){const n=e.style||{},r={};return is(r,n,e),Object.assign(r,Na(e,t)),r}function Ba(e,t){const n={},r=Fa(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 $a=["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 xn(e){return typeof e!="string"||e.includes("-")?!1:!!($a.indexOf(e)>-1||/[A-Z]/u.test(e))}const Ua={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wa={offset:"strokeDashoffset",array:"strokeDasharray"};function za(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?Ua:Wa;e[i.offset]=N.transform(-r);const o=N.transform(t),l=N.transform(n);e[i.array]=`${o} ${l}`}function os(e,t,n){return typeof e=="string"?e:N.transform(t+n*e)}function Ya(e,t,n){const r=os(t,e.x,e.width),s=os(n,e.y,e.height);return`${r} ${s}`}function bn(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:l=1,pathOffset:a=0,...c},u,f){if(yn(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m,dimensions:v}=e;h.transform&&(v&&(m.transform=h.transform),delete h.transform),v&&(s!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Ya(v,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&za(h,o,l,a,!1)}const as=()=>({...vn(),attrs:{}}),Tn=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ka(e,t,n,r){const s=x.useMemo(()=>{const i=as();return bn(i,t,Tn(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};is(i,e.style,e),s.style={...i,...s.style}}return s}function qa(e=!1){return(n,r,s,{latestValues:i},o)=>{const a=(xn(n)?Ka:Ba)(r,i,o,n),c=ga(r,typeof n=="string",e),u=n!==x.Fragment?{...c,...a,ref:s}:{},{children:f}=r,h=x.useMemo(()=>pe(f)?f.get():f,[f]);return x.createElement(n,{...u,children:h})}}function ls(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function wn(e,t,n,r){if(typeof t=="function"){const[s,i]=ls(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=ls(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const Sn=e=>Array.isArray(e),Ga=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),Ha=e=>Sn(e)?e[e.length-1]||0:e;function Wt(e){const t=pe(e)?e.get():e;return Ga(t)?t.toValue():t}function Xa({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:Za(r,s,i,e),renderState:t()};return n&&(o.onMount=l=>n({props:r,current:l,...o}),o.onUpdate=l=>n(l)),o}const us=e=>(t,n)=>{const r=x.useContext(Ft),s=x.useContext(Lt),i=()=>Xa(e,t,r,s);return n?i():sn(i)};function Za(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=Wt(i[h]);let{initial:o,animate:l}=e;const a=$t(e),c=Hr(e);t&&c&&!a&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?l:o;if(f&&typeof f!="boolean"&&!Bt(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const v=wn(e,h[m]);if(v){const{transitionEnd:y,transition:S,...b}=v;for(const P in b){let C=b[P];if(Array.isArray(C)){const O=u?C.length-1:0;C=C[O]}C!==null&&(s[P]=C)}for(const P in y)s[P]=y[P]}}}return s}function Pn(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(pe(s[o])||t.style&&pe(t.style[o])||ts(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}const Ja={useVisualState:us({scrapeMotionValuesFromProps:Pn,createRenderState:vn})};function cs(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function fs(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const ds=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 hs(e,t,n,r){fs(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(ds.has(s)?s:dn(s),t.attrs[s])}function ps(e,t,n){const r=Pn(e,t,n);for(const s in e)if(pe(e[s])||pe(t[s])){const i=et.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}const ms=["x","y","width","height","cx","cy","r"],Qa={useVisualState:us({scrapeMotionValuesFromProps:ps,createRenderState:as,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in s)if(Ue.has(l)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let l=0;l<ms.length;l++){const a=ms[l];e[a]!==t[a]&&(o=!0)}o&&ee.read(()=>{cs(n,r),ee.render(()=>{bn(r,s,Tn(n.tagName),e.transformTemplate),hs(n,r)})})}})};function el(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...xn(r)?Qa:Ja,preloadedFeatures:e,useRender:qa(s),createVisualElement:t,Component:r};return Pa(o)}}function yt(e,t,n){const r=e.getProps();return wn(r,t,n!==void 0?n:r.custom,e)}const tl=ln(()=>window.ScrollTimeline!==void 0);class nl{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(tl()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class rl extends nl{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Cn(e,t){return e?e[t]||e.default||e:void 0}const En=2e4;function gs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<En;)t+=n,r=e.next(t);return t>=En?1/0:t}function jn(e){return typeof e=="function"}function ys(e,t){e.timeline=t,e.onfinish=null}const An=e=>Array.isArray(e)&&typeof e[0]=="number",sl={linearEasing:void 0};function il(e,t){const n=ln(e);return()=>{var r;return(r=sl[t])!==null&&r!==void 0?r:n()}}const zt=il(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vs=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=e(Ze(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function xs(e){return Boolean(typeof e=="function"&&zt()||!e||typeof e=="string"&&(e in Mn||zt())||An(e)||Array.isArray(e)&&e.every(xs))}const vt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Mn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vt([0,.65,.55,1]),circOut:vt([.55,0,1,.45]),backIn:vt([.31,.01,.66,-.59]),backOut:vt([.33,1.53,.69,.99])};function bs(e,t){if(e)return typeof e=="function"&&zt()?vs(e,t):An(e)?vt(e):Array.isArray(e)?e.map(n=>bs(n,t)||Mn.easeOut):Mn[e]}const je={x:!1,y:!1};function Ts(){return je.x||je.y}function ol(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;t&&(s=t.current);const i=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function ws(e,t){const n=ol(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Ss(e){return!(e.pointerType==="touch"||Ts())}function al(e,t,n={}){const[r,s,i]=ws(e,n),o=l=>{if(!Ss(l))return;const{target:a}=l,c=t(a,l);if(typeof c!="function"||!a)return;const u=f=>{Ss(f)&&(c(f),a.removeEventListener("pointerleave",u))};a.addEventListener("pointerleave",u,s)};return r.forEach(l=>{l.addEventListener("pointerenter",o,s)}),i}function Yt(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Ps=(e,t)=>t?e===t?!0:Ps(e,t.parentElement):!1,Dn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ll=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ul(e){return ll.has(e.tagName)||e.tabIndex!==-1}const xt=new WeakSet;function Cs(e){return t=>{t.key==="Enter"&&e(t)}}function Rn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const cl=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Cs(()=>{if(xt.has(n))return;Rn(n,"down");const s=Cs(()=>{Rn(n,"up")}),i=()=>Rn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Es(e){return Dn(e)&&!Ts()}function fl(e,t,n={}){const[r,s,i]=ws(e,n),o=l=>{const a=l.currentTarget;if(!a||!Es(l)||xt.has(a))return;xt.add(a),Yt(l,"set");const c=t(a,l),u=(m,v)=>{a.removeEventListener("pointerup",f),a.removeEventListener("pointercancel",h),Yt(m,"release"),!(!Es(m)||!xt.has(a))&&(xt.delete(a),typeof c=="function"&&c(m,{success:v}))},f=m=>{(m.isTrusted?dl(m,a instanceof Element?a.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(m,!1):u(m,!(a instanceof Element)||Ps(a,m.target))},h=m=>{u(m,!1)};a.addEventListener("pointerup",f,s),a.addEventListener("pointercancel",h,s),a.addEventListener("lostpointercapture",h,s)};return r.forEach(l=>{l=n.useGlobalTarget?window:l;let a=!1;l instanceof HTMLElement&&(a=!0,!ul(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0)),l.addEventListener("pointerdown",o,s),a&&l.addEventListener("focus",c=>cl(c,s),s)}),i}function dl(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function hl(e){return e==="x"||e==="y"?je[e]?null:(je[e]=!0,()=>{je[e]=!1}):je.x||je.y?null:(je.x=je.y=!0,()=>{je.x=je.y=!1})}const js=new Set(["width","height","top","left","right","bottom",...et]);let Kt;function pl(){Kt=void 0}const De={now:()=>(Kt===void 0&&De.set(he.isProcessing||Wr.useManualTiming?he.timestamp:performance.now()),Kt),set:e=>{Kt=e,queueMicrotask(pl)}};function Vn(e,t){e.indexOf(t)===-1&&e.push(t)}function On(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Ln{constructor(){this.subscriptions=[]}add(t){return Vn(this.subscriptions,t),()=>On(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function As(e,t){return t?e*(1e3/t):0}const Ms=30,ml=e=>!isNaN(parseFloat(e));class gl{constructor(t,n={}){this.version="12.4.7",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=De.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=De.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ml(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Nt(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ln);const r=this.events[t].add(n);return t==="change"?()=>{r(),ee.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}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()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=De.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ms)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ms);return As(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function bt(e,t){return new gl(e,t)}function yl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,bt(n))}function vl(e,t){const n=yt(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const l=Ha(i[o]);yl(e,o,l)}}function xl(e){return Boolean(pe(e)&&e.add)}function kn(e,t){const n=e.getValue("willChange");if(xl(n))return n.add(t)}function Ds(e){return e.props[Zr]}const bl={current:!1},Rs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Tl=1e-7,wl=12;function Sl(e,t,n,r,s){let i,o,l=0;do o=t+(n-t)/2,i=Rs(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>Tl&&++l<wl);return o}function Tt(e,t,n,r){if(e===t&&n===r)return we;const s=i=>Sl(i,0,1,e,n);return i=>i===0||i===1?i:Rs(s(i),t,r)}const Vs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Os=e=>t=>1-e(1-t),Ls=Tt(.33,1.53,.69,.99),_n=Os(Ls),ks=Vs(_n),_s=e=>(e*=2)<1?.5*_n(e):.5*(2-Math.pow(2,-10*(e-1))),In=e=>1-Math.sin(Math.acos(e)),Is=Os(In),Ns=Vs(In),Fs=e=>/^0[^.\s]+$/u.test(e);function Pl(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Fs(e):!0}const wt=e=>Math.round(e*1e5)/1e5,Nn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Cl(e){return e==null}const El=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fn=(e,t)=>n=>Boolean(typeof n=="string"&&El.test(n)&&n.startsWith(e)||t&&!Cl(n)&&Object.prototype.hasOwnProperty.call(n,t)),Bs=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,l]=r.match(Nn);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},jl=e=>Oe(0,255,e),Bn={...tt,transform:e=>Math.round(jl(e))},We={test:Fn("rgb","red"),parse:Bs("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bn.transform(e)+", "+Bn.transform(t)+", "+Bn.transform(n)+", "+wt(mt.transform(r))+")"};function Al(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const $n={test:Fn("#"),parse:Al,transform:We.transform},nt={test:Fn("hsl","hue"),parse:Bs("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Me.transform(wt(t))+", "+Me.transform(wt(n))+", "+wt(mt.transform(r))+")"},me={test:e=>We.test(e)||$n.test(e)||nt.test(e),parse:e=>We.test(e)?We.parse(e):nt.test(e)?nt.parse(e):$n.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?We.transform(e):nt.transform(e)},Ml=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Dl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Nn))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Ml))===null||n===void 0?void 0:n.length)||0)>0}const $s="number",Us="color",Rl="var",Vl="var(",Ws="${}",Ol=/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 St(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const l=t.replace(Ol,a=>(me.test(a)?(r.color.push(i),s.push(Us),n.push(me.parse(a))):a.startsWith(Vl)?(r.var.push(i),s.push(Rl),n.push(a)):(r.number.push(i),s.push($s),n.push(parseFloat(a))),++i,Ws)).split(Ws);return{values:n,split:l,indexes:r,types:s}}function zs(e){return St(e).values}function Ys(e){const{split:t,types:n}=St(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const l=n[o];l===$s?i+=wt(s[o]):l===Us?i+=me.transform(s[o]):i+=s[o]}return i}}const Ll=e=>typeof e=="number"?0:e;function kl(e){const t=zs(e);return Ys(e)(t.map(Ll))}const Fe={test:Dl,parse:zs,createTransformer:Ys,getAnimatableNone:kl},_l=new Set(["brightness","contrast","saturate","opacity"]);function Il(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Nn)||[];if(!r)return e;const s=n.replace(r,"");let i=_l.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const Nl=/\b([a-z-]*)\(.*?\)/gu,Un={...Fe,getAnimatableNone:e=>{const t=e.match(Nl);return t?t.map(Il).join(" "):e}},Fl={...gn,color:me,backgroundColor:me,outlineColor:me,fill:me,stroke:me,borderColor:me,borderTopColor:me,borderRightColor:me,borderBottomColor:me,borderLeftColor:me,filter:Un,WebkitFilter:Un},Wn=e=>Fl[e];function Ks(e,t){let n=Wn(e);return n!==Un&&(n=Fe),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Bl=new Set(["auto","none","0"]);function $l(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!Bl.has(i)&&St(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=Ks(n,s)}const qs=e=>e===tt||e===N,Gs=(e,t)=>parseFloat(e.split(", ")[t]),Hs=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Gs(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Gs(i[1],e):0}},Ul=new Set(["x","y","z"]),Wl=et.filter(e=>!Ul.has(e));function zl(e){const t=[];return Wl.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const rt={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:Hs(4,13),y:Hs(5,14)};rt.translateX=rt.x,rt.translateY=rt.y;const ze=new Set;let zn=!1,Yn=!1;function Xs(){if(Yn){const e=Array.from(ze).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=zl(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var l;(l=r.getValue(i))===null||l===void 0||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Yn=!1,zn=!1,ze.forEach(e=>e.complete()),ze.clear()}function Zs(){ze.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yn=!0)})}function Yl(){Zs(),Xs()}class Kn{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ze.add(this),zn||(zn=!0,ee.read(Zs),ee.resolveKeyframes(Xs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,l);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ze.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ze.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Js=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Kl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ql(e){const t=Kl.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Gl=4;function Qs(e,t,n=1){ke(n<=Gl,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=ql(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return Js(o)?parseFloat(o):o}return mn(s)?Qs(s,t,n+1):s}const ei=e=>t=>t.test(e),ti=[tt,N,Me,Ne,Va,Ra,{test:e=>e==="auto",parse:e=>e}],ni=e=>ti.find(ei(e));class ri extends Kn{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let c=t[a];if(typeof c=="string"&&(c=c.trim(),mn(c))){const u=Qs(c,n.current);u!==void 0&&(t[a]=u),a===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!js.has(r)||t.length!==2)return;const[s,i]=t,o=ni(s),l=ni(i);if(o!==l)if(qs(o)&&qs(l))for(let a=0;a<t.length;a++){const c=t[a];typeof c=="string"&&(t[a]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)Pl(t[s])&&r.push(s);r.length&&$l(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=rt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,l=s[o];s[o]=rt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([a,c])=>{n.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const si=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Fe.test(e)||e==="0")&&!e.startsWith("url("));function Hl(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 Xl(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=si(s,t),l=si(i,t);return Xe(o===l,`You are trying to animate ${t} from "${s}" to "${i}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${i} via the \`style\` property.`),!o||!l?!1:Hl(e)||(n==="spring"||jn(n))&&r}const Zl=e=>e!==null;function qt(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Zl),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const Jl=40;class ii{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=De.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Jl?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Yl(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=De.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:l,onUpdate:a,isGenerator:c}=this.options;if(!c&&!Xl(t,r,s,i))if(o)this.options.duration=0;else{a&&a(qt(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Pt={layout:0,mainThread:0,waapi:0},re=(e,t,n)=>e+(t-e)*n;function qn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ql({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;s=qn(a,l,e+1/3),i=qn(a,l,e),o=qn(a,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Gt(e,t){return n=>n>0?t:e}const Gn=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},eu=[$n,We,nt],tu=e=>eu.find(t=>t.test(e));function oi(e){const t=tu(e);if(Xe(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let n=t.parse(e);return t===nt&&(n=Ql(n)),n}const ai=(e,t)=>{const n=oi(e),r=oi(t);if(!n||!r)return Gt(e,t);const s={...n};return i=>(s.red=Gn(n.red,r.red,i),s.green=Gn(n.green,r.green,i),s.blue=Gn(n.blue,r.blue,i),s.alpha=re(n.alpha,r.alpha,i),We.transform(s))},nu=(e,t)=>n=>t(e(n)),Ct=(...e)=>e.reduce(nu),Hn=new Set(["none","hidden"]);function ru(e,t){return Hn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function su(e,t){return n=>re(e,t,n)}function Xn(e){return typeof e=="number"?su:typeof e=="string"?mn(e)?Gt:me.test(e)?ai:au:Array.isArray(e)?li:typeof e=="object"?me.test(e)?ai:iu:Gt}function li(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Xn(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function iu(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Xn(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function ou(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],l=e.indexes[o][s[o]],a=(n=e.values[l])!==null&&n!==void 0?n:0;r[i]=a,s[o]++}return r}const au=(e,t)=>{const n=Fe.createTransformer(t),r=St(e),s=St(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Hn.has(e)&&!s.values.length||Hn.has(t)&&!r.values.length?ru(e,t):Ct(li(ou(r,s),s.values),n):(Xe(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Gt(e,t))};function ui(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?re(e,t,n):Xn(e)(e,t)}const lu=5;function ci(e,t,n){const r=Math.max(t-lu,0);return As(n-e(r),t-r)}const se={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},Zn=.001;function uu({duration:e=se.duration,bounce:t=se.bounce,velocity:n=se.velocity,mass:r=se.mass}){let s,i;Xe(e<=Ae(se.maxDuration),"Spring duration must be 10 seconds or less");let o=1-t;o=Oe(se.minDamping,se.maxDamping,o),e=Oe(se.minDuration,se.maxDuration,Ve(e)),o<1?(s=c=>{const u=c*o,f=u*e,h=u-n,m=Jn(c,o),v=Math.exp(-f);return Zn-h/m*v},i=c=>{const f=c*o*e,h=f*n+n,m=Math.pow(o,2)*Math.pow(c,2)*e,v=Math.exp(-f),y=Jn(Math.pow(c,2),o);return(-s(c)+Zn>0?-1:1)*((h-m)*v)/y}):(s=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Zn+u*f},i=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const l=5/e,a=fu(s,i,l);if(e=Ae(e),isNaN(a))return{stiffness:se.stiffness,damping:se.damping,duration:e};{const c=Math.pow(a,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const cu=12;function fu(e,t,n){let r=n;for(let s=1;s<cu;s++)r=r-e(r)/t(r);return r}function Jn(e,t){return e*Math.sqrt(1-t*t)}const du=["duration","bounce"],hu=["stiffness","damping","mass"];function fi(e,t){return t.some(n=>e[n]!==void 0)}function pu(e){let t={velocity:se.velocity,stiffness:se.stiffness,damping:se.damping,mass:se.mass,isResolvedFromDuration:!1,...e};if(!fi(e,hu)&&fi(e,du))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Oe(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:se.mass,stiffness:s,damping:i}}else{const n=uu(e);t={...t,...n,mass:se.mass},t.isResolvedFromDuration=!0}return t}function di(e=se.visualDuration,t=se.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:a,damping:c,mass:u,duration:f,velocity:h,isResolvedFromDuration:m}=pu({...n,velocity:-Ve(n.velocity||0)}),v=h||0,y=c/(2*Math.sqrt(a*u)),S=o-i,b=Ve(Math.sqrt(a/u)),P=Math.abs(S)<5;r||(r=P?se.restSpeed.granular:se.restSpeed.default),s||(s=P?se.restDelta.granular:se.restDelta.default);let C;if(y<1){const g=Jn(b,y);C=L=>{const Y=Math.exp(-y*b*L);return o-Y*((v+y*b*S)/g*Math.sin(g*L)+S*Math.cos(g*L))}}else if(y===1)C=g=>o-Math.exp(-b*g)*(S+(v+b*S)*g);else{const g=b*Math.sqrt(y*y-1);C=L=>{const Y=Math.exp(-y*b*L),E=Math.min(g*L,300);return o-Y*((v+y*b*S)*Math.sinh(E)+g*S*Math.cosh(E))/g}}const O={calculatedDuration:m&&f||null,next:g=>{const L=C(g);if(m)l.done=g>=f;else{let Y=0;y<1&&(Y=g===0?Ae(v):ci(C,g,L));const E=Math.abs(Y)<=r,F=Math.abs(o-L)<=s;l.done=E&&F}return l.value=l.done?o:L,l},toString:()=>{const g=Math.min(gs(O),En),L=vs(Y=>O.next(g*Y).value,g,30);return g+"ms "+L}};return O}function hi({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:a,restDelta:c=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},m=E=>l!==void 0&&E<l||a!==void 0&&E>a,v=E=>l===void 0?a:a===void 0||Math.abs(l-E)<Math.abs(a-E)?l:a;let y=n*t;const S=f+y,b=o===void 0?S:o(S);b!==S&&(y=b-f);const P=E=>-y*Math.exp(-E/r),C=E=>b+P(E),O=E=>{const F=P(E),G=C(E);h.done=Math.abs(F)<=c,h.value=h.done?b:G};let g,L;const Y=E=>{m(h.value)&&(g=E,L=di({keyframes:[h.value,v(h.value)],velocity:ci(C,E,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return Y(0),{calculatedDuration:null,next:E=>{let F=!1;return!L&&g===void 0&&(F=!0,O(E),Y(E)),g!==void 0&&E>=g?L.next(E-g):(!F&&O(E),h)}}}const mu=Tt(.42,0,1,1),gu=Tt(0,0,.58,1),pi=Tt(.42,0,.58,1),yu=e=>Array.isArray(e)&&typeof e[0]!="number",mi={linear:we,easeIn:mu,easeInOut:pi,easeOut:gu,circIn:In,circInOut:Ns,circOut:Is,backIn:_n,backInOut:ks,backOut:Ls,anticipate:_s},gi=e=>{if(An(e)){ke(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return Tt(t,n,r,s)}else if(typeof e=="string")return ke(mi[e]!==void 0,`Invalid easing type '${e}'`),mi[e];return e};function vu(e,t,n){const r=[],s=n||ui,i=e.length-1;for(let o=0;o<i;o++){let l=s(e[o],e[o+1]);if(t){const a=Array.isArray(t)?t[o]||we:t;l=Ct(a,l)}r.push(l)}return r}function xu(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(ke(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=vu(t,r,s),a=l.length,c=u=>{if(o&&u<e[0])return t[0];let f=0;if(a>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=Ze(e[f],e[f+1],u);return l[f](h)};return n?u=>c(Oe(e[0],e[i-1],u)):c}function bu(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Ze(0,t,r);e.push(re(n,1,s))}}function Tu(e){const t=[0];return bu(t,e.length-1),t}function wu(e,t){return e.map(n=>n*t)}function Su(e,t){return e.map(()=>t||pi).splice(0,e.length-1)}function Et({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=yu(r)?r.map(gi):gi(r),i={done:!1,value:t[0]},o=wu(n&&n.length===t.length?n:Tu(t),e),l=xu(o,t,{ease:Array.isArray(s)?s:Su(t,s)});return{calculatedDuration:e,next:a=>(i.value=l(a),i.done=a>=e,i)}}const Pu=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ee.update(t,!0),stop:()=>Ie(t),now:()=>he.isProcessing?he.timestamp:De.now()}},Cu={decay:hi,inertia:hi,tween:Et,keyframes:Et,spring:di},Eu=e=>e/100;class Qn extends ii{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||Kn,l=(a,c)=>this.onKeyframesResolved(a,c);this.resolver=new o(i,l,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,l=jn(n)?n:Cu[n]||Et;let a,c;process.env.NODE_ENV!=="production"&&l!==Et&&ke(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==Et&&typeof t[0]!="number"&&(a=Ct(Eu,ui(t[0],t[1])),t=[0,100]);const u=l({...this.options,keyframes:t});i==="mirror"&&(c=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=gs(u));const{calculatedDuration:f}=u,h=f+s,m=h*(r+1)-s;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:a,calculatedDuration:f,resolvedDuration:h,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;Pt.mainThread++,this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:E}=this.options;return{done:!0,value:E[E.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:a,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:m,repeatType:v,repeatDelay:y,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-h*(this.speed>=0?1:-1),P=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let C=this.currentTime,O=i;if(m){const E=Math.min(this.currentTime,u)/f;let F=Math.floor(E),G=E%1;!G&&E>=1&&(G=1),G===1&&F--,F=Math.min(F,m+1),Boolean(F%2)&&(v==="reverse"?(G=1-G,y&&(G-=y/f)):v==="mirror"&&(O=o)),C=Oe(0,1,G)*f}const g=P?{done:!1,value:a[0]}:O.next(C);l&&(g.value=l(g.value));let{done:L}=g;!P&&c!==null&&(L=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const Y=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return Y&&s!==void 0&&(g.value=qt(a,this.options,s)),S&&S(g.value),Y&&this.finish(),g}get duration(){const{resolved:t}=this;return t?Ve(t.calculatedDuration):0}get time(){return Ve(this.currentTime)}set time(t){t=Ae(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ve(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Pu,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel(),Pt.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const ju=new Set(["opacity","clipPath","filter","transform"]);function Au(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:l="easeInOut",times:a}={}){const c={[t]:n};a&&(c.offset=a);const u=bs(l,s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const Mu=ln(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ht=10,Du=2e4;function Ru(e){return jn(e.type)||e.type==="spring"||!xs(e.ease)}function Vu(e,t){const n=new Qn({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&i<Du;)r=n.sample(i),s.push(r.value),i+=Ht;return{times:void 0,keyframes:s,duration:i-Ht,ease:"linear"}}const yi={anticipate:_s,backInOut:ks,circInOut:Ns};function Ou(e){return e in yi}class vi extends ii{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new ri(i,(o,l)=>this.onKeyframesResolved(o,l),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:l,name:a,startTime:c}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&zt()&&Ou(i)&&(i=yi[i]),Ru(this.options)){const{onComplete:f,onUpdate:h,motionValue:m,element:v,...y}=this.options,S=Vu(t,y);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,s=S.times,i=S.ease,o="keyframes"}const u=Au(l.owner.current,a,t,{...this.options,duration:r,times:s,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(ys(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(qt(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ve(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ve(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ae(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return we;const{animation:r}=n;ys(r,t)}return we}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,element:h,...m}=this.options,v=new Qn({...m,keyframes:r,duration:s,type:i,ease:o,times:l,isGenerator:!0}),y=Ae(this.time);c.setWithVelocity(v.sample(y-Ht).value,v.sample(y).value,Ht)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:c}=n.owner.getProps();return Mu()&&r&&ju.has(r)&&!a&&!c&&!s&&i!=="mirror"&&o!==0&&l!=="inertia"}}const Lu={type:"spring",stiffness:500,damping:25,restSpeed:10},ku=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_u={type:"keyframes",duration:.8},Iu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Nu=(e,{keyframes:t})=>t.length>2?_u:Ue.has(e)?e.startsWith("scale")?ku(t[1]):Lu:Iu;function Fu({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:l,from:a,elapsed:c,...u}){return!!Object.keys(u).length}const er=(e,t,n,r={},s,i)=>o=>{const l=Cn(r,e)||{},a=l.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Ae(a);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:s};Fu(l)||(u={...u,...Nu(e,u)}),u.duration&&(u.duration=Ae(u.duration)),u.repeatDelay&&(u.repeatDelay=Ae(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(f=!0)),(bl.current||Wr.skipAnimations)&&(f=!0,u.duration=0,u.delay=0),f&&!i&&t.get()!==void 0){const h=qt(u.keyframes,l);if(h!==void 0)return ee.update(()=>{u.onUpdate(h),u.onComplete()}),new rl([])}return!i&&vi.supports(u)?new vi(u):new Qn(u)};function Bu({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function xi(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...a}=t;r&&(o=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),m=a[f];if(m===void 0||u&&Bu(u,f))continue;const v={delay:n,...Cn(o||{},f)};let y=!1;if(window.MotionHandoffAnimation){const b=Ds(e);if(b){const P=window.MotionHandoffAnimation(b,f,ee);P!==null&&(v.startTime=P,y=!0)}}kn(e,f),h.start(er(f,h,m,e.shouldReduceMotion&&js.has(f)?{type:!1}:v,e,y));const S=h.animation;S&&c.push(S)}return l&&Promise.all(c).then(()=>{ee.update(()=>{l&&vl(e,l)})}),c}function tr(e,t,n={}){var r;const s=yt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(xi(e,s,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=i;return $u(e,t,u+c,f,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,l]:[l,o];return c().then(()=>u())}else return Promise.all([o(),l(n.delay)])}function $u(e,t,n=0,r=0,s=1,i){const o=[],l=(e.variantChildren.size-1)*r,a=s===1?(c=0)=>c*r:(c=0)=>l-c*r;return Array.from(e.variantChildren).sort(Uu).forEach((c,u)=>{c.notify("AnimationStart",t),o.push(tr(c,t,{...i,delay:n+a(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function Uu(e,t){return e.sortNodePosition(t)}function Wu(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>tr(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=tr(e,t,n);else{const s=typeof t=="function"?yt(e,t,n.custom):t;r=Promise.all(xi(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function bi(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 zu=fn.length;function Ti(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ti(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<zu;n++){const r=fn[n],s=e.props[r];(ht(s)||s===!1)&&(t[r]=s)}return t}const Yu=[...cn].reverse(),Ku=cn.length;function qu(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Wu(e,n,r)))}function Gu(e){let t=qu(e),n=wi(),r=!0;const s=a=>(c,u)=>{var f;const h=yt(e,u,a==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:m,transitionEnd:v,...y}=h;c={...c,...y,...v}}return c};function i(a){t=a(e)}function o(a){const{props:c}=e,u=Ti(e.parent)||{},f=[],h=new Set;let m={},v=1/0;for(let S=0;S<Ku;S++){const b=Yu[S],P=n[b],C=c[b]!==void 0?c[b]:u[b],O=ht(C),g=b===a?P.isActive:null;g===!1&&(v=S);let L=C===u[b]&&C!==c[b]&&O;if(L&&r&&e.manuallyAnimateOnMount&&(L=!1),P.protectedKeys={...m},!P.isActive&&g===null||!C&&!P.prevProp||Bt(C)||typeof C=="boolean")continue;const Y=Hu(P.prevProp,C);let E=Y||b===a&&P.isActive&&!L&&O||S>v&&O,F=!1;const G=Array.isArray(C)?C:[C];let ne=G.reduce(s(b),{});g===!1&&(ne={});const{prevResolvedValues:ve={}}=P,U={...ve,...ne},te=H=>{E=!0,h.has(H)&&(F=!0,h.delete(H)),P.needsAnimating[H]=!0;const ie=e.getValue(H);ie&&(ie.liveStyle=!1)};for(const H in U){const ie=ne[H],xe=ve[H];if(m.hasOwnProperty(H))continue;let w=!1;Sn(ie)&&Sn(xe)?w=!bi(ie,xe):w=ie!==xe,w?ie!=null?te(H):h.add(H):ie!==void 0&&h.has(H)?te(H):P.protectedKeys[H]=!0}P.prevProp=C,P.prevResolvedValues=ne,P.isActive&&(m={...m,...ne}),r&&e.blockInitialAnimation&&(E=!1),E&&(!(L&&Y)||F)&&f.push(...G.map(H=>({animation:H,options:{type:b}})))}if(h.size){const S={};if(typeof c.initial!="boolean"){const b=yt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(S.transition=b.transition)}h.forEach(b=>{const P=e.getBaseTarget(b),C=e.getValue(b);C&&(C.liveStyle=!0),S[b]=P??null}),f.push({animation:S})}let y=Boolean(f.length);return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function l(a,c){var u;if(n[a].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var m;return(m=h.animationState)===null||m===void 0?void 0:m.setActive(a,c)}),n[a].isActive=c;const f=o(a);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=wi(),r=!0}}}function Hu(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!bi(t,e):!1}function Ye(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wi(){return{animate:Ye(!0),whileInView:Ye(),whileHover:Ye(),whileTap:Ye(),whileDrag:Ye(),whileFocus:Ye(),exit:Ye()}}class Be{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Xu extends Be{constructor(t){super(t),t.animationState||(t.animationState=Gu(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Bt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Zu=0;class Ju extends Be{constructor(){super(...arguments),this.id=Zu++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Qu={animation:{Feature:Xu},exit:{Feature:Ju}};function jt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function At(e){return{point:{x:e.pageX,y:e.pageY}}}const ec=e=>t=>Dn(t)&&e(t,At(t));function st(e,t,n,r){return jt(e,t,ec(n),r)}function Si({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function nc(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}}const Pi=1e-4,rc=1-Pi,sc=1+Pi,Ci=.01,ic=0-Ci,oc=0+Ci;function ye(e){return e.max-e.min}function ac(e,t,n){return Math.abs(e-t)<=n}function Ei(e,t,n,r=.5){e.origin=r,e.originPoint=re(t.min,t.max,e.origin),e.scale=ye(n)/ye(t),e.translate=re(n.min,n.max,e.origin)-e.originPoint,(e.scale>=rc&&e.scale<=sc||isNaN(e.scale))&&(e.scale=1),(e.translate>=ic&&e.translate<=oc||isNaN(e.translate))&&(e.translate=0)}function Mt(e,t,n,r){Ei(e.x,t.x,n.x,r?r.originX:void 0),Ei(e.y,t.y,n.y,r?r.originY:void 0)}function ji(e,t,n){e.min=n.min+t.min,e.max=e.min+ye(t)}function lc(e,t,n){ji(e.x,t.x,n.x),ji(e.y,t.y,n.y)}function Ai(e,t,n){e.min=t.min-n.min,e.max=e.min+ye(t)}function Dt(e,t,n){Ai(e.x,t.x,n.x),Ai(e.y,t.y,n.y)}const Mi=()=>({translate:0,scale:1,origin:0,originPoint:0}),it=()=>({x:Mi(),y:Mi()}),Di=()=>({min:0,max:0}),oe=()=>({x:Di(),y:Di()});function Se(e){return[e("x"),e("y")]}function nr(e){return e===void 0||e===1}function rr({scale:e,scaleX:t,scaleY:n}){return!nr(e)||!nr(t)||!nr(n)}function Ke(e){return rr(e)||Ri(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ri(e){return Vi(e.x)||Vi(e.y)}function Vi(e){return e&&e!=="0%"}function Xt(e,t,n){const r=e-n,s=t*r;return n+s}function Oi(e,t,n,r,s){return s!==void 0&&(e=Xt(e,s,r)),Xt(e,n,r)+t}function sr(e,t=0,n=1,r,s){e.min=Oi(e.min,t,n,r,s),e.max=Oi(e.max,t,n,r,s)}function Li(e,{x:t,y:n}){sr(e.x,t.translate,t.scale,t.originPoint),sr(e.y,n.translate,n.scale,n.originPoint)}const ki=.999999999999,_i=1.0000000000001;function uc(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:a}=i.options;a&&a.props.style&&a.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&at(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Li(e,o)),r&&Ke(i.latestValues)&&at(e,i.latestValues))}t.x<_i&&t.x>ki&&(t.x=1),t.y<_i&&t.y>ki&&(t.y=1)}function ot(e,t){e.min=e.min+t,e.max=e.max+t}function Ii(e,t,n,r,s=.5){const i=re(e.min,e.max,s);sr(e,t,n,i,r)}function at(e,t){Ii(e.x,t.x,t.scaleX,t.scale,t.originX),Ii(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ni(e,t){return Si(nc(e.getBoundingClientRect(),t))}function cc(e,t,n){const r=Ni(e,n),{scroll:s}=t;return s&&(ot(r.x,s.offset.x),ot(r.y,s.offset.y)),r}const Fi=(e,t)=>Math.abs(e-t);function fc(e,t){const n=Fi(e.x,t.x),r=Fi(e.y,t.y);return Math.sqrt(n**2+r**2)}class Bi{constructor(t,n,{transformPagePoint:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=or(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=fc(u.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:m}=u,{timestamp:v}=he;this.history.push({...m,timestamp:v});const{onStart:y,onMove:S}=this.handlers;f||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{if(u.target instanceof Element&&u.target.hasPointerCapture&&u.pointerId!==void 0)try{if(!u.target.hasPointerCapture(u.pointerId))return}catch{}this.lastMoveEvent=u,this.lastMoveEventInfo=ir(f,this.transformPagePoint),ee.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{Yt(u,"release"),this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=or(u.type==="pointercancel"||u.type==="lostpointercapture"?this.lastMoveEventInfo:ir(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,y),m&&m(u,y)},!Dn(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r;const i=At(t),o=ir(i,this.transformPagePoint),{point:l}=o,{timestamp:a}=he;this.history=[{...l,timestamp:a}];const{onSessionStart:c}=n;c&&c(t,or(o,this.history)),Yt(t,"set"),this.removeListeners=Ct(st(t.currentTarget,"pointermove",this.handlePointerMove),st(t.currentTarget,"pointerup",this.handlePointerUp),st(t.currentTarget,"pointercancel",this.handlePointerUp),st(t.currentTarget,"lostpointercapture",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ie(this.updatePoint)}}function ir(e,t){return t?{point:t(e.point)}:e}function $i(e,t){return{x:e.x-t.x,y:e.y-t.y}}function or({point:e},t){return{point:e,delta:$i(e,Ui(t)),offset:$i(e,dc(t)),velocity:hc(t,.1)}}function dc(e){return e[0]}function Ui(e){return e[e.length-1]}function hc(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Ui(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Ae(t)));)n--;if(!r)return{x:0,y:0};const i=Ve(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function pc(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?re(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?re(n,e,r.max):Math.min(e,n)),e}function Wi(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 mc(e,{top:t,left:n,bottom:r,right:s}){return{x:Wi(e.x,n,s),y:Wi(e.y,t,r)}}function zi(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 gc(e,t){return{x:zi(e.x,t.x),y:zi(e.y,t.y)}}function yc(e,t){let n=.5;const r=ye(e),s=ye(t);return s>r?n=Ze(t.min,t.max-r,e.min):r>s&&(n=Ze(e.min,e.max-s,t.min)),Oe(0,1,n)}function vc(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 ar=.35;function xc(e=ar){return e===!1?e=0:e===!0&&(e=ar),{x:Yi(e,"left","right"),y:Yi(e,"top","bottom")}}function Yi(e,t,n){return{min:Ki(e,t),max:Ki(e,n)}}function Ki(e,t){return typeof e=="number"?e:e[t]||0}const bc=new WeakMap;class Tc{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=oe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(At(u).point)},i=(u,f)=>{const{drag:h,dragPropagation:m,onDragStart:v}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=hl(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Se(S=>{let b=this.getAxisMotionValue(S).get()||0;if(Me.test(b)){const{projection:P}=this.visualElement;if(P&&P.layout){const C=P.layout.layoutBox[S];C&&(b=ye(C)*(parseFloat(b)/100))}}this.originPoint[S]=b}),v&&ee.postRender(()=>v(u,f)),kn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(u,f)=>{const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:v,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:S}=f;if(m&&this.currentDirection===null){this.currentDirection=wc(S),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,S),this.updateAxis("y",f.point,S),this.visualElement.render(),y&&y(u,f)},l=(u,f)=>this.stop(u,f),a=()=>Se(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Bi(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:l,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&ee.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Zt(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=pc(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Qe(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=mc(s.layoutBox,n):this.constraints=!1,this.elastic=xc(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Se(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=vc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Qe(t))return!1;const r=t.current;ke(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=cc(r,s.root,this.visualElement.getTransformPagePoint());let o=gc(s.layout.layoutBox,i);if(n){const l=n(tc(o));this.hasMutatedConstraints=!!l,l&&(o=Si(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},c=Se(u=>{if(!Zt(u,n,this.currentDirection))return;let f=a&&a[u]||{};o&&(f={min:0,max:0});const h=s?200:1e6,m=s?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return kn(this.visualElement,t),r.start(er(t,r,0,n,this.visualElement,!1))}stopAnimation(){Se(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Se(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Se(n=>{const{drag:r}=this.getProps();if(!Zt(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[n];i.set(t[n]-re(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Qe(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Se(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const a=l.get();s[o]=yc({min:a,max:a},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Se(o=>{if(!Zt(o,t,null))return;const l=this.getAxisMotionValue(o),{min:a,max:c}=this.constraints[o];l.set(re(a,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;bc.set(this.visualElement,this);const t=this.visualElement.current,n=st(t,"pointerdown",a=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();Qe(a)&&a.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ee.read(r);const o=jt(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:a,hasLayoutChanged:c})=>{this.isDragging&&c&&(Se(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=a[u].translate,f.set(f.get()+a[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=ar,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function Zt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function wc(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Sc extends Be{constructor(t){super(t),this.removeGroupControls=we,this.removeListeners=we,this.controls=new Tc(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||we}unmount(){this.removeGroupControls(),this.removeListeners()}}const qi=e=>(t,n)=>{e&&ee.postRender(()=>e(t,n))};class Pc extends Be{constructor(){super(...arguments),this.removePointerDownListener=we}onPointerDown(t){this.session=new Bi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:qi(t),onStart:qi(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&ee.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=st(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 Jt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Gi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(N.test(e))e=parseFloat(e);else return e;const n=Gi(e,t.target.x),r=Gi(e,t.target.y);return`${n}% ${r}%`}},Cc={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Fe.parse(e);if(s.length>5)return r;const i=Fe.createTransformer(e),o=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,a=n.y.scale*t.y;s[0+o]/=l,s[1+o]/=a;const c=re(l,a,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}};class Ec extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;Da(jc),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Jt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ee.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),hn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Hi(e){const[t,n]=Fr(),r=x.useContext(rn);return p.exports.jsx(Ec,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(Jr),isPresent:t,safeToRemove:n})}const jc={borderRadius:{...Rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rt,borderTopRightRadius:Rt,borderBottomLeftRadius:Rt,borderBottomRightRadius:Rt,boxShadow:Cc};function Ac(e,t,n){const r=pe(e)?e:bt(e);return r.start(er("",r,t,n)),r.animation}function Mc(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Dc=(e,t)=>e.depth-t.depth;class Rc{constructor(){this.children=[],this.isDirty=!1}add(t){Vn(this.children,t),this.isDirty=!0}remove(t){On(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dc),this.isDirty=!1,this.children.forEach(t)}}function Vc(e,t){const n=De.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ie(r),e(i-t))};return ee.read(r,!0),()=>Ie(r)}const Xi=["TopLeft","TopRight","BottomLeft","BottomRight"],Oc=Xi.length,Zi=e=>typeof e=="string"?parseFloat(e):e,Ji=e=>typeof e=="number"||N.test(e);function Lc(e,t,n,r,s,i){s?(e.opacity=re(0,n.opacity!==void 0?n.opacity:1,kc(r)),e.opacityExit=re(t.opacity!==void 0?t.opacity:1,0,_c(r))):i&&(e.opacity=re(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<Oc;o++){const l=`border${Xi[o]}Radius`;let a=Qi(t,l),c=Qi(n,l);if(a===void 0&&c===void 0)continue;a||(a=0),c||(c=0),a===0||c===0||Ji(a)===Ji(c)?(e[l]=Math.max(re(Zi(a),Zi(c),r),0),(Me.test(c)||Me.test(a))&&(e[l]+="%")):e[l]=c}(t.rotate||n.rotate)&&(e.rotate=re(t.rotate||0,n.rotate||0,r))}function Qi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const kc=eo(0,.5,Is),_c=eo(.5,.95,we);function eo(e,t,n){return r=>r<e?0:r>t?1:n(Ze(e,t,r))}function to(e,t){e.min=t.min,e.max=t.max}function Pe(e,t){to(e.x,t.x),to(e.y,t.y)}function no(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ro(e,t,n,r,s){return e-=t,e=Xt(e,1/n,r),s!==void 0&&(e=Xt(e,1/s,r)),e}function Ic(e,t=0,n=1,r=.5,s,i=e,o=e){if(Me.test(t)&&(t=parseFloat(t),t=re(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=re(i.min,i.max,r);e===i&&(l-=t),e.min=ro(e.min,t,n,l,s),e.max=ro(e.max,t,n,l,s)}function so(e,t,[n,r,s],i,o){Ic(e,t[n],t[r],t[s],t.scale,i,o)}const Nc=["x","scaleX","originX"],Fc=["y","scaleY","originY"];function io(e,t,n,r){so(e.x,t,Nc,n?n.x:void 0,r?r.x:void 0),so(e.y,t,Fc,n?n.y:void 0,r?r.y:void 0)}function oo(e){return e.translate===0&&e.scale===1}function ao(e){return oo(e.x)&&oo(e.y)}function lo(e,t){return e.min===t.min&&e.max===t.max}function Bc(e,t){return lo(e.x,t.x)&&lo(e.y,t.y)}function uo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function co(e,t){return uo(e.x,t.x)&&uo(e.y,t.y)}function fo(e){return ye(e.x)/ye(e.y)}function ho(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $c{constructor(){this.members=[]}add(t){Vn(this.members,t),t.scheduleRender()}remove(t){if(On(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Uc(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:h,skewX:m,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),m&&(r+=`skewX(${m}deg) `),v&&(r+=`skewY(${v}deg) `)}const l=e.x.scale*t.x,a=e.y.scale*t.y;return(l!==1||a!==1)&&(r+=`scale(${l}, ${a})`),r||"none"}const qe={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},lr=["","X","Y","Z"],Wc={visibility:"hidden"},po=1e3;let zc=0;function ur(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function mo(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ds(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ee,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&mo(r)}function go({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=zc++,this.animationId=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,_e.value&&(qe.nodes=qe.calculatedTargetDeltas=qe.calculatedProjections=0),this.nodes.forEach(qc),this.nodes.forEach(Jc),this.nodes.forEach(Qc),this.nodes.forEach(Gc),_e.addProjectionMetrics&&_e.addProjectionMetrics(qe)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new Rc)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ln),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const a=this.eventHandlers.get(o);a&&a.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Mc(o),this.instance=o;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(c||a)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Vc(h,250),Jt.hasAnimatedSinceResize&&(Jt.hasAnimatedSinceResize=!1,this.nodes.forEach(vo))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||sf,{onLayoutAnimationStart:S,onLayoutAnimationComplete:b}=u.getProps(),P=!this.targetLayout||!co(this.targetLayout,v),C=!h&&m;if(this.options.layoutRoot||this.resumeFrom||C||h&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,C);const O={...Cn(y,"layout"),onPlay:S,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else h||vo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ie(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(ef),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&mo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:a}=this.options;if(l===void 0&&!a)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(yo);return}this.isUpdating||this.nodes.forEach(Xc),this.isUpdating=!1,this.nodes.forEach(Zc),this.nodes.forEach(Yc),this.nodes.forEach(Kc),this.clearAllSnapshots();const l=De.now();he.delta=Oe(0,1e3/60,l-he.timestamp),he.timestamp=l,he.isProcessing=!0,un.update.process(he),un.preRender.process(he),un.render.process(he),he.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hc),this.sharedNodes.forEach(tf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ee.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ee.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ye(this.snapshot.measuredBox.x)&&!ye(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 a=0;a<this.path.length;a++)this.path[a].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=oe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const a=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:a,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:a}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!ao(this.projectionDelta),a=this.getTransformTemplate(),c=a?a(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(l||Ke(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let a=this.removeElementScroll(l);return o&&(a=this.removeTransform(a)),of(a),{animationId:this.root.animationId,measuredBox:l,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return oe();const a=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(af))){const{scroll:u}=this.root;u&&(ot(a.x,u.offset.x),ot(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=oe();if(Pe(a,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:f,options:h}=u;u!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&Pe(a,o),ot(a.x,f.offset.x),ot(a.y,f.offset.y))}return a}applyTransform(o,l=!1){const a=oe();Pe(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!l&&u.options.layoutScroll&&u.scroll&&u!==u.root&&at(a,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ke(u.latestValues)&&at(a,u.latestValues)}return Ke(this.latestValues)&&at(a,this.latestValues),a}removeTransform(o){const l=oe();Pe(l,o);for(let a=0;a<this.path.length;a++){const c=this.path[a];if(!c.instance||!Ke(c.latestValues))continue;rr(c.latestValues)&&c.updateSnapshot();const u=oe(),f=c.measurePageBox();Pe(u,f),io(l,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ke(this.latestValues)&&io(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==he.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=Boolean(this.resumingFrom)||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=he.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=oe(),this.relativeTargetOrigin=oe(),Dt(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),Pe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=oe(),this.targetWithTransforms=oe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lc(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Pe(this.target,this.layout.layoutBox),Li(this.target,this.targetDelta)):Pe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&Boolean(m.resumingFrom)===Boolean(this.resumingFrom)&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=oe(),this.relativeTargetOrigin=oe(),Dt(this.relativeTargetOrigin,this.target,m.target),Pe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}_e.value&&qe.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||rr(this.parent.latestValues)||Ri(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const l=this.getLead(),a=Boolean(this.resumingFrom)||this!==l;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===he.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;Pe(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;uc(this.layoutCorrected,this.treeScale,this.path,a),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=oe());const{target:v}=l;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(no(this.prevProjectionDelta.x,this.projectionDelta.x),no(this.prevProjectionDelta.y,this.projectionDelta.y)),Mt(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!ho(this.projectionDelta.x,this.prevProjectionDelta.x)||!ho(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v)),_e.value&&qe.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=it(),this.projectionDelta=it(),this.projectionDeltaWithTransform=it()}setAnimationOrigin(o,l=!1){const a=this.snapshot,c=a?a.latestValues:{},u={...this.latestValues},f=it();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=oe(),m=a?a.source:void 0,v=this.layout?this.layout.source:void 0,y=m!==v,S=this.getStack(),b=!S||S.members.length<=1,P=Boolean(y&&!b&&this.options.crossfade===!0&&!this.path.some(rf));this.animationProgress=0;let C;this.mixTargetDelta=O=>{const g=O/1e3;xo(f.x,o.x,g),xo(f.y,o.y,g),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nf(this.relativeTarget,this.relativeTargetOrigin,h,g),C&&Bc(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=oe()),Pe(C,this.relativeTarget)),y&&(this.animationValues=u,Lc(u,c,this.latestValues,g,P,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=g},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ie(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ee.update(()=>{Jt.hasAnimatedSinceResize=!0,Pt.layout++,this.currentAnimation=Ac(0,po,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onStop:()=>{Pt.layout--},onComplete:()=>{Pt.layout--,o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(po),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:a,layout:c,latestValues:u}=o;if(!(!l||!a||!c)){if(this!==o&&this.layout&&c&&Po(this.options.animationType,this.layout.layoutBox,c.layoutBox)){a=this.target||oe();const f=ye(this.layout.layoutBox.x);a.x.min=o.target.x.min,a.x.max=a.x.min+f;const h=ye(this.layout.layoutBox.y);a.y.min=o.target.y.min,a.y.max=a.y.min+h}Pe(l,a),at(l,u),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $c),this.sharedNodes.get(o).add(l);const c=l.options.initialPromotionConfig;l.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:a}={}){const c=this.getStack();c&&c.promote(this,a),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:a}=o;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(l=!0),!l)return;const c={};a.z&&ur("z",o,c,this.animationValues);for(let u=0;u<lr.length;u++)ur(`rotate${lr[u]}`,o,c,this.animationValues),ur(`skew${lr[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}getProjectionStyles(o){var l,a;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Wc;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Wt(o==null?void 0:o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Wt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Ke(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=Uc(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:m,y:v}=this.projectionDelta;c.transformOrigin=`${m.origin*100}% ${v.origin*100}% 0`,f.animationValues?c.opacity=f===this?(a=(l=h.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&a!==void 0?a:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in pt){if(h[y]===void 0)continue;const{correct:S,applyTo:b,isCSSVariable:P}=pt[y],C=c.transform==="none"?h[y]:S(h[y],f);if(b){const O=b.length;for(let g=0;g<O;g++)c[b[g]]=C}else P?this.options.visualElement.renderState.vars[y]=C:c[y]=C}return this.options.layoutId&&(c.pointerEvents=f===this?Wt(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(yo),this.root.sharedNodes.clear()}}}function Yc(e){e.updateLayout()}function Kc(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?Se(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],m=ye(h);h.min=r[f].min,h.max=h.min+m}):Po(i,n.layoutBox,r)&&Se(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],m=ye(r[f]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const l=it();Mt(l,r,n.layoutBox);const a=it();o?Mt(a,e.applyTransform(s,!0),n.measuredBox):Mt(a,r,n.layoutBox);const c=!ao(l);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const v=oe();Dt(v,n.layoutBox,h.layoutBox);const y=oe();Dt(y,r,m.layoutBox),co(v,y)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:l,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function qc(e){_e.value&&qe.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Gc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hc(e){e.clearSnapshot()}function yo(e){e.clearMeasurements()}function Xc(e){e.isLayoutDirty=!1}function Zc(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function vo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jc(e){e.resolveTargetDelta()}function Qc(e){e.calcProjection()}function ef(e){e.resetSkewAndRotation()}function tf(e){e.removeLeadSnapshot()}function xo(e,t,n){e.translate=re(t.translate,0,n),e.scale=re(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function bo(e,t,n,r){e.min=re(t.min,n.min,r),e.max=re(t.max,n.max,r)}function nf(e,t,n,r){bo(e.x,t.x,n.x,r),bo(e.y,t.y,n.y,r)}function rf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sf={duration:.45,ease:[.4,0,.1,1]},To=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),wo=To("applewebkit/")&&!To("chrome/")?Math.round:we;function So(e){e.min=wo(e.min),e.max=wo(e.max)}function of(e){So(e.x),So(e.y)}function Po(e,t,n){return e==="position"||e==="preserve-aspect"&&!ac(fo(t),fo(n),.2)}function af(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const lf=go({attachResizeListener:(e,t)=>jt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cr={current:void 0},Co=go({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cr.current){const e=new lf({});e.mount(window),e.setOptions({layoutScroll:!0}),cr.current=e}return cr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),uf={pan:{Feature:Pc},drag:{Feature:Sc,ProjectionNode:Co,MeasureLayout:Hi}};function Eo(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ee.postRender(()=>i(t,At(t)))}class cf extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=al(t,(n,r)=>(Eo(this.node,r,"Start"),s=>Eo(this.node,s,"End"))))}unmount(){}}class ff extends Be{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=Ct(jt(this.node.current,"focus",()=>this.onFocus()),jt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function jo(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ee.postRender(()=>i(t,At(t)))}class df extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=fl(t,(n,r)=>(jo(this.node,r,"Start"),(s,{success:i})=>jo(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const fr=new WeakMap,dr=new WeakMap,hf=e=>{const t=fr.get(e.target);t&&t(e)},pf=e=>{e.forEach(hf)};function mf({root:e,...t}){const n=e||document;dr.has(n)||dr.set(n,{});const r=dr.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(pf,{root:e,...t})),r[s]}function gf(e,t,n){const r=mf(t);return fr.set(e,n),r.observe(e),()=>{fr.delete(e),r.unobserve(e)}}const yf={some:0,all:1};class vf extends Be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:yf[s]},l=a=>{const{isIntersecting:c}=a;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(a)};return gf(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(xf(t,n))&&this.startObserver()}unmount(){}}function xf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const bf={inView:{Feature:vf},tap:{Feature:df},focus:{Feature:ff},hover:{Feature:cf}},Tf={layout:{ProjectionNode:Co,MeasureLayout:Hi}},hr={current:null},Ao={current:!1};function wf(){if(Ao.current=!0,!!an)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>hr.current=e.matches;e.addListener(t),t()}else hr.current=!1}const Sf=[...ti,me,Fe],Pf=e=>Sf.find(ei(e)),Cf=new WeakMap;function Ef(e,t,n){for(const r in t){const s=t[r],i=n[r];if(pe(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&Nt(s.version==="12.4.7",`Attempting to mix Motion versions ${s.version} with 12.4.7 may not work as expected.`);else if(pe(i))e.addValue(r,bt(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,bt(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Mo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class jf{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kn,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 m=De.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ee.render(this.render,!1,!0))};const{latestValues:a,renderState:c,onUpdate:u}=o;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=$t(n),this.isVariantNode=Hr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const v=h[m];a[m]!==void 0&&pe(v)&&v.set(a[m],!1)}}mount(t){this.current=t,Cf.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)),Ao.current||wf(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:hr.current,process.env.NODE_ENV!=="production"&&Nt(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ie(this.notifyUpdate),Ie(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ue.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ee.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),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 Je){const n=Je[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):oe()}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<Mo.length;r++){const s=Mo[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Ef(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=bt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Js(s)||Fs(s))?s=parseFloat(s):!Pf(s)&&Fe.test(n)&&(s=Ks(t,n)),this.setBaseTarget(t,pe(s)?s.get():s)),pe(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=wn(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!pe(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ln),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Do extends jf{constructor(){super(...arguments),this.KeyframeResolver=ri}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;pe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Af(e){return window.getComputedStyle(e)}class Mf extends Do{constructor(){super(...arguments),this.type="html",this.renderInstance=fs}readValueFromInstance(t,n){if(Ue.has(n)){const r=Wn(n);return r&&r.default||0}else{const r=Af(t),s=(pn(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ni(t,n)}build(t,n,r){yn(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Pn(t,n,r)}}class Df extends Do{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=oe,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&cs(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ue.has(n)){const r=Wn(n);return r&&r.default||0}return n=ds.has(n)?n:dn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ps(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&ee.postRender(this.updateDimensions)}build(t,n,r){bn(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){hs(t,n,r,s)}mount(t){this.isSVGTag=Tn(t.tagName),super.mount(t)}}const Rf=(e,t)=>xn(e)?new Df(t):new Mf(t,{allowProjection:e!==x.Fragment}),Vf=el({...Qu,...bf,...uf,...Tf},Rf),pr=ya(Vf),Of=({isOpen:e,onClose:t,onConfirm:n,header:r,question:s})=>e?p.exports.jsx("div",{id:"default-modal",tabIndex:-1,"aria-hidden":"true",className:"absolute z-10 w-full md:inset-0 h-full max-h-full overflow-y-auto overflow-x-hidden flex justify-center items-center bg-[rgb(0,0,0,0.6)]",children:p.exports.jsx("div",{className:"relative p-4 w-full max-w-2xl max-h-full",children:p.exports.jsxs("div",{className:"relative bg-white rounded-lg shadow-sm dark:bg-gray-700",children:[p.exports.jsxs("div",{className:"flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600 border-gray-200",children:[p.exports.jsxs("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:[r," "]}),p.exports.jsxs("button",{type:"button",className:"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 inline-flex justify-center items-center",onClick:t,children:[p.exports.jsx("svg",{className:"w-3 h-3","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14",children:p.exports.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})}),p.exports.jsx("span",{className:"sr-only",children:"Close modal"})]})]}),p.exports.jsx("div",{className:"p-4 md:p-5 space-y-4",children:p.exports.jsxs("p",{className:"text-base leading-relaxed text-gray-500 dark:text-gray-400",children:[s," "]})}),p.exports.jsxs("div",{className:"flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b dark:border-gray-600",children:[p.exports.jsx("button",{onClick:()=>{n(),t()},type:"button",className:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",children:"Yes "}),p.exports.jsx("button",{onClick:t,type:"button",className:"py-2.5 px-5 ml-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700",children:"Cancel"})]})]})})}):null,Lf=({items:e,isVisible:t,position:n,messageId:r,isCurrentUserMessage:s})=>{const i=x.useRef(null),[o,l]=x.useState(!1);return x.useEffect(()=>(i.current||(i.current=document.createElement("div"),i.current.style.zIndex="1500",i.current.style.position="fixed",i.current.style.top="0",i.current.style.left="0",i.current.style.width="100%",i.current.style.height="100%",i.current.style.pointerEvents="none",document.body.appendChild(i.current)),l(!0),()=>{i.current&&!t&&(document.body.removeChild(i.current),i.current=null)}),[t]),!i.current||!o?null:$e.createPortal(p.exports.jsx(Ur,{children:t&&p.exports.jsx(pr.div,{initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-10},transition:{duration:.2,ease:"easeOut"},className:"absolute z-50 bg-white shadow-lg rounded-md p-2 px-1 w-42 pointer-events-auto",style:{top:n.y,left:n.x},children:e.map((a,c)=>a!=null&&a.onlyCurrentUserMessage&&!s?null:p.exports.jsxs("button",{disabled:a==null?void 0:a.disabled,className:"cursor-pointer flex items-center gap-2 w-full rounded-md text-left px-2 py-1 disabled:opacity-20 hover:bg-gray-200",onClick:()=>a.onClick(r),children:[x.cloneElement(a.icon,{className:"text-black",size:18}),p.exports.jsx("span",{className:"ml-2 text-black",children:a.name})]},c))})}),i.current)},kf=e=>{const t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`},_f=()=>p.exports.jsx("svg",{width:"21",height:"22",viewBox:"0 0 21 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.exports.jsx("path",{d:"M9.77169 2.74358C12.1132 0.399998 15.9121 0.399998 18.2553 2.74314C20.5384 5.02621 20.5969 8.69142 18.4309 11.0454L18.2428 11.2427L9.44273 20.0409L9.40616 20.0712C7.94492 21.3879 5.69092 21.3432 4.28355 19.9358C2.96453 18.6168 2.84241 16.5541 3.9172 15.0974C3.94054 15.0521 3.96879 15.0083 4.002 14.9672L4.05556 14.9075L4.14247 14.8198L4.28355 14.6719L4.28647 14.6748L11.7222 7.22047C11.9881 6.95385 12.4047 6.92909 12.6986 7.14656L12.7829 7.21906C13.0495 7.48497 13.0742 7.9016 12.8568 8.19551L12.7843 8.27972L5.18966 15.8928C4.47202 16.7684 4.5219 18.0627 5.3393 18.8801C6.16836 19.7091 7.48801 19.7486 8.3638 18.9985L17.1965 10.1681C18.952 8.41041 18.952 5.56116 17.1946 3.8038C15.4922 2.10136 12.765 2.04816 10.9986 3.6442L10.8307 3.8038L10.8181 3.81812L1.28179 13.3544C0.988902 13.6473 0.514028 13.6473 0.221135 13.3544C-0.0451319 13.0882 -0.0693378 12.6715 0.148517 12.3779L0.221135 12.2938L9.77001 2.74314L9.77169 2.74358Z",fill:"#8A8A8A"})}),If=()=>p.exports.jsx("svg",{width:"14",height:"20",viewBox:"0 0 14 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.exports.jsx("path",{d:"M13.25 9C13.6297 9 13.9435 9.28215 13.9932 9.64823L14 9.75V10.25C14 13.8094 11.245 16.7254 7.75098 16.9817L7.75 19.25C7.75 19.6642 7.41421 20 7 20C6.6203 20 6.30651 19.7178 6.25685 19.3518L6.25 19.25L6.25002 16.9818C2.83323 16.7316 0.122835 13.938 0.00406027 10.4863L0 10.25V9.75C0 9.33579 0.335786 9 0.75 9C1.1297 9 1.44349 9.28215 1.49315 9.64823L1.5 9.75V10.25C1.5 13.077 3.73445 15.3821 6.5336 15.4956L6.75 15.5H7.25C10.077 15.5 12.3821 13.2656 12.4956 10.4664L12.5 10.25V9.75C12.5 9.33579 12.8358 9 13.25 9ZM7 0C9.20914 0 11 1.79086 11 4V10C11 12.2091 9.20914 14 7 14C4.79086 14 3 12.2091 3 10V4C3 1.79086 4.79086 0 7 0ZM7 1.5C5.61929 1.5 4.5 2.61929 4.5 4V10C4.5 11.3807 5.61929 12.5 7 12.5C8.38071 12.5 9.5 11.3807 9.5 10V4C9.5 2.61929 8.38071 1.5 7 1.5Z",fill:"#fff"})}),mr=()=>p.exports.jsx("svg",{width:"17",height:"17",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.exports.jsx("path",{d:"M10.8147 10.1974L3.28344 11.4526C3.10705 11.482 2.95979 11.6034 2.89723 11.7709L0.299335 18.7283C0.0506615 19.3678 0.720085 19.9778 1.33375 19.671L19.3337 10.671C19.8865 10.3946 19.8865 9.60573 19.3337 9.32933L1.33375 0.329334C0.720085 0.0225017 0.0506615 0.632543 0.299335 1.27199L2.89723 8.22938C2.95979 8.39691 3.10705 8.51827 3.28344 8.54767L10.8147 9.80287C10.9236 9.82103 10.9972 9.92408 10.9791 10.033C10.965 10.1173 10.899 10.1834 10.8147 10.1974Z",fill:"#fff"})}),Qt=e=>p.exports.jsx("svg",{width:"17px",height:"22px",viewBox:"0 0 9 20",...e,children:p.exports.jsxs("g",{fill:"none",children:[p.exports.jsx("path",{className:"background",fill:"#ffffff",d:"M8,1 L9,1 L9,20 L8,20 L8,18 C7.807,15.161 7.124,12.233 5.950,9.218 C5.046,6.893 3.504,4.733 1.325,2.738 L1.325,2.738 C0.917,2.365 0.89,1.732 1.263,1.325 C1.452,1.118 1.72,1 2,1 L8,1 Z"}),p.exports.jsx("path",{className:" fill-gray-200",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0 L9,0 L9,20 L7,20 L7,20 L7.002,18.068 C6.816,15.333 6.156,12.504 5.018,9.58 C4.172,7.406 2.72,5.371 0.649,3.475 C-0.165,2.729 -0.221,1.464 0.525,0.649 C0.904,0.236 1.439,0 2,0 Z"}),p.exports.jsx("path",{className:"border_2x",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0.5 L9,0.5 L9,20 L7.5,20 L7.5,20 L7.501,18.034 C7.312,15.247 6.64,12.369 5.484,9.399 C4.609,7.15 3.112,5.052 0.987,3.106 C0.376,2.547 0.334,1.598 0.894,0.987 C1.178,0.677 1.579,0.5 2,0.5 Z"}),p.exports.jsx("path",{className:"border_3x",d:"M9,1 L2,1 C1.72,1 1.452,1.118 1.263,1.325 C0.89,1.732 0.917,2.365 1.325,2.738 C3.504,4.733 5.046,6.893 5.95,9.218 C7.124,12.233 7.807,15.161 8,18 L8,20 L9,20 L9,1 Z M2,0.667 L9,0.667 L9,20 L7.667,20 L7.667,20 L7.668,18.023 C7.477,15.218 6.802,12.324 5.64,9.338 C4.755,7.064 3.243,4.946 1.1,2.983 C0.557,2.486 0.52,1.643 1.017,1.1 C1.269,0.824 1.626,0.667 2,0.667 Z"})]})}),Nf=({onSendMessage:e,onEditMessage:t,onSendVoice:n,onImageSend:r,onVideoSend:s,onFileSend:i,dynamicSymbolAssignments:o,messageToEdit:l,setMessageToEdit:a})=>{const[c,u]=x.useState(""),[f,h]=x.useState(!1),[m,v]=x.useState(0),[y,S]=x.useState(null),[b,P]=x.useState(null),[C,O]=x.useState(0),g=x.useRef(null),L=x.useRef([]),Y=x.useRef(null),E=x.useRef(null),F=x.useRef(null),[G,ne]=x.useState(!1),ve=D=>{const j=D.target.value;console.log("Input",j),l?a(k=>k?new He({...k,text:j,isEdited:!0}):void 0):u(j);const R=j.match(/(\S+)$/);U(R)},U=D=>{if(D){const j=D[0];if(y){const R=D[0].split(y)[1];P(R)}o!=null&&o.some(R=>R.symbol===j)&&S(j)}else S(null)},te=(D,j)=>{l?a(R=>R?new He({...R,text:R.text+j+" "}):void 0):u(R=>R+j+" "),S(null),E.current.focus()},ce=()=>{if(l){if(l.text.trim()==="")return;t(l),a(void 0)}else{if(c.trim()==="")return;e(c),u("")}S(null)},fe=async()=>{h(!0),v(0),L.current=[],Y.current=setInterval(()=>{v(R=>R+1)},1e3);const D=await navigator.mediaDevices.getUserMedia({audio:!0}),j=new MediaRecorder(D);g.current=j,j.ondataavailable=R=>{R.data.size>0&&L.current.push(R.data)},j.onstop=()=>{clearInterval(Y.current);const R=new Blob(L.current,{type:"audio/mp3"});n(R),h(!1)},j.start()},H=()=>{var D;(D=g.current)==null||D.stop()},ie=D=>{const{scrollTop:j,scrollHeight:R,clientHeight:k}=D.currentTarget;if(j>C){if(j+k>=R-1){const I=o==null?void 0:o.find(z=>z.symbol===y);I&&(I!=null&&I.updatePageNumber)&&(ne(!0),I==null||I.updatePageNumber(I.pagNumber+1),O(j),setTimeout(()=>{ne(!1)},500))}}else O(j)},xe=new Set(["jpeg","png","gif","webp","bmp","svg+xml","tiff","x-icon"]),w=new Set(["mp4","webm","ogg","mpeg","quicktime","x-msvideo","x-ms-wmv","3gpp","3gpp2"]),V=()=>{var D;(D=F.current)==null||D.click()},W=D=>{var k,_;const j=(k=D.target.files)==null?void 0:k[0];if(!j)return;let R="";if(j.type){const I=j.type.split("/");I.length===2&&(R=I[1])}R||(R=((_=j.name.split(".").pop())==null?void 0:_.toLowerCase())||""),xe.has(R)?r(j):w.has(R)?s(j):i(j)};return p.exports.jsxs("div",{className:"absolute bottom-0 w-full flex items-center p-2 pr-4 z-10",children:[f?p.exports.jsxs("div",{className:"w-full flex justify-between items-center bg-white p-2 pl-4 h-11 rounded-3xl ",children:[p.exports.jsx("span",{className:"text-blue-400 font-bold flex-1",children:kf(m)}),p.exports.jsx("button",{className:"cursor-pointer p-2 flex justify-center items-center bg-green-500 text-white rounded-full",onClick:H,children:p.exports.jsx(mr,{})})]}):l?p.exports.jsxs(p.exports.Fragment,{children:[p.exports.jsxs("div",{className:"w-[90%] relative ",children:[p.exports.jsxs("div",{className:"flex justify-between items-center px-2 h-12 bottom-10 absolute w-full border-t border-x border-gray-300 bg-white rounded-t-lg ",children:[p.exports.jsx("span",{className:"text-gray-400 whitespace-nowrap truncate",children:l.text}),p.exports.jsx("button",{className:"text-gray-500 hover:text-gray-700 -mt-4",onClick:()=>a(void 0),children:"✕"})]}),p.exports.jsx("input",{type:"text",ref:E,className:"w-full bg-white flex-1 p-2 pl-4 border border-gray-300 outline-none rounded-bl-3xl ",placeholder:"Type a message...",value:l.text,onChange:ve,onKeyDown:D=>{D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),ce())}}),p.exports.jsx(Qt,{className:"rotate-180 absolute -right-[11.4px] top-5"})]}),p.exports.jsx("button",{className:"flex items-center justify-center cursor-pointer w-9 h-9 ml-2 p-2 bg-blue-500 text-white rounded-full hover:bg-blue-600 transition",onClick:ce,children:p.exports.jsx(mr,{})})]}):p.exports.jsxs(p.exports.Fragment,{children:[p.exports.jsxs("div",{className:"w-[90%] relative ",children:[p.exports.jsx("div",{onClick:V,className:"cursor-pointer absolute right-4 top-[11px]",children:p.exports.jsx(_f,{})}),p.exports.jsx("input",{type:"file",ref:F,style:{display:"none"},onChange:W}),p.exports.jsx("input",{type:"text",ref:E,className:"w-full bg-white flex-1 p-2 pl-4 border border-gray-300 outline-none rounded-tl-3xl rounded-tr-2xl rounded-bl-3xl ",placeholder:"Type a message...",value:c,onChange:ve,onKeyDown:D=>{D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),ce())}}),p.exports.jsx(Qt,{className:"rotate-180 absolute -right-[11.4px] top-5"})]}),p.exports.jsx("button",{className:"flex items-center justify-center cursor-pointer w-9 h-9 ml-2 p-2 bg-blue-500 text-white rounded-full hover:bg-blue-600 transition",onClick:c?ce:fe,children:c?p.exports.jsx(mr,{}):p.exports.jsx(If,{})})]}),y&&p.exports.jsxs("div",{className:"absolute bottom-full left-0 w-full bg-white shadow-xl rounded-lg border border-gray-200 p-4 z-50 max-h-60 overflow-y-auto",onScroll:ie,children:[p.exports.jsxs("div",{className:"flex justify-between items-center border-b pb-2 mb-2",children:[p.exports.jsxs("h3",{className:"text-lg font-semibold text-gray-800",children:["Select an item for"," ",p.exports.jsx("span",{className:"text-blue-500",children:y})]}),p.exports.jsx("button",{className:"text-gray-500 hover:text-gray-700",onClick:()=>S(null),children:"✕"})]}),p.exports.jsxs("div",{className:"space-y-2",children:[o?o.filter(D=>D.symbol===y).map(D=>{var k;const{component:j,lists:R}=D;return j?b?(k=R==null?void 0:R.filter(_=>_==null?void 0:_.name.includes(b)))==null?void 0:k.map((_,I)=>p.exports.jsx("div",{className:"hover:bg-gray-100 rounded-md p-2 cursor-pointer",children:p.exports.jsx(j,{listsProps:_,onClick:(z,$)=>te(z,$)})},I)):R==null?void 0:R.map((_,I)=>p.exports.jsx("div",{className:"hover:bg-gray-100 rounded-md p-2 cursor-pointer",children:p.exports.jsx(j,{listsProps:_,onClick:(z,$)=>te(z,$)})},I)):null}):null,p.exports.jsx("div",{className:"h-8",children:G&&"Loading more items..."})]})]})]})};var Re=(e=>(e[e.File=0]="File",e[e.Voice=1]="Voice",e[e.Video=2]="Video",e[e.Image=3]="Image",e))(Re||{});const Ro=({fileName:e,fileSize:t,format:n,src:r})=>{const s=()=>{const o={rar:p.exports.jsx("p",{className:"p-2 text-green-500 font-bold",children:n}),zip:p.exports.jsx("p",{className:"p-2 text-blue-500 font-bold",children:n}),pdf:p.exports.jsx("p",{className:"p-2 text-red-500 font-bold",children:n}),doc:p.exports.jsx("p",{className:"p-2 text-blue-400 font-bold",children:n}),vid:p.exports.jsx("p",{className:"p-2 text-orange-400 font-bold",children:n}),txt:p.exports.jsx("p",{className:"p-2 text-purple-500 font-bold",children:n}),xls:p.exports.jsx("p",{className:"p-2 text-green-400 font-bold",children:n}),ppt:p.exports.jsx("p",{className:"p-2 text-yellow-500 font-bold",children:n}),png:p.exports.jsx("p",{className:"p-2 text-pink-500 font-bold",children:n}),jpg:p.exports.jsx("p",{className:"p-2 text-indigo-500 font-bold",children:n}),mp3:p.exports.jsx("p",{className:"p-2 text-teal-500 font-bold",children:n}),mp4:p.exports.jsx("p",{className:"p-2 text-gray-500 font-bold",children:n}),exe:p.exports.jsx("p",{className:"p-2 text-red-400 font-bold",children:n}),html:p.exports.jsx("p",{className:"p-2 text-orange-500 font-bold",children:n}),css:p.exports.jsx("p",{className:"p-2 text-blue-300 font-bold",children:n}),js:p.exports.jsx("p",{className:"p-2 text-yellow-400 font-bold",children:n}),json:p.exports.jsx("p",{className:"p-2 text-purple-400 font-bold",children:n}),xml:p.exports.jsx("p",{className:"p-2 text-green-300 font-bold",children:n}),svg:p.exports.jsx("p",{className:"p-2 text-pink-400 font-bold",children:n}),gif:p.exports.jsx("p",{className:"p-2 text-indigo-400 font-bold",children:n}),csv:p.exports.jsx("p",{className:"p-2 text-teal-400 font-bold",children:n}),sql:p.exports.jsx("p",{className:"p-2 text-gray-400 font-bold",children:n})};return n&&o[n]?o[n]:p.exports.jsx("p",{className:"p-2 text-black ",children:n??"UN"})},i=o=>o>1048576?(o/1048576).toFixed(1)+" MB":(o/1024).toFixed(1)+" KB";return p.exports.jsxs("div",{className:"flex items-center rounded-lg",children:[p.exports.jsx("div",{className:"w-14 h-14 mr-3 flex items-center justify-center relative border border-green-900 rounded-md p-3",children:s()}),p.exports.jsxs("div",{className:"flex flex-col flex-grow",children:[p.exports.jsx("a",{href:r,download:e,className:"text-gray-900 font-medium hover:underline",children:e}),p.exports.jsx("span",{className:"text-gray-600 text-sm",children:i(t)})]}),p.exports.jsx("a",{href:r,download:e,className:"ml-2 bg-green-500 text-white px-2 py-1 text-sm rounded hover:bg-green-600",children:"Download"})]})},Ff=e=>p.exports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-play",...e,children:p.exports.jsx("polygon",{points:"6 3 20 12 6 21 6 3"})}),Bf=e=>p.exports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-pause",...e,children:[p.exports.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"}),p.exports.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"})]});let Vt=null;const $f=({src:e,className:t})=>{const[n,r]=x.useState(!1),[s,i]=x.useState(0),o=x.useRef(null);x.useEffect(()=>{const a=o.current;if(!a)return;const c=()=>{i(a.currentTime/a.duration*100)},u=()=>r(!0),f=()=>r(!1),h=()=>{r(!1),i(0)};return a.addEventListener("timeupdate",c),a.addEventListener("play",u),a.addEventListener("pause",f),a.addEventListener("ended",h),()=>{a.removeEventListener("timeupdate",c),a.removeEventListener("play",u),a.removeEventListener("pause",f),a.removeEventListener("ended",h)}},[]);const l=()=>{const a=o.current;a&&(n?a.pause():(Vt&&Vt!==a&&(Vt.pause(),Vt.currentTime=0),a.play(),Vt=a))};return p.exports.jsxs("div",{className:`flex items-center gap-2 py-2 pl-1 text-white rounded-xl w-full max-w-sm ${t}`,children:[p.exports.jsx("button",{className:"w-9 h-9 cursor-pointer flex items-center justify-center pl-[1.5px] bg-gray-700 rounded-full hover:bg-gray-600",onClick:l,children:n?p.exports.jsx(Bf,{}):p.exports.jsx(Ff,{})}),p.exports.jsx("div",{className:"relative flex-1 h-2 bg-gray-700 rounded-full overflow-hidden",children:p.exports.jsx("div",{className:"h-full bg-blue-500 transition-all",style:{width:`${s}%`}})}),p.exports.jsx("audio",{ref:o,src:e})]})},Uf=({attachmentUrl:e,attachmentType:t,attachmentFormat:n})=>e?t===Re.Voice?p.exports.jsx("div",{className:"w-full",children:p.exports.jsx($f,{src:e})}):t===Re.Image?p.exports.jsx("div",{className:"w-full",children:p.exports.jsx("img",{src:e})}):t===Re.File?p.exports.jsx("div",{className:"w-full mt-1",children:p.exports.jsx(Ro,{fileName:"productivity",fileSize:23e3,format:n??"UN",src:e})}):t===Re.Video?p.exports.jsx("div",{className:"w-full mt-1",children:p.exports.jsx(Ro,{fileName:"productivity",fileSize:23e3,format:n??"UN",src:e})}):null:null,Wf=({message:e,showUserProfile:t,handleContextMenu:n,media:r})=>{var s,i,o,l,a;return p.exports.jsxs(p.exports.Fragment,{children:[t?p.exports.jsx("img",{src:e.user.profileImageUrl,className:"w-12 h-12 bg-gray-300 rounded-full"}):null,p.exports.jsxs(pr.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.3},onContextMenu:c=>n(c,e),className:`relative ${r?"w-3/4":"w-fit max-w-3/4"}flex flex-col gap-1 md:max-w-[400px] p-2 pt-5 rounded-lg bg-green-200`,children:[p.exports.jsx("span",{className:"absolute top-1 text-xs text-orange-700",children:(s=e.user)!=null&&s.fullName&&((o=(i=e.user)==null?void 0:i.fullName)==null?void 0:o.length)>16?(l=e.user)==null?void 0:l.firstName:(a=e.user)==null?void 0:a.fullName}),r||null,p.exports.jsx("span",{children:e.text}),p.exports.jsx("div",{className:"w-full flex gap- items-center justify-end",children:p.exports.jsx("span",{className:"text-[10px]",children:new Date(e.createdDate).toLocaleTimeString().split(":")[0]+":"+new Date(e.createdDate).toLocaleTimeString().split(":")[1]})}),p.exports.jsx(Qt,{className:"fill-blue-200 -rotate-180 scale-x-[-1] transition-discrete absolute -left-2 bottom-0 [&>g>path]:fill-green-200"})]})]})},zf=()=>p.exports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.exports.jsx("path",{d:"M11.6619 4.6478C11.8358 4.83691 11.8272 5.1347 11.6427 5.31294L4.36284 12.3463C4.14493 12.5568 3.80285 12.5503 3.59268 12.3317L1.13205 9.77168C0.954124 9.58658 0.956276 9.28866 1.13686 9.10628C1.31743 8.92389 1.60806 8.9261 1.78598 9.1112L3.99455 11.4089L11.013 4.62812C11.1975 4.44988 11.488 4.4587 11.6619 4.6478Z",fill:"gray"}),p.exports.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.8759 4.64963C15.0492 4.83921 15.0399 5.13698 14.8549 5.31471L7.51066 12.3726C7.32572 12.5503 7.03524 12.5407 6.86185 12.3511C6.68847 12.1616 6.69784 11.8638 6.88278 11.6861L14.227 4.62818C14.412 4.45045 14.7025 4.46005 14.8759 4.64963Z",fill:"gray"})]}),Vo=({size:e=24,color:t="text-current",className:n})=>p.exports.jsx("div",{className:` ${n} animate-spin inline-flex items-center justify-center`,children:p.exports.jsxs("svg",{width:e,height:e,viewBox:"0 0 36 36",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[p.exports.jsx("defs",{children:p.exports.jsxs("linearGradient",{x1:"0%",y1:"100%",x2:"100%",y2:"100%",id:"linearGradient-1",children:[p.exports.jsx("stop",{stopColor:"currentColor",stopOpacity:"0",offset:"0%"}),p.exports.jsx("stop",{stopColor:"currentColor",stopOpacity:"0.50",offset:"39.9430698%"}),p.exports.jsx("stop",{stopColor:"currentColor",offset:"100%"})]})}),p.exports.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[p.exports.jsx("rect",{fillOpacity:"0.01",fill:"none",x:"0",y:"0",width:"36",height:"36"}),p.exports.jsx("path",{d:"M34,18 C34,9.163444 26.836556,2 18,2 C11.6597233,2 6.18078805,5.68784135 3.59122325,11.0354951",stroke:"url(#linearGradient-1)",strokeWidth:"4",strokeLinecap:"round"})]})]})}),Yf=({handleContextMenu:e,media:t,message:n})=>p.exports.jsxs(pr.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.3},onContextMenu:r=>e(r,n),className:`relative self-end ${t?"w-3/4":"max-w-3/4"} flex flex-col justify-center md:max-w-[400px] p-2 rounded-lg bg-blue-200`,children:[t||null,p.exports.jsx("span",{children:n.text}),p.exports.jsxs("div",{className:"w-full flex gap-1 items-center justify-end",children:[p.exports.jsx("span",{className:"text-[10px]",children:new Date(n.createdDate).toLocaleTimeString().split(":")[0]+":"+new Date(n.createdDate).toLocaleTimeString().split(":")[1]}),n.isSending?p.exports.jsx(Vo,{size:13,color:"text-black"}):p.exports.jsx(zf,{}),n.isEdited?p.exports.jsx("span",{className:"text-xs text-gray-600 italic",children:"edited"}):""]}),p.exports.jsx(Qt,{className:"fill-blue-200 rotate-180 absolute -right-2 bottom-0 [&>g>path]:fill-blue-200"})]});var ue={exports:{}},gr={exports:{}},Z={};var Oo;function Kf(){if(Oo)return Z;Oo=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,a=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function C(g){if(typeof g=="object"&&g!==null){var L=g.$$typeof;switch(L){case t:switch(g=g.type,g){case a:case c:case r:case i:case s:case f:return g;default:switch(g=g&&g.$$typeof,g){case l:case u:case v:case m:case o:return g;default:return L}}case n:return L}}}function O(g){return C(g)===c}return Z.AsyncMode=a,Z.ConcurrentMode=c,Z.ContextConsumer=l,Z.ContextProvider=o,Z.Element=t,Z.ForwardRef=u,Z.Fragment=r,Z.Lazy=v,Z.Memo=m,Z.Portal=n,Z.Profiler=i,Z.StrictMode=s,Z.Suspense=f,Z.isAsyncMode=function(g){return O(g)||C(g)===a},Z.isConcurrentMode=O,Z.isContextConsumer=function(g){return C(g)===l},Z.isContextProvider=function(g){return C(g)===o},Z.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},Z.isForwardRef=function(g){return C(g)===u},Z.isFragment=function(g){return C(g)===r},Z.isLazy=function(g){return C(g)===v},Z.isMemo=function(g){return C(g)===m},Z.isPortal=function(g){return C(g)===n},Z.isProfiler=function(g){return C(g)===i},Z.isStrictMode=function(g){return C(g)===s},Z.isSuspense=function(g){return C(g)===f},Z.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===c||g===i||g===s||g===f||g===h||typeof g=="object"&&g!==null&&(g.$$typeof===v||g.$$typeof===m||g.$$typeof===o||g.$$typeof===l||g.$$typeof===u||g.$$typeof===S||g.$$typeof===b||g.$$typeof===P||g.$$typeof===y)},Z.typeOf=C,Z}var J={};var Lo;function qf(){return Lo||(Lo=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,a=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,P=e?Symbol.for("react.scope"):60119;function C(M){return typeof M=="string"||typeof M=="function"||M===r||M===c||M===i||M===s||M===f||M===h||typeof M=="object"&&M!==null&&(M.$$typeof===v||M.$$typeof===m||M.$$typeof===o||M.$$typeof===l||M.$$typeof===u||M.$$typeof===S||M.$$typeof===b||M.$$typeof===P||M.$$typeof===y)}function O(M){if(typeof M=="object"&&M!==null){var Ce=M.$$typeof;switch(Ce){case t:var lt=M.type;switch(lt){case a:case c:case r:case i:case s:case f:return lt;default:var Ge=lt&&lt.$$typeof;switch(Ge){case l:case u:case v:case m:case o:return Ge;default:return Ce}}case n:return Ce}}}var g=a,L=c,Y=l,E=o,F=t,G=u,ne=r,ve=v,U=m,te=n,ce=i,fe=s,H=f,ie=!1;function xe(M){return ie||(ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),w(M)||O(M)===a}function w(M){return O(M)===c}function V(M){return O(M)===l}function W(M){return O(M)===o}function D(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function j(M){return O(M)===u}function R(M){return O(M)===r}function k(M){return O(M)===v}function _(M){return O(M)===m}function I(M){return O(M)===n}function z(M){return O(M)===i}function $(M){return O(M)===s}function ge(M){return O(M)===f}J.AsyncMode=g,J.ConcurrentMode=L,J.ContextConsumer=Y,J.ContextProvider=E,J.Element=F,J.ForwardRef=G,J.Fragment=ne,J.Lazy=ve,J.Memo=U,J.Portal=te,J.Profiler=ce,J.StrictMode=fe,J.Suspense=H,J.isAsyncMode=xe,J.isConcurrentMode=w,J.isContextConsumer=V,J.isContextProvider=W,J.isElement=D,J.isForwardRef=j,J.isFragment=R,J.isLazy=k,J.isMemo=_,J.isPortal=I,J.isProfiler=z,J.isStrictMode=$,J.isSuspense=ge,J.isValidElementType=C,J.typeOf=O}()),J}var ko;function _o(){return ko||(ko=1,function(e){process.env.NODE_ENV==="production"?e.exports=Kf():e.exports=qf()}(gr)),gr.exports}var yr,Io;function Gf(){if(Io)return yr;Io=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function s(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},l=0;l<10;l++)o["_"+String.fromCharCode(l)]=l;var a=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(a.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return yr=s()?Object.assign:function(i,o){for(var l,a=r(i),c,u=1;u<arguments.length;u++){l=Object(arguments[u]);for(var f in l)t.call(l,f)&&(a[f]=l[f]);if(e){c=e(l);for(var h=0;h<c.length;h++)n.call(l,c[h])&&(a[c[h]]=l[c[h]])}}return a},yr}var vr,No;function xr(){if(No)return vr;No=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vr=e,vr}var br,Fo;function Bo(){return Fo||(Fo=1,br=Function.call.bind(Object.prototype.hasOwnProperty)),br}var Tr,$o;function Hf(){if($o)return Tr;$o=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=xr(),n={},r=Bo();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function s(i,o,l,a,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var h=Error((a||"React class")+": "+l+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[u](o,u,a,l,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((a||"React class")+": type specification of "+l+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var m=c?c():"";e("Failed "+l+" type: "+f.message+(m??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Tr=s,Tr}var wr,Uo;function Xf(){if(Uo)return wr;Uo=1;var e=_o(),t=Gf(),n=xr(),r=Bo(),s=Hf(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var a="Warning: "+l;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}});function o(){return null}return wr=function(l,a){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(w){var V=w&&(c&&w[c]||w[u]);if(typeof V=="function")return V}var h="<<anonymous>>",m={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:P(),arrayOf:C,element:O(),elementType:g(),instanceOf:L,node:G(),objectOf:E,oneOf:Y,oneOfType:F,shape:ve,exact:U};function v(w,V){return w===V?w!==0||1/w===1/V:w!==w&&V!==V}function y(w,V){this.message=w,this.data=V&&typeof V=="object"?V:{},this.stack=""}y.prototype=Error.prototype;function S(w){if(process.env.NODE_ENV!=="production")var V={},W=0;function D(R,k,_,I,z,$,ge){if(I=I||h,$=$||_,ge!==n){if(a){var M=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw M.name="Invariant Violation",M}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ce=I+":"+_;!V[Ce]&&W<3&&(i("You are manually calling a React.PropTypes validation function for the `"+$+"` prop on `"+I+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[Ce]=!0,W++)}}return k[_]==null?R?k[_]===null?new y("The "+z+" `"+$+"` is marked as required "+("in `"+I+"`, but its value is `null`.")):new y("The "+z+" `"+$+"` is marked as required in "+("`"+I+"`, but its value is `undefined`.")):null:w(k,_,I,z,$)}var j=D.bind(null,!1);return j.isRequired=D.bind(null,!0),j}function b(w){function V(W,D,j,R,k,_){var I=W[D],z=fe(I);if(z!==w){var $=H(I);return new y("Invalid "+R+" `"+k+"` of type "+("`"+$+"` supplied to `"+j+"`, expected ")+("`"+w+"`."),{expectedType:w})}return null}return S(V)}function P(){return S(o)}function C(w){function V(W,D,j,R,k){if(typeof w!="function")return new y("Property `"+k+"` of component `"+j+"` has invalid PropType notation inside arrayOf.");var _=W[D];if(!Array.isArray(_)){var I=fe(_);return new y("Invalid "+R+" `"+k+"` of type "+("`"+I+"` supplied to `"+j+"`, expected an array."))}for(var z=0;z<_.length;z++){var $=w(_,z,j,R,k+"["+z+"]",n);if($ instanceof Error)return $}return null}return S(V)}function O(){function w(V,W,D,j,R){var k=V[W];if(!l(k)){var _=fe(k);return new y("Invalid "+j+" `"+R+"` of type "+("`"+_+"` supplied to `"+D+"`, expected a single ReactElement."))}return null}return S(w)}function g(){function w(V,W,D,j,R){var k=V[W];if(!e.isValidElementType(k)){var _=fe(k);return new y("Invalid "+j+" `"+R+"` of type "+("`"+_+"` supplied to `"+D+"`, expected a single ReactElement type."))}return null}return S(w)}function L(w){function V(W,D,j,R,k){if(!(W[D]instanceof w)){var _=w.name||h,I=xe(W[D]);return new y("Invalid "+R+" `"+k+"` of type "+("`"+I+"` supplied to `"+j+"`, expected ")+("instance of `"+_+"`."))}return null}return S(V)}function Y(w){if(!Array.isArray(w))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function V(W,D,j,R,k){for(var _=W[D],I=0;I<w.length;I++)if(v(_,w[I]))return null;var z=JSON.stringify(w,function(ge,M){var Ce=H(M);return Ce==="symbol"?String(M):M});return new y("Invalid "+R+" `"+k+"` of value `"+String(_)+"` "+("supplied to `"+j+"`, expected one of "+z+"."))}return S(V)}function E(w){function V(W,D,j,R,k){if(typeof w!="function")return new y("Property `"+k+"` of component `"+j+"` has invalid PropType notation inside objectOf.");var _=W[D],I=fe(_);if(I!=="object")return new y("Invalid "+R+" `"+k+"` of type "+("`"+I+"` supplied to `"+j+"`, expected an object."));for(var z in _)if(r(_,z)){var $=w(_,z,j,R,k+"."+z,n);if($ instanceof Error)return $}return null}return S(V)}function F(w){if(!Array.isArray(w))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var V=0;V<w.length;V++){var W=w[V];if(typeof W!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ie(W)+" at index "+V+"."),o}function D(j,R,k,_,I){for(var z=[],$=0;$<w.length;$++){var ge=w[$],M=ge(j,R,k,_,I,n);if(M==null)return null;M.data&&r(M.data,"expectedType")&&z.push(M.data.expectedType)}var Ce=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new y("Invalid "+_+" `"+I+"` supplied to "+("`"+k+"`"+Ce+"."))}return S(D)}function G(){function w(V,W,D,j,R){return te(V[W])?null:new y("Invalid "+j+" `"+R+"` supplied to "+("`"+D+"`, expected a ReactNode."))}return S(w)}function ne(w,V,W,D,j){return new y((w||"React class")+": "+V+" type `"+W+"."+D+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+j+"`.")}function ve(w){function V(W,D,j,R,k){var _=W[D],I=fe(_);if(I!=="object")return new y("Invalid "+R+" `"+k+"` of type `"+I+"` "+("supplied to `"+j+"`, expected `object`."));for(var z in w){var $=w[z];if(typeof $!="function")return ne(j,R,k,z,H($));var ge=$(_,z,j,R,k+"."+z,n);if(ge)return ge}return null}return S(V)}function U(w){function V(W,D,j,R,k){var _=W[D],I=fe(_);if(I!=="object")return new y("Invalid "+R+" `"+k+"` of type `"+I+"` "+("supplied to `"+j+"`, expected `object`."));var z=t({},W[D],w);for(var $ in z){var ge=w[$];if(r(w,$)&&typeof ge!="function")return ne(j,R,k,$,H(ge));if(!ge)return new y("Invalid "+R+" `"+k+"` key `"+$+"` supplied to `"+j+"`.\nBad object: "+JSON.stringify(W[D],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var M=ge(_,$,j,R,k+"."+$,n);if(M)return M}return null}return S(V)}function te(w){switch(typeof w){case"number":case"string":case"undefined":return!0;case"boolean":return!w;case"object":if(Array.isArray(w))return w.every(te);if(w===null||l(w))return!0;var V=f(w);if(V){var W=V.call(w),D;if(V!==w.entries){for(;!(D=W.next()).done;)if(!te(D.value))return!1}else for(;!(D=W.next()).done;){var j=D.value;if(j&&!te(j[1]))return!1}}else return!1;return!0;default:return!1}}function ce(w,V){return w==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function fe(w){var V=typeof w;return Array.isArray(w)?"array":w instanceof RegExp?"object":ce(V,w)?"symbol":V}function H(w){if(typeof w>"u"||w===null)return""+w;var V=fe(w);if(V==="object"){if(w instanceof Date)return"date";if(w instanceof RegExp)return"regexp"}return V}function ie(w){var V=H(w);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function xe(w){return!w.constructor||!w.constructor.name?h:w.constructor.name}return m.checkPropTypes=s,m.resetWarningCache=s.resetWarningCache,m.PropTypes=m,m},wr}var Sr,Wo;function Zf(){if(Wo)return Sr;Wo=1;var e=xr();function t(){}function n(){}return n.resetWarningCache=t,Sr=function(){function r(o,l,a,c,u,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function s(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Sr}if(process.env.NODE_ENV!=="production"){var Jf=_o(),Qf=!0;ue.exports=Xf()(Jf.isElement,Qf)}else ue.exports=Zf()();function Pr(){return Pr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pr.apply(this,arguments)}function ed(e,t){if(e==null)return{};var n=td(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function td(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Cr=x.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,s=e.size,i=s===void 0?24:s,o=ed(e,["color","size"]);return x.createElement("svg",Pr({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o),x.createElement("polyline",{points:"20 6 9 17 4 12"}))});Cr.propTypes={color:ue.exports.string,size:ue.exports.oneOfType([ue.exports.string,ue.exports.number])},Cr.displayName="Check";const nd=Cr;function Er(){return Er=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Er.apply(this,arguments)}function rd(e,t){if(e==null)return{};var n=sd(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sd(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var jr=x.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,s=e.size,i=s===void 0?24:s,o=rd(e,["color","size"]);return x.createElement("svg",Er({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o),x.createElement("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),x.createElement("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"}))});jr.propTypes={color:ue.exports.string,size:ue.exports.oneOfType([ue.exports.string,ue.exports.number])},jr.displayName="Copy";const id=jr;function Ar(){return Ar=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ar.apply(this,arguments)}function od(e,t){if(e==null)return{};var n=ad(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ad(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Mr=x.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,s=e.size,i=s===void 0?24:s,o=od(e,["color","size"]);return x.createElement("svg",Ar({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o),x.createElement("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x.createElement("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"}))});Mr.propTypes={color:ue.exports.string,size:ue.exports.oneOfType([ue.exports.string,ue.exports.number])},Mr.displayName="Edit";const ld=Mr;function Dr(){return Dr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dr.apply(this,arguments)}function ud(e,t){if(e==null)return{};var n=cd(e,t),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cd(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var Rr=x.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,s=e.size,i=s===void 0?24:s,o=ud(e,["color","size"]);return x.createElement("svg",Dr({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o),x.createElement("polyline",{points:"3 6 5 6 21 6"}),x.createElement("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}))});Rr.propTypes={color:ue.exports.string,size:ue.exports.oneOfType([ue.exports.string,ue.exports.number])},Rr.displayName="Trash";const fd=Rr,dd=({user:e,messages:t,updateMessages:n,onMessageSent:r,onEditMessage:s,onDeleteMessage:i})=>{const o=x.useRef(null),[l,a]=x.useState(!1),[c,u]=x.useState(null),[f,h]=x.useState(),[m,v]=x.useState(null),y=()=>{setTimeout(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},100)};x.useEffect(()=>{const E=()=>{v(null)};return window.addEventListener("scroll",E,!0),()=>{window.removeEventListener("scroll",E,!0)}},[v]);const S=(E,F)=>{E.preventDefault();const G=window.scrollX,ne=window.scrollY;v({x:E.clientX+G,y:E.clientY+ne,message:F})},b=()=>{v(null)},P=E=>{const F=new He({id:new Date().toString(),text:E,user:e,isRightSided:!0,createdDate:new Date().toString()});n([...t,F]),r(F),y()},C=E=>{n(t.map(F=>F.id===E.id?E:F)),s(E)},O=E=>{const F=URL.createObjectURL(E),G=new He({id:new Date().toString(),text:"",attachmentUrl:F,attachmentType:Re.Voice,attachmentBlob:E,user:e,isRightSided:!0,createdDate:new Date().toString()});n([...t,G]),r(G),y()},g=(E,F)=>{const G=URL.createObjectURL(E),ne=new He({id:new Date().toString(),text:"",attachmentUrl:G,attachmentBlob:E,attachmentType:F,user:e,isRightSided:!0,createdDate:new Date().toString()});n([...t,ne]),r(ne),y()};return{handleDeleteConfirmation:()=>{c&&(i(c),u(null)),a(!1)},handleCloseContextMenu:b,contextMenuItems:[{name:"Edit",icon:p.exports.jsx(ld,{className:"text-gray-600"}),onlyCurrentUserMessage:!0,onClick:E=>{h(t.find(F=>F.id===E)),b()}},{name:"Delete",icon:p.exports.jsx(fd,{className:"text-red-600"}),onlyCurrentUserMessage:!0,onClick:E=>{u(E),a(!0),b()}},{name:"Select",icon:p.exports.jsx(nd,{className:"text-green-600"}),disabled:!0,onClick:()=>{console.log("Select clicked"),b()}},{name:"Copy",icon:p.exports.jsx(id,{className:"text-blue-600"}),onClick:E=>{const F=t.find(G=>G.id===E);F&&navigator.clipboard.writeText(F.text),b()}}],handleSendFile:g,handleSendVoice:O,handleSendMessage:P,handleContextMenu:S,isModalOpen:l,contextMenu:m,chatRef:o,setIsModalOpen:a,messageToEdit:f,setMessageToEdit:h,handleEditMessage:C}},hd=({width:e="400px",height:t="600px",isLoadingChat:n,className:r,style:s,messages:i,user:o,updateMessages:l,onMessageSent:a,onDeleteMessage:c,onEditMessage:u,dynamicSymbolAssignments:f,backgroundImage:h})=>{var ne,ve;const{handleDeleteConfirmation:m,handleCloseContextMenu:v,handleSendFile:y,handleSendVoice:S,handleSendMessage:b,handleContextMenu:P,contextMenuItems:C,isModalOpen:O,contextMenu:g,chatRef:L,setIsModalOpen:Y,messageToEdit:E,setMessageToEdit:F,handleEditMessage:G}=dd({user:o,messages:i,updateMessages:l,onMessageSent:a,onEditMessage:u,onDeleteMessage:c});return p.exports.jsxs("div",{className:`flex flex-col !bg-cover ${r}`,style:{width:e,height:t,background:"url("+h+")",...s},onClick:v,children:[p.exports.jsx("div",{ref:L,className:`flex flex-col gap-2 flex-1 p-3 pb-16 ${g?"overflow-hidden pr-[22px]":"overflow-y-scroll"}`,children:n?p.exports.jsx(Vo,{className:"mt-3",size:27,color:"text-gray-800"}):p.exports.jsx(Ur,{children:i.length>0?i.map((U,te)=>{var H,ie,xe;const ce=U!=null&&U.attachmentUrl?p.exports.jsx(Uf,{attachmentUrl:U.attachmentUrl,attachmentType:U==null?void 0:U.attachmentType,attachmentFormat:U==null?void 0:U.attachmentFormat},te):null;if(U.isRightSided)return p.exports.jsx(Yf,{media:ce,handleContextMenu:P,message:U},te);const fe=((ie=(H=i[te-1])==null?void 0:H.user)==null?void 0:ie.id)!==((xe=U==null?void 0:U.user)==null?void 0:xe.id);return p.exports.jsx(Wf,{showUserProfile:fe,media:ce,handleContextMenu:P,message:U},te)}):null})}),p.exports.jsx(Of,{isOpen:O,onClose:()=>Y(!1),onConfirm:m,header:"Confirm Delete",question:"Are you sure you want to delete this message?"}),g&&((ne=g==null?void 0:g.message)!=null&&ne.id)?p.exports.jsx(Lf,{items:C,isVisible:Boolean(g),messageId:String(g==null?void 0:g.message.id),isCurrentUserMessage:((ve=g==null?void 0:g.message)==null?void 0:ve.user.id)===o.id,position:{x:g==null?void 0:g.x,y:g==null?void 0:g.y}}):null,p.exports.jsx(Nf,{onSendVoice:S,onSendMessage:b,onFileSend:U=>y(U,Re.File),onImageSend:U=>y(U,Re.Image),onVideoSend:U=>y(U,Re.Video),dynamicSymbolAssignments:f,messageToEdit:E,setMessageToEdit:F,onEditMessage:G})]})};de.AttachmentTypeEnum=Re,de.Button=oa,de.Chat=hd,de.MessageEntity=He,Object.defineProperty(de,Symbol.toStringTag,{value:"Module"})});
21
21
  //# sourceMappingURL=index.umd.js.map