@lemonsliceai/lemon-slice-widget 1.0.0 → 1.0.1
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.js +1 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,9 +32,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
32
32
|
pointer-events: none;
|
|
33
33
|
`,document.body.appendChild(p),u.layout||(u.layout="custom-v1"),e.wrap(p,u)}},{key:"getCallInstance",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return u?pn[u]:Object.values(pn)[0]}}]);var t,n,r,i,o,a,s,c,l,d,f,m,g,y,v,b,_,k,C,M,x,T,E,A,R,B,V,W,j,X,le,_e,Y,F,U,H,Oe,kt})();function sf(e){if(e.extension){if(typeof e.extension!="string")throw new Error("Error starting dial out: extension must be a string");if(e.extension.length>20)throw new Error("Error starting dial out: extension length must be less than or equal to 20")}if(e.waitBeforeExtensionDialSec){if(typeof e.waitBeforeExtensionDialSec!="number")throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be a number");if(e.waitBeforeExtensionDialSec>60)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60");if(!e.extension)throw new Error("Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension")}}function Un(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",r),n[r]=jt;else if(r==="dailyConfig"){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var o=window._daily.instances[t].customCallbacks||{};o.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=o,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function ve(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==dn){var n="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function Ui(e,t){return[Pa,dn].includes(e)||t}function qa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"This daily-js method",r=arguments.length>3?arguments[3]:void 0;if(Ui(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function zi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method",n=arguments.length>2?arguments[2]:void 0;if(!e){var r="".concat(t,arguments.length>3&&arguments[3]!==void 0&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw n&&(r+=" ".concat(n)),console.error(r),new Error(r)}}function Ha(e){if(e){var t="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(t),new Error(t)}}function yt(e){if(!e){var t="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function tt(e){if(e){var t="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(t),new Error(t)}}function ae(){if(oe())throw new Error("This daily-js method is not currently supported in React Native")}function xr(){if(!oe())throw new Error("This daily-js method is only supported in React Native")}function cf(e){if(e===void 0)return!0;var t;if(typeof e=="string")t=e;else try{t=JSON.stringify(e),Je(JSON.parse(t),e)||console.warn("The userData provided will be modified when serialized.")}catch(n){throw Error("userData must be serializable to JSON: ".concat(n))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function lf(e,t){for(var n=t.allowAllParticipantsKey,r=function(f){var m=["local"];return n||m.push("*"),f&&!m.includes(f)},i=function(f){return!!(f.layer===void 0||Number.isInteger(f.layer)&&f.layer>=0||f.layer==="inherit")},o=function(f){return!!f&&!(f.video&&!i(f.video))&&!(f.screenVideo&&!i(f.screenVideo))},a=0,s=Object.entries(e);a<s.length;a++){var c=Be(s[a],2),l=c[0],d=c[1];if(!r(l)||!o(d))return!1}return!0}function uf(e){if(de(e)!=="object")return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Be(n[t],2),i=r[0],o=r[1];switch(i){case"video":if(de(o)!=="object")return!1;for(var a=0,s=Object.entries(o);a<s.length;a++){var c=Be(s[a],2),l=c[0],d=c[1];switch(l){case"processor":if(!o0(d))return!1;break;case"settings":if(!ff(d))return!1;break;default:return!1}}break;case"audio":if(de(o)!=="object")return!1;for(var f=0,m=Object.entries(o);f<m.length;f++){var g=Be(m[f],2),y=g[0],v=g[1];switch(y){case"processor":if(!i0(v))return!1;break;case"settings":if(!ff(v))return!1;break;default:return!1}}break;default:return!1}}return!0}function df(e,t,n){var r,i=[];e.video&&e.video.processor&&(Sd((r=t?.useLegacyVideoProcessor)!==null&&r!==void 0&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push("video"))),e.audio&&e.audio.processor&&(xd()||(e.audio.settings?delete e.audio.processor:delete e.audio,i.push("audio"))),i.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", "))),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:jt}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:jt}):delete n.videoTrack)}function i0(e){if(oe())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type"];return!!e&&de(e)==="object"&&(Object.keys(e).filter((function(n){return!t.includes(n)})).forEach((function(n){console.warn("invalid key inputSettings -> audio -> processor : ".concat(n)),delete e[n]})),!!(function(n){return typeof n!="string"?!1:Object.values(bd).includes(n)?!0:(console.error("inputSettings audio processor type invalid"),!1)})(e.type))}function o0(e){if(oe())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type","config"];return!e||de(e)!=="object"||!(function(n){return typeof n!="string"?!1:Object.values(Ri).includes(n)?!0:(console.error("inputSettings video processor type invalid"),!1)})(e.type)||e.config&&(de(e.config)!=="object"||!(function(n,r){var i=Object.keys(r);if(i.length===0)return!0;var o="invalid object in inputSettings -> video -> processor -> config";switch(n){case Ri.BGBLUR:return i.length>1||i[0]!=="strength"?(console.error(o),!1):!(typeof r.strength!="number"||r.strength<=0||r.strength>1||isNaN(r.strength))||(console.error("".concat(o,"; expected: {0 < strength <= 1}, got: ").concat(r.strength)),!1);case Ri.BGIMAGE:return!(r.source!==void 0&&!(function(a){if(a.source==="default")return a.type="default",!0;if(a.source instanceof ArrayBuffer)return!0;if(pi(a.source))return a.type="url",!!(function(l){var d=new URL(l),f=d.pathname;if(d.protocol==="data:")try{var m=f.substring(f.indexOf(":")+1,f.indexOf(";")).split("/")[1];return Da.includes(m)}catch(y){return console.error("failed to deduce blob content type",y),!1}var g=f.split(".").at(-1).toLowerCase().trim();return Da.includes(g)})(a.source)||(console.error("invalid image type; supported types: [".concat(Da.join(", "),"]")),!1);return s=a.source,c=Number(s),isNaN(c)||!Number.isInteger(c)||c<=0||c>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(a.type="daily-preselect",!0);var s,c})(r));default:return!0}})(e.type,e.config))?!1:(Object.keys(e).filter((function(n){return!t.includes(n)})).forEach((function(n){console.warn("invalid key inputSettings -> video -> processor : ".concat(n)),delete e[n]})),!0)}function ff(e){return de(e)==="object"&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function Ga(){var e=Object.values(Ri).join(" | "),t=Object.values(bd).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function hf(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(Oy).concat(t?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function pf(){return"customIntegrations should be an object of type ".concat(JSON.stringify(Ja),".")}function mf(e){if(e&&de(e)!=="object"||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(Bi),".")),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=Be(n[t],1)[0],i=0,o=Object.entries(e[r]);i<o.length;i++){var a=Be(o[i],2),s=a[0],c=a[1],l=Bi.id[s];if(!l)return console.error("customTrayButton does not support key ".concat(s)),!1;switch(s){case"iconPath":case"iconPathDarkMode":if(!pi(c))return console.error("customTrayButton ".concat(s," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(c))return console.error("customTrayButton ".concat(s," should be ").concat(l,". Got: ").concat(c)),!1;break;default:if(de(c)!==l)return console.error("customTrayButton ".concat(s," should be a ").concat(l,".")),!1}}return!0}function gf(e){if(!e||e&&de(e)!=="object"||Array.isArray(e))return console.error(pf()),!1;for(var t=function(f){return"".concat(f," should be ").concat(Ja.id[f])},n=function(f,m){return console.error("customIntegration ".concat(f,": ").concat(m))},r=0,i=Object.entries(e);r<i.length;r++){var o=Be(i[r],1)[0];if(!("label"in e[o]))return n(o,"label is required"),!1;if(!("location"in e[o]))return n(o,"location is required"),!1;if(!("src"in e[o])&&!("srcdoc"in e[o]))return n(o,"src or srcdoc is required"),!1;for(var a=0,s=Object.entries(e[o]);a<s.length;a++){var c=Be(s[a],2),l=c[0],d=c[1];switch(l){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof d!="string")return n(o,t(l)),!1;break;case"iconURL":if(!pi(d))return n(o,"".concat(l," should be a url")),!1;break;case"src":if("srcdoc"in e[o])return n(o,"cannot have both src and srcdoc"),!1;if(!pi(d))return n(o,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in e[o])return n(o,"cannot have both src and srcdoc"),!1;if(typeof d!="string")return n(o,t(l)),!1;break;case"location":if(!["main","sidebar"].includes(d))return n(o,t(l)),!1;break;case"controlledBy":if(d!=="*"&&d!=="owners"&&(!Array.isArray(d)||d.some((function(f){return typeof f!="string"}))))return n(o,t(l)),!1;break;case"shared":if((!Array.isArray(d)||d.some((function(f){return typeof f!="string"})))&&d!=="owners"&&typeof d!="boolean")return n(o,t(l)),!1;break;default:if(!Ja.id[l])return console.error("customIntegration does not support key ".concat(l)),!1}}}return!0}function vf(e,t){if(t===void 0)return!1;switch(de(t)){case"string":return de(e)===t;case"object":if(de(e)!=="object")return!1;for(var n in e)if(!vf(e[n],t[n]))return!1;return!0;default:return!1}}function yf(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,o=e.useSipRefer;if(!n||!r)throw new Error("".concat(t,"() requires a sessionId and toEndPoint"));if(typeof n!="string"||typeof r!="string")throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(o&&!r.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!r.startsWith("sip:")&&!r.startsWith("+"))throw new Error("toEndPoint: ".concat(r,' must starts with either "sip:" or "+"'));if(i&&typeof i!="string")throw new Error("callerId must be of type string");if(i&&!r.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function bf(e){if(de(e)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(Ia).includes(e.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(Ia));if(e.volume){if(typeof e.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(e.volume<0||e.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function _f(e,t,n){return!(typeof e!="number"||e<t||e>n)}function Ka(e,t){return e&&!t&&delete e.data,e}function nt(e){"@babel/helpers - typeof";return nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nt(e)}var ne=function(){return ne=Object.assign||function(n){for(var r,i=1,o=arguments.length;i<o;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n},ne.apply(this,arguments)};function Ya(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function zn(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{l(r.next(d))}catch(f){a(f)}}function c(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((r=r.apply(e,[])).next())})}function Wn(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return c([l,d])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function wf(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ye(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Ue(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var kf=Ie(null),bt=function(){var t=me(kf);return Xe(t),t},Xa=Ie({on:function(){},off:function(){}}),a0=-1,Qa=function(){return a0--},s0=1,Za=function(){return s0++},J=function(t,n,r){r===void 0&&(r=!1);var i=me(Xa),o=i.off,a=i.on,s=ye(Z(!1),2),c=s[0],l=s[1],d=pe(0),f=Ne(function(){return r?Qa():Za()},[r]);ee(function(){if(!(!t||c)){if(d.current>1e5){console.error(`useDailyEvent called with potentially non-memoized event callback or due to too many re-renders.
|
|
34
34
|
Memoize using useCallback to avoid re-render loop or reduce the amount of state transitions the callback depends on.
|
|
35
|
-
Passed callback for '`.concat(t,"' event is NOT registered."),n),l(!0);return}d.current++;var m=setTimeout(function(){d.current=0},50);return a(t,n,f),function(){clearTimeout(m),o(t,f)}}},[n,t,f,c,o,a]),Xe({event:t,eventId:f,isBlocked:c,callback:n})};function _t(e,t){var n,r;if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!_t(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(y,v){return _t(y,t.getTracks()[v])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var o=Array.from(e).sort(),a=Array.from(t).sort();return o.every(function(y,v){return _t(y,a[v])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=wf(e.entries()),c=s.next();!c.done;c=s.next()){var l=ye(c.value,2),d=l[0],f=l[1];if(!t.has(d)||!_t(f,t.get(d)))return!1}}catch(y){n={error:y}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(nt(e)!=="object"||e===null||nt(t)!=="object"||t===null)return!1;var m=Object.keys(e),g=Object.keys(t);if(m.length!==g.length)return!1;for(var i=0;i<m.length;i++){var d=m[i];if(!Object.prototype.hasOwnProperty.call(t,d)||!_t(e[d],t[d]))return!1}return!0}function es(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n],o=r!==null&&nt(r)==="object",a=i!==null&&nt(i)==="object";if(o||a){if(!_t(r,i))return!1}else if(r!==i)return!1}return!0}function he(e){return"daily-react-"+e}function ts(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=ie(function(o){var a=e.get(r)(o),s=n.get(r);return s!=null&&e.equals(a,s)?s:(n.set(r,a),a)});t.set(r,i)}return t.get(r)}}var ns="::",Sf=";",rs=function(t,n){return t+ns+n},c0=function(t,n){return t+ns+n.join(Sf)},ze=function(t,n){return is(rs(t,n))},Jn=dr(function(e){var t=ie([]);return t.debugLabel=he("participant-property-paths-".concat(e)),t}),is=dr(function(e){var t=ie(null);return t.debugLabel=he("participant-property-".concat(e)),t}),l0=ts({equals:es,get:function(t){return function(n){var r=ye(t.split(ns),2),i=r[0],o=r[1],a=o.split(Sf);return a.map(function(s){return n(ze(i,s))})}}}),xf=function(t,n){var r,i=Zt(Array.isArray(n)?l0(c0(t,n)):is(rs(t,n)));return Xe(Array.isArray(n)?n.reduce(function(o,a,s){return o[a]=i[s],o},{}):(r={},r[n]=i,r)),i},Wi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function u0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var os,Tf;function d0(){if(Tf)return os;Tf=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=nt(Wi)=="object"&&Wi&&Wi.Object===Object&&Wi,l=(typeof self>"u"?"undefined":nt(self))=="object"&&self&&self.Object===Object&&self,d=c||l||Function("return this")(),f=Object.prototype,m=f.toString,g=Math.max,y=Math.min,v=function(){return d.Date.now()};function b(T,E,A){var R,B,V,W,j,X,le=0,_e=!1,Y=!1,F=!0;if(typeof T!="function")throw new TypeError(e);E=x(E)||0,k(A)&&(_e=!!A.leading,Y="maxWait"in A,V=Y?g(x(A.maxWait)||0,E):V,F="trailing"in A?!!A.trailing:F);function U(P){var D=R,L=B;return R=B=void 0,le=P,W=T.apply(L,D),W}function H(P){return le=P,j=setTimeout(u,E),_e?U(P):W}function Oe(P){var D=P-X,L=P-le,$=E-D;return Y?y($,V-L):$}function kt(P){var D=P-X,L=P-le;return X===void 0||D>=E||D<0||Y&&L>=V}function u(){var P=v();if(kt(P))return p(P);j=setTimeout(u,Oe(P))}function p(P){return j=void 0,F&&R?U(P):(R=B=void 0,W)}function h(){j!==void 0&&clearTimeout(j),le=0,R=X=B=j=void 0}function w(){return j===void 0?W:p(v())}function S(){var P=v(),D=kt(P);if(R=arguments,B=this,X=P,D){if(j===void 0)return H(X);if(Y)return j=setTimeout(u,E),U(X)}return j===void 0&&(j=setTimeout(u,E)),W}return S.cancel=h,S.flush=w,S}function _(T,E,A){var R=!0,B=!0;if(typeof T!="function")throw new TypeError(e);return k(A)&&(R="leading"in A?!!A.leading:R,B="trailing"in A?!!A.trailing:B),b(T,E,{leading:R,maxWait:E,trailing:B})}function k(T){var E=nt(T);return!!T&&(E=="object"||E=="function")}function C(T){return!!T&&nt(T)=="object"}function M(T){return nt(T)=="symbol"||C(T)&&m.call(T)==n}function x(T){if(typeof T=="number")return T;if(M(T))return t;if(k(T)){var E=typeof T.valueOf=="function"?T.valueOf():T;T=k(E)?E+"":E}if(typeof T!="string")return T===0?T:+T;T=T.replace(r,"");var A=o.test(T);return A||a.test(T)?s(T.slice(2),A?2:8):i.test(T)?t:+T}return os=_,os}var f0=d0(),h0=u0(f0),Ji=function(t,n,r,i){r===void 0&&(r=500),i===void 0&&(i=!1);var o=me(Xa),a=o.off,s=o.on,c=Ne(function(){var f;return Array.isArray(t)?t.reduce(function(m,g){return m[g]=i?Qa():Za(),m},{}):(f={},f[t]=i?Qa():Za(),f)},[t,i]),l=pe([]);J("call-instance-destroyed",N(function(){l.current.length=0},[]));var d=Ne(function(){return h0(function(){l.current.length!==0&&(n(l.current),l.current.length=0)},r,{trailing:!0})},[n,r]);ee(function(){if(t){var f=function(g){l.current.push(g),d()};return Array.isArray(t)?t.forEach(function(m){return s(m,f,c[m])}):s(t,f,c[t]),function(){Array.isArray(t)?t.forEach(function(m){return a(m,c[m])}):a(t,c[t])}}},[d,t,c,a,s]),Xe({event:t,eventId:c})},Mf=function(t,n,r){if(n===void 0&&(n=""),r===void 0&&(r=new Set),nt(t)!=="object"||t===null||r.has(t))return[n];r.add(t);var i=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=n?"".concat(n,".").concat(o):o;i.push.apply(i,Ue([a],ye(Mf(t[o],a,r)),!1))}return r.delete(t),i},as=function(t){return Mf(t)},p0=function(t,n){return String(n).split(".").filter(function(r){return r.length}).reduce(function(r,i){return r&&r[i]},t)},ss=function(t,n){return n.map(function(r){return p0(t,r)})},qi=ie(null);qi.debugLabel=he("active-id");var Tr=ie("");Tr.debugLabel=he("local-id");var Cf=ie(null);Cf.debugLabel=he("local-join-date");var gn=ie([]);gn.debugLabel=he("participant-ids");var vn=dr(function(e){var t=ie(null);return t.debugLabel=he("participant-".concat(e)),t}),cs=ie([]);cs.debugLabel=he("waiting-participants");var ls=dr(function(e){var t=ie({awaitingAccess:{level:"full"},id:e,name:""});return t.debugLabel=he("waiting-participant-".concat(e)),t}),m0=function(t){var n=t.children,r=bt(),i=ye(Z(!1),2),o=i[0],a=i[1],s=re(N(function(d,f,m){f(Tr,m.local.session_id);var g=Object.values(m),y=g.map(function(v){return v.session_id});f(gn,y),g.forEach(function(v){f(vn(v.session_id),v);var b=as(v);f(Jn(v.session_id),b),b.forEach(function(_){var k=ye(ss(v,[_]),1),C=k[0];f(ze(v.session_id,_),C)})}),a(!0)},[]));ee(function(){if(!(!r||o)){var d=setInterval(function(){var f=r.participants();"local"in f&&(s(f),clearInterval(d))},100);return function(){clearInterval(d)}}},[r,o,s]);var c=N(function(){if(r){var d=r?.participants();d.local&&s(d)}},[r,s]);J("started-camera",c,!0),J("access-state-updated",c,!0),J("joining-meeting",re(N(function(d,f){f(Cf,new Date),c()},[c])),!0),J("joined-meeting",N(function(d){s(d.participants)},[s]),!0);var l=re(N(function(d,f){f(Tr,""),f(qi,null);var m=d(gn);m.forEach(function(g){return vn.remove(g)}),f(gn,[])},[]));return J("call-instance-destroyed",l,!0),J("left-meeting",l,!0),Ji(["active-speaker-change","participant-joined","participant-updated","participant-left"],re(N(function(d,f,m){m.length&&m.forEach(function(g){switch(g.action){case"active-speaker-change":{f(qi,g.activeSpeaker.peerId),f(vn(g.activeSpeaker.peerId),function(M){return M?ne(ne({},M),{last_active:new Date}):null});break}case"participant-joined":{f(gn,function(M){return M.includes(g.participant.session_id)?M:Ue(Ue([],ye(M),!1),[g.participant.session_id],!1)}),f(vn(g.participant.session_id),g.participant);var y=as(g.participant);f(Jn(g.participant.session_id),y),y.forEach(function(M){var x=ye(ss(g.participant,[M]),1),T=x[0];f(ze(g.participant.session_id,M),T)});break}case"participant-updated":{f(vn(g.participant.session_id),g.participant),g.participant.local&&f(Tr,g.participant.session_id);var y=as(g.participant),v=d(Jn(g.participant.session_id)),b=y.length!==v.length||y.some(function(x){return!v.includes(x)});b&&f(Jn(g.participant.session_id),y);var _=new Set(v),k=ss(g.participant,y);y.forEach(function(x,T){var E=k[T];_.delete(x),f(ze(g.participant.session_id,x),function(A){return _t(A,E)?A:E})}),_.forEach(function(x){f(ze(g.participant.session_id,x),null)});break}case"participant-left":{f(gn,function(M){return M.includes(g.participant.session_id)?M.filter(function(x){return x!==g.participant.session_id}):M}),vn.remove(g.participant.session_id);var C=d(Jn(g.participant.session_id));C.forEach(function(M){is.remove(rs(g.participant.session_id,M))}),Jn.remove(g.participant.session_id);break}}})},[])),100,!0),Ji(["waiting-participant-added","waiting-participant-updated","waiting-participant-removed"],re(N(function(d,f,m){m.forEach(function(g){switch(g.action){case"waiting-participant-added":f(cs,function(y){return y.includes(g.participant.id)?y:Ue(Ue([],ye(y),!1),[g.participant.id],!1)}),f(ls(g.participant.id),g.participant);break;case"waiting-participant-updated":f(ls(g.participant.id),g.participant);break;case"waiting-participant-removed":f(cs,function(y){return y.filter(function(v){return v!==g.participant.id})}),ls.remove(g.participant.id);break}})},[])),100,!0),ce.createElement(ce.Fragment,null,n)},Hi=function(){var t=Zt(Tr);return Xe(t),t},g0=function(){return!0},v0=function(t){var n=t===void 0?{}:t,r=n.filter,i=r===void 0?g0:r,o=n.ignoreLocal,a=o===void 0?!1:o,s=Hi(),c=Zt(qi),l=a&&c===s,d=!i?.(c),f=!l&&!d,m=ye(Z(f?c:null),2),g=m[0],y=m[1];return ee(function(){l||d||y(c)},[d,l,c]),Xe(g),g},Gi=function(t){return["blocked","off"].includes(t)},Pf=";",Ef=function(t,n){return"".concat(t).concat(Pf).concat(n)},Af=ts({equals:_t,get:function(t){return function(n){var r=ye(t.split(Pf),2),i=r[0],o=r[1],a=n(gn);return a.filter(function(s){switch(i){case"local":case"owner":case"record":return n(ze(s,i));case"remote":return!n(ze(s,"local"));case"screen":{var c=n(ze(s,"tracks.screenAudio.state")),l=n(ze(s,"tracks.screenVideo.state"));return!Gi(c)||!Gi(l)}default:return!0}}).sort(function(s,c){switch(o){case"joined_at":case"session_id":case"user_id":case"user_name":{var l=n(ze(s,o)),d=n(ze(c,o));if(l!==void 0||d!==void 0){if(l===void 0)return-1;if(d===void 0||l>d)return 1;if(l<d)return-1}return 0}default:return 0}})}}}),yn=function(t){var n=t===void 0?{}:t,r=n.filter,i=n.onActiveSpeakerChange,o=n.onParticipantJoined,a=n.onParticipantLeft,s=n.onParticipantUpdated,c=n.sort,l=Zt(Af(Ef(typeof r=="string"?r:null,typeof c=="string"?c:null))),d=typeof r=="function"||typeof c=="function",f=N(function(_){if(typeof r!="function"&&typeof c!="function")return[];var k=l.map(function(C){return _(vn(C))});return k.filter(function(C){return!!C}).filter(typeof r=="function"?r:function(){return!0}).sort(typeof c=="function"?c:function(){return 0}).map(function(C){return C.session_id}).filter(Boolean)},[r,l,c]),m=ye(Z([]),2),g=m[0],y=m[1],v=re(N(function(_){if(d){var k=f(_);_t(k,g)||y(k)}},[g,f,d]));ee(function(){v()},[v]),Ji(["participant-joined","participant-updated","active-speaker-change","participant-left"],N(function(_){_.length&&(_.forEach(function(k){switch(k.action){case"participant-joined":o?.(k);break;case"participant-updated":s?.(k);break;case"active-speaker-change":i?.(k);break;case"participant-left":a?.(k);break}}),v())},[v,i,o,a,s]));var b=typeof r=="function"||typeof c=="function"?g:l;return Xe(b),b},y0=ts({equals:es,get:function(){return function(t){var n=t(Af(Ef("screen",null)));return n.map(function(r){return{local:t(ze(r,"local")),screenAudio:t(ze(r,"tracks.screenAudio")),screenVideo:t(ze(r,"tracks.screenVideo")),screenId:"".concat(r,"-screen"),session_id:r}})}}}),b0=function(t){var n={},r=n.onError,i=n.onLocalScreenShareStarted,o=n.onLocalScreenShareStopped,a=bt(),s=N(function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];a?.startScreenShare.apply(a,Ue([],ye(f),!1))},[a]),c=N(function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];a?.stopScreenShare.apply(a,Ue([],ye(f),!1))},[a]);J("local-screen-share-started",N(function(){return i?.()},[i])),J("local-screen-share-stopped",N(function(){return o?.()},[o])),J("nonfatal-error",N(function(f){f.type==="screen-share-error"&&r?.(f)},[r]));var l=Zt(y0(void 0)),d={isSharingScreen:l.some(function(f){return f.local}),screens:l,startScreenShare:s,stopScreenShare:c};return Xe(d),d},Of=function(t,n){n===void 0&&(n="video");var r=xf(t,"tracks.".concat(n)),i=r?ne(ne({},r),{isOff:Gi(r.state)}):{isOff:!0,persistentTrack:void 0,state:"off",subscribed:!1};return Xe(i),i};function If(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(function(n){for(var r=0;r<e.length;r++){var i=e[r];typeof i=="function"?i(n):i&&nt(i)==="object"&&(i.current=n)}},e)}var Ki=Bo(rt(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,o=i===void 0?"audio":i,a=Ya(e,["onPlayFailed","sessionId","type"]),s=pe(null),c=Of(r,o),l=If(s,t),d=c?.subscribed;return ee(function(){var f=s.current;if(!(!f||!c?.persistentTrack)){var m=function(){f.play().catch(function(y){n?.({sessionId:r,target:f,type:o,message:y.message,name:y.name})})};if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(o," for ").concat(r)),n?.({sessionId:r,target:f,type:o,message:"MediaStream API not available",name:"MediaStream API not available"});return}return f.addEventListener("canplay",m),f.srcObject=new MediaStream([c?.persistentTrack]),function(){f?.removeEventListener("canplay",m)}}},[c?.persistentTrack,n,r,o]),J("participant-left",N(function(f){var m=s.current;f.participant.session_id!==r||!m||(m.srcObject=null)},[r])),ce.createElement("audio",ne({autoPlay:!0,ref:l},a,{"data-session-id":r,"data-audio-type":o,"data-subscribed":d}))}));Ki.displayName="DailyAudioTrack";var Df=Bo(rt(function(e,t){var n=e.autoSubscribeActiveSpeaker,r=n===void 0?!1:n,i=e.maxSpeakers,o=i===void 0?5:i,a=e.onPlayFailed,s=e.playLocalScreenAudio,c=s===void 0?!1:s,l=bt(),d=ye(Z(new Array(o).fill("")),2),f=d[0],m=d[1],g=b0().screens,y=Hi(),v=v0({ignoreLocal:!0}),b=pe(null);Ao(t,function(){return{getActiveSpeakerAudio:function(){var x,T;return(T=(x=b.current)===null||x===void 0?void 0:x.querySelector('audio[data-session-id="'.concat(v,'"][data-audio-type="audio"]')))!==null&&T!==void 0?T:null},getAllAudio:function(){var x,T;return Array.from((T=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll("audio"))!==null&&T!==void 0?T:[])},getAudioBySessionId:function(x){var T,E;return(E=(T=b.current)===null||T===void 0?void 0:T.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="audio"]')))!==null&&E!==void 0?E:null},getRmpAudio:function(){var x,T;return Array.from((T=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="rmpAudio"]'))!==null&&T!==void 0?T:[])},getScreenAudio:function(){var x,T;return Array.from((T=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="screenAudio"]'))!==null&&T!==void 0?T:[])},getRmpAudioBySessionId:function(x){var T,E;return(E=(T=b.current)===null||T===void 0?void 0:T.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="rmpAudio"]')))!==null&&E!==void 0?E:null},getScreenAudioBySessionId:function(x){var T,E;return(E=(T=b.current)===null||T===void 0?void 0:T.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="screenAudio"]')))!==null&&E!==void 0?E:null}}},[v]);var _=re(N(function(M,x,T){return zn(void 0,void 0,void 0,function(){var E,A,R;return Wn(this,function(B){if(E=Object.values((R=l?.participants())!==null&&R!==void 0?R:{}).filter(function(V){return!V.local&&!!V.tracks.audio.subscribed}),A=function(W){return E.some(function(j){return j.session_id===W})},!A(T))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(T,{setSubscribedTracks:{audio:!0}});else return[2];return m(function(V){var W;if(V.includes(T))return V;var j=function(H){return!H||!A(H)};if(V.some(j)){var X=V.findIndex(j);return V[X]=T,Ue([],ye(V),!1)}var le=V.findIndex(function(U){return E.some(function(H){return H.session_id===U&&Gi(H.tracks.audio.state)})});if(le>=0)return V[le]=T,Ue([],ye(V),!1);var _e=E.filter(function(U){return V.includes(U.session_id)&&U.session_id!==v}).sort(function(U,H){var Oe,kt,u=(Oe=M(ze(U.session_id,"last_active")))!==null&&Oe!==void 0?Oe:new Date("1970-01-01"),p=(kt=M(ze(H.session_id,"last_active")))!==null&&kt!==void 0?kt:new Date("1970-01-01");return u>p?1:u<p?-1:0});if(!_e.length){var Y=V.findIndex(function(U){return U!==v});return V[Y]=T,Ue([],ye(V),!1)}var F=V.indexOf((W=_e[0])===null||W===void 0?void 0:W.session_id);return V[F]=T,Ue([],ye(V),!1)}),[2]})})},[v,r,l])),k=N(function(M){m(function(x){if(!x.includes(M))return x;var T=Ue([],ye(x),!1),E=T.indexOf(M);return T[E]="",T})},[]);Ji(["active-speaker-change","track-started","participant-left"],N(function(M){M.forEach(function(x){switch(x.action){case"active-speaker-change":if(x.activeSpeaker.peerId===y)return;_(x.activeSpeaker.peerId);break;case"track-started":x.track.kind==="audio"&&x.participant&&!x.participant.local&&_(x.participant.session_id);break;case"participant-left":k(x.participant.session_id);break}})},[_,y,k]),200);var C=yn({filter:N(function(M){var x;return!!(!((x=M?.tracks)===null||x===void 0)&&x.rmpAudio)},[])});return ce.createElement("div",{ref:b},f.map(function(M,x){return ce.createElement(Ki,{key:"speaker-slot-".concat(x),onPlayFailed:a,sessionId:M,type:"audio"})}),g.filter(function(M){return c?!0:!M.local}).map(function(M){return ce.createElement(Ki,{key:M.screenId,onPlayFailed:a,sessionId:M.session_id,type:"screenAudio"})}),C.map(function(M){return ce.createElement(Ki,{key:"".concat(M,"-rmp"),onPlayFailed:a,sessionId:M,type:"rmpAudio"})}))}));Df.displayName="DailyAudio";var Lf=rt(function(t,n){var r=t.automirror,i=t.fit,o=i===void 0?"contain":i,a=t.mirror,s=t.onResize,c=t.playableStyle,l=c===void 0?{}:c,d=t.sessionId,f=t.style,m=f===void 0?{}:f,g=t.type,y=g===void 0?"video":g,v=Ya(t,["automirror","fit","mirror","onResize","playableStyle","sessionId","style","type"]),b=Hi(),_=b===d,k=y==="screenVideo",C=_&&!k,M=pe(null),x=If(M,n),T=Of(d,y),E=T.persistentTrack,A=C||k||!T.isOff,R=xf(d,"tracks.".concat(y)),B=R?.subscribed,V=Ne(function(){if(typeof a=="boolean")return a;if(!r)return!1;if(!E)return C;var W=E.getSettings(),j="facingMode"in W?C&&W.facingMode==="user":C;return j},[r,C,a,E]);return ee(function(){var j=M.current;if(j){var X=function(){var H=j.play();H!==void 0&&H.then(function(){j.controls=!1}).catch(function(Oe){j.controls=!0,console.warn("Failed to play video",Oe)})},le=function(){j.paused&&X()},_e=function(){j.style.transform="scale(1)"},Y=function(){j.style.transform="",setTimeout(function(){j.paused&&X()},100)},F=function(){document.visibilityState!=="hidden"&&j.paused&&X()};return j.addEventListener("canplay",le),j.addEventListener("enterpictureinpicture",_e),j.addEventListener("leavepictureinpicture",Y),document.addEventListener("visibilitychange",F),function(){j.removeEventListener("canplay",le),j.removeEventListener("enterpictureinpicture",_e),j.removeEventListener("leavepictureinpicture",Y),document.removeEventListener("visibilitychange",F)}}},[]),ee(function(){var j=M.current;if(!(!j||!E)){if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(y," for ").concat(d));return}return j.srcObject=new MediaStream([E]),j.load(),function(){j.srcObject=null,j.load()}}},[d,y,E,E?.id]),ee(function(){var j=M.current;if(!s||!j)return;var X;function le(){X&&cancelAnimationFrame(X),X=requestAnimationFrame(function(){var _e=M.current;if(!(!_e||document.hidden)){var Y=_e.videoWidth,F=_e.videoHeight;Y&&F&&s?.({aspectRatio:Y/F,height:F,width:Y})}})}return le(),j.addEventListener("loadedmetadata",le),j.addEventListener("resize",le),function(){X&&cancelAnimationFrame(X),j.removeEventListener("loadedmetadata",le),j.removeEventListener("resize",le)}},[s]),ce.createElement("video",ne({autoPlay:!0,muted:!0,playsInline:!0,ref:x,"data-local":_,"data-mirrored":V||void 0,"data-playable":A||void 0,"data-session-id":d,"data-subscribed":B,"data-video-type":y,style:ne(ne({objectFit:o,transform:V?"scale(-1, 1)":""},m),A?l:{})},v))});Lf.displayName="DailyVideo";var _0=Ie({refreshDevices:function(){return Promise.resolve()}}),Ee=ie("idle");Ee.debugLabel=he("camera-state");var Ae=ie("idle");Ae.debugLabel=he("microphone-state");var Yi=ie([]);Yi.debugLabel=he("camera-devices");var Xi=ie([]);Xi.debugLabel=he("microphone-devices");var jf=ie([]);jf.debugLabel=he("speaker-devices");var Rf=ie(null);Rf.debugLabel=he("last-camera-error");var w0=function(t){var n=t.children,r=bt(),i=re(N(function(a,s){return zn(void 0,void 0,void 0,function(){var c,l,d,f,m,g,y,v,b,_,k,C;return Wn(this,function(M){switch(M.label){case 0:if(typeof((k=navigator?.mediaDevices)===null||k===void 0?void 0:k.getUserMedia)>"u"||typeof((C=navigator?.mediaDevices)===null||C===void 0?void 0:C.enumerateDevices)>"u")return s(Ee,"not-supported"),s(Ae,"not-supported"),[2];if(!r)return[2];M.label=1;case 1:return M.trys.push([1,4,,5]),[4,r.enumerateDevices()];case 2:return c=M.sent().devices,l=c.filter(function(x){return x.kind==="videoinput"&&x.deviceId!==""}),d=c.filter(function(x){return x.kind==="audioinput"&&x.deviceId!==""}),f=c.filter(function(x){return x.kind==="audiooutput"&&x.deviceId!==""}),[4,r.getInputDevices()];case 3:return m=M.sent(),g=m.camera,y=m.mic,v=m.speaker,b=function(T,E,A){var R,B=A.find(function(j){return j.device.deviceId===E.deviceId}),V="deviceId"in T&&E.deviceId===T.deviceId,W=!("deviceId"in T)&&B?.selected;return{device:E,selected:V||!!W,state:(R=B?.state)!==null&&R!==void 0?R:"granted"}},_=function(T,E){return T.device.deviceId==="default"?-1:E.device.deviceId==="default"?1:T.device.label<E.device.label?-1:T.device.label>E.device.label?1:0},s(Yi,function(x){return l.filter(Boolean).map(function(T){return b(g,T,x)}).sort(_)}),s(Xi,function(x){return d.filter(Boolean).map(function(T){return b(y,T,x)}).sort(_)}),s(jf,function(x){return f.filter(Boolean).map(function(T){return b(v,T,x)}).sort(_)}),[3,5];case 4:return M.sent(),s(Ee,"not-supported"),s(Ae,"not-supported"),[3,5];case 5:return[2]}})})},[r])),o=re(N(function(a,s){return zn(void 0,void 0,void 0,function(){var c,l,d,f,m,g,y,v,b,_,k,C,M,x,T,E,A,R,B,V,W,j,X,le,_e,Y;return Wn(this,function(F){switch(F.label){case 0:if(!r)return[2];if(c=a(Ee),l=a(Ae),d=r.participants(),!d.local)return[2];if(f=d.local.tracks,m="prompt",g="prompt",!navigator.permissions)return[3,5];F.label=1;case 1:return F.trys.push([1,4,,5]),[4,navigator.permissions.query({name:"camera"})];case 2:return y=F.sent(),m=y.state,[4,navigator.permissions.query({name:"microphone"})];case 3:return v=F.sent(),g=v.state,[3,5];case 4:return F.sent(),[3,5];case 5:return b=m==="prompt"&&["idle","pending"].includes(c)&&f.video.state==="interrupted"&&!f.video.persistentTrack,_=["idle","pending"].includes(c)&&!f.video.persistentTrack&&!!(!((M=f.video.off)===null||M===void 0)&&M.byUser),k=g==="prompt"&&["idle","pending"].includes(l)&&f.audio.state==="interrupted"&&!f.audio.persistentTrack,C=["idle","pending"].includes(l)&&!f.audio.persistentTrack&&!!(!((x=f.audio.off)===null||x===void 0)&&x.byUser),!((E=(T=f.audio)===null||T===void 0?void 0:T.blocked)===null||E===void 0)&&E.byDeviceInUse?(s(Ae,"in-use"),s(Xi,function(U){return U.map(function(H){return H.selected?ne(ne({},H),{state:"in-use"}):H})})):!((R=(A=f.audio)===null||A===void 0?void 0:A.blocked)===null||R===void 0)&&R.byDeviceMissing?s(Ae,"not-found"):!((V=(B=f.audio)===null||B===void 0?void 0:B.blocked)===null||V===void 0)&&V.byPermissions||g==="denied"?s(Ae,"blocked"):k?s(Ae,"pending"):C?s(Ae,"idle"):(s(Ae,"granted"),s(Xi,function(U){return U.map(function(H){return H.selected?ne(ne({},H),{state:"granted"}):H})})),!((j=(W=f.video)===null||W===void 0?void 0:W.blocked)===null||j===void 0)&&j.byDeviceInUse?(s(Ee,"in-use"),s(Yi,function(U){return U.map(function(H){return H.selected?ne(ne({},H),{state:"in-use"}):H})})):!((le=(X=f.video)===null||X===void 0?void 0:X.blocked)===null||le===void 0)&&le.byDeviceMissing?s(Ee,"not-found"):!((Y=(_e=f.video)===null||_e===void 0?void 0:_e.blocked)===null||Y===void 0)&&Y.byPermissions||m==="denied"?s(Ee,"blocked"):b?s(Ee,"pending"):_?s(Ee,"idle"):(s(Ee,"granted"),s(Yi,function(U){return U.map(function(H){return H.selected?ne(ne({},H),{state:"granted"}):H})})),i(),[2]}})})},[r,i]));return J("participant-updated",N(function(a){a.participant.local&&o()},[o])),J("available-devices-updated",i),J("selected-devices-updated",i),J("camera-error",re(N(function(a,s,c){var l,d,f,m,g,y,v;switch(s(Rf,c.error),(l=c.error)===null||l===void 0?void 0:l.type){case"cam-in-use":s(Ee,"in-use");break;case"mic-in-use":s(Ae,"in-use");break;case"cam-mic-in-use":s(Ee,"in-use"),s(Ae,"in-use");break;case"not-found":!((d=c.error)===null||d===void 0)&&d.missingMedia.includes("video")&&s(Ee,"not-found"),!((f=c.error)===null||f===void 0)&&f.missingMedia.includes("audio")&&s(Ae,"not-found");break;case"permissions":!((m=c.error)===null||m===void 0)&&m.blockedMedia.includes("video")&&s(Ee,"blocked"),!((g=c.error)===null||g===void 0)&&g.blockedMedia.includes("audio")&&s(Ae,"blocked");break;case"constraints":((y=c.error)===null||y===void 0?void 0:y.reason)==="invalid"?(s(Ee,"constraints-invalid"),s(Ae,"constraints-invalid")):((v=c.error)===null||v===void 0?void 0:v.reason)==="none-specified"&&(s(Ee,"constraints-none-specified"),s(Ae,"constraints-none-specified"));break;case"undefined-mediadevices":s(Ee,"undefined-mediadevices"),s(Ae,"undefined-mediadevices");break;case"unknown":default:s(Ee,"unknown"),s(Ae,"unknown");break}},[]))),J("started-camera",re(N(function(a,s){s(Ee,"granted"),s(Ae,"granted"),o()},[o]))),ce.createElement(_0.Provider,{value:{refreshDevices:i}},n)},Mr=ie({errorMsg:void 0,isLiveStreaming:!1,layout:void 0});Mr.debugLabel=he("live-streaming");var k0=function(t){var n=t.children;return J("live-streaming-started",re(N(function(r,i,o){i(Mr,{isLiveStreaming:!0,layout:o?.layout})},[]))),J("live-streaming-stopped",re(N(function(r,i){i(Mr,function(o){return ne(ne({},o),{isLiveStreaming:!1,layout:void 0})})},[]))),J("live-streaming-error",re(N(function(r,i,o){i(Mr,function(a){return ne(ne({},a),{errorMsg:o.errorMsg})})},[]))),J("left-meeting",re(N(function(r,i){i(Mr,{errorMsg:void 0,isLiveStreaming:!1,layout:void 0})},[]))),ce.createElement(ce.Fragment,null,n)},Qi=ie("new");Qi.debugLabel=he("meeting-state");var us=ie(null);us.debugLabel=he("meeting-error");var ds=ie(null);ds.debugLabel=he("non-fatal-error");var Cr=ie({data:void 0,topology:"none"});Cr.debugLabel=he("meeting-session-data");var S0=function(t){var n=t.children,r=bt(),i=re(N(function(a,s){if(r){var c=r.meetingState();return s(Qi,c),c}},[r]));J("loading",i),J("loaded",i),J("joining-meeting",i),J("joined-meeting",i),J("left-meeting",i),J("error",re(N(function(a,s,c){s(us,c),i()},[i]))),J("nonfatal-error",re(N(function(a,s,c){s(ds,c)},[])));var o=re(N(function(a,s){r&&s(Cr,r.meetingSessionState())},[r]));return J("joined-meeting",o),J("meeting-session-state-updated",re(N(function(a,s,c){s(Cr,c.meetingSessionState)},[]))),J("left-meeting",re(N(function(a,s){s(Cr,{data:void 0,topology:"none"})},[]))),J("call-instance-destroyed",re(N(function(a,s){s(Qi,"new"),s(us,null),s(ds,null),s(Cr,{data:void 0,topology:"none"})},[]))),ce.createElement(ce.Fragment,null,n)},qn=ie("none");qn.debugLabel=he("topology");var Vf=ie("unknown"),Nf=ie([]),fs=ie(100);fs.debugLabel=he("network-quality");var hs=ie("good");hs.debugLabel=he("network-threshold");var x0=function(t){var n=t.children,r=bt(),i=Zt(qn),o=re(N(function(a,s){return zn(void 0,void 0,void 0,function(){var c;return Wn(this,function(l){switch(l.label){case 0:return r?[4,r.getNetworkTopology()]:[2];case 1:return c=l.sent(),!c||c?.topology==="none"?[2]:(s(qn,c.topology),[2])}})})},[r]));return J("joined-meeting",o),J("network-connection",re(N(function(a,s,c){switch(c.event){case"connected":c.type==="peer-to-peer"&&s(qn,"peer"),c.type==="sfu"&&s(qn,"sfu");break}},[]))),J("network-quality-change",re(N(function(a,s,c){s(Vf,function(l){return l!==c.networkState?c.networkState:l}),s(Nf,function(l){var d,f=(d=c.networkStateReasons)!==null&&d!==void 0?d:[];return es(l,f)?l:f}),s(fs,function(l){return l!==c.quality?c.quality:l}),s(hs,function(l){return l!==c.threshold?c.threshold:l})},[]))),J("left-meeting",re(N(function(a,s){s(qn,"none"),s(Vf,"unknown"),s(Nf,[]),s(fs,100),s(hs,"good")},[]))),ee(function(){!r||i!=="none"||o()},[r,o,i]),ce.createElement(ce.Fragment,null,n)},bn=ie({isLocalParticipantRecorded:!1,isRecording:!1});bn.debugLabel=he("recording-state");var T0=function(t){var n=t.children,r=Hi(),i=yn({filter:"record"}),o=re(N(function(a,s,c,l){var d=a(bn),f={isLocalParticipantRecorded:d.isLocalParticipantRecorded,isRecording:d.isRecording,local:d.local,type:d.type},m={isLocalParticipantRecorded:f?.type==="local"||!f?.type?c:f.isLocalParticipantRecorded,isRecording:f?.type==="local"||!f?.type?c:f.isRecording,local:(f?.type==="local"||!f?.type)&&c?l:f?.local,type:c?"local":d?.type};_t(f,m)||s(bn,ne(ne({},f),m))},[]));return ee(function(){var a=i.length>0,s=i.includes(r||"local");o(a,s)},[r,o,i]),J("recording-started",re(N(function(a,s,c){var l,d=!0;switch(c.type){case"cloud-beta":case"cloud":{r&&((l=c.layout)===null||l===void 0?void 0:l.preset)==="single-participant"&&c.layout.session_id!==r&&(d=!1);break}}s(bn,{error:!1,isLocalParticipantRecorded:d,isRecording:!0,layout:c?.layout,local:c?.local,recordingId:c?.recordingId,recordingStartedDate:new Date,startedBy:c?.startedBy,type:c?.type})},[r]))),J("recording-stopped",re(N(function(a,s){s(bn,function(c){return ne(ne({},c),{isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),J("recording-error",re(N(function(a,s){s(bn,function(c){return ne(ne({},c),{error:!0,isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),J("left-meeting",re(N(function(a,s){s(bn,{isLocalParticipantRecorded:!1,isRecording:!1})},[]))),ce.createElement(ce.Fragment,null,n)},M0=function(){var t=Zt(Qi);return Xe(t),t},ps=ie(null);ps.debugLabel=he("room-state");var C0=function(t){var n=t.children,r=bt(),i=M0(),o=re(N(function(a,s){return zn(void 0,void 0,void 0,function(){var c;return Wn(this,function(l){switch(l.label){case 0:return!r||i==="left-meeting"?[2]:[4,r.room()];case 1:return c=l.sent(),c&&"id"in c&&s(ps,c),[2,c]}})})},[r,i]));return J("access-state-updated",o),J("left-meeting",re(N(function(a,s){return function(){s(ps,null)}},[]))),ce.createElement(ce.Fragment,null,n)},Hn=ie({isTranscribing:!1,model:"general",language:"en",transcriptions:[]});Hn.debugLabel=he("transcription-state");var P0=function(t){var n=t.children;return J("transcription-started",re(N(function(r,i,o){i(Hn,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:o.endpointing,extra:o.extra,includeRawResponse:o.includeRawResponse,instanceId:o.instanceId,language:o.language,model:o.model,profanity_filter:o.profanity_filter,punctuate:o.punctuate,redact:o.redact,startedBy:o.startedBy,tier:o.tier})},[]))),J("transcription-stopped",re(N(function(r,i,o){i(Hn,function(a){return ne(ne({},a),{updatedBy:o.updatedBy,isTranscribing:!1})})},[]))),J("transcription-error",re(N(function(r,i){i(Hn,function(o){return ne(ne({},o),{error:!0,isTranscribing:!1})})},[]))),J("left-meeting",re(N(function(r,i){i(Hn,function(o){return ne(ne({},o),{isTranscribing:!1})})},[]))),J("app-message",re(N(function(r,i,o){o?.fromId==="transcription"&&i(Hn,function(a){return ne(ne({},a),{isTranscribing:!0,transcriptions:Ue(Ue([],ye(a.transcriptions),!1),[o.data],!1)})})},[]))),ce.createElement(ce.Fragment,null,n)},Ff={strictMode:!0},Bf=function(){return!0},E0={options:Ff,shouldCreateInstance:Bf},A0=function(t,n){var r=n===void 0?E0:n,i=r.parentElRef,o=r.options,a=o===void 0?Ff:o,s=r.shouldCreateInstance,c=s===void 0?Bf:s,l=ye(Z(null),2),d=l[0],f=l[1],m=pe();return ee(function(){if(!c())return;function g(b){return zn(this,void 0,void 0,function(){return Wn(this,function(_){switch(_.label){case 0:return[4,b.destroy()];case 1:return _.sent(),[2]}})})}var y=function(){setTimeout(function(){return f(null)},0)},v=Sr.getCallInstance();if(!d&&v&&!v.isDestroyed()){v.once("call-instance-destroyed",y),f(v);return}if(d){_t(m.current,a)||g(d);return}if(!v||v.isDestroyed())try{switch(t){case"callFrame":v=i?.current?Sr.createFrame(i.current,ne({},a)):Sr.createFrame(ne({},a));break;case"callObject":v=Sr.createCallObject(ne({},a));break}m.current=a,f(v),v.once("call-instance-destroyed",y)}catch(b){if(console.error("Error creating call instance:",b),a.strictMode)throw b}},[d,a,i,c,t]),d},O0=function(t){return A0("callObject",t)},I0=function(t){var n=t.children,r=t.jotaiStore,i=Ya(t,["children","jotaiStore"]),o=pe({}),a=N(function(y){var v,b,_,k;if("action"in y){var C=y.action,M=Array.from((k=(_=o.current)===null||_===void 0?void 0:_[C])!==null&&k!==void 0?k:[]),x=M.filter(function(W){var j=ye(W,1),X=j[0];return X<0}),T=M.filter(function(W){var j=ye(W,1),X=j[0];return X>0}),E=Ue(Ue([],ye(x),!1),ye(T),!1);try{for(var A=wf(E),R=A.next();!R.done;R=A.next()){var B=ye(R.value,2),V=B[1];V(y)}}catch(W){v={error:W}}finally{try{R&&!R.done&&(b=A.return)&&b.call(A)}finally{if(v)throw v.error}}}},[]),s=N(function(y){y&&Object.keys(o.current).forEach(function(v){y.off(v,a),y.isDestroyed()||y.on(v,a)})},[a]),c="callObject"in i?i.callObject:null,l=Ne(function(){return"callObject"in i?{}:i},[i]),d=O0({options:l,shouldCreateInstance:N(function(){return!("callObject"in i)},[i])}),f=c??d;ee(function(){f&&s(f)},[f,s]);var m=N(function(y,v,b){var _,k;o.current[y]||(o.current[y]=new Map,f&&(f.off(y,a),f.isDestroyed()||f.on(y,a))),!((_=o.current[y])===null||_===void 0)&&_.has(b)||(k=o.current[y])===null||k===void 0||k.set(b,v)},[f,a]),g=N(function(y,v){var b,_;(b=o.current[y])===null||b===void 0||b.delete(v),((_=o.current[y])===null||_===void 0?void 0:_.size)===0&&(f?.off(y,a),delete o.current[y])},[f,a]);return ce.createElement(av,{store:r},ce.createElement(kf.Provider,{value:f},ce.createElement(Xa.Provider,{value:{on:m,off:g}},ce.createElement(C0,null,ce.createElement(S0,null,ce.createElement(x0,null,ce.createElement(m0,null,ce.createElement(T0,null,ce.createElement(k0,null,ce.createElement(P0,null,ce.createElement(w0,null,n)))))))))))},ms=function(t){var n={},r=n.onAppMessage,i=bt(),o=N(function(s,c){c===void 0&&(c="*"),i&&i.sendAppMessage(s,c)},[i]),a=N(function(s){r?.(s,o)},[r,o]);return J("app-message",a),o},D0=ie({state:"low",reason:"none"});D0.debugLabel=he("cpu-load");var L0=ie(null);L0.debugLabel=he("input-settings");var j0=ie({hidden:0,present:0});j0.debugLabel=he("participant-counts");var R0=dr(function(e){var t=ie({},function(n,r,i){r(R0(e),i)});return t.debugLabel=he("participant-receive-settings-".concat(e)),t}),V0=ie(null);V0.debugLabel=he("send-settings");const N0='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-600:oklch(57.7% .245 27.325);--color-gray-600:oklch(44.6% .03 256.802);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--radius-lg:.5rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-lg:16px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-5{right:calc(var(--spacing)*5)}.right-15{right:calc(var(--spacing)*15)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-25{bottom:calc(var(--spacing)*25)}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-1000{z-index:1000}.mx-auto{margin-inline:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.hidden{display:none}.inline{display:inline}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-3{height:calc(var(--spacing)*3)}.h-11{height:calc(var(--spacing)*11)}.h-\\[28px\\]{height:28px}.h-\\[64px\\]{height:64px}.h-\\[180px\\]{height:180px}.h-\\[216px\\]{height:216px}.h-\\[300px\\]{height:300px}.h-\\[377px\\]{height:377px}.h-full{height:100%}.max-h-36{max-height:calc(var(--spacing)*36)}.min-h-11{min-height:calc(var(--spacing)*11)}.w-11{width:calc(var(--spacing)*11)}.w-25{width:calc(var(--spacing)*25)}.w-\\[36px\\]{width:36px}.w-\\[120px\\]{width:120px}.w-\\[144px\\]{width:144px}.w-\\[200px\\]{width:200px}.w-\\[252px\\]{width:252px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1}.flex-none{flex:none}.scale-25{--tw-scale-x:25%;--tw-scale-y:25%;--tw-scale-z:25%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-none{scale:none}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[22px\\]{border-radius:22px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-l-3xl{border-top-left-radius:var(--radius-3xl);border-bottom-left-radius:var(--radius-3xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\\/95{background-color:#000000f2}@supports (color:color-mix(in lab,red,red)){.bg-black\\/95{background-color:color-mix(in oklab,var(--color-black)95%,transparent)}}.bg-gray-600\\/25{background-color:#4a556540}@supports (color:color-mix(in lab,red,red)){.bg-gray-600\\/25{background-color:color-mix(in oklab,var(--color-gray-600)25%,transparent)}}.bg-red-600\\/25{background-color:#e4001440}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/25{background-color:color-mix(in oklab,var(--color-red-600)25%,transparent)}}.bg-red-600\\/50{background-color:#e4001480}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/50{background-color:color-mix(in oklab,var(--color-red-600)50%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-white\\/30{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.bg-\\[linear-gradient\\(transparent\\,\\#000000\\)\\]{background-image:linear-gradient(#0000,#000)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)\\,rgba\\(0\\,0\\,0\\,1\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,0\\)_40\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%);mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,0\\)_50\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%);mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_15\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,1\\)_50\\%\\,rgba\\(0\\,0\\,0\\,0\\)_60\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%);mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,0\\)_70\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%);mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\,rgba\\(0\\,0\\,0\\,0\\)_90\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%);mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 60%,#000 80%);mask-image:linear-gradient(#0000 60%,#000 80%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_70\\%\\,rgba\\(0\\,0\\,0\\,1\\)_100\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 70%,#000 100%);mask-image:linear-gradient(#0000 70%,#000)}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{object-fit:cover}.p-2{padding:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-14{padding-right:calc(var(--spacing)*14)}.pr-\\[4px\\]{padding-right:4px}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-right{text-align:right}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-all{word-break:break-all}.text-white{color:var(--color-white)}.text-white\\/75{color:#ffffffbf}@supports (color:color-mix(in lab,red,red)){.text-white\\/75{color:color-mix(in oklab,var(--color-white)75%,transparent)}}.underline{text-decoration-line:underline}.decoration-white\\/50{text-decoration-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.decoration-white\\/50{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.opacity-0{opacity:0}.opacity-100{opacity:1}.mix-blend-difference{mix-blend-mode:difference}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-sm{--tw-blur:blur(var(--blur-sm));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[4px\\]{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[8px\\]{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[16px\\]{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[32px\\]{--tw-backdrop-blur:blur(32px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[64px\\]{--tw-backdrop-blur:blur(64px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-none{--tw-backdrop-blur: ;-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[backdrop-filter\\]{transition-property:-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[scrollbar-width\\:none\\]{scrollbar-width:none}.placeholder\\:text-white\\/70::placeholder{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-white\\/70::placeholder{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.placeholder\\:opacity-0::placeholder{opacity:0}.placeholder\\:opacity-70::placeholder{opacity:.7}@media(hover:hover){.hover\\:bg-black\\/30:hover{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/30:hover{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/15:hover{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.hover\\:bg-white\\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/20:hover{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.hover\\:bg-white\\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/80:hover{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:hidden::-webkit-scrollbar{display:none}.shadow-inset-white-10{box-shadow:inset 0 0 0 1px #ffffff1a}.shadow-inset-white-20{box-shadow:inset 0 0 0 1px #fff3}.shadow-focused{box-shadow:inset 0 0 0 1.5px #fff6}}@keyframes fadeInUp{0%{opacity:0;filter:blur(12px);transform:translateY(12px)}to{opacity:1;filter:blur();transform:translateY(0)}}@keyframes fadeOutUp{0%{opacity:1;filter:blur();transform:translateY(0)}to{opacity:0;filter:blur(12px);transform:translateY(-12px)}}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';function F0(){return O("style",{children:N0})}const $f=Ie(void 0);function B0({children:e}){const[t,n]=Z(!1);return O($f.Provider,{value:{hasUserInteracted:t,setHasUserInteracted:n},children:e})}function Pr(){const e=me($f);if(!e)throw new Error("useUserInteraction must be used within a UserInteractionProvider");return e}const Re="active",ct="minimized",Ht="hidden",Uf=Ie(void 0),$0=3e4;function U0({children:e,showMinimizeButton:t=!0,onSetShowMinimizeButton:n}){const{setHasUserInteracted:r}=Pr(),i=ms(),o=bt(),[a,s]=Z(ct),[c,l]=Z(!1),[d,f]=Z(!1),[m,g]=Z(!1),[y,v]=Z(null),[b,_]=Z(!1),[k,C]=Z(t),[M,x]=Z(!1),[T,E]=Z(!1),A=pe(null),R=pe(null),B=pe(null);ee(()=>{n&&n(C)},[n]);const V=N(()=>{if(o)try{const j=o.meetingState();(j==="joined-meeting"||j==="joining-meeting")&&(console.log("Sending force-end event to Daily"),i({event:"force-end"},"*"))}catch{}l(!1),r(!1),_(!1),v(null),x(!1),E(!1)},[o]),W=j=>{A.current!==null&&clearTimeout(A.current),R.current!==null&&clearTimeout(R.current),j===Re?B.current!==null&&(clearTimeout(B.current),B.current=null):a===Re&&j===ct&&(B.current=window.setTimeout(()=>{V(),B.current=null},$0)),j===Ht||a===Ht?(f(!0),A.current=window.setTimeout(()=>{s(j),f(!1),g(!0),A.current=null,R.current=window.setTimeout(()=>{g(!1),R.current=null},300)},1)):(s(j),f(!1),g(!1))};return O(Uf.Provider,{value:{widgetState:a,setWidgetState:W,isAgentVideoReady:c,setIsAgentVideoReady:l,roomUrl:y,setRoomUrl:v,isTransitioning:m,isAboutToTransition:d,hasJoinedRoom:b,setHasJoinedRoom:_,resetDailyState:V,showMinimizeButton:k,setShowMinimizeButton:C,isImageChangeRequested:M,setIsImageChangeRequested:x,isImageChanging:T,setIsImageChanging:E},children:e})}function Rt(){const e=me(Uf);if(!e)throw new Error("useWidget must be used within a WidgetProvider");return e}const zf=Ie(void 0);function z0({children:e}){const[t,n]=Z(!0),[r,i]=Z(!1),o=bt();return ee(()=>{o&&o.setLocalAudio(!t)},[t,o]),O(zf.Provider,{value:{isMicMuted:t,setIsMicMuted:n,isAudioMuted:r,setIsAudioMuted:i},children:e})}function gs(){const e=me(zf);if(!e)throw new Error("useMute must be used within a MuteProvider");return e}const Wf=Ie(void 0);function W0({children:e}){const t=Ne(()=>typeof window>"u"?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),[]);return O(Wf.Provider,{value:{isMobileDevice:t},children:e})}function vs(){const e=me(Wf);if(!e)throw new Error("useMobile must be used within a MobileProvider");return e}const Jf=Ie(void 0);function J0({children:e}){const[t,n]=Z(null);return O(Jf.Provider,{value:{agentData:t,setAgentData:n},children:e})}function Gn(){const e=me(Jf);if(!e)throw new Error("useAgent must be used within an AgentProvider");return e}const qf=360,q0=30,Hf=Ie(void 0);function H0({children:e}){const[t,n]=Z(""),[r,i]=Z(""),[o,a]=Z(""),s=pe(null),{agentData:c}=Gn(),{resetDailyState:l,setWidgetState:d}=Rt(),f=pe(qf),m=N(()=>{n(""),i(""),a("")},[]),g=N(()=>{s.current!==null&&clearInterval(s.current);const y=c?.max_conv_dur!=null&&c.max_conv_dur>0?c.max_conv_dur:qf;f.current=y,a(""),s.current=window.setInterval(()=>{f.current-=1,f.current<=q0&&f.current>0?a(`• ${f.current}s left`):f.current===0&&s.current!==null&&(a(""),n(""),i(""),d(ct),l(),clearInterval(s.current),s.current=null)},1e3)},[c,d,l]);return ee(()=>{s.current!==null&&c?.max_conv_dur!=null&&c.max_conv_dur>0&&g()},[c?.max_conv_dur,g]),ee(()=>()=>{s.current!==null&&clearInterval(s.current)},[]),O(Hf.Provider,{value:{errorMsg:t,setErrorMsg:n,nonFatalErrorMsg:r,setNonFatalErrorMsg:i,timeMsg:o,setTimeMsg:a,startMaxVideoTimer:g,resetErrors:m},children:e})}function Zi(){const e=me(Hf);if(!e)throw new Error("useError must be used within an ErrorProvider");return e}function G0(){const e=yn({filter:"remote"}),{timeMsg:t}=Zi(),{agentData:n}=Gn(),{isImageChanging:r}=Rt();if(e.length===0)return null;const i=e[0],o=n?.image_url;return O("div",{className:"h-full rounded-lg relative",children:[o&&O("div",{className:"absolute inset-0 bg-cover bg-center rounded-lg",style:{backgroundImage:`url(${o})`}}),O("div",{className:"relative w-full h-full",children:[O(Lf,{sessionId:i,type:"video",style:{objectFit:"cover",width:"100%",height:"100%",position:"relative"}}),O("div",{className:`absolute inset-0 bg-black/95 bg-cover bg-center rounded-lg transition-opacity transition-[backdrop-filter] duration-300 ease-in-out ${r?"opacity-100 backdrop-blur-lg":"opacity-0 backdrop-blur-none"}`})]}),t&&O("div",{className:"absolute top-2 left-2",children:O("div",{className:"bg-red-600/50 backdrop-blur-xl rounded-3xl py-2 px-4 w-fit shadow-inset-white-10",children:O("p",{className:"text-white text-lg font-semibold text-center",children:t})})})]})}const Gf=Ie({});function K0(e){const t=pe(null);return t.current===null&&(t.current=e()),t.current}const ys=typeof window<"u",Y0=ys?On:ee,bs=Ie(null);function _s(e,t){e.indexOf(t)===-1&&e.push(t)}function ws(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Vt=(e,t,n)=>n>t?t:n<e?e:n;let ks=()=>{};const Nt={},Kf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Yf(e){return typeof e=="object"&&e!==null}const Xf=e=>/^0[^.\s]+$/u.test(e);function Ss(e){let t;return()=>(t===void 0&&(t=e()),t)}const lt=e=>e,X0=(e,t)=>n=>t(e(n)),Er=(...e)=>e.reduce(X0),Ar=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class xs{constructor(){this.subscriptions=[]}add(t){return _s(this.subscriptions,t),()=>ws(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ct=e=>e*1e3,ut=e=>e/1e3;function Qf(e,t){return t?e*(1e3/t):0}const Zf=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Q0=1e-7,Z0=12;function e_(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Zf(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Q0&&++s<Z0);return a}function Or(e,t,n,r){if(e===t&&n===r)return lt;const i=o=>e_(o,0,1,e,n);return o=>o===0||o===1?o:Zf(i(o),t,r)}const eh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,th=e=>t=>1-e(1-t),nh=Or(.33,1.53,.69,.99),Ts=th(nh),rh=eh(Ts),ih=e=>(e*=2)<1?.5*Ts(e):.5*(2-Math.pow(2,-10*(e-1))),Ms=e=>1-Math.sin(Math.acos(e)),oh=th(Ms),ah=eh(Ms),t_=Or(.42,0,1,1),n_=Or(0,0,.58,1),sh=Or(.42,0,.58,1),r_=e=>Array.isArray(e)&&typeof e[0]!="number",ch=e=>Array.isArray(e)&&typeof e[0]=="number",i_={linear:lt,easeIn:t_,easeInOut:sh,easeOut:n_,circIn:Ms,circInOut:ah,circOut:oh,backIn:Ts,backInOut:rh,backOut:nh,anticipate:ih},o_=e=>typeof e=="string",lh=e=>{if(ch(e)){ks(e.length===4);const[t,n,r,i]=e;return Or(t,n,r,i)}else if(o_(e))return i_[e];return e},eo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function a_(e,t){let n=new Set,r=new Set,i=!1,o=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(l.schedule(d),e()),d(s)}const l={schedule:(d,f=!1,m=!1)=>{const y=m&&i?n:r;return f&&a.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(s=d,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(d))}};return l}const s_=40;function uh(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=eo.reduce((C,M)=>(C[M]=a_(o),C),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:d,update:f,preRender:m,render:g,postRender:y}=a,v=()=>{const C=Nt.useManualTiming?i.timestamp:performance.now();n=!1,Nt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(C-i.timestamp,s_),1)),i.timestamp=C,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),d.process(i),f.process(i),m.process(i),g.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},b=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:eo.reduce((C,M)=>{const x=a[M];return C[M]=(T,E=!1,A=!1)=>(n||b(),x.schedule(T,E,A)),C},{}),cancel:C=>{for(let M=0;M<eo.length;M++)a[eo[M]].cancel(C)},state:i,steps:a}}const{schedule:ke,cancel:Gt,state:Ve,steps:Cs}=uh(typeof requestAnimationFrame<"u"?requestAnimationFrame:lt,!0);let to;function c_(){to=void 0}const Ye={now:()=>(to===void 0&&Ye.set(Ve.isProcessing||Nt.useManualTiming?Ve.timestamp:performance.now()),to),set:e=>{to=e,queueMicrotask(c_)}},dh=e=>t=>typeof t=="string"&&t.startsWith(e),Ps=dh("--"),l_=dh("var(--"),Es=e=>l_(e)?u_.test(e.split("/*")[0].trim()):!1,u_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Kn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ir={...Kn,transform:e=>Vt(0,1,e)},no={...Kn,default:1},Dr=e=>Math.round(e*1e5)/1e5,As=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function d_(e){return e==null}const f_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Os=(e,t)=>n=>!!(typeof n=="string"&&f_.test(n)&&n.startsWith(e)||t&&!d_(n)&&Object.prototype.hasOwnProperty.call(n,t)),fh=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(As);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},h_=e=>Vt(0,255,e),Is={...Kn,transform:e=>Math.round(h_(e))},_n={test:Os("rgb","red"),parse:fh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Is.transform(e)+", "+Is.transform(t)+", "+Is.transform(n)+", "+Dr(Ir.transform(r))+")"};function p_(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ds={test:Os("#"),parse:p_,transform:_n.transform},Lr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kt=Lr("deg"),Pt=Lr("%"),q=Lr("px"),m_=Lr("vh"),g_=Lr("vw"),hh={...Pt,parse:e=>Pt.parse(e)/100,transform:e=>Pt.transform(e*100)},Yn={test:Os("hsl","hue"),parse:fh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pt.transform(Dr(t))+", "+Pt.transform(Dr(n))+", "+Dr(Ir.transform(r))+")"},Pe={test:e=>_n.test(e)||Ds.test(e)||Yn.test(e),parse:e=>_n.test(e)?_n.parse(e):Yn.test(e)?Yn.parse(e):Ds.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_n.transform(e):Yn.transform(e),getAnimatableNone:e=>{const t=Pe.parse(e);return t.alpha=0,Pe.transform(t)}},v_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function y_(e){return isNaN(e)&&typeof e=="string"&&(e.match(As)?.length||0)+(e.match(v_)?.length||0)>0}const ph="number",mh="color",b_="var",__="var(",gh="${}",w_=/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 jr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(w_,c=>(Pe.test(c)?(r.color.push(o),i.push(mh),n.push(Pe.parse(c))):c.startsWith(__)?(r.var.push(o),i.push(b_),n.push(c)):(r.number.push(o),i.push(ph),n.push(parseFloat(c))),++o,gh)).split(gh);return{values:n,split:s,indexes:r,types:i}}function vh(e){return jr(e).values}function yh(e){const{split:t,types:n}=jr(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===ph?o+=Dr(i[a]):s===mh?o+=Pe.transform(i[a]):o+=i[a]}return o}}const k_=e=>typeof e=="number"?0:Pe.test(e)?Pe.getAnimatableNone(e):e;function S_(e){const t=vh(e);return yh(e)(t.map(k_))}const Yt={test:y_,parse:vh,createTransformer:yh,getAnimatableNone:S_};function Ls(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+(t-e)*6*n:n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function x_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=Ls(c,s,e+.3333333333333333),o=Ls(c,s,e),a=Ls(c,s,e-.3333333333333333)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function ro(e,t){return n=>n>0?t:e}const xe=(e,t,n)=>e+(t-e)*n,js=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},T_=[Ds,_n,Yn],M_=e=>T_.find(t=>t.test(e));function bh(e){const t=M_(e);if(!t)return!1;let n=t.parse(e);return t===Yn&&(n=x_(n)),n}const _h=(e,t)=>{const n=bh(e),r=bh(t);if(!n||!r)return ro(e,t);const i={...n};return o=>(i.red=js(n.red,r.red,o),i.green=js(n.green,r.green,o),i.blue=js(n.blue,r.blue,o),i.alpha=xe(n.alpha,r.alpha,o),_n.transform(i))},Rs=new Set(["none","hidden"]);function C_(e,t){return Rs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function P_(e,t){return n=>xe(e,t,n)}function Vs(e){return typeof e=="number"?P_:typeof e=="string"?Es(e)?ro:Pe.test(e)?_h:O_:Array.isArray(e)?wh:typeof e=="object"?Pe.test(e)?_h:E_:ro}function wh(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Vs(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function E_(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Vs(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function A_(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}const O_=(e,t)=>{const n=Yt.createTransformer(t),r=jr(e),i=jr(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Rs.has(e)&&!i.values.length||Rs.has(t)&&!r.values.length?C_(e,t):Er(wh(A_(r,i),i.values),n):ro(e,t)};function kh(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xe(e,t,n):Vs(e)(e,t)}const I_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ke.update(t,n),stop:()=>Gt(t),now:()=>Ve.isProcessing?Ve.timestamp:Ye.now()}},Sh=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},io=2e4;function Ns(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<io;)t+=n,r=e.next(t);return t>=io?1/0:t}function D_(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Ns(r),io);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:ut(i)}}const L_=5;function xh(e,t,n){const r=Math.max(t-L_,0);return Qf(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},Fs=.001;function j_({duration:e=Te.duration,bounce:t=Te.bounce,velocity:n=Te.velocity,mass:r=Te.mass}){let i,o,a=1-t;a=Vt(Te.minDamping,Te.maxDamping,a),e=Vt(Te.minDuration,Te.maxDuration,ut(e)),a<1?(i=l=>{const d=l*a,f=d*e,m=d-n,g=Bs(l,a),y=Math.exp(-f);return Fs-m/g*y},o=l=>{const f=l*a*e,m=f*n+n,g=Math.pow(a,2)*Math.pow(l,2)*e,y=Math.exp(-f),v=Bs(Math.pow(l,2),a);return(-i(l)+Fs>0?-1:1)*((m-g)*y)/v}):(i=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-Fs+d*f},o=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const s=5/e,c=V_(i,o,s);if(e=Ct(e),isNaN(c))return{stiffness:Te.stiffness,damping:Te.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const R_=12;function V_(e,t,n){let r=n;for(let i=1;i<R_;i++)r=r-e(r)/t(r);return r}function Bs(e,t){return e*Math.sqrt(1-t*t)}const N_=["duration","bounce"],F_=["stiffness","damping","mass"];function Th(e,t){return t.some(n=>e[n]!==void 0)}function B_(e){let t={velocity:Te.velocity,stiffness:Te.stiffness,damping:Te.damping,mass:Te.mass,isResolvedFromDuration:!1,...e};if(!Th(e,F_)&&Th(e,N_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Vt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Te.mass,stiffness:i,damping:o}}else{const n=j_(e);t={...t,...n,mass:Te.mass},t.isResolvedFromDuration=!0}return t}function oo(e=Te.visualDuration,t=Te.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:d,duration:f,velocity:m,isResolvedFromDuration:g}=B_({...n,velocity:-ut(n.velocity||0)}),y=m||0,v=l/(2*Math.sqrt(c*d)),b=a-o,_=ut(Math.sqrt(c/d)),k=Math.abs(b)<5;r||(r=k?Te.restSpeed.granular:Te.restSpeed.default),i||(i=k?Te.restDelta.granular:Te.restDelta.default);let C;if(v<1){const x=Bs(_,v);C=T=>{const E=Math.exp(-v*_*T);return a-E*((y+v*_*b)/x*Math.sin(x*T)+b*Math.cos(x*T))}}else if(v===1)C=x=>a-Math.exp(-_*x)*(b+(y+_*b)*x);else{const x=_*Math.sqrt(v*v-1);C=T=>{const E=Math.exp(-v*_*T),A=Math.min(x*T,300);return a-E*((y+v*_*b)*Math.sinh(A)+x*b*Math.cosh(A))/x}}const M={calculatedDuration:g&&f||null,next:x=>{const T=C(x);if(g)s.done=x>=f;else{let E=x===0?y:0;v<1&&(E=x===0?Ct(y):xh(C,x,T));const A=Math.abs(E)<=r,R=Math.abs(a-T)<=i;s.done=A&&R}return s.value=s.done?a:T,s},toString:()=>{const x=Math.min(Ns(M),io),T=Sh(E=>M.next(x*E).value,x,30);return x+"ms "+T},toTransition:()=>{}};return M}oo.applyToOptions=e=>{const t=D_(e,100,oo);return e.ease=t.ease,e.duration=Ct(t.duration),e.type="keyframes",e};function $s({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:d}){const f=e[0],m={done:!1,value:f},g=A=>s!==void 0&&A<s||c!==void 0&&A>c,y=A=>s===void 0?c:c===void 0||Math.abs(s-A)<Math.abs(c-A)?s:c;let v=n*t;const b=f+v,_=a===void 0?b:a(b);_!==b&&(v=_-f);const k=A=>-v*Math.exp(-A/r),C=A=>_+k(A),M=A=>{const R=k(A),B=C(A);m.done=Math.abs(R)<=l,m.value=m.done?_:B};let x,T;const E=A=>{g(m.value)&&(x=A,T=oo({keyframes:[m.value,y(m.value)],velocity:xh(C,A,m.value),damping:i,stiffness:o,restDelta:l,restSpeed:d}))};return E(0),{calculatedDuration:null,next:A=>{let R=!1;return!T&&x===void 0&&(R=!0,M(A),E(A)),x!==void 0&&A>=x?T.next(A-x):(!R&&M(A),m)}}}function $_(e,t,n){const r=[],i=n||Nt.mix||kh,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||lt:t;s=Er(c,s)}r.push(s)}return r}function U_(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(ks(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=$_(t,r,i),c=s.length,l=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const m=Ar(e[f],e[f+1],d);return s[f](m)};return n?d=>l(Vt(e[0],e[o-1],d)):l}function z_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ar(0,t,r);e.push(xe(n,1,i))}}function W_(e){const t=[0];return z_(t,e.length-1),t}function J_(e,t){return e.map(n=>n*t)}function q_(e,t){return e.map(()=>t||sh).splice(0,e.length-1)}function Rr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=r_(r)?r.map(lh):lh(r),o={done:!1,value:t[0]},a=J_(n&&n.length===t.length?n:W_(t),e),s=U_(a,t,{ease:Array.isArray(i)?i:q_(t,i)});return{calculatedDuration:e,next:c=>(o.value=s(c),o.done=c>=e,o)}}const H_=e=>e!==null;function Us(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(H_),s=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const G_={decay:$s,inertia:$s,tween:Rr,keyframes:Rr,spring:oo};function Mh(e){typeof e.type=="string"&&(e.type=G_[e.type])}class zs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const K_=e=>e/100;class Ws extends zs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Ye.now()&&this.tick(Ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Mh(t);const{type:n=Rr,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=t;let{keyframes:s}=t;const c=n||Rr;c!==Rr&&typeof s[0]!="number"&&(this.mixKeyframes=Er(K_,kh(s[0],s[1])),s=[0,100]);const l=c({...t,keyframes:s});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...s].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=Ns(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:d,repeat:f,repeatType:m,repeatDelay:g,type:y,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const _=this.currentTime-l*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let C=this.currentTime,M=r;if(f){const A=Math.min(this.currentTime,i)/s;let R=Math.floor(A),B=A%1;!B&&A>=1&&(B=1),B===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(m==="reverse"?(B=1-B,g&&(B-=g/s)):m==="mirror"&&(M=a)),C=Vt(0,1,B)*s}const x=k?{done:!1,value:d[0]}:M.next(C);o&&(x.value=o(x.value));let{done:T}=x;!k&&c!==null&&(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return E&&y!==$s&&(x.value=Us(d,this.options,b,this.speed)),v&&v(x.value),E&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return ut(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ut(t)}get time(){return ut(this.currentTime)}set time(t){t=Ct(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ye.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ut(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=I_,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Y_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const wn=e=>e*180/Math.PI,Js=e=>{const t=wn(Math.atan2(e[1],e[0]));return qs(t)},X_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Js,rotateZ:Js,skewX:e=>wn(Math.atan(e[1])),skewY:e=>wn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qs=e=>(e=e%360,e<0&&(e+=360),e),Ch=Js,Ph=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Eh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Q_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ph,scaleY:Eh,scale:e=>(Ph(e)+Eh(e))/2,rotateX:e=>qs(wn(Math.atan2(e[6],e[5]))),rotateY:e=>qs(wn(Math.atan2(-e[2],e[0]))),rotateZ:Ch,rotate:Ch,skewX:e=>wn(Math.atan(e[4])),skewY:e=>wn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Hs(e){return e.includes("scale")?1:0}function Gs(e,t){if(!e||e==="none")return Hs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Q_,i=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=X_,i=s}if(!i)return Hs(t);const o=r[t],a=i[1].split(",").map(ew);return typeof o=="function"?o(a):a[o]}const Z_=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Gs(n,t)};function ew(e){return parseFloat(e.trim())}const Xn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qn=new Set(Xn),Ah=e=>e===Kn||e===q,tw=new Set(["x","y","z"]),nw=Xn.filter(e=>!tw.has(e));function rw(e){const t=[];return nw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const kn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Gs(t,"x"),y:(e,{transform:t})=>Gs(t,"y")};kn.translateX=kn.x,kn.translateY=kn.y;const Sn=new Set;let Ks=!1,Ys=!1,Xs=!1;function Oh(){if(Ys){const e=Array.from(Sn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=rw(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{r.getValue(o)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ys=!1,Ks=!1,Sn.forEach(e=>e.complete(Xs)),Sn.clear()}function Ih(){Sn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ys=!0)})}function iw(){Xs=!0,Ih(),Oh(),Xs=!1}class Qs{constructor(t,n,r,i,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Sn.add(this),Ks||(Ks=!0,ke.read(Ih),ke.resolveKeyframes(Oh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}Y_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Sn.delete(this)}cancel(){this.state==="scheduled"&&(Sn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ow=e=>e.startsWith("--");function aw(e,t,n){ow(t)?e.style.setProperty(t,n):e.style[t]=n}const sw=Ss(()=>window.ScrollTimeline!==void 0),cw={};function lw(e,t){const n=Ss(e);return()=>cw[t]??n()}const Dh=lw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Lh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vr([0,.65,.55,1]),circOut:Vr([.55,0,1,.45]),backIn:Vr([.31,.01,.66,-.59]),backOut:Vr([.33,1.53,.69,.99])};function jh(e,t){if(e)return typeof e=="function"?Dh()?Sh(e,t):"ease-out":ch(e)?Vr(e):Array.isArray(e)?e.map(n=>jh(n,t)||Lh.easeOut):Lh[e]}function uw(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const d={[t]:n};c&&(d.offset=c);const f=jh(s,i);Array.isArray(f)&&(d.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return l&&(m.pseudoElement=l),e.animate(d,m)}function Rh(e){return typeof e=="function"&&"applyToOptions"in e}function dw({type:e,...t}){return Rh(e)&&Dh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class fw extends zs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:s,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,ks(typeof t.type!="string");const l=dw(t);this.animation=uw(n,r,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=Us(i,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(d):aw(n,r,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ut(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ut(t)}get time(){return ut(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ct(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&sw()?(this.animation.timeline=t,lt):n(this)}}const Vh={anticipate:ih,backInOut:rh,circInOut:ah};function hw(e){return e in Vh}function pw(e){typeof e.ease=="string"&&hw(e.ease)&&(e.ease=Vh[e.ease])}const Nh=10;class mw extends fw{constructor(t){pw(t),Mh(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Ws({...a,autoplay:!1}),c=Ct(this.finishedTime??this.time);n.setWithVelocity(s.sample(c-Nh).value,s.sample(c).value,Nh),s.stop()}}const Fh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Yt.test(e)||e==="0")&&!e.startsWith("url("));function gw(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 vw(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Fh(i,t),s=Fh(o,t);return!a||!s?!1:gw(e)||(n==="spring"||Rh(n))&&r}function Zs(e){e.duration=0,e.type="keyframes"}const yw=new Set(["opacity","clipPath","filter","transform"]),bw=Ss(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function _w(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return bw()&&n&&yw.has(n)&&(n!=="transform"||!l)&&!c&&!r&&i!=="mirror"&&o!==0&&a!=="inertia"}const ww=40;class kw extends zs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",keyframes:s,name:c,motionValue:l,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ye.now();const m={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,name:c,motionValue:l,element:d,...f},g=d?.KeyframeResolver||Qs;this.keyframeResolver=new g(s,(y,v,b)=>this.onKeyframesResolved(y,v,m,!b),c,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:a,velocity:s,delay:c,isHandoff:l,onUpdate:d}=r;this.resolvedAt=Ye.now(),vw(t,o,a,s)||((Nt.instantAnimations||!c)&&d?.(Us(t,r,n)),t[0]=t[t.length-1],Zs(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ww?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!l&&_w(m)?new mw({...m,element:m.motionValue.owner.current}):new Ws(m);g.finished.then(()=>this.notifyFinished()).catch(lt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),iw()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Sw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function xw(e){const t=Sw.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Bh(e,t,n=1){const[r,i]=xw(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return Kf(a)?parseFloat(a):a}return Es(i)?Bh(i,t,n+1):i}function ec(e,t){return e?.[t]??e?.default??e}const $h=new Set(["width","height","top","left","right","bottom",...Xn]),Tw={test:e=>e==="auto",parse:e=>e},Uh=e=>t=>t.test(e),zh=[Kn,q,Pt,Kt,g_,m_,Tw],Wh=e=>zh.find(Uh(e));function Mw(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xf(e):!0}const Cw=new Set(["brightness","contrast","saturate","opacity"]);function Pw(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(As)||[];if(!r)return e;const i=n.replace(r,"");let o=Cw.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Ew=/\b([a-z-]*)\(.*?\)/gu,tc={...Yt,getAnimatableNone:e=>{const t=e.match(Ew);return t?t.map(Pw).join(" "):e}},Jh={...Kn,transform:Math.round},nc={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,radius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,backgroundPositionX:q,backgroundPositionY:q,...{rotate:Kt,rotateX:Kt,rotateY:Kt,rotateZ:Kt,scale:no,scaleX:no,scaleY:no,scaleZ:no,skew:Kt,skewX:Kt,skewY:Kt,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:Ir,originX:hh,originY:hh,originZ:q},zIndex:Jh,fillOpacity:Ir,strokeOpacity:Ir,numOctaves:Jh},Aw={...nc,color:Pe,backgroundColor:Pe,outlineColor:Pe,fill:Pe,stroke:Pe,borderColor:Pe,borderTopColor:Pe,borderRightColor:Pe,borderBottomColor:Pe,borderLeftColor:Pe,filter:tc,WebkitFilter:tc},qh=e=>Aw[e];function Hh(e,t){let n=qh(e);return n!==tc&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ow=new Set(["auto","none","0"]);function Iw(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!Ow.has(o)&&jr(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Hh(n,i)}class Dw extends Qs{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),Es(l))){const d=Bh(l,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!$h.has(r)||t.length!==2)return;const[i,o]=t,a=Wh(i),s=Wh(o);if(a!==s)if(Ah(a)&&Ah(s))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else kn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Mw(t[i]))&&r.push(i);r.length&&Iw(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=kn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,a=r[o];r[o]=kn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,c])=>{t.getValue(s).set(c)}),this.resolveNoneKeyframes()}}function Lw(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Gh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function jw(e){return Yf(e)&&"offsetHeight"in e}const Kh=30,Rw=e=>!isNaN(parseFloat(e));class Vw{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=Ye.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Rw(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new xs);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Kh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Kh);return Qf(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zn(e,t){return new Vw(e,t)}const{schedule:rc}=uh(queueMicrotask,!1),wt={x:!1,y:!1};function Yh(){return wt.x||wt.y}function Nw(e){return e==="x"||e==="y"?wt[e]?null:(wt[e]=!0,()=>{wt[e]=!1}):wt.x||wt.y?null:(wt.x=wt.y=!0,()=>{wt.x=wt.y=!1})}function Xh(e,t){const n=Lw(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Qh(e){return!(e.pointerType==="touch"||Yh())}function Fw(e,t,n={}){const[r,i,o]=Xh(e,n),a=s=>{if(!Qh(s))return;const{target:c}=s,l=t(c,s);if(typeof l!="function"||!c)return;const d=f=>{Qh(f)&&(l(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,i)};return r.forEach(s=>{s.addEventListener("pointerenter",a,i)}),o}const Zh=(e,t)=>t?e===t?!0:Zh(e,t.parentElement):!1,ic=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Bw=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $w(e){return Bw.has(e.tagName)||e.tabIndex!==-1}const ao=new WeakSet;function ep(e){return t=>{t.key==="Enter"&&e(t)}}function oc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Uw=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ep(()=>{if(ao.has(n))return;oc(n,"down");const i=ep(()=>{oc(n,"up")}),o=()=>oc(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function tp(e){return ic(e)&&!Yh()}function zw(e,t,n={}){const[r,i,o]=Xh(e,n),a=s=>{const c=s.currentTarget;if(!tp(s))return;ao.add(c);const l=t(c,s),d=(g,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),ao.has(c)&&ao.delete(c),tp(g)&&typeof l=="function"&&l(g,{success:y})},f=g=>{d(g,c===window||c===document||n.useGlobalTarget||Zh(c,g.target))},m=g=>{d(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,i),jw(s)&&(s.addEventListener("focus",l=>Uw(l,i)),!$w(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),o}function np(e){return Yf(e)&&"ownerSVGElement"in e}function Ww(e){return np(e)&&e.tagName==="svg"}const We=e=>!!(e&&e.getVelocity),Jw=[...zh,Pe,Yt],qw=e=>Jw.find(Uh(e)),rp=Ie({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Hw(e=!0){const t=me(bs);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=Oo();ee(()=>{if(e)return i(o)},[e]);const a=N(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const ip=Ie({strict:!1}),op={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},er={};for(const e in op)er[e]={isEnabled:t=>op[e].some(n=>!!t[n])};function Gw(e){for(const t in e)er[t]={...er[t],...e[t]}}const Kw=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 so(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Kw.has(e)}let ap=e=>!so(e);function Yw(e){typeof e=="function"&&(ap=t=>t.startsWith("on")?!so(t):e(t))}try{Yw(require("@emotion/is-prop-valid").default)}catch{}function Xw(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(ap(i)||n===!0&&so(i)||!t&&!so(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const co=Ie({});function lo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Nr(e){return typeof e=="string"||Array.isArray(e)}const ac=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sc=["initial",...ac];function uo(e){return lo(e.animate)||sc.some(t=>Nr(e[t]))}function sp(e){return!!(uo(e)||e.variants)}function Qw(e,t){if(uo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Nr(n)?n:void 0,animate:Nr(r)?r:void 0}}return e.inherit!==!1?t:{}}function Zw(e){const{initial:t,animate:n}=Qw(e,me(co));return Ne(()=>({initial:t,animate:n}),[cp(t),cp(n)])}function cp(e){return Array.isArray(e)?e.join(" "):e}const Fr={};function ek(e){for(const t in e)Fr[t]=e[t],Ps(t)&&(Fr[t].isCSSVariable=!0)}function lp(e,{layout:t,layoutId:n}){return Qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fr[e]||e==="opacity")}const tk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nk=Xn.length;function rk(e,t,n){let r="",i=!0;for(let o=0;o<nk;o++){const a=Xn[o],s=e[a];if(s===void 0)continue;let c=!0;if(typeof s=="number"?c=s===(a.startsWith("scale")?1:0):c=parseFloat(s)===0,!c||n){const l=Gh(s,nc[a]);if(!c){i=!1;const d=tk[a]||a;r+=`${d}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function cc(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const c in t){const l=t[c];if(Qn.has(c)){a=!0;continue}else if(Ps(c)){i[c]=l;continue}else{const d=Gh(l,nc[c]);c.startsWith("origin")?(s=!0,o[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=rk(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:l="50%",originZ:d=0}=o;r.transformOrigin=`${c} ${l} ${d}`}}const lc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function up(e,t,n){for(const r in t)!We(t[r])&&!lp(r,n)&&(e[r]=t[r])}function ik({transformTemplate:e},t){return Ne(()=>{const n=lc();return cc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ok(e,t){const n=e.style||{},r={};return up(r,n,e),Object.assign(r,ik(e,t)),r}function ak(e,t){const n={},r=ok(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 sk={offset:"stroke-dashoffset",array:"stroke-dasharray"},ck={offset:"strokeDashoffset",array:"strokeDasharray"};function lk(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?sk:ck;e[o.offset]=q.transform(-r);const a=q.transform(t),s=q.transform(n);e[o.array]=`${a} ${s}`}function dp(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},c,l,d){if(cc(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=d?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&lk(f,i,o,a,!1)}const fp=()=>({...lc(),attrs:{}}),hp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uk(e,t,n,r){const i=Ne(()=>{const o=fp();return dp(o,t,hp(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};up(o,e.style,e),i.style={...o,...i.style}}return i}const dk=["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 uc(e){return typeof e!="string"||e.includes("-")?!1:!!(dk.indexOf(e)>-1||/[A-Z]/u.test(e))}function fk(e,t,n,{latestValues:r},i,o=!1){const s=(uc(e)?uk:ak)(t,r,i,e),c=Xw(t,typeof e=="string",o),l=e!==Ke?{...c,...s,ref:n}:{},{children:d}=t,f=Ne(()=>We(d)?d.get():d,[d]);return se(e,{...l,children:f})}function pp(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function dc(e,t,n,r){if(typeof t=="function"){const[i,o]=pp(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=pp(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function fo(e){return We(e)?e.get():e}function hk({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:pk(n,r,i,e),renderState:t()}}function pk(e,t,n,r){const i={},o=r(e,{});for(const m in o)i[m]=fo(o[m]);let{initial:a,animate:s}=e;const c=uo(e),l=sp(e);t&&l&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?s:a;if(f&&typeof f!="boolean"&&!lo(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const y=dc(e,m[g]);if(y){const{transitionEnd:v,transition:b,..._}=y;for(const k in _){let C=_[k];if(Array.isArray(C)){const M=d?C.length-1:0;C=C[M]}C!==null&&(i[k]=C)}for(const k in v)i[k]=v[k]}}}return i}const mp=e=>(t,n)=>{const r=me(co),i=me(bs),o=()=>hk(e,t,r,i);return n?o():K0(o)};function fc(e,t,n){const{style:r}=e,i={};for(const o in r)(We(r[o])||t.style&&We(t.style[o])||lp(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}const mk=mp({scrapeMotionValuesFromProps:fc,createRenderState:lc});function gp(e,t,n){const r=fc(e,t,n);for(const i in e)if(We(e[i])||We(t[i])){const o=Xn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const gk=mp({scrapeMotionValuesFromProps:gp,createRenderState:fp}),vk=Symbol.for("motionComponentSymbol");function tr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function yk(e,t,n){return N(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):tr(n)&&(n.current=r))},[t])}const hc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vp="data-"+hc("framerAppearId"),yp=Ie({});function bk(e,t,n,r,i){const{visualElement:o}=me(co),a=me(ip),s=me(bs),c=me(rp).reducedMotion,l=pe(null);r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));const d=l.current,f=me(yp);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&_k(l.current,n,i,f);const m=pe(!1);No(()=>{d&&m.current&&d.update(n,s)});const g=n[vp],y=pe(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Y0(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),y.current&&d.animationState&&d.animationState.animateChanges())}),ee(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),d.enteringChildren=void 0)}),d}function _k(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bp(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&tr(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l})}function bp(e){if(e)return e.options.allowProjection!==!1?e.projection:bp(e.parent)}function pc(e,{forwardMotionProps:t=!1}={},n,r){n&&Gw(n);const i=uc(e)?gk:mk;function o(s,c){let l;const d={...me(rp),...s,layoutId:wk(s)},{isStatic:f}=d,m=Zw(s),g=i(s,f);if(!f&&ys){kk();const y=Sk(d);l=y.MeasureLayout,m.visualElement=bk(e,g,d,r,y.ProjectionNode)}return O(co.Provider,{value:m,children:[l&&m.visualElement?O(l,{visualElement:m.visualElement,...d}):null,fk(e,s,yk(g,m.visualElement,c),g,f,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=rt(o);return a[vk]=e,a}function wk({layoutId:e}){const t=me(Gf).id;return t&&e!==void 0?t+"-"+e:e}function kk(e,t){me(ip).strict}function Sk(e){const{drag:t,layout:n}=er;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function xk(e,t){if(typeof Proxy>"u")return pc;const n=new Map,r=(o,a)=>pc(o,a,e,t),i=(o,a)=>r(o,a);return new Proxy(i,{get:(o,a)=>a==="create"?r:(n.has(a)||n.set(a,pc(a,void 0,e,t)),n.get(a))})}function _p({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Tk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Mk(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function mc(e){return e===void 0||e===1}function gc({scale:e,scaleX:t,scaleY:n}){return!mc(e)||!mc(t)||!mc(n)}function xn(e){return gc(e)||wp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wp(e){return kp(e.x)||kp(e.y)}function kp(e){return e&&e!=="0%"}function ho(e,t,n){const r=e-n,i=t*r;return n+i}function Sp(e,t,n,r,i){return i!==void 0&&(e=ho(e,i,r)),ho(e,n,r)+t}function vc(e,t=0,n=1,r,i){e.min=Sp(e.min,t,n,r,i),e.max=Sp(e.max,t,n,r,i)}function xp(e,{x:t,y:n}){vc(e.x,t.translate,t.scale,t.originPoint),vc(e.y,n.translate,n.scale,n.originPoint)}const Tp=.999999999999,Mp=1.0000000000001;function Ck(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&rr(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,xp(e,a)),r&&xn(o.latestValues)&&rr(e,o.latestValues))}t.x<Mp&&t.x>Tp&&(t.x=1),t.y<Mp&&t.y>Tp&&(t.y=1)}function nr(e,t){e.min=e.min+t,e.max=e.max+t}function Cp(e,t,n,r,i=.5){const o=xe(e.min,e.max,i);vc(e,t,n,o,r)}function rr(e,t){Cp(e.x,t.x,t.scaleX,t.scale,t.originX),Cp(e.y,t.y,t.scaleY,t.scale,t.originY)}function Pp(e,t){return _p(Mk(e.getBoundingClientRect(),t))}function Pk(e,t,n){const r=Pp(e,n),{scroll:i}=t;return i&&(nr(r.x,i.offset.x),nr(r.y,i.offset.y)),r}const Ep=()=>({translate:0,scale:1,origin:0,originPoint:0}),ir=()=>({x:Ep(),y:Ep()}),Ap=()=>({min:0,max:0}),Ce=()=>({x:Ap(),y:Ap()}),yc={current:null},Op={current:!1};function Ek(){if(Op.current=!0,!!ys)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yc.current=e.matches;e.addEventListener("change",t),t()}else yc.current=!1}const Ak=new WeakMap;function Ok(e,t,n){for(const r in t){const i=t[r],o=n[r];if(We(i))e.addValue(r,i);else if(We(o))e.addValue(r,Zn(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,Zn(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ip=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ik{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qs,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=Ye.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ke.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=uo(n),this.isVariantNode=sp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&We(g)&&g.set(c[m])}}mount(t){this.current=t,Ak.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)),Op.current||Ek(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:yc.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Gt(this.notifyUpdate),Gt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Qn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in er){const n=er[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ce()}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<Ip.length;r++){const i=Ip[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Ok(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Zn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Kf(r)||Xf(r))?r=parseFloat(r):!qw(r)&&Yt.test(n)&&(r=Hh(t,n)),this.setBaseTarget(t,We(r)?r.get():r)),We(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=dc(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!We(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new xs),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){rc.render(this.render)}}class Dp extends Ik{constructor(){super(...arguments),this.KeyframeResolver=Dw}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;We(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Lp(e,{style:t,vars:n},r,i){const o=e.style;let a;for(a in t)o[a]=t[a];i?.applyProjectionStyles(o,r);for(a in n)o.setProperty(a,n[a])}function Dk(e){return window.getComputedStyle(e)}class Lk extends Dp{constructor(){super(...arguments),this.type="html",this.renderInstance=Lp}readValueFromInstance(t,n){if(Qn.has(n))return this.projection?.isProjecting?Hs(n):Z_(t,n);{const r=Dk(t),i=(Ps(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Pp(t,n)}build(t,n,r){cc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fc(t,n,r)}}const jp=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 jk(e,t,n,r){Lp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(jp.has(i)?i:hc(i),t.attrs[i])}class Rk extends Dp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ce}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qn.has(n)){const r=qh(n);return r&&r.default||0}return n=jp.has(n)?n:hc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return gp(t,n,r)}build(t,n,r){dp(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){jk(t,n,r,i)}mount(t){this.isSVGTag=hp(t.tagName),super.mount(t)}}const Vk=(e,t)=>uc(e)?new Rk(t):new Lk(t,{allowProjection:e!==Ke});function or(e,t,n){const r=e.getProps();return dc(r,t,n!==void 0?n:r.custom,e)}const bc=e=>Array.isArray(e);function Nk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zn(n))}function Fk(e){return bc(e)?e[e.length-1]||0:e}function Bk(e,t){const n=or(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=Fk(o[a]);Nk(e,a,s)}}function $k(e){return!!(We(e)&&e.add)}function _c(e,t){const n=e.getValue("willChange");if($k(n))return n.add(t);if(!n&&Nt.WillChange){const r=new Nt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Rp(e){return e.props[vp]}const Uk=e=>e!==null;function zk(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Uk),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Wk={type:"spring",stiffness:500,damping:25,restSpeed:10},Jk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qk={type:"keyframes",duration:.8},Hk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gk=(e,{keyframes:t})=>t.length>2?qk:Qn.has(e)?e.startsWith("scale")?Jk(t[1]):Wk:Hk;function Kk({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...d}){return!!Object.keys(d).length}const wc=(e,t,n,r={},i,o)=>a=>{const s=ec(r,e)||{},c=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ct(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:m=>{t.set(m),s.onUpdate&&s.onUpdate(m)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};Kk(s)||Object.assign(d,Gk(e,d)),d.duration&&(d.duration=Ct(d.duration)),d.repeatDelay&&(d.repeatDelay=Ct(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Zs(d),d.delay===0&&(f=!0)),(Nt.instantAnimations||Nt.skipAnimations)&&(f=!0,Zs(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,f&&!o&&t.get()!==void 0){const m=zk(d.keyframes,s);if(m!==void 0){ke.update(()=>{d.onUpdate(m),d.onComplete()});return}}return s.isSync?new Ws(d):new kw(d)};function Yk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Vp(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(o=r);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const d in s){const f=e.getValue(d,e.latestValues[d]??null),m=s[d];if(m===void 0||l&&Yk(l,d))continue;const g={delay:n,...ec(o||{},d)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(m)&&m===y&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const _=Rp(e);if(_){const k=window.MotionHandoffAnimation(_,d,ke);k!==null&&(g.startTime=k,v=!0)}}_c(e,d),f.start(wc(d,f,m,e.shouldReduceMotion&&$h.has(d)?{type:!1}:g,e,v));const b=f.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{ke.update(()=>{a&&Bk(e,a)})}),c}function Np(e,t,n,r=0,i=1){const o=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(o,a):i===1?o*r:s-o*r}function kc(e,t,n={}){const r=or(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Vp(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=i;return Xk(e,t,c,l,d,f,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[c,l]=s==="beforeChildren"?[o,a]:[a,o];return c().then(()=>l())}else return Promise.all([o(),a(n.delay)])}function Xk(e,t,n=0,r=0,i=0,o=1,a){const s=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),s.push(kc(c,t,{...a,delay:n+(typeof r=="function"?0:r)+Np(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(s)}function Qk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>kc(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=kc(e,t,n);else{const i=typeof t=="function"?or(e,t,n.custom):t;r=Promise.all(Vp(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Fp(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 Zk=sc.length;function Bp(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Bp(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Zk;n++){const r=sc[n],i=e.props[r];(Nr(i)||i===!1)&&(t[r]=i)}return t}const eS=[...ac].reverse(),tS=ac.length;function nS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Qk(e,n,r)))}function rS(e){let t=nS(e),n=$p(),r=!0;const i=c=>(l,d)=>{const f=or(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:m,transitionEnd:g,...y}=f;l={...l,...y,...g}}return l};function o(c){t=c(e)}function a(c){const{props:l}=e,d=Bp(e.parent)||{},f=[],m=new Set;let g={},y=1/0;for(let b=0;b<tS;b++){const _=eS[b],k=n[_],C=l[_]!==void 0?l[_]:d[_],M=Nr(C),x=_===c?k.isActive:null;x===!1&&(y=b);let T=C===d[_]&&C!==l[_]&&M;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),k.protectedKeys={...g},!k.isActive&&x===null||!C&&!k.prevProp||lo(C)||typeof C=="boolean")continue;const E=iS(k.prevProp,C);let A=E||_===c&&k.isActive&&!T&&M||b>y&&M,R=!1;const B=Array.isArray(C)?C:[C];let V=B.reduce(i(_),{});x===!1&&(V={});const{prevResolvedValues:W={}}=k,j={...W,...V},X=Y=>{A=!0,m.has(Y)&&(R=!0,m.delete(Y)),k.needsAnimating[Y]=!0;const F=e.getValue(Y);F&&(F.liveStyle=!1)};for(const Y in j){const F=V[Y],U=W[Y];if(g.hasOwnProperty(Y))continue;let H=!1;bc(F)&&bc(U)?H=!Fp(F,U):H=F!==U,H?F!=null?X(Y):m.add(Y):F!==void 0&&m.has(Y)?X(Y):k.protectedKeys[Y]=!0}k.prevProp=C,k.prevResolvedValues=V,k.isActive&&(g={...g,...V}),r&&e.blockInitialAnimation&&(A=!1);const le=T&&E;A&&(!le||R)&&f.push(...B.map(Y=>{const F={type:_};if(typeof Y=="string"&&r&&!le&&e.manuallyAnimateOnMount&&e.parent){const{parent:U}=e,H=or(U,Y);if(U.enteringChildren&&H){const{delayChildren:Oe}=H.transition||{};F.delay=Np(U.enteringChildren,e,Oe)}}return{animation:Y,options:F}}))}if(m.size){const b={};if(typeof l.initial!="boolean"){const _=or(e,Array.isArray(l.initial)?l.initial[0]:l.initial);_&&_.transition&&(b.transition=_.transition)}m.forEach(_=>{const k=e.getBaseTarget(_),C=e.getValue(_);C&&(C.liveStyle=!0),b[_]=k??null}),f.push({animation:b})}let v=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function s(c,l){if(n[c].isActive===l)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=$p()}}}function iS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Fp(t,e):!1}function Tn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $p(){return{animate:Tn(!0),whileInView:Tn(),whileHover:Tn(),whileTap:Tn(),whileDrag:Tn(),whileFocus:Tn(),exit:Tn()}}class Xt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class oS extends Xt{constructor(t){super(t),t.animationState||(t.animationState=rS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();lo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let aS=0;class sS extends Xt{constructor(){super(...arguments),this.id=aS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const cS={animation:{Feature:oS},exit:{Feature:sS}};function Br(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function $r(e){return{point:{x:e.pageX,y:e.pageY}}}const lS=e=>t=>ic(t)&&e(t,$r(t));function Ur(e,t,n,r){return Br(e,t,lS(n),r)}const Up=1e-4,uS=1-Up,dS=1+Up,zp=.01,fS=0-zp,hS=0+zp;function Ge(e){return e.max-e.min}function pS(e,t,n){return Math.abs(e-t)<=n}function Wp(e,t,n,r=.5){e.origin=r,e.originPoint=xe(t.min,t.max,e.origin),e.scale=Ge(n)/Ge(t),e.translate=xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=uS&&e.scale<=dS||isNaN(e.scale))&&(e.scale=1),(e.translate>=fS&&e.translate<=hS||isNaN(e.translate))&&(e.translate=0)}function zr(e,t,n,r){Wp(e.x,t.x,n.x,r?r.originX:void 0),Wp(e.y,t.y,n.y,r?r.originY:void 0)}function Jp(e,t,n){e.min=n.min+t.min,e.max=e.min+Ge(t)}function mS(e,t,n){Jp(e.x,t.x,n.x),Jp(e.y,t.y,n.y)}function qp(e,t,n){e.min=t.min-n.min,e.max=e.min+Ge(t)}function Wr(e,t,n){qp(e.x,t.x,n.x),qp(e.y,t.y,n.y)}function dt(e){return[e("x"),e("y")]}const Hp=({current:e})=>e?e.ownerDocument.defaultView:null,Gp=(e,t)=>Math.abs(e-t);function gS(e,t){const n=Gp(e.x,t.x),r=Gp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Kp{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=xc(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=gS(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:v}=m,{timestamp:b}=Ve;this.history.push({...v,timestamp:b});const{onStart:_,onMove:k}=this.handlers;g||(_&&_(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Sc(g,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=xc(m.type==="pointercancel"?this.lastMoveEventInfo:Sc(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,_),v&&v(m,_)},!ic(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const s=$r(t),c=Sc(s,this.transformPagePoint),{point:l}=c,{timestamp:d}=Ve;this.history=[{...l,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,xc(c,this.history)),this.removeListeners=Er(Ur(this.contextWindow,"pointermove",this.handlePointerMove),Ur(this.contextWindow,"pointerup",this.handlePointerUp),Ur(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Gt(this.updatePoint)}}function Sc(e,t){return t?{point:t(e.point)}:e}function Yp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xc({point:e},t){return{point:e,delta:Yp(e,Xp(t)),offset:Yp(e,vS(t)),velocity:yS(t,.1)}}function vS(e){return e[0]}function Xp(e){return e[e.length-1]}function yS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Xp(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ct(t)));)n--;if(!r)return{x:0,y:0};const o=ut(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function bS(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?xe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?xe(n,e,r.max):Math.min(e,n)),e}function Qp(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 _S(e,{top:t,left:n,bottom:r,right:i}){return{x:Qp(e.x,n,i),y:Qp(e.y,t,r)}}function Zp(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 wS(e,t){return{x:Zp(e.x,t.x),y:Zp(e.y,t.y)}}function kS(e,t){let n=.5;const r=Ge(e),i=Ge(t);return i>r?n=Ar(t.min,t.max-r,e.min):r>i&&(n=Ar(e.min,e.max-i,t.min)),Vt(0,1,n)}function SS(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 Tc=.35;function xS(e=Tc){return e===!1?e=0:e===!0&&(e=Tc),{x:em(e,"left","right"),y:em(e,"top","bottom")}}function em(e,t,n){return{min:tm(e,t),max:tm(e,n)}}function tm(e,t){return typeof e=="number"?e:e[t]||0}const TS=new WeakMap;class MS{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=Ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($r(f).point)},a=(f,m)=>{const{drag:g,dragPropagation:y,onDragStart:v}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Nw(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dt(_=>{let k=this.getAxisMotionValue(_).get()||0;if(Pt.test(k)){const{projection:C}=this.visualElement;if(C&&C.layout){const M=C.layout.layoutBox[_];M&&(k=Ge(M)*(parseFloat(k)/100))}}this.originPoint[_]=k}),v&&ke.postRender(()=>v(f,m)),_c(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:v,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:_}=m;if(y&&this.currentDirection===null){this.currentDirection=CS(_),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",m.point,_),this.updateAxis("y",m.point,_),this.visualElement.render(),b&&b(f,m)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>dt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Kp(t,{onSessionStart:o,onStart:a,onMove:s,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Hp(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&ke.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!po(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=bS(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&tr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=_S(r.layoutBox,t):this.constraints=!1,this.elastic=xS(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=SS(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Pk(r,i.root,this.visualElement.getTransformPagePoint());let a=wS(i.layout.layoutBox,o);if(n){const s=n(Tk(a));this.hasMutatedConstraints=!!s,s&&(a=_p(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=dt(d=>{if(!po(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return _c(this.visualElement,t),r.start(wc(t,r,0,n,this.visualElement,!1))}stopAnimation(){dt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dt(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){dt(n=>{const{drag:r}=this.getProps();if(!po(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-xe(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!tr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};dt(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const c=s.get();i[a]=kS({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),dt(a=>{if(!po(a,t,null))return;const s=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];s.set(xe(c,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;TS.set(this.visualElement,this);const t=this.visualElement.current,n=Ur(t,"pointerdown",c=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();tr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ke.read(r);const a=Br(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(dt(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=Tc,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function po(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function CS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class PS extends Xt{constructor(t){super(t),this.removeGroupControls=lt,this.removeListeners=lt,this.controls=new MS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const nm=e=>(t,n)=>{e&&ke.postRender(()=>e(t,n))};class ES extends Xt{constructor(){super(...arguments),this.removePointerDownListener=lt}onPointerDown(t){this.session=new Kp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Hp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:nm(t),onStart:nm(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&ke.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=Ur(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 mo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Jr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(q.test(e))e=parseFloat(e);else return e;const n=rm(e,t.target.x),r=rm(e,t.target.y);return`${n}% ${r}%`}},AS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Yt.parse(e);if(i.length>5)return r;const o=Yt.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=c;const l=xe(s,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}};let Mc=!1;class OS extends pt{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ek(IS),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Mc&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),mo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:a}=r;return a&&(a.isPresent=o,Mc=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ke.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),rc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Mc=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function im(e){const[t,n]=Hw(),r=me(Gf);return O(OS,{...e,layoutGroup:r,switchLayoutGroup:me(yp),isPresent:t,safeToRemove:n})}const IS={borderRadius:{...Jr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Jr,borderTopRightRadius:Jr,borderBottomLeftRadius:Jr,borderBottomRightRadius:Jr,boxShadow:AS};function DS(e,t,n){const r=We(e)?e:Zn(e);return r.start(wc("",r,t,n)),r.animation}const LS=(e,t)=>e.depth-t.depth;class jS{constructor(){this.children=[],this.isDirty=!1}add(t){_s(this.children,t),this.isDirty=!0}remove(t){ws(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LS),this.isDirty=!1,this.children.forEach(t)}}function RS(e,t){const n=Ye.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Gt(r),e(o-t))};return ke.setup(r,!0),()=>Gt(r)}const om=["TopLeft","TopRight","BottomLeft","BottomRight"],VS=om.length,am=e=>typeof e=="string"?parseFloat(e):e,sm=e=>typeof e=="number"||q.test(e);function NS(e,t,n,r,i,o){i?(e.opacity=xe(0,n.opacity??1,FS(r)),e.opacityExit=xe(t.opacity??1,0,BS(r))):o&&(e.opacity=xe(t.opacity??1,n.opacity??1,r));for(let a=0;a<VS;a++){const s=`border${om[a]}Radius`;let c=cm(t,s),l=cm(n,s);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||sm(c)===sm(l)?(e[s]=Math.max(xe(am(c),am(l),r),0),(Pt.test(l)||Pt.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=xe(t.rotate||0,n.rotate||0,r))}function cm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const FS=lm(0,.5,oh),BS=lm(.5,.95,lt);function lm(e,t,n){return r=>r<e?0:r>t?1:n(Ar(e,t,r))}function um(e,t){e.min=t.min,e.max=t.max}function ft(e,t){um(e.x,t.x),um(e.y,t.y)}function dm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function fm(e,t,n,r,i){return e-=t,e=ho(e,1/n,r),i!==void 0&&(e=ho(e,1/i,r)),e}function $S(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pt.test(t)&&(t=parseFloat(t),t=xe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=xe(o.min,o.max,r);e===o&&(s-=t),e.min=fm(e.min,t,n,s,i),e.max=fm(e.max,t,n,s,i)}function hm(e,t,[n,r,i],o,a){$S(e,t[n],t[r],t[i],t.scale,o,a)}const US=["x","scaleX","originX"],zS=["y","scaleY","originY"];function pm(e,t,n,r){hm(e.x,t,US,n?n.x:void 0,r?r.x:void 0),hm(e.y,t,zS,n?n.y:void 0,r?r.y:void 0)}function mm(e){return e.translate===0&&e.scale===1}function gm(e){return mm(e.x)&&mm(e.y)}function vm(e,t){return e.min===t.min&&e.max===t.max}function WS(e,t){return vm(e.x,t.x)&&vm(e.y,t.y)}function ym(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function bm(e,t){return ym(e.x,t.x)&&ym(e.y,t.y)}function _m(e){return Ge(e.x)/Ge(e.y)}function wm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class JS{constructor(){this.members=[]}add(t){_s(this.members,t),t.scheduleRender()}remove(t){if(ws(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qS(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:d,rotateX:f,rotateY:m,skewX:g,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Cc=["","X","Y","Z"],HS=1e3;let GS=0;function Pc(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function km(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Rp(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&km(r)}function Sm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t?.()){this.id=GS++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(XS),this.nodes.forEach(t1),this.nodes.forEach(n1),this.nodes.forEach(QS)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new jS)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new xs),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const c=this.eventHandlers.get(a);c&&c.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=np(a)&&!Ww(a),this.instance=a;const{layoutId:s,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||s)&&(this.isLayoutDirty=!0),e){let d,f=0;const m=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{f=window.innerWidth}),e(a,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,d&&d(),d=RS(m,250),mo.hasAnimatedSinceResize&&(mo.hasAnimatedSinceResize=!1,this.nodes.forEach(Mm)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&l&&(s||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||s1,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=l.getProps(),_=!this.targetLayout||!bm(this.targetLayout,g),k=!f&&m;if(this.options.layoutRoot||this.resumeFrom||k||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...ec(y,"layout"),onPlay:v,onComplete:b};(l.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(d,k)}else f||Mm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(r1),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&km(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(xm);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Tm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(e1),this.nodes.forEach(KS),this.nodes.forEach(YS)):this.nodes.forEach(Tm),this.clearAllSnapshots();const s=Ye.now();Ve.delta=Vt(0,16.666666666666668,s-Ve.timestamp),Ve.timestamp=s,Ve.isProcessing=!0,Cs.update.process(Ve),Cs.preRender.process(Ve),Cs.render.process(Ve),Ve.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ZS),this.sharedNodes.forEach(i1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ge(this.snapshot.measuredBox.x)&&!Ge(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ce(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!gm(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;a&&this.instance&&(s||xn(this.latestValues)||d)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return a&&(c=this.removeTransform(c)),c1(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Ce();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(l1))){const{scroll:l}=this.root;l&&(nr(s.x,l.offset.x),nr(s.y,l.offset.y))}return s}removeElementScroll(a){const s=Ce();if(ft(s,a),this.scroll?.wasRoot)return s;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ft(s,a),nr(s.x,d.offset.x),nr(s.y,d.offset.y))}return s}applyTransform(a,s=!1){const c=Ce();ft(c,a);for(let l=0;l<this.path.length;l++){const d=this.path[l];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&rr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),xn(d.latestValues)&&rr(c,d.latestValues)}return xn(this.latestValues)&&rr(c,this.latestValues),c}removeTransform(a){const s=Ce();ft(s,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!xn(l.latestValues))continue;gc(l.latestValues)&&l.updateSnapshot();const d=Ce(),f=l.measurePageBox();ft(d,f),pm(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return xn(this.latestValues)&&pm(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ve.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==s;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Ve.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),Wr(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),ft(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ce(),this.targetWithTransforms=Ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ft(this.target,this.layout.layoutBox),xp(this.target,this.targetDelta)):ft(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),Wr(this.relativeTargetOrigin,this.target,m.target),ft(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||gc(this.parent.latestValues)||wp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ve.timestamp&&(c=!1),c)return;const{layout:l,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||d))return;ft(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Ck(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ce());const{target:g}=a;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(dm(this.prevProjectionDelta.x,this.projectionDelta.x),dm(this.prevProjectionDelta.y,this.projectionDelta.y)),zr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!wm(this.projectionDelta.x,this.prevProjectionDelta.x)||!wm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ir(),this.projectionDelta=ir(),this.projectionDeltaWithTransform=ir()}setAnimationOrigin(a,s=!1){const c=this.snapshot,l=c?c.latestValues:{},d={...this.latestValues},f=ir();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const m=Ce(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=g!==y,b=this.getStack(),_=!b||b.members.length<=1,k=!!(v&&!_&&this.options.crossfade===!0&&!this.path.some(a1));this.animationProgress=0;let C;this.mixTargetDelta=M=>{const x=M/1e3;Cm(f.x,a.x,x),Cm(f.y,a.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),o1(this.relativeTarget,this.relativeTargetOrigin,m,x),C&&WS(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Ce()),ft(C,this.relativeTarget)),v&&(this.animationValues=d,NS(d,l,this.latestValues,x,k,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{mo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zn(0)),this.currentAnimation=DS(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(HS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:c,layout:l,latestValues:d}=a;if(!(!s||!c||!l)){if(this!==a&&this.layout&&l&&Im(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ce();const f=Ge(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const m=Ge(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}ft(s,c),rr(s,d),zr(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new JS),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const l={};c.z&&Pc("z",a,l,this.animationValues);for(let d=0;d<Cc.length;d++)Pc(`rotate${Cc[d]}`,a,l,this.animationValues),Pc(`skew${Cc[d]}`,a,l,this.animationValues);a.render();for(const d in l)a.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=fo(s?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=fo(s?.pointerEvents)||""),this.hasProjected&&!xn(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=qS(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),a.transform=f;const{x:m,y:g}=this.projectionDelta;a.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,l.animationValues?a.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const y in Fr){if(d[y]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:_}=Fr[y],k=f==="none"?d[y]:v(d[y],l);if(b){const C=b.length;for(let M=0;M<C;M++)a[b[M]]=k}else _?this.options.visualElement.renderState.vars[y]=k:a[y]=k}this.options.layoutId&&(a.pointerEvents=l===this?fo(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(xm),this.root.sharedNodes.clear()}}}function KS(e){e.updateLayout()}function YS(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?dt(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],m=Ge(f);f.min=n[d].min,f.max=f.min+m}):Im(i,t.layoutBox,n)&&dt(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],m=Ge(n[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=ir();zr(a,n,t.layoutBox);const s=ir();o?zr(s,e.applyTransform(r,!0),t.measuredBox):zr(s,n,t.layoutBox);const c=!gm(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const g=Ce();Wr(g,t.layoutBox,f.layoutBox);const y=Ce();Wr(y,n,m.layoutBox),bm(g,y)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function XS(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function QS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ZS(e){e.clearSnapshot()}function xm(e){e.clearMeasurements()}function Tm(e){e.isLayoutDirty=!1}function e1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function t1(e){e.resolveTargetDelta()}function n1(e){e.calcProjection()}function r1(e){e.resetSkewAndRotation()}function i1(e){e.removeLeadSnapshot()}function Cm(e,t,n){e.translate=xe(t.translate,0,n),e.scale=xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Pm(e,t,n,r){e.min=xe(t.min,n.min,r),e.max=xe(t.max,n.max,r)}function o1(e,t,n,r){Pm(e.x,t.x,n.x,r),Pm(e.y,t.y,n.y,r)}function a1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const s1={duration:.45,ease:[.4,0,.1,1]},Em=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Am=Em("applewebkit/")&&!Em("chrome/")?Math.round:lt;function Om(e){e.min=Am(e.min),e.max=Am(e.max)}function c1(e){Om(e.x),Om(e.y)}function Im(e,t,n){return e==="position"||e==="preserve-aspect"&&!pS(_m(t),_m(n),.2)}function l1(e){return e!==e.root&&e.scroll?.wasRoot}const u1=Sm({attachResizeListener:(e,t)=>Br(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ec={current:void 0},Dm=Sm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ec.current){const e=new u1({});e.mount(window),e.setOptions({layoutScroll:!0}),Ec.current=e}return Ec.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),d1={pan:{Feature:ES},drag:{Feature:PS,ProjectionNode:Dm,MeasureLayout:im}};function Lm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&ke.postRender(()=>o(t,$r(t)))}class f1 extends Xt{mount(){const{current:t}=this.node;t&&(this.unmount=Fw(t,(n,r)=>(Lm(this.node,r,"Start"),i=>Lm(this.node,i,"End"))))}unmount(){}}class h1 extends Xt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Er(Br(this.node.current,"focus",()=>this.onFocus()),Br(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function jm(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&ke.postRender(()=>o(t,$r(t)))}class p1 extends Xt{mount(){const{current:t}=this.node;t&&(this.unmount=zw(t,(n,r)=>(jm(this.node,r,"Start"),(i,{success:o})=>jm(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ac=new WeakMap,Oc=new WeakMap,m1=e=>{const t=Ac.get(e.target);t&&t(e)},g1=e=>{e.forEach(m1)};function v1({root:e,...t}){const n=e||document;Oc.has(n)||Oc.set(n,{});const r=Oc.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(g1,{root:e,...t})),r[i]}function y1(e,t,n){const r=v1(t);return Ac.set(e,n),r.observe(e),()=>{Ac.delete(e),r.unobserve(e)}}const b1={some:0,all:1};class _1 extends Xt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:b1[i]},s=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),m=l?d:f;m&&m(c)};return y1(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(w1(t,n))&&this.startObserver()}unmount(){}}function w1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const k1={...cS,...{inView:{Feature:_1},tap:{Feature:p1},focus:{Feature:h1},hover:{Feature:f1}},...d1,...{layout:{ProjectionNode:Dm,MeasureLayout:im}}},go=xk(k1,Vk);function S1(){const{agentData:e}=Gn(),[t,n]=Z(0),r=96,i=1e4,{isMobileDevice:o}=vs();ee(()=>{const s=Date.now(),c=()=>{const l=Date.now()-s,d=Math.min(l/i*100,r);n(d),d<r&&requestAnimationFrame(c)};requestAnimationFrame(c)},[]);const a=e?.image_url;return O("div",{className:"absolute inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute inset-0 w-full h-full bg-black"}),a&&O("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center scale-125",style:{backgroundImage:`url(${a})`,filter:"blur(25px) brightness(0.5)"}}),O(go.div,{initial:{filter:"blur(12px)",opacity:0},animate:{filter:"blur(0px)",opacity:1},transition:{duration:.2,ease:"easeOut"},className:`absolute inset-0 w-full h-full flex flex-col items-center justify-center ${o?"pb-6 px-4":"pb-4 px-8 "}`,children:O("div",{className:"flex flex-col items-center text-white",children:[O("h2",{className:"text-lg font-medium mb-2 text-center",children:"You're about to speak with an AI."}),O("div",{className:"w-25 h-3 bg-white/30 rounded-full overflow-hidden mb-6",children:O("div",{className:"h-full bg-white rounded-full transition-all duration-100 ease-linear",style:{width:`${t}%`}})}),O("div",{className:"flex justify-center",children:O("span",{className:"font-light text-xs text-center text-white",children:["This call may be recorded and shared with our service providers."," ",O("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline decoration-white/50 hover:text-white transition-colors",children:"Learn more"})]})})]})})]})}const x1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),T1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Rm=e=>{const t=T1(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),M1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var C1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const P1=rt(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},c)=>se("svg",{ref:c,...C1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Vm("lucide",i),...!o&&!M1(s)&&{"aria-hidden":"true"},...s},[...a.map(([l,d])=>se(l,d)),...Array.isArray(o)?o:[o]]));const qr=(e,t)=>{const n=rt(({className:r,...i},o)=>se(P1,{ref:o,iconNode:t,className:Vm(`lucide-${x1(Rm(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Rm(e),n};const E1=qr("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const A1=qr("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const O1=qr("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const I1=qr("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);const Nm=qr("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);function Ic({msg:e,isError:t=!1,showSpinner:n=!1}){return O("div",{className:"absolute top-2 left-2 right-15 flex items-center justify-between z-10 text-white/75",children:O("div",{className:`${t?"bg-red-600/25":"bg-gray-600/25"} backdrop-blur-sm rounded-2xl py-2.5 px-4 flex-1 shadow-inset-white-10 flex items-center gap-2`,children:[n&&O(O1,{className:"animate-spin",size:16}),O("p",{className:"text-sm font-normal",children:e||"An error occurred. Please try again."})]})})}function D1(){const{agentData:e}=Gn(),{errorMsg:t,resetErrors:n}=Zi(),{resetDailyState:r}=Rt(),i=e?.image_url,o=()=>{r(),n()};return O("div",{className:"fixed inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute w-full h-full bg-black"}),i&&O("div",{className:"absolute w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${i})`,filter:"blur(25px) brightness(0.5)"}}),O(Ic,{msg:t,isError:!0}),O("button",{onClick:o,className:"absolute flex items-center justify-center","aria-label":"Play video",children:O("span",{className:"opacity-100 hover:opacity-80 transition-opacity cursor-pointer",children:O(Nm,{size:40,fill:"white",color:"none"})})})]})}const Fm=Ie(void 0);function L1({children:e}){const[t,n]=Z(""),[r,i]=Z(""),{hasJoinedRoom:o}=Rt(),{hasUserInteracted:a}=Pr(),s=ms(),c=yn({filter:"remote"}),l=pe(!1),d="hello",f=()=>{l.current=!1};return ee(()=>{if(c.length>0&&o&&a&&!l.current){l.current=!0;let g;r?(n(r),g=r):g=d,s({event:"chat-msg",message:g,name:"Guest"},"*"),i("")}},[r,o,c,a,l]),O(Fm.Provider,{value:{lastMessage:t,setLastMessage:n,queuedMessage:r,setQueuedMessage:i,resetInitMsg:f},children:e})}function Bm(){const e=me(Fm);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e}function j1({title:e,titleId:t,...n},r){return se("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?se("title",{id:t},e):null,se("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),se("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const R1=rt(j1);function V1({title:e,titleId:t,...n},r){return se("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?se("title",{id:t},e):null,se("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM12.95 3.05a.75.75 0 1 0-1.06 1.06 5.5 5.5 0 0 1 0 7.78.75.75 0 1 0 1.06 1.06 7 7 0 0 0 0-9.9Z"}),se("path",{d:"M10.828 5.172a.75.75 0 1 0-1.06 1.06 2.5 2.5 0 0 1 0 3.536.75.75 0 1 0 1.06 1.06 4 4 0 0 0 0-5.656Z"}))}const N1=rt(V1);function F1({title:e,titleId:t,...n},r){return se("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?se("title",{id:t},e):null,se("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22 1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94l-1.22-1.22Z"}))}const B1=rt(F1);function $1({title:e,titleId:t,...n},r){return se("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?se("title",{id:t},e):null,se("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"}))}const $m=rt($1),U1=rt(function({title:t,titleId:n,...r},i){return O("svg",{ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-labelledby":n,...r,children:[t?O("title",{id:n,children:t}):null,O("path",{d:"M3.33157 2.40868C3.66659 2.09013 4.19642 2.10349 4.51497 2.43851L17.0321 15.6032C17.3507 15.9382 17.3373 16.4681 17.0023 16.7866C16.6673 17.1051 16.1374 17.0918 15.8189 16.7568L3.30173 3.59208C2.98318 3.25705 2.99654 2.72722 3.33157 2.40868Z",fill:"currentColor"}),O("path",{d:"M4.6877 7.8125C5.20547 7.8125 5.6252 8.23223 5.6252 8.75C5.6252 11.1662 7.58395 13.125 10.0002 13.125C10.7088 13.125 11.3769 12.9543 11.9689 12.6553L13.301 14.0566C12.5948 14.4968 11.7951 14.8007 10.9377 14.9297V16.875H12.8127C13.3305 16.875 13.7502 17.2947 13.7502 17.8125C13.7502 18.3303 13.3305 18.75 12.8127 18.75H7.1877C6.66993 18.75 6.2502 18.3303 6.2502 17.8125C6.2502 17.2947 6.66993 16.875 7.1877 16.875H9.0627V14.9297C6.05569 14.4773 3.7502 11.8831 3.7502 8.75C3.7502 8.23223 4.16993 7.8125 4.6877 7.8125Z",fill:"currentColor"}),O("path",{d:"M15.3127 7.8125C15.8305 7.8125 16.2502 8.23223 16.2502 8.75C16.2502 9.94681 15.9127 11.0644 15.3293 12.0146L13.9709 10.5859C14.2295 10.0275 14.3752 9.4059 14.3752 8.75C14.3752 8.23223 14.7949 7.8125 15.3127 7.8125Z",fill:"currentColor"}),O("path",{d:"M10.5676 11.1826C10.3851 11.225 10.1956 11.25 10.0002 11.25C8.61949 11.25 7.5002 10.1307 7.5002 8.75V7.95508L10.5676 11.1826Z",fill:"currentColor"}),O("path",{d:"M10.0002 1.25C11.3809 1.25 12.5002 2.36929 12.5002 3.75V8.75C12.5002 8.8421 12.4943 8.93294 12.4846 9.02246L7.5002 3.78027V3.75C7.5002 2.36929 8.61949 1.25 10.0002 1.25Z",fill:"currentColor"})]})}),z1=5e3,Um="/change";function W1({onClose:e}){const[t,n]=Z(0),{lastMessage:r,setLastMessage:i,setQueuedMessage:o}=Bm(),{isMicMuted:a,setIsMicMuted:s,isAudioMuted:c,setIsAudioMuted:l}=gs(),{setHasUserInteracted:d}=Pr(),{hasJoinedRoom:f,isAgentVideoReady:m,setIsImageChangeRequested:g}=Rt(),y=ms(),v=yn({filter:"remote"}),[b,_]=Z(""),[k,C]=Z(40),[M,x]=Z(!1),T=pe(null),E=pe(null),[A]=Z(!1),[R,B]=Z(!1),[V,W]=Z(!1),{isMobileDevice:j}=vs();ee(()=>{if(!r){x(!1);return}return v.length>0&&m&&(x(!0),W(!1)),E.current!==null&&clearTimeout(E.current),E.current=window.setTimeout(()=>{W(!0),E.current=null},z1),()=>{E.current!==null&&(clearTimeout(E.current),E.current=null)}},[t,r,v,m]),ee(()=>{if(T.current&&b){T.current.style.height="auto";const U=T.current.scrollHeight,H=Math.min(U,128);T.current.style.height=`${U}px`,C(H)}else T.current&&!b&&(T.current.style.height="40px",C(40))},[b]);const X=()=>{if(d(!0),b.trim()){const U=b.trim();_(""),f&&v.length>0?(y({event:"chat-msg",message:U,name:"Guest"},"*"),U.toLowerCase().startsWith(Um)?g(!0):(i(U),n(H=>H+1))):U.toLowerCase().startsWith(Um)||o(U)}else _("")},le=U=>{const H=U.target;_(H.value)},_e=U=>{U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),X())},Y=async()=>{d(!0),s(!a)},F=()=>{l(!c)};return O(Ke,{children:[M&&O("div",{className:"absolute left-2 right-2 flex justify-center z-10",style:{bottom:`${k+24}px`},children:O("div",{onAnimationEnd:()=>{V&&(x(!1),W(!1),i(""))},style:{animation:V?"fadeOutUp 0.2s ease-out forwards":"fadeInUp 0.2s ease-out forwards"},className:`mx-auto flex bg-black/20 backdrop-blur-xl text-white rounded-2xl px-3 py-2
|
|
36
|
-
text-sm break-all text-center
|
|
37
|
-
line-clamp-2`,children:r},t)}),O("div",{className:"absolute bottom-0 left-0 right-0 p-2 flex items-end gap-1 pt-4",children:[O("div",{class:"absolute w-full h-full left-0 right-0 pointer-events-none bottom-0 z-0",children:[O("div",{class:"absolute inset-0 backdrop-blur-[1px] mask-[linear-gradient(rgba(0,0,0,0),rgba(0,0,0,1)_10%,rgba(0,0,0,1)_30%,rgba(0,0,0,0)_40%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[2px] mask-[linear-gradient(rgba(0,0,0,0)_10%,rgba(0,0,0,1)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,0)_50%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[4px] mask-[linear-gradient(rgba(0,0,0,0)_15%,rgba(0,0,0,1)_30%,rgba(0,0,0,1)_50%,rgba(0,0,0,0)_60%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[8px] mask-[linear-gradient(rgba(0,0,0,0)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,0)_70%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[16px] mask-[linear-gradient(rgba(0,0,0,0)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,1)_80%,rgba(0,0,0,0)_90%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[32px] mask-[linear-gradient(rgba(0,0,0,0)_60%,rgba(0,0,0,1)_80%)]"}),O("div",{class:"absolute inset-0 z-10 backdrop-blur-[64px] mask-[linear-gradient(rgba(0,0,0,0)_70%,rgba(0,0,0,1)_100%)]"}),O("div",{class:"absolute inset-0 bg-[linear-gradient(transparent,#000000)]"})]}),O(go.div,{className:`flex items-center w-full z-10 ${j?"justify-between":""}`,children:[!j&&O(go.div,{layout:!0,className:"flex-1",children:O("div",{className:`
|
|
35
|
+
Passed callback for '`.concat(t,"' event is NOT registered."),n),l(!0);return}d.current++;var m=setTimeout(function(){d.current=0},50);return a(t,n,f),function(){clearTimeout(m),o(t,f)}}},[n,t,f,c,o,a]),Xe({event:t,eventId:f,isBlocked:c,callback:n})};function _t(e,t){var n,r;if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!_t(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(y,v){return _t(y,t.getTracks()[v])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var o=Array.from(e).sort(),a=Array.from(t).sort();return o.every(function(y,v){return _t(y,a[v])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=wf(e.entries()),c=s.next();!c.done;c=s.next()){var l=ye(c.value,2),d=l[0],f=l[1];if(!t.has(d)||!_t(f,t.get(d)))return!1}}catch(y){n={error:y}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(nt(e)!=="object"||e===null||nt(t)!=="object"||t===null)return!1;var m=Object.keys(e),g=Object.keys(t);if(m.length!==g.length)return!1;for(var i=0;i<m.length;i++){var d=m[i];if(!Object.prototype.hasOwnProperty.call(t,d)||!_t(e[d],t[d]))return!1}return!0}function es(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n],o=r!==null&&nt(r)==="object",a=i!==null&&nt(i)==="object";if(o||a){if(!_t(r,i))return!1}else if(r!==i)return!1}return!0}function he(e){return"daily-react-"+e}function ts(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=ie(function(o){var a=e.get(r)(o),s=n.get(r);return s!=null&&e.equals(a,s)?s:(n.set(r,a),a)});t.set(r,i)}return t.get(r)}}var ns="::",Sf=";",rs=function(t,n){return t+ns+n},c0=function(t,n){return t+ns+n.join(Sf)},ze=function(t,n){return is(rs(t,n))},Jn=dr(function(e){var t=ie([]);return t.debugLabel=he("participant-property-paths-".concat(e)),t}),is=dr(function(e){var t=ie(null);return t.debugLabel=he("participant-property-".concat(e)),t}),l0=ts({equals:es,get:function(t){return function(n){var r=ye(t.split(ns),2),i=r[0],o=r[1],a=o.split(Sf);return a.map(function(s){return n(ze(i,s))})}}}),xf=function(t,n){var r,i=Zt(Array.isArray(n)?l0(c0(t,n)):is(rs(t,n)));return Xe(Array.isArray(n)?n.reduce(function(o,a,s){return o[a]=i[s],o},{}):(r={},r[n]=i,r)),i},Wi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function u0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var os,Tf;function d0(){if(Tf)return os;Tf=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=nt(Wi)=="object"&&Wi&&Wi.Object===Object&&Wi,l=(typeof self>"u"?"undefined":nt(self))=="object"&&self&&self.Object===Object&&self,d=c||l||Function("return this")(),f=Object.prototype,m=f.toString,g=Math.max,y=Math.min,v=function(){return d.Date.now()};function b(T,E,A){var R,B,V,W,j,X,le=0,_e=!1,Y=!1,F=!0;if(typeof T!="function")throw new TypeError(e);E=x(E)||0,k(A)&&(_e=!!A.leading,Y="maxWait"in A,V=Y?g(x(A.maxWait)||0,E):V,F="trailing"in A?!!A.trailing:F);function U(P){var D=R,L=B;return R=B=void 0,le=P,W=T.apply(L,D),W}function H(P){return le=P,j=setTimeout(u,E),_e?U(P):W}function Oe(P){var D=P-X,L=P-le,$=E-D;return Y?y($,V-L):$}function kt(P){var D=P-X,L=P-le;return X===void 0||D>=E||D<0||Y&&L>=V}function u(){var P=v();if(kt(P))return p(P);j=setTimeout(u,Oe(P))}function p(P){return j=void 0,F&&R?U(P):(R=B=void 0,W)}function h(){j!==void 0&&clearTimeout(j),le=0,R=X=B=j=void 0}function w(){return j===void 0?W:p(v())}function S(){var P=v(),D=kt(P);if(R=arguments,B=this,X=P,D){if(j===void 0)return H(X);if(Y)return j=setTimeout(u,E),U(X)}return j===void 0&&(j=setTimeout(u,E)),W}return S.cancel=h,S.flush=w,S}function _(T,E,A){var R=!0,B=!0;if(typeof T!="function")throw new TypeError(e);return k(A)&&(R="leading"in A?!!A.leading:R,B="trailing"in A?!!A.trailing:B),b(T,E,{leading:R,maxWait:E,trailing:B})}function k(T){var E=nt(T);return!!T&&(E=="object"||E=="function")}function C(T){return!!T&&nt(T)=="object"}function M(T){return nt(T)=="symbol"||C(T)&&m.call(T)==n}function x(T){if(typeof T=="number")return T;if(M(T))return t;if(k(T)){var E=typeof T.valueOf=="function"?T.valueOf():T;T=k(E)?E+"":E}if(typeof T!="string")return T===0?T:+T;T=T.replace(r,"");var A=o.test(T);return A||a.test(T)?s(T.slice(2),A?2:8):i.test(T)?t:+T}return os=_,os}var f0=d0(),h0=u0(f0),Ji=function(t,n,r,i){r===void 0&&(r=500),i===void 0&&(i=!1);var o=me(Xa),a=o.off,s=o.on,c=Ne(function(){var f;return Array.isArray(t)?t.reduce(function(m,g){return m[g]=i?Qa():Za(),m},{}):(f={},f[t]=i?Qa():Za(),f)},[t,i]),l=pe([]);J("call-instance-destroyed",N(function(){l.current.length=0},[]));var d=Ne(function(){return h0(function(){l.current.length!==0&&(n(l.current),l.current.length=0)},r,{trailing:!0})},[n,r]);ee(function(){if(t){var f=function(g){l.current.push(g),d()};return Array.isArray(t)?t.forEach(function(m){return s(m,f,c[m])}):s(t,f,c[t]),function(){Array.isArray(t)?t.forEach(function(m){return a(m,c[m])}):a(t,c[t])}}},[d,t,c,a,s]),Xe({event:t,eventId:c})},Mf=function(t,n,r){if(n===void 0&&(n=""),r===void 0&&(r=new Set),nt(t)!=="object"||t===null||r.has(t))return[n];r.add(t);var i=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=n?"".concat(n,".").concat(o):o;i.push.apply(i,Ue([a],ye(Mf(t[o],a,r)),!1))}return r.delete(t),i},as=function(t){return Mf(t)},p0=function(t,n){return String(n).split(".").filter(function(r){return r.length}).reduce(function(r,i){return r&&r[i]},t)},ss=function(t,n){return n.map(function(r){return p0(t,r)})},qi=ie(null);qi.debugLabel=he("active-id");var Tr=ie("");Tr.debugLabel=he("local-id");var Cf=ie(null);Cf.debugLabel=he("local-join-date");var gn=ie([]);gn.debugLabel=he("participant-ids");var vn=dr(function(e){var t=ie(null);return t.debugLabel=he("participant-".concat(e)),t}),cs=ie([]);cs.debugLabel=he("waiting-participants");var ls=dr(function(e){var t=ie({awaitingAccess:{level:"full"},id:e,name:""});return t.debugLabel=he("waiting-participant-".concat(e)),t}),m0=function(t){var n=t.children,r=bt(),i=ye(Z(!1),2),o=i[0],a=i[1],s=re(N(function(d,f,m){f(Tr,m.local.session_id);var g=Object.values(m),y=g.map(function(v){return v.session_id});f(gn,y),g.forEach(function(v){f(vn(v.session_id),v);var b=as(v);f(Jn(v.session_id),b),b.forEach(function(_){var k=ye(ss(v,[_]),1),C=k[0];f(ze(v.session_id,_),C)})}),a(!0)},[]));ee(function(){if(!(!r||o)){var d=setInterval(function(){var f=r.participants();"local"in f&&(s(f),clearInterval(d))},100);return function(){clearInterval(d)}}},[r,o,s]);var c=N(function(){if(r){var d=r?.participants();d.local&&s(d)}},[r,s]);J("started-camera",c,!0),J("access-state-updated",c,!0),J("joining-meeting",re(N(function(d,f){f(Cf,new Date),c()},[c])),!0),J("joined-meeting",N(function(d){s(d.participants)},[s]),!0);var l=re(N(function(d,f){f(Tr,""),f(qi,null);var m=d(gn);m.forEach(function(g){return vn.remove(g)}),f(gn,[])},[]));return J("call-instance-destroyed",l,!0),J("left-meeting",l,!0),Ji(["active-speaker-change","participant-joined","participant-updated","participant-left"],re(N(function(d,f,m){m.length&&m.forEach(function(g){switch(g.action){case"active-speaker-change":{f(qi,g.activeSpeaker.peerId),f(vn(g.activeSpeaker.peerId),function(M){return M?ne(ne({},M),{last_active:new Date}):null});break}case"participant-joined":{f(gn,function(M){return M.includes(g.participant.session_id)?M:Ue(Ue([],ye(M),!1),[g.participant.session_id],!1)}),f(vn(g.participant.session_id),g.participant);var y=as(g.participant);f(Jn(g.participant.session_id),y),y.forEach(function(M){var x=ye(ss(g.participant,[M]),1),T=x[0];f(ze(g.participant.session_id,M),T)});break}case"participant-updated":{f(vn(g.participant.session_id),g.participant),g.participant.local&&f(Tr,g.participant.session_id);var y=as(g.participant),v=d(Jn(g.participant.session_id)),b=y.length!==v.length||y.some(function(x){return!v.includes(x)});b&&f(Jn(g.participant.session_id),y);var _=new Set(v),k=ss(g.participant,y);y.forEach(function(x,T){var E=k[T];_.delete(x),f(ze(g.participant.session_id,x),function(A){return _t(A,E)?A:E})}),_.forEach(function(x){f(ze(g.participant.session_id,x),null)});break}case"participant-left":{f(gn,function(M){return M.includes(g.participant.session_id)?M.filter(function(x){return x!==g.participant.session_id}):M}),vn.remove(g.participant.session_id);var C=d(Jn(g.participant.session_id));C.forEach(function(M){is.remove(rs(g.participant.session_id,M))}),Jn.remove(g.participant.session_id);break}}})},[])),100,!0),Ji(["waiting-participant-added","waiting-participant-updated","waiting-participant-removed"],re(N(function(d,f,m){m.forEach(function(g){switch(g.action){case"waiting-participant-added":f(cs,function(y){return y.includes(g.participant.id)?y:Ue(Ue([],ye(y),!1),[g.participant.id],!1)}),f(ls(g.participant.id),g.participant);break;case"waiting-participant-updated":f(ls(g.participant.id),g.participant);break;case"waiting-participant-removed":f(cs,function(y){return y.filter(function(v){return v!==g.participant.id})}),ls.remove(g.participant.id);break}})},[])),100,!0),ce.createElement(ce.Fragment,null,n)},Hi=function(){var t=Zt(Tr);return Xe(t),t},g0=function(){return!0},v0=function(t){var n=t===void 0?{}:t,r=n.filter,i=r===void 0?g0:r,o=n.ignoreLocal,a=o===void 0?!1:o,s=Hi(),c=Zt(qi),l=a&&c===s,d=!i?.(c),f=!l&&!d,m=ye(Z(f?c:null),2),g=m[0],y=m[1];return ee(function(){l||d||y(c)},[d,l,c]),Xe(g),g},Gi=function(t){return["blocked","off"].includes(t)},Pf=";",Ef=function(t,n){return"".concat(t).concat(Pf).concat(n)},Af=ts({equals:_t,get:function(t){return function(n){var r=ye(t.split(Pf),2),i=r[0],o=r[1],a=n(gn);return a.filter(function(s){switch(i){case"local":case"owner":case"record":return n(ze(s,i));case"remote":return!n(ze(s,"local"));case"screen":{var c=n(ze(s,"tracks.screenAudio.state")),l=n(ze(s,"tracks.screenVideo.state"));return!Gi(c)||!Gi(l)}default:return!0}}).sort(function(s,c){switch(o){case"joined_at":case"session_id":case"user_id":case"user_name":{var l=n(ze(s,o)),d=n(ze(c,o));if(l!==void 0||d!==void 0){if(l===void 0)return-1;if(d===void 0||l>d)return 1;if(l<d)return-1}return 0}default:return 0}})}}}),yn=function(t){var n=t===void 0?{}:t,r=n.filter,i=n.onActiveSpeakerChange,o=n.onParticipantJoined,a=n.onParticipantLeft,s=n.onParticipantUpdated,c=n.sort,l=Zt(Af(Ef(typeof r=="string"?r:null,typeof c=="string"?c:null))),d=typeof r=="function"||typeof c=="function",f=N(function(_){if(typeof r!="function"&&typeof c!="function")return[];var k=l.map(function(C){return _(vn(C))});return k.filter(function(C){return!!C}).filter(typeof r=="function"?r:function(){return!0}).sort(typeof c=="function"?c:function(){return 0}).map(function(C){return C.session_id}).filter(Boolean)},[r,l,c]),m=ye(Z([]),2),g=m[0],y=m[1],v=re(N(function(_){if(d){var k=f(_);_t(k,g)||y(k)}},[g,f,d]));ee(function(){v()},[v]),Ji(["participant-joined","participant-updated","active-speaker-change","participant-left"],N(function(_){_.length&&(_.forEach(function(k){switch(k.action){case"participant-joined":o?.(k);break;case"participant-updated":s?.(k);break;case"active-speaker-change":i?.(k);break;case"participant-left":a?.(k);break}}),v())},[v,i,o,a,s]));var b=typeof r=="function"||typeof c=="function"?g:l;return Xe(b),b},y0=ts({equals:es,get:function(){return function(t){var n=t(Af(Ef("screen",null)));return n.map(function(r){return{local:t(ze(r,"local")),screenAudio:t(ze(r,"tracks.screenAudio")),screenVideo:t(ze(r,"tracks.screenVideo")),screenId:"".concat(r,"-screen"),session_id:r}})}}}),b0=function(t){var n={},r=n.onError,i=n.onLocalScreenShareStarted,o=n.onLocalScreenShareStopped,a=bt(),s=N(function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];a?.startScreenShare.apply(a,Ue([],ye(f),!1))},[a]),c=N(function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];a?.stopScreenShare.apply(a,Ue([],ye(f),!1))},[a]);J("local-screen-share-started",N(function(){return i?.()},[i])),J("local-screen-share-stopped",N(function(){return o?.()},[o])),J("nonfatal-error",N(function(f){f.type==="screen-share-error"&&r?.(f)},[r]));var l=Zt(y0(void 0)),d={isSharingScreen:l.some(function(f){return f.local}),screens:l,startScreenShare:s,stopScreenShare:c};return Xe(d),d},Of=function(t,n){n===void 0&&(n="video");var r=xf(t,"tracks.".concat(n)),i=r?ne(ne({},r),{isOff:Gi(r.state)}):{isOff:!0,persistentTrack:void 0,state:"off",subscribed:!1};return Xe(i),i};function If(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(function(n){for(var r=0;r<e.length;r++){var i=e[r];typeof i=="function"?i(n):i&&nt(i)==="object"&&(i.current=n)}},e)}var Ki=Bo(rt(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,o=i===void 0?"audio":i,a=Ya(e,["onPlayFailed","sessionId","type"]),s=pe(null),c=Of(r,o),l=If(s,t),d=c?.subscribed;return ee(function(){var f=s.current;if(!(!f||!c?.persistentTrack)){var m=function(){f.play().catch(function(y){n?.({sessionId:r,target:f,type:o,message:y.message,name:y.name})})};if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(o," for ").concat(r)),n?.({sessionId:r,target:f,type:o,message:"MediaStream API not available",name:"MediaStream API not available"});return}return f.addEventListener("canplay",m),f.srcObject=new MediaStream([c?.persistentTrack]),function(){f?.removeEventListener("canplay",m)}}},[c?.persistentTrack,n,r,o]),J("participant-left",N(function(f){var m=s.current;f.participant.session_id!==r||!m||(m.srcObject=null)},[r])),ce.createElement("audio",ne({autoPlay:!0,ref:l},a,{"data-session-id":r,"data-audio-type":o,"data-subscribed":d}))}));Ki.displayName="DailyAudioTrack";var Df=Bo(rt(function(e,t){var n=e.autoSubscribeActiveSpeaker,r=n===void 0?!1:n,i=e.maxSpeakers,o=i===void 0?5:i,a=e.onPlayFailed,s=e.playLocalScreenAudio,c=s===void 0?!1:s,l=bt(),d=ye(Z(new Array(o).fill("")),2),f=d[0],m=d[1],g=b0().screens,y=Hi(),v=v0({ignoreLocal:!0}),b=pe(null);Ao(t,function(){return{getActiveSpeakerAudio:function(){var x,T;return(T=(x=b.current)===null||x===void 0?void 0:x.querySelector('audio[data-session-id="'.concat(v,'"][data-audio-type="audio"]')))!==null&&T!==void 0?T:null},getAllAudio:function(){var x,T;return Array.from((T=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll("audio"))!==null&&T!==void 0?T:[])},getAudioBySessionId:function(x){var T,E;return(E=(T=b.current)===null||T===void 0?void 0:T.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="audio"]')))!==null&&E!==void 0?E:null},getRmpAudio:function(){var x,T;return Array.from((T=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="rmpAudio"]'))!==null&&T!==void 0?T:[])},getScreenAudio:function(){var x,T;return Array.from((T=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="screenAudio"]'))!==null&&T!==void 0?T:[])},getRmpAudioBySessionId:function(x){var T,E;return(E=(T=b.current)===null||T===void 0?void 0:T.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="rmpAudio"]')))!==null&&E!==void 0?E:null},getScreenAudioBySessionId:function(x){var T,E;return(E=(T=b.current)===null||T===void 0?void 0:T.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="screenAudio"]')))!==null&&E!==void 0?E:null}}},[v]);var _=re(N(function(M,x,T){return zn(void 0,void 0,void 0,function(){var E,A,R;return Wn(this,function(B){if(E=Object.values((R=l?.participants())!==null&&R!==void 0?R:{}).filter(function(V){return!V.local&&!!V.tracks.audio.subscribed}),A=function(W){return E.some(function(j){return j.session_id===W})},!A(T))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(T,{setSubscribedTracks:{audio:!0}});else return[2];return m(function(V){var W;if(V.includes(T))return V;var j=function(H){return!H||!A(H)};if(V.some(j)){var X=V.findIndex(j);return V[X]=T,Ue([],ye(V),!1)}var le=V.findIndex(function(U){return E.some(function(H){return H.session_id===U&&Gi(H.tracks.audio.state)})});if(le>=0)return V[le]=T,Ue([],ye(V),!1);var _e=E.filter(function(U){return V.includes(U.session_id)&&U.session_id!==v}).sort(function(U,H){var Oe,kt,u=(Oe=M(ze(U.session_id,"last_active")))!==null&&Oe!==void 0?Oe:new Date("1970-01-01"),p=(kt=M(ze(H.session_id,"last_active")))!==null&&kt!==void 0?kt:new Date("1970-01-01");return u>p?1:u<p?-1:0});if(!_e.length){var Y=V.findIndex(function(U){return U!==v});return V[Y]=T,Ue([],ye(V),!1)}var F=V.indexOf((W=_e[0])===null||W===void 0?void 0:W.session_id);return V[F]=T,Ue([],ye(V),!1)}),[2]})})},[v,r,l])),k=N(function(M){m(function(x){if(!x.includes(M))return x;var T=Ue([],ye(x),!1),E=T.indexOf(M);return T[E]="",T})},[]);Ji(["active-speaker-change","track-started","participant-left"],N(function(M){M.forEach(function(x){switch(x.action){case"active-speaker-change":if(x.activeSpeaker.peerId===y)return;_(x.activeSpeaker.peerId);break;case"track-started":x.track.kind==="audio"&&x.participant&&!x.participant.local&&_(x.participant.session_id);break;case"participant-left":k(x.participant.session_id);break}})},[_,y,k]),200);var C=yn({filter:N(function(M){var x;return!!(!((x=M?.tracks)===null||x===void 0)&&x.rmpAudio)},[])});return ce.createElement("div",{ref:b},f.map(function(M,x){return ce.createElement(Ki,{key:"speaker-slot-".concat(x),onPlayFailed:a,sessionId:M,type:"audio"})}),g.filter(function(M){return c?!0:!M.local}).map(function(M){return ce.createElement(Ki,{key:M.screenId,onPlayFailed:a,sessionId:M.session_id,type:"screenAudio"})}),C.map(function(M){return ce.createElement(Ki,{key:"".concat(M,"-rmp"),onPlayFailed:a,sessionId:M,type:"rmpAudio"})}))}));Df.displayName="DailyAudio";var Lf=rt(function(t,n){var r=t.automirror,i=t.fit,o=i===void 0?"contain":i,a=t.mirror,s=t.onResize,c=t.playableStyle,l=c===void 0?{}:c,d=t.sessionId,f=t.style,m=f===void 0?{}:f,g=t.type,y=g===void 0?"video":g,v=Ya(t,["automirror","fit","mirror","onResize","playableStyle","sessionId","style","type"]),b=Hi(),_=b===d,k=y==="screenVideo",C=_&&!k,M=pe(null),x=If(M,n),T=Of(d,y),E=T.persistentTrack,A=C||k||!T.isOff,R=xf(d,"tracks.".concat(y)),B=R?.subscribed,V=Ne(function(){if(typeof a=="boolean")return a;if(!r)return!1;if(!E)return C;var W=E.getSettings(),j="facingMode"in W?C&&W.facingMode==="user":C;return j},[r,C,a,E]);return ee(function(){var j=M.current;if(j){var X=function(){var H=j.play();H!==void 0&&H.then(function(){j.controls=!1}).catch(function(Oe){j.controls=!0,console.warn("Failed to play video",Oe)})},le=function(){j.paused&&X()},_e=function(){j.style.transform="scale(1)"},Y=function(){j.style.transform="",setTimeout(function(){j.paused&&X()},100)},F=function(){document.visibilityState!=="hidden"&&j.paused&&X()};return j.addEventListener("canplay",le),j.addEventListener("enterpictureinpicture",_e),j.addEventListener("leavepictureinpicture",Y),document.addEventListener("visibilitychange",F),function(){j.removeEventListener("canplay",le),j.removeEventListener("enterpictureinpicture",_e),j.removeEventListener("leavepictureinpicture",Y),document.removeEventListener("visibilitychange",F)}}},[]),ee(function(){var j=M.current;if(!(!j||!E)){if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(y," for ").concat(d));return}return j.srcObject=new MediaStream([E]),j.load(),function(){j.srcObject=null,j.load()}}},[d,y,E,E?.id]),ee(function(){var j=M.current;if(!s||!j)return;var X;function le(){X&&cancelAnimationFrame(X),X=requestAnimationFrame(function(){var _e=M.current;if(!(!_e||document.hidden)){var Y=_e.videoWidth,F=_e.videoHeight;Y&&F&&s?.({aspectRatio:Y/F,height:F,width:Y})}})}return le(),j.addEventListener("loadedmetadata",le),j.addEventListener("resize",le),function(){X&&cancelAnimationFrame(X),j.removeEventListener("loadedmetadata",le),j.removeEventListener("resize",le)}},[s]),ce.createElement("video",ne({autoPlay:!0,muted:!0,playsInline:!0,ref:x,"data-local":_,"data-mirrored":V||void 0,"data-playable":A||void 0,"data-session-id":d,"data-subscribed":B,"data-video-type":y,style:ne(ne({objectFit:o,transform:V?"scale(-1, 1)":""},m),A?l:{})},v))});Lf.displayName="DailyVideo";var _0=Ie({refreshDevices:function(){return Promise.resolve()}}),Ee=ie("idle");Ee.debugLabel=he("camera-state");var Ae=ie("idle");Ae.debugLabel=he("microphone-state");var Yi=ie([]);Yi.debugLabel=he("camera-devices");var Xi=ie([]);Xi.debugLabel=he("microphone-devices");var jf=ie([]);jf.debugLabel=he("speaker-devices");var Rf=ie(null);Rf.debugLabel=he("last-camera-error");var w0=function(t){var n=t.children,r=bt(),i=re(N(function(a,s){return zn(void 0,void 0,void 0,function(){var c,l,d,f,m,g,y,v,b,_,k,C;return Wn(this,function(M){switch(M.label){case 0:if(typeof((k=navigator?.mediaDevices)===null||k===void 0?void 0:k.getUserMedia)>"u"||typeof((C=navigator?.mediaDevices)===null||C===void 0?void 0:C.enumerateDevices)>"u")return s(Ee,"not-supported"),s(Ae,"not-supported"),[2];if(!r)return[2];M.label=1;case 1:return M.trys.push([1,4,,5]),[4,r.enumerateDevices()];case 2:return c=M.sent().devices,l=c.filter(function(x){return x.kind==="videoinput"&&x.deviceId!==""}),d=c.filter(function(x){return x.kind==="audioinput"&&x.deviceId!==""}),f=c.filter(function(x){return x.kind==="audiooutput"&&x.deviceId!==""}),[4,r.getInputDevices()];case 3:return m=M.sent(),g=m.camera,y=m.mic,v=m.speaker,b=function(T,E,A){var R,B=A.find(function(j){return j.device.deviceId===E.deviceId}),V="deviceId"in T&&E.deviceId===T.deviceId,W=!("deviceId"in T)&&B?.selected;return{device:E,selected:V||!!W,state:(R=B?.state)!==null&&R!==void 0?R:"granted"}},_=function(T,E){return T.device.deviceId==="default"?-1:E.device.deviceId==="default"?1:T.device.label<E.device.label?-1:T.device.label>E.device.label?1:0},s(Yi,function(x){return l.filter(Boolean).map(function(T){return b(g,T,x)}).sort(_)}),s(Xi,function(x){return d.filter(Boolean).map(function(T){return b(y,T,x)}).sort(_)}),s(jf,function(x){return f.filter(Boolean).map(function(T){return b(v,T,x)}).sort(_)}),[3,5];case 4:return M.sent(),s(Ee,"not-supported"),s(Ae,"not-supported"),[3,5];case 5:return[2]}})})},[r])),o=re(N(function(a,s){return zn(void 0,void 0,void 0,function(){var c,l,d,f,m,g,y,v,b,_,k,C,M,x,T,E,A,R,B,V,W,j,X,le,_e,Y;return Wn(this,function(F){switch(F.label){case 0:if(!r)return[2];if(c=a(Ee),l=a(Ae),d=r.participants(),!d.local)return[2];if(f=d.local.tracks,m="prompt",g="prompt",!navigator.permissions)return[3,5];F.label=1;case 1:return F.trys.push([1,4,,5]),[4,navigator.permissions.query({name:"camera"})];case 2:return y=F.sent(),m=y.state,[4,navigator.permissions.query({name:"microphone"})];case 3:return v=F.sent(),g=v.state,[3,5];case 4:return F.sent(),[3,5];case 5:return b=m==="prompt"&&["idle","pending"].includes(c)&&f.video.state==="interrupted"&&!f.video.persistentTrack,_=["idle","pending"].includes(c)&&!f.video.persistentTrack&&!!(!((M=f.video.off)===null||M===void 0)&&M.byUser),k=g==="prompt"&&["idle","pending"].includes(l)&&f.audio.state==="interrupted"&&!f.audio.persistentTrack,C=["idle","pending"].includes(l)&&!f.audio.persistentTrack&&!!(!((x=f.audio.off)===null||x===void 0)&&x.byUser),!((E=(T=f.audio)===null||T===void 0?void 0:T.blocked)===null||E===void 0)&&E.byDeviceInUse?(s(Ae,"in-use"),s(Xi,function(U){return U.map(function(H){return H.selected?ne(ne({},H),{state:"in-use"}):H})})):!((R=(A=f.audio)===null||A===void 0?void 0:A.blocked)===null||R===void 0)&&R.byDeviceMissing?s(Ae,"not-found"):!((V=(B=f.audio)===null||B===void 0?void 0:B.blocked)===null||V===void 0)&&V.byPermissions||g==="denied"?s(Ae,"blocked"):k?s(Ae,"pending"):C?s(Ae,"idle"):(s(Ae,"granted"),s(Xi,function(U){return U.map(function(H){return H.selected?ne(ne({},H),{state:"granted"}):H})})),!((j=(W=f.video)===null||W===void 0?void 0:W.blocked)===null||j===void 0)&&j.byDeviceInUse?(s(Ee,"in-use"),s(Yi,function(U){return U.map(function(H){return H.selected?ne(ne({},H),{state:"in-use"}):H})})):!((le=(X=f.video)===null||X===void 0?void 0:X.blocked)===null||le===void 0)&&le.byDeviceMissing?s(Ee,"not-found"):!((Y=(_e=f.video)===null||_e===void 0?void 0:_e.blocked)===null||Y===void 0)&&Y.byPermissions||m==="denied"?s(Ee,"blocked"):b?s(Ee,"pending"):_?s(Ee,"idle"):(s(Ee,"granted"),s(Yi,function(U){return U.map(function(H){return H.selected?ne(ne({},H),{state:"granted"}):H})})),i(),[2]}})})},[r,i]));return J("participant-updated",N(function(a){a.participant.local&&o()},[o])),J("available-devices-updated",i),J("selected-devices-updated",i),J("camera-error",re(N(function(a,s,c){var l,d,f,m,g,y,v;switch(s(Rf,c.error),(l=c.error)===null||l===void 0?void 0:l.type){case"cam-in-use":s(Ee,"in-use");break;case"mic-in-use":s(Ae,"in-use");break;case"cam-mic-in-use":s(Ee,"in-use"),s(Ae,"in-use");break;case"not-found":!((d=c.error)===null||d===void 0)&&d.missingMedia.includes("video")&&s(Ee,"not-found"),!((f=c.error)===null||f===void 0)&&f.missingMedia.includes("audio")&&s(Ae,"not-found");break;case"permissions":!((m=c.error)===null||m===void 0)&&m.blockedMedia.includes("video")&&s(Ee,"blocked"),!((g=c.error)===null||g===void 0)&&g.blockedMedia.includes("audio")&&s(Ae,"blocked");break;case"constraints":((y=c.error)===null||y===void 0?void 0:y.reason)==="invalid"?(s(Ee,"constraints-invalid"),s(Ae,"constraints-invalid")):((v=c.error)===null||v===void 0?void 0:v.reason)==="none-specified"&&(s(Ee,"constraints-none-specified"),s(Ae,"constraints-none-specified"));break;case"undefined-mediadevices":s(Ee,"undefined-mediadevices"),s(Ae,"undefined-mediadevices");break;case"unknown":default:s(Ee,"unknown"),s(Ae,"unknown");break}},[]))),J("started-camera",re(N(function(a,s){s(Ee,"granted"),s(Ae,"granted"),o()},[o]))),ce.createElement(_0.Provider,{value:{refreshDevices:i}},n)},Mr=ie({errorMsg:void 0,isLiveStreaming:!1,layout:void 0});Mr.debugLabel=he("live-streaming");var k0=function(t){var n=t.children;return J("live-streaming-started",re(N(function(r,i,o){i(Mr,{isLiveStreaming:!0,layout:o?.layout})},[]))),J("live-streaming-stopped",re(N(function(r,i){i(Mr,function(o){return ne(ne({},o),{isLiveStreaming:!1,layout:void 0})})},[]))),J("live-streaming-error",re(N(function(r,i,o){i(Mr,function(a){return ne(ne({},a),{errorMsg:o.errorMsg})})},[]))),J("left-meeting",re(N(function(r,i){i(Mr,{errorMsg:void 0,isLiveStreaming:!1,layout:void 0})},[]))),ce.createElement(ce.Fragment,null,n)},Qi=ie("new");Qi.debugLabel=he("meeting-state");var us=ie(null);us.debugLabel=he("meeting-error");var ds=ie(null);ds.debugLabel=he("non-fatal-error");var Cr=ie({data:void 0,topology:"none"});Cr.debugLabel=he("meeting-session-data");var S0=function(t){var n=t.children,r=bt(),i=re(N(function(a,s){if(r){var c=r.meetingState();return s(Qi,c),c}},[r]));J("loading",i),J("loaded",i),J("joining-meeting",i),J("joined-meeting",i),J("left-meeting",i),J("error",re(N(function(a,s,c){s(us,c),i()},[i]))),J("nonfatal-error",re(N(function(a,s,c){s(ds,c)},[])));var o=re(N(function(a,s){r&&s(Cr,r.meetingSessionState())},[r]));return J("joined-meeting",o),J("meeting-session-state-updated",re(N(function(a,s,c){s(Cr,c.meetingSessionState)},[]))),J("left-meeting",re(N(function(a,s){s(Cr,{data:void 0,topology:"none"})},[]))),J("call-instance-destroyed",re(N(function(a,s){s(Qi,"new"),s(us,null),s(ds,null),s(Cr,{data:void 0,topology:"none"})},[]))),ce.createElement(ce.Fragment,null,n)},qn=ie("none");qn.debugLabel=he("topology");var Vf=ie("unknown"),Nf=ie([]),fs=ie(100);fs.debugLabel=he("network-quality");var hs=ie("good");hs.debugLabel=he("network-threshold");var x0=function(t){var n=t.children,r=bt(),i=Zt(qn),o=re(N(function(a,s){return zn(void 0,void 0,void 0,function(){var c;return Wn(this,function(l){switch(l.label){case 0:return r?[4,r.getNetworkTopology()]:[2];case 1:return c=l.sent(),!c||c?.topology==="none"?[2]:(s(qn,c.topology),[2])}})})},[r]));return J("joined-meeting",o),J("network-connection",re(N(function(a,s,c){switch(c.event){case"connected":c.type==="peer-to-peer"&&s(qn,"peer"),c.type==="sfu"&&s(qn,"sfu");break}},[]))),J("network-quality-change",re(N(function(a,s,c){s(Vf,function(l){return l!==c.networkState?c.networkState:l}),s(Nf,function(l){var d,f=(d=c.networkStateReasons)!==null&&d!==void 0?d:[];return es(l,f)?l:f}),s(fs,function(l){return l!==c.quality?c.quality:l}),s(hs,function(l){return l!==c.threshold?c.threshold:l})},[]))),J("left-meeting",re(N(function(a,s){s(qn,"none"),s(Vf,"unknown"),s(Nf,[]),s(fs,100),s(hs,"good")},[]))),ee(function(){!r||i!=="none"||o()},[r,o,i]),ce.createElement(ce.Fragment,null,n)},bn=ie({isLocalParticipantRecorded:!1,isRecording:!1});bn.debugLabel=he("recording-state");var T0=function(t){var n=t.children,r=Hi(),i=yn({filter:"record"}),o=re(N(function(a,s,c,l){var d=a(bn),f={isLocalParticipantRecorded:d.isLocalParticipantRecorded,isRecording:d.isRecording,local:d.local,type:d.type},m={isLocalParticipantRecorded:f?.type==="local"||!f?.type?c:f.isLocalParticipantRecorded,isRecording:f?.type==="local"||!f?.type?c:f.isRecording,local:(f?.type==="local"||!f?.type)&&c?l:f?.local,type:c?"local":d?.type};_t(f,m)||s(bn,ne(ne({},f),m))},[]));return ee(function(){var a=i.length>0,s=i.includes(r||"local");o(a,s)},[r,o,i]),J("recording-started",re(N(function(a,s,c){var l,d=!0;switch(c.type){case"cloud-beta":case"cloud":{r&&((l=c.layout)===null||l===void 0?void 0:l.preset)==="single-participant"&&c.layout.session_id!==r&&(d=!1);break}}s(bn,{error:!1,isLocalParticipantRecorded:d,isRecording:!0,layout:c?.layout,local:c?.local,recordingId:c?.recordingId,recordingStartedDate:new Date,startedBy:c?.startedBy,type:c?.type})},[r]))),J("recording-stopped",re(N(function(a,s){s(bn,function(c){return ne(ne({},c),{isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),J("recording-error",re(N(function(a,s){s(bn,function(c){return ne(ne({},c),{error:!0,isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),J("left-meeting",re(N(function(a,s){s(bn,{isLocalParticipantRecorded:!1,isRecording:!1})},[]))),ce.createElement(ce.Fragment,null,n)},M0=function(){var t=Zt(Qi);return Xe(t),t},ps=ie(null);ps.debugLabel=he("room-state");var C0=function(t){var n=t.children,r=bt(),i=M0(),o=re(N(function(a,s){return zn(void 0,void 0,void 0,function(){var c;return Wn(this,function(l){switch(l.label){case 0:return!r||i==="left-meeting"?[2]:[4,r.room()];case 1:return c=l.sent(),c&&"id"in c&&s(ps,c),[2,c]}})})},[r,i]));return J("access-state-updated",o),J("left-meeting",re(N(function(a,s){return function(){s(ps,null)}},[]))),ce.createElement(ce.Fragment,null,n)},Hn=ie({isTranscribing:!1,model:"general",language:"en",transcriptions:[]});Hn.debugLabel=he("transcription-state");var P0=function(t){var n=t.children;return J("transcription-started",re(N(function(r,i,o){i(Hn,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:o.endpointing,extra:o.extra,includeRawResponse:o.includeRawResponse,instanceId:o.instanceId,language:o.language,model:o.model,profanity_filter:o.profanity_filter,punctuate:o.punctuate,redact:o.redact,startedBy:o.startedBy,tier:o.tier})},[]))),J("transcription-stopped",re(N(function(r,i,o){i(Hn,function(a){return ne(ne({},a),{updatedBy:o.updatedBy,isTranscribing:!1})})},[]))),J("transcription-error",re(N(function(r,i){i(Hn,function(o){return ne(ne({},o),{error:!0,isTranscribing:!1})})},[]))),J("left-meeting",re(N(function(r,i){i(Hn,function(o){return ne(ne({},o),{isTranscribing:!1})})},[]))),J("app-message",re(N(function(r,i,o){o?.fromId==="transcription"&&i(Hn,function(a){return ne(ne({},a),{isTranscribing:!0,transcriptions:Ue(Ue([],ye(a.transcriptions),!1),[o.data],!1)})})},[]))),ce.createElement(ce.Fragment,null,n)},Ff={strictMode:!0},Bf=function(){return!0},E0={options:Ff,shouldCreateInstance:Bf},A0=function(t,n){var r=n===void 0?E0:n,i=r.parentElRef,o=r.options,a=o===void 0?Ff:o,s=r.shouldCreateInstance,c=s===void 0?Bf:s,l=ye(Z(null),2),d=l[0],f=l[1],m=pe();return ee(function(){if(!c())return;function g(b){return zn(this,void 0,void 0,function(){return Wn(this,function(_){switch(_.label){case 0:return[4,b.destroy()];case 1:return _.sent(),[2]}})})}var y=function(){setTimeout(function(){return f(null)},0)},v=Sr.getCallInstance();if(!d&&v&&!v.isDestroyed()){v.once("call-instance-destroyed",y),f(v);return}if(d){_t(m.current,a)||g(d);return}if(!v||v.isDestroyed())try{switch(t){case"callFrame":v=i?.current?Sr.createFrame(i.current,ne({},a)):Sr.createFrame(ne({},a));break;case"callObject":v=Sr.createCallObject(ne({},a));break}m.current=a,f(v),v.once("call-instance-destroyed",y)}catch(b){if(console.error("Error creating call instance:",b),a.strictMode)throw b}},[d,a,i,c,t]),d},O0=function(t){return A0("callObject",t)},I0=function(t){var n=t.children,r=t.jotaiStore,i=Ya(t,["children","jotaiStore"]),o=pe({}),a=N(function(y){var v,b,_,k;if("action"in y){var C=y.action,M=Array.from((k=(_=o.current)===null||_===void 0?void 0:_[C])!==null&&k!==void 0?k:[]),x=M.filter(function(W){var j=ye(W,1),X=j[0];return X<0}),T=M.filter(function(W){var j=ye(W,1),X=j[0];return X>0}),E=Ue(Ue([],ye(x),!1),ye(T),!1);try{for(var A=wf(E),R=A.next();!R.done;R=A.next()){var B=ye(R.value,2),V=B[1];V(y)}}catch(W){v={error:W}}finally{try{R&&!R.done&&(b=A.return)&&b.call(A)}finally{if(v)throw v.error}}}},[]),s=N(function(y){y&&Object.keys(o.current).forEach(function(v){y.off(v,a),y.isDestroyed()||y.on(v,a)})},[a]),c="callObject"in i?i.callObject:null,l=Ne(function(){return"callObject"in i?{}:i},[i]),d=O0({options:l,shouldCreateInstance:N(function(){return!("callObject"in i)},[i])}),f=c??d;ee(function(){f&&s(f)},[f,s]);var m=N(function(y,v,b){var _,k;o.current[y]||(o.current[y]=new Map,f&&(f.off(y,a),f.isDestroyed()||f.on(y,a))),!((_=o.current[y])===null||_===void 0)&&_.has(b)||(k=o.current[y])===null||k===void 0||k.set(b,v)},[f,a]),g=N(function(y,v){var b,_;(b=o.current[y])===null||b===void 0||b.delete(v),((_=o.current[y])===null||_===void 0?void 0:_.size)===0&&(f?.off(y,a),delete o.current[y])},[f,a]);return ce.createElement(av,{store:r},ce.createElement(kf.Provider,{value:f},ce.createElement(Xa.Provider,{value:{on:m,off:g}},ce.createElement(C0,null,ce.createElement(S0,null,ce.createElement(x0,null,ce.createElement(m0,null,ce.createElement(T0,null,ce.createElement(k0,null,ce.createElement(P0,null,ce.createElement(w0,null,n)))))))))))},ms=function(t){var n={},r=n.onAppMessage,i=bt(),o=N(function(s,c){c===void 0&&(c="*"),i&&i.sendAppMessage(s,c)},[i]),a=N(function(s){r?.(s,o)},[r,o]);return J("app-message",a),o},D0=ie({state:"low",reason:"none"});D0.debugLabel=he("cpu-load");var L0=ie(null);L0.debugLabel=he("input-settings");var j0=ie({hidden:0,present:0});j0.debugLabel=he("participant-counts");var R0=dr(function(e){var t=ie({},function(n,r,i){r(R0(e),i)});return t.debugLabel=he("participant-receive-settings-".concat(e)),t}),V0=ie(null);V0.debugLabel=he("send-settings");const N0='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-600:oklch(57.7% .245 27.325);--color-gray-600:oklch(44.6% .03 256.802);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--radius-lg:.5rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-lg:16px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-5{right:calc(var(--spacing)*5)}.right-15{right:calc(var(--spacing)*15)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-25{bottom:calc(var(--spacing)*25)}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-1000{z-index:1000}.mx-auto{margin-inline:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.hidden{display:none}.inline{display:inline}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-3{height:calc(var(--spacing)*3)}.h-11{height:calc(var(--spacing)*11)}.h-\\[28px\\]{height:28px}.h-\\[64px\\]{height:64px}.h-\\[180px\\]{height:180px}.h-\\[216px\\]{height:216px}.h-\\[300px\\]{height:300px}.h-\\[377px\\]{height:377px}.h-full{height:100%}.max-h-36{max-height:calc(var(--spacing)*36)}.min-h-11{min-height:calc(var(--spacing)*11)}.w-11{width:calc(var(--spacing)*11)}.w-25{width:calc(var(--spacing)*25)}.w-\\[36px\\]{width:36px}.w-\\[120px\\]{width:120px}.w-\\[144px\\]{width:144px}.w-\\[200px\\]{width:200px}.w-\\[252px\\]{width:252px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[90\\%\\]{max-width:90%}.flex-1{flex:1}.flex-none{flex:none}.scale-25{--tw-scale-x:25%;--tw-scale-y:25%;--tw-scale-z:25%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-none{scale:none}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[22px\\]{border-radius:22px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-l-3xl{border-top-left-radius:var(--radius-3xl);border-bottom-left-radius:var(--radius-3xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\\/95{background-color:#000000f2}@supports (color:color-mix(in lab,red,red)){.bg-black\\/95{background-color:color-mix(in oklab,var(--color-black)95%,transparent)}}.bg-gray-600\\/25{background-color:#4a556540}@supports (color:color-mix(in lab,red,red)){.bg-gray-600\\/25{background-color:color-mix(in oklab,var(--color-gray-600)25%,transparent)}}.bg-red-600\\/25{background-color:#e4001440}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/25{background-color:color-mix(in oklab,var(--color-red-600)25%,transparent)}}.bg-red-600\\/50{background-color:#e4001480}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/50{background-color:color-mix(in oklab,var(--color-red-600)50%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-white\\/30{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.bg-\\[linear-gradient\\(transparent\\,\\#000000\\)\\]{background-image:linear-gradient(#0000,#000)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)\\,rgba\\(0\\,0\\,0\\,1\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,0\\)_40\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%);mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,0\\)_50\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%);mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_15\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,1\\)_50\\%\\,rgba\\(0\\,0\\,0\\,0\\)_60\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%);mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,0\\)_70\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%);mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\,rgba\\(0\\,0\\,0\\,0\\)_90\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%);mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 60%,#000 80%);mask-image:linear-gradient(#0000 60%,#000 80%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_70\\%\\,rgba\\(0\\,0\\,0\\,1\\)_100\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 70%,#000 100%);mask-image:linear-gradient(#0000 70%,#000)}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{object-fit:cover}.p-2{padding:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-14{padding-right:calc(var(--spacing)*14)}.pr-\\[4px\\]{padding-right:4px}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-right{text-align:right}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-white{color:var(--color-white)}.text-white\\/75{color:#ffffffbf}@supports (color:color-mix(in lab,red,red)){.text-white\\/75{color:color-mix(in oklab,var(--color-white)75%,transparent)}}.underline{text-decoration-line:underline}.decoration-white\\/50{text-decoration-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.decoration-white\\/50{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.opacity-0{opacity:0}.opacity-100{opacity:1}.mix-blend-difference{mix-blend-mode:difference}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-sm{--tw-blur:blur(var(--blur-sm));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[4px\\]{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[8px\\]{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[16px\\]{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[32px\\]{--tw-backdrop-blur:blur(32px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[64px\\]{--tw-backdrop-blur:blur(64px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-none{--tw-backdrop-blur: ;-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[backdrop-filter\\]{transition-property:-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[scrollbar-width\\:none\\]{scrollbar-width:none}.placeholder\\:text-white\\/70::placeholder{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-white\\/70::placeholder{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.placeholder\\:opacity-0::placeholder{opacity:0}.placeholder\\:opacity-70::placeholder{opacity:.7}@media(hover:hover){.hover\\:bg-black\\/30:hover{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/30:hover{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/15:hover{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.hover\\:bg-white\\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/20:hover{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.hover\\:bg-white\\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/80:hover{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:hidden::-webkit-scrollbar{display:none}.shadow-inset-white-10{box-shadow:inset 0 0 0 1px #ffffff1a}.shadow-inset-white-20{box-shadow:inset 0 0 0 1px #fff3}.shadow-focused{box-shadow:inset 0 0 0 1.5px #fff6}}@keyframes fadeInUp{0%{opacity:0;filter:blur(12px);transform:translateY(12px)}to{opacity:1;filter:blur();transform:translateY(0)}}@keyframes fadeOutUp{0%{opacity:1;filter:blur();transform:translateY(0)}to{opacity:0;filter:blur(12px);transform:translateY(-12px)}}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';function F0(){return O("style",{children:N0})}const $f=Ie(void 0);function B0({children:e}){const[t,n]=Z(!1);return O($f.Provider,{value:{hasUserInteracted:t,setHasUserInteracted:n},children:e})}function Pr(){const e=me($f);if(!e)throw new Error("useUserInteraction must be used within a UserInteractionProvider");return e}const Re="active",ct="minimized",Ht="hidden",Uf=Ie(void 0),$0=3e4;function U0({children:e,showMinimizeButton:t=!0,onSetShowMinimizeButton:n}){const{setHasUserInteracted:r}=Pr(),i=ms(),o=bt(),[a,s]=Z(ct),[c,l]=Z(!1),[d,f]=Z(!1),[m,g]=Z(!1),[y,v]=Z(null),[b,_]=Z(!1),[k,C]=Z(t),[M,x]=Z(!1),[T,E]=Z(!1),A=pe(null),R=pe(null),B=pe(null);ee(()=>{n&&n(C)},[n]);const V=N(()=>{if(o)try{const j=o.meetingState();(j==="joined-meeting"||j==="joining-meeting")&&(console.log("Sending force-end event to Daily"),i({event:"force-end"},"*"))}catch{}l(!1),r(!1),_(!1),v(null),x(!1),E(!1)},[o]),W=j=>{A.current!==null&&clearTimeout(A.current),R.current!==null&&clearTimeout(R.current),j===Re?B.current!==null&&(clearTimeout(B.current),B.current=null):a===Re&&j===ct&&(B.current=window.setTimeout(()=>{V(),B.current=null},$0)),j===Ht||a===Ht?(f(!0),A.current=window.setTimeout(()=>{s(j),f(!1),g(!0),A.current=null,R.current=window.setTimeout(()=>{g(!1),R.current=null},300)},1)):(s(j),f(!1),g(!1))};return O(Uf.Provider,{value:{widgetState:a,setWidgetState:W,isAgentVideoReady:c,setIsAgentVideoReady:l,roomUrl:y,setRoomUrl:v,isTransitioning:m,isAboutToTransition:d,hasJoinedRoom:b,setHasJoinedRoom:_,resetDailyState:V,showMinimizeButton:k,setShowMinimizeButton:C,isImageChangeRequested:M,setIsImageChangeRequested:x,isImageChanging:T,setIsImageChanging:E},children:e})}function Rt(){const e=me(Uf);if(!e)throw new Error("useWidget must be used within a WidgetProvider");return e}const zf=Ie(void 0);function z0({children:e}){const[t,n]=Z(!0),[r,i]=Z(!1),o=bt();return ee(()=>{o&&o.setLocalAudio(!t)},[t,o]),O(zf.Provider,{value:{isMicMuted:t,setIsMicMuted:n,isAudioMuted:r,setIsAudioMuted:i},children:e})}function gs(){const e=me(zf);if(!e)throw new Error("useMute must be used within a MuteProvider");return e}const Wf=Ie(void 0);function W0({children:e}){const t=Ne(()=>typeof window>"u"?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),[]);return O(Wf.Provider,{value:{isMobileDevice:t},children:e})}function vs(){const e=me(Wf);if(!e)throw new Error("useMobile must be used within a MobileProvider");return e}const Jf=Ie(void 0);function J0({children:e}){const[t,n]=Z(null);return O(Jf.Provider,{value:{agentData:t,setAgentData:n},children:e})}function Gn(){const e=me(Jf);if(!e)throw new Error("useAgent must be used within an AgentProvider");return e}const qf=360,q0=30,Hf=Ie(void 0);function H0({children:e}){const[t,n]=Z(""),[r,i]=Z(""),[o,a]=Z(""),s=pe(null),{agentData:c}=Gn(),{resetDailyState:l,setWidgetState:d}=Rt(),f=pe(qf),m=N(()=>{n(""),i(""),a("")},[]),g=N(()=>{s.current!==null&&clearInterval(s.current);const y=c?.max_conv_dur!=null&&c.max_conv_dur>0?c.max_conv_dur:qf;f.current=y,a(""),s.current=window.setInterval(()=>{f.current-=1,f.current<=q0&&f.current>0?a(`• ${f.current}s left`):f.current===0&&s.current!==null&&(a(""),n(""),i(""),d(ct),l(),clearInterval(s.current),s.current=null)},1e3)},[c,d,l]);return ee(()=>{s.current!==null&&c?.max_conv_dur!=null&&c.max_conv_dur>0&&g()},[c?.max_conv_dur,g]),ee(()=>()=>{s.current!==null&&clearInterval(s.current)},[]),O(Hf.Provider,{value:{errorMsg:t,setErrorMsg:n,nonFatalErrorMsg:r,setNonFatalErrorMsg:i,timeMsg:o,setTimeMsg:a,startMaxVideoTimer:g,resetErrors:m},children:e})}function Zi(){const e=me(Hf);if(!e)throw new Error("useError must be used within an ErrorProvider");return e}function G0(){const e=yn({filter:"remote"}),{timeMsg:t}=Zi(),{agentData:n}=Gn(),{isImageChanging:r}=Rt();if(e.length===0)return null;const i=e[0],o=n?.image_url;return O("div",{className:"h-full rounded-lg relative",children:[o&&O("div",{className:"absolute inset-0 bg-cover bg-center rounded-lg",style:{backgroundImage:`url(${o})`}}),O("div",{className:"relative w-full h-full",children:[O(Lf,{sessionId:i,type:"video",style:{objectFit:"cover",width:"100%",height:"100%",position:"relative"}}),O("div",{className:`absolute inset-0 bg-black/95 bg-cover bg-center rounded-lg transition-opacity transition-[backdrop-filter] duration-300 ease-in-out ${r?"opacity-100 backdrop-blur-lg":"opacity-0 backdrop-blur-none"}`})]}),t&&O("div",{className:"absolute top-2 left-2",children:O("div",{className:"bg-red-600/50 backdrop-blur-xl rounded-3xl py-2 px-4 w-fit shadow-inset-white-10",children:O("p",{className:"text-white text-lg font-semibold text-center",children:t})})})]})}const Gf=Ie({});function K0(e){const t=pe(null);return t.current===null&&(t.current=e()),t.current}const ys=typeof window<"u",Y0=ys?On:ee,bs=Ie(null);function _s(e,t){e.indexOf(t)===-1&&e.push(t)}function ws(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Vt=(e,t,n)=>n>t?t:n<e?e:n;let ks=()=>{};const Nt={},Kf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Yf(e){return typeof e=="object"&&e!==null}const Xf=e=>/^0[^.\s]+$/u.test(e);function Ss(e){let t;return()=>(t===void 0&&(t=e()),t)}const lt=e=>e,X0=(e,t)=>n=>t(e(n)),Er=(...e)=>e.reduce(X0),Ar=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class xs{constructor(){this.subscriptions=[]}add(t){return _s(this.subscriptions,t),()=>ws(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ct=e=>e*1e3,ut=e=>e/1e3;function Qf(e,t){return t?e*(1e3/t):0}const Zf=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Q0=1e-7,Z0=12;function e_(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Zf(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Q0&&++s<Z0);return a}function Or(e,t,n,r){if(e===t&&n===r)return lt;const i=o=>e_(o,0,1,e,n);return o=>o===0||o===1?o:Zf(i(o),t,r)}const eh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,th=e=>t=>1-e(1-t),nh=Or(.33,1.53,.69,.99),Ts=th(nh),rh=eh(Ts),ih=e=>(e*=2)<1?.5*Ts(e):.5*(2-Math.pow(2,-10*(e-1))),Ms=e=>1-Math.sin(Math.acos(e)),oh=th(Ms),ah=eh(Ms),t_=Or(.42,0,1,1),n_=Or(0,0,.58,1),sh=Or(.42,0,.58,1),r_=e=>Array.isArray(e)&&typeof e[0]!="number",ch=e=>Array.isArray(e)&&typeof e[0]=="number",i_={linear:lt,easeIn:t_,easeInOut:sh,easeOut:n_,circIn:Ms,circInOut:ah,circOut:oh,backIn:Ts,backInOut:rh,backOut:nh,anticipate:ih},o_=e=>typeof e=="string",lh=e=>{if(ch(e)){ks(e.length===4);const[t,n,r,i]=e;return Or(t,n,r,i)}else if(o_(e))return i_[e];return e},eo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function a_(e,t){let n=new Set,r=new Set,i=!1,o=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(l.schedule(d),e()),d(s)}const l={schedule:(d,f=!1,m=!1)=>{const y=m&&i?n:r;return f&&a.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(s=d,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(d))}};return l}const s_=40;function uh(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=eo.reduce((C,M)=>(C[M]=a_(o),C),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:d,update:f,preRender:m,render:g,postRender:y}=a,v=()=>{const C=Nt.useManualTiming?i.timestamp:performance.now();n=!1,Nt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(C-i.timestamp,s_),1)),i.timestamp=C,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),d.process(i),f.process(i),m.process(i),g.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},b=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:eo.reduce((C,M)=>{const x=a[M];return C[M]=(T,E=!1,A=!1)=>(n||b(),x.schedule(T,E,A)),C},{}),cancel:C=>{for(let M=0;M<eo.length;M++)a[eo[M]].cancel(C)},state:i,steps:a}}const{schedule:ke,cancel:Gt,state:Ve,steps:Cs}=uh(typeof requestAnimationFrame<"u"?requestAnimationFrame:lt,!0);let to;function c_(){to=void 0}const Ye={now:()=>(to===void 0&&Ye.set(Ve.isProcessing||Nt.useManualTiming?Ve.timestamp:performance.now()),to),set:e=>{to=e,queueMicrotask(c_)}},dh=e=>t=>typeof t=="string"&&t.startsWith(e),Ps=dh("--"),l_=dh("var(--"),Es=e=>l_(e)?u_.test(e.split("/*")[0].trim()):!1,u_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Kn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ir={...Kn,transform:e=>Vt(0,1,e)},no={...Kn,default:1},Dr=e=>Math.round(e*1e5)/1e5,As=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function d_(e){return e==null}const f_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Os=(e,t)=>n=>!!(typeof n=="string"&&f_.test(n)&&n.startsWith(e)||t&&!d_(n)&&Object.prototype.hasOwnProperty.call(n,t)),fh=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(As);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},h_=e=>Vt(0,255,e),Is={...Kn,transform:e=>Math.round(h_(e))},_n={test:Os("rgb","red"),parse:fh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Is.transform(e)+", "+Is.transform(t)+", "+Is.transform(n)+", "+Dr(Ir.transform(r))+")"};function p_(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ds={test:Os("#"),parse:p_,transform:_n.transform},Lr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kt=Lr("deg"),Pt=Lr("%"),q=Lr("px"),m_=Lr("vh"),g_=Lr("vw"),hh={...Pt,parse:e=>Pt.parse(e)/100,transform:e=>Pt.transform(e*100)},Yn={test:Os("hsl","hue"),parse:fh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pt.transform(Dr(t))+", "+Pt.transform(Dr(n))+", "+Dr(Ir.transform(r))+")"},Pe={test:e=>_n.test(e)||Ds.test(e)||Yn.test(e),parse:e=>_n.test(e)?_n.parse(e):Yn.test(e)?Yn.parse(e):Ds.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_n.transform(e):Yn.transform(e),getAnimatableNone:e=>{const t=Pe.parse(e);return t.alpha=0,Pe.transform(t)}},v_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function y_(e){return isNaN(e)&&typeof e=="string"&&(e.match(As)?.length||0)+(e.match(v_)?.length||0)>0}const ph="number",mh="color",b_="var",__="var(",gh="${}",w_=/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 jr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(w_,c=>(Pe.test(c)?(r.color.push(o),i.push(mh),n.push(Pe.parse(c))):c.startsWith(__)?(r.var.push(o),i.push(b_),n.push(c)):(r.number.push(o),i.push(ph),n.push(parseFloat(c))),++o,gh)).split(gh);return{values:n,split:s,indexes:r,types:i}}function vh(e){return jr(e).values}function yh(e){const{split:t,types:n}=jr(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===ph?o+=Dr(i[a]):s===mh?o+=Pe.transform(i[a]):o+=i[a]}return o}}const k_=e=>typeof e=="number"?0:Pe.test(e)?Pe.getAnimatableNone(e):e;function S_(e){const t=vh(e);return yh(e)(t.map(k_))}const Yt={test:y_,parse:vh,createTransformer:yh,getAnimatableNone:S_};function Ls(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+(t-e)*6*n:n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function x_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=Ls(c,s,e+.3333333333333333),o=Ls(c,s,e),a=Ls(c,s,e-.3333333333333333)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function ro(e,t){return n=>n>0?t:e}const xe=(e,t,n)=>e+(t-e)*n,js=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},T_=[Ds,_n,Yn],M_=e=>T_.find(t=>t.test(e));function bh(e){const t=M_(e);if(!t)return!1;let n=t.parse(e);return t===Yn&&(n=x_(n)),n}const _h=(e,t)=>{const n=bh(e),r=bh(t);if(!n||!r)return ro(e,t);const i={...n};return o=>(i.red=js(n.red,r.red,o),i.green=js(n.green,r.green,o),i.blue=js(n.blue,r.blue,o),i.alpha=xe(n.alpha,r.alpha,o),_n.transform(i))},Rs=new Set(["none","hidden"]);function C_(e,t){return Rs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function P_(e,t){return n=>xe(e,t,n)}function Vs(e){return typeof e=="number"?P_:typeof e=="string"?Es(e)?ro:Pe.test(e)?_h:O_:Array.isArray(e)?wh:typeof e=="object"?Pe.test(e)?_h:E_:ro}function wh(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Vs(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function E_(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Vs(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function A_(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}const O_=(e,t)=>{const n=Yt.createTransformer(t),r=jr(e),i=jr(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Rs.has(e)&&!i.values.length||Rs.has(t)&&!r.values.length?C_(e,t):Er(wh(A_(r,i),i.values),n):ro(e,t)};function kh(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xe(e,t,n):Vs(e)(e,t)}const I_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ke.update(t,n),stop:()=>Gt(t),now:()=>Ve.isProcessing?Ve.timestamp:Ye.now()}},Sh=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},io=2e4;function Ns(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<io;)t+=n,r=e.next(t);return t>=io?1/0:t}function D_(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Ns(r),io);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:ut(i)}}const L_=5;function xh(e,t,n){const r=Math.max(t-L_,0);return Qf(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},Fs=.001;function j_({duration:e=Te.duration,bounce:t=Te.bounce,velocity:n=Te.velocity,mass:r=Te.mass}){let i,o,a=1-t;a=Vt(Te.minDamping,Te.maxDamping,a),e=Vt(Te.minDuration,Te.maxDuration,ut(e)),a<1?(i=l=>{const d=l*a,f=d*e,m=d-n,g=Bs(l,a),y=Math.exp(-f);return Fs-m/g*y},o=l=>{const f=l*a*e,m=f*n+n,g=Math.pow(a,2)*Math.pow(l,2)*e,y=Math.exp(-f),v=Bs(Math.pow(l,2),a);return(-i(l)+Fs>0?-1:1)*((m-g)*y)/v}):(i=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-Fs+d*f},o=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const s=5/e,c=V_(i,o,s);if(e=Ct(e),isNaN(c))return{stiffness:Te.stiffness,damping:Te.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const R_=12;function V_(e,t,n){let r=n;for(let i=1;i<R_;i++)r=r-e(r)/t(r);return r}function Bs(e,t){return e*Math.sqrt(1-t*t)}const N_=["duration","bounce"],F_=["stiffness","damping","mass"];function Th(e,t){return t.some(n=>e[n]!==void 0)}function B_(e){let t={velocity:Te.velocity,stiffness:Te.stiffness,damping:Te.damping,mass:Te.mass,isResolvedFromDuration:!1,...e};if(!Th(e,F_)&&Th(e,N_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Vt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Te.mass,stiffness:i,damping:o}}else{const n=j_(e);t={...t,...n,mass:Te.mass},t.isResolvedFromDuration=!0}return t}function oo(e=Te.visualDuration,t=Te.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:d,duration:f,velocity:m,isResolvedFromDuration:g}=B_({...n,velocity:-ut(n.velocity||0)}),y=m||0,v=l/(2*Math.sqrt(c*d)),b=a-o,_=ut(Math.sqrt(c/d)),k=Math.abs(b)<5;r||(r=k?Te.restSpeed.granular:Te.restSpeed.default),i||(i=k?Te.restDelta.granular:Te.restDelta.default);let C;if(v<1){const x=Bs(_,v);C=T=>{const E=Math.exp(-v*_*T);return a-E*((y+v*_*b)/x*Math.sin(x*T)+b*Math.cos(x*T))}}else if(v===1)C=x=>a-Math.exp(-_*x)*(b+(y+_*b)*x);else{const x=_*Math.sqrt(v*v-1);C=T=>{const E=Math.exp(-v*_*T),A=Math.min(x*T,300);return a-E*((y+v*_*b)*Math.sinh(A)+x*b*Math.cosh(A))/x}}const M={calculatedDuration:g&&f||null,next:x=>{const T=C(x);if(g)s.done=x>=f;else{let E=x===0?y:0;v<1&&(E=x===0?Ct(y):xh(C,x,T));const A=Math.abs(E)<=r,R=Math.abs(a-T)<=i;s.done=A&&R}return s.value=s.done?a:T,s},toString:()=>{const x=Math.min(Ns(M),io),T=Sh(E=>M.next(x*E).value,x,30);return x+"ms "+T},toTransition:()=>{}};return M}oo.applyToOptions=e=>{const t=D_(e,100,oo);return e.ease=t.ease,e.duration=Ct(t.duration),e.type="keyframes",e};function $s({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:d}){const f=e[0],m={done:!1,value:f},g=A=>s!==void 0&&A<s||c!==void 0&&A>c,y=A=>s===void 0?c:c===void 0||Math.abs(s-A)<Math.abs(c-A)?s:c;let v=n*t;const b=f+v,_=a===void 0?b:a(b);_!==b&&(v=_-f);const k=A=>-v*Math.exp(-A/r),C=A=>_+k(A),M=A=>{const R=k(A),B=C(A);m.done=Math.abs(R)<=l,m.value=m.done?_:B};let x,T;const E=A=>{g(m.value)&&(x=A,T=oo({keyframes:[m.value,y(m.value)],velocity:xh(C,A,m.value),damping:i,stiffness:o,restDelta:l,restSpeed:d}))};return E(0),{calculatedDuration:null,next:A=>{let R=!1;return!T&&x===void 0&&(R=!0,M(A),E(A)),x!==void 0&&A>=x?T.next(A-x):(!R&&M(A),m)}}}function $_(e,t,n){const r=[],i=n||Nt.mix||kh,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||lt:t;s=Er(c,s)}r.push(s)}return r}function U_(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(ks(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=$_(t,r,i),c=s.length,l=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const m=Ar(e[f],e[f+1],d);return s[f](m)};return n?d=>l(Vt(e[0],e[o-1],d)):l}function z_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ar(0,t,r);e.push(xe(n,1,i))}}function W_(e){const t=[0];return z_(t,e.length-1),t}function J_(e,t){return e.map(n=>n*t)}function q_(e,t){return e.map(()=>t||sh).splice(0,e.length-1)}function Rr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=r_(r)?r.map(lh):lh(r),o={done:!1,value:t[0]},a=J_(n&&n.length===t.length?n:W_(t),e),s=U_(a,t,{ease:Array.isArray(i)?i:q_(t,i)});return{calculatedDuration:e,next:c=>(o.value=s(c),o.done=c>=e,o)}}const H_=e=>e!==null;function Us(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(H_),s=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const G_={decay:$s,inertia:$s,tween:Rr,keyframes:Rr,spring:oo};function Mh(e){typeof e.type=="string"&&(e.type=G_[e.type])}class zs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const K_=e=>e/100;class Ws extends zs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Ye.now()&&this.tick(Ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Mh(t);const{type:n=Rr,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=t;let{keyframes:s}=t;const c=n||Rr;c!==Rr&&typeof s[0]!="number"&&(this.mixKeyframes=Er(K_,kh(s[0],s[1])),s=[0,100]);const l=c({...t,keyframes:s});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...s].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=Ns(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:d,repeat:f,repeatType:m,repeatDelay:g,type:y,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const _=this.currentTime-l*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let C=this.currentTime,M=r;if(f){const A=Math.min(this.currentTime,i)/s;let R=Math.floor(A),B=A%1;!B&&A>=1&&(B=1),B===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(m==="reverse"?(B=1-B,g&&(B-=g/s)):m==="mirror"&&(M=a)),C=Vt(0,1,B)*s}const x=k?{done:!1,value:d[0]}:M.next(C);o&&(x.value=o(x.value));let{done:T}=x;!k&&c!==null&&(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return E&&y!==$s&&(x.value=Us(d,this.options,b,this.speed)),v&&v(x.value),E&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return ut(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ut(t)}get time(){return ut(this.currentTime)}set time(t){t=Ct(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ye.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ut(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=I_,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Y_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const wn=e=>e*180/Math.PI,Js=e=>{const t=wn(Math.atan2(e[1],e[0]));return qs(t)},X_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Js,rotateZ:Js,skewX:e=>wn(Math.atan(e[1])),skewY:e=>wn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},qs=e=>(e=e%360,e<0&&(e+=360),e),Ch=Js,Ph=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Eh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Q_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ph,scaleY:Eh,scale:e=>(Ph(e)+Eh(e))/2,rotateX:e=>qs(wn(Math.atan2(e[6],e[5]))),rotateY:e=>qs(wn(Math.atan2(-e[2],e[0]))),rotateZ:Ch,rotate:Ch,skewX:e=>wn(Math.atan(e[4])),skewY:e=>wn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Hs(e){return e.includes("scale")?1:0}function Gs(e,t){if(!e||e==="none")return Hs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Q_,i=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=X_,i=s}if(!i)return Hs(t);const o=r[t],a=i[1].split(",").map(ew);return typeof o=="function"?o(a):a[o]}const Z_=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Gs(n,t)};function ew(e){return parseFloat(e.trim())}const Xn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qn=new Set(Xn),Ah=e=>e===Kn||e===q,tw=new Set(["x","y","z"]),nw=Xn.filter(e=>!tw.has(e));function rw(e){const t=[];return nw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const kn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Gs(t,"x"),y:(e,{transform:t})=>Gs(t,"y")};kn.translateX=kn.x,kn.translateY=kn.y;const Sn=new Set;let Ks=!1,Ys=!1,Xs=!1;function Oh(){if(Ys){const e=Array.from(Sn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=rw(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{r.getValue(o)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ys=!1,Ks=!1,Sn.forEach(e=>e.complete(Xs)),Sn.clear()}function Ih(){Sn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ys=!0)})}function iw(){Xs=!0,Ih(),Oh(),Xs=!1}class Qs{constructor(t,n,r,i,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Sn.add(this),Ks||(Ks=!0,ke.read(Ih),ke.resolveKeyframes(Oh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}Y_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Sn.delete(this)}cancel(){this.state==="scheduled"&&(Sn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ow=e=>e.startsWith("--");function aw(e,t,n){ow(t)?e.style.setProperty(t,n):e.style[t]=n}const sw=Ss(()=>window.ScrollTimeline!==void 0),cw={};function lw(e,t){const n=Ss(e);return()=>cw[t]??n()}const Dh=lw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Lh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vr([0,.65,.55,1]),circOut:Vr([.55,0,1,.45]),backIn:Vr([.31,.01,.66,-.59]),backOut:Vr([.33,1.53,.69,.99])};function jh(e,t){if(e)return typeof e=="function"?Dh()?Sh(e,t):"ease-out":ch(e)?Vr(e):Array.isArray(e)?e.map(n=>jh(n,t)||Lh.easeOut):Lh[e]}function uw(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const d={[t]:n};c&&(d.offset=c);const f=jh(s,i);Array.isArray(f)&&(d.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return l&&(m.pseudoElement=l),e.animate(d,m)}function Rh(e){return typeof e=="function"&&"applyToOptions"in e}function dw({type:e,...t}){return Rh(e)&&Dh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class fw extends zs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:s,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,ks(typeof t.type!="string");const l=dw(t);this.animation=uw(n,r,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=Us(i,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(d):aw(n,r,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ut(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ut(t)}get time(){return ut(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ct(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&sw()?(this.animation.timeline=t,lt):n(this)}}const Vh={anticipate:ih,backInOut:rh,circInOut:ah};function hw(e){return e in Vh}function pw(e){typeof e.ease=="string"&&hw(e.ease)&&(e.ease=Vh[e.ease])}const Nh=10;class mw extends fw{constructor(t){pw(t),Mh(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Ws({...a,autoplay:!1}),c=Ct(this.finishedTime??this.time);n.setWithVelocity(s.sample(c-Nh).value,s.sample(c).value,Nh),s.stop()}}const Fh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Yt.test(e)||e==="0")&&!e.startsWith("url("));function gw(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 vw(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Fh(i,t),s=Fh(o,t);return!a||!s?!1:gw(e)||(n==="spring"||Rh(n))&&r}function Zs(e){e.duration=0,e.type="keyframes"}const yw=new Set(["opacity","clipPath","filter","transform"]),bw=Ss(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function _w(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return bw()&&n&&yw.has(n)&&(n!=="transform"||!l)&&!c&&!r&&i!=="mirror"&&o!==0&&a!=="inertia"}const ww=40;class kw extends zs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",keyframes:s,name:c,motionValue:l,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ye.now();const m={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,name:c,motionValue:l,element:d,...f},g=d?.KeyframeResolver||Qs;this.keyframeResolver=new g(s,(y,v,b)=>this.onKeyframesResolved(y,v,m,!b),c,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:a,velocity:s,delay:c,isHandoff:l,onUpdate:d}=r;this.resolvedAt=Ye.now(),vw(t,o,a,s)||((Nt.instantAnimations||!c)&&d?.(Us(t,r,n)),t[0]=t[t.length-1],Zs(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ww?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!l&&_w(m)?new mw({...m,element:m.motionValue.owner.current}):new Ws(m);g.finished.then(()=>this.notifyFinished()).catch(lt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),iw()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Sw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function xw(e){const t=Sw.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Bh(e,t,n=1){const[r,i]=xw(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return Kf(a)?parseFloat(a):a}return Es(i)?Bh(i,t,n+1):i}function ec(e,t){return e?.[t]??e?.default??e}const $h=new Set(["width","height","top","left","right","bottom",...Xn]),Tw={test:e=>e==="auto",parse:e=>e},Uh=e=>t=>t.test(e),zh=[Kn,q,Pt,Kt,g_,m_,Tw],Wh=e=>zh.find(Uh(e));function Mw(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xf(e):!0}const Cw=new Set(["brightness","contrast","saturate","opacity"]);function Pw(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(As)||[];if(!r)return e;const i=n.replace(r,"");let o=Cw.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Ew=/\b([a-z-]*)\(.*?\)/gu,tc={...Yt,getAnimatableNone:e=>{const t=e.match(Ew);return t?t.map(Pw).join(" "):e}},Jh={...Kn,transform:Math.round},nc={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,radius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,backgroundPositionX:q,backgroundPositionY:q,...{rotate:Kt,rotateX:Kt,rotateY:Kt,rotateZ:Kt,scale:no,scaleX:no,scaleY:no,scaleZ:no,skew:Kt,skewX:Kt,skewY:Kt,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:Ir,originX:hh,originY:hh,originZ:q},zIndex:Jh,fillOpacity:Ir,strokeOpacity:Ir,numOctaves:Jh},Aw={...nc,color:Pe,backgroundColor:Pe,outlineColor:Pe,fill:Pe,stroke:Pe,borderColor:Pe,borderTopColor:Pe,borderRightColor:Pe,borderBottomColor:Pe,borderLeftColor:Pe,filter:tc,WebkitFilter:tc},qh=e=>Aw[e];function Hh(e,t){let n=qh(e);return n!==tc&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ow=new Set(["auto","none","0"]);function Iw(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!Ow.has(o)&&jr(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Hh(n,i)}class Dw extends Qs{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),Es(l))){const d=Bh(l,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!$h.has(r)||t.length!==2)return;const[i,o]=t,a=Wh(i),s=Wh(o);if(a!==s)if(Ah(a)&&Ah(s))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else kn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Mw(t[i]))&&r.push(i);r.length&&Iw(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=kn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,a=r[o];r[o]=kn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,c])=>{t.getValue(s).set(c)}),this.resolveNoneKeyframes()}}function Lw(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Gh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function jw(e){return Yf(e)&&"offsetHeight"in e}const Kh=30,Rw=e=>!isNaN(parseFloat(e));class Vw{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=Ye.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Rw(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new xs);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Kh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Kh);return Qf(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zn(e,t){return new Vw(e,t)}const{schedule:rc}=uh(queueMicrotask,!1),wt={x:!1,y:!1};function Yh(){return wt.x||wt.y}function Nw(e){return e==="x"||e==="y"?wt[e]?null:(wt[e]=!0,()=>{wt[e]=!1}):wt.x||wt.y?null:(wt.x=wt.y=!0,()=>{wt.x=wt.y=!1})}function Xh(e,t){const n=Lw(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Qh(e){return!(e.pointerType==="touch"||Yh())}function Fw(e,t,n={}){const[r,i,o]=Xh(e,n),a=s=>{if(!Qh(s))return;const{target:c}=s,l=t(c,s);if(typeof l!="function"||!c)return;const d=f=>{Qh(f)&&(l(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,i)};return r.forEach(s=>{s.addEventListener("pointerenter",a,i)}),o}const Zh=(e,t)=>t?e===t?!0:Zh(e,t.parentElement):!1,ic=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Bw=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $w(e){return Bw.has(e.tagName)||e.tabIndex!==-1}const ao=new WeakSet;function ep(e){return t=>{t.key==="Enter"&&e(t)}}function oc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Uw=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ep(()=>{if(ao.has(n))return;oc(n,"down");const i=ep(()=>{oc(n,"up")}),o=()=>oc(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function tp(e){return ic(e)&&!Yh()}function zw(e,t,n={}){const[r,i,o]=Xh(e,n),a=s=>{const c=s.currentTarget;if(!tp(s))return;ao.add(c);const l=t(c,s),d=(g,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),ao.has(c)&&ao.delete(c),tp(g)&&typeof l=="function"&&l(g,{success:y})},f=g=>{d(g,c===window||c===document||n.useGlobalTarget||Zh(c,g.target))},m=g=>{d(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,i),jw(s)&&(s.addEventListener("focus",l=>Uw(l,i)),!$w(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),o}function np(e){return Yf(e)&&"ownerSVGElement"in e}function Ww(e){return np(e)&&e.tagName==="svg"}const We=e=>!!(e&&e.getVelocity),Jw=[...zh,Pe,Yt],qw=e=>Jw.find(Uh(e)),rp=Ie({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Hw(e=!0){const t=me(bs);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=Oo();ee(()=>{if(e)return i(o)},[e]);const a=N(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const ip=Ie({strict:!1}),op={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},er={};for(const e in op)er[e]={isEnabled:t=>op[e].some(n=>!!t[n])};function Gw(e){for(const t in e)er[t]={...er[t],...e[t]}}const Kw=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 so(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Kw.has(e)}let ap=e=>!so(e);function Yw(e){typeof e=="function"&&(ap=t=>t.startsWith("on")?!so(t):e(t))}try{Yw(require("@emotion/is-prop-valid").default)}catch{}function Xw(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(ap(i)||n===!0&&so(i)||!t&&!so(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const co=Ie({});function lo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Nr(e){return typeof e=="string"||Array.isArray(e)}const ac=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sc=["initial",...ac];function uo(e){return lo(e.animate)||sc.some(t=>Nr(e[t]))}function sp(e){return!!(uo(e)||e.variants)}function Qw(e,t){if(uo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Nr(n)?n:void 0,animate:Nr(r)?r:void 0}}return e.inherit!==!1?t:{}}function Zw(e){const{initial:t,animate:n}=Qw(e,me(co));return Ne(()=>({initial:t,animate:n}),[cp(t),cp(n)])}function cp(e){return Array.isArray(e)?e.join(" "):e}const Fr={};function ek(e){for(const t in e)Fr[t]=e[t],Ps(t)&&(Fr[t].isCSSVariable=!0)}function lp(e,{layout:t,layoutId:n}){return Qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fr[e]||e==="opacity")}const tk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nk=Xn.length;function rk(e,t,n){let r="",i=!0;for(let o=0;o<nk;o++){const a=Xn[o],s=e[a];if(s===void 0)continue;let c=!0;if(typeof s=="number"?c=s===(a.startsWith("scale")?1:0):c=parseFloat(s)===0,!c||n){const l=Gh(s,nc[a]);if(!c){i=!1;const d=tk[a]||a;r+=`${d}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function cc(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const c in t){const l=t[c];if(Qn.has(c)){a=!0;continue}else if(Ps(c)){i[c]=l;continue}else{const d=Gh(l,nc[c]);c.startsWith("origin")?(s=!0,o[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=rk(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:l="50%",originZ:d=0}=o;r.transformOrigin=`${c} ${l} ${d}`}}const lc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function up(e,t,n){for(const r in t)!We(t[r])&&!lp(r,n)&&(e[r]=t[r])}function ik({transformTemplate:e},t){return Ne(()=>{const n=lc();return cc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ok(e,t){const n=e.style||{},r={};return up(r,n,e),Object.assign(r,ik(e,t)),r}function ak(e,t){const n={},r=ok(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 sk={offset:"stroke-dashoffset",array:"stroke-dasharray"},ck={offset:"strokeDashoffset",array:"strokeDasharray"};function lk(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?sk:ck;e[o.offset]=q.transform(-r);const a=q.transform(t),s=q.transform(n);e[o.array]=`${a} ${s}`}function dp(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},c,l,d){if(cc(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=d?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&lk(f,i,o,a,!1)}const fp=()=>({...lc(),attrs:{}}),hp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uk(e,t,n,r){const i=Ne(()=>{const o=fp();return dp(o,t,hp(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};up(o,e.style,e),i.style={...o,...i.style}}return i}const dk=["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 uc(e){return typeof e!="string"||e.includes("-")?!1:!!(dk.indexOf(e)>-1||/[A-Z]/u.test(e))}function fk(e,t,n,{latestValues:r},i,o=!1){const s=(uc(e)?uk:ak)(t,r,i,e),c=Xw(t,typeof e=="string",o),l=e!==Ke?{...c,...s,ref:n}:{},{children:d}=t,f=Ne(()=>We(d)?d.get():d,[d]);return se(e,{...l,children:f})}function pp(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function dc(e,t,n,r){if(typeof t=="function"){const[i,o]=pp(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=pp(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function fo(e){return We(e)?e.get():e}function hk({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:pk(n,r,i,e),renderState:t()}}function pk(e,t,n,r){const i={},o=r(e,{});for(const m in o)i[m]=fo(o[m]);let{initial:a,animate:s}=e;const c=uo(e),l=sp(e);t&&l&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?s:a;if(f&&typeof f!="boolean"&&!lo(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const y=dc(e,m[g]);if(y){const{transitionEnd:v,transition:b,..._}=y;for(const k in _){let C=_[k];if(Array.isArray(C)){const M=d?C.length-1:0;C=C[M]}C!==null&&(i[k]=C)}for(const k in v)i[k]=v[k]}}}return i}const mp=e=>(t,n)=>{const r=me(co),i=me(bs),o=()=>hk(e,t,r,i);return n?o():K0(o)};function fc(e,t,n){const{style:r}=e,i={};for(const o in r)(We(r[o])||t.style&&We(t.style[o])||lp(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}const mk=mp({scrapeMotionValuesFromProps:fc,createRenderState:lc});function gp(e,t,n){const r=fc(e,t,n);for(const i in e)if(We(e[i])||We(t[i])){const o=Xn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const gk=mp({scrapeMotionValuesFromProps:gp,createRenderState:fp}),vk=Symbol.for("motionComponentSymbol");function tr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function yk(e,t,n){return N(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):tr(n)&&(n.current=r))},[t])}const hc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vp="data-"+hc("framerAppearId"),yp=Ie({});function bk(e,t,n,r,i){const{visualElement:o}=me(co),a=me(ip),s=me(bs),c=me(rp).reducedMotion,l=pe(null);r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));const d=l.current,f=me(yp);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&_k(l.current,n,i,f);const m=pe(!1);No(()=>{d&&m.current&&d.update(n,s)});const g=n[vp],y=pe(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Y0(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),y.current&&d.animationState&&d.animationState.animateChanges())}),ee(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),d.enteringChildren=void 0)}),d}function _k(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bp(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&tr(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l})}function bp(e){if(e)return e.options.allowProjection!==!1?e.projection:bp(e.parent)}function pc(e,{forwardMotionProps:t=!1}={},n,r){n&&Gw(n);const i=uc(e)?gk:mk;function o(s,c){let l;const d={...me(rp),...s,layoutId:wk(s)},{isStatic:f}=d,m=Zw(s),g=i(s,f);if(!f&&ys){kk();const y=Sk(d);l=y.MeasureLayout,m.visualElement=bk(e,g,d,r,y.ProjectionNode)}return O(co.Provider,{value:m,children:[l&&m.visualElement?O(l,{visualElement:m.visualElement,...d}):null,fk(e,s,yk(g,m.visualElement,c),g,f,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=rt(o);return a[vk]=e,a}function wk({layoutId:e}){const t=me(Gf).id;return t&&e!==void 0?t+"-"+e:e}function kk(e,t){me(ip).strict}function Sk(e){const{drag:t,layout:n}=er;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function xk(e,t){if(typeof Proxy>"u")return pc;const n=new Map,r=(o,a)=>pc(o,a,e,t),i=(o,a)=>r(o,a);return new Proxy(i,{get:(o,a)=>a==="create"?r:(n.has(a)||n.set(a,pc(a,void 0,e,t)),n.get(a))})}function _p({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Tk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Mk(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function mc(e){return e===void 0||e===1}function gc({scale:e,scaleX:t,scaleY:n}){return!mc(e)||!mc(t)||!mc(n)}function xn(e){return gc(e)||wp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wp(e){return kp(e.x)||kp(e.y)}function kp(e){return e&&e!=="0%"}function ho(e,t,n){const r=e-n,i=t*r;return n+i}function Sp(e,t,n,r,i){return i!==void 0&&(e=ho(e,i,r)),ho(e,n,r)+t}function vc(e,t=0,n=1,r,i){e.min=Sp(e.min,t,n,r,i),e.max=Sp(e.max,t,n,r,i)}function xp(e,{x:t,y:n}){vc(e.x,t.translate,t.scale,t.originPoint),vc(e.y,n.translate,n.scale,n.originPoint)}const Tp=.999999999999,Mp=1.0000000000001;function Ck(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&rr(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,xp(e,a)),r&&xn(o.latestValues)&&rr(e,o.latestValues))}t.x<Mp&&t.x>Tp&&(t.x=1),t.y<Mp&&t.y>Tp&&(t.y=1)}function nr(e,t){e.min=e.min+t,e.max=e.max+t}function Cp(e,t,n,r,i=.5){const o=xe(e.min,e.max,i);vc(e,t,n,o,r)}function rr(e,t){Cp(e.x,t.x,t.scaleX,t.scale,t.originX),Cp(e.y,t.y,t.scaleY,t.scale,t.originY)}function Pp(e,t){return _p(Mk(e.getBoundingClientRect(),t))}function Pk(e,t,n){const r=Pp(e,n),{scroll:i}=t;return i&&(nr(r.x,i.offset.x),nr(r.y,i.offset.y)),r}const Ep=()=>({translate:0,scale:1,origin:0,originPoint:0}),ir=()=>({x:Ep(),y:Ep()}),Ap=()=>({min:0,max:0}),Ce=()=>({x:Ap(),y:Ap()}),yc={current:null},Op={current:!1};function Ek(){if(Op.current=!0,!!ys)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yc.current=e.matches;e.addEventListener("change",t),t()}else yc.current=!1}const Ak=new WeakMap;function Ok(e,t,n){for(const r in t){const i=t[r],o=n[r];if(We(i))e.addValue(r,i);else if(We(o))e.addValue(r,Zn(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,Zn(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ip=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ik{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qs,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=Ye.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ke.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=uo(n),this.isVariantNode=sp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&We(g)&&g.set(c[m])}}mount(t){this.current=t,Ak.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)),Op.current||Ek(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:yc.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Gt(this.notifyUpdate),Gt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Qn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in er){const n=er[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ce()}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<Ip.length;r++){const i=Ip[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Ok(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Zn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Kf(r)||Xf(r))?r=parseFloat(r):!qw(r)&&Yt.test(n)&&(r=Hh(t,n)),this.setBaseTarget(t,We(r)?r.get():r)),We(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=dc(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!We(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new xs),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){rc.render(this.render)}}class Dp extends Ik{constructor(){super(...arguments),this.KeyframeResolver=Dw}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;We(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Lp(e,{style:t,vars:n},r,i){const o=e.style;let a;for(a in t)o[a]=t[a];i?.applyProjectionStyles(o,r);for(a in n)o.setProperty(a,n[a])}function Dk(e){return window.getComputedStyle(e)}class Lk extends Dp{constructor(){super(...arguments),this.type="html",this.renderInstance=Lp}readValueFromInstance(t,n){if(Qn.has(n))return this.projection?.isProjecting?Hs(n):Z_(t,n);{const r=Dk(t),i=(Ps(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Pp(t,n)}build(t,n,r){cc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fc(t,n,r)}}const jp=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 jk(e,t,n,r){Lp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(jp.has(i)?i:hc(i),t.attrs[i])}class Rk extends Dp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ce}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qn.has(n)){const r=qh(n);return r&&r.default||0}return n=jp.has(n)?n:hc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return gp(t,n,r)}build(t,n,r){dp(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){jk(t,n,r,i)}mount(t){this.isSVGTag=hp(t.tagName),super.mount(t)}}const Vk=(e,t)=>uc(e)?new Rk(t):new Lk(t,{allowProjection:e!==Ke});function or(e,t,n){const r=e.getProps();return dc(r,t,n!==void 0?n:r.custom,e)}const bc=e=>Array.isArray(e);function Nk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zn(n))}function Fk(e){return bc(e)?e[e.length-1]||0:e}function Bk(e,t){const n=or(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=Fk(o[a]);Nk(e,a,s)}}function $k(e){return!!(We(e)&&e.add)}function _c(e,t){const n=e.getValue("willChange");if($k(n))return n.add(t);if(!n&&Nt.WillChange){const r=new Nt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Rp(e){return e.props[vp]}const Uk=e=>e!==null;function zk(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Uk),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Wk={type:"spring",stiffness:500,damping:25,restSpeed:10},Jk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qk={type:"keyframes",duration:.8},Hk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gk=(e,{keyframes:t})=>t.length>2?qk:Qn.has(e)?e.startsWith("scale")?Jk(t[1]):Wk:Hk;function Kk({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...d}){return!!Object.keys(d).length}const wc=(e,t,n,r={},i,o)=>a=>{const s=ec(r,e)||{},c=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ct(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:m=>{t.set(m),s.onUpdate&&s.onUpdate(m)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};Kk(s)||Object.assign(d,Gk(e,d)),d.duration&&(d.duration=Ct(d.duration)),d.repeatDelay&&(d.repeatDelay=Ct(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Zs(d),d.delay===0&&(f=!0)),(Nt.instantAnimations||Nt.skipAnimations)&&(f=!0,Zs(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,f&&!o&&t.get()!==void 0){const m=zk(d.keyframes,s);if(m!==void 0){ke.update(()=>{d.onUpdate(m),d.onComplete()});return}}return s.isSync?new Ws(d):new kw(d)};function Yk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Vp(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(o=r);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const d in s){const f=e.getValue(d,e.latestValues[d]??null),m=s[d];if(m===void 0||l&&Yk(l,d))continue;const g={delay:n,...ec(o||{},d)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(m)&&m===y&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const _=Rp(e);if(_){const k=window.MotionHandoffAnimation(_,d,ke);k!==null&&(g.startTime=k,v=!0)}}_c(e,d),f.start(wc(d,f,m,e.shouldReduceMotion&&$h.has(d)?{type:!1}:g,e,v));const b=f.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{ke.update(()=>{a&&Bk(e,a)})}),c}function Np(e,t,n,r=0,i=1){const o=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(o,a):i===1?o*r:s-o*r}function kc(e,t,n={}){const r=or(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Vp(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=i;return Xk(e,t,c,l,d,f,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[c,l]=s==="beforeChildren"?[o,a]:[a,o];return c().then(()=>l())}else return Promise.all([o(),a(n.delay)])}function Xk(e,t,n=0,r=0,i=0,o=1,a){const s=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),s.push(kc(c,t,{...a,delay:n+(typeof r=="function"?0:r)+Np(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(s)}function Qk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>kc(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=kc(e,t,n);else{const i=typeof t=="function"?or(e,t,n.custom):t;r=Promise.all(Vp(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Fp(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 Zk=sc.length;function Bp(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Bp(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Zk;n++){const r=sc[n],i=e.props[r];(Nr(i)||i===!1)&&(t[r]=i)}return t}const eS=[...ac].reverse(),tS=ac.length;function nS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Qk(e,n,r)))}function rS(e){let t=nS(e),n=$p(),r=!0;const i=c=>(l,d)=>{const f=or(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:m,transitionEnd:g,...y}=f;l={...l,...y,...g}}return l};function o(c){t=c(e)}function a(c){const{props:l}=e,d=Bp(e.parent)||{},f=[],m=new Set;let g={},y=1/0;for(let b=0;b<tS;b++){const _=eS[b],k=n[_],C=l[_]!==void 0?l[_]:d[_],M=Nr(C),x=_===c?k.isActive:null;x===!1&&(y=b);let T=C===d[_]&&C!==l[_]&&M;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),k.protectedKeys={...g},!k.isActive&&x===null||!C&&!k.prevProp||lo(C)||typeof C=="boolean")continue;const E=iS(k.prevProp,C);let A=E||_===c&&k.isActive&&!T&&M||b>y&&M,R=!1;const B=Array.isArray(C)?C:[C];let V=B.reduce(i(_),{});x===!1&&(V={});const{prevResolvedValues:W={}}=k,j={...W,...V},X=Y=>{A=!0,m.has(Y)&&(R=!0,m.delete(Y)),k.needsAnimating[Y]=!0;const F=e.getValue(Y);F&&(F.liveStyle=!1)};for(const Y in j){const F=V[Y],U=W[Y];if(g.hasOwnProperty(Y))continue;let H=!1;bc(F)&&bc(U)?H=!Fp(F,U):H=F!==U,H?F!=null?X(Y):m.add(Y):F!==void 0&&m.has(Y)?X(Y):k.protectedKeys[Y]=!0}k.prevProp=C,k.prevResolvedValues=V,k.isActive&&(g={...g,...V}),r&&e.blockInitialAnimation&&(A=!1);const le=T&&E;A&&(!le||R)&&f.push(...B.map(Y=>{const F={type:_};if(typeof Y=="string"&&r&&!le&&e.manuallyAnimateOnMount&&e.parent){const{parent:U}=e,H=or(U,Y);if(U.enteringChildren&&H){const{delayChildren:Oe}=H.transition||{};F.delay=Np(U.enteringChildren,e,Oe)}}return{animation:Y,options:F}}))}if(m.size){const b={};if(typeof l.initial!="boolean"){const _=or(e,Array.isArray(l.initial)?l.initial[0]:l.initial);_&&_.transition&&(b.transition=_.transition)}m.forEach(_=>{const k=e.getBaseTarget(_),C=e.getValue(_);C&&(C.liveStyle=!0),b[_]=k??null}),f.push({animation:b})}let v=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function s(c,l){if(n[c].isActive===l)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=$p()}}}function iS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Fp(t,e):!1}function Tn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $p(){return{animate:Tn(!0),whileInView:Tn(),whileHover:Tn(),whileTap:Tn(),whileDrag:Tn(),whileFocus:Tn(),exit:Tn()}}class Xt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class oS extends Xt{constructor(t){super(t),t.animationState||(t.animationState=rS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();lo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let aS=0;class sS extends Xt{constructor(){super(...arguments),this.id=aS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const cS={animation:{Feature:oS},exit:{Feature:sS}};function Br(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function $r(e){return{point:{x:e.pageX,y:e.pageY}}}const lS=e=>t=>ic(t)&&e(t,$r(t));function Ur(e,t,n,r){return Br(e,t,lS(n),r)}const Up=1e-4,uS=1-Up,dS=1+Up,zp=.01,fS=0-zp,hS=0+zp;function Ge(e){return e.max-e.min}function pS(e,t,n){return Math.abs(e-t)<=n}function Wp(e,t,n,r=.5){e.origin=r,e.originPoint=xe(t.min,t.max,e.origin),e.scale=Ge(n)/Ge(t),e.translate=xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=uS&&e.scale<=dS||isNaN(e.scale))&&(e.scale=1),(e.translate>=fS&&e.translate<=hS||isNaN(e.translate))&&(e.translate=0)}function zr(e,t,n,r){Wp(e.x,t.x,n.x,r?r.originX:void 0),Wp(e.y,t.y,n.y,r?r.originY:void 0)}function Jp(e,t,n){e.min=n.min+t.min,e.max=e.min+Ge(t)}function mS(e,t,n){Jp(e.x,t.x,n.x),Jp(e.y,t.y,n.y)}function qp(e,t,n){e.min=t.min-n.min,e.max=e.min+Ge(t)}function Wr(e,t,n){qp(e.x,t.x,n.x),qp(e.y,t.y,n.y)}function dt(e){return[e("x"),e("y")]}const Hp=({current:e})=>e?e.ownerDocument.defaultView:null,Gp=(e,t)=>Math.abs(e-t);function gS(e,t){const n=Gp(e.x,t.x),r=Gp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Kp{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=xc(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=gS(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:v}=m,{timestamp:b}=Ve;this.history.push({...v,timestamp:b});const{onStart:_,onMove:k}=this.handlers;g||(_&&_(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Sc(g,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=xc(m.type==="pointercancel"?this.lastMoveEventInfo:Sc(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,_),v&&v(m,_)},!ic(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const s=$r(t),c=Sc(s,this.transformPagePoint),{point:l}=c,{timestamp:d}=Ve;this.history=[{...l,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,xc(c,this.history)),this.removeListeners=Er(Ur(this.contextWindow,"pointermove",this.handlePointerMove),Ur(this.contextWindow,"pointerup",this.handlePointerUp),Ur(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Gt(this.updatePoint)}}function Sc(e,t){return t?{point:t(e.point)}:e}function Yp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xc({point:e},t){return{point:e,delta:Yp(e,Xp(t)),offset:Yp(e,vS(t)),velocity:yS(t,.1)}}function vS(e){return e[0]}function Xp(e){return e[e.length-1]}function yS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Xp(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ct(t)));)n--;if(!r)return{x:0,y:0};const o=ut(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function bS(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?xe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?xe(n,e,r.max):Math.min(e,n)),e}function Qp(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 _S(e,{top:t,left:n,bottom:r,right:i}){return{x:Qp(e.x,n,i),y:Qp(e.y,t,r)}}function Zp(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 wS(e,t){return{x:Zp(e.x,t.x),y:Zp(e.y,t.y)}}function kS(e,t){let n=.5;const r=Ge(e),i=Ge(t);return i>r?n=Ar(t.min,t.max-r,e.min):r>i&&(n=Ar(e.min,e.max-i,t.min)),Vt(0,1,n)}function SS(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 Tc=.35;function xS(e=Tc){return e===!1?e=0:e===!0&&(e=Tc),{x:em(e,"left","right"),y:em(e,"top","bottom")}}function em(e,t,n){return{min:tm(e,t),max:tm(e,n)}}function tm(e,t){return typeof e=="number"?e:e[t]||0}const TS=new WeakMap;class MS{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=Ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($r(f).point)},a=(f,m)=>{const{drag:g,dragPropagation:y,onDragStart:v}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Nw(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dt(_=>{let k=this.getAxisMotionValue(_).get()||0;if(Pt.test(k)){const{projection:C}=this.visualElement;if(C&&C.layout){const M=C.layout.layoutBox[_];M&&(k=Ge(M)*(parseFloat(k)/100))}}this.originPoint[_]=k}),v&&ke.postRender(()=>v(f,m)),_c(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:v,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:_}=m;if(y&&this.currentDirection===null){this.currentDirection=CS(_),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",m.point,_),this.updateAxis("y",m.point,_),this.visualElement.render(),b&&b(f,m)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>dt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Kp(t,{onSessionStart:o,onStart:a,onMove:s,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Hp(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&ke.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!po(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=bS(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&tr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=_S(r.layoutBox,t):this.constraints=!1,this.elastic=xS(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=SS(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Pk(r,i.root,this.visualElement.getTransformPagePoint());let a=wS(i.layout.layoutBox,o);if(n){const s=n(Tk(a));this.hasMutatedConstraints=!!s,s&&(a=_p(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=dt(d=>{if(!po(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return _c(this.visualElement,t),r.start(wc(t,r,0,n,this.visualElement,!1))}stopAnimation(){dt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dt(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){dt(n=>{const{drag:r}=this.getProps();if(!po(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-xe(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!tr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};dt(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const c=s.get();i[a]=kS({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),dt(a=>{if(!po(a,t,null))return;const s=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];s.set(xe(c,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;TS.set(this.visualElement,this);const t=this.visualElement.current,n=Ur(t,"pointerdown",c=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();tr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ke.read(r);const a=Br(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(dt(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=Tc,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function po(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function CS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class PS extends Xt{constructor(t){super(t),this.removeGroupControls=lt,this.removeListeners=lt,this.controls=new MS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const nm=e=>(t,n)=>{e&&ke.postRender(()=>e(t,n))};class ES extends Xt{constructor(){super(...arguments),this.removePointerDownListener=lt}onPointerDown(t){this.session=new Kp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Hp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:nm(t),onStart:nm(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&ke.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=Ur(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 mo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Jr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(q.test(e))e=parseFloat(e);else return e;const n=rm(e,t.target.x),r=rm(e,t.target.y);return`${n}% ${r}%`}},AS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Yt.parse(e);if(i.length>5)return r;const o=Yt.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=c;const l=xe(s,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}};let Mc=!1;class OS extends pt{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ek(IS),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Mc&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),mo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:a}=r;return a&&(a.isPresent=o,Mc=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ke.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),rc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Mc=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function im(e){const[t,n]=Hw(),r=me(Gf);return O(OS,{...e,layoutGroup:r,switchLayoutGroup:me(yp),isPresent:t,safeToRemove:n})}const IS={borderRadius:{...Jr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Jr,borderTopRightRadius:Jr,borderBottomLeftRadius:Jr,borderBottomRightRadius:Jr,boxShadow:AS};function DS(e,t,n){const r=We(e)?e:Zn(e);return r.start(wc("",r,t,n)),r.animation}const LS=(e,t)=>e.depth-t.depth;class jS{constructor(){this.children=[],this.isDirty=!1}add(t){_s(this.children,t),this.isDirty=!0}remove(t){ws(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LS),this.isDirty=!1,this.children.forEach(t)}}function RS(e,t){const n=Ye.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Gt(r),e(o-t))};return ke.setup(r,!0),()=>Gt(r)}const om=["TopLeft","TopRight","BottomLeft","BottomRight"],VS=om.length,am=e=>typeof e=="string"?parseFloat(e):e,sm=e=>typeof e=="number"||q.test(e);function NS(e,t,n,r,i,o){i?(e.opacity=xe(0,n.opacity??1,FS(r)),e.opacityExit=xe(t.opacity??1,0,BS(r))):o&&(e.opacity=xe(t.opacity??1,n.opacity??1,r));for(let a=0;a<VS;a++){const s=`border${om[a]}Radius`;let c=cm(t,s),l=cm(n,s);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||sm(c)===sm(l)?(e[s]=Math.max(xe(am(c),am(l),r),0),(Pt.test(l)||Pt.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=xe(t.rotate||0,n.rotate||0,r))}function cm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const FS=lm(0,.5,oh),BS=lm(.5,.95,lt);function lm(e,t,n){return r=>r<e?0:r>t?1:n(Ar(e,t,r))}function um(e,t){e.min=t.min,e.max=t.max}function ft(e,t){um(e.x,t.x),um(e.y,t.y)}function dm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function fm(e,t,n,r,i){return e-=t,e=ho(e,1/n,r),i!==void 0&&(e=ho(e,1/i,r)),e}function $S(e,t=0,n=1,r=.5,i,o=e,a=e){if(Pt.test(t)&&(t=parseFloat(t),t=xe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=xe(o.min,o.max,r);e===o&&(s-=t),e.min=fm(e.min,t,n,s,i),e.max=fm(e.max,t,n,s,i)}function hm(e,t,[n,r,i],o,a){$S(e,t[n],t[r],t[i],t.scale,o,a)}const US=["x","scaleX","originX"],zS=["y","scaleY","originY"];function pm(e,t,n,r){hm(e.x,t,US,n?n.x:void 0,r?r.x:void 0),hm(e.y,t,zS,n?n.y:void 0,r?r.y:void 0)}function mm(e){return e.translate===0&&e.scale===1}function gm(e){return mm(e.x)&&mm(e.y)}function vm(e,t){return e.min===t.min&&e.max===t.max}function WS(e,t){return vm(e.x,t.x)&&vm(e.y,t.y)}function ym(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function bm(e,t){return ym(e.x,t.x)&&ym(e.y,t.y)}function _m(e){return Ge(e.x)/Ge(e.y)}function wm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class JS{constructor(){this.members=[]}add(t){_s(this.members,t),t.scheduleRender()}remove(t){if(ws(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qS(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:d,rotateX:f,rotateY:m,skewX:g,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Cc=["","X","Y","Z"],HS=1e3;let GS=0;function Pc(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function km(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Rp(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&km(r)}function Sm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t?.()){this.id=GS++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(XS),this.nodes.forEach(t1),this.nodes.forEach(n1),this.nodes.forEach(QS)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new jS)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new xs),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const c=this.eventHandlers.get(a);c&&c.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=np(a)&&!Ww(a),this.instance=a;const{layoutId:s,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||s)&&(this.isLayoutDirty=!0),e){let d,f=0;const m=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{f=window.innerWidth}),e(a,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,d&&d(),d=RS(m,250),mo.hasAnimatedSinceResize&&(mo.hasAnimatedSinceResize=!1,this.nodes.forEach(Mm)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&l&&(s||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||s1,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=l.getProps(),_=!this.targetLayout||!bm(this.targetLayout,g),k=!f&&m;if(this.options.layoutRoot||this.resumeFrom||k||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...ec(y,"layout"),onPlay:v,onComplete:b};(l.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(d,k)}else f||Mm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(r1),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&km(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(xm);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Tm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(e1),this.nodes.forEach(KS),this.nodes.forEach(YS)):this.nodes.forEach(Tm),this.clearAllSnapshots();const s=Ye.now();Ve.delta=Vt(0,16.666666666666668,s-Ve.timestamp),Ve.timestamp=s,Ve.isProcessing=!0,Cs.update.process(Ve),Cs.preRender.process(Ve),Cs.render.process(Ve),Ve.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ZS),this.sharedNodes.forEach(i1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ge(this.snapshot.measuredBox.x)&&!Ge(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ce(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!gm(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;a&&this.instance&&(s||xn(this.latestValues)||d)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return a&&(c=this.removeTransform(c)),c1(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Ce();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(l1))){const{scroll:l}=this.root;l&&(nr(s.x,l.offset.x),nr(s.y,l.offset.y))}return s}removeElementScroll(a){const s=Ce();if(ft(s,a),this.scroll?.wasRoot)return s;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ft(s,a),nr(s.x,d.offset.x),nr(s.y,d.offset.y))}return s}applyTransform(a,s=!1){const c=Ce();ft(c,a);for(let l=0;l<this.path.length;l++){const d=this.path[l];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&rr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),xn(d.latestValues)&&rr(c,d.latestValues)}return xn(this.latestValues)&&rr(c,this.latestValues),c}removeTransform(a){const s=Ce();ft(s,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!xn(l.latestValues))continue;gc(l.latestValues)&&l.updateSnapshot();const d=Ce(),f=l.measurePageBox();ft(d,f),pm(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return xn(this.latestValues)&&pm(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ve.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==s;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Ve.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),Wr(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),ft(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ce(),this.targetWithTransforms=Ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ft(this.target,this.layout.layoutBox),xp(this.target,this.targetDelta)):ft(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),Wr(this.relativeTargetOrigin,this.target,m.target),ft(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||gc(this.parent.latestValues)||wp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ve.timestamp&&(c=!1),c)return;const{layout:l,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||d))return;ft(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Ck(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ce());const{target:g}=a;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(dm(this.prevProjectionDelta.x,this.projectionDelta.x),dm(this.prevProjectionDelta.y,this.projectionDelta.y)),zr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!wm(this.projectionDelta.x,this.prevProjectionDelta.x)||!wm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ir(),this.projectionDelta=ir(),this.projectionDeltaWithTransform=ir()}setAnimationOrigin(a,s=!1){const c=this.snapshot,l=c?c.latestValues:{},d={...this.latestValues},f=ir();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const m=Ce(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=g!==y,b=this.getStack(),_=!b||b.members.length<=1,k=!!(v&&!_&&this.options.crossfade===!0&&!this.path.some(a1));this.animationProgress=0;let C;this.mixTargetDelta=M=>{const x=M/1e3;Cm(f.x,a.x,x),Cm(f.y,a.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),o1(this.relativeTarget,this.relativeTargetOrigin,m,x),C&&WS(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Ce()),ft(C,this.relativeTarget)),v&&(this.animationValues=d,NS(d,l,this.latestValues,x,k,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{mo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zn(0)),this.currentAnimation=DS(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(HS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:c,layout:l,latestValues:d}=a;if(!(!s||!c||!l)){if(this!==a&&this.layout&&l&&Im(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ce();const f=Ge(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const m=Ge(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}ft(s,c),rr(s,d),zr(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new JS),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const l={};c.z&&Pc("z",a,l,this.animationValues);for(let d=0;d<Cc.length;d++)Pc(`rotate${Cc[d]}`,a,l,this.animationValues),Pc(`skew${Cc[d]}`,a,l,this.animationValues);a.render();for(const d in l)a.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=fo(s?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=fo(s?.pointerEvents)||""),this.hasProjected&&!xn(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=qS(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),a.transform=f;const{x:m,y:g}=this.projectionDelta;a.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,l.animationValues?a.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const y in Fr){if(d[y]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:_}=Fr[y],k=f==="none"?d[y]:v(d[y],l);if(b){const C=b.length;for(let M=0;M<C;M++)a[b[M]]=k}else _?this.options.visualElement.renderState.vars[y]=k:a[y]=k}this.options.layoutId&&(a.pointerEvents=l===this?fo(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(xm),this.root.sharedNodes.clear()}}}function KS(e){e.updateLayout()}function YS(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?dt(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],m=Ge(f);f.min=n[d].min,f.max=f.min+m}):Im(i,t.layoutBox,n)&&dt(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],m=Ge(n[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=ir();zr(a,n,t.layoutBox);const s=ir();o?zr(s,e.applyTransform(r,!0),t.measuredBox):zr(s,n,t.layoutBox);const c=!gm(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const g=Ce();Wr(g,t.layoutBox,f.layoutBox);const y=Ce();Wr(y,n,m.layoutBox),bm(g,y)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function XS(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function QS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ZS(e){e.clearSnapshot()}function xm(e){e.clearMeasurements()}function Tm(e){e.isLayoutDirty=!1}function e1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function t1(e){e.resolveTargetDelta()}function n1(e){e.calcProjection()}function r1(e){e.resetSkewAndRotation()}function i1(e){e.removeLeadSnapshot()}function Cm(e,t,n){e.translate=xe(t.translate,0,n),e.scale=xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Pm(e,t,n,r){e.min=xe(t.min,n.min,r),e.max=xe(t.max,n.max,r)}function o1(e,t,n,r){Pm(e.x,t.x,n.x,r),Pm(e.y,t.y,n.y,r)}function a1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const s1={duration:.45,ease:[.4,0,.1,1]},Em=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Am=Em("applewebkit/")&&!Em("chrome/")?Math.round:lt;function Om(e){e.min=Am(e.min),e.max=Am(e.max)}function c1(e){Om(e.x),Om(e.y)}function Im(e,t,n){return e==="position"||e==="preserve-aspect"&&!pS(_m(t),_m(n),.2)}function l1(e){return e!==e.root&&e.scroll?.wasRoot}const u1=Sm({attachResizeListener:(e,t)=>Br(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ec={current:void 0},Dm=Sm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ec.current){const e=new u1({});e.mount(window),e.setOptions({layoutScroll:!0}),Ec.current=e}return Ec.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),d1={pan:{Feature:ES},drag:{Feature:PS,ProjectionNode:Dm,MeasureLayout:im}};function Lm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&ke.postRender(()=>o(t,$r(t)))}class f1 extends Xt{mount(){const{current:t}=this.node;t&&(this.unmount=Fw(t,(n,r)=>(Lm(this.node,r,"Start"),i=>Lm(this.node,i,"End"))))}unmount(){}}class h1 extends Xt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Er(Br(this.node.current,"focus",()=>this.onFocus()),Br(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function jm(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&ke.postRender(()=>o(t,$r(t)))}class p1 extends Xt{mount(){const{current:t}=this.node;t&&(this.unmount=zw(t,(n,r)=>(jm(this.node,r,"Start"),(i,{success:o})=>jm(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ac=new WeakMap,Oc=new WeakMap,m1=e=>{const t=Ac.get(e.target);t&&t(e)},g1=e=>{e.forEach(m1)};function v1({root:e,...t}){const n=e||document;Oc.has(n)||Oc.set(n,{});const r=Oc.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(g1,{root:e,...t})),r[i]}function y1(e,t,n){const r=v1(t);return Ac.set(e,n),r.observe(e),()=>{Ac.delete(e),r.unobserve(e)}}const b1={some:0,all:1};class _1 extends Xt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:b1[i]},s=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),m=l?d:f;m&&m(c)};return y1(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(w1(t,n))&&this.startObserver()}unmount(){}}function w1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const k1={...cS,...{inView:{Feature:_1},tap:{Feature:p1},focus:{Feature:h1},hover:{Feature:f1}},...d1,...{layout:{ProjectionNode:Dm,MeasureLayout:im}}},go=xk(k1,Vk);function S1(){const{agentData:e}=Gn(),[t,n]=Z(0),r=96,i=1e4,{isMobileDevice:o}=vs();ee(()=>{const s=Date.now(),c=()=>{const l=Date.now()-s,d=Math.min(l/i*100,r);n(d),d<r&&requestAnimationFrame(c)};requestAnimationFrame(c)},[]);const a=e?.image_url;return O("div",{className:"absolute inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute inset-0 w-full h-full bg-black"}),a&&O("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center scale-125",style:{backgroundImage:`url(${a})`,filter:"blur(25px) brightness(0.5)"}}),O(go.div,{initial:{filter:"blur(12px)",opacity:0},animate:{filter:"blur(0px)",opacity:1},transition:{duration:.2,ease:"easeOut"},className:`absolute inset-0 w-full h-full flex flex-col items-center justify-center ${o?"pb-6 px-4":"pb-4 px-8 "}`,children:O("div",{className:"flex flex-col items-center text-white",children:[O("h2",{className:"text-lg font-medium mb-2 text-center",children:"You're about to speak with an AI."}),O("div",{className:"w-25 h-3 bg-white/30 rounded-full overflow-hidden mb-6",children:O("div",{className:"h-full bg-white rounded-full transition-all duration-100 ease-linear",style:{width:`${t}%`}})}),O("div",{className:"flex justify-center",children:O("span",{className:"font-light text-xs text-center text-white",children:["This call may be recorded and shared with our service providers."," ",O("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline decoration-white/50 hover:text-white transition-colors",children:"Learn more"})]})})]})})]})}const x1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),T1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Rm=e=>{const t=T1(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),M1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var C1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const P1=rt(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},c)=>se("svg",{ref:c,...C1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Vm("lucide",i),...!o&&!M1(s)&&{"aria-hidden":"true"},...s},[...a.map(([l,d])=>se(l,d)),...Array.isArray(o)?o:[o]]));const qr=(e,t)=>{const n=rt(({className:r,...i},o)=>se(P1,{ref:o,iconNode:t,className:Vm(`lucide-${x1(Rm(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Rm(e),n};const E1=qr("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const A1=qr("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const O1=qr("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const I1=qr("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);const Nm=qr("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);function Ic({msg:e,isError:t=!1,showSpinner:n=!1}){return O("div",{className:"absolute top-2 left-2 right-15 flex items-center justify-between z-10 text-white/75",children:O("div",{className:`${t?"bg-red-600/25":"bg-gray-600/25"} backdrop-blur-sm rounded-2xl py-2.5 px-4 flex-1 shadow-inset-white-10 flex items-center gap-2`,children:[n&&O(O1,{className:"animate-spin",size:16}),O("p",{className:"text-sm font-normal",children:e||"An error occurred. Please try again."})]})})}function D1(){const{agentData:e}=Gn(),{errorMsg:t,resetErrors:n}=Zi(),{resetDailyState:r}=Rt(),i=e?.image_url,o=()=>{r(),n()};return O("div",{className:"fixed inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute w-full h-full bg-black"}),i&&O("div",{className:"absolute w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${i})`,filter:"blur(25px) brightness(0.5)"}}),O(Ic,{msg:t,isError:!0}),O("button",{onClick:o,className:"absolute flex items-center justify-center","aria-label":"Play video",children:O("span",{className:"opacity-100 hover:opacity-80 transition-opacity cursor-pointer",children:O(Nm,{size:40,fill:"white",color:"none"})})})]})}const Fm=Ie(void 0);function L1({children:e}){const[t,n]=Z(""),[r,i]=Z(""),{hasJoinedRoom:o}=Rt(),{hasUserInteracted:a}=Pr(),s=ms(),c=yn({filter:"remote"}),l=pe(!1),d="hello",f=()=>{l.current=!1};return ee(()=>{if(c.length>0&&o&&a&&!l.current){l.current=!0;let g;r?(n(r),g=r):g=d,s({event:"chat-msg",message:g,name:"Guest"},"*"),i("")}},[r,o,c,a,l]),O(Fm.Provider,{value:{lastMessage:t,setLastMessage:n,queuedMessage:r,setQueuedMessage:i,resetInitMsg:f},children:e})}function Bm(){const e=me(Fm);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e}function j1({title:e,titleId:t,...n},r){return se("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?se("title",{id:t},e):null,se("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),se("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const R1=rt(j1);function V1({title:e,titleId:t,...n},r){return se("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?se("title",{id:t},e):null,se("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM12.95 3.05a.75.75 0 1 0-1.06 1.06 5.5 5.5 0 0 1 0 7.78.75.75 0 1 0 1.06 1.06 7 7 0 0 0 0-9.9Z"}),se("path",{d:"M10.828 5.172a.75.75 0 1 0-1.06 1.06 2.5 2.5 0 0 1 0 3.536.75.75 0 1 0 1.06 1.06 4 4 0 0 0 0-5.656Z"}))}const N1=rt(V1);function F1({title:e,titleId:t,...n},r){return se("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?se("title",{id:t},e):null,se("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22 1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94l-1.22-1.22Z"}))}const B1=rt(F1);function $1({title:e,titleId:t,...n},r){return se("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?se("title",{id:t},e):null,se("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"}))}const $m=rt($1),U1=rt(function({title:t,titleId:n,...r},i){return O("svg",{ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-labelledby":n,...r,children:[t?O("title",{id:n,children:t}):null,O("path",{d:"M3.33157 2.40868C3.66659 2.09013 4.19642 2.10349 4.51497 2.43851L17.0321 15.6032C17.3507 15.9382 17.3373 16.4681 17.0023 16.7866C16.6673 17.1051 16.1374 17.0918 15.8189 16.7568L3.30173 3.59208C2.98318 3.25705 2.99654 2.72722 3.33157 2.40868Z",fill:"currentColor"}),O("path",{d:"M4.6877 7.8125C5.20547 7.8125 5.6252 8.23223 5.6252 8.75C5.6252 11.1662 7.58395 13.125 10.0002 13.125C10.7088 13.125 11.3769 12.9543 11.9689 12.6553L13.301 14.0566C12.5948 14.4968 11.7951 14.8007 10.9377 14.9297V16.875H12.8127C13.3305 16.875 13.7502 17.2947 13.7502 17.8125C13.7502 18.3303 13.3305 18.75 12.8127 18.75H7.1877C6.66993 18.75 6.2502 18.3303 6.2502 17.8125C6.2502 17.2947 6.66993 16.875 7.1877 16.875H9.0627V14.9297C6.05569 14.4773 3.7502 11.8831 3.7502 8.75C3.7502 8.23223 4.16993 7.8125 4.6877 7.8125Z",fill:"currentColor"}),O("path",{d:"M15.3127 7.8125C15.8305 7.8125 16.2502 8.23223 16.2502 8.75C16.2502 9.94681 15.9127 11.0644 15.3293 12.0146L13.9709 10.5859C14.2295 10.0275 14.3752 9.4059 14.3752 8.75C14.3752 8.23223 14.7949 7.8125 15.3127 7.8125Z",fill:"currentColor"}),O("path",{d:"M10.5676 11.1826C10.3851 11.225 10.1956 11.25 10.0002 11.25C8.61949 11.25 7.5002 10.1307 7.5002 8.75V7.95508L10.5676 11.1826Z",fill:"currentColor"}),O("path",{d:"M10.0002 1.25C11.3809 1.25 12.5002 2.36929 12.5002 3.75V8.75C12.5002 8.8421 12.4943 8.93294 12.4846 9.02246L7.5002 3.78027V3.75C7.5002 2.36929 8.61949 1.25 10.0002 1.25Z",fill:"currentColor"})]})}),z1=5e3,Um="/change";function W1({onClose:e}){const[t,n]=Z(0),{lastMessage:r,setLastMessage:i,setQueuedMessage:o}=Bm(),{isMicMuted:a,setIsMicMuted:s,isAudioMuted:c,setIsAudioMuted:l}=gs(),{setHasUserInteracted:d}=Pr(),{hasJoinedRoom:f,isAgentVideoReady:m,setIsImageChangeRequested:g}=Rt(),y=ms(),v=yn({filter:"remote"}),[b,_]=Z(""),[k,C]=Z(40),[M,x]=Z(!1),T=pe(null),E=pe(null),[A]=Z(!1),[R,B]=Z(!1),[V,W]=Z(!1),{isMobileDevice:j}=vs();ee(()=>{if(!r){x(!1);return}return v.length>0&&m&&(x(!0),W(!1)),E.current!==null&&clearTimeout(E.current),E.current=window.setTimeout(()=>{W(!0),E.current=null},z1),()=>{E.current!==null&&(clearTimeout(E.current),E.current=null)}},[t,r,v,m]),ee(()=>{if(T.current&&b){T.current.style.height="auto";const U=T.current.scrollHeight,H=Math.min(U,128);T.current.style.height=`${U}px`,C(H)}else T.current&&!b&&(T.current.style.height="40px",C(40))},[b]);const X=()=>{if(d(!0),b.trim()){const U=b.trim();_(""),f&&v.length>0?(y({event:"chat-msg",message:U,name:"Guest"},"*"),U.toLowerCase().startsWith(Um)?g(!0):(i(U),n(H=>H+1))):U.toLowerCase().startsWith(Um)||o(U)}else _("")},le=U=>{const H=U.target;_(H.value)},_e=U=>{U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),X())},Y=async()=>{d(!0),s(!a)},F=()=>{l(!c)};return O(Ke,{children:[M&&O("div",{className:"absolute left-2 right-2 flex justify-center z-10",style:{bottom:`${k+24}px`},children:O("div",{onAnimationEnd:()=>{V&&(x(!1),W(!1),i(""))},style:{animation:V?"fadeOutUp 0.2s ease-out forwards":"fadeInUp 0.2s ease-out forwards"},className:"mx-auto bg-black/20 backdrop-blur-xl text-white rounded-2xl px-3 py-2 text-sm text-center max-w-[90%] overflow-hidden",children:O("div",{className:"line-clamp-4",children:r})},t)}),O("div",{className:"absolute bottom-0 left-0 right-0 p-2 flex items-end gap-1 pt-4",children:[O("div",{class:"absolute w-full h-full left-0 right-0 pointer-events-none bottom-0 z-0",children:[O("div",{class:"absolute inset-0 backdrop-blur-[1px] mask-[linear-gradient(rgba(0,0,0,0),rgba(0,0,0,1)_10%,rgba(0,0,0,1)_30%,rgba(0,0,0,0)_40%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[2px] mask-[linear-gradient(rgba(0,0,0,0)_10%,rgba(0,0,0,1)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,0)_50%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[4px] mask-[linear-gradient(rgba(0,0,0,0)_15%,rgba(0,0,0,1)_30%,rgba(0,0,0,1)_50%,rgba(0,0,0,0)_60%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[8px] mask-[linear-gradient(rgba(0,0,0,0)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,0)_70%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[16px] mask-[linear-gradient(rgba(0,0,0,0)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,1)_80%,rgba(0,0,0,0)_90%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[32px] mask-[linear-gradient(rgba(0,0,0,0)_60%,rgba(0,0,0,1)_80%)]"}),O("div",{class:"absolute inset-0 z-10 backdrop-blur-[64px] mask-[linear-gradient(rgba(0,0,0,0)_70%,rgba(0,0,0,1)_100%)]"}),O("div",{class:"absolute inset-0 bg-[linear-gradient(transparent,#000000)]"})]}),O(go.div,{className:`flex items-center w-full z-10 ${j?"justify-between":""}`,children:[!j&&O(go.div,{layout:!0,className:"flex-1",children:O("div",{className:`
|
|
38
36
|
relative flex gap-0 items-center w-full bg-white/10 hover:bg-white/15 transition-colors duration-150
|
|
39
37
|
rounded-[22px] shadow-lg shadow-inset-white-10 min-h-11
|
|
40
38
|
${R?"shadow-focused":"shadow-inset-white-10"}
|