@dynamo-caffeina-dev/locator-frontend 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(ve,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(ve=typeof globalThis<"u"?globalThis:ve||self,m(ve["@dynamo-caffeina-dev/locator-frontend"]={},ve.React,ve.ReactDOM))})(this,function(ve,m,On){"use strict";function wl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Q=wl(m);function ls(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var en={exports:{}},Tt={};/**
1
+ (function(be,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],g):(be=typeof globalThis<"u"?globalThis:be||self,g(be["@dynamo-caffeina-dev/locator-frontend"]={},be.React,be.ReactDOM))})(this,function(be,g,jn){"use strict";function wl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ee=wl(g);function ls(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nn={exports:{}},_t={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var cs;function Cl(){if(cs)return Tt;cs=1;var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(a,l,c){var u,d={},f=null,p=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!o.hasOwnProperty(u)&&(d[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:a,key:f,ref:p,props:d,_owner:s.current}}return Tt.Fragment=n,Tt.jsx=i,Tt.jsxs=i,Tt}var Pt={};/**
9
+ */var cs;function Tl(){if(cs)return _t;cs=1;var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(a,l,c){var u,d={},f=null,p=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!o.hasOwnProperty(u)&&(d[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:a,key:f,ref:p,props:d,_owner:s.current}}return _t.Fragment=n,_t.jsx=i,_t.jsxs=i,_t}var Et={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,103 +14,118 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var us;function Tl(){return us||(us=1,process.env.NODE_ENV!=="production"&&function(){var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),y=Symbol.iterator,g="@@iterator";function w(h){if(h===null||typeof h!="object")return null;var T=y&&h[y]||h[g];return typeof T=="function"?T:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(h){{for(var T=arguments.length,_=new Array(T>1?T-1:0),D=1;D<T;D++)_[D-1]=arguments[D];C("error",h,_)}}function C(h,T,_){{var D=v.ReactDebugCurrentFrame,R=D.getStackAddendum();R!==""&&(T+="%s",_=_.concat([R]));var B=_.map(function(V){return String(V)});B.unshift("Warning: "+T),Function.prototype.apply.call(console[h],console,B)}}var E=!1,S=!1,M=!1,O=!1,A=!1,N;N=Symbol.for("react.module.reference");function P(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===o||A||h===s||h===c||h===u||O||h===p||E||S||M||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===a||h.$$typeof===l||h.$$typeof===N||h.getModuleId!==void 0))}function U(h,T,_){var D=h.displayName;if(D)return D;var R=T.displayName||T.name||"";return R!==""?_+"("+R+")":_}function z(h){return h.displayName||"Context"}function ie(h){if(h==null)return null;if(typeof h.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case s:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case a:var T=h;return z(T)+".Consumer";case i:var _=h;return z(_._context)+".Provider";case l:return U(h,h.render,"ForwardRef");case d:var D=h.displayName||null;return D!==null?D:ie(h.type)||"Memo";case f:{var R=h,B=R._payload,V=R._init;try{return ie(V(B))}catch{return null}}}return null}var he=Object.assign,$e=0,bt,H,k,F,X,ye,ee;function De(){}De.__reactDisabledLog=!0;function ne(){{if($e===0){bt=console.log,H=console.info,k=console.warn,F=console.error,X=console.group,ye=console.groupCollapsed,ee=console.groupEnd;var h={configurable:!0,enumerable:!0,value:De,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}$e++}}function ze(){{if($e--,$e===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:he({},h,{value:bt}),info:he({},h,{value:H}),warn:he({},h,{value:k}),error:he({},h,{value:F}),group:he({},h,{value:X}),groupCollapsed:he({},h,{value:ye}),groupEnd:he({},h,{value:ee})})}$e<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var tt=v.ReactCurrentDispatcher,St;function nt(h,T,_){{if(St===void 0)try{throw Error()}catch(R){var D=R.stack.trim().match(/\n( *(at )?)/);St=D&&D[1]||""}return`
18
- `+St+h}}var ns=!1,Mn;{var Ym=typeof WeakMap=="function"?WeakMap:Map;Mn=new Ym}function al(h,T){if(!h||ns)return"";{var _=Mn.get(h);if(_!==void 0)return _}var D;ns=!0;var R=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var B;B=tt.current,tt.current=null,ne();try{if(T){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(ce){D=ce}Reflect.construct(h,[],V)}else{try{V.call()}catch(ce){D=ce}h.call(V.prototype)}}else{try{throw Error()}catch(ce){D=ce}h()}}catch(ce){if(ce&&D&&typeof ce.stack=="string"){for(var j=ce.stack.split(`
19
- `),ae=D.stack.split(`
20
- `),q=j.length-1,J=ae.length-1;q>=1&&J>=0&&j[q]!==ae[J];)J--;for(;q>=1&&J>=0;q--,J--)if(j[q]!==ae[J]){if(q!==1||J!==1)do if(q--,J--,J<0||j[q]!==ae[J]){var pe=`
21
- `+j[q].replace(" at new "," at ");return h.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",h.displayName)),typeof h=="function"&&Mn.set(h,pe),pe}while(q>=1&&J>=0);break}}}finally{ns=!1,tt.current=B,ze(),Error.prepareStackTrace=R}var Ct=h?h.displayName||h.name:"",rt=Ct?nt(Ct):"";return typeof h=="function"&&Mn.set(h,rt),rt}function Zm(h,T,_){return al(h,!1)}function Jm(h){var T=h.prototype;return!!(T&&T.isReactComponent)}function Ln(h,T,_){if(h==null)return"";if(typeof h=="function")return al(h,Jm(h));if(typeof h=="string")return nt(h);switch(h){case c:return nt("Suspense");case u:return nt("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return Zm(h.render);case d:return Ln(h.type,T,_);case f:{var D=h,R=D._payload,B=D._init;try{return Ln(B(R),T,_)}catch{}}}return""}var Qt=Object.prototype.hasOwnProperty,ll={},cl=v.ReactDebugCurrentFrame;function Dn(h){if(h){var T=h._owner,_=Ln(h.type,h._source,T?T.type:null);cl.setExtraStackFrame(_)}else cl.setExtraStackFrame(null)}function Qm(h,T,_,D,R){{var B=Function.call.bind(Qt);for(var V in h)if(B(h,V)){var j=void 0;try{if(typeof h[V]!="function"){var ae=Error((D||"React class")+": "+_+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ae.name="Invariant Violation",ae}j=h[V](T,V,D,_,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){j=q}j&&!(j instanceof Error)&&(Dn(R),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",D||"React class",_,V,typeof j),Dn(null)),j instanceof Error&&!(j.message in ll)&&(ll[j.message]=!0,Dn(R),x("Failed %s type: %s",_,j.message),Dn(null))}}}var eg=Array.isArray;function rs(h){return eg(h)}function tg(h){{var T=typeof Symbol=="function"&&Symbol.toStringTag,_=T&&h[Symbol.toStringTag]||h.constructor.name||"Object";return _}}function ng(h){try{return ul(h),!1}catch{return!0}}function ul(h){return""+h}function dl(h){if(ng(h))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tg(h)),ul(h)}var fl=v.ReactCurrentOwner,rg={key:!0,ref:!0,__self:!0,__source:!0},hl,pl;function sg(h){if(Qt.call(h,"ref")){var T=Object.getOwnPropertyDescriptor(h,"ref").get;if(T&&T.isReactWarning)return!1}return h.ref!==void 0}function og(h){if(Qt.call(h,"key")){var T=Object.getOwnPropertyDescriptor(h,"key").get;if(T&&T.isReactWarning)return!1}return h.key!==void 0}function ig(h,T){typeof h.ref=="string"&&fl.current}function ag(h,T){{var _=function(){hl||(hl=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",T))};_.isReactWarning=!0,Object.defineProperty(h,"key",{get:_,configurable:!0})}}function lg(h,T){{var _=function(){pl||(pl=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",T))};_.isReactWarning=!0,Object.defineProperty(h,"ref",{get:_,configurable:!0})}}var cg=function(h,T,_,D,R,B,V){var j={$$typeof:t,type:h,key:T,ref:_,props:V,_owner:B};return j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(j,"_self",{configurable:!1,enumerable:!1,writable:!1,value:D}),Object.defineProperty(j,"_source",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j};function ug(h,T,_,D,R){{var B,V={},j=null,ae=null;_!==void 0&&(dl(_),j=""+_),og(T)&&(dl(T.key),j=""+T.key),sg(T)&&(ae=T.ref,ig(T,R));for(B in T)Qt.call(T,B)&&!rg.hasOwnProperty(B)&&(V[B]=T[B]);if(h&&h.defaultProps){var q=h.defaultProps;for(B in q)V[B]===void 0&&(V[B]=q[B])}if(j||ae){var J=typeof h=="function"?h.displayName||h.name||"Unknown":h;j&&ag(V,J),ae&&lg(V,J)}return cg(h,j,ae,R,D,fl.current,V)}}var ss=v.ReactCurrentOwner,ml=v.ReactDebugCurrentFrame;function wt(h){if(h){var T=h._owner,_=Ln(h.type,h._source,T?T.type:null);ml.setExtraStackFrame(_)}else ml.setExtraStackFrame(null)}var os;os=!1;function is(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function gl(){{if(ss.current){var h=ie(ss.current.type);if(h)return`
17
+ */var us;function _l(){return us||(us=1,process.env.NODE_ENV!=="production"&&function(){var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,y="@@iterator";function S(h){if(h===null||typeof h!="object")return null;var w=m&&h[m]||h[y];return typeof w=="function"?w:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(h){{for(var w=arguments.length,E=new Array(w>1?w-1:0),k=1;k<w;k++)E[k-1]=arguments[k];C("error",h,E)}}function C(h,w,E){{var k=v.ReactDebugCurrentFrame,B=k.getStackAddendum();B!==""&&(w+="%s",E=E.concat([B]));var X=E.map(function(F){return String(F)});X.unshift("Warning: "+w),Function.prototype.apply.call(console[h],console,X)}}var A=!1,T=!1,M=!1,j=!1,P=!1,V;V=Symbol.for("react.module.reference");function _(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===o||P||h===s||h===c||h===u||j||h===p||A||T||M||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===a||h.$$typeof===l||h.$$typeof===V||h.getModuleId!==void 0))}function z(h,w,E){var k=h.displayName;if(k)return k;var B=w.displayName||w.name||"";return B!==""?E+"("+B+")":E}function $(h){return h.displayName||"Context"}function re(h){if(h==null)return null;if(typeof h.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case s:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case a:var w=h;return $(w)+".Consumer";case i:var E=h;return $(E._context)+".Provider";case l:return z(h,h.render,"ForwardRef");case d:var k=h.displayName||null;return k!==null?k:re(h.type)||"Memo";case f:{var B=h,X=B._payload,F=B._init;try{return re(F(X))}catch{return null}}}return null}var de=Object.assign,ve=0,L,U,O,R,K,xe,te;function je(){}je.__reactDisabledLog=!0;function se(){{if(ve===0){L=console.log,U=console.info,O=console.warn,R=console.error,K=console.group,xe=console.groupCollapsed,te=console.groupEnd;var h={configurable:!0,enumerable:!0,value:je,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}ve++}}function Xe(){{if(ve--,ve===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:de({},h,{value:L}),info:de({},h,{value:U}),warn:de({},h,{value:O}),error:de({},h,{value:R}),group:de({},h,{value:K}),groupCollapsed:de({},h,{value:xe}),groupEnd:de({},h,{value:te})})}ve<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ot=v.ReactCurrentDispatcher,Ct;function it(h,w,E){{if(Ct===void 0)try{throw Error()}catch(B){var k=B.stack.trim().match(/\n( *(at )?)/);Ct=k&&k[1]||""}return`
18
+ `+Ct+h}}var ns=!1,Dn;{var tg=typeof WeakMap=="function"?WeakMap:Map;Dn=new tg}function ll(h,w){if(!h||ns)return"";{var E=Dn.get(h);if(E!==void 0)return E}var k;ns=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var X;X=ot.current,ot.current=null,se();try{if(w){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(fe){k=fe}Reflect.construct(h,[],F)}else{try{F.call()}catch(fe){k=fe}h.call(F.prototype)}}else{try{throw Error()}catch(fe){k=fe}h()}}catch(fe){if(fe&&k&&typeof fe.stack=="string"){for(var N=fe.stack.split(`
19
+ `),le=k.stack.split(`
20
+ `),J=N.length-1,Q=le.length-1;J>=1&&Q>=0&&N[J]!==le[Q];)Q--;for(;J>=1&&Q>=0;J--,Q--)if(N[J]!==le[Q]){if(J!==1||Q!==1)do if(J--,Q--,Q<0||N[J]!==le[Q]){var ge=`
21
+ `+N[J].replace(" at new "," at ");return h.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",h.displayName)),typeof h=="function"&&Dn.set(h,ge),ge}while(J>=1&&Q>=0);break}}}finally{ns=!1,ot.current=X,Xe(),Error.prepareStackTrace=B}var Tt=h?h.displayName||h.name:"",at=Tt?it(Tt):"";return typeof h=="function"&&Dn.set(h,at),at}function ng(h,w,E){return ll(h,!1)}function rg(h){var w=h.prototype;return!!(w&&w.isReactComponent)}function On(h,w,E){if(h==null)return"";if(typeof h=="function")return ll(h,rg(h));if(typeof h=="string")return it(h);switch(h){case c:return it("Suspense");case u:return it("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return ng(h.render);case d:return On(h.type,w,E);case f:{var k=h,B=k._payload,X=k._init;try{return On(X(B),w,E)}catch{}}}return""}var tn=Object.prototype.hasOwnProperty,cl={},ul=v.ReactDebugCurrentFrame;function kn(h){if(h){var w=h._owner,E=On(h.type,h._source,w?w.type:null);ul.setExtraStackFrame(E)}else ul.setExtraStackFrame(null)}function sg(h,w,E,k,B){{var X=Function.call.bind(tn);for(var F in h)if(X(h,F)){var N=void 0;try{if(typeof h[F]!="function"){var le=Error((k||"React class")+": "+E+" type `"+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[F]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw le.name="Invariant Violation",le}N=h[F](w,F,k,E,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(J){N=J}N&&!(N instanceof Error)&&(kn(B),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",k||"React class",E,F,typeof N),kn(null)),N instanceof Error&&!(N.message in cl)&&(cl[N.message]=!0,kn(B),b("Failed %s type: %s",E,N.message),kn(null))}}}var og=Array.isArray;function rs(h){return og(h)}function ig(h){{var w=typeof Symbol=="function"&&Symbol.toStringTag,E=w&&h[Symbol.toStringTag]||h.constructor.name||"Object";return E}}function ag(h){try{return dl(h),!1}catch{return!0}}function dl(h){return""+h}function fl(h){if(ag(h))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ig(h)),dl(h)}var hl=v.ReactCurrentOwner,lg={key:!0,ref:!0,__self:!0,__source:!0},pl,ml;function cg(h){if(tn.call(h,"ref")){var w=Object.getOwnPropertyDescriptor(h,"ref").get;if(w&&w.isReactWarning)return!1}return h.ref!==void 0}function ug(h){if(tn.call(h,"key")){var w=Object.getOwnPropertyDescriptor(h,"key").get;if(w&&w.isReactWarning)return!1}return h.key!==void 0}function dg(h,w){typeof h.ref=="string"&&hl.current}function fg(h,w){{var E=function(){pl||(pl=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};E.isReactWarning=!0,Object.defineProperty(h,"key",{get:E,configurable:!0})}}function hg(h,w){{var E=function(){ml||(ml=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};E.isReactWarning=!0,Object.defineProperty(h,"ref",{get:E,configurable:!0})}}var pg=function(h,w,E,k,B,X,F){var N={$$typeof:t,type:h,key:w,ref:E,props:F,_owner:X};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:k}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function mg(h,w,E,k,B){{var X,F={},N=null,le=null;E!==void 0&&(fl(E),N=""+E),ug(w)&&(fl(w.key),N=""+w.key),cg(w)&&(le=w.ref,dg(w,B));for(X in w)tn.call(w,X)&&!lg.hasOwnProperty(X)&&(F[X]=w[X]);if(h&&h.defaultProps){var J=h.defaultProps;for(X in J)F[X]===void 0&&(F[X]=J[X])}if(N||le){var Q=typeof h=="function"?h.displayName||h.name||"Unknown":h;N&&fg(F,Q),le&&hg(F,Q)}return pg(h,N,le,B,k,hl.current,F)}}var ss=v.ReactCurrentOwner,gl=v.ReactDebugCurrentFrame;function wt(h){if(h){var w=h._owner,E=On(h.type,h._source,w?w.type:null);gl.setExtraStackFrame(E)}else gl.setExtraStackFrame(null)}var os;os=!1;function is(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function yl(){{if(ss.current){var h=re(ss.current.type);if(h)return`
22
22
 
23
- Check the render method of \``+h+"`."}return""}}function dg(h){return""}var yl={};function fg(h){{var T=gl();if(!T){var _=typeof h=="string"?h:h.displayName||h.name;_&&(T=`
23
+ Check the render method of \``+h+"`."}return""}}function gg(h){return""}var vl={};function yg(h){{var w=yl();if(!w){var E=typeof h=="string"?h:h.displayName||h.name;E&&(w=`
24
24
 
25
- Check the top-level render call using <`+_+">.")}return T}}function vl(h,T){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var _=fg(T);if(yl[_])return;yl[_]=!0;var D="";h&&h._owner&&h._owner!==ss.current&&(D=" It was passed a child from "+ie(h._owner.type)+"."),wt(h),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',_,D),wt(null)}}function xl(h,T){{if(typeof h!="object")return;if(rs(h))for(var _=0;_<h.length;_++){var D=h[_];is(D)&&vl(D,T)}else if(is(h))h._store&&(h._store.validated=!0);else if(h){var R=w(h);if(typeof R=="function"&&R!==h.entries)for(var B=R.call(h),V;!(V=B.next()).done;)is(V.value)&&vl(V.value,T)}}}function hg(h){{var T=h.type;if(T==null||typeof T=="string")return;var _;if(typeof T=="function")_=T.propTypes;else if(typeof T=="object"&&(T.$$typeof===l||T.$$typeof===d))_=T.propTypes;else return;if(_){var D=ie(T);Qm(_,h.props,"prop",D,h)}else if(T.PropTypes!==void 0&&!os){os=!0;var R=ie(T);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof T.getDefaultProps=="function"&&!T.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function pg(h){{for(var T=Object.keys(h.props),_=0;_<T.length;_++){var D=T[_];if(D!=="children"&&D!=="key"){wt(h),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",D),wt(null);break}}h.ref!==null&&(wt(h),x("Invalid attribute `ref` supplied to `React.Fragment`."),wt(null))}}var bl={};function Sl(h,T,_,D,R,B){{var V=P(h);if(!V){var j="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(j+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ae=dg();ae?j+=ae:j+=gl();var q;h===null?q="null":rs(h)?q="array":h!==void 0&&h.$$typeof===t?(q="<"+(ie(h.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):q=typeof h,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",q,j)}var J=ug(h,T,_,R,B);if(J==null)return J;if(V){var pe=T.children;if(pe!==void 0)if(D)if(rs(pe)){for(var Ct=0;Ct<pe.length;Ct++)xl(pe[Ct],h);Object.freeze&&Object.freeze(pe)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xl(pe,h)}if(Qt.call(T,"key")){var rt=ie(h),ce=Object.keys(T).filter(function(bg){return bg!=="key"}),as=ce.length>0?"{key: someKey, "+ce.join(": ..., ")+": ...}":"{key: someKey}";if(!bl[rt+as]){var xg=ce.length>0?"{"+ce.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+E+">.")}return w}}function xl(h,w){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var E=yg(w);if(vl[E])return;vl[E]=!0;var k="";h&&h._owner&&h._owner!==ss.current&&(k=" It was passed a child from "+re(h._owner.type)+"."),wt(h),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',E,k),wt(null)}}function bl(h,w){{if(typeof h!="object")return;if(rs(h))for(var E=0;E<h.length;E++){var k=h[E];is(k)&&xl(k,w)}else if(is(h))h._store&&(h._store.validated=!0);else if(h){var B=S(h);if(typeof B=="function"&&B!==h.entries)for(var X=B.call(h),F;!(F=X.next()).done;)is(F.value)&&xl(F.value,w)}}}function vg(h){{var w=h.type;if(w==null||typeof w=="string")return;var E;if(typeof w=="function")E=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===l||w.$$typeof===d))E=w.propTypes;else return;if(E){var k=re(w);sg(E,h.props,"prop",k,h)}else if(w.PropTypes!==void 0&&!os){os=!0;var B=re(w);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",B||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xg(h){{for(var w=Object.keys(h.props),E=0;E<w.length;E++){var k=w[E];if(k!=="children"&&k!=="key"){wt(h),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k),wt(null);break}}h.ref!==null&&(wt(h),b("Invalid attribute `ref` supplied to `React.Fragment`."),wt(null))}}var Sl={};function Cl(h,w,E,k,B,X){{var F=_(h);if(!F){var N="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(N+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var le=gg();le?N+=le:N+=yl();var J;h===null?J="null":rs(h)?J="array":h!==void 0&&h.$$typeof===t?(J="<"+(re(h.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):J=typeof h,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",J,N)}var Q=mg(h,w,E,B,X);if(Q==null)return Q;if(F){var ge=w.children;if(ge!==void 0)if(k)if(rs(ge)){for(var Tt=0;Tt<ge.length;Tt++)bl(ge[Tt],h);Object.freeze&&Object.freeze(ge)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else bl(ge,h)}if(tn.call(w,"key")){var at=re(h),fe=Object.keys(w).filter(function(_g){return _g!=="key"}),as=fe.length>0?"{key: someKey, "+fe.join(": ..., ")+": ...}":"{key: someKey}";if(!Sl[at+as]){var Tg=fe.length>0?"{"+fe.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,as,rt,xg,rt),bl[rt+as]=!0}}return h===r?pg(J):hg(J),J}}function mg(h,T,_){return Sl(h,T,_,!0)}function gg(h,T,_){return Sl(h,T,_,!1)}var yg=gg,vg=mg;Pt.Fragment=r,Pt.jsx=yg,Pt.jsxs=vg}()),Pt}var ds;function Pl(){return ds||(ds=1,process.env.NODE_ENV==="production"?en.exports=Cl():en.exports=Tl()),en.exports}var b=Pl(),st=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(st||{});const fs=e=>{let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,f))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,s,a);return a},_l=e=>e?fs(e):fs,El=e=>e;function Al(e,t=El){const n=m.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return m.useDebugValue(n),n}const hs={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_LOCATOR_DEMO_APP_API_BASE_URL:"https://develop.place-locator.airc.n3.caffeina.host/api",VITE_LOCATOR_DEMO_APP_GOOGLE_MAPS_API_KEY:"AIzaSyBPE8v1IxBu-lZ1cue8qUrTyHeZEED7ESA"},kn=new Map,tn=e=>{const t=kn.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},Ml=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=kn.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return kn.set(n.name,s),{type:"tracked",store:e,...s}},Ll=(e,t={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:i,store:a,...l}=t;let c;try{c=(o??(hs?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,r,s);const{connection:u,...d}=Ml(a,c,l);let f=!0;s.setState=(g,w,v)=>{const x=n(g,w);if(!f)return x;const C=v===void 0?{type:i||"anonymous"}:typeof v=="string"?{type:v}:v;return a===void 0?(u==null||u.send(C,r()),x):(u==null||u.send({...C,type:`${a}/${C.type}`},{...tn(l.name),[a]:s.getState()}),x)};const p=(...g)=>{const w=f;f=!1,n(...g),f=w},y=e(s.setState,r,s);if(d.type==="untracked"?u==null||u.init(y):(d.stores[d.store]=s,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([g,w])=>[g,g===d.store?y:w.getState()])))),s.dispatchFromDevtools&&typeof s.dispatch=="function"){let g=!1;const w=s.dispatch;s.dispatch=(...v)=>{(hs?"production":void 0)!=="production"&&v[0].type==="__setState"&&!g&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),g=!0),w(...v)}}return u.subscribe(g=>{var w;switch(g.type){case"ACTION":if(typeof g.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return jn(g.payload,v=>{if(v.type==="__setState"){if(a===void 0){p(v.state);return}Object.keys(v.state).length!==1&&console.error(`
30
+ <%s key={someKey} {...props} />`,as,at,Tg,at),Sl[at+as]=!0}}return h===r?xg(Q):vg(Q),Q}}function bg(h,w,E){return Cl(h,w,E,!0)}function Sg(h,w,E){return Cl(h,w,E,!1)}var Cg=Sg,wg=bg;Et.Fragment=r,Et.jsx=Cg,Et.jsxs=wg}()),Et}var ds;function El(){return ds||(ds=1,process.env.NODE_ENV==="production"?nn.exports=Tl():nn.exports=_l()),nn.exports}var x=El(),We=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(We||{});const fs=e=>{let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,f))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,s,a);return a},Pl=e=>e?fs(e):fs,Al=e=>e;function Ml(e,t=Al){const n=g.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return g.useDebugValue(n),n}const hs={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_LOCATOR_DEMO_APP_API_BASE_URL:"https://develop.place-locator.airc.n3.caffeina.host/api",VITE_LOCATOR_DEMO_APP_GOOGLE_MAPS_API_KEY:"AIzaSyBPE8v1IxBu-lZ1cue8qUrTyHeZEED7ESA"},Nn=new Map,rn=e=>{const t=Nn.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},Ll=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Nn.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return Nn.set(n.name,s),{type:"tracked",store:e,...s}},Dl=(e,t={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:i,store:a,...l}=t;let c;try{c=(o??(hs?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,r,s);const{connection:u,...d}=Ll(a,c,l);let f=!0;s.setState=(y,S,v)=>{const b=n(y,S);if(!f)return b;const C=v===void 0?{type:i||"anonymous"}:typeof v=="string"?{type:v}:v;return a===void 0?(u==null||u.send(C,r()),b):(u==null||u.send({...C,type:`${a}/${C.type}`},{...rn(l.name),[a]:s.getState()}),b)};const p=(...y)=>{const S=f;f=!1,n(...y),f=S},m=e(s.setState,r,s);if(d.type==="untracked"?u==null||u.init(m):(d.stores[d.store]=s,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([y,S])=>[y,y===d.store?m:S.getState()])))),s.dispatchFromDevtools&&typeof s.dispatch=="function"){let y=!1;const S=s.dispatch;s.dispatch=(...v)=>{(hs?"production":void 0)!=="production"&&v[0].type==="__setState"&&!y&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),y=!0),S(...v)}}return u.subscribe(y=>{var S;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Vn(y.payload,v=>{if(v.type==="__setState"){if(a===void 0){p(v.state);return}Object.keys(v.state).length!==1&&console.error(`
31
31
  [zustand devtools middleware] Unsupported __setState action format.
32
32
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
33
33
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
34
- `);const x=v.state[a];if(x==null)return;JSON.stringify(s.getState())!==JSON.stringify(x)&&p(x);return}s.dispatchFromDevtools&&typeof s.dispatch=="function"&&s.dispatch(v)});case"DISPATCH":switch(g.payload.type){case"RESET":return p(y),a===void 0?u==null?void 0:u.init(s.getState()):u==null?void 0:u.init(tn(l.name));case"COMMIT":if(a===void 0){u==null||u.init(s.getState());return}return u==null?void 0:u.init(tn(l.name));case"ROLLBACK":return jn(g.state,v=>{if(a===void 0){p(v),u==null||u.init(s.getState());return}p(v[a]),u==null||u.init(tn(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return jn(g.state,v=>{if(a===void 0){p(v);return}JSON.stringify(s.getState())!==JSON.stringify(v[a])&&p(v[a])});case"IMPORT_STATE":{const{nextLiftedState:v}=g.payload,x=(w=v.computedStates.slice(-1)[0])==null?void 0:w.state;if(!x)return;p(a===void 0?x:x[a]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return f=!f}return}}),y},jn=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)},Dl=()=>_l()(Ll(e=>({mapId:void 0,locations:[],mapDetail:st.CLUSTER,isFullscreen:!1,selectedLocation:"",shouldRefetch:!1,targetLocation:null,localizationConfig:{lang:"IT",labels:{"Search.placeholder":"La tua città","Search.geolocationButton":"Geolocalizzati","LocationList.header":"Mostra {:1} {:2} nella tua area","LocationList.locationDesignator":"luoghi","LocationList.noResults":"Nessun risultato trovato"}},featureFlags:{fullscreen:!0,search:!0},setMapId:t=>e({mapId:t}),setLocations:t=>e({locations:t}),setMapDetail:t=>e({mapDetail:t}),setFullscreen:t=>e({isFullscreen:t}),setSelectedLocation:t=>e({selectedLocation:t}),setShouldRefetch:t=>e({shouldRefetch:t}),zoomToLocation:(t,n=15)=>e({targetLocation:{coords:t,zoom:n}}),clearTargetLocation:()=>e({targetLocation:null}),setLocalizationConfig:t=>e(n=>({localizationConfig:{...n.localizationConfig,...t,labels:t.labels?{...n.localizationConfig.labels,...t.labels}:n.localizationConfig.labels}})),setFeatureFlags:t=>e(n=>({featureFlags:{...n.featureFlags,...t}}))}),{name:`LocatorStore_${Date.now()}`})),ps=m.createContext(null);function Ol({children:e}){const[t]=m.useState(Dl);return b.jsx(ps.Provider,{value:t,children:e})}function I(e){const t=m.useContext(ps);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return Al(t,e)}var Vn={exports:{}};/*!
34
+ `);const b=v.state[a];if(b==null)return;JSON.stringify(s.getState())!==JSON.stringify(b)&&p(b);return}s.dispatchFromDevtools&&typeof s.dispatch=="function"&&s.dispatch(v)});case"DISPATCH":switch(y.payload.type){case"RESET":return p(m),a===void 0?u==null?void 0:u.init(s.getState()):u==null?void 0:u.init(rn(l.name));case"COMMIT":if(a===void 0){u==null||u.init(s.getState());return}return u==null?void 0:u.init(rn(l.name));case"ROLLBACK":return Vn(y.state,v=>{if(a===void 0){p(v),u==null||u.init(s.getState());return}p(v[a]),u==null||u.init(rn(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Vn(y.state,v=>{if(a===void 0){p(v);return}JSON.stringify(s.getState())!==JSON.stringify(v[a])&&p(v[a])});case"IMPORT_STATE":{const{nextLiftedState:v}=y.payload,b=(S=v.computedStates.slice(-1)[0])==null?void 0:S.state;if(!b)return;p(a===void 0?b:b[a]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return f=!f}return}}),m},Vn=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)},Ol=()=>Pl()(Dl(e=>({mapId:void 0,locations:[],mapDetail:We.CLUSTER,isFullscreen:!1,selectedLocation:"",shouldRefetch:!1,targetLocation:null,localizationConfig:{lang:"IT",labels:{"Search.placeholder":"La tua città","Search.geolocationButton":"Geolocalizzati","LocationList.header":"Mostra {:1} {:2} nella tua area","LocationList.locationDesignator":"luoghi","LocationList.noResults":"Nessun risultato trovato","Map.areaSearchButton":"Cerca nell'area","Map.areaSearchTooltip":"Posiziona la mappa e avvia la ricerca","Map.areaSearchVisualCueCTA":"Esegui ricerca"}},featureFlags:{fullscreen:!0,search:!0},setMapId:t=>e({mapId:t}),setLocations:t=>e({locations:t}),setMapDetail:t=>e({mapDetail:t}),setFullscreen:t=>e({isFullscreen:t}),setSelectedLocation:t=>e({selectedLocation:t}),setShouldRefetch:t=>e({shouldRefetch:t}),zoomToLocation:(t,n=15)=>e({targetLocation:{coords:t,zoom:n}}),clearTargetLocation:()=>e({targetLocation:null}),setLocalizationConfig:t=>e(n=>({localizationConfig:{...n.localizationConfig,...t,labels:t.labels?{...n.localizationConfig.labels,...t.labels}:n.localizationConfig.labels}})),setFeatureFlags:t=>e(n=>({featureFlags:{...n.featureFlags,...t}}))}),{name:`LocatorStore_${Date.now()}`})),ps=g.createContext(null);function kl({children:e}){const[t]=g.useState(Ol);return x.jsx(ps.Provider,{value:t,children:e})}function I(e){const t=g.useContext(ps);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return Ml(t,e)}var In={exports:{}};/*!
35
35
  Copyright (c) 2018 Jed Watson.
36
36
  Licensed under the MIT License (MIT), see
37
37
  http://jedwatson.github.io/classnames
38
- */var ms;function kl(){return ms||(ms=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)t.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(Vn)),Vn.exports}var jl=kl();const Y=ls(jl),gs={root:"_root_11zbf_7",loaderContainer:"_loaderContainer_11zbf_100"},ys={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function _t({className:e,size:t="medium",color:n="primary",...r}){const s=Y(ys.root,e);return b.jsx("div",{className:s,"data-size":t,"data-color":n,...r,children:b.jsx("div",{className:ys.spinner})})}const Vl=m.lazy(()=>Promise.resolve().then(()=>Wm)),Nl=m.lazy(()=>Promise.resolve().then(()=>Gm)),Il=m.lazy(()=>Promise.resolve().then(()=>qm));function Rl({children:e,mapProvider:t}){const{name:n,APIKey:r,config:s}=t??{};if(!r||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const o=b.jsx("div",{className:gs.loaderContainer,children:b.jsx(_t,{size:"large",color:"primary"})});return b.jsx(m.Suspense,{fallback:o,children:(()=>{switch(n){case"mapbox":return b.jsx(Nl,{apiKey:r,...s??{},children:e});case"here":return b.jsx(Il,{apiKey:r,...s??{},children:e});case"google":return b.jsx(Vl,{apiKey:r,...s??{},children:e});default:return null}})()})}const Fl={container:"_container_17c19_4"},Et={root:"_root_3405i_4",header:"_header_3405i_14",icon:"_icon_3405i_25",body:"_body_3405i_47",content:"_content_3405i_50"};/**
38
+ */var ms;function jl(){return ms||(ms=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)t.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(In)),In.exports}var Nl=jl();const H=ls(Nl),gs={root:"_root_q2czu_7",loaderContainer:"_loaderContainer_q2czu_121"},ys={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function Pt({className:e,size:t="medium",color:n="primary",...r}){const s=H(ys.root,e);return x.jsx("div",{className:s,"data-size":t,"data-color":n,...r,children:x.jsx("div",{className:ys.spinner})})}const Vl=g.lazy(()=>Promise.resolve().then(()=>Ym)),Il=g.lazy(()=>Promise.resolve().then(()=>Jm)),Rl=g.lazy(()=>Promise.resolve().then(()=>eg));function Fl({children:e,mapProvider:t}){const{name:n,APIKey:r,config:s}=t??{};if(!r||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const o=x.jsx("div",{className:gs.loaderContainer,children:x.jsx(Pt,{size:"large",color:"primary"})});return x.jsx(g.Suspense,{fallback:o,children:(()=>{switch(n){case"mapbox":return x.jsx(Il,{apiKey:r,...s??{},children:e});case"here":return x.jsx(Rl,{apiKey:r,...s??{},children:e});case"google":return x.jsx(Vl,{apiKey:r,...s??{},children:e});default:return null}})()})}const Bl={container:"_container_17c19_4"},At={root:"_root_3405i_4",header:"_header_3405i_14",icon:"_icon_3405i_25",body:"_body_3405i_47",content:"_content_3405i_50"};/**
39
39
  * @license lucide-react v0.483.0 - ISC
40
40
  *
41
41
  * This source code is licensed under the ISC license.
42
42
  * See the LICENSE file in the root directory of this source tree.
43
- */const Bl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vs=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
43
+ */const $l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vs=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
44
44
  * @license lucide-react v0.483.0 - ISC
45
45
  *
46
46
  * This source code is licensed under the ISC license.
47
47
  * See the LICENSE file in the root directory of this source tree.
48
- */var $l={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"};/**
48
+ */var zl={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"};/**
49
49
  * @license lucide-react v0.483.0 - ISC
50
50
  *
51
51
  * This source code is licensed under the ISC license.
52
52
  * See the LICENSE file in the root directory of this source tree.
53
- */const zl=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>m.createElement("svg",{ref:l,...$l,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vs("lucide",s),...a},[...i.map(([c,u])=>m.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
53
+ */const Ul=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>g.createElement("svg",{ref:l,...zl,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vs("lucide",s),...a},[...i.map(([c,u])=>g.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
54
54
  * @license lucide-react v0.483.0 - ISC
55
55
  *
56
56
  * This source code is licensed under the ISC license.
57
57
  * See the LICENSE file in the root directory of this source tree.
58
- */const me=(e,t)=>{const n=m.forwardRef(({className:r,...s},o)=>m.createElement(zl,{ref:o,iconNode:t,className:vs(`lucide-${Bl(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
58
+ */const ce=(e,t)=>{const n=g.forwardRef(({className:r,...s},o)=>g.createElement(Ul,{ref:o,iconNode:t,className:vs(`lucide-${$l(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
59
59
  * @license lucide-react v0.483.0 - ISC
60
60
  *
61
61
  * This source code is licensed under the ISC license.
62
62
  * See the LICENSE file in the root directory of this source tree.
63
- */const Ul=me("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
63
+ */const Xl=ce("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
64
64
  * @license lucide-react v0.483.0 - ISC
65
65
  *
66
66
  * This source code is licensed under the ISC license.
67
67
  * See the LICENSE file in the root directory of this source tree.
68
- */const Xl=me("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
68
+ */const Wl=ce("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
69
69
  * @license lucide-react v0.483.0 - ISC
70
70
  *
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
- */const Wl=me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
73
+ */const Kl=ce("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
74
74
  * @license lucide-react v0.483.0 - ISC
75
75
  *
76
76
  * This source code is licensed under the ISC license.
77
77
  * See the LICENSE file in the root directory of this source tree.
78
- */const Kl=me("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
78
+ */const Gl=ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
79
79
  * @license lucide-react v0.483.0 - ISC
80
80
  *
81
81
  * This source code is licensed under the ISC license.
82
82
  * See the LICENSE file in the root directory of this source tree.
83
- */const Gl=me("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
83
+ */const ql=ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
84
84
  * @license lucide-react v0.483.0 - ISC
85
85
  *
86
86
  * This source code is licensed under the ISC license.
87
87
  * See the LICENSE file in the root directory of this source tree.
88
- */const Hl=me("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
88
+ */const Hl=ce("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
89
89
  * @license lucide-react v0.483.0 - ISC
90
90
  *
91
91
  * This source code is licensed under the ISC license.
92
92
  * See the LICENSE file in the root directory of this source tree.
93
- */const ql=me("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
93
+ */const Yl=ce("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
94
94
  * @license lucide-react v0.483.0 - ISC
95
95
  *
96
96
  * This source code is licensed under the ISC license.
97
97
  * See the LICENSE file in the root directory of this source tree.
98
- */const Yl=me("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
98
+ */const Zl=ce("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
99
99
  * @license lucide-react v0.483.0 - ISC
100
100
  *
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
- */const Zl=me("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
103
+ */const Jl=ce("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
104
104
  * @license lucide-react v0.483.0 - ISC
105
105
  *
106
106
  * This source code is licensed under the ISC license.
107
107
  * See the LICENSE file in the root directory of this source tree.
108
- */const Jl=me("SquareArrowOutUpRight",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]]);/**
108
+ */const Ql=ce("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
109
109
  * @license lucide-react v0.483.0 - ISC
110
110
  *
111
111
  * This source code is licensed under the ISC license.
112
112
  * See the LICENSE file in the root directory of this source tree.
113
- */const Ql=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xs=m.createContext({});function ec(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Nn=typeof window<"u",tc=Nn?m.useLayoutEffect:m.useEffect,In=m.createContext(null),bs=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function nc(e=!0){const t=m.useContext(In);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=m.useId();m.useEffect(()=>{if(e)return s(o)},[e]);const i=m.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}function Rn(e,t){e.indexOf(t)===-1&&e.push(t)}function Fn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const le=e=>e;let ot=le,Oe=le;process.env.NODE_ENV!=="production"&&(ot=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Oe=(e,t)=>{if(!e)throw new Error(t)});const rc={useManualTiming:!1};function Bn(e){let t;return()=>(t===void 0&&(t=e()),t)}const it=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class $n{constructor(){this.subscriptions=[]}add(t){return Rn(this.subscriptions,t),()=>Fn(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xe=e=>e*1e3,Ce=e=>e/1e3;function Ss(e,t){return t?e*(1e3/t):0}const ws=new Set;function nn(e,t,n){e||ws.has(t)||(console.warn(t),ws.add(t))}const sc=Bn(()=>window.ScrollTimeline!==void 0);class oc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(sc()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,o)=>{s&&s(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ic extends oc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function zn(e,t){return e?e[t]||e.default||e:void 0}const Un=2e4;function Cs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Un;)t+=n,r=e.next(t);return t>=Un?1/0:t}function Xn(e){return typeof e=="function"}function Ts(e,t){e.timeline=t,e.onfinish=null}const Wn=e=>Array.isArray(e)&&typeof e[0]=="number",ac={linearEasing:void 0};function lc(e,t){const n=Bn(e);return()=>{var r;return(r=ac[t])!==null&&r!==void 0?r:n()}}const rn=lc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ps=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=e(it(0,s-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function _s(e){return!!(typeof e=="function"&&rn()||!e||typeof e=="string"&&(e in Kn||rn())||Wn(e)||Array.isArray(e)&&e.every(_s))}const At=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Kn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:At([0,.65,.55,1]),circOut:At([.55,0,1,.45]),backIn:At([.31,.01,.66,-.59]),backOut:At([.33,1.53,.69,.99])};function Es(e,t){if(e)return typeof e=="function"&&rn()?Ps(e,t):Wn(e)?At(e):Array.isArray(e)?e.map(n=>Es(n,t)||Kn.easeOut):Kn[e]}const sn=["read","resolveKeyframes","update","preRender","render","postRender"],As={value:null};function cc(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,p=!1)=>{const g=p&&s?n:r;return f&&i.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),t&&As.value&&As.value.frameloop[t].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(d))}};return u}const uc=40;function Ms(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=sn.reduce((v,x)=>(v[x]=cc(o,t?x:void 0),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,p=()=>{const v=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(v-s.timestamp,uc),1),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(p))},y=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:sn.reduce((v,x)=>{const C=i[x];return v[x]=(E,S=!1,M=!1)=>(n||y(),C.schedule(E,S,M)),v},{}),cancel:v=>{for(let x=0;x<sn.length;x++)i[sn[x]].cancel(v)},state:s,steps:i}}const{schedule:$,cancel:ke,state:te,steps:Gn}=Ms(typeof requestAnimationFrame<"u"?requestAnimationFrame:le,!0),{schedule:Hn}=Ms(queueMicrotask,!1);let on;function dc(){on=void 0}const be={now:()=>(on===void 0&&be.set(te.isProcessing||rc.useManualTiming?te.timestamp:performance.now()),on),set:e=>{on=e,queueMicrotask(dc)}},ge={x:!1,y:!1};function Ls(){return ge.x||ge.y}function fc(e){return e==="x"||e==="y"?ge[e]?null:(ge[e]=!0,()=>{ge[e]=!1}):ge.x||ge.y?null:(ge.x=ge.y=!0,()=>{ge.x=ge.y=!1})}function hc(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const o=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function Ds(e,t){const n=hc(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Os(e){return!(e.pointerType==="touch"||Ls())}function pc(e,t,n={}){const[r,s,o]=Ds(e,n),i=a=>{if(!Os(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Os(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",i,s)}),o}function ks(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const js=(e,t)=>t?e===t?!0:js(e,t.parentElement):!1,qn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,mc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gc(e){return mc.has(e.tagName)||e.tabIndex!==-1}const Mt=new WeakSet;function Vs(e){return t=>{t.key==="Enter"&&e(t)}}function Yn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const yc=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vs(()=>{if(Mt.has(n))return;Yn(n,"down");const s=Vs(()=>{Yn(n,"up")}),o=()=>Yn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ns(e){return qn(e)&&!Ls()}function vc(e,t,n={}){const[r,s,o]=Ds(e,n),i=a=>{const l=a.currentTarget;if(!l||!Ns(a)||Mt.has(l))return;Mt.add(l),ks(a,"set");const c=t(l,a),u=(p,y)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),ks(p,"release"),!(!Ns(p)||!Mt.has(l))&&(Mt.delete(l),typeof c=="function"&&c(p,{success:y}))},d=p=>{(p.isTrusted?xc(p,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(p,!1):u(p,!(l instanceof Element)||js(l,p.target))},f=p=>{u(p,!1)};l.addEventListener("pointerup",d,s),l.addEventListener("pointercancel",f,s),l.addEventListener("lostpointercapture",f,s)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!gc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,s),l&&a.addEventListener("focus",c=>yc(c,s),s)}),o}function xc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Is=30,bc=e=>!isNaN(parseFloat(e));class Sc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const o=be.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=bc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&nn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new $n);const r=this.events[t].add(n);return t==="change"?()=>{r(),$.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Is)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Is);return Ss(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Lt(e,t){return new Sc(e,t)}const Rs=m.createContext({strict:!1}),Fs={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"]},at={};for(const e in Fs)at[e]={isEnabled:t=>Fs[e].some(n=>!!t[n])};function wc(e){for(const t in e)at[t]={...at[t],...e[t]}}const Cc=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 an(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Cc.has(e)}let Bs=e=>!an(e);function Tc(e){e&&(Bs=t=>t.startsWith("on")?!an(t):e(t))}try{Tc(require("@emotion/is-prop-valid").default)}catch{}function Pc(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(Bs(s)||n===!0&&an(s)||!t&&!an(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function _c(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&nn(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const ln=m.createContext({});function cn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Dt(e){return typeof e=="string"||Array.isArray(e)}const Zn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Jn=["initial",...Zn];function un(e){return cn(e.animate)||Jn.some(t=>Dt(e[t]))}function $s(e){return!!(un(e)||e.variants)}function Ec(e,t){if(un(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Dt(n)?n:void 0,animate:Dt(r)?r:void 0}}return e.inherit!==!1?t:{}}function Ac(e){const{initial:t,animate:n}=Ec(e,m.useContext(ln));return m.useMemo(()=>({initial:t,animate:n}),[zs(t),zs(n)])}function zs(e){return Array.isArray(e)?e.join(" "):e}const Mc=Symbol.for("motionComponentSymbol");function lt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Lc(e,t,n){return m.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):lt(n)&&(n.current=r))},[t])}const Qn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Us="data-"+Qn("framerAppearId"),Xs=m.createContext({});function Dc(e,t,n,r,s){var o,i;const{visualElement:a}=m.useContext(ln),l=m.useContext(Rs),c=m.useContext(In),u=m.useContext(bs).reducedMotion,d=m.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,p=m.useContext(Xs);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&Oc(d.current,n,s,p);const y=m.useRef(!1);m.useInsertionEffect(()=>{f&&y.current&&f.update(n,c)});const g=n[Us],w=m.useRef(!!g&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,g))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,g)));return tc(()=>{f&&(y.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Hn.render(f.render),w.current&&f.animationState&&f.animationState.animateChanges())}),m.useEffect(()=>{f&&(!w.current&&f.animationState&&f.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),w.current=!1))}),f}function Oc(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ws(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&lt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Ws(e){if(e)return e.options.allowProjection!==!1?e.projection:Ws(e.parent)}function kc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var o,i;e&&wc(e);function a(c,u){let d;const f={...m.useContext(bs),...c,layoutId:jc(c)},{isStatic:p}=f,y=Ac(c),g=r(c,p);if(!p&&Nn){Vc(f,e);const w=Nc(f);d=w.MeasureLayout,y.visualElement=Dc(s,g,f,t,w.ProjectionNode)}return b.jsxs(ln.Provider,{value:y,children:[d&&y.visualElement?b.jsx(d,{visualElement:y.visualElement,...f}):null,n(s,c,Lc(g,y.visualElement,u),g,p,y.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(i=(o=s.displayName)!==null&&o!==void 0?o:s.name)!==null&&i!==void 0?i:""})`}`;const l=m.forwardRef(a);return l[Mc]=s,l}function jc({layoutId:e}){const t=m.useContext(xs).id;return t&&e!==void 0?t+"-"+e:e}function Vc(e,t){const n=m.useContext(Rs).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ot(!1,r):Oe(!1,r)}}function Nc(e){const{drag:t,layout:n}=at;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Ks=e=>t=>typeof t=="string"&&t.startsWith(e),er=Ks("--"),Ic=Ks("var(--"),tr=e=>Ic(e)?Rc.test(e.split("/*")[0].trim()):!1,Rc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ot={};function Fc(e){for(const t in e)Ot[t]=e[t],er(t)&&(Ot[t].isCSSVariable=!0)}const ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ue=new Set(ct);function Gs(e,{layout:t,layoutId:n}){return Ue.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ot[e]||e==="opacity")}const re=e=>!!(e&&e.getVelocity),Hs=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Te=(e,t,n)=>n>t?t:n<e?e:n,ut={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kt={...ut,transform:e=>Te(0,1,e)},dn={...ut,default:1},jt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),je=jt("deg"),Se=jt("%"),L=jt("px"),Bc=jt("vh"),$c=jt("vw"),qs={...Se,parse:e=>Se.parse(e)/100,transform:e=>Se.transform(e*100)},zc={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,backgroundPositionX:L,backgroundPositionY:L},Uc={rotate:je,rotateX:je,rotateY:je,rotateZ:je,scale:dn,scaleX:dn,scaleY:dn,scaleZ:dn,skew:je,skewX:je,skewY:je,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:kt,originX:qs,originY:qs,originZ:L},Ys={...ut,transform:Math.round},nr={...zc,...Uc,zIndex:Ys,size:L,fillOpacity:kt,strokeOpacity:kt,numOctaves:Ys},Xc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Wc=ct.length;function Kc(e,t,n){let r="",s=!0;for(let o=0;o<Wc;o++){const i=ct[o],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Hs(a,nr[i]);if(!l){s=!1;const u=Xc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function rr(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Ue.has(l)){i=!0;continue}else if(er(l)){s[l]=c;continue}else{const u=Hs(c,nr[l]);l.startsWith("origin")?(a=!0,o[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=Kc(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;r.transformOrigin=`${l} ${c} ${u}`}}const sr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zs(e,t,n){for(const r in t)!re(t[r])&&!Gs(r,n)&&(e[r]=t[r])}function Gc({transformTemplate:e},t){return m.useMemo(()=>{const n=sr();return rr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Hc(e,t){const n=e.style||{},r={};return Zs(r,n,e),Object.assign(r,Gc(e,t)),r}function qc(e,t){const n={},r=Hc(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 Yc=["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 or(e){return typeof e!="string"||e.includes("-")?!1:!!(Yc.indexOf(e)>-1||/[A-Z]/u.test(e))}const Zc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Jc={offset:"strokeDashoffset",array:"strokeDasharray"};function Qc(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?Zc:Jc;e[o.offset]=L.transform(-r);const i=L.transform(t),a=L.transform(n);e[o.array]=`${i} ${a}`}function Js(e,t,n){return typeof e=="string"?e:L.transform(t+n*e)}function eu(e,t,n){const r=Js(t,e.x,e.width),s=Js(n,e.y,e.height);return`${r} ${s}`}function ir(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(rr(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:y}=e;f.transform&&(y&&(p.transform=f.transform),delete f.transform),y&&(s!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=eu(y,s!==void 0?s:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&Qc(f,i,a,l,!1)}const Qs=()=>({...sr(),attrs:{}}),ar=e=>typeof e=="string"&&e.toLowerCase()==="svg";function tu(e,t,n,r){const s=m.useMemo(()=>{const o=Qs();return ir(o,t,ar(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Zs(o,e.style,e),s.style={...o,...s.style}}return s}function nu(e=!1){return(n,r,s,{latestValues:o},i)=>{const l=(or(n)?tu:qc)(r,o,i,n),c=Pc(r,typeof n=="string",e),u=n!==m.Fragment?{...c,...l,ref:s}:{},{children:d}=r,f=m.useMemo(()=>re(d)?d.get():d,[d]);return m.createElement(n,{...u,children:f})}}function eo(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function lr(e,t,n,r){if(typeof t=="function"){const[s,o]=eo(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=eo(r);t=t(n!==void 0?n:e.custom,s,o)}return t}const cr=e=>Array.isArray(e),ru=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),su=e=>cr(e)?e[e.length-1]||0:e;function fn(e){const t=re(e)?e.get():e;return ru(t)?t.toValue():t}function ou({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,o){const i={latestValues:iu(r,s,o,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const to=e=>(t,n)=>{const r=m.useContext(ln),s=m.useContext(In),o=()=>ou(e,t,r,s);return n?o():ec(o)};function iu(e,t,n,r){const s={},o=r(e,{});for(const f in o)s[f]=fn(o[f]);let{initial:i,animate:a}=e;const l=un(e),c=$s(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!cn(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const y=lr(e,f[p]);if(y){const{transitionEnd:g,transition:w,...v}=y;for(const x in v){let C=v[x];if(Array.isArray(C)){const E=u?C.length-1:0;C=C[E]}C!==null&&(s[x]=C)}for(const x in g)s[x]=g[x]}}}return s}function ur(e,t,n){var r;const{style:s}=e,o={};for(const i in s)(re(s[i])||t.style&&re(t.style[i])||Gs(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[i]=s[i]);return o}const au={useVisualState:to({scrapeMotionValuesFromProps:ur,createRenderState:sr})};function no(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ro(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const so=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 oo(e,t,n,r){ro(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(so.has(s)?s:Qn(s),t.attrs[s])}function io(e,t,n){const r=ur(e,t,n);for(const s in e)if(re(e[s])||re(t[s])){const o=ct.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const ao=["x","y","width","height","cx","cy","r"],lu={useVisualState:to({scrapeMotionValuesFromProps:io,createRenderState:Qs,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let o=!!e.drag;if(!o){for(const a in s)if(Ue.has(a)){o=!0;break}}if(!o)return;let i=!t;if(t)for(let a=0;a<ao.length;a++){const l=ao[a];e[l]!==t[l]&&(i=!0)}i&&$.read(()=>{no(n,r),$.render(()=>{ir(r,s,ar(n.tagName),e.transformTemplate),oo(n,r)})})}})};function cu(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const i={...or(r)?lu:au,preloadedFeatures:e,useRender:nu(s),createVisualElement:t,Component:r};return kc(i)}}function Vt(e,t,n){const r=e.getProps();return lr(r,t,n!==void 0?n:r.custom,e)}const lo=new Set(["width","height","top","left","right","bottom",...ct]);function uu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Lt(n))}function du(e,t){const n=Vt(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=su(o[i]);uu(e,i,a)}}function fu(e){return!!(re(e)&&e.add)}function dr(e,t){const n=e.getValue("willChange");if(fu(n))return n.add(t)}function co(e){return e.props[Us]}const uo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,hu=1e-7,pu=12;function mu(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=uo(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>hu&&++a<pu);return i}function Nt(e,t,n,r){if(e===t&&n===r)return le;const s=o=>mu(o,0,1,e,n);return o=>o===0||o===1?o:uo(s(o),t,r)}const fo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ho=e=>t=>1-e(1-t),po=Nt(.33,1.53,.69,.99),fr=ho(po),mo=fo(fr),go=e=>(e*=2)<1?.5*fr(e):.5*(2-Math.pow(2,-10*(e-1))),hr=e=>1-Math.sin(Math.acos(e)),yo=ho(hr),vo=fo(hr),xo=e=>/^0[^.\s]+$/u.test(e);function gu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xo(e):!0}const It=e=>Math.round(e*1e5)/1e5,pr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function yu(e){return e==null}const vu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mr=(e,t)=>n=>!!(typeof n=="string"&&vu.test(n)&&n.startsWith(e)||t&&!yu(n)&&Object.prototype.hasOwnProperty.call(n,t)),bo=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(pr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},xu=e=>Te(0,255,e),gr={...ut,transform:e=>Math.round(xu(e))},Xe={test:mr("rgb","red"),parse:bo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+gr.transform(e)+", "+gr.transform(t)+", "+gr.transform(n)+", "+It(kt.transform(r))+")"};function bu(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const yr={test:mr("#"),parse:bu,transform:Xe.transform},dt={test:mr("hsl","hue"),parse:bo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Se.transform(It(t))+", "+Se.transform(It(n))+", "+It(kt.transform(r))+")"},se={test:e=>Xe.test(e)||yr.test(e)||dt.test(e),parse:e=>Xe.test(e)?Xe.parse(e):dt.test(e)?dt.parse(e):yr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xe.transform(e):dt.transform(e)},Su=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function wu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Su))===null||n===void 0?void 0:n.length)||0)>0}const So="number",wo="color",Cu="var",Tu="var(",Co="${}",Pu=/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 Rt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Pu,l=>(se.test(l)?(r.color.push(o),s.push(wo),n.push(se.parse(l))):l.startsWith(Tu)?(r.var.push(o),s.push(Cu),n.push(l)):(r.number.push(o),s.push(So),n.push(parseFloat(l))),++o,Co)).split(Co);return{values:n,split:a,indexes:r,types:s}}function To(e){return Rt(e).values}function Po(e){const{split:t,types:n}=Rt(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const a=n[i];a===So?o+=It(s[i]):a===wo?o+=se.transform(s[i]):o+=s[i]}return o}}const _u=e=>typeof e=="number"?0:e;function Eu(e){const t=To(e);return Po(e)(t.map(_u))}const Ve={test:wu,parse:To,createTransformer:Po,getAnimatableNone:Eu},Au=new Set(["brightness","contrast","saturate","opacity"]);function Mu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(pr)||[];if(!r)return e;const s=n.replace(r,"");let o=Au.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const Lu=/\b([a-z-]*)\(.*?\)/gu,vr={...Ve,getAnimatableNone:e=>{const t=e.match(Lu);return t?t.map(Mu).join(" "):e}},Du={...nr,color:se,backgroundColor:se,outlineColor:se,fill:se,stroke:se,borderColor:se,borderTopColor:se,borderRightColor:se,borderBottomColor:se,borderLeftColor:se,filter:vr,WebkitFilter:vr},_o=e=>Du[e];function Eo(e,t){let n=_o(e);return n!==vr&&(n=Ve),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ou=new Set(["auto","none","0"]);function ku(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!Ou.has(o)&&Rt(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Eo(n,s)}const We=e=>e*180/Math.PI,xr=e=>{const t=We(Math.atan2(e[1],e[0]));return br(t)},ju={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:xr,rotateZ:xr,skewX:e=>We(Math.atan(e[1])),skewY:e=>We(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},br=e=>(e=e%360,e<0&&(e+=360),e),Ao=xr,Mo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Lo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Vu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Mo,scaleY:Lo,scale:e=>(Mo(e)+Lo(e))/2,rotateX:e=>br(We(Math.atan2(e[6],e[5]))),rotateY:e=>br(We(Math.atan2(-e[2],e[0]))),rotateZ:Ao,rotate:Ao,skewX:e=>We(Math.atan(e[4])),skewY:e=>We(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Do(e){return e.includes("scale")?1:0}function Sr(e,t){if(!e||e==="none")return Do(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Vu,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ju,s=a}if(!s)return Do(t);const o=r[t],i=s[1].split(",").map(Iu);return typeof o=="function"?o(i):i[o]}const Nu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Sr(n,t)};function Iu(e){return parseFloat(e.trim())}const Oo=e=>e===ut||e===L,Ru=new Set(["x","y","z"]),Fu=ct.filter(e=>!Ru.has(e));function Bu(e){const t=[];return Fu.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ft={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})=>Sr(t,"x"),y:(e,{transform:t})=>Sr(t,"y")};ft.translateX=ft.x,ft.translateY=ft.y;const Ke=new Set;let wr=!1,Cr=!1;function ko(){if(Cr){const e=Array.from(Ke).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Bu(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var a;(a=r.getValue(o))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Cr=!1,wr=!1,Ke.forEach(e=>e.complete()),Ke.clear()}function jo(){Ke.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Cr=!0)})}function $u(){jo(),ko()}class Tr{constructor(t,n,r,s,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ke.add(this),wr||(wr=!0,$.read(jo),$.resolveKeyframes(ko))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const i=s==null?void 0:s.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&i===void 0&&s.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ke.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ke.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Vo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),zu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Uu(e){const t=zu.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Xu=4;function No(e,t,n=1){Oe(n<=Xu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=Uu(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return Vo(i)?parseFloat(i):i}return tr(s)?No(s,t,n+1):s}const Io=e=>t=>t.test(e),Ro=[ut,L,Se,je,$c,Bc,{test:e=>e==="auto",parse:e=>e}],Fo=e=>Ro.find(Io(e));class Bo extends Tr{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),tr(c))){const u=No(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!lo.has(r)||t.length!==2)return;const[s,o]=t,i=Fo(s),a=Fo(o);if(i!==a)if(Oo(i)&&Oo(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)gu(t[s])&&r.push(s);r.length&&ku(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=ft[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const i=s.length-1,a=s[i];s[i]=ft[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const $o=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ve.test(e)||e==="0")&&!e.startsWith("url("));function Wu(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 Ku(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=$o(s,t),a=$o(o,t);return ot(i===a,`You are trying to animate ${t} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!i||!a?!1:Wu(e)||(n==="spring"||Xn(n))&&r}const Gu=e=>e!==null;function hn(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Gu),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const Hu=40;class zo{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=be.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Hu?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&$u(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=be.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:o,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Ku(t,r,s,o))if(i)this.options.duration=0;else{l&&l(hn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const W=(e,t,n)=>e+(t-e)*n;function Pr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qu({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Pr(l,a,e+1/3),o=Pr(l,a,e),i=Pr(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function pn(e,t){return n=>n>0?t:e}const _r=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Yu=[yr,Xe,dt],Zu=e=>Yu.find(t=>t.test(e));function Uo(e){const t=Zu(e);if(ot(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===dt&&(n=qu(n)),n}const Xo=(e,t)=>{const n=Uo(e),r=Uo(t);if(!n||!r)return pn(e,t);const s={...n};return o=>(s.red=_r(n.red,r.red,o),s.green=_r(n.green,r.green,o),s.blue=_r(n.blue,r.blue,o),s.alpha=W(n.alpha,r.alpha,o),Xe.transform(s))},Ju=(e,t)=>n=>t(e(n)),Ft=(...e)=>e.reduce(Ju),Er=new Set(["none","hidden"]);function Qu(e,t){return Er.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ed(e,t){return n=>W(e,t,n)}function Ar(e){return typeof e=="number"?ed:typeof e=="string"?tr(e)?pn:se.test(e)?Xo:rd:Array.isArray(e)?Wo:typeof e=="object"?se.test(e)?Xo:td:pn}function Wo(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>Ar(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function td(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Ar(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function nd(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][s[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[o]=l,s[i]++}return r}const rd=(e,t)=>{const n=Ve.createTransformer(t),r=Rt(e),s=Rt(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Er.has(e)&&!s.values.length||Er.has(t)&&!r.values.length?Qu(e,t):Ft(Wo(nd(r,s),s.values),n):(ot(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),pn(e,t))};function Ko(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?W(e,t,n):Ar(e)(e,t)}const sd=5;function Go(e,t,n){const r=Math.max(t-sd,0);return Ss(n-e(r),t-r)}const K={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},Ho=.001;function od({duration:e=K.duration,bounce:t=K.bounce,velocity:n=K.velocity,mass:r=K.mass}){let s,o;ot(e<=xe(K.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Te(K.minDamping,K.maxDamping,i),e=Te(K.minDuration,K.maxDuration,Ce(e)),i<1?(s=c=>{const u=c*i,d=u*e,f=u-n,p=Mr(c,i),y=Math.exp(-d);return Ho-f/p*y},o=c=>{const d=c*i*e,f=d*n+n,p=Math.pow(i,2)*Math.pow(c,2)*e,y=Math.exp(-d),g=Mr(Math.pow(c,2),i);return(-s(c)+Ho>0?-1:1)*((f-p)*y)/g}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=ad(s,o,a);if(e=xe(e),isNaN(l))return{stiffness:K.stiffness,damping:K.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const id=12;function ad(e,t,n){let r=n;for(let s=1;s<id;s++)r=r-e(r)/t(r);return r}function Mr(e,t){return e*Math.sqrt(1-t*t)}const ld=["duration","bounce"],cd=["stiffness","damping","mass"];function qo(e,t){return t.some(n=>e[n]!==void 0)}function ud(e){let t={velocity:K.velocity,stiffness:K.stiffness,damping:K.damping,mass:K.mass,isResolvedFromDuration:!1,...e};if(!qo(e,cd)&&qo(e,ld))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Te(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:K.mass,stiffness:s,damping:o}}else{const n=od(e);t={...t,...n,mass:K.mass},t.isResolvedFromDuration=!0}return t}function Yo(e=K.visualDuration,t=K.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=ud({...n,velocity:-Ce(n.velocity||0)}),y=f||0,g=c/(2*Math.sqrt(l*u)),w=i-o,v=Ce(Math.sqrt(l/u)),x=Math.abs(w)<5;r||(r=x?K.restSpeed.granular:K.restSpeed.default),s||(s=x?K.restDelta.granular:K.restDelta.default);let C;if(g<1){const S=Mr(v,g);C=M=>{const O=Math.exp(-g*v*M);return i-O*((y+g*v*w)/S*Math.sin(S*M)+w*Math.cos(S*M))}}else if(g===1)C=S=>i-Math.exp(-v*S)*(w+(y+v*w)*S);else{const S=v*Math.sqrt(g*g-1);C=M=>{const O=Math.exp(-g*v*M),A=Math.min(S*M,300);return i-O*((y+g*v*w)*Math.sinh(A)+S*w*Math.cosh(A))/S}}const E={calculatedDuration:p&&d||null,next:S=>{const M=C(S);if(p)a.done=S>=d;else{let O=0;g<1&&(O=S===0?xe(y):Go(C,S,M));const A=Math.abs(O)<=r,N=Math.abs(i-M)<=s;a.done=A&&N}return a.value=a.done?i:M,a},toString:()=>{const S=Math.min(Cs(E),Un),M=Ps(O=>E.next(S*O).value,S,30);return S+"ms "+M}};return E}function Zo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=A=>a!==void 0&&A<a||l!==void 0&&A>l,y=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let g=n*t;const w=d+g,v=i===void 0?w:i(w);v!==w&&(g=v-d);const x=A=>-g*Math.exp(-A/r),C=A=>v+x(A),E=A=>{const N=x(A),P=C(A);f.done=Math.abs(N)<=c,f.value=f.done?v:P};let S,M;const O=A=>{p(f.value)&&(S=A,M=Yo({keyframes:[f.value,y(f.value)],velocity:Go(C,A,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return O(0),{calculatedDuration:null,next:A=>{let N=!1;return!M&&S===void 0&&(N=!0,E(A),O(A)),S!==void 0&&A>=S?M.next(A-S):(!N&&E(A),f)}}}const dd=Nt(.42,0,1,1),fd=Nt(0,0,.58,1),Jo=Nt(.42,0,.58,1),hd=e=>Array.isArray(e)&&typeof e[0]!="number",Qo={linear:le,easeIn:dd,easeInOut:Jo,easeOut:fd,circIn:hr,circInOut:vo,circOut:yo,backIn:fr,backInOut:mo,backOut:po,anticipate:go},ei=e=>{if(Wn(e)){Oe(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return Nt(t,n,r,s)}else if(typeof e=="string")return Oe(Qo[e]!==void 0,`Invalid easing type '${e}'`),Qo[e];return e};function pd(e,t,n){const r=[],s=n||Ko,o=e.length-1;for(let i=0;i<o;i++){let a=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||le:t;a=Ft(l,a)}r.push(a)}return r}function md(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Oe(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=pd(t,r,s),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=it(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Te(e[0],e[o-1],u)):c}function gd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=it(0,t,r);e.push(W(n,1,s))}}function yd(e){const t=[0];return gd(t,e.length-1),t}function vd(e,t){return e.map(n=>n*t)}function xd(e,t){return e.map(()=>t||Jo).splice(0,e.length-1)}function Bt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=hd(r)?r.map(ei):ei(r),o={done:!1,value:t[0]},i=vd(n&&n.length===t.length?n:yd(t),e),a=md(i,t,{ease:Array.isArray(s)?s:xd(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const bd=e=>{const t=({timestamp:n})=>e(n);return{start:()=>$.update(t,!0),stop:()=>ke(t),now:()=>te.isProcessing?te.timestamp:be.now()}},Sd={decay:Zo,inertia:Zo,tween:Bt,keyframes:Bt,spring:Yo},wd=e=>e/100;class Lr extends zo{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:o}=this.options,i=(s==null?void 0:s.KeyframeResolver)||Tr,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(o,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=this.options,a=Xn(n)?n:Sd[n]||Bt;let l,c;process.env.NODE_ENV!=="production"&&a!==Bt&&Oe(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Bt&&typeof t[0]!="number"&&(l=Ft(wd,Ko(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});o==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Cs(u));const{calculatedDuration:d}=u,f=d+s,p=f*(r+1)-s;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:s,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:p,repeatType:y,repeatDelay:g,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let C=this.currentTime,E=o;if(p){const A=Math.min(this.currentTime,u)/d;let N=Math.floor(A),P=A%1;!P&&A>=1&&(P=1),P===1&&N--,N=Math.min(N,p+1),!!(N%2)&&(y==="reverse"?(P=1-P,g&&(P-=g/d)):y==="mirror"&&(E=i)),C=Te(0,1,P)*d}const S=x?{done:!1,value:l[0]}:E.next(C);a&&(S.value=a(S.value));let{done:M}=S;!x&&c!==null&&(M=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return O&&s!==void 0&&(S.value=hn(l,this.options,s)),w&&w(S.value),O&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Ce(t.calculatedDuration):0}get time(){return Ce(this.currentTime)}set time(t){t=xe(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ce(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=bd,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Cd=new Set(["opacity","clipPath","filter","transform"]);function Td(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Es(a,s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"})}const Pd=Bn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),mn=10,_d=2e4;function Ed(e){return Xn(e.type)||e.type==="spring"||!_s(e.ease)}function Ad(e,t){const n=new Lr({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let o=0;for(;!r.done&&o<_d;)r=n.sample(o),s.push(r.value),o+=mn;return{times:void 0,keyframes:s,duration:o-mn,ease:"linear"}}const ti={anticipate:go,backInOut:mo,circInOut:vo};function Md(e){return e in ti}class ni extends zo{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:o}=this.options;this.resolver=new Bo(o,(i,a)=>this.onKeyframesResolved(i,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:o,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&rn()&&Md(o)&&(o=ti[o]),Ed(this.options)){const{onComplete:d,onUpdate:f,motionValue:p,element:y,...g}=this.options,w=Ad(t,g);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,s=w.times,o=w.ease,i="keyframes"}const u=Td(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:o});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Ts(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(hn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:i,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ce(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ce(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=xe(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return le;const{animation:r}=n;Ts(r,t)}return le}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:o,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...p}=this.options,y=new Lr({...p,keyframes:r,duration:s,type:o,ease:i,times:a,isGenerator:!0}),g=xe(this.time);c.setWithVelocity(y.sample(g-mn).value,y.sample(g).value,mn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:o,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Pd()&&r&&Cd.has(r)&&!l&&!c&&!s&&o!=="mirror"&&i!==0&&a!=="inertia"}}const Ld={type:"spring",stiffness:500,damping:25,restSpeed:10},Dd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Od={type:"keyframes",duration:.8},kd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jd=(e,{keyframes:t})=>t.length>2?Od:Ue.has(e)?e.startsWith("scale")?Dd(t[1]):Ld:kd;function Vd({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Dr=(e,t,n,r={},s,o)=>i=>{const a=zn(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-xe(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};Vd(a)||(u={...u,...jd(e,u)}),u.duration&&(u.duration=xe(u.duration)),u.repeatDelay&&(u.repeatDelay=xe(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=hn(u.keyframes,a);if(f!==void 0)return $.update(()=>{u.onUpdate(f),u.onComplete()}),new ic([])}return!o&&ni.supports(u)?new ni(u):new Lr(u)};function Nd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ri(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var o;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const d in l){const f=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),p=l[d];if(p===void 0||u&&Nd(u,d))continue;const y={delay:n,...zn(i||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=co(e);if(v){const x=window.MotionHandoffAnimation(v,d,$);x!==null&&(y.startTime=x,g=!0)}}dr(e,d),f.start(Dr(d,f,p,e.shouldReduceMotion&&lo.has(d)?{type:!1}:y,e,g));const w=f.animation;w&&c.push(w)}return a&&Promise.all(c).then(()=>{$.update(()=>{a&&du(e,a)})}),c}function Or(e,t,n={}){var r;const s=Vt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const i=s?()=>Promise.all(ri(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=o;return Id(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Id(e,t,n=0,r=0,s=1,o){const i=[],a=(e.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(Rd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Or(c,t,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Rd(e,t){return e.sortNodePosition(t)}function Fd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Or(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Or(e,t,n);else{const s=typeof t=="function"?Vt(e,t,n.custom):t;r=Promise.all(ri(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function si(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 Bd=Jn.length;function oi(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?oi(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Bd;n++){const r=Jn[n],s=e.props[r];(Dt(s)||s===!1)&&(t[r]=s)}return t}const $d=[...Zn].reverse(),zd=Zn.length;function Ud(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Fd(e,n,r)))}function Xd(e){let t=Ud(e),n=ii(),r=!0;const s=l=>(c,u)=>{var d;const f=Vt(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:y,...g}=f;c={...c,...g,...y}}return c};function o(l){t=l(e)}function i(l){const{props:c}=e,u=oi(e.parent)||{},d=[],f=new Set;let p={},y=1/0;for(let w=0;w<zd;w++){const v=$d[w],x=n[v],C=c[v]!==void 0?c[v]:u[v],E=Dt(C),S=v===l?x.isActive:null;S===!1&&(y=w);let M=C===u[v]&&C!==c[v]&&E;if(M&&r&&e.manuallyAnimateOnMount&&(M=!1),x.protectedKeys={...p},!x.isActive&&S===null||!C&&!x.prevProp||cn(C)||typeof C=="boolean")continue;const O=Wd(x.prevProp,C);let A=O||v===l&&x.isActive&&!M&&E||w>y&&E,N=!1;const P=Array.isArray(C)?C:[C];let U=P.reduce(s(v),{});S===!1&&(U={});const{prevResolvedValues:z={}}=x,ie={...z,...U},he=H=>{A=!0,f.has(H)&&(N=!0,f.delete(H)),x.needsAnimating[H]=!0;const k=e.getValue(H);k&&(k.liveStyle=!1)};for(const H in ie){const k=U[H],F=z[H];if(p.hasOwnProperty(H))continue;let X=!1;cr(k)&&cr(F)?X=!si(k,F):X=k!==F,X?k!=null?he(H):f.add(H):k!==void 0&&f.has(H)?he(H):x.protectedKeys[H]=!0}x.prevProp=C,x.prevResolvedValues=U,x.isActive&&(p={...p,...U}),r&&e.blockInitialAnimation&&(A=!1),A&&(!(M&&O)||N)&&d.push(...P.map(H=>({animation:H,options:{type:v}})))}if(f.size){const w={};if(typeof c.initial!="boolean"){const v=Vt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(w.transition=v.transition)}f.forEach(v=>{const x=e.getBaseTarget(v),C=e.getValue(v);C&&(C.liveStyle=!0),w[v]=x??null}),d.push({animation:w})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ii(),r=!0}}}function Wd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!si(t,e):!1}function Ge(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ii(){return{animate:Ge(!0),whileInView:Ge(),whileHover:Ge(),whileTap:Ge(),whileDrag:Ge(),whileFocus:Ge(),exit:Ge()}}class Ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Kd extends Ne{constructor(t){super(t),t.animationState||(t.animationState=Xd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();cn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Gd=0;class Hd extends Ne{constructor(){super(...arguments),this.id=Gd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const qd={animation:{Feature:Kd},exit:{Feature:Hd}};function $t(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function zt(e){return{point:{x:e.pageX,y:e.pageY}}}const Yd=e=>t=>qn(t)&&e(t,zt(t));function Ut(e,t,n,r){return $t(e,t,Yd(n),r)}function ai({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Zd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Jd(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const li=1e-4,Qd=1-li,ef=1+li,ci=.01,tf=0-ci,nf=0+ci;function oe(e){return e.max-e.min}function rf(e,t,n){return Math.abs(e-t)<=n}function ui(e,t,n,r=.5){e.origin=r,e.originPoint=W(t.min,t.max,e.origin),e.scale=oe(n)/oe(t),e.translate=W(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Qd&&e.scale<=ef||isNaN(e.scale))&&(e.scale=1),(e.translate>=tf&&e.translate<=nf||isNaN(e.translate))&&(e.translate=0)}function Xt(e,t,n,r){ui(e.x,t.x,n.x,r?r.originX:void 0),ui(e.y,t.y,n.y,r?r.originY:void 0)}function di(e,t,n){e.min=n.min+t.min,e.max=e.min+oe(t)}function sf(e,t,n){di(e.x,t.x,n.x),di(e.y,t.y,n.y)}function fi(e,t,n){e.min=t.min-n.min,e.max=e.min+oe(t)}function Wt(e,t,n){fi(e.x,t.x,n.x),fi(e.y,t.y,n.y)}const hi=()=>({translate:0,scale:1,origin:0,originPoint:0}),ht=()=>({x:hi(),y:hi()}),pi=()=>({min:0,max:0}),G=()=>({x:pi(),y:pi()});function de(e){return[e("x"),e("y")]}function kr(e){return e===void 0||e===1}function jr({scale:e,scaleX:t,scaleY:n}){return!kr(e)||!kr(t)||!kr(n)}function He(e){return jr(e)||mi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mi(e){return gi(e.x)||gi(e.y)}function gi(e){return e&&e!=="0%"}function gn(e,t,n){const r=e-n,s=t*r;return n+s}function yi(e,t,n,r,s){return s!==void 0&&(e=gn(e,s,r)),gn(e,n,r)+t}function Vr(e,t=0,n=1,r,s){e.min=yi(e.min,t,n,r,s),e.max=yi(e.max,t,n,r,s)}function vi(e,{x:t,y:n}){Vr(e.x,t.translate,t.scale,t.originPoint),Vr(e.y,n.translate,n.scale,n.originPoint)}const xi=.999999999999,bi=1.0000000000001;function of(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,i;for(let a=0;a<s;a++){o=n[a],i=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&mt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,vi(e,i)),r&&He(o.latestValues)&&mt(e,o.latestValues))}t.x<bi&&t.x>xi&&(t.x=1),t.y<bi&&t.y>xi&&(t.y=1)}function pt(e,t){e.min=e.min+t,e.max=e.max+t}function Si(e,t,n,r,s=.5){const o=W(e.min,e.max,s);Vr(e,t,n,o,r)}function mt(e,t){Si(e.x,t.x,t.scaleX,t.scale,t.originX),Si(e.y,t.y,t.scaleY,t.scale,t.originY)}function wi(e,t){return ai(Jd(e.getBoundingClientRect(),t))}function af(e,t,n){const r=wi(e,n),{scroll:s}=t;return s&&(pt(r.x,s.offset.x),pt(r.y,s.offset.y)),r}const Ci=({current:e})=>e?e.ownerDocument.defaultView:null,Ti=(e,t)=>Math.abs(e-t);function lf(e,t){const n=Ti(e.x,t.x),r=Ti(e.y,t.y);return Math.sqrt(n**2+r**2)}class Pi{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Ir(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=lf(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:y}=d,{timestamp:g}=te;this.history.push({...y,timestamp:g});const{onStart:w,onMove:v}=this.handlers;f||(w&&w(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Nr(f,this.transformPagePoint),$.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Ir(d.type==="pointercancel"?this.lastMoveEventInfo:Nr(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,w),y&&y(d,w)},!qn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const i=zt(t),a=Nr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=te;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Ir(a,this.history)),this.removeListeners=Ft(Ut(this.contextWindow,"pointermove",this.handlePointerMove),Ut(this.contextWindow,"pointerup",this.handlePointerUp),Ut(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ke(this.updatePoint)}}function Nr(e,t){return t?{point:t(e.point)}:e}function _i(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ir({point:e},t){return{point:e,delta:_i(e,Ei(t)),offset:_i(e,cf(t)),velocity:uf(t,.1)}}function cf(e){return e[0]}function Ei(e){return e[e.length-1]}function uf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Ei(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>xe(t)));)n--;if(!r)return{x:0,y:0};const o=Ce(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const i={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function df(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?W(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?W(n,e,r.max):Math.min(e,n)),e}function Ai(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 ff(e,{top:t,left:n,bottom:r,right:s}){return{x:Ai(e.x,n,s),y:Ai(e.y,t,r)}}function Mi(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 hf(e,t){return{x:Mi(e.x,t.x),y:Mi(e.y,t.y)}}function pf(e,t){let n=.5;const r=oe(e),s=oe(t);return s>r?n=it(t.min,t.max-r,e.min):r>s&&(n=it(e.min,e.max-s,t.min)),Te(0,1,n)}function mf(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 Rr=.35;function gf(e=Rr){return e===!1?e=0:e===!0&&(e=Rr),{x:Li(e,"left","right"),y:Li(e,"top","bottom")}}function Li(e,t,n){return{min:Di(e,t),max:Di(e,n)}}function Di(e,t){return typeof e=="number"?e:e[t]||0}const yf=new WeakMap;class vf{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=G(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zt(u).point)},o=(u,d)=>{const{drag:f,dragPropagation:p,onDragStart:y}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=fc(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),de(w=>{let v=this.getAxisMotionValue(w).get()||0;if(Se.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const C=x.layout.layoutBox[w];C&&(v=oe(C)*(parseFloat(v)/100))}}this.originPoint[w]=v}),y&&$.postRender(()=>y(u,d)),dr(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:y,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:w}=d;if(p&&this.currentDirection===null){this.currentDirection=xf(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,w),this.updateAxis("y",d.point,w),this.visualElement.render(),g&&g(u,d)},a=(u,d)=>this.stop(u,d),l=()=>de(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Pi(t,{onSessionStart:s,onStart:o,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Ci(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&$.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!yn(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=df(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&lt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=ff(s.layoutBox,n):this.constraints=!1,this.elastic=gf(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&de(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=mf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!lt(t))return!1;const r=t.current;Oe(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=af(r,s.root,this.visualElement.getTransformPagePoint());let i=hf(s.layout.layoutBox,o);if(n){const a=n(Zd(i));this.hasMutatedConstraints=!!a,a&&(i=ai(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=de(u=>{if(!yn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,y={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return dr(this.visualElement,t),r.start(Dr(t,r,0,n,this.visualElement,!1))}stopAnimation(){de(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){de(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){de(n=>{const{drag:r}=this.getProps();if(!yn(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:a}=s.layout.layoutBox[n];o.set(t[n]-W(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!lt(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};de(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();s[i]=pf({min:l,max:l},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),de(i=>{if(!yn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(W(l,c,s[i]))})}addListeners(){if(!this.visualElement.current)return;yf.set(this.visualElement,this);const t=this.visualElement.current,n=Ut(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();lt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),$.read(r);const i=$t(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(de(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:i=Rr,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function yn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class bf extends Ne{constructor(t){super(t),this.removeGroupControls=le,this.removeListeners=le,this.controls=new vf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||le}unmount(){this.removeGroupControls(),this.removeListeners()}}const Oi=e=>(t,n)=>{e&&$.postRender(()=>e(t,n))};class Sf extends Ne{constructor(){super(...arguments),this.removePointerDownListener=le}onPointerDown(t){this.session=new Pi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ci(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Oi(t),onStart:Oi(n),onMove:r,onEnd:(o,i)=>{delete this.session,s&&$.postRender(()=>s(o,i))}}}mount(){this.removePointerDownListener=Ut(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 vn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ki(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Kt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=ki(e,t.target.x),r=ki(e,t.target.y);return`${n}% ${r}%`}},wf={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ve.parse(e);if(s.length>5)return r;const o=Ve.createTransformer(e),i=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=a,s[1+i]/=l;const c=W(a,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=c),typeof s[3+i]=="number"&&(s[3+i]/=c),o(s)}};class Cf extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;Fc(Tf),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),vn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,i=r.projection;return i&&(i.isPresent=o,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||$.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Hn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ji(e){const[t,n]=nc(),r=m.useContext(xs);return b.jsx(Cf,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(Xs),isPresent:t,safeToRemove:n})}const Tf={borderRadius:{...Kt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Kt,borderTopRightRadius:Kt,borderBottomLeftRadius:Kt,borderBottomRightRadius:Kt,boxShadow:wf};function Pf(e,t,n){const r=re(e)?e:Lt(e);return r.start(Dr("",r,t,n)),r.animation}function _f(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Ef=(e,t)=>e.depth-t.depth;class Af{constructor(){this.children=[],this.isDirty=!1}add(t){Rn(this.children,t),this.isDirty=!0}remove(t){Fn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ef),this.isDirty=!1,this.children.forEach(t)}}function Mf(e,t){const n=be.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(ke(r),e(o-t))};return $.read(r,!0),()=>ke(r)}const Vi=["TopLeft","TopRight","BottomLeft","BottomRight"],Lf=Vi.length,Ni=e=>typeof e=="string"?parseFloat(e):e,Ii=e=>typeof e=="number"||L.test(e);function Df(e,t,n,r,s,o){s?(e.opacity=W(0,n.opacity!==void 0?n.opacity:1,Of(r)),e.opacityExit=W(t.opacity!==void 0?t.opacity:1,0,kf(r))):o&&(e.opacity=W(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<Lf;i++){const a=`border${Vi[i]}Radius`;let l=Ri(t,a),c=Ri(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ii(l)===Ii(c)?(e[a]=Math.max(W(Ni(l),Ni(c),r),0),(Se.test(c)||Se.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=W(t.rotate||0,n.rotate||0,r))}function Ri(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Of=Fi(0,.5,yo),kf=Fi(.5,.95,le);function Fi(e,t,n){return r=>r<e?0:r>t?1:n(it(e,t,r))}function Bi(e,t){e.min=t.min,e.max=t.max}function fe(e,t){Bi(e.x,t.x),Bi(e.y,t.y)}function $i(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function zi(e,t,n,r,s){return e-=t,e=gn(e,1/n,r),s!==void 0&&(e=gn(e,1/s,r)),e}function jf(e,t=0,n=1,r=.5,s,o=e,i=e){if(Se.test(t)&&(t=parseFloat(t),t=W(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=W(o.min,o.max,r);e===o&&(a-=t),e.min=zi(e.min,t,n,a,s),e.max=zi(e.max,t,n,a,s)}function Ui(e,t,[n,r,s],o,i){jf(e,t[n],t[r],t[s],t.scale,o,i)}const Vf=["x","scaleX","originX"],Nf=["y","scaleY","originY"];function Xi(e,t,n,r){Ui(e.x,t,Vf,n?n.x:void 0,r?r.x:void 0),Ui(e.y,t,Nf,n?n.y:void 0,r?r.y:void 0)}function Wi(e){return e.translate===0&&e.scale===1}function Ki(e){return Wi(e.x)&&Wi(e.y)}function Gi(e,t){return e.min===t.min&&e.max===t.max}function If(e,t){return Gi(e.x,t.x)&&Gi(e.y,t.y)}function Hi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qi(e,t){return Hi(e.x,t.x)&&Hi(e.y,t.y)}function Yi(e){return oe(e.x)/oe(e.y)}function Zi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Rf{constructor(){this.members=[]}add(t){Rn(this.members,t),t.scheduleRender()}remove(t){if(Fn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ff(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((s||o||i)&&(r=`translate3d(${s}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Fr=["","X","Y","Z"],Bf={visibility:"hidden"},Ji=1e3;let $f=0;function Br(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Qi(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=co(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",$,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Qi(r)}function ea({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(i={},a=t==null?void 0:t()){this.id=$f++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Xf),this.nodes.forEach(qf),this.nodes.forEach(Yf),this.nodes.forEach(Wf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Af)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new $n),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_f(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Mf(f,250),vn.hasAnimatedSinceResize&&(vn.hasAnimatedSinceResize=!1,this.nodes.forEach(na))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||th,{onLayoutAnimationStart:w,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!qi(this.targetLayout,y),C=!f&&p;if(this.options.layoutRoot||this.resumeFrom||C||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,C);const E={...zn(g,"layout"),onPlay:w,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else f||na(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ke(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(Zf),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qi(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ta);return}this.isUpdating||this.nodes.forEach(Gf),this.isUpdating=!1,this.nodes.forEach(Hf),this.nodes.forEach(zf),this.nodes.forEach(Uf),this.clearAllSnapshots();const a=be.now();te.delta=Te(0,1e3/60,a-te.timestamp),te.timestamp=a,te.isProcessing=!0,Gn.update.process(te),Gn.preRender.process(te),Gn.render.process(te),te.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Kf),this.sharedNodes.forEach(Jf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!oe(this.snapshot.measuredBox.x)&&!oe(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=G(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ki(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||He(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),nh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return G();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(rh))){const{scroll:u}=this.root;u&&(pt(l.x,u.offset.x),pt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=G();if(fe(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&fe(l,i),pt(l.x,d.offset.x),pt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=G();fe(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&mt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),He(u.latestValues)&&mt(l,u.latestValues)}return He(this.latestValues)&&mt(l,this.latestValues),l}removeTransform(i){const a=G();fe(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!He(c.latestValues))continue;jr(c.latestValues)&&c.updateSnapshot();const u=G(),d=c.measurePageBox();fe(u,d),Xi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return He(this.latestValues)&&Xi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==te.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=te.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),Wt(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),fe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):fe(this.target,this.layout.layoutBox),vi(this.target,this.targetDelta)):fe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),Wt(this.relativeTargetOrigin,this.target,p.target),fe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||jr(this.parent.latestValues)||mi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===te.timestamp&&(c=!1),c)return;const{layout:u,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||!(u||d))return;fe(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;of(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=G());const{target:y}=a;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($i(this.prevProjectionDelta.x,this.projectionDelta.x),$i(this.prevProjectionDelta.y,this.projectionDelta.y)),Xt(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Zi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ht(),this.projectionDelta=ht(),this.projectionDeltaWithTransform=ht()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ht();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=G(),p=l?l.source:void 0,y=this.layout?this.layout.source:void 0,g=p!==y,w=this.getStack(),v=!w||w.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(eh));this.animationProgress=0;let C;this.mixTargetDelta=E=>{const S=E/1e3;ra(d.x,i.x,S),ra(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Qf(this.relativeTarget,this.relativeTargetOrigin,f,S),C&&If(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=G()),fe(C,this.relativeTarget)),g&&(this.animationValues=u,Df(u,c,this.latestValues,S,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ke(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$.update(()=>{vn.hasAnimatedSinceResize=!0,this.currentAnimation=Pf(0,Ji,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ji),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&la(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||G();const d=oe(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=oe(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}fe(a,l),mt(a,u),Xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Rf),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Br("z",i,c,this.animationValues);for(let u=0;u<Fr.length;u++)Br(`rotate${Fr[u]}`,i,c,this.animationValues),Br(`skew${Fr[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Bf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=fn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=fn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!He(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Ff(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:p,y}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${y.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Ot){if(f[g]===void 0)continue;const{correct:w,applyTo:v,isCSSVariable:x}=Ot[g],C=c.transform==="none"?f[g]:w(f[g],d);if(v){const E=v.length;for(let S=0;S<E;S++)c[v[S]]=C}else x?this.options.visualElement.renderState.vars[g]=C:c[g]=C}return this.options.layoutId&&(c.pointerEvents=d===this?fn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ta),this.root.sharedNodes.clear()}}}function zf(e){e.updateLayout()}function Uf(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;o==="size"?de(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=oe(f);f.min=r[d].min,f.max=f.min+p}):la(o,n.layoutBox,r)&&de(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=oe(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=ht();Xt(a,r,n.layoutBox);const l=ht();i?Xt(l,e.applyTransform(s,!0),n.measuredBox):Xt(l,r,n.layoutBox);const c=!Ki(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const y=G();Wt(y,n.layoutBox,f.layoutBox);const g=G();Wt(g,r,p.layoutBox),qi(y,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Xf(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 Wf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Kf(e){e.clearSnapshot()}function ta(e){e.clearMeasurements()}function Gf(e){e.isLayoutDirty=!1}function Hf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function na(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qf(e){e.resolveTargetDelta()}function Yf(e){e.calcProjection()}function Zf(e){e.resetSkewAndRotation()}function Jf(e){e.removeLeadSnapshot()}function ra(e,t,n){e.translate=W(t.translate,0,n),e.scale=W(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sa(e,t,n,r){e.min=W(t.min,n.min,r),e.max=W(t.max,n.max,r)}function Qf(e,t,n,r){sa(e.x,t.x,n.x,r),sa(e.y,t.y,n.y,r)}function eh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const th={duration:.45,ease:[.4,0,.1,1]},oa=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ia=oa("applewebkit/")&&!oa("chrome/")?Math.round:le;function aa(e){e.min=ia(e.min),e.max=ia(e.max)}function nh(e){aa(e.x),aa(e.y)}function la(e,t,n){return e==="position"||e==="preserve-aspect"&&!rf(Yi(t),Yi(n),.2)}function rh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const sh=ea({attachResizeListener:(e,t)=>$t(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$r={current:void 0},ca=ea({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$r.current){const e=new sh({});e.mount(window),e.setOptions({layoutScroll:!0}),$r.current=e}return $r.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),oh={pan:{Feature:Sf},drag:{Feature:bf,ProjectionNode:ca,MeasureLayout:ji}};function ua(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&$.postRender(()=>o(t,zt(t)))}class ih extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=pc(t,(n,r)=>(ua(this.node,r,"Start"),s=>ua(this.node,s,"End"))))}unmount(){}}class ah extends Ne{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=Ft($t(this.node.current,"focus",()=>this.onFocus()),$t(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function da(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&$.postRender(()=>o(t,zt(t)))}class lh extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=vc(t,(n,r)=>(da(this.node,r,"Start"),(s,{success:o})=>da(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const zr=new WeakMap,Ur=new WeakMap,ch=e=>{const t=zr.get(e.target);t&&t(e)},uh=e=>{e.forEach(ch)};function dh({root:e,...t}){const n=e||document;Ur.has(n)||Ur.set(n,{});const r=Ur.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(uh,{root:e,...t})),r[s]}function fh(e,t,n){const r=dh(t);return zr.set(e,n),r.observe(e),()=>{zr.delete(e),r.unobserve(e)}}const hh={some:0,all:1};class ph extends Ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:hh[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return fh(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(mh(t,n))&&this.startObserver()}unmount(){}}function mh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const gh={inView:{Feature:ph},tap:{Feature:lh},focus:{Feature:ah},hover:{Feature:ih}},yh={layout:{ProjectionNode:ca,MeasureLayout:ji}},Xr={current:null},fa={current:!1};function vh(){if(fa.current=!0,!!Nn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xr.current=e.matches;e.addListener(t),t()}else Xr.current=!1}const xh=[...Ro,se,Ve],bh=e=>xh.find(Io(e)),Sh=new WeakMap;function wh(e,t,n){for(const r in t){const s=t[r],o=n[r];if(re(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&nn(s.version==="12.5.0",`Attempting to mix Motion versions ${s.version} with 12.5.0 may not work as expected.`);else if(re(o))e.addValue(r,Lt(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,Lt(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ha=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ch{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Tr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=be.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,$.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=un(n),this.isVariantNode=$s(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const y=f[p];l[p]!==void 0&&re(y)&&y.set(l[p],!1)}}mount(t){this.current=t,Sh.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)),fa.current||vh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xr.current,process.env.NODE_ENV!=="production"&&nn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ke(this.notifyUpdate),ke(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ue.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&$.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o(),i&&i(),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 at){const n=at[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):G()}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<ha.length;r++){const s=ha[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=wh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Lt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Vo(s)||xo(s))?s=parseFloat(s):!bh(s)&&Ve.test(n)&&(s=Eo(t,n)),this.setBaseTarget(t,re(s)?s.get():s)),re(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const i=lr(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(s=i[t])}if(r&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!re(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new $n),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class pa extends Ch{constructor(){super(...arguments),this.KeyframeResolver=Bo}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;re(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Th(e){return window.getComputedStyle(e)}class Ph extends pa{constructor(){super(...arguments),this.type="html",this.renderInstance=ro}readValueFromInstance(t,n){if(Ue.has(n))return Nu(t,n);{const r=Th(t),s=(er(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wi(t,n)}build(t,n,r){rr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ur(t,n,r)}}class _h extends pa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=G,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&no(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ue.has(n)){const r=_o(n);return r&&r.default||0}return n=so.has(n)?n:Qn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return io(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&$.postRender(this.updateDimensions)}build(t,n,r){ir(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){oo(t,n,r,s)}mount(t){this.isSVGTag=ar(t.tagName),super.mount(t)}}const Eh=(e,t)=>or(e)?new _h(t):new Ph(t,{allowProjection:e!==m.Fragment}),Ah=cu({...qd,...gh,...oh,...yh},Eh),qe=_c(Ah),Mh={root:"_root_uup2j_1"},ma={bgDefault:"c-corporate-default-bg",cBlack:"c-corporate-default-black",cBlue:"c-corporate-default-blue",bgDark:"c-corporate-default-dark-bg",cDarkBlue:"c-corporate-default-dark-blue",cDarkGreen:"c-corporate-default-dark-green",cGreen:"c-corporate-default-green",cRichBlue:"c-corporate-default-rich-blue",grey050:"c-grey-050",grey100:"c-grey-100",grey200:"c-grey-200",grey300:"c-grey-300",grey400:"c-grey-400",grey500:"c-grey-500",grey600:"c-grey-600",grey700:"c-grey-700",grey800:"c-grey-800",grey900:"c-grey-900",rFull:"radius-full",rL:"radius-l",rM:"radius-m",rNone:"radius-none",rS:"radius-s",rXL:"radius-xl",rXS:"radius-xs",rXXL:"radius-xxl",rXXS:"radius-xxs",pXXS:"p-xxs",pXS:"p-xs",pS:"p-s",pM:"p-m",pL:"p-l",pXL:"p-xl",pXXL:"p-xxl",pxXXS:"px-xxs",pxXS:"px-xs",pxS:"px-s",pxM:"px-m",pxL:"px-l",pxXL:"px-xl",pxXXL:"px-xxl",pyXXS:"py-xxs",pyXS:"py-xs",pyS:"py-s",pyM:"py-m",pyL:"py-l",pyXL:"py-xl",pyXXL:"py-xxl",ptXXS:"pt-xxs",ptXS:"pt-xs",ptS:"pt-s",ptM:"pt-m",ptL:"pt-l",ptXL:"pt-xl",ptXXL:"pt-xxl",prXXS:"pr-xxs",prXS:"pr-xs",prS:"pr-s",prM:"pr-m",prL:"pr-l",prXL:"pr-xl",prXXL:"pr-xxl",pbXXS:"pb-xxs",pbXS:"pb-xs",pbS:"pb-s",pbM:"pb-m",pbL:"pb-l",pbXL:"pb-xl",pbXXL:"pb-xxl",plXXS:"pl-xxs",plXS:"pl-xs",plS:"pl-s",plM:"pl-m",plL:"pl-l",plXL:"pl-xl",plXXL:"pl-xxl",mXXS:"m-xxs",mXS:"m-xs",mS:"m-s",mM:"m-m",mL:"m-l",mXL:"m-xl",mXXL:"m-xxl",mxXXS:"mx-xxs",mxXS:"mx-xs",mxS:"mx-s",mxM:"mx-m",mxL:"mx-l",mxXL:"mx-xl",mxXXL:"mx-xxl",myXXS:"my-xxs",myXS:"my-xs",myS:"my-s",myM:"my-m",myL:"my-l",myXL:"my-xl",myXXL:"my-xxl",mtXXS:"mt-xxs",mtXS:"mt-xs",mtS:"mt-s",mtM:"mt-m",mtL:"mt-l",mtXL:"mt-xl",mtXXL:"mt-xxl",mrXXS:"mr-xxs",mrXS:"mr-xs",mrS:"mr-s",mrM:"mr-m",mrL:"mr-l",mrXL:"mr-xl",mrXXL:"mr-xxl",mbXXS:"mb-xxs",mbXS:"mb-xs",mbS:"mb-s",mbM:"mb-m",mbL:"mb-l",mbXL:"mb-xl",mbXXL:"mb-xxl",mlXXS:"ml-xxs",mlXS:"ml-xs",mlS:"ml-s",mlM:"ml-m",mlL:"ml-l",mlXL:"ml-xl",mlXXL:"ml-xxl",fsXXXS:"fs-xxxs",fsXXS:"fs-xxs",fsXS:"fs-xs",fsS:"fs-s",fsM:"fs-m",fsL:"fs-l",fsXL:"fs-xl",fsXXL:"fs-xxl",fsXXXL:"fs-xxxl",fwRegular:"fw-regular",fwSemibold:"fw-semibold",fwBold:"fw-bold",dBlock:"d-block",dInBlock:"d-in-block",taLeft:"ta-left",taCenter:"ta-center",mwSM:"mw-sm",mwMD:"mw-md",mwLG:"mw-lg",mwXL:"mw-xl",mwXXL:"mw-xxl",mw3XL:"mw-3xl",shNone:"sh-none"};function Ie(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ma).includes(t)).filter(t=>e[t]===!0).map(t=>ma[t]):null}const gt="Errore: ",Lh="Impossibile acquisire la posizione.",Wr="Impossibile caricare i punti di mappa.",Dh="Si è verificato un errore.",Oh="Impossibile caricare i suggerimenti.",kh="Impossibile caricare i dettagli della location.",jh="Impossibile caricare la mappa.",Vh="Ottieni indicazioni di navigazione per questa destinazione",Nh="Condividi questa destinazione",Ih="Scarica l'evento",Rh=3e3,ga=6,Gt={north:47.1,south:36.6,east:18.6,west:6.6},Fh={lat:(Gt.north+Gt.south)/2,lng:(Gt.east+Gt.west)/2};function Pe(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function _e(e){return e?e.split("").reduce((t,n)=>(/[A-Z]/.test(n)?e.indexOf(n)===0?t+=n.toLowerCase():t+="-"+n.toLowerCase():t+=n,t),""):""}function Kr(e){const{type:t,url:n}=e??{};switch(t){case"navigate":case"directions":return{"aria-label":Vh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"share":return{"aria-label":Nh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Ih,as:"a",href:n??"#",download:!0,target:"_blank",rel:"noopener noreferrer"};case"email":default:return{}}}function Bh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}const ya="Anchor";function va({as:e,wrapper:t,children:n,variant:r="default",className:s,animate:o=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},p){const y=t||"span",g=o?qe[y]:y,w=e||"a",v=Ie(f)??[],x=o?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},E=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return b.jsx(g,{className:Y(Mh.root,"dyn-locator__"+_e(ya),Pe(s),...v),"data-variant":r,...d?{style:d}:{},...x,...f,children:b.jsx(w,{ref:p,href:a,target:l,rel:E,...u,children:n})})}va.displayName=ya;const xa=m.forwardRef(va),ba="ErrorBanner";function Sa({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:r,errorDetails:s,className:o,children:i,...a}){const l=Ie(a)??[];return b.jsxs("div",{className:Y("dyn-locator__"+_e(ba),Et.root,Pe(o),...l??[]),children:[b.jsxs("header",{className:Et.header,children:[b.jsx(Gl,{size:28,color:"currentColor",className:Et.icon})," ",b.jsx("h3",{children:e})]}),b.jsxs("div",{className:Et.body,children:[b.jsx("p",{children:t}),n&&r&&b.jsxs("p",{children:["Prova a"," ",b.jsx(xa,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,s&&b.jsx("div",{className:Et.content,children:b.jsx("pre",{children:s})})]})]})}Sa.displayName=ba;const wa=Sa;class $h extends m.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||b.jsx("div",{className:Fl.container,children:b.jsx(wa,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Ca={ArrowLeft:Ul,ArrowUpRight:Xl,ChevronUp:Kl,ChevronDown:Wl,Close:Ql,Expand:Yl,Location:ql,Search:Zl,Share:Jl,Target:Hl},Ee={root:"_root_1cmog_4",header:"_header_1cmog_21",body:"_body_1cmog_22",cta:"_cta_1cmog_23",titleContainer:"_titleContainer_1cmog_40",shareButton:"_shareButton_1cmog_51",capabilities:"_capabilities_1cmog_59",tagContainer:"_tagContainer_1cmog_72",tag:"_tag_1cmog_72"},yt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Gr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function zh(e){return m.isValidElement(e)||typeof e=="function"}function Uh(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function Xh(e){return!!e&&typeof e=="object"&&"path"in e}const Ta="Icon";function Pa({as:e,icon:t,iconRef:n,label:r,size:s="S",radius:o,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const p=e||"span",y=l?qe[p]:p,{iconMap:g}=Zh();function w(C){if(Uh(C)){const E=typeof C=="string"?C:C.name;return g[E]?m.createElement(g[E],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Gr.icon}):'No icon found for "'+E+'"!'}return Xh(C)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),b.jsx("img",{...n?{ref:n}:{},src:C.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:Gr.icon})):"No icon provided"}const v=Ie(d)??[],x=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return b.jsx(y,{ref:f,className:Y(Gr.root,"dyn-locator__"+_e(Ta),Pe(a),...v),...u?{style:u}:{},"data-variant":i,"data-size":s,...o?{"data-radius":o}:{},...x,...d,children:w(t)})}Pa.displayName=Ta;const Re=m.forwardRef(Pa),_a="Tag";function Ea({as:e,iconPosition:t="left",children:n,icon:r,className:s,animate:o=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=o?qe[u]:u,f=Ie(l)??[],p=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return b.jsx(d,{ref:c,className:Y(yt.root,"dyn-locator__"+_e(_a),Pe(s),...f),"data-icon-position":t,...a?{style:a}:{},...p,...l,children:b.jsxs("div",{className:yt.container,children:[r?b.jsx("div",{className:yt.icon,children:zh(r)?typeof r=="function"?b.jsx(r,{className:yt.icon}):r:b.jsx(Re,{className:yt.icon,icon:r})}):null,b.jsx("div",{className:yt.label,children:n})]})})}Ea.displayName=_a;const Wh=m.forwardRef(Ea),Kh={root:"_root_u5v4v_1"},Aa="IconButton";function Ma({as:e,children:t,className:n,variant:r="default",animate:s=!0,animationDelay:o=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},p){const y=e||"button",g=s?qe[y]:y,w=Ie(f)??[],v=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:o,duration:.2}}:{},x=y==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return b.jsx(g,{ref:p,className:Y(Kh.root,"dyn-locator__"+_e(Aa),Pe(n),...w),"data-variant":r,"data-element":y,"aria-label":a,disabled:d,...i?{style:i}:{},...v,...x,...f,children:t})}Ma.displayName=Aa;const vt=m.forwardRef(Ma),La={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Da="Card";function Oa({as:e,children:t,className:n,variant:r="default",animate:s=!0,animationDelay:o=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=s?qe[d]:d,p=Ie(c)??[],y=s?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:o,duration:.3}}:{};return b.jsx(f,{ref:u,className:Y(La.root,"dyn-locator__"+_e(Da),Pe(n),...p),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...y,...c,children:r==="bare"?t:b.jsx("div",{className:La.content,children:t})})}Oa.displayName=Da;const Gh=m.forwardRef(Oa);function ka(e){const{componentMap:t}=Jh();return t[e]}const ja="LocationCard";function Va({title:e,timestamp:t,address:n,capabilities:r,on_share:s,actions:o,className:i,...a},l){const c=ka("ctaButton");return b.jsx(Gh,{ref:l,variant:"bare",clickable:!0,className:Y("dyn-locator__"+_e(ja),Pe(i)),...a,style:{...a.style?a.style:{},padding:"var(--dyn-locator__spacing-xs) 0",borderRadius:"var(--dyn-locator__radius-s)",border:"1px solid var(--dyn-locator__colors-grey-grey-100)",boxShadow:"none"},children:b.jsxs("div",{className:Ee.root,children:[b.jsxs("header",{className:Ee.header,children:[t?b.jsx("time",{children:new Date(t).toLocaleDateString("it",{day:"numeric",month:"long",year:"numeric"})}):null,b.jsxs("div",{className:Ee.titleContainer,children:[e?b.jsx("h4",{children:e}):null,b.jsx(vt,{className:Ee.shareButton,variant:"bare",...Kr(s),children:b.jsx(Re,{size:"M",icon:"Share"})})]}),n?b.jsx("address",{children:n}):null]}),r!=null&&r.length?b.jsx("div",{className:Ee.body,children:r.map((u,d)=>b.jsxs("div",{className:Ee.capabilities,children:[b.jsx("h5",{children:u.title}),b.jsx("ul",{className:Ee.tagContainer,children:(u.capabilities??[]).map((f,p)=>b.jsx(Wh,{as:"li",animationDelay:+`.${p+1}`,className:Ee.tag,children:f.label},p))})]},d))}):null,o!=null&&o.length?b.jsx("div",{className:Ee.cta,children:o.map((u,d)=>b.jsx(c,{animate:!1,fullWidth:!0,variant:d===0?"themed":"secondary",...Kr(u),children:u.label},d))}):null]})})}Va.displayName=ja;const Hh=m.forwardRef(Va),Na={root:"_root_1h5d4_1",loader:"_loader_1h5d4_73"},Ia="Button";function Ra({as:e,children:t,className:n,variant:r="default",size:s="medium",disabled:o=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:p,...y},g){const w=e||(u?"a":"button"),v=l?qe[w]:w,x=Ie(y)??[],C=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},E=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return b.jsx(v,{ref:g,className:Y(Na.root,"dyn-locator__"+_e(Ia),Pe(n),...x),"data-variant":r,"data-size":s,"data-full-width":a,disabled:o||i,...p?{style:p}:{},...C,...E,...y,children:i?b.jsxs("span",{style:{display:"flex",gap:10},children:[t,b.jsx("span",{className:Na.loader,"aria-hidden":"true"})]}):t})}Ra.displayName=Ia;const Hr=m.forwardRef(Ra),Fa={locationCard:Hh,ctaButton:Hr},qh={iconMap:Ca,componentMap:Fa},qr=m.createContext(qh);function Yh({children:e,customIcons:t,customComponents:n}){const r={...Ca,...t??{}},s={...Fa,...n??{}};return b.jsx(qr.Provider,{value:{iconMap:r,componentMap:s},children:e})}function Zh(){const{iconMap:e}=m.useContext(qr);return{iconMap:e}}function Jh(){const{componentMap:e}=m.useContext(qr);return{componentMap:e}}var xn=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(xn||{});const Ba=m.createContext({endpointMap:{},apiUrl:""});function Qh({children:e,endpoints:t,apiUrl:n}){var r;if(!n||!((r=Object.keys(t??{}))!=null&&r.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return b.jsx(Ba.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function ep(e){const{endpointMap:t,apiUrl:n}=m.useContext(Ba);return{getEndpoint:(r={})=>{const s=t[e];if(!s)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let o="";return s.buildPath?o=s.buildPath(r):(o=s.path,Object.entries(r).forEach(([i,a])=>{o=o.replace(`:${i}`,String(a))})),{url:`${n}${o}`,method:s.method}}}}let tp={data:""},np=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||tp,rp=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,sp=/\/\*[^]*?\*\/| +/g,$a=/\n+/g,Fe=(e,t)=>{let n="",r="",s="";for(let o in e){let i=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+i+";":r+=o[1]=="f"?Fe(i,o):o+"{"+Fe(i,o[1]=="k"?"":t)+"}":typeof i=="object"?r+=Fe(i,t?t.replace(/([^,])+/g,a=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):o):i!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=Fe.p?Fe.p(o,i):o+":"+i+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Ae={},za=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+za(e[n]);return t}return e},op=(e,t,n,r,s)=>{let o=za(e),i=Ae[o]||(Ae[o]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(o));if(!Ae[i]){let l=o!==e?e:(c=>{let u,d,f=[{}];for(;u=rp.exec(c.replace(sp,""));)u[4]?f.shift():u[3]?(d=u[3].replace($a," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace($a," ").trim();return f[0]})(e);Ae[i]=Fe(s?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&Ae.g?Ae.g:null;return n&&(Ae.g=Ae[i]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Ae[i],t,r,a),i},ip=(e,t,n)=>e.reduce((r,s,o)=>{let i=t[o];if(i&&i.call){let a=i(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=l?"."+l:a&&typeof a=="object"?a.props?"":Fe(a,""):a===!1?"":a}return r+s+(i??"")},"");function bn(e){let t=this||{},n=e.call?e(t.p):e;return op(n.unshift?n.raw?ip(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,np(t.target),t.g,t.o,t.k)}let Ua,Yr,Zr;bn.bind({g:1});let Me=bn.bind({k:1});function ap(e,t,n,r){Fe.p=t,Ua=e,Yr=n,Zr=r}function Be(e,t){let n=this||{};return function(){let r=arguments;function s(o,i){let a=Object.assign({},o),l=a.className||s.className;n.p=Object.assign({theme:Yr&&Yr()},a),n.o=/ *go\d+/.test(l),a.className=bn.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Zr&&c[0]&&Zr(a),Ua(c,a)}return t?t(s):s}}var lp=e=>typeof e=="function",Sn=(e,t)=>lp(e)?e(t):e,cp=(()=>{let e=0;return()=>(++e).toString()})(),Xa=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),up=20,Wa=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,up)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return Wa(e,{type:e.toasts.find(o=>o.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},wn=[],Ye={toasts:[],pausedAt:void 0},Ze=e=>{Ye=Wa(Ye,e),wn.forEach(t=>{t(Ye)})},dp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},fp=(e={})=>{let[t,n]=m.useState(Ye),r=m.useRef(Ye);m.useEffect(()=>(r.current!==Ye&&n(Ye),wn.push(n),()=>{let o=wn.indexOf(n);o>-1&&wn.splice(o,1)}),[]);let s=t.toasts.map(o=>{var i,a,l;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((i=e[o.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((a=e[o.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||dp[o.type],style:{...e.style,...(l=e[o.type])==null?void 0:l.style,...o.style}}});return{...t,toasts:s}},hp=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||cp()}),Ht=e=>(t,n)=>{let r=hp(t,e,n);return Ze({type:2,toast:r}),r.id},Z=(e,t)=>Ht("blank")(e,t);Z.error=Ht("error"),Z.success=Ht("success"),Z.loading=Ht("loading"),Z.custom=Ht("custom"),Z.dismiss=e=>{Ze({type:3,toastId:e})},Z.remove=e=>Ze({type:4,toastId:e}),Z.promise=(e,t,n)=>{let r=Z.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(s=>{let o=t.success?Sn(t.success,s):void 0;return o?Z.success(o,{id:r,...n,...n==null?void 0:n.success}):Z.dismiss(r),s}).catch(s=>{let o=t.error?Sn(t.error,s):void 0;o?Z.error(o,{id:r,...n,...n==null?void 0:n.error}):Z.dismiss(r)}),e};var pp=(e,t)=>{Ze({type:1,toast:{id:e,height:t}})},mp=()=>{Ze({type:5,time:Date.now()})},qt=new Map,gp=1e3,yp=(e,t=gp)=>{if(qt.has(e))return;let n=setTimeout(()=>{qt.delete(e),Ze({type:4,toastId:e})},t);qt.set(e,n)},vp=e=>{let{toasts:t,pausedAt:n}=fp(e);m.useEffect(()=>{if(n)return;let o=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(l<0){a.visible&&Z.dismiss(a.id);return}return setTimeout(()=>Z.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=m.useCallback(()=>{n&&Ze({type:6,time:Date.now()})},[n]),s=m.useCallback((o,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(p=>(p.position||c)===(o.position||c)&&p.height),d=u.findIndex(p=>p.id===o.id),f=u.filter((p,y)=>y<d&&p.visible).length;return u.filter(p=>p.visible).slice(...a?[f+1]:[0,f]).reduce((p,y)=>p+(y.height||0)+l,0)},[t]);return m.useEffect(()=>{t.forEach(o=>{if(o.dismissed)yp(o.id,o.removeDelay);else{let i=qt.get(o.id);i&&(clearTimeout(i),qt.delete(o.id))}})},[t]),{toasts:t,handlers:{updateHeight:pp,startPause:mp,endPause:r,calculateOffset:s}}},xp=Me`
113
+ */const ec=ce("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
114
+ * @license lucide-react v0.483.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */const tc=ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
119
+ * @license lucide-react v0.483.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ */const nc=ce("SquareArrowOutUpRight",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]]);/**
124
+ * @license lucide-react v0.483.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */const xs=ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bs=g.createContext({});function rc(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Rn=typeof window<"u",sc=Rn?g.useLayoutEffect:g.useEffect,Fn=g.createContext(null),Ss=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function oc(e=!0){const t=g.useContext(Fn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=g.useId();g.useEffect(()=>{if(e)return s(o)},[e]);const i=g.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}function Bn(e,t){e.indexOf(t)===-1&&e.push(t)}function $n(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ue=e=>e;let lt=ue,Ne=ue;process.env.NODE_ENV!=="production"&&(lt=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ne=(e,t)=>{if(!e)throw new Error(t)});const ic={useManualTiming:!1};function zn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ct=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Un{constructor(){this.subscriptions=[]}add(t){return Bn(this.subscriptions,t),()=>$n(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Se=e=>e*1e3,_e=e=>e/1e3;function Cs(e,t){return t?e*(1e3/t):0}const ws=new Set;function sn(e,t,n){e||ws.has(t)||(console.warn(t),ws.add(t))}const ac=zn(()=>window.ScrollTimeline!==void 0);class lc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(ac()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,o)=>{s&&s(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class cc extends lc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Xn(e,t){return e?e[t]||e.default||e:void 0}const Wn=2e4;function Ts(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Wn;)t+=n,r=e.next(t);return t>=Wn?1/0:t}function Kn(e){return typeof e=="function"}function _s(e,t){e.timeline=t,e.onfinish=null}const Gn=e=>Array.isArray(e)&&typeof e[0]=="number",uc={linearEasing:void 0};function dc(e,t){const n=zn(e);return()=>{var r;return(r=uc[t])!==null&&r!==void 0?r:n()}}const on=dc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Es=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=e(ct(0,s-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ps(e){return!!(typeof e=="function"&&on()||!e||typeof e=="string"&&(e in qn||on())||Gn(e)||Array.isArray(e)&&e.every(Ps))}const Mt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,qn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mt([0,.65,.55,1]),circOut:Mt([.55,0,1,.45]),backIn:Mt([.31,.01,.66,-.59]),backOut:Mt([.33,1.53,.69,.99])};function As(e,t){if(e)return typeof e=="function"&&on()?Es(e,t):Gn(e)?Mt(e):Array.isArray(e)?e.map(n=>As(n,t)||qn.easeOut):qn[e]}const an=["read","resolveKeyframes","update","preRender","render","postRender"],Ms={value:null};function fc(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,p=!1)=>{const y=p&&s?n:r;return f&&i.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),t&&Ms.value&&Ms.value.frameloop[t].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(d))}};return u}const hc=40;function Ls(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=an.reduce((v,b)=>(v[b]=fc(o,t?b:void 0),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,p=()=>{const v=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(v-s.timestamp,hc),1),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:an.reduce((v,b)=>{const C=i[b];return v[b]=(A,T=!1,M=!1)=>(n||m(),C.schedule(A,T,M)),v},{}),cancel:v=>{for(let b=0;b<an.length;b++)i[an[b]].cancel(v)},state:s,steps:i}}const{schedule:W,cancel:Ve,state:ne,steps:Hn}=Ls(typeof requestAnimationFrame<"u"?requestAnimationFrame:ue,!0),{schedule:Yn}=Ls(queueMicrotask,!1);let ln;function pc(){ln=void 0}const Ce={now:()=>(ln===void 0&&Ce.set(ne.isProcessing||ic.useManualTiming?ne.timestamp:performance.now()),ln),set:e=>{ln=e,queueMicrotask(pc)}},ye={x:!1,y:!1};function Ds(){return ye.x||ye.y}function mc(e){return e==="x"||e==="y"?ye[e]?null:(ye[e]=!0,()=>{ye[e]=!1}):ye.x||ye.y?null:(ye.x=ye.y=!0,()=>{ye.x=ye.y=!1})}function gc(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const o=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function Os(e,t){const n=gc(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function ks(e){return!(e.pointerType==="touch"||Ds())}function yc(e,t,n={}){const[r,s,o]=Os(e,n),i=a=>{if(!ks(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{ks(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",i,s)}),o}function js(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Ns=(e,t)=>t?e===t?!0:Ns(e,t.parentElement):!1,Zn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,vc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function xc(e){return vc.has(e.tagName)||e.tabIndex!==-1}const Lt=new WeakSet;function Vs(e){return t=>{t.key==="Enter"&&e(t)}}function Jn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const bc=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vs(()=>{if(Lt.has(n))return;Jn(n,"down");const s=Vs(()=>{Jn(n,"up")}),o=()=>Jn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Is(e){return Zn(e)&&!Ds()}function Sc(e,t,n={}){const[r,s,o]=Os(e,n),i=a=>{const l=a.currentTarget;if(!l||!Is(a)||Lt.has(l))return;Lt.add(l),js(a,"set");const c=t(l,a),u=(p,m)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),js(p,"release"),!(!Is(p)||!Lt.has(l))&&(Lt.delete(l),typeof c=="function"&&c(p,{success:m}))},d=p=>{(p.isTrusted?Cc(p,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(p,!1):u(p,!(l instanceof Element)||Ns(l,p.target))},f=p=>{u(p,!1)};l.addEventListener("pointerup",d,s),l.addEventListener("pointercancel",f,s),l.addEventListener("lostpointercapture",f,s)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!xc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,s),l&&a.addEventListener("focus",c=>bc(c,s),s)}),o}function Cc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Rs=30,wc=e=>!isNaN(parseFloat(e));class Tc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const o=Ce.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ce.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=wc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&sn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Un);const r=this.events[t].add(n);return t==="change"?()=>{r(),W.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ce.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Rs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Rs);return Cs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Dt(e,t){return new Tc(e,t)}const Fs=g.createContext({strict:!1}),Bs={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"]},ut={};for(const e in Bs)ut[e]={isEnabled:t=>Bs[e].some(n=>!!t[n])};function _c(e){for(const t in e)ut[t]={...ut[t],...e[t]}}const Ec=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 cn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ec.has(e)}let $s=e=>!cn(e);function Pc(e){e&&($s=t=>t.startsWith("on")?!cn(t):e(t))}try{Pc(require("@emotion/is-prop-valid").default)}catch{}function Ac(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||($s(s)||n===!0&&cn(s)||!t&&!cn(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Mc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&sn(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const un=g.createContext({});function dn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ot(e){return typeof e=="string"||Array.isArray(e)}const Qn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],er=["initial",...Qn];function fn(e){return dn(e.animate)||er.some(t=>Ot(e[t]))}function zs(e){return!!(fn(e)||e.variants)}function Lc(e,t){if(fn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ot(n)?n:void 0,animate:Ot(r)?r:void 0}}return e.inherit!==!1?t:{}}function Dc(e){const{initial:t,animate:n}=Lc(e,g.useContext(un));return g.useMemo(()=>({initial:t,animate:n}),[Us(t),Us(n)])}function Us(e){return Array.isArray(e)?e.join(" "):e}const Oc=Symbol.for("motionComponentSymbol");function dt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kc(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):dt(n)&&(n.current=r))},[t])}const tr=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xs="data-"+tr("framerAppearId"),Ws=g.createContext({});function jc(e,t,n,r,s){var o,i;const{visualElement:a}=g.useContext(un),l=g.useContext(Fs),c=g.useContext(Fn),u=g.useContext(Ss).reducedMotion,d=g.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,p=g.useContext(Ws);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&Nc(d.current,n,s,p);const m=g.useRef(!1);g.useInsertionEffect(()=>{f&&m.current&&f.update(n,c)});const y=n[Xs],S=g.useRef(!!y&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,y))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,y)));return sc(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Yn.render(f.render),S.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!S.current&&f.animationState&&f.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,y)}),S.current=!1))}),f}function Nc(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ks(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&dt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Ks(e){if(e)return e.options.allowProjection!==!1?e.projection:Ks(e.parent)}function Vc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var o,i;e&&_c(e);function a(c,u){let d;const f={...g.useContext(Ss),...c,layoutId:Ic(c)},{isStatic:p}=f,m=Dc(c),y=r(c,p);if(!p&&Rn){Rc(f,e);const S=Fc(f);d=S.MeasureLayout,m.visualElement=jc(s,y,f,t,S.ProjectionNode)}return x.jsxs(un.Provider,{value:m,children:[d&&m.visualElement?x.jsx(d,{visualElement:m.visualElement,...f}):null,n(s,c,kc(y,m.visualElement,u),y,p,m.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(i=(o=s.displayName)!==null&&o!==void 0?o:s.name)!==null&&i!==void 0?i:""})`}`;const l=g.forwardRef(a);return l[Oc]=s,l}function Ic({layoutId:e}){const t=g.useContext(bs).id;return t&&e!==void 0?t+"-"+e:e}function Rc(e,t){const n=g.useContext(Fs).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?lt(!1,r):Ne(!1,r)}}function Fc(e){const{drag:t,layout:n}=ut;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Gs=e=>t=>typeof t=="string"&&t.startsWith(e),nr=Gs("--"),Bc=Gs("var(--"),rr=e=>Bc(e)?$c.test(e.split("/*")[0].trim()):!1,$c=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,kt={};function zc(e){for(const t in e)kt[t]=e[t],nr(t)&&(kt[t].isCSSVariable=!0)}const ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ke=new Set(ft);function qs(e,{layout:t,layoutId:n}){return Ke.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kt[e]||e==="opacity")}const oe=e=>!!(e&&e.getVelocity),Hs=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ee=(e,t,n)=>n>t?t:n<e?e:n,ht={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jt={...ht,transform:e=>Ee(0,1,e)},hn={...ht,default:1},Nt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ie=Nt("deg"),we=Nt("%"),D=Nt("px"),Uc=Nt("vh"),Xc=Nt("vw"),Ys={...we,parse:e=>we.parse(e)/100,transform:e=>we.transform(e*100)},Wc={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,radius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,top:D,right:D,bottom:D,left:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,backgroundPositionX:D,backgroundPositionY:D},Kc={rotate:Ie,rotateX:Ie,rotateY:Ie,rotateZ:Ie,scale:hn,scaleX:hn,scaleY:hn,scaleZ:hn,skew:Ie,skewX:Ie,skewY:Ie,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:jt,originX:Ys,originY:Ys,originZ:D},Zs={...ht,transform:Math.round},sr={...Wc,...Kc,zIndex:Zs,size:D,fillOpacity:jt,strokeOpacity:jt,numOctaves:Zs},Gc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qc=ft.length;function Hc(e,t,n){let r="",s=!0;for(let o=0;o<qc;o++){const i=ft[o],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Hs(a,sr[i]);if(!l){s=!1;const u=Gc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function or(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Ke.has(l)){i=!0;continue}else if(nr(l)){s[l]=c;continue}else{const u=Hs(c,sr[l]);l.startsWith("origin")?(a=!0,o[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=Hc(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;r.transformOrigin=`${l} ${c} ${u}`}}const ir=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Js(e,t,n){for(const r in t)!oe(t[r])&&!qs(r,n)&&(e[r]=t[r])}function Yc({transformTemplate:e},t){return g.useMemo(()=>{const n=ir();return or(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Zc(e,t){const n=e.style||{},r={};return Js(r,n,e),Object.assign(r,Yc(e,t)),r}function Jc(e,t){const n={},r=Zc(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 Qc=["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 ar(e){return typeof e!="string"||e.includes("-")?!1:!!(Qc.indexOf(e)>-1||/[A-Z]/u.test(e))}const eu={offset:"stroke-dashoffset",array:"stroke-dasharray"},tu={offset:"strokeDashoffset",array:"strokeDasharray"};function nu(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?eu:tu;e[o.offset]=D.transform(-r);const i=D.transform(t),a=D.transform(n);e[o.array]=`${i} ${a}`}function Qs(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function ru(e,t,n){const r=Qs(t,e.x,e.width),s=Qs(n,e.y,e.height);return`${r} ${s}`}function lr(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(or(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(s!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=ru(m,s!==void 0?s:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&nu(f,i,a,l,!1)}const eo=()=>({...ir(),attrs:{}}),cr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function su(e,t,n,r){const s=g.useMemo(()=>{const o=eo();return lr(o,t,cr(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Js(o,e.style,e),s.style={...o,...s.style}}return s}function ou(e=!1){return(n,r,s,{latestValues:o},i)=>{const l=(ar(n)?su:Jc)(r,o,i,n),c=Ac(r,typeof n=="string",e),u=n!==g.Fragment?{...c,...l,ref:s}:{},{children:d}=r,f=g.useMemo(()=>oe(d)?d.get():d,[d]);return g.createElement(n,{...u,children:f})}}function to(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ur(e,t,n,r){if(typeof t=="function"){const[s,o]=to(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=to(r);t=t(n!==void 0?n:e.custom,s,o)}return t}const dr=e=>Array.isArray(e),iu=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),au=e=>dr(e)?e[e.length-1]||0:e;function pn(e){const t=oe(e)?e.get():e;return iu(t)?t.toValue():t}function lu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,o){const i={latestValues:cu(r,s,o,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const no=e=>(t,n)=>{const r=g.useContext(un),s=g.useContext(Fn),o=()=>lu(e,t,r,s);return n?o():rc(o)};function cu(e,t,n,r){const s={},o=r(e,{});for(const f in o)s[f]=pn(o[f]);let{initial:i,animate:a}=e;const l=fn(e),c=zs(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!dn(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const m=ur(e,f[p]);if(m){const{transitionEnd:y,transition:S,...v}=m;for(const b in v){let C=v[b];if(Array.isArray(C)){const A=u?C.length-1:0;C=C[A]}C!==null&&(s[b]=C)}for(const b in y)s[b]=y[b]}}}return s}function fr(e,t,n){var r;const{style:s}=e,o={};for(const i in s)(oe(s[i])||t.style&&oe(t.style[i])||qs(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[i]=s[i]);return o}const uu={useVisualState:no({scrapeMotionValuesFromProps:fr,createRenderState:ir})};function ro(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function so(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const oo=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 io(e,t,n,r){so(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(oo.has(s)?s:tr(s),t.attrs[s])}function ao(e,t,n){const r=fr(e,t,n);for(const s in e)if(oe(e[s])||oe(t[s])){const o=ft.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const lo=["x","y","width","height","cx","cy","r"],du={useVisualState:no({scrapeMotionValuesFromProps:ao,createRenderState:eo,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let o=!!e.drag;if(!o){for(const a in s)if(Ke.has(a)){o=!0;break}}if(!o)return;let i=!t;if(t)for(let a=0;a<lo.length;a++){const l=lo[a];e[l]!==t[l]&&(i=!0)}i&&W.read(()=>{ro(n,r),W.render(()=>{lr(r,s,cr(n.tagName),e.transformTemplate),io(n,r)})})}})};function fu(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const i={...ar(r)?du:uu,preloadedFeatures:e,useRender:ou(s),createVisualElement:t,Component:r};return Vc(i)}}function Vt(e,t,n){const r=e.getProps();return ur(r,t,n!==void 0?n:r.custom,e)}const co=new Set(["width","height","top","left","right","bottom",...ft]);function hu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Dt(n))}function pu(e,t){const n=Vt(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=au(o[i]);hu(e,i,a)}}function mu(e){return!!(oe(e)&&e.add)}function hr(e,t){const n=e.getValue("willChange");if(mu(n))return n.add(t)}function uo(e){return e.props[Xs]}const fo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gu=1e-7,yu=12;function vu(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=fo(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>gu&&++a<yu);return i}function It(e,t,n,r){if(e===t&&n===r)return ue;const s=o=>vu(o,0,1,e,n);return o=>o===0||o===1?o:fo(s(o),t,r)}const ho=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,po=e=>t=>1-e(1-t),mo=It(.33,1.53,.69,.99),pr=po(mo),go=ho(pr),yo=e=>(e*=2)<1?.5*pr(e):.5*(2-Math.pow(2,-10*(e-1))),mr=e=>1-Math.sin(Math.acos(e)),vo=po(mr),xo=ho(mr),bo=e=>/^0[^.\s]+$/u.test(e);function xu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||bo(e):!0}const Rt=e=>Math.round(e*1e5)/1e5,gr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bu(e){return e==null}const Su=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yr=(e,t)=>n=>!!(typeof n=="string"&&Su.test(n)&&n.startsWith(e)||t&&!bu(n)&&Object.prototype.hasOwnProperty.call(n,t)),So=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(gr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Cu=e=>Ee(0,255,e),vr={...ht,transform:e=>Math.round(Cu(e))},Ge={test:yr("rgb","red"),parse:So("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vr.transform(e)+", "+vr.transform(t)+", "+vr.transform(n)+", "+Rt(jt.transform(r))+")"};function wu(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const xr={test:yr("#"),parse:wu,transform:Ge.transform},pt={test:yr("hsl","hue"),parse:So("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+we.transform(Rt(t))+", "+we.transform(Rt(n))+", "+Rt(jt.transform(r))+")"},ie={test:e=>Ge.test(e)||xr.test(e)||pt.test(e),parse:e=>Ge.test(e)?Ge.parse(e):pt.test(e)?pt.parse(e):xr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ge.transform(e):pt.transform(e)},Tu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _u(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Tu))===null||n===void 0?void 0:n.length)||0)>0}const Co="number",wo="color",Eu="var",Pu="var(",To="${}",Au=/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 Ft(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Au,l=>(ie.test(l)?(r.color.push(o),s.push(wo),n.push(ie.parse(l))):l.startsWith(Pu)?(r.var.push(o),s.push(Eu),n.push(l)):(r.number.push(o),s.push(Co),n.push(parseFloat(l))),++o,To)).split(To);return{values:n,split:a,indexes:r,types:s}}function _o(e){return Ft(e).values}function Eo(e){const{split:t,types:n}=Ft(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const a=n[i];a===Co?o+=Rt(s[i]):a===wo?o+=ie.transform(s[i]):o+=s[i]}return o}}const Mu=e=>typeof e=="number"?0:e;function Lu(e){const t=_o(e);return Eo(e)(t.map(Mu))}const Re={test:_u,parse:_o,createTransformer:Eo,getAnimatableNone:Lu},Du=new Set(["brightness","contrast","saturate","opacity"]);function Ou(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(gr)||[];if(!r)return e;const s=n.replace(r,"");let o=Du.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const ku=/\b([a-z-]*)\(.*?\)/gu,br={...Re,getAnimatableNone:e=>{const t=e.match(ku);return t?t.map(Ou).join(" "):e}},ju={...sr,color:ie,backgroundColor:ie,outlineColor:ie,fill:ie,stroke:ie,borderColor:ie,borderTopColor:ie,borderRightColor:ie,borderBottomColor:ie,borderLeftColor:ie,filter:br,WebkitFilter:br},Po=e=>ju[e];function Ao(e,t){let n=Po(e);return n!==br&&(n=Re),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Nu=new Set(["auto","none","0"]);function Vu(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!Nu.has(o)&&Ft(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Ao(n,s)}const qe=e=>e*180/Math.PI,Sr=e=>{const t=qe(Math.atan2(e[1],e[0]));return Cr(t)},Iu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sr,rotateZ:Sr,skewX:e=>qe(Math.atan(e[1])),skewY:e=>qe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cr=e=>(e=e%360,e<0&&(e+=360),e),Mo=Sr,Lo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Do=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ru={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Lo,scaleY:Do,scale:e=>(Lo(e)+Do(e))/2,rotateX:e=>Cr(qe(Math.atan2(e[6],e[5]))),rotateY:e=>Cr(qe(Math.atan2(-e[2],e[0]))),rotateZ:Mo,rotate:Mo,skewX:e=>qe(Math.atan(e[4])),skewY:e=>qe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Oo(e){return e.includes("scale")?1:0}function wr(e,t){if(!e||e==="none")return Oo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Ru,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Iu,s=a}if(!s)return Oo(t);const o=r[t],i=s[1].split(",").map(Bu);return typeof o=="function"?o(i):i[o]}const Fu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return wr(n,t)};function Bu(e){return parseFloat(e.trim())}const ko=e=>e===ht||e===D,$u=new Set(["x","y","z"]),zu=ft.filter(e=>!$u.has(e));function Uu(e){const t=[];return zu.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const mt={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})=>wr(t,"x"),y:(e,{transform:t})=>wr(t,"y")};mt.translateX=mt.x,mt.translateY=mt.y;const He=new Set;let Tr=!1,_r=!1;function jo(){if(_r){const e=Array.from(He).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Uu(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var a;(a=r.getValue(o))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}_r=!1,Tr=!1,He.forEach(e=>e.complete()),He.clear()}function No(){He.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_r=!0)})}function Xu(){No(),jo()}class Er{constructor(t,n,r,s,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(He.add(this),Tr||(Tr=!0,W.read(No),W.resolveKeyframes(jo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const i=s==null?void 0:s.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&i===void 0&&s.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),He.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,He.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Vo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Wu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ku(e){const t=Wu.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Gu=4;function Io(e,t,n=1){Ne(n<=Gu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=Ku(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return Vo(i)?parseFloat(i):i}return rr(s)?Io(s,t,n+1):s}const Ro=e=>t=>t.test(e),Fo=[ht,D,we,Ie,Xc,Uc,{test:e=>e==="auto",parse:e=>e}],Bo=e=>Fo.find(Ro(e));class $o extends Er{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),rr(c))){const u=Io(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!co.has(r)||t.length!==2)return;const[s,o]=t,i=Bo(s),a=Bo(o);if(i!==a)if(ko(i)&&ko(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)xu(t[s])&&r.push(s);r.length&&Vu(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=mt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const i=s.length-1,a=s[i];s[i]=mt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const zo=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Re.test(e)||e==="0")&&!e.startsWith("url("));function qu(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 Hu(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=zo(s,t),a=zo(o,t);return lt(i===a,`You are trying to animate ${t} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!i||!a?!1:qu(e)||(n==="spring"||Kn(n))&&r}const Yu=e=>e!==null;function mn(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Yu),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const Zu=40;class Uo{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ce.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Zu?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Xu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ce.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:o,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Hu(t,r,s,o))if(i)this.options.duration=0;else{l&&l(mn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const G=(e,t,n)=>e+(t-e)*n;function Pr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ju({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Pr(l,a,e+1/3),o=Pr(l,a,e),i=Pr(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function gn(e,t){return n=>n>0?t:e}const Ar=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Qu=[xr,Ge,pt],ed=e=>Qu.find(t=>t.test(e));function Xo(e){const t=ed(e);if(lt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===pt&&(n=Ju(n)),n}const Wo=(e,t)=>{const n=Xo(e),r=Xo(t);if(!n||!r)return gn(e,t);const s={...n};return o=>(s.red=Ar(n.red,r.red,o),s.green=Ar(n.green,r.green,o),s.blue=Ar(n.blue,r.blue,o),s.alpha=G(n.alpha,r.alpha,o),Ge.transform(s))},td=(e,t)=>n=>t(e(n)),Bt=(...e)=>e.reduce(td),Mr=new Set(["none","hidden"]);function nd(e,t){return Mr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function rd(e,t){return n=>G(e,t,n)}function Lr(e){return typeof e=="number"?rd:typeof e=="string"?rr(e)?gn:ie.test(e)?Wo:id:Array.isArray(e)?Ko:typeof e=="object"?ie.test(e)?Wo:sd:gn}function Ko(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>Lr(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function sd(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Lr(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function od(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][s[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[o]=l,s[i]++}return r}const id=(e,t)=>{const n=Re.createTransformer(t),r=Ft(e),s=Ft(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Mr.has(e)&&!s.values.length||Mr.has(t)&&!r.values.length?nd(e,t):Bt(Ko(od(r,s),s.values),n):(lt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),gn(e,t))};function Go(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?G(e,t,n):Lr(e)(e,t)}const ad=5;function qo(e,t,n){const r=Math.max(t-ad,0);return Cs(n-e(r),t-r)}const q={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},Ho=.001;function ld({duration:e=q.duration,bounce:t=q.bounce,velocity:n=q.velocity,mass:r=q.mass}){let s,o;lt(e<=Se(q.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Ee(q.minDamping,q.maxDamping,i),e=Ee(q.minDuration,q.maxDuration,_e(e)),i<1?(s=c=>{const u=c*i,d=u*e,f=u-n,p=Dr(c,i),m=Math.exp(-d);return Ho-f/p*m},o=c=>{const d=c*i*e,f=d*n+n,p=Math.pow(i,2)*Math.pow(c,2)*e,m=Math.exp(-d),y=Dr(Math.pow(c,2),i);return(-s(c)+Ho>0?-1:1)*((f-p)*m)/y}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=ud(s,o,a);if(e=Se(e),isNaN(l))return{stiffness:q.stiffness,damping:q.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const cd=12;function ud(e,t,n){let r=n;for(let s=1;s<cd;s++)r=r-e(r)/t(r);return r}function Dr(e,t){return e*Math.sqrt(1-t*t)}const dd=["duration","bounce"],fd=["stiffness","damping","mass"];function Yo(e,t){return t.some(n=>e[n]!==void 0)}function hd(e){let t={velocity:q.velocity,stiffness:q.stiffness,damping:q.damping,mass:q.mass,isResolvedFromDuration:!1,...e};if(!Yo(e,fd)&&Yo(e,dd))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Ee(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:q.mass,stiffness:s,damping:o}}else{const n=ld(e);t={...t,...n,mass:q.mass},t.isResolvedFromDuration=!0}return t}function Zo(e=q.visualDuration,t=q.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=hd({...n,velocity:-_e(n.velocity||0)}),m=f||0,y=c/(2*Math.sqrt(l*u)),S=i-o,v=_e(Math.sqrt(l/u)),b=Math.abs(S)<5;r||(r=b?q.restSpeed.granular:q.restSpeed.default),s||(s=b?q.restDelta.granular:q.restDelta.default);let C;if(y<1){const T=Dr(v,y);C=M=>{const j=Math.exp(-y*v*M);return i-j*((m+y*v*S)/T*Math.sin(T*M)+S*Math.cos(T*M))}}else if(y===1)C=T=>i-Math.exp(-v*T)*(S+(m+v*S)*T);else{const T=v*Math.sqrt(y*y-1);C=M=>{const j=Math.exp(-y*v*M),P=Math.min(T*M,300);return i-j*((m+y*v*S)*Math.sinh(P)+T*S*Math.cosh(P))/T}}const A={calculatedDuration:p&&d||null,next:T=>{const M=C(T);if(p)a.done=T>=d;else{let j=0;y<1&&(j=T===0?Se(m):qo(C,T,M));const P=Math.abs(j)<=r,V=Math.abs(i-M)<=s;a.done=P&&V}return a.value=a.done?i:M,a},toString:()=>{const T=Math.min(Ts(A),Wn),M=Es(j=>A.next(T*j).value,T,30);return T+"ms "+M}};return A}function Jo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let y=n*t;const S=d+y,v=i===void 0?S:i(S);v!==S&&(y=v-d);const b=P=>-y*Math.exp(-P/r),C=P=>v+b(P),A=P=>{const V=b(P),_=C(P);f.done=Math.abs(V)<=c,f.value=f.done?v:_};let T,M;const j=P=>{p(f.value)&&(T=P,M=Zo({keyframes:[f.value,m(f.value)],velocity:qo(C,P,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return j(0),{calculatedDuration:null,next:P=>{let V=!1;return!M&&T===void 0&&(V=!0,A(P),j(P)),T!==void 0&&P>=T?M.next(P-T):(!V&&A(P),f)}}}const pd=It(.42,0,1,1),md=It(0,0,.58,1),Qo=It(.42,0,.58,1),gd=e=>Array.isArray(e)&&typeof e[0]!="number",ei={linear:ue,easeIn:pd,easeInOut:Qo,easeOut:md,circIn:mr,circInOut:xo,circOut:vo,backIn:pr,backInOut:go,backOut:mo,anticipate:yo},ti=e=>{if(Gn(e)){Ne(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return It(t,n,r,s)}else if(typeof e=="string")return Ne(ei[e]!==void 0,`Invalid easing type '${e}'`),ei[e];return e};function yd(e,t,n){const r=[],s=n||Go,o=e.length-1;for(let i=0;i<o;i++){let a=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||ue:t;a=Bt(l,a)}r.push(a)}return r}function vd(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Ne(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=yd(t,r,s),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ct(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Ee(e[0],e[o-1],u)):c}function xd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ct(0,t,r);e.push(G(n,1,s))}}function bd(e){const t=[0];return xd(t,e.length-1),t}function Sd(e,t){return e.map(n=>n*t)}function Cd(e,t){return e.map(()=>t||Qo).splice(0,e.length-1)}function $t({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=gd(r)?r.map(ti):ti(r),o={done:!1,value:t[0]},i=Sd(n&&n.length===t.length?n:bd(t),e),a=vd(i,t,{ease:Array.isArray(s)?s:Cd(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const wd=e=>{const t=({timestamp:n})=>e(n);return{start:()=>W.update(t,!0),stop:()=>Ve(t),now:()=>ne.isProcessing?ne.timestamp:Ce.now()}},Td={decay:Jo,inertia:Jo,tween:$t,keyframes:$t,spring:Zo},_d=e=>e/100;class Or extends Uo{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:o}=this.options,i=(s==null?void 0:s.KeyframeResolver)||Er,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(o,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=this.options,a=Kn(n)?n:Td[n]||$t;let l,c;process.env.NODE_ENV!=="production"&&a!==$t&&Ne(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==$t&&typeof t[0]!="number"&&(l=Bt(_d,Go(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});o==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Ts(u));const{calculatedDuration:d}=u,f=d+s,p=f*(r+1)-s;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:s,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:y,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let C=this.currentTime,A=o;if(p){const P=Math.min(this.currentTime,u)/d;let V=Math.floor(P),_=P%1;!_&&P>=1&&(_=1),_===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(m==="reverse"?(_=1-_,y&&(_-=y/d)):m==="mirror"&&(A=i)),C=Ee(0,1,_)*d}const T=b?{done:!1,value:l[0]}:A.next(C);a&&(T.value=a(T.value));let{done:M}=T;!b&&c!==null&&(M=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return j&&s!==void 0&&(T.value=mn(l,this.options,s)),S&&S(T.value),j&&this.finish(),T}get duration(){const{resolved:t}=this;return t?_e(t.calculatedDuration):0}get time(){return _e(this.currentTime)}set time(t){t=Se(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=_e(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=wd,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ed=new Set(["opacity","clipPath","filter","transform"]);function Pd(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=As(a,s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"})}const Ad=zn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),yn=10,Md=2e4;function Ld(e){return Kn(e.type)||e.type==="spring"||!Ps(e.ease)}function Dd(e,t){const n=new Or({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let o=0;for(;!r.done&&o<Md;)r=n.sample(o),s.push(r.value),o+=yn;return{times:void 0,keyframes:s,duration:o-yn,ease:"linear"}}const ni={anticipate:yo,backInOut:go,circInOut:xo};function Od(e){return e in ni}class ri extends Uo{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:o}=this.options;this.resolver=new $o(o,(i,a)=>this.onKeyframesResolved(i,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:o,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&on()&&Od(o)&&(o=ni[o]),Ld(this.options)){const{onComplete:d,onUpdate:f,motionValue:p,element:m,...y}=this.options,S=Dd(t,y);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,s=S.times,o=S.ease,i="keyframes"}const u=Pd(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:o});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(_s(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(mn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:i,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return _e(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return _e(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Se(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ue;const{animation:r}=n;_s(r,t)}return ue}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:o,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...p}=this.options,m=new Or({...p,keyframes:r,duration:s,type:o,ease:i,times:a,isGenerator:!0}),y=Se(this.time);c.setWithVelocity(m.sample(y-yn).value,m.sample(y).value,yn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:o,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Ad()&&r&&Ed.has(r)&&!l&&!c&&!s&&o!=="mirror"&&i!==0&&a!=="inertia"}}const kd={type:"spring",stiffness:500,damping:25,restSpeed:10},jd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Nd={type:"keyframes",duration:.8},Vd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Id=(e,{keyframes:t})=>t.length>2?Nd:Ke.has(e)?e.startsWith("scale")?jd(t[1]):kd:Vd;function Rd({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const kr=(e,t,n,r={},s,o)=>i=>{const a=Xn(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Se(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};Rd(a)||(u={...u,...Id(e,u)}),u.duration&&(u.duration=Se(u.duration)),u.repeatDelay&&(u.repeatDelay=Se(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=mn(u.keyframes,a);if(f!==void 0)return W.update(()=>{u.onUpdate(f),u.onComplete()}),new cc([])}return!o&&ri.supports(u)?new ri(u):new Or(u)};function Fd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function si(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var o;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const d in l){const f=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),p=l[d];if(p===void 0||u&&Fd(u,d))continue;const m={delay:n,...Xn(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=uo(e);if(v){const b=window.MotionHandoffAnimation(v,d,W);b!==null&&(m.startTime=b,y=!0)}}hr(e,d),f.start(kr(d,f,p,e.shouldReduceMotion&&co.has(d)?{type:!1}:m,e,y));const S=f.animation;S&&c.push(S)}return a&&Promise.all(c).then(()=>{W.update(()=>{a&&pu(e,a)})}),c}function jr(e,t,n={}){var r;const s=Vt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const i=s?()=>Promise.all(si(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=o;return Bd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Bd(e,t,n=0,r=0,s=1,o){const i=[],a=(e.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort($d).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(jr(c,t,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function $d(e,t){return e.sortNodePosition(t)}function zd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>jr(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=jr(e,t,n);else{const s=typeof t=="function"?Vt(e,t,n.custom):t;r=Promise.all(si(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function oi(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 Ud=er.length;function ii(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ii(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Ud;n++){const r=er[n],s=e.props[r];(Ot(s)||s===!1)&&(t[r]=s)}return t}const Xd=[...Qn].reverse(),Wd=Qn.length;function Kd(e){return t=>Promise.all(t.map(({animation:n,options:r})=>zd(e,n,r)))}function Gd(e){let t=Kd(e),n=ai(),r=!0;const s=l=>(c,u)=>{var d;const f=Vt(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...y}=f;c={...c,...y,...m}}return c};function o(l){t=l(e)}function i(l){const{props:c}=e,u=ii(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let S=0;S<Wd;S++){const v=Xd[S],b=n[v],C=c[v]!==void 0?c[v]:u[v],A=Ot(C),T=v===l?b.isActive:null;T===!1&&(m=S);let M=C===u[v]&&C!==c[v]&&A;if(M&&r&&e.manuallyAnimateOnMount&&(M=!1),b.protectedKeys={...p},!b.isActive&&T===null||!C&&!b.prevProp||dn(C)||typeof C=="boolean")continue;const j=qd(b.prevProp,C);let P=j||v===l&&b.isActive&&!M&&A||S>m&&A,V=!1;const _=Array.isArray(C)?C:[C];let z=_.reduce(s(v),{});T===!1&&(z={});const{prevResolvedValues:$={}}=b,re={...$,...z},de=U=>{P=!0,f.has(U)&&(V=!0,f.delete(U)),b.needsAnimating[U]=!0;const O=e.getValue(U);O&&(O.liveStyle=!1)};for(const U in re){const O=z[U],R=$[U];if(p.hasOwnProperty(U))continue;let K=!1;dr(O)&&dr(R)?K=!oi(O,R):K=O!==R,K?O!=null?de(U):f.add(U):O!==void 0&&f.has(U)?de(U):b.protectedKeys[U]=!0}b.prevProp=C,b.prevResolvedValues=z,b.isActive&&(p={...p,...z}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(M&&j)||V)&&d.push(..._.map(U=>({animation:U,options:{type:v}})))}if(f.size){const S={};if(typeof c.initial!="boolean"){const v=Vt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(S.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),C=e.getValue(v);C&&(C.liveStyle=!0),S[v]=b??null}),d.push({animation:S})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ai(),r=!0}}}function qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oi(t,e):!1}function Ye(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ai(){return{animate:Ye(!0),whileInView:Ye(),whileHover:Ye(),whileTap:Ye(),whileDrag:Ye(),whileFocus:Ye(),exit:Ye()}}class Fe{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Hd extends Fe{constructor(t){super(t),t.animationState||(t.animationState=Gd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();dn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Yd=0;class Zd extends Fe{constructor(){super(...arguments),this.id=Yd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Jd={animation:{Feature:Hd},exit:{Feature:Zd}};function zt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ut(e){return{point:{x:e.pageX,y:e.pageY}}}const Qd=e=>t=>Zn(t)&&e(t,Ut(t));function Xt(e,t,n,r){return zt(e,t,Qd(n),r)}function li({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ef({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function tf(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const ci=1e-4,nf=1-ci,rf=1+ci,ui=.01,sf=0-ui,of=0+ui;function ae(e){return e.max-e.min}function af(e,t,n){return Math.abs(e-t)<=n}function di(e,t,n,r=.5){e.origin=r,e.originPoint=G(t.min,t.max,e.origin),e.scale=ae(n)/ae(t),e.translate=G(n.min,n.max,e.origin)-e.originPoint,(e.scale>=nf&&e.scale<=rf||isNaN(e.scale))&&(e.scale=1),(e.translate>=sf&&e.translate<=of||isNaN(e.translate))&&(e.translate=0)}function Wt(e,t,n,r){di(e.x,t.x,n.x,r?r.originX:void 0),di(e.y,t.y,n.y,r?r.originY:void 0)}function fi(e,t,n){e.min=n.min+t.min,e.max=e.min+ae(t)}function lf(e,t,n){fi(e.x,t.x,n.x),fi(e.y,t.y,n.y)}function hi(e,t,n){e.min=t.min-n.min,e.max=e.min+ae(t)}function Kt(e,t,n){hi(e.x,t.x,n.x),hi(e.y,t.y,n.y)}const pi=()=>({translate:0,scale:1,origin:0,originPoint:0}),gt=()=>({x:pi(),y:pi()}),mi=()=>({min:0,max:0}),Y=()=>({x:mi(),y:mi()});function pe(e){return[e("x"),e("y")]}function Nr(e){return e===void 0||e===1}function Vr({scale:e,scaleX:t,scaleY:n}){return!Nr(e)||!Nr(t)||!Nr(n)}function Ze(e){return Vr(e)||gi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gi(e){return yi(e.x)||yi(e.y)}function yi(e){return e&&e!=="0%"}function vn(e,t,n){const r=e-n,s=t*r;return n+s}function vi(e,t,n,r,s){return s!==void 0&&(e=vn(e,s,r)),vn(e,n,r)+t}function Ir(e,t=0,n=1,r,s){e.min=vi(e.min,t,n,r,s),e.max=vi(e.max,t,n,r,s)}function xi(e,{x:t,y:n}){Ir(e.x,t.translate,t.scale,t.originPoint),Ir(e.y,n.translate,n.scale,n.originPoint)}const bi=.999999999999,Si=1.0000000000001;function cf(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,i;for(let a=0;a<s;a++){o=n[a],i=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&vt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,xi(e,i)),r&&Ze(o.latestValues)&&vt(e,o.latestValues))}t.x<Si&&t.x>bi&&(t.x=1),t.y<Si&&t.y>bi&&(t.y=1)}function yt(e,t){e.min=e.min+t,e.max=e.max+t}function Ci(e,t,n,r,s=.5){const o=G(e.min,e.max,s);Ir(e,t,n,o,r)}function vt(e,t){Ci(e.x,t.x,t.scaleX,t.scale,t.originX),Ci(e.y,t.y,t.scaleY,t.scale,t.originY)}function wi(e,t){return li(tf(e.getBoundingClientRect(),t))}function uf(e,t,n){const r=wi(e,n),{scroll:s}=t;return s&&(yt(r.x,s.offset.x),yt(r.y,s.offset.y)),r}const Ti=({current:e})=>e?e.ownerDocument.defaultView:null,_i=(e,t)=>Math.abs(e-t);function df(e,t){const n=_i(e.x,t.x),r=_i(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ei{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Fr(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=df(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=ne;this.history.push({...m,timestamp:y});const{onStart:S,onMove:v}=this.handlers;f||(S&&S(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Rr(f,this.transformPagePoint),W.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Fr(d.type==="pointercancel"?this.lastMoveEventInfo:Rr(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,S),m&&m(d,S)},!Zn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const i=Ut(t),a=Rr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=ne;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Fr(a,this.history)),this.removeListeners=Bt(Xt(this.contextWindow,"pointermove",this.handlePointerMove),Xt(this.contextWindow,"pointerup",this.handlePointerUp),Xt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ve(this.updatePoint)}}function Rr(e,t){return t?{point:t(e.point)}:e}function Pi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fr({point:e},t){return{point:e,delta:Pi(e,Ai(t)),offset:Pi(e,ff(t)),velocity:hf(t,.1)}}function ff(e){return e[0]}function Ai(e){return e[e.length-1]}function hf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Ai(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Se(t)));)n--;if(!r)return{x:0,y:0};const o=_e(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const i={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function pf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?G(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?G(n,e,r.max):Math.min(e,n)),e}function Mi(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 mf(e,{top:t,left:n,bottom:r,right:s}){return{x:Mi(e.x,n,s),y:Mi(e.y,t,r)}}function Li(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 gf(e,t){return{x:Li(e.x,t.x),y:Li(e.y,t.y)}}function yf(e,t){let n=.5;const r=ae(e),s=ae(t);return s>r?n=ct(t.min,t.max-r,e.min):r>s&&(n=ct(e.min,e.max-s,t.min)),Ee(0,1,n)}function vf(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 Br=.35;function xf(e=Br){return e===!1?e=0:e===!0&&(e=Br),{x:Di(e,"left","right"),y:Di(e,"top","bottom")}}function Di(e,t,n){return{min:Oi(e,t),max:Oi(e,n)}}function Oi(e,t){return typeof e=="number"?e:e[t]||0}const bf=new WeakMap;class Sf{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=Y(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ut(u).point)},o=(u,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mc(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pe(S=>{let v=this.getAxisMotionValue(S).get()||0;if(we.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const C=b.layout.layoutBox[S];C&&(v=ae(C)*(parseFloat(v)/100))}}this.originPoint[S]=v}),m&&W.postRender(()=>m(u,d)),hr(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:S}=d;if(p&&this.currentDirection===null){this.currentDirection=Cf(S),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),this.visualElement.render(),y&&y(u,d)},a=(u,d)=>this.stop(u,d),l=()=>pe(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ei(t,{onSessionStart:s,onStart:o,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Ti(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&W.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!xn(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=pf(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&dt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=mf(s.layoutBox,n):this.constraints=!1,this.elastic=xf(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&pe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=vf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dt(t))return!1;const r=t.current;Ne(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=uf(r,s.root,this.visualElement.getTransformPagePoint());let i=gf(s.layout.layoutBox,o);if(n){const a=n(ef(i));this.hasMutatedConstraints=!!a,a&&(i=li(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=pe(u=>{if(!xn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return hr(this.visualElement,t),r.start(kr(t,r,0,n,this.visualElement,!1))}stopAnimation(){pe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){pe(n=>{const{drag:r}=this.getProps();if(!xn(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:a}=s.layout.layoutBox[n];o.set(t[n]-G(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dt(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};pe(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();s[i]=yf({min:l,max:l},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pe(i=>{if(!xn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(G(l,c,s[i]))})}addListeners(){if(!this.visualElement.current)return;bf.set(this.visualElement,this);const t=this.visualElement.current,n=Xt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();dt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),W.read(r);const i=zt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pe(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:i=Br,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function xn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wf extends Fe{constructor(t){super(t),this.removeGroupControls=ue,this.removeListeners=ue,this.controls=new Sf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ue}unmount(){this.removeGroupControls(),this.removeListeners()}}const ki=e=>(t,n)=>{e&&W.postRender(()=>e(t,n))};class Tf extends Fe{constructor(){super(...arguments),this.removePointerDownListener=ue}onPointerDown(t){this.session=new Ei(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ti(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:ki(t),onStart:ki(n),onMove:r,onEnd:(o,i)=>{delete this.session,s&&W.postRender(()=>s(o,i))}}}mount(){this.removePointerDownListener=Xt(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 bn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ji(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(D.test(e))e=parseFloat(e);else return e;const n=ji(e,t.target.x),r=ji(e,t.target.y);return`${n}% ${r}%`}},_f={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Re.parse(e);if(s.length>5)return r;const o=Re.createTransformer(e),i=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=a,s[1+i]/=l;const c=G(a,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=c),typeof s[3+i]=="number"&&(s[3+i]/=c),o(s)}};class Ef extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;zc(Pf),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),bn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,i=r.projection;return i&&(i.isPresent=o,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||W.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Yn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ni(e){const[t,n]=oc(),r=g.useContext(bs);return x.jsx(Ef,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Ws),isPresent:t,safeToRemove:n})}const Pf={borderRadius:{...Gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gt,borderTopRightRadius:Gt,borderBottomLeftRadius:Gt,borderBottomRightRadius:Gt,boxShadow:_f};function Af(e,t,n){const r=oe(e)?e:Dt(e);return r.start(kr("",r,t,n)),r.animation}function Mf(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Lf=(e,t)=>e.depth-t.depth;class Df{constructor(){this.children=[],this.isDirty=!1}add(t){Bn(this.children,t),this.isDirty=!0}remove(t){$n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Lf),this.isDirty=!1,this.children.forEach(t)}}function Of(e,t){const n=Ce.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(Ve(r),e(o-t))};return W.read(r,!0),()=>Ve(r)}const Vi=["TopLeft","TopRight","BottomLeft","BottomRight"],kf=Vi.length,Ii=e=>typeof e=="string"?parseFloat(e):e,Ri=e=>typeof e=="number"||D.test(e);function jf(e,t,n,r,s,o){s?(e.opacity=G(0,n.opacity!==void 0?n.opacity:1,Nf(r)),e.opacityExit=G(t.opacity!==void 0?t.opacity:1,0,Vf(r))):o&&(e.opacity=G(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<kf;i++){const a=`border${Vi[i]}Radius`;let l=Fi(t,a),c=Fi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ri(l)===Ri(c)?(e[a]=Math.max(G(Ii(l),Ii(c),r),0),(we.test(c)||we.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=G(t.rotate||0,n.rotate||0,r))}function Fi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Nf=Bi(0,.5,vo),Vf=Bi(.5,.95,ue);function Bi(e,t,n){return r=>r<e?0:r>t?1:n(ct(e,t,r))}function $i(e,t){e.min=t.min,e.max=t.max}function me(e,t){$i(e.x,t.x),$i(e.y,t.y)}function zi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ui(e,t,n,r,s){return e-=t,e=vn(e,1/n,r),s!==void 0&&(e=vn(e,1/s,r)),e}function If(e,t=0,n=1,r=.5,s,o=e,i=e){if(we.test(t)&&(t=parseFloat(t),t=G(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=G(o.min,o.max,r);e===o&&(a-=t),e.min=Ui(e.min,t,n,a,s),e.max=Ui(e.max,t,n,a,s)}function Xi(e,t,[n,r,s],o,i){If(e,t[n],t[r],t[s],t.scale,o,i)}const Rf=["x","scaleX","originX"],Ff=["y","scaleY","originY"];function Wi(e,t,n,r){Xi(e.x,t,Rf,n?n.x:void 0,r?r.x:void 0),Xi(e.y,t,Ff,n?n.y:void 0,r?r.y:void 0)}function Ki(e){return e.translate===0&&e.scale===1}function Gi(e){return Ki(e.x)&&Ki(e.y)}function qi(e,t){return e.min===t.min&&e.max===t.max}function Bf(e,t){return qi(e.x,t.x)&&qi(e.y,t.y)}function Hi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Yi(e,t){return Hi(e.x,t.x)&&Hi(e.y,t.y)}function Zi(e){return ae(e.x)/ae(e.y)}function Ji(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $f{constructor(){this.members=[]}add(t){Bn(this.members,t),t.scheduleRender()}remove(t){if($n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function zf(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((s||o||i)&&(r=`translate3d(${s}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $r=["","X","Y","Z"],Uf={visibility:"hidden"},Qi=1e3;let Xf=0;function zr(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ea(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=uo(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",W,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ea(r)}function ta({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Xf++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Gf),this.nodes.forEach(Jf),this.nodes.forEach(Qf),this.nodes.forEach(qf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Df)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Un),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Mf(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Of(f,250),bn.hasAnimatedSinceResize&&(bn.hasAnimatedSinceResize=!1,this.nodes.forEach(ra))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||sh,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Yi(this.targetLayout,m),C=!f&&p;if(this.options.layoutRoot||this.resumeFrom||C||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,C);const A={...Xn(y,"layout"),onPlay:S,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else f||ra(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ve(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(eh),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ea(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(na);return}this.isUpdating||this.nodes.forEach(Yf),this.isUpdating=!1,this.nodes.forEach(Zf),this.nodes.forEach(Wf),this.nodes.forEach(Kf),this.clearAllSnapshots();const a=Ce.now();ne.delta=Ee(0,1e3/60,a-ne.timestamp),ne.timestamp=a,ne.isProcessing=!0,Hn.update.process(ne),Hn.preRender.process(ne),Hn.render.process(ne),ne.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hf),this.sharedNodes.forEach(th)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ae(this.snapshot.measuredBox.x)&&!ae(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Y(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ze(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),oh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return Y();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(ih))){const{scroll:u}=this.root;u&&(yt(l.x,u.offset.x),yt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=Y();if(me(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&me(l,i),yt(l.x,d.offset.x),yt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=Y();me(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&vt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ze(u.latestValues)&&vt(l,u.latestValues)}return Ze(this.latestValues)&&vt(l,this.latestValues),l}removeTransform(i){const a=Y();me(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ze(c.latestValues))continue;Vr(c.latestValues)&&c.updateSnapshot();const u=Y(),d=c.measurePageBox();me(u,d),Wi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ze(this.latestValues)&&Wi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ne.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=ne.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Kt(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):me(this.target,this.layout.layoutBox),xi(this.target,this.targetDelta)):me(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Kt(this.relativeTargetOrigin,this.target,p.target),me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Vr(this.parent.latestValues)||gi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ne.timestamp&&(c=!1),c)return;const{layout:u,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||!(u||d))return;me(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;cf(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Y());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zi(this.prevProjectionDelta.x,this.projectionDelta.x),zi(this.prevProjectionDelta.y,this.projectionDelta.y)),Wt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Ji(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ji(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gt(),this.projectionDelta=gt(),this.projectionDeltaWithTransform=gt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Y(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,S=this.getStack(),v=!S||S.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(rh));this.animationProgress=0;let C;this.mixTargetDelta=A=>{const T=A/1e3;sa(d.x,i.x,T),sa(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nh(this.relativeTarget,this.relativeTargetOrigin,f,T),C&&Bf(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Y()),me(C,this.relativeTarget)),y&&(this.animationValues=u,jf(u,c,this.latestValues,T,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ve(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{bn.hasAnimatedSinceResize=!0,this.currentAnimation=Af(0,Qi,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qi),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&ca(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Y();const d=ae(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=ae(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}me(a,l),vt(a,u),Wt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new $f),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&zr("z",i,c,this.animationValues);for(let u=0;u<$r.length;u++)zr(`rotate${$r[u]}`,i,c,this.animationValues),zr(`skew${$r[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Uf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=pn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=pn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ze(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=zf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:p,y:m}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in kt){if(f[y]===void 0)continue;const{correct:S,applyTo:v,isCSSVariable:b}=kt[y],C=c.transform==="none"?f[y]:S(f[y],d);if(v){const A=v.length;for(let T=0;T<A;T++)c[v[T]]=C}else b?this.options.visualElement.renderState.vars[y]=C:c[y]=C}return this.options.layoutId&&(c.pointerEvents=d===this?pn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(na),this.root.sharedNodes.clear()}}}function Wf(e){e.updateLayout()}function Kf(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;o==="size"?pe(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=ae(f);f.min=r[d].min,f.max=f.min+p}):ca(o,n.layoutBox,r)&&pe(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=ae(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=gt();Wt(a,r,n.layoutBox);const l=gt();i?Wt(l,e.applyTransform(s,!0),n.measuredBox):Wt(l,r,n.layoutBox);const c=!Gi(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Y();Kt(m,n.layoutBox,f.layoutBox);const y=Y();Kt(y,r,p.layoutBox),Yi(m,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Gf(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 qf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hf(e){e.clearSnapshot()}function na(e){e.clearMeasurements()}function Yf(e){e.isLayoutDirty=!1}function Zf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ra(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jf(e){e.resolveTargetDelta()}function Qf(e){e.calcProjection()}function eh(e){e.resetSkewAndRotation()}function th(e){e.removeLeadSnapshot()}function sa(e,t,n){e.translate=G(t.translate,0,n),e.scale=G(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oa(e,t,n,r){e.min=G(t.min,n.min,r),e.max=G(t.max,n.max,r)}function nh(e,t,n,r){oa(e.x,t.x,n.x,r),oa(e.y,t.y,n.y,r)}function rh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sh={duration:.45,ease:[.4,0,.1,1]},ia=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),aa=ia("applewebkit/")&&!ia("chrome/")?Math.round:ue;function la(e){e.min=aa(e.min),e.max=aa(e.max)}function oh(e){la(e.x),la(e.y)}function ca(e,t,n){return e==="position"||e==="preserve-aspect"&&!af(Zi(t),Zi(n),.2)}function ih(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const ah=ta({attachResizeListener:(e,t)=>zt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ur={current:void 0},ua=ta({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ur.current){const e=new ah({});e.mount(window),e.setOptions({layoutScroll:!0}),Ur.current=e}return Ur.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),lh={pan:{Feature:Tf},drag:{Feature:wf,ProjectionNode:ua,MeasureLayout:Ni}};function da(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&W.postRender(()=>o(t,Ut(t)))}class ch extends Fe{mount(){const{current:t}=this.node;t&&(this.unmount=yc(t,(n,r)=>(da(this.node,r,"Start"),s=>da(this.node,s,"End"))))}unmount(){}}class uh extends Fe{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=Bt(zt(this.node.current,"focus",()=>this.onFocus()),zt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fa(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&W.postRender(()=>o(t,Ut(t)))}class dh extends Fe{mount(){const{current:t}=this.node;t&&(this.unmount=Sc(t,(n,r)=>(fa(this.node,r,"Start"),(s,{success:o})=>fa(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xr=new WeakMap,Wr=new WeakMap,fh=e=>{const t=Xr.get(e.target);t&&t(e)},hh=e=>{e.forEach(fh)};function ph({root:e,...t}){const n=e||document;Wr.has(n)||Wr.set(n,{});const r=Wr.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(hh,{root:e,...t})),r[s]}function mh(e,t,n){const r=ph(t);return Xr.set(e,n),r.observe(e),()=>{Xr.delete(e),r.unobserve(e)}}const gh={some:0,all:1};class yh extends Fe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:gh[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return mh(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(vh(t,n))&&this.startObserver()}unmount(){}}function vh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xh={inView:{Feature:yh},tap:{Feature:dh},focus:{Feature:uh},hover:{Feature:ch}},bh={layout:{ProjectionNode:ua,MeasureLayout:Ni}},Kr={current:null},ha={current:!1};function Sh(){if(ha.current=!0,!!Rn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kr.current=e.matches;e.addListener(t),t()}else Kr.current=!1}const Ch=[...Fo,ie,Re],wh=e=>Ch.find(Ro(e)),Th=new WeakMap;function _h(e,t,n){for(const r in t){const s=t[r],o=n[r];if(oe(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&sn(s.version==="12.5.0",`Attempting to mix Motion versions ${s.version} with 12.5.0 may not work as expected.`);else if(oe(o))e.addValue(r,Dt(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,Dt(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const pa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Eh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Er,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Ce.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,W.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=fn(n),this.isVariantNode=zs(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const m=f[p];l[p]!==void 0&&oe(m)&&m.set(l[p],!1)}}mount(t){this.current=t,Th.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)),ha.current||Sh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kr.current,process.env.NODE_ENV!=="production"&&sn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ve(this.notifyUpdate),Ve(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ke.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&W.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o(),i&&i(),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 ut){const n=ut[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}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<pa.length;r++){const s=pa[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=_h(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Dt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Vo(s)||bo(s))?s=parseFloat(s):!wh(s)&&Re.test(n)&&(s=Ao(t,n)),this.setBaseTarget(t,oe(s)?s.get():s)),oe(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const i=ur(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(s=i[t])}if(r&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!oe(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Un),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ma extends Eh{constructor(){super(...arguments),this.KeyframeResolver=$o}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;oe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ph(e){return window.getComputedStyle(e)}class Ah extends ma{constructor(){super(...arguments),this.type="html",this.renderInstance=so}readValueFromInstance(t,n){if(Ke.has(n))return Fu(t,n);{const r=Ph(t),s=(nr(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wi(t,n)}build(t,n,r){or(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fr(t,n,r)}}class Mh extends ma{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&ro(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ke.has(n)){const r=Po(n);return r&&r.default||0}return n=oo.has(n)?n:tr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ao(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&W.postRender(this.updateDimensions)}build(t,n,r){lr(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){io(t,n,r,s)}mount(t){this.isSVGTag=cr(t.tagName),super.mount(t)}}const Lh=(e,t)=>ar(e)?new Mh(t):new Ah(t,{allowProjection:e!==g.Fragment}),Dh=fu({...Jd,...xh,...lh,...bh},Lh),Je=Mc(Dh),Oh={root:"_root_uup2j_1"},ga={bgDefault:"c-corporate-default-bg",cBlack:"c-corporate-default-black",cBlue:"c-corporate-default-blue",bgDark:"c-corporate-default-dark-bg",cDarkBlue:"c-corporate-default-dark-blue",cDarkGreen:"c-corporate-default-dark-green",cGreen:"c-corporate-default-green",cRichBlue:"c-corporate-default-rich-blue",grey050:"c-grey-050",grey100:"c-grey-100",grey200:"c-grey-200",grey300:"c-grey-300",grey400:"c-grey-400",grey500:"c-grey-500",grey600:"c-grey-600",grey700:"c-grey-700",grey800:"c-grey-800",grey900:"c-grey-900",rFull:"radius-full",rL:"radius-l",rM:"radius-m",rNone:"radius-none",rS:"radius-s",rXL:"radius-xl",rXS:"radius-xs",rXXL:"radius-xxl",rXXS:"radius-xxs",pXXS:"p-xxs",pXS:"p-xs",pS:"p-s",pM:"p-m",pL:"p-l",pXL:"p-xl",pXXL:"p-xxl",pxXXS:"px-xxs",pxXS:"px-xs",pxS:"px-s",pxM:"px-m",pxL:"px-l",pxXL:"px-xl",pxXXL:"px-xxl",pyXXS:"py-xxs",pyXS:"py-xs",pyS:"py-s",pyM:"py-m",pyL:"py-l",pyXL:"py-xl",pyXXL:"py-xxl",ptXXS:"pt-xxs",ptXS:"pt-xs",ptS:"pt-s",ptM:"pt-m",ptL:"pt-l",ptXL:"pt-xl",ptXXL:"pt-xxl",prXXS:"pr-xxs",prXS:"pr-xs",prS:"pr-s",prM:"pr-m",prL:"pr-l",prXL:"pr-xl",prXXL:"pr-xxl",pbXXS:"pb-xxs",pbXS:"pb-xs",pbS:"pb-s",pbM:"pb-m",pbL:"pb-l",pbXL:"pb-xl",pbXXL:"pb-xxl",plXXS:"pl-xxs",plXS:"pl-xs",plS:"pl-s",plM:"pl-m",plL:"pl-l",plXL:"pl-xl",plXXL:"pl-xxl",mXXS:"m-xxs",mXS:"m-xs",mS:"m-s",mM:"m-m",mL:"m-l",mXL:"m-xl",mXXL:"m-xxl",mxXXS:"mx-xxs",mxXS:"mx-xs",mxS:"mx-s",mxM:"mx-m",mxL:"mx-l",mxXL:"mx-xl",mxXXL:"mx-xxl",myXXS:"my-xxs",myXS:"my-xs",myS:"my-s",myM:"my-m",myL:"my-l",myXL:"my-xl",myXXL:"my-xxl",mtXXS:"mt-xxs",mtXS:"mt-xs",mtS:"mt-s",mtM:"mt-m",mtL:"mt-l",mtXL:"mt-xl",mtXXL:"mt-xxl",mrXXS:"mr-xxs",mrXS:"mr-xs",mrS:"mr-s",mrM:"mr-m",mrL:"mr-l",mrXL:"mr-xl",mrXXL:"mr-xxl",mbXXS:"mb-xxs",mbXS:"mb-xs",mbS:"mb-s",mbM:"mb-m",mbL:"mb-l",mbXL:"mb-xl",mbXXL:"mb-xxl",mlXXS:"ml-xxs",mlXS:"ml-xs",mlS:"ml-s",mlM:"ml-m",mlL:"ml-l",mlXL:"ml-xl",mlXXL:"ml-xxl",fsXXXS:"fs-xxxs",fsXXS:"fs-xxs",fsXS:"fs-xs",fsS:"fs-s",fsM:"fs-m",fsL:"fs-l",fsXL:"fs-xl",fsXXL:"fs-xxl",fsXXXL:"fs-xxxl",fwRegular:"fw-regular",fwSemibold:"fw-semibold",fwBold:"fw-bold",dBlock:"d-block",dInBlock:"d-in-block",taLeft:"ta-left",taCenter:"ta-center",mwSM:"mw-sm",mwMD:"mw-md",mwLG:"mw-lg",mwXL:"mw-xl",mwXXL:"mw-xxl",mw3XL:"mw-3xl",shNone:"sh-none"};function Be(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ga).includes(t)).filter(t=>e[t]===!0).map(t=>ga[t]):null}const Qe="Errore: ",kh="Impossibile acquisire la posizione.",Gr="Impossibile caricare i punti di mappa.",jh="Si è verificato un errore.",Nh="Impossibile caricare i suggerimenti.",Vh="Impossibile caricare i dettagli della location.",Ih="Impossibile caricare la mappa.",Rh="Impossibile trovare punti di mappa nell'area di ricerca.",Fh="Ottieni indicazioni di navigazione per questa destinazione",Bh="Condividi questa destinazione",$h="Scarica l'evento",zh=3e3,ya=6,qt={north:47.1,south:36.6,east:18.6,west:6.6},Uh={lat:(qt.north+qt.south)/2,lng:(qt.east+qt.west)/2},Xh=2e4;function Pe(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Ae(e){return e?e.split("").reduce((t,n)=>(/[A-Z]/.test(n)?e.indexOf(n)===0?t+=n.toLowerCase():t+="-"+n.toLowerCase():t+=n,t),""):""}function qr(e){const{type:t,url:n}=e??{};switch(t){case"navigate":case"directions":return{"aria-label":Fh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"share":return{"aria-label":Bh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":$h,as:"a",href:n??"#",download:!0,target:"_blank",rel:"noopener noreferrer"};case"email":default:return{}}}function Wh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}const va="Anchor";function xa({as:e,wrapper:t,children:n,variant:r="default",className:s,animate:o=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},p){const m=t||"span",y=o?Je[m]:m,S=e||"a",v=Be(f)??[],b=o?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},A=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return x.jsx(y,{className:H(Oh.root,"dyn-locator__"+Ae(va),Pe(s),...v),"data-variant":r,...d?{style:d}:{},...b,...f,children:x.jsx(S,{ref:p,href:a,target:l,rel:A,...u,children:n})})}xa.displayName=va;const ba=g.forwardRef(xa),Sa="ErrorBanner";function Ca({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:r,errorDetails:s,className:o,children:i,...a}){const l=Be(a)??[];return x.jsxs("div",{className:H("dyn-locator__"+Ae(Sa),At.root,Pe(o),...l??[]),children:[x.jsxs("header",{className:At.header,children:[x.jsx(Hl,{size:28,color:"currentColor",className:At.icon})," ",x.jsx("h3",{children:e})]}),x.jsxs("div",{className:At.body,children:[x.jsx("p",{children:t}),n&&r&&x.jsxs("p",{children:["Prova a"," ",x.jsx(ba,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,s&&x.jsx("div",{className:At.content,children:x.jsx("pre",{children:s})})]})]})}Ca.displayName=Sa;const wa=Ca;class Kh extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||x.jsx("div",{className:Bl.container,children:x.jsx(wa,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Ta={ArrowLeft:Xl,ArrowUpRight:Kl,ChevronUp:ql,ChevronDown:Gl,Close:xs,Expand:Jl,Location:Zl,Search:tc,Share:nc,Target:Yl},Me={root:"_root_1cmog_4",header:"_header_1cmog_21",body:"_body_1cmog_22",cta:"_cta_1cmog_23",titleContainer:"_titleContainer_1cmog_40",shareButton:"_shareButton_1cmog_51",capabilities:"_capabilities_1cmog_59",tagContainer:"_tagContainer_1cmog_72",tag:"_tag_1cmog_72"},xt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Hr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function Gh(e){return g.isValidElement(e)||typeof e=="function"}function qh(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function Hh(e){return!!e&&typeof e=="object"&&"path"in e}const _a="Icon";function Ea({as:e,icon:t,iconRef:n,label:r,size:s="S",radius:o,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const p=e||"span",m=l?Je[p]:p,{iconMap:y}=np();function S(C){if(qh(C)){const A=typeof C=="string"?C:C.name;return y[A]?g.createElement(y[A],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Hr.icon}):'No icon found for "'+A+'"!'}return Hh(C)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),x.jsx("img",{...n?{ref:n}:{},src:C.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:Hr.icon})):"No icon provided"}const v=Be(d)??[],b=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return x.jsx(m,{ref:f,className:H(Hr.root,"dyn-locator__"+Ae(_a),Pe(a),...v),...u?{style:u}:{},"data-variant":i,"data-size":s,...o?{"data-radius":o}:{},...b,...d,children:S(t)})}Ea.displayName=_a;const $e=g.forwardRef(Ea),Pa="Tag";function Aa({as:e,iconPosition:t="left",children:n,icon:r,className:s,animate:o=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=o?Je[u]:u,f=Be(l)??[],p=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return x.jsx(d,{ref:c,className:H(xt.root,"dyn-locator__"+Ae(Pa),Pe(s),...f),"data-icon-position":t,...a?{style:a}:{},...p,...l,children:x.jsxs("div",{className:xt.container,children:[r?x.jsx("div",{className:xt.icon,children:Gh(r)?typeof r=="function"?x.jsx(r,{className:xt.icon}):r:x.jsx($e,{className:xt.icon,icon:r})}):null,x.jsx("div",{className:xt.label,children:n})]})})}Aa.displayName=Pa;const Yh=g.forwardRef(Aa),Zh={root:"_root_u5v4v_1"},Ma="IconButton";function La({as:e,children:t,className:n,variant:r="default",animate:s=!0,animationDelay:o=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},p){const m=e||"button",y=s?Je[m]:m,S=Be(f)??[],v=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:o,duration:.2}}:{},b=m==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return x.jsx(y,{ref:p,className:H(Zh.root,"dyn-locator__"+Ae(Ma),Pe(n),...S),"data-variant":r,"data-element":m,"aria-label":a,disabled:d,...i?{style:i}:{},...v,...b,...f,children:t})}La.displayName=Ma;const bt=g.forwardRef(La),Da={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Oa="Card";function ka({as:e,children:t,className:n,variant:r="default",animate:s=!0,animationDelay:o=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=s?Je[d]:d,p=Be(c)??[],m=s?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:o,duration:.3}}:{};return x.jsx(f,{ref:u,className:H(Da.root,"dyn-locator__"+Ae(Oa),Pe(n),...p),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...m,...c,children:r==="bare"?t:x.jsx("div",{className:Da.content,children:t})})}ka.displayName=Oa;const Jh=g.forwardRef(ka);function ja(e){const{componentMap:t}=rp();return t[e]}const Na="LocationCard";function Va({title:e,timestamp:t,address:n,capabilities:r,on_share:s,actions:o,className:i,...a},l){const c=ja("ctaButton");return x.jsx(Jh,{ref:l,variant:"bare",clickable:!0,className:H("dyn-locator__"+Ae(Na),Pe(i)),...a,style:{...a.style?a.style:{},padding:"var(--dyn-locator__spacing-xs) 0",borderRadius:"var(--dyn-locator__radius-s)",border:"1px solid var(--dyn-locator__colors-grey-grey-100)",boxShadow:"none"},children:x.jsxs("div",{className:Me.root,children:[x.jsxs("header",{className:Me.header,children:[t?x.jsx("time",{children:new Date(t).toLocaleDateString("it",{day:"numeric",month:"long",year:"numeric"})}):null,x.jsxs("div",{className:Me.titleContainer,children:[e?x.jsx("h4",{children:e}):null,x.jsx(bt,{className:Me.shareButton,variant:"bare",...qr(s),children:x.jsx($e,{size:"M",icon:"Share"})})]}),n?x.jsx("address",{children:n}):null]}),r!=null&&r.length?x.jsx("div",{className:Me.body,children:r.map((u,d)=>x.jsxs("div",{className:Me.capabilities,children:[x.jsx("h5",{children:u.title}),x.jsx("ul",{className:Me.tagContainer,children:(u.capabilities??[]).map((f,p)=>x.jsx(Yh,{as:"li",animationDelay:+`.${p+1}`,className:Me.tag,children:f.label},p))})]},d))}):null,o!=null&&o.length?x.jsx("div",{className:Me.cta,children:o.map((u,d)=>x.jsx(c,{animate:!1,fullWidth:!0,variant:d===0?"themed":"secondary",...qr(u),children:u.label},d))}):null]})})}Va.displayName=Na;const Qh=g.forwardRef(Va),Ia={root:"_root_1h5d4_1",loader:"_loader_1h5d4_73"},Ra="Button";function Fa({as:e,children:t,className:n,variant:r="default",size:s="medium",disabled:o=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:p,...m},y){const S=e||(u?"a":"button"),v=l?Je[S]:S,b=Be(m)??[],C=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},A=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return x.jsx(v,{ref:y,className:H(Ia.root,"dyn-locator__"+Ae(Ra),Pe(n),...b),"data-variant":r,"data-size":s,"data-full-width":a,disabled:o||i,...p?{style:p}:{},...C,...A,...m,children:i?x.jsxs("span",{style:{display:"flex",gap:10},children:[t,x.jsx("span",{className:Ia.loader,"aria-hidden":"true"})]}):t})}Fa.displayName=Ra;const Ht=g.forwardRef(Fa),Ba={locationCard:Qh,ctaButton:Ht},ep={iconMap:Ta,componentMap:Ba},Yr=g.createContext(ep);function tp({children:e,customIcons:t,customComponents:n}){const r={...Ta,...t??{}},s={...Ba,...n??{}};return x.jsx(Yr.Provider,{value:{iconMap:r,componentMap:s},children:e})}function np(){const{iconMap:e}=g.useContext(Yr);return{iconMap:e}}function rp(){const{componentMap:e}=g.useContext(Yr);return{componentMap:e}}var Yt=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(Yt||{});const $a=g.createContext({endpointMap:{},apiUrl:""});function sp({children:e,endpoints:t,apiUrl:n}){var r;if(!n||!((r=Object.keys(t??{}))!=null&&r.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return x.jsx($a.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function op(e){const{endpointMap:t,apiUrl:n}=g.useContext($a);return{getEndpoint:(r={})=>{const s=t[e];if(!s)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let o="";return s.buildPath?o=s.buildPath(r):(o=s.path,Object.entries(r).forEach(([i,a])=>{o=o.replace(`:${i}`,String(a))})),{url:`${n}${o}`,method:s.method}}}}let ip={data:""},ap=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||ip,lp=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,cp=/\/\*[^]*?\*\/| +/g,za=/\n+/g,ze=(e,t)=>{let n="",r="",s="";for(let o in e){let i=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+i+";":r+=o[1]=="f"?ze(i,o):o+"{"+ze(i,o[1]=="k"?"":t)+"}":typeof i=="object"?r+=ze(i,t?t.replace(/([^,])+/g,a=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):o):i!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=ze.p?ze.p(o,i):o+":"+i+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Le={},Ua=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ua(e[n]);return t}return e},up=(e,t,n,r,s)=>{let o=Ua(e),i=Le[o]||(Le[o]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(o));if(!Le[i]){let l=o!==e?e:(c=>{let u,d,f=[{}];for(;u=lp.exec(c.replace(cp,""));)u[4]?f.shift():u[3]?(d=u[3].replace(za," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(za," ").trim();return f[0]})(e);Le[i]=ze(s?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&Le.g?Le.g:null;return n&&(Le.g=Le[i]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Le[i],t,r,a),i},dp=(e,t,n)=>e.reduce((r,s,o)=>{let i=t[o];if(i&&i.call){let a=i(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=l?"."+l:a&&typeof a=="object"?a.props?"":ze(a,""):a===!1?"":a}return r+s+(i??"")},"");function Sn(e){let t=this||{},n=e.call?e(t.p):e;return up(n.unshift?n.raw?dp(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,ap(t.target),t.g,t.o,t.k)}let Xa,Zr,Jr;Sn.bind({g:1});let De=Sn.bind({k:1});function fp(e,t,n,r){ze.p=t,Xa=e,Zr=n,Jr=r}function Ue(e,t){let n=this||{};return function(){let r=arguments;function s(o,i){let a=Object.assign({},o),l=a.className||s.className;n.p=Object.assign({theme:Zr&&Zr()},a),n.o=/ *go\d+/.test(l),a.className=Sn.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Jr&&c[0]&&Jr(a),Xa(c,a)}return t?t(s):s}}var hp=e=>typeof e=="function",Cn=(e,t)=>hp(e)?e(t):e,pp=(()=>{let e=0;return()=>(++e).toString()})(),Wa=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),mp=20,Ka=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,mp)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return Ka(e,{type:e.toasts.find(o=>o.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},wn=[],et={toasts:[],pausedAt:void 0},tt=e=>{et=Ka(et,e),wn.forEach(t=>{t(et)})},gp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},yp=(e={})=>{let[t,n]=g.useState(et),r=g.useRef(et);g.useEffect(()=>(r.current!==et&&n(et),wn.push(n),()=>{let o=wn.indexOf(n);o>-1&&wn.splice(o,1)}),[]);let s=t.toasts.map(o=>{var i,a,l;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((i=e[o.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((a=e[o.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||gp[o.type],style:{...e.style,...(l=e[o.type])==null?void 0:l.style,...o.style}}});return{...t,toasts:s}},vp=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||pp()}),Zt=e=>(t,n)=>{let r=vp(t,e,n);return tt({type:2,toast:r}),r.id},Z=(e,t)=>Zt("blank")(e,t);Z.error=Zt("error"),Z.success=Zt("success"),Z.loading=Zt("loading"),Z.custom=Zt("custom"),Z.dismiss=e=>{tt({type:3,toastId:e})},Z.remove=e=>tt({type:4,toastId:e}),Z.promise=(e,t,n)=>{let r=Z.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(s=>{let o=t.success?Cn(t.success,s):void 0;return o?Z.success(o,{id:r,...n,...n==null?void 0:n.success}):Z.dismiss(r),s}).catch(s=>{let o=t.error?Cn(t.error,s):void 0;o?Z.error(o,{id:r,...n,...n==null?void 0:n.error}):Z.dismiss(r)}),e};var xp=(e,t)=>{tt({type:1,toast:{id:e,height:t}})},bp=()=>{tt({type:5,time:Date.now()})},Jt=new Map,Sp=1e3,Cp=(e,t=Sp)=>{if(Jt.has(e))return;let n=setTimeout(()=>{Jt.delete(e),tt({type:4,toastId:e})},t);Jt.set(e,n)},wp=e=>{let{toasts:t,pausedAt:n}=yp(e);g.useEffect(()=>{if(n)return;let o=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(l<0){a.visible&&Z.dismiss(a.id);return}return setTimeout(()=>Z.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=g.useCallback(()=>{n&&tt({type:6,time:Date.now()})},[n]),s=g.useCallback((o,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(p=>(p.position||c)===(o.position||c)&&p.height),d=u.findIndex(p=>p.id===o.id),f=u.filter((p,m)=>m<d&&p.visible).length;return u.filter(p=>p.visible).slice(...a?[f+1]:[0,f]).reduce((p,m)=>p+(m.height||0)+l,0)},[t]);return g.useEffect(()=>{t.forEach(o=>{if(o.dismissed)Cp(o.id,o.removeDelay);else{let i=Jt.get(o.id);i&&(clearTimeout(i),Jt.delete(o.id))}})},[t]),{toasts:t,handlers:{updateHeight:xp,startPause:bp,endPause:r,calculateOffset:s}}},Tp=De`
114
129
  from {
115
130
  transform: scale(0) rotate(45deg);
116
131
  opacity: 0;
@@ -118,7 +133,7 @@ from {
118
133
  to {
119
134
  transform: scale(1) rotate(45deg);
120
135
  opacity: 1;
121
- }`,bp=Me`
136
+ }`,_p=De`
122
137
  from {
123
138
  transform: scale(0);
124
139
  opacity: 0;
@@ -126,7 +141,7 @@ from {
126
141
  to {
127
142
  transform: scale(1);
128
143
  opacity: 1;
129
- }`,Sp=Me`
144
+ }`,Ep=De`
130
145
  from {
131
146
  transform: scale(0) rotate(90deg);
132
147
  opacity: 0;
@@ -134,7 +149,7 @@ from {
134
149
  to {
135
150
  transform: scale(1) rotate(90deg);
136
151
  opacity: 1;
137
- }`,wp=Be("div")`
152
+ }`,Pp=Ue("div")`
138
153
  width: 20px;
139
154
  opacity: 0;
140
155
  height: 20px;
@@ -143,14 +158,14 @@ to {
143
158
  position: relative;
144
159
  transform: rotate(45deg);
145
160
 
146
- animation: ${xp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
161
+ animation: ${Tp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
147
162
  forwards;
148
163
  animation-delay: 100ms;
149
164
 
150
165
  &:after,
151
166
  &:before {
152
167
  content: '';
153
- animation: ${bp} 0.15s ease-out forwards;
168
+ animation: ${_p} 0.15s ease-out forwards;
154
169
  animation-delay: 150ms;
155
170
  position: absolute;
156
171
  border-radius: 3px;
@@ -163,18 +178,18 @@ to {
163
178
  }
164
179
 
165
180
  &:before {
166
- animation: ${Sp} 0.15s ease-out forwards;
181
+ animation: ${Ep} 0.15s ease-out forwards;
167
182
  animation-delay: 180ms;
168
183
  transform: rotate(90deg);
169
184
  }
170
- `,Cp=Me`
185
+ `,Ap=De`
171
186
  from {
172
187
  transform: rotate(0deg);
173
188
  }
174
189
  to {
175
190
  transform: rotate(360deg);
176
191
  }
177
- `,Tp=Be("div")`
192
+ `,Mp=Ue("div")`
178
193
  width: 12px;
179
194
  height: 12px;
180
195
  box-sizing: border-box;
@@ -182,8 +197,8 @@ to {
182
197
  border-radius: 100%;
183
198
  border-color: ${e=>e.secondary||"#e0e0e0"};
184
199
  border-right-color: ${e=>e.primary||"#616161"};
185
- animation: ${Cp} 1s linear infinite;
186
- `,Pp=Me`
200
+ animation: ${Ap} 1s linear infinite;
201
+ `,Lp=De`
187
202
  from {
188
203
  transform: scale(0) rotate(45deg);
189
204
  opacity: 0;
@@ -191,7 +206,7 @@ from {
191
206
  to {
192
207
  transform: scale(1) rotate(45deg);
193
208
  opacity: 1;
194
- }`,_p=Me`
209
+ }`,Dp=De`
195
210
  0% {
196
211
  height: 0;
197
212
  width: 0;
@@ -205,7 +220,7 @@ to {
205
220
  100% {
206
221
  opacity: 1;
207
222
  height: 10px;
208
- }`,Ep=Be("div")`
223
+ }`,Op=Ue("div")`
209
224
  width: 20px;
210
225
  opacity: 0;
211
226
  height: 20px;
@@ -214,13 +229,13 @@ to {
214
229
  position: relative;
215
230
  transform: rotate(45deg);
216
231
 
217
- animation: ${Pp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
232
+ animation: ${Lp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
218
233
  forwards;
219
234
  animation-delay: 100ms;
220
235
  &:after {
221
236
  content: '';
222
237
  box-sizing: border-box;
223
- animation: ${_p} 0.2s ease-out forwards;
238
+ animation: ${Dp} 0.2s ease-out forwards;
224
239
  opacity: 0;
225
240
  animation-delay: 200ms;
226
241
  position: absolute;
@@ -232,16 +247,16 @@ to {
232
247
  height: 10px;
233
248
  width: 6px;
234
249
  }
235
- `,Ap=Be("div")`
250
+ `,kp=Ue("div")`
236
251
  position: absolute;
237
- `,Mp=Be("div")`
252
+ `,jp=Ue("div")`
238
253
  position: relative;
239
254
  display: flex;
240
255
  justify-content: center;
241
256
  align-items: center;
242
257
  min-width: 20px;
243
258
  min-height: 20px;
244
- `,Lp=Me`
259
+ `,Np=De`
245
260
  from {
246
261
  transform: scale(0.6);
247
262
  opacity: 0.4;
@@ -249,20 +264,20 @@ from {
249
264
  to {
250
265
  transform: scale(1);
251
266
  opacity: 1;
252
- }`,Dp=Be("div")`
267
+ }`,Vp=Ue("div")`
253
268
  position: relative;
254
269
  transform: scale(0.6);
255
270
  opacity: 0.4;
256
271
  min-width: 20px;
257
- animation: ${Lp} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
272
+ animation: ${Np} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
258
273
  forwards;
259
- `,Op=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?Q.createElement(Dp,null,t):t:n==="blank"?null:Q.createElement(Mp,null,Q.createElement(Tp,{...r}),n!=="loading"&&Q.createElement(Ap,null,n==="error"?Q.createElement(wp,{...r}):Q.createElement(Ep,{...r})))},kp=e=>`
274
+ `,Ip=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?ee.createElement(Vp,null,t):t:n==="blank"?null:ee.createElement(jp,null,ee.createElement(Mp,{...r}),n!=="loading"&&ee.createElement(kp,null,n==="error"?ee.createElement(Pp,{...r}):ee.createElement(Op,{...r})))},Rp=e=>`
260
275
  0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
261
276
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
262
- `,jp=e=>`
277
+ `,Fp=e=>`
263
278
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
264
279
  100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
265
- `,Vp="0%{opacity:0;} 100%{opacity:1;}",Np="0%{opacity:1;} 100%{opacity:0;}",Ip=Be("div")`
280
+ `,Bp="0%{opacity:0;} 100%{opacity:1;}",$p="0%{opacity:1;} 100%{opacity:0;}",zp=Ue("div")`
266
281
  display: flex;
267
282
  align-items: center;
268
283
  background: #fff;
@@ -274,17 +289,17 @@ to {
274
289
  pointer-events: auto;
275
290
  padding: 8px 10px;
276
291
  border-radius: 8px;
277
- `,Rp=Be("div")`
292
+ `,Up=Ue("div")`
278
293
  display: flex;
279
294
  justify-content: center;
280
295
  margin: 4px 10px;
281
296
  color: inherit;
282
297
  flex: 1 1 auto;
283
298
  white-space: pre-line;
284
- `,Fp=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=Xa()?[Vp,Np]:[kp(n),jp(n)];return{animation:t?`${Me(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Me(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Ka=Q.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?Fp(e.position||t||"top-center",e.visible):{opacity:0},o=Q.createElement(Op,{toast:e}),i=Q.createElement(Rp,{...e.ariaProps},Sn(e.message,e));return Q.createElement(Ip,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:o,message:i}):Q.createElement(Q.Fragment,null,o,i))});ap(Q.createElement);var Bp=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let o=Q.useCallback(i=>{if(i){let a=()=>{let l=i.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return Q.createElement("div",{ref:o,className:t,style:n},s)},$p=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Xa()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},zp=bn`
299
+ `,Xp=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=Wa()?[Bp,$p]:[Rp(n),Fp(n)];return{animation:t?`${De(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${De(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Ga=ee.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?Xp(e.position||t||"top-center",e.visible):{opacity:0},o=ee.createElement(Ip,{toast:e}),i=ee.createElement(Up,{...e.ariaProps},Cn(e.message,e));return ee.createElement(zp,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:o,message:i}):ee.createElement(ee.Fragment,null,o,i))});fp(ee.createElement);var Wp=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let o=ee.useCallback(i=>{if(i){let a=()=>{let l=i.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return ee.createElement("div",{ref:o,className:t,style:n},s)},Kp=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Wa()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},Gp=Sn`
285
300
  z-index: 9999;
286
301
  > * {
287
302
  pointer-events: auto;
288
303
  }
289
- `,Cn=16,Up=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,containerStyle:o,containerClassName:i})=>{let{toasts:a,handlers:l}=vp(n);return Q.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Cn,left:Cn,right:Cn,bottom:Cn,pointerEvents:"none",...o},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),f=$p(u,d);return Q.createElement(Bp,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?zp:"",style:f},c.type==="custom"?Sn(c.message,c):s?s(c):Q.createElement(Ka,{toast:c,position:u}))}))};const Xp={root:"_root_movxa_4"};function Ga({className:e,children:t,show:n=!0,variant:r="light",...s}){const o=Y("dyn-locator__overlay",Xp.root,e);return n?b.jsx("div",{className:o,"data-variant":r,...s,children:t}):null}function Jr(e){const[t,n]=m.useState(!1),[r,s]=m.useState(null),{getEndpoint:o}=ep(e);return{request:async(a={},l={})=>{n(!0),s(null);try{let c;try{c=o(a)}catch{throw new Error(`Endpoint "${e}" is not configured. The host application must provide all required endpoints.`)}const{url:u,method:d}=c,f=await fetch(u,{method:d,headers:{"Content-Type":"application/json",...l.headers},...d!=="GET"&&l.body?{body:JSON.stringify(l.body)}:{}});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return{data:await f.json()}}catch(c){const u=c instanceof Error?c:new Error(String(c));throw s(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:r}}function Wp({children:e,customComponents:t,customIcons:n,featureFlags:r,fetchLocations:s,localizationConfig:o,locations:i=[],mapId:a}){const l=I(P=>P.isFullscreen),c=I(P=>P.setLocations),u=I(P=>P.setMapId),d=I(P=>P.setFeatureFlags),f=I(P=>P.setLocalizationConfig),p=I(P=>P.setMapDetail),y=I(P=>P.shouldRefetch),g=I(P=>P.setShouldRefetch),{request:w,loading:v,error:x}=Jr(xn.CLUSTERS),{request:C,loading:E,error:S}=Jr(xn.MARKERS),M=v||E,O=!!x||!!S;async function A(P){var U;try{if(typeof P!="number"||P<0||isNaN(P))throw new Error("No map ID provided");const{data:z}=await w({mapId:String(P)})??{};if(!z)throw new Error("No cluster data received from the server");c((U=z.map)==null?void 0:U.call(z,ie=>({...ie,onMarkerClick:async()=>{await N(P,ie.id)}})))}catch(z){console.error("Error fetching clusters: ",z),Z.error(gt+Wr),c([])}}async function N(P,U){try{if(typeof P!="number"||P<0||isNaN(P))throw new Error("No map ID provided");const{data:z}=await C({mapId:P,clusterId:U})??{};if(!z)throw new Error("No marker data received from the server");c(z),p(st.MARKER)}catch(z){console.error("Error fetching markers: ",z),Z.error(gt+Wr),c([])}}return m.useEffect(()=>{o&&f(o),r&&d(r),typeof a=="number"&&a>0&&!isNaN(a)&&u(a),i!=null&&i.length?c(i):s?s().then(P=>c(P)):A(a)},[]),m.useEffect(()=>{let P=!0;return y&&a&&A(a).finally(()=>{P&&g(!1)}),()=>{P=!1}},[y,a]),b.jsx("div",{id:"dyn-locator",className:Y("dyn-locator__locator",gs.root),"data-fullscreen":l,children:b.jsxs(Yh,{customIcons:n,customComponents:t,children:[e,b.jsxs(Ga,{show:M||O,variant:"light",children:[M?b.jsx(_t,{size:"large"}):null,O?b.jsx(wa,{title:Dh,message:Wr,actionText:"ricaricare la pagina.",errorDetails:(x==null?void 0:x.message)||(S==null?void 0:S.message),onAction:P=>{P.preventDefault(),window.location.reload()}}):null]}),b.jsx(Up,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:P=>b.jsx(Ka,{toast:P,children:({icon:U,message:z})=>b.jsxs(b.Fragment,{children:[U,z,P.type==="error"&&b.jsx(vt,{variant:"bare",onClick:()=>Z.dismiss(P.id),children:b.jsx(Re,{icon:"Close"})})]})})})]})})}function Ha({mapProvider:e,endpoints:t,apiUrl:n,children:r,...s}){return b.jsx($h,{children:b.jsx(Ol,{children:b.jsx(Rl,{mapProvider:e,children:b.jsx(Qh,{endpoints:t,apiUrl:n,children:b.jsx(Wp,{children:r,...s})})})})})}Ha.displayName="Locator";var Qr,qa;function Kp(){return qa||(qa=1,Qr=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,s,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[s]))return!1;for(s=r;s--!==0;){var i=o[s];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),Qr}var Gp=Kp();const Hp=ls(Gp);function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we.apply(null,arguments)}function Je(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function qp(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Yp(e){var t=qp(e,"string");return typeof t=="symbol"?t:t+""}const ue={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Zp="https://maps.googleapis.com/maps/api/js";class Yt{static async load(t,n){var r;const s=t.libraries?t.libraries.split(","):[],o=this.serializeParams(t);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=ue.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=o,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==o&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const i=["maps",...s];await Promise.all(i.map(a=>google.maps.importLibrary(a)))}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((s,o)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[c,u]of Object.entries(t)){const d=c.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(u))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=Zp+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=ue.FAILED,this.notifyLoadingStatusListeners(),o(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=ue.LOADED,this.notifyLoadingStatusListeners(),s()},window.gm_authFailure=()=>{this.loadingStatus=ue.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=ue.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=s=>r().then(()=>google.maps.importLibrary(s))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}Yt.loadingStatus=ue.NOT_LOADED,Yt.serializedApiParams=void 0,Yt.listeners=[];const Jp=["onLoad","onError","apiKey","version","libraries"],Qp=["children"],em="GMP_visgl_rgmlibrary_v1_default",Zt=m.createContext(null);function tm(){const[e,t]=m.useState({});return{mapInstances:e,addMapInstance:(o,i="default")=>{t(a=>we({},a,{[i]:o}))},removeMapInstance:(o="default")=>{t(i=>Je(i,[o].map(Yp)))},clearMapInstances:()=>{t({})}}}function nm(e){const{onLoad:t,onError:n,apiKey:r,version:s,libraries:o=[]}=e,i=Je(e,Jp),[a,l]=m.useState(Yt.loadingStatus),[c,u]=m.useReducer((y,g)=>y[g.name]?y:we({},y,{[g.name]:g.value}),{}),d=m.useMemo(()=>o==null?void 0:o.join(","),[o]),f=m.useMemo(()=>JSON.stringify(we({apiKey:r,version:s},i)),[r,s,i]),p=m.useCallback(async y=>{var g;if(c[y])return c[y];if(!((g=google)!=null&&(g=g.maps)!=null&&g.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const w=await window.google.maps.importLibrary(y);return u({name:y,value:w}),w},[c]);return m.useEffect(()=>{(async()=>{try{const y=we({key:r},i);s&&(y.v=s),(d==null?void 0:d.length)>0&&(y.libraries=d),(y.channel===void 0||y.channel<0||y.channel>999)&&delete y.channel,y.solutionChannel===void 0?y.solutionChannel=em:y.solutionChannel===""&&delete y.solutionChannel,await Yt.load(y,g=>l(g));for(const g of["core","maps",...o])await p(g);t&&t()}catch(y){n?n(y):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",y)}})()},[r,d,f]),{status:a,loadedLibraries:c,importLibrary:p}}const rm=e=>{const{children:t}=e,n=Je(e,Qp),{mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i}=tm(),{status:a,loadedLibraries:l,importLibrary:c}=nm(n),u=m.useMemo(()=>({mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[r,s,o,i,a,l,c]);return m.createElement(Zt.Provider,{value:u},t)};function sm(e,t){for(const n of lm){const r=t[n],s=Ya[n];m.useEffect(()=>{if(!e||!r)return;const o=google.maps.event.addListener(e,s,i=>{r(om(s,e,i))});return()=>o.remove()},[e,s,r])}}function om(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(im.includes(e)){const o=r,i=t.getCenter(),a=t.getZoom(),l=t.getHeading()||0,c=t.getTilt()||0,u=t.getBounds();return(!i||!u||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),o.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:l,tilt:c,bounds:(u==null?void 0:u.toJSON())||{north:90,east:180,south:-90,west:-180}},o}else if(am.includes(e)){var s;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const o=r;return o.domEvent=n.domEvent,o.stoppable=!0,o.stop=()=>n.stop(),o.detail={latLng:((s=n.latLng)==null?void 0:s.toJSON())||null,placeId:n.placeId},o}return r}const Ya={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},im=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],am=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],lm=Object.keys(Ya);function es(e,t){const n=m.useRef(void 0);(!n.current||!Hp(t,n.current))&&(n.current=t),m.useEffect(e,n.current)}const cm=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function um(e,t){const n={},r=Object.keys(t);for(const s of r)cm.has(s)&&(n[s]=t[s]);es(()=>{e&&e.setOptions(n)},[n])}function ts(){var e;return((e=m.useContext(Zt))==null?void 0:e.status)||ue.NOT_LOADED}function dm(e,t){const{viewport:n,viewState:r}=t,s=!!n;return m.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:o,longitude:i,bearing:a,pitch:l,zoom:c}=r;e.moveCamera({center:{lat:o,lng:i},heading:a,tilt:l,zoom:c+1})},[e,r]),s}function fm(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function Za(e){return fm(e)?e:e.toJSON()}function hm(e,t,n){const r=n.center?Za(n.center):null;let s=null,o=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(s=r.lat,o=r.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,l=Number.isFinite(n.tilt)?n.tilt:null;m.useLayoutEffect(()=>{if(!e)return;const c={};let u=!1;s!==null&&o!==null&&(t.current.center.lat!==s||t.current.center.lng!==o)&&(c.center={lat:s,lng:o},u=!0),i!==null&&t.current.zoom!==i&&(c.zoom=i,u=!0),a!==null&&t.current.heading!==a&&(c.heading=a,u=!0),l!==null&&t.current.tilt!==l&&(c.tilt=l,u=!0),u&&e.moveCamera(c)})}const pm=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return m.createElement("div",{style:e},m.createElement("h2",null,"Error: AuthFailure"),m.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",m.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function mm(){const[e,t]=m.useState(null),n=m.useCallback(r=>t(r),[t]);return[e,n]}function Ja(){return ts()===ue.LOADED}function gm(){const[,e]=m.useReducer(t=>t+1,0);return e}function ym(e,t){const n=e.getCenter(),r=e.getZoom(),s=e.getHeading()||0,o=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:s,tilt:o})}function vm(e){const t=gm(),n=m.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return m.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{ym(e,n),t()});return()=>r.remove()},[e,t]),n}const xm=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],bm=["padding"];class Tn{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}Tn.entries={};function Sm(e,t){const n=Ja(),[r,s]=m.useState(null),[o,i]=mm(),a=vm(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:p,reuseMaps:y,renderingType:g,colorScheme:w}=e,v=Je(e,xm),x=e.zoom!==void 0||e.defaultZoom!==void 0,C=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!x||!C)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!v.center&&u&&(v.center=u),!v.zoom&&Number.isFinite(d)&&(v.zoom=d),!v.heading&&Number.isFinite(f)&&(v.heading=f),!v.tilt&&Number.isFinite(p)&&(v.tilt=p);for(const S of Object.keys(v))v[S]===void 0&&delete v[S];const E=m.useRef(void 0);return m.useEffect(()=>{if(!o||!n)return;const{addMapInstance:S,removeMapInstance:M}=t,{mapId:O}=e,A=`${O||"default"}:${g||"default"}:${w||"LIGHT"}`;let N,P;if(y&&Tn.has(A)?(P=Tn.pop(A),N=P.getDiv(),o.appendChild(N),P.setOptions(v),setTimeout(()=>P.setCenter(P.getCenter()),0)):(N=document.createElement("div"),N.style.height="100%",o.appendChild(N),P=new google.maps.Map(N,we({},v,g?{renderingType:g}:{},w?{colorScheme:w}:{}))),s(P),S(P,l),c){const{padding:U}=c,z=Je(c,bm);P.fitBounds(z,U)}else(!x||!C)&&P.fitBounds({east:180,west:-180,south:-90,north:90});if(E.current){const{mapId:U,cameraState:z}=E.current;U!==O&&P.setOptions(z)}return()=>{E.current={mapId:O,cameraState:a.current},N.remove(),y?Tn.push(A,P):google.maps.event.clearInstanceListeners(P),s(null),M(l)}},[o,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const Qa=m.createContext(null),el=e=>{const{children:t,id:n,className:r,style:s}=e,o=m.useContext(Zt),i=ts();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=Sm(e,o);hm(a,c,e),sm(a,e),um(a,e);const u=dm(a,e),d=!!e.controlled;m.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,u,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?Za(e.center):null;let p=null,y=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(p=f.lat,y=f.lng);const g=m.useMemo(()=>{var x,C,E,S,M;return{center:{lat:(x=p)!=null?x:0,lng:(C=y)!=null?C:0},zoom:(E=e.zoom)!=null?E:0,heading:(S=e.heading)!=null?S:0,tilt:(M=e.tilt)!=null?M:0}},[p,y,e.zoom,e.heading,e.tilt]);m.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(g);const x=a.addListener("bounds_changed",()=>{a.moveCamera(g)});return()=>x.remove()},[a,d,g]);const w=m.useMemo(()=>we({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},s),[s,u]),v=m.useMemo(()=>({map:a}),[a]);return i===ue.AUTH_FAILURE?m.createElement("div",{style:we({position:"relative"},r?{}:w),className:r},m.createElement(pm,null)):m.createElement("div",we({ref:l,"data-testid":"map",style:r?void 0:w,className:r},n?{id:n}:{}),a?m.createElement(Qa.Provider,{value:v},t):null)};el.deckGLViewProps=!0;const tl=new Set;function wm(...e){const t=JSON.stringify(e);tl.has(t)||(tl.add(t),console.error(...e))}const Pn=(e=null)=>{const t=m.useContext(Zt),{map:n}=m.useContext(Qa)||{};if(t===null)return wm("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function _n(e){const t=Ja(),n=m.useContext(Zt);return m.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function xt(e,t,n){m.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function En(e,t,n){m.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function nl(e,t,n){m.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function Cm(e){return e.content!==void 0}function Tm(e){return e.nodeType===Node.ELEMENT_NODE}const Pm=m.createContext(null),_m={BOTTOM:["50%","100%"]},Em=({children:e,styles:t,className:n,anchorPoint:r})=>{const[s,o]=r??_m.BOTTOM;let i=`-${s}`,a=`-${o}`;s.trimStart().startsWith("-")&&(i=s.substring(1)),o.trimStart().startsWith("-")&&(a=o.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return m.createElement("div",{style:{transform:l}},m.createElement("div",{className:n,style:t},e))};function Am(e){const[t,n]=m.useState(null),[r,s]=m.useState(null),o=Pn(),i=_n("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:p,onDragEnd:y,collisionBehavior:g,clickable:w,draggable:v,position:x,title:C,zIndex:E}=e,S=m.Children.count(a);return m.useEffect(()=>{if(!o||!i)return;const M=new i.AdvancedMarkerElement;M.map=o,n(M);let O=null;return S>0&&(O=document.createElement("div"),O.isCustomMarker=!0,M.content=O,s(O)),()=>{var A;M.map=null,(A=O)==null||A.remove(),n(null),s(null)}},[o,i,S]),m.useEffect(()=>{!t||!t.content||S>0||(t.content.className=c||"")},[t,c,S]),En(t,"position",x),En(t,"title",C??""),En(t,"zIndex",E),En(t,"collisionBehavior",g),m.useEffect(()=>{t&&(v!==void 0?t.gmpDraggable=v:f||p||y?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,v,f,y,p]),m.useEffect(()=>{if(!t)return;const M=w!==void 0||!!l||!!u||!!d;t.gmpClickable=M,M&&t!=null&&t.content&&Tm(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,w,l,u,d]),xt(t,"click",l),xt(t,"drag",f),xt(t,"dragstart",p),xt(t,"dragend",y),nl(t==null?void 0:t.element,"mouseenter",u),nl(t==null?void 0:t.element,"mouseleave",d),[t,r]}m.forwardRef((e,t)=>{const{children:n,style:r,className:s,anchorPoint:o}=e,[i,a]=Am(e),l=m.useMemo(()=>i?{marker:i}:null,[i]);return m.useImperativeHandle(t,()=>i,[i]),a?m.createElement(Pm.Provider,{value:l},On.createPortal(m.createElement(Em,{anchorPoint:o,styles:r,className:s},n),a)):null});function Mm(e,t,n){if(t!=null&&typeof t!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const r=e.style;if(n==null){if(t==null)return;for(const s in t)t.hasOwnProperty(s)&&rl(r,s,t[s]);return}for(const s in n)n.hasOwnProperty(s)&&(t==null||!t.hasOwnProperty(s))&&(s.indexOf("--")===0?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="");if(t!=null)for(const s in t){const o=t[s];t.hasOwnProperty(s)&&n[s]!==o&&rl(r,s,o)}}function rl(e,t,n){const r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n=="number"&&n!==0&&!Dm(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const Lm=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function Dm(e){return Lm.has(e)}const Om=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],km=e=>{const{children:t,headerContent:n,style:r,className:s,pixelOffset:o,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=Je(e,Om),d=_n("maps"),[f,p]=m.useState(null),y=m.useRef(null),g=m.useRef(null);m.useEffect(()=>{if(!d)return;y.current=document.createElement("div"),g.current=document.createElement("div");const x=u;o&&(x.pixelOffset=new google.maps.Size(o[0],o[1])),n&&(x.headerContent=typeof n=="string"?n:g.current);const C=new google.maps.InfoWindow(u);return C.setContent(y.current),p(C),()=>{var E,S;C.setContent(null),(E=y.current)==null||E.remove(),(S=g.current)==null||S.remove(),y.current=null,g.current=null,p(null)}},[d]);const w=m.useRef(null);m.useEffect(()=>{!f||!y.current||(Mm(y.current,r||null,w.current),w.current=r||null,s!==y.current.className&&(y.current.className=s||""))},[f,s,r]),es(()=>{if(!f)return;const x=u;o?x.pixelOffset=new google.maps.Size(o[0],o[1]):x.pixelOffset=null,n?x.headerContent=typeof n=="string"?n:g.current:x.headerContent=null,f.setOptions(u)},[u,o,n]),xt(f,"close",l),xt(f,"closeclick",c);const v=Pn();return es(()=>{if(!v||!f||i===null)return;const x=!!i,C={map:v};if(i&&(C.anchor=i,Cm(i)&&i.content instanceof Element)){const S=i.content,M=S==null?void 0:S.getBoundingClientRect();if(M&&S!=null&&S.isCustomMarker){var E;const O=(E=i.content.firstElementChild)==null?void 0:E.firstElementChild,A=O==null?void 0:O.getBoundingClientRect(),N=A.x-M.x+(A.width-M.width)/2,P=A.y-M.y,U=u;U.pixelOffset=new google.maps.Size(o?o[0]+N:N,o?o[1]+P:P),f.setOptions(U)}}return a!==void 0&&(C.shouldFocus=a),f.open(C),()=>{x&&f.set("anchor",null),f.close()}},[f,i,v,a,u,o]),m.createElement(m.Fragment,null,y.current&&On.createPortal(t,y.current),g.current!==null&&On.createPortal(n,g.current))},jm=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function Vm(e){const[t,n]=m.useState(null),r=Pn(),{onClick:s,onDrag:o,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=Je(e,jm),{position:d,draggable:f}=u;return m.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const p=new google.maps.Marker(u);return p.setMap(r),n(p),()=>{p.setMap(null),n(null)}},[r]),m.useEffect(()=>{if(!t)return;const p=t,y=google.maps.event;return s&&y.addListener(p,"click",s),o&&y.addListener(p,"drag",o),i&&y.addListener(p,"dragstart",i),a&&y.addListener(p,"dragend",a),l&&y.addListener(p,"mouseover",l),c&&y.addListener(p,"mouseout",c),t.setDraggable(!!f),()=>{y.clearInstanceListeners(p)}},[t,f,s,o,i,a,l,c]),m.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),m.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const sl=m.forwardRef((e,t)=>{const n=Vm(e);return m.useImperativeHandle(t,()=>n,[n]),m.createElement(m.Fragment,null)});function Nm(){const[e,t]=m.useState(null);return[m.useCallback(r=>{t(r)},[]),e]}const Qe={root:"_root_186dn_10",header:"_header_186dn_18",body:"_body_186dn_31",highlighted:"_highlighted_186dn_43"};function Im({onLocationSelect:e}){var y;const t=ka("locationCard"),[n,r]=m.useState(!1),s=I(g=>g.locations),{labels:o}=I(g=>g.localizationConfig),i=I(g=>g.selectedLocation),a=I(g=>g.setSelectedLocation),l=m.useRef({}),c=o["LocationList.header"],u=o["LocationList.locationDesignator"],d=c.split(/(\{:\d\})/g),f=m.useMemo(()=>d.map((g,w)=>g==="{:1}"?b.jsx("span",{className:Qe.highlighted,children:s.length},w):g==="{:2}"?b.jsx("span",{className:Qe.highlighted,children:u},w):g),[u,s.length,d]);m.useEffect(()=>{if(i&&n){const g=l.current[i];g!=null&&g.current&&requestAnimationFrame(()=>{g.current.scrollIntoView({behavior:"smooth",block:"start"})})}},[i,n]);function p(g){return()=>{e==null||e(g.coords),a==null||a(g.id)}}return b.jsxs("div",{className:Y("dyn-locator__location-list",Qe.root),"data-expanded":n,children:[s!=null&&s.length?b.jsxs("header",{className:Qe.header,onClick:()=>r(g=>!g),children:[b.jsx("span",{children:f}),b.jsx(vt,{className:Qe.closeButton,variant:"bare",children:b.jsx(Re,{icon:n?"ChevronDown":"ChevronUp"})})]}):b.jsx("div",{className:Qe.header,style:{cursor:"default"},children:o["LocationList.noResults"]}),b.jsx("div",{className:Qe.body,children:(y=s==null?void 0:s.map)==null?void 0:y.call(s,g=>{const w=g.id;l.current[w]||(l.current[w]=m.createRef());const v=l.current[w];return b.jsx(t,{ref:v,"data-active":i===g.id,onClick:p(g),...g},g.id)})})]})}const Jt={root:"_root_1l10e_4",loaderContainer:"_loaderContainer_1l10e_10",fullscreenButton:"_fullscreenButton_1l10e_17",backButton:"_backButton_1l10e_18"},An={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function Rm({id:e,title:t,address:n,coords:r,actions:s,onClick:o,onZoom:i}){var f;const a=I(p=>p.selectedLocation),l=I(p=>p.setSelectedLocation),[c,u]=Nm(),d=m.useCallback(()=>{l==null||l("")},[l]);return b.jsxs(b.Fragment,{children:[b.jsx(sl,{ref:c,position:r,onClick:()=>{o==null||o()}}),a===e?b.jsxs(km,{anchor:u,headerContent:t,onClose:d,className:An.root,children:[b.jsxs("header",{className:An.header,children:[b.jsx("h6",{children:t}),b.jsx("address",{children:n})]}),b.jsx("div",{className:An.body,children:b.jsxs("div",{className:An.cta,children:[b.jsx(Hr,{animate:!1,variant:"secondary",size:"small",...Kr((f=s==null?void 0:s.find)==null?void 0:f.call(s,p=>p.type==="navigate")),children:"Percorso"}),b.jsx(Hr,{animate:!1,variant:"secondary",size:"small",onClick:i,children:"Zoom"})]})})]}):null]})}function Fm(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function Bm(e){return"title"in e&&!("size"in e)}function $m(){var E;const[e,t]=m.useState({zoom:ga}),n=m.useRef(""),r=ts(),s=I(S=>S.locations),o=I(S=>S.featureFlags),i=I(S=>S.targetLocation),a=I(S=>S.clearTargetLocation),l=I(S=>S.mapDetail),c=I(S=>S.setMapDetail),u=I(S=>S.isFullscreen),d=I(S=>S.setFullscreen),f=I(S=>S.shouldRefetch),p=I(S=>S.setShouldRefetch),y=I(S=>S.setSelectedLocation),g=l===st.MARKER;function w({detail:S}){const{center:M,zoom:O}=S;t({center:M,zoom:O})}function v(S){t(M=>({center:S,zoom:M.zoom}))}function x(){c(st.CLUSTER),t({center:Fh,zoom:ga}),p(!0)}function C(S){if(Fm(S))return b.jsx(sl,{position:S.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:n.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(S.range??0)/Rh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await S.onMarkerClick(),t({center:S.coords,zoom:S.zoom||15})}},S.id);if(Bm(S))return b.jsx(Rm,{id:S.id,title:S.title??"No title",address:S.address??"No address",coords:S.coords,actions:S.actions,onZoom:()=>t({center:S.coords,zoom:18}),onClick:()=>{y(S.id)}},S.id)}if(m.useEffect(()=>{n.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),m.useEffect(()=>{i&&(t({center:i.coords,zoom:i.zoom}),a())},[i,a]),r===ue.LOADING)return b.jsx("div",{className:Y("dyn-locator__map",Jt.root),children:b.jsx("div",{className:Jt.loaderContainer,children:b.jsx(_t,{size:"large"})})});if(r===ue.FAILED||r===ue.AUTH_FAILURE)throw new Error(jh);if(r===ue.LOADED)return b.jsxs("div",{className:Y("dyn-locator__map",Jt.root),children:[o.fullscreen?b.jsx(vt,{className:Y(Jt.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>d==null?void 0:d(!u),children:b.jsx(Re,{size:"M",icon:u?"Close":"Expand"})}):null,g?b.jsx(vt,{className:Y(Jt.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:x,children:b.jsx(Re,{size:"M",icon:"ArrowLeft"})}):null,b.jsx(el,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:w,defaultBounds:Gt,children:!f&&((E=s==null?void 0:s.map)==null?void 0:E.call(s,C))}),g?b.jsx(Im,{onLocationSelect:v}):null]})}const Le={root:"_root_h6kw7_10",validIcon:"_validIcon_h6kw7_23",errorIcon:"_errorIcon_h6kw7_30",label:"_label_h6kw7_51",input:"_input_h6kw7_61",sideButton:"_sideButton_h6kw7_92",sideOrnament:"_sideOrnament_h6kw7_95",clearButton:"_clearButton_h6kw7_129",dropdown:"_dropdown_h6kw7_169"},ol="Input";function il({label:e,className:t,showValidation:n=!0,error:r=!1,valid:s=!1,clearable:o=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:p,sideOrnament:y,...g},w){const v=a?qe.div:"div",x=Ie(g)??[],C=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return b.jsxs(v,{className:Y("dyn-locator__"+_e(ol),Le.root,Pe(t),...x??[]),"data-valid":s,"data-error":r,"data-expanded":u,"data-side-button":!!p,...f?{style:f}:{},...C,children:[n&&b.jsxs(b.Fragment,{children:[s&&b.jsx("span",{className:Le.validIcon}),r&&b.jsx("span",{className:Le.errorIcon})]}),e?b.jsx("label",{className:Le.label,...g.id?{htmlFor:g.id}:{},children:e}):null,y?b.jsx("span",{className:Le.sideOrnament,children:y}):null,b.jsx("input",{ref:w,className:Y(Le.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!p,"data-side-ornament":!!y,...g}),p?b.jsx("span",{className:Le.sideButton,children:p}):null,o&&(g==null?void 0:g.value)&&b.jsx("button",{className:Le.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&b.jsx("div",{className:Le.dropdown,children:c})]})}il.displayName=ol;const zm=m.forwardRef(il),et={root:"_root_1vbtg_7",input:"_input_1vbtg_7",clearButton:"_clearButton_1vbtg_10",sideOrnament:"_sideOrnament_1vbtg_13",predictionsContainer:"_predictionsContainer_1vbtg_18",predictionItem:"_predictionItem_1vbtg_29",loadingItem:"_loadingItem_1vbtg_47"};function Um(){const[e,t]=m.useState(""),[n,r]=m.useState([]),[s,o]=m.useState(!1),[i,a]=m.useState(!1),[l,c]=m.useState(!1),u=I(k=>k.mapId),d=I(k=>k.setLocations),f=I(k=>k.setMapDetail),p=I(k=>k.zoomToLocation),{labels:y}=I(k=>k.localizationConfig),{search:g}=I(k=>k.featureFlags),{request:w,loading:v}=Jr(xn.FIND),x=_n("places"),C=_n("geocoding"),E=Pn(),S=m.useRef(null),M=m.useRef(null),O=m.useRef(null),A=m.useRef(null);m.useEffect(()=>{C&&(O.current||(O.current=new C.Geocoder))},[C]),m.useEffect(()=>{x&&(S.current||(S.current=new x.AutocompleteService),A.current||(A.current=new x.AutocompleteSessionToken))},[x]),m.useEffect(()=>{!x||!E||M.current||(M.current=new x.PlacesService(E))},[x,E]);const N=async k=>{var F;if(!k||k.length<3){r([]),o(!1);return}a(!0);try{if(!x||!S.current)throw new Error("Places library or Autocomplete Service not available");const X=await S.current.getPlacePredictions({input:k,...A.current?{sessionToken:A.current}:{}});if(a(!1),!((F=X==null?void 0:X.predictions)!=null&&F.length)){r([]),o(!1);return}r(X.predictions),o(!0)}catch(X){console.error("Error fetching predictions: ",X),a(!1),r([]),o(!1),Z.error(gt+Oh)}},P=m.useMemo(()=>Bh(k=>N(k),600),[N]),U=k=>{const F=k.currentTarget.value;if(t(F),!F||F.length<3){r([]),o(!1);return}P(F)},z=async k=>{var F,X,ye,ee,De;t(k.description),o(!1);try{if(!x||!M.current)throw new Error("Places library or Places Service not available");const ne=await new Promise((ze,tt)=>{M.current.getDetails({placeId:k.place_id,fields:["geometry"],...A.current?{sessionToken:A.current}:{}},(St,nt)=>{nt===x.PlacesServiceStatus.OK&&St?ze(St):tt(new Error(`Place details request failed with status: ${nt}`))})});if((F=ne==null?void 0:ne.geometry)!=null&&F.location){const ze=(ye=(X=ne.geometry.location).lat)==null?void 0:ye.call(X),tt=(De=(ee=ne.geometry.location).lng)==null?void 0:De.call(ee);await bt({lat:ze,lng:tt})}}catch(ne){console.error("Error getting place details:",ne),Z.error(gt+kh)}finally{x&&(A.current=new x.AutocompleteSessionToken)}},ie=()=>{t(""),r([]),o(!1)},he=()=>!s||n.length===0?null:b.jsx("div",{className:et.predictionsContainer,children:i?b.jsx("div",{className:et.loadingItem,children:b.jsx(_t,{size:"medium"})}):n.map(k=>b.jsx("div",{className:et.predictionItem,onClick:()=>z(k),children:k.description},k.place_id))});async function $e(k){k.preventDefault(),c(!0);try{const F=await new Promise((ee,De)=>{navigator.geolocation.getCurrentPosition(ne=>ee(ne),ne=>De(ne),{timeout:5e3})}),X={lat:F.coords.latitude,lng:F.coords.longitude};if(await bt(X),!C||!(O!=null&&O.current)||!E)throw new Error("Geocoding library or Geocoder not available");const ye=await new Promise((ee,De)=>{O.current.geocode({location:X},(ne,ze)=>{ze===google.maps.GeocoderStatus.OK&&ne&&ne.length>0?ee(ne):De(new Error(`Geocoding failed with status: ${ze}`))})});ye&&ye[0]&&t(ye[0].formatted_address)}catch(F){console.error("Error getting location: ",F);const X=F instanceof GeolocationPositionError?gt+F.message:gt+Lh;Z.error(X)}finally{c(!1)}}async function bt(k){const{lng:F,lat:X}=k,ye={location:{type:"Feature",geometry:{type:"Point",coordinates:[F,X]},properties:{}}};try{const{data:ee}=await w({mapId:u},{body:ye})??{};if(!(ee!=null&&ee.pins))throw new Error("No locations found");d(ee.pins),f(st.MARKER),p({lat:X,lng:F},ee.zoom||15)}catch(ee){throw console.error("Error finding locations: ",ee),ee}}const H=v||l;return g?b.jsxs("div",{className:Y("dyn-locator__search",et.root),children:[b.jsx(zm,{name:"locator_search_field",className:Y("dyn-locator__search__field",et.input),value:e,onChange:U,placeholder:y["Search.placeholder"],dropdown:he(),dropdownVisible:s,disabled:H,sideOrnament:e?void 0:b.jsx(Re,{className:et.sideOrnament,icon:"Search",size:"M"}),sideButton:e?b.jsx(vt,{variant:"bare",className:et.clearButton,onClick:ie,"aria-label":"Clear",children:b.jsx(Re,{icon:"Close",size:"M"})}):b.jsx(xa,{href:"#",onClick:$e,children:y["Search.geolocationButton"]})}),b.jsx(Ga,{show:H,children:b.jsx(_t,{size:"medium"})})]}):null}function Xm({children:e,apiKey:t,language:n,region:r,libraries:s}){return b.jsx(rm,{apiKey:t,region:r,language:n,libraries:s,children:e})}const Wm=Object.freeze(Object.defineProperty({__proto__:null,default:Xm},Symbol.toStringTag,{value:"Module"}));function Km(){throw new Error("Mapbox provider is not implemented yet")}const Gm=Object.freeze(Object.defineProperty({__proto__:null,default:Km},Symbol.toStringTag,{value:"Module"}));function Hm(){throw new Error("HERE Maps provider is not implemented yet")}const qm=Object.freeze(Object.defineProperty({__proto__:null,default:Hm},Symbol.toStringTag,{value:"Module"}));ve.Map=$m,ve.Search=Um,ve.default=Ha,Object.defineProperties(ve,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
304
+ `,Tn=16,qp=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,containerStyle:o,containerClassName:i})=>{let{toasts:a,handlers:l}=wp(n);return ee.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Tn,left:Tn,right:Tn,bottom:Tn,pointerEvents:"none",...o},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),f=Kp(u,d);return ee.createElement(Wp,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?Gp:"",style:f},c.type==="custom"?Cn(c.message,c):s?s(c):ee.createElement(Ga,{toast:c,position:u}))}))};const Hp={root:"_root_movxa_4"};function qa({className:e,children:t,show:n=!0,variant:r="light",...s}){const o=H("dyn-locator__overlay",Hp.root,e);return n?x.jsx("div",{className:o,"data-variant":r,...s,children:t}):null}function _n(e){const[t,n]=g.useState(!1),[r,s]=g.useState(null),{getEndpoint:o}=op(e);return{request:async(a={},l={})=>{n(!0),s(null);try{let c;try{c=o(a)}catch{throw new Error(`Endpoint "${e}" is not configured. The host application must provide all required endpoints.`)}const{url:u,method:d}=c,f=await fetch(u,{method:d,headers:{"Content-Type":"application/json",...l.headers},...d!=="GET"&&l.body?{body:JSON.stringify(l.body)}:{}});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return{data:await f.json()}}catch(c){const u=c instanceof Error?c:new Error(String(c));throw s(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:r}}function Yp({children:e,customComponents:t,customIcons:n,featureFlags:r,fetchLocations:s,localizationConfig:o,locations:i=[],mapId:a}){const l=I(_=>_.isFullscreen),c=I(_=>_.setLocations),u=I(_=>_.setMapId),d=I(_=>_.setFeatureFlags),f=I(_=>_.setLocalizationConfig),p=I(_=>_.setMapDetail),m=I(_=>_.shouldRefetch),y=I(_=>_.setShouldRefetch),{request:S,loading:v,error:b}=_n(Yt.CLUSTERS),{request:C,loading:A,error:T}=_n(Yt.MARKERS),M=v||A,j=!!b||!!T;async function P(_){var z;try{if(typeof _!="number"||_<0||isNaN(_))throw new Error("No map ID provided");const{data:$}=await S({mapId:String(_)})??{};if(!$)throw new Error("No cluster data received from the server");c((z=$.map)==null?void 0:z.call($,re=>({...re,onMarkerClick:async()=>{await V(_,re.id)}})))}catch($){console.error("Error fetching clusters: ",$),Z.error(Qe+Gr),c([])}}async function V(_,z){try{if(typeof _!="number"||_<0||isNaN(_))throw new Error("No map ID provided");const{data:$}=await C({mapId:_,clusterId:z})??{};if(!$)throw new Error("No marker data received from the server");c($),p(We.MARKER)}catch($){console.error("Error fetching markers: ",$),Z.error(Qe+Gr),c([])}}return g.useEffect(()=>{o&&f(o),r&&d(r),typeof a=="number"&&a>0&&!isNaN(a)&&u(a),i!=null&&i.length?c(i):s?s().then(_=>c(_)):P(a)},[]),g.useEffect(()=>{let _=!0;return m&&a&&P(a).finally(()=>{_&&y(!1)}),()=>{_=!1}},[m,a]),x.jsx("div",{id:"dyn-locator",className:H("dyn-locator__locator",gs.root),"data-fullscreen":l,children:x.jsxs(tp,{customIcons:n,customComponents:t,children:[e,x.jsxs(qa,{show:M||j,variant:"light",children:[M?x.jsx(Pt,{size:"large"}):null,j?x.jsx(wa,{title:jh,message:Gr,actionText:"ricaricare la pagina.",errorDetails:(b==null?void 0:b.message)||(T==null?void 0:T.message),onAction:_=>{_.preventDefault(),window.location.reload()}}):null]}),x.jsx(qp,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:_=>x.jsx(Ga,{toast:_,children:({icon:z,message:$})=>x.jsxs(x.Fragment,{children:[z,$,_.type==="error"&&x.jsx(bt,{variant:"bare",onClick:()=>Z.dismiss(_.id),children:x.jsx($e,{icon:"Close"})})]})})})]})})}function Ha({mapProvider:e,endpoints:t,apiUrl:n,children:r,...s}){return x.jsx(Kh,{children:x.jsx(kl,{children:x.jsx(Fl,{mapProvider:e,children:x.jsx(sp,{endpoints:t,apiUrl:n,children:x.jsx(Yp,{children:r,...s})})})})})}Ha.displayName="Locator";var Qr,Ya;function Zp(){return Ya||(Ya=1,Qr=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,s,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[s]))return!1;for(s=r;s--!==0;){var i=o[s];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),Qr}var Jp=Zp();const Qp=ls(Jp);function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(null,arguments)}function nt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function em(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tm(e){var t=em(e,"string");return typeof t=="symbol"?t:t+""}const he={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},nm="https://maps.googleapis.com/maps/api/js";class Qt{static async load(t,n){var r;const s=t.libraries?t.libraries.split(","):[],o=this.serializeParams(t);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=he.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=o,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==o&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const i=["maps",...s];await Promise.all(i.map(a=>google.maps.importLibrary(a)))}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((s,o)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[c,u]of Object.entries(t)){const d=c.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(u))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=nm+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=he.FAILED,this.notifyLoadingStatusListeners(),o(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=he.LOADED,this.notifyLoadingStatusListeners(),s()},window.gm_authFailure=()=>{this.loadingStatus=he.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=he.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=s=>r().then(()=>google.maps.importLibrary(s))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}Qt.loadingStatus=he.NOT_LOADED,Qt.serializedApiParams=void 0,Qt.listeners=[];const rm=["onLoad","onError","apiKey","version","libraries"],sm=["children"],om="GMP_visgl_rgmlibrary_v1_default",en=g.createContext(null);function im(){const[e,t]=g.useState({});return{mapInstances:e,addMapInstance:(o,i="default")=>{t(a=>Te({},a,{[i]:o}))},removeMapInstance:(o="default")=>{t(i=>nt(i,[o].map(tm)))},clearMapInstances:()=>{t({})}}}function am(e){const{onLoad:t,onError:n,apiKey:r,version:s,libraries:o=[]}=e,i=nt(e,rm),[a,l]=g.useState(Qt.loadingStatus),[c,u]=g.useReducer((m,y)=>m[y.name]?m:Te({},m,{[y.name]:y.value}),{}),d=g.useMemo(()=>o==null?void 0:o.join(","),[o]),f=g.useMemo(()=>JSON.stringify(Te({apiKey:r,version:s},i)),[r,s,i]),p=g.useCallback(async m=>{var y;if(c[m])return c[m];if(!((y=google)!=null&&(y=y.maps)!=null&&y.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const S=await window.google.maps.importLibrary(m);return u({name:m,value:S}),S},[c]);return g.useEffect(()=>{(async()=>{try{const m=Te({key:r},i);s&&(m.v=s),(d==null?void 0:d.length)>0&&(m.libraries=d),(m.channel===void 0||m.channel<0||m.channel>999)&&delete m.channel,m.solutionChannel===void 0?m.solutionChannel=om:m.solutionChannel===""&&delete m.solutionChannel,await Qt.load(m,y=>l(y));for(const y of["core","maps",...o])await p(y);t&&t()}catch(m){n?n(m):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",m)}})()},[r,d,f]),{status:a,loadedLibraries:c,importLibrary:p}}const lm=e=>{const{children:t}=e,n=nt(e,sm),{mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i}=im(),{status:a,loadedLibraries:l,importLibrary:c}=am(n),u=g.useMemo(()=>({mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[r,s,o,i,a,l,c]);return g.createElement(en.Provider,{value:u},t)};function cm(e,t){for(const n of hm){const r=t[n],s=Za[n];g.useEffect(()=>{if(!e||!r)return;const o=google.maps.event.addListener(e,s,i=>{r(um(s,e,i))});return()=>o.remove()},[e,s,r])}}function um(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(dm.includes(e)){const o=r,i=t.getCenter(),a=t.getZoom(),l=t.getHeading()||0,c=t.getTilt()||0,u=t.getBounds();return(!i||!u||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),o.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:l,tilt:c,bounds:(u==null?void 0:u.toJSON())||{north:90,east:180,south:-90,west:-180}},o}else if(fm.includes(e)){var s;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const o=r;return o.domEvent=n.domEvent,o.stoppable=!0,o.stop=()=>n.stop(),o.detail={latLng:((s=n.latLng)==null?void 0:s.toJSON())||null,placeId:n.placeId},o}return r}const Za={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},dm=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],fm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],hm=Object.keys(Za);function es(e,t){const n=g.useRef(void 0);(!n.current||!Qp(t,n.current))&&(n.current=t),g.useEffect(e,n.current)}const pm=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function mm(e,t){const n={},r=Object.keys(t);for(const s of r)pm.has(s)&&(n[s]=t[s]);es(()=>{e&&e.setOptions(n)},[n])}function ts(){var e;return((e=g.useContext(en))==null?void 0:e.status)||he.NOT_LOADED}function gm(e,t){const{viewport:n,viewState:r}=t,s=!!n;return g.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:o,longitude:i,bearing:a,pitch:l,zoom:c}=r;e.moveCamera({center:{lat:o,lng:i},heading:a,tilt:l,zoom:c+1})},[e,r]),s}function ym(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function Ja(e){return ym(e)?e:e.toJSON()}function vm(e,t,n){const r=n.center?Ja(n.center):null;let s=null,o=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(s=r.lat,o=r.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,l=Number.isFinite(n.tilt)?n.tilt:null;g.useLayoutEffect(()=>{if(!e)return;const c={};let u=!1;s!==null&&o!==null&&(t.current.center.lat!==s||t.current.center.lng!==o)&&(c.center={lat:s,lng:o},u=!0),i!==null&&t.current.zoom!==i&&(c.zoom=i,u=!0),a!==null&&t.current.heading!==a&&(c.heading=a,u=!0),l!==null&&t.current.tilt!==l&&(c.tilt=l,u=!0),u&&e.moveCamera(c)})}const xm=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return g.createElement("div",{style:e},g.createElement("h2",null,"Error: AuthFailure"),g.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",g.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function bm(){const[e,t]=g.useState(null),n=g.useCallback(r=>t(r),[t]);return[e,n]}function Qa(){return ts()===he.LOADED}function Sm(){const[,e]=g.useReducer(t=>t+1,0);return e}function Cm(e,t){const n=e.getCenter(),r=e.getZoom(),s=e.getHeading()||0,o=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:s,tilt:o})}function wm(e){const t=Sm(),n=g.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return g.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{Cm(e,n),t()});return()=>r.remove()},[e,t]),n}const Tm=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],_m=["padding"];class En{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}En.entries={};function Em(e,t){const n=Qa(),[r,s]=g.useState(null),[o,i]=bm(),a=wm(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:p,reuseMaps:m,renderingType:y,colorScheme:S}=e,v=nt(e,Tm),b=e.zoom!==void 0||e.defaultZoom!==void 0,C=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!b||!C)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!v.center&&u&&(v.center=u),!v.zoom&&Number.isFinite(d)&&(v.zoom=d),!v.heading&&Number.isFinite(f)&&(v.heading=f),!v.tilt&&Number.isFinite(p)&&(v.tilt=p);for(const T of Object.keys(v))v[T]===void 0&&delete v[T];const A=g.useRef(void 0);return g.useEffect(()=>{if(!o||!n)return;const{addMapInstance:T,removeMapInstance:M}=t,{mapId:j}=e,P=`${j||"default"}:${y||"default"}:${S||"LIGHT"}`;let V,_;if(m&&En.has(P)?(_=En.pop(P),V=_.getDiv(),o.appendChild(V),_.setOptions(v),setTimeout(()=>_.setCenter(_.getCenter()),0)):(V=document.createElement("div"),V.style.height="100%",o.appendChild(V),_=new google.maps.Map(V,Te({},v,y?{renderingType:y}:{},S?{colorScheme:S}:{}))),s(_),T(_,l),c){const{padding:z}=c,$=nt(c,_m);_.fitBounds($,z)}else(!b||!C)&&_.fitBounds({east:180,west:-180,south:-90,north:90});if(A.current){const{mapId:z,cameraState:$}=A.current;z!==j&&_.setOptions($)}return()=>{A.current={mapId:j,cameraState:a.current},V.remove(),m?En.push(P,_):google.maps.event.clearInstanceListeners(_),s(null),M(l)}},[o,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const el=g.createContext(null),tl=e=>{const{children:t,id:n,className:r,style:s}=e,o=g.useContext(en),i=ts();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=Em(e,o);vm(a,c,e),cm(a,e),mm(a,e);const u=gm(a,e),d=!!e.controlled;g.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,u,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?Ja(e.center):null;let p=null,m=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(p=f.lat,m=f.lng);const y=g.useMemo(()=>{var b,C,A,T,M;return{center:{lat:(b=p)!=null?b:0,lng:(C=m)!=null?C:0},zoom:(A=e.zoom)!=null?A:0,heading:(T=e.heading)!=null?T:0,tilt:(M=e.tilt)!=null?M:0}},[p,m,e.zoom,e.heading,e.tilt]);g.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(y);const b=a.addListener("bounds_changed",()=>{a.moveCamera(y)});return()=>b.remove()},[a,d,y]);const S=g.useMemo(()=>Te({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},s),[s,u]),v=g.useMemo(()=>({map:a}),[a]);return i===he.AUTH_FAILURE?g.createElement("div",{style:Te({position:"relative"},r?{}:S),className:r},g.createElement(xm,null)):g.createElement("div",Te({ref:l,"data-testid":"map",style:r?void 0:S,className:r},n?{id:n}:{}),a?g.createElement(el.Provider,{value:v},t):null)};tl.deckGLViewProps=!0;const nl=new Set;function Pm(...e){const t=JSON.stringify(e);nl.has(t)||(nl.add(t),console.error(...e))}const Pn=(e=null)=>{const t=g.useContext(en),{map:n}=g.useContext(el)||{};if(t===null)return Pm("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function An(e){const t=Qa(),n=g.useContext(en);return g.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function St(e,t,n){g.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function Mn(e,t,n){g.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function rl(e,t,n){g.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function Am(e){return e.content!==void 0}function Mm(e){return e.nodeType===Node.ELEMENT_NODE}const Lm=g.createContext(null),Dm={BOTTOM:["50%","100%"]},Om=({children:e,styles:t,className:n,anchorPoint:r})=>{const[s,o]=r??Dm.BOTTOM;let i=`-${s}`,a=`-${o}`;s.trimStart().startsWith("-")&&(i=s.substring(1)),o.trimStart().startsWith("-")&&(a=o.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return g.createElement("div",{style:{transform:l}},g.createElement("div",{className:n,style:t},e))};function km(e){const[t,n]=g.useState(null),[r,s]=g.useState(null),o=Pn(),i=An("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:p,onDragEnd:m,collisionBehavior:y,clickable:S,draggable:v,position:b,title:C,zIndex:A}=e,T=g.Children.count(a);return g.useEffect(()=>{if(!o||!i)return;const M=new i.AdvancedMarkerElement;M.map=o,n(M);let j=null;return T>0&&(j=document.createElement("div"),j.isCustomMarker=!0,M.content=j,s(j)),()=>{var P;M.map=null,(P=j)==null||P.remove(),n(null),s(null)}},[o,i,T]),g.useEffect(()=>{!t||!t.content||T>0||(t.content.className=c||"")},[t,c,T]),Mn(t,"position",b),Mn(t,"title",C??""),Mn(t,"zIndex",A),Mn(t,"collisionBehavior",y),g.useEffect(()=>{t&&(v!==void 0?t.gmpDraggable=v:f||p||m?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,v,f,m,p]),g.useEffect(()=>{if(!t)return;const M=S!==void 0||!!l||!!u||!!d;t.gmpClickable=M,M&&t!=null&&t.content&&Mm(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,S,l,u,d]),St(t,"click",l),St(t,"drag",f),St(t,"dragstart",p),St(t,"dragend",m),rl(t==null?void 0:t.element,"mouseenter",u),rl(t==null?void 0:t.element,"mouseleave",d),[t,r]}g.forwardRef((e,t)=>{const{children:n,style:r,className:s,anchorPoint:o}=e,[i,a]=km(e),l=g.useMemo(()=>i?{marker:i}:null,[i]);return g.useImperativeHandle(t,()=>i,[i]),a?g.createElement(Lm.Provider,{value:l},jn.createPortal(g.createElement(Om,{anchorPoint:o,styles:r,className:s},n),a)):null});function jm(e,t,n){if(t!=null&&typeof t!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const r=e.style;if(n==null){if(t==null)return;for(const s in t)t.hasOwnProperty(s)&&sl(r,s,t[s]);return}for(const s in n)n.hasOwnProperty(s)&&(t==null||!t.hasOwnProperty(s))&&(s.indexOf("--")===0?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="");if(t!=null)for(const s in t){const o=t[s];t.hasOwnProperty(s)&&n[s]!==o&&sl(r,s,o)}}function sl(e,t,n){const r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n=="number"&&n!==0&&!Vm(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const Nm=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function Vm(e){return Nm.has(e)}const Im=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Rm=e=>{const{children:t,headerContent:n,style:r,className:s,pixelOffset:o,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=nt(e,Im),d=An("maps"),[f,p]=g.useState(null),m=g.useRef(null),y=g.useRef(null);g.useEffect(()=>{if(!d)return;m.current=document.createElement("div"),y.current=document.createElement("div");const b=u;o&&(b.pixelOffset=new google.maps.Size(o[0],o[1])),n&&(b.headerContent=typeof n=="string"?n:y.current);const C=new google.maps.InfoWindow(u);return C.setContent(m.current),p(C),()=>{var A,T;C.setContent(null),(A=m.current)==null||A.remove(),(T=y.current)==null||T.remove(),m.current=null,y.current=null,p(null)}},[d]);const S=g.useRef(null);g.useEffect(()=>{!f||!m.current||(jm(m.current,r||null,S.current),S.current=r||null,s!==m.current.className&&(m.current.className=s||""))},[f,s,r]),es(()=>{if(!f)return;const b=u;o?b.pixelOffset=new google.maps.Size(o[0],o[1]):b.pixelOffset=null,n?b.headerContent=typeof n=="string"?n:y.current:b.headerContent=null,f.setOptions(u)},[u,o,n]),St(f,"close",l),St(f,"closeclick",c);const v=Pn();return es(()=>{if(!v||!f||i===null)return;const b=!!i,C={map:v};if(i&&(C.anchor=i,Am(i)&&i.content instanceof Element)){const T=i.content,M=T==null?void 0:T.getBoundingClientRect();if(M&&T!=null&&T.isCustomMarker){var A;const j=(A=i.content.firstElementChild)==null?void 0:A.firstElementChild,P=j==null?void 0:j.getBoundingClientRect(),V=P.x-M.x+(P.width-M.width)/2,_=P.y-M.y,z=u;z.pixelOffset=new google.maps.Size(o?o[0]+V:V,o?o[1]+_:_),f.setOptions(z)}}return a!==void 0&&(C.shouldFocus=a),f.open(C),()=>{b&&f.set("anchor",null),f.close()}},[f,i,v,a,u,o]),g.createElement(g.Fragment,null,m.current&&jn.createPortal(t,m.current),y.current!==null&&jn.createPortal(n,y.current))},Fm=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function Bm(e){const[t,n]=g.useState(null),r=Pn(),{onClick:s,onDrag:o,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=nt(e,Fm),{position:d,draggable:f}=u;return g.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const p=new google.maps.Marker(u);return p.setMap(r),n(p),()=>{p.setMap(null),n(null)}},[r]),g.useEffect(()=>{if(!t)return;const p=t,m=google.maps.event;return s&&m.addListener(p,"click",s),o&&m.addListener(p,"drag",o),i&&m.addListener(p,"dragstart",i),a&&m.addListener(p,"dragend",a),l&&m.addListener(p,"mouseover",l),c&&m.addListener(p,"mouseout",c),t.setDraggable(!!f),()=>{m.clearInstanceListeners(p)}},[t,f,s,o,i,a,l,c]),g.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),g.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const ol=g.forwardRef((e,t)=>{const n=Bm(e);return g.useImperativeHandle(t,()=>n,[n]),g.createElement(g.Fragment,null)});function $m(){const[e,t]=g.useState(null);return[g.useCallback(r=>{t(r)},[]),e]}const rt={root:"_root_186dn_10",header:"_header_186dn_18",body:"_body_186dn_31",highlighted:"_highlighted_186dn_43"};function zm({onLocationSelect:e}){const t=ja("locationCard"),[n,r]=g.useState(!1),s=I(m=>m.locations),{labels:o}=I(m=>m.localizationConfig),i=I(m=>m.selectedLocation),a=I(m=>m.setSelectedLocation),l=g.useRef({}),c=o["LocationList.header"],u=o["LocationList.locationDesignator"],d=c.split(/(\{:\d\})/g),f=g.useMemo(()=>d.map((m,y)=>m==="{:1}"?x.jsx("span",{className:rt.highlighted,children:(s==null?void 0:s.length)??0},y):m==="{:2}"?x.jsx("span",{className:rt.highlighted,children:u},y):m),[u,s.length,d]);g.useEffect(()=>{if(i&&n){const m=l.current[i];m!=null&&m.current&&requestAnimationFrame(()=>{m.current.scrollIntoView({behavior:"smooth",block:"start"})})}},[i,n]);function p(m){return()=>{e==null||e(m.coords),a==null||a(m.id)}}return x.jsxs("div",{className:H("dyn-locator__location-list",rt.root),"data-expanded":n,children:[x.jsxs("header",{className:rt.header,onClick:()=>r(m=>!m),children:[x.jsx("span",{children:f}),x.jsx(bt,{className:rt.closeButton,variant:"bare",children:x.jsx($e,{icon:n?"ChevronDown":"ChevronUp"})})]}),x.jsx("div",{className:rt.body,children:s!=null&&s.length?s.map(m=>{const y=m.id;l.current[y]||(l.current[y]=g.createRef());const S=l.current[y];return x.jsx(t,{ref:S,"data-active":i===m.id,onClick:p(m),...m},m.id)}):x.jsx("div",{className:rt.noResults,children:o["LocationList.noResults"]})})]})}const Oe={root:"_root_1e6nt_21",loaderContainer:"_loaderContainer_1e6nt_29",fullscreenButton:"_fullscreenButton_1e6nt_36",backButton:"_backButton_1e6nt_37",areaSearchButton:"_areaSearchButton_1e6nt_52",visualCue:"_visualCue_1e6nt_77",closeButton:"_closeButton_1e6nt_102",searchButton:"_searchButton_1e6nt_120"},Ln={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function Um({id:e,title:t,address:n,coords:r,actions:s,onClick:o,onZoom:i}){var f;const a=I(p=>p.selectedLocation),l=I(p=>p.setSelectedLocation),[c,u]=$m(),d=g.useCallback(()=>{l==null||l("")},[l]);return x.jsxs(x.Fragment,{children:[x.jsx(ol,{ref:c,position:r,onClick:()=>{o==null||o()}}),a===e?x.jsxs(Rm,{anchor:u,headerContent:t,onCloseClick:d,className:Ln.root,children:[x.jsxs("header",{className:Ln.header,children:[x.jsx("h6",{children:t}),x.jsx("address",{children:n})]}),x.jsx("div",{className:Ln.body,children:x.jsxs("div",{className:Ln.cta,children:[x.jsx(Ht,{animate:!1,variant:"secondary",size:"small",...qr((f=s==null?void 0:s.find)==null?void 0:f.call(s,p=>p.type==="navigate")),children:"Percorso"}),x.jsx(Ht,{animate:!1,variant:"secondary",size:"small",onClick:i,children:"Zoom"})]})})]}):null]})}function Xm(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function Wm(e){return"title"in e&&!("size"in e)}function Km(){var ve;const[e,t]=g.useState({zoom:ya}),[n,r]=g.useState(!1),[s,o]=g.useState("inactive"),i=g.useRef(""),a=ts(),{request:l,loading:c}=_n(Yt.FIND),u=I(L=>L.locations),d=I(L=>L.featureFlags),{labels:f}=I(L=>L.localizationConfig),p=I(L=>L.targetLocation),m=I(L=>L.clearTargetLocation),y=I(L=>L.mapDetail),S=I(L=>L.setMapDetail),v=I(L=>L.isFullscreen),b=I(L=>L.setFullscreen),C=I(L=>L.shouldRefetch),A=I(L=>L.setShouldRefetch),T=I(L=>L.setSelectedLocation),M=y===We.MARKER;function j({detail:L}){const{center:U,zoom:O}=L;t({center:U,zoom:O}),n||r(!0)}function P(){n&&e.center&&s==="inactive"&&o("active")}function V(L){t(U=>({center:L,zoom:U.zoom}))}function _(){o("inactive"),S(We.CLUSTER),t({center:Uh,zoom:ya}),A(!0)}const z=I(L=>L.mapId),$=I(L=>L.setLocations),re=g.useCallback(async()=>{if(!e.center)return;const{lat:L,lng:U}=e.center,O={location:{type:"Feature",geometry:{type:"Point",coordinates:[U,L]},properties:{distance:Xh}}};try{const{data:R}=await l({mapId:z},{body:O})??{};if(!(R!=null&&R.pins))throw new Error("No locations found");$(R.pins),S(We.MARKER),o("inactive")}catch(R){console.error("Error finding locations in this area: ",R),Z.error(Qe+Rh)}},[e.center,l,S,z,$]);function de(L){if(Xm(L))return x.jsx(ol,{position:L.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(L.range??0)/zh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await L.onMarkerClick(),t({center:L.coords,zoom:L.zoom||15})}},L.id);if(Wm(L))return x.jsx(Um,{id:L.id,title:L.title??"No title",address:L.address??"No address",coords:L.coords,actions:L.actions,onZoom:()=>t({center:L.coords,zoom:18}),onClick:()=>{T(L.id)}},L.id)}if(g.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),g.useEffect(()=>{p&&(t({center:p.coords,zoom:p.zoom}),m())},[p,m]),a===he.LOADING)return x.jsx("div",{className:H("dyn-locator__map",Oe.root),children:x.jsx("div",{className:Oe.loaderContainer,children:x.jsx(Pt,{size:"large"})})});if(a===he.FAILED||a===he.AUTH_FAILURE)throw new Error(Ih);if(a===he.LOADED)return x.jsxs("div",{className:H("dyn-locator__map",Oe.root),children:[d.fullscreen?x.jsx(bt,{className:H(Oe.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>b==null?void 0:b(!v),children:x.jsx($e,{size:"M",icon:v?"Close":"Expand"})}):null,M?x.jsx(bt,{className:H(Oe.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:_,children:x.jsx($e,{size:"M",icon:"ArrowLeft"})}):null,s!=="inactive"&&x.jsxs(Ht,{className:H(Oe.areaSearchButton,"dyn-locator__map__area-search-button",M&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||s==="select_area",loading:c,onClick:()=>o("select_area"),children:[x.jsx(Ql,{}),f["Map.areaSearchButton"]]}),s==="select_area"&&x.jsxs("div",{className:Oe.visualCue,children:[x.jsxs("i",{children:[x.jsx("button",{className:Oe.closeButton,onClick:()=>o("active"),"aria-label":"Close area search",children:x.jsx(xs,{size:16})}),x.jsx(ec,{size:48,strokeWidth:1,color:"currentColor"})]}),x.jsxs(Ht,{className:Oe.searchButton,disabled:c,loading:c,onClick:re,size:"small",variant:"themed",children:[f["Map.areaSearchVisualCueCTA"]," ",x.jsx(Wl,{size:22,style:{position:"relative",left:-8}})]})]}),x.jsx(tl,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:j,onDragend:P,defaultBounds:qt,children:!C&&((ve=u==null?void 0:u.map)==null?void 0:ve.call(u,de))}),M?x.jsx(zm,{onLocationSelect:V}):null]})}const ke={root:"_root_h6kw7_10",validIcon:"_validIcon_h6kw7_23",errorIcon:"_errorIcon_h6kw7_30",label:"_label_h6kw7_51",input:"_input_h6kw7_61",sideButton:"_sideButton_h6kw7_92",sideOrnament:"_sideOrnament_h6kw7_95",clearButton:"_clearButton_h6kw7_129",dropdown:"_dropdown_h6kw7_169"},il="Input";function al({label:e,className:t,showValidation:n=!0,error:r=!1,valid:s=!1,clearable:o=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:p,sideOrnament:m,...y},S){const v=a?Je.div:"div",b=Be(y)??[],C=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return x.jsxs(v,{className:H("dyn-locator__"+Ae(il),ke.root,Pe(t),...b??[]),"data-valid":s,"data-error":r,"data-expanded":u,"data-side-button":!!p,...f?{style:f}:{},...C,children:[n&&x.jsxs(x.Fragment,{children:[s&&x.jsx("span",{className:ke.validIcon}),r&&x.jsx("span",{className:ke.errorIcon})]}),e?x.jsx("label",{className:ke.label,...y.id?{htmlFor:y.id}:{},children:e}):null,m?x.jsx("span",{className:ke.sideOrnament,children:m}):null,x.jsx("input",{ref:S,className:H(ke.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!p,"data-side-ornament":!!m,...y}),p?x.jsx("span",{className:ke.sideButton,children:p}):null,o&&(y==null?void 0:y.value)&&x.jsx("button",{className:ke.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&x.jsx("div",{className:ke.dropdown,children:c})]})}al.displayName=il;const Gm=g.forwardRef(al),st={root:"_root_1vbtg_7",input:"_input_1vbtg_7",clearButton:"_clearButton_1vbtg_10",sideOrnament:"_sideOrnament_1vbtg_13",predictionsContainer:"_predictionsContainer_1vbtg_18",predictionItem:"_predictionItem_1vbtg_29",loadingItem:"_loadingItem_1vbtg_47"};function qm(){const[e,t]=g.useState(""),[n,r]=g.useState([]),[s,o]=g.useState(!1),[i,a]=g.useState(!1),[l,c]=g.useState(!1),u=I(O=>O.mapId),d=I(O=>O.setLocations),f=I(O=>O.setMapDetail),p=I(O=>O.zoomToLocation),{labels:m}=I(O=>O.localizationConfig),{search:y}=I(O=>O.featureFlags),{request:S,loading:v}=_n(Yt.FIND),b=An("places"),C=An("geocoding"),A=Pn(),T=g.useRef(null),M=g.useRef(null),j=g.useRef(null),P=g.useRef(null);g.useEffect(()=>{C&&(j.current||(j.current=new C.Geocoder))},[C]),g.useEffect(()=>{b&&(T.current||(T.current=new b.AutocompleteService),P.current||(P.current=new b.AutocompleteSessionToken))},[b]),g.useEffect(()=>{!b||!A||M.current||(M.current=new b.PlacesService(A))},[b,A]);const V=async O=>{var R;if(!O||O.length<3){r([]),o(!1);return}a(!0);try{if(!b||!T.current)throw new Error("Places library or Autocomplete Service not available");const K=await T.current.getPlacePredictions({input:O,...P.current?{sessionToken:P.current}:{}});if(a(!1),!((R=K==null?void 0:K.predictions)!=null&&R.length)){r([]),o(!1);return}r(K.predictions),o(!0)}catch(K){console.error("Error fetching predictions: ",K),a(!1),r([]),o(!1),Z.error(Qe+Nh)}},_=g.useMemo(()=>Wh(O=>V(O),600),[V]),z=O=>{const R=O.currentTarget.value;if(t(R),!R||R.length<3){r([]),o(!1);return}_(R)},$=async O=>{var R,K,xe,te,je;t(O.description),o(!1);try{if(!b||!M.current)throw new Error("Places library or Places Service not available");const se=await new Promise((Xe,ot)=>{M.current.getDetails({placeId:O.place_id,fields:["geometry"],...P.current?{sessionToken:P.current}:{}},(Ct,it)=>{it===b.PlacesServiceStatus.OK&&Ct?Xe(Ct):ot(new Error(`Place details request failed with status: ${it}`))})});if((R=se==null?void 0:se.geometry)!=null&&R.location){const Xe=(xe=(K=se.geometry.location).lat)==null?void 0:xe.call(K),ot=(je=(te=se.geometry.location).lng)==null?void 0:je.call(te);await L({lat:Xe,lng:ot})}}catch(se){console.error("Error getting place details:",se),Z.error(Qe+Vh)}finally{b&&(P.current=new b.AutocompleteSessionToken)}},re=()=>{t(""),r([]),o(!1)},de=()=>!s||n.length===0?null:x.jsx("div",{className:st.predictionsContainer,children:i?x.jsx("div",{className:st.loadingItem,children:x.jsx(Pt,{size:"medium"})}):n.map(O=>x.jsx("div",{className:st.predictionItem,onClick:()=>$(O),children:O.description},O.place_id))});async function ve(O){O.preventDefault(),c(!0);try{const R=await new Promise((te,je)=>{navigator.geolocation.getCurrentPosition(se=>te(se),se=>je(se),{timeout:5e3})}),K={lat:R.coords.latitude,lng:R.coords.longitude};if(await L(K),!C||!(j!=null&&j.current)||!A)throw new Error("Geocoding library or Geocoder not available");const xe=await new Promise((te,je)=>{j.current.geocode({location:K},(se,Xe)=>{Xe===google.maps.GeocoderStatus.OK&&se&&se.length>0?te(se):je(new Error(`Geocoding failed with status: ${Xe}`))})});xe&&xe[0]&&t(xe[0].formatted_address)}catch(R){console.error("Error getting location: ",R);const K=R instanceof GeolocationPositionError?Qe+R.message:Qe+kh;Z.error(K)}finally{c(!1)}}async function L(O){const{lng:R,lat:K}=O,xe={location:{type:"Feature",geometry:{type:"Point",coordinates:[R,K]},properties:{}}};try{const{data:te}=await S({mapId:u},{body:xe})??{};if(!(te!=null&&te.pins))throw new Error("No locations found");d(te.pins),f(We.MARKER),p({lat:K,lng:R},te.zoom||15)}catch(te){throw console.error("Error finding locations: ",te),te}}const U=v||l;return y?x.jsxs("div",{className:H("dyn-locator__search",st.root),children:[x.jsx(Gm,{name:"locator_search_field",className:H("dyn-locator__search__field",st.input),value:e,onChange:z,placeholder:m["Search.placeholder"],dropdown:de(),dropdownVisible:s,disabled:U,sideOrnament:e?void 0:x.jsx($e,{className:st.sideOrnament,icon:"Search",size:"M"}),sideButton:e?x.jsx(bt,{variant:"bare",className:st.clearButton,onClick:re,"aria-label":"Clear",children:x.jsx($e,{icon:"Close",size:"M"})}):x.jsx(ba,{href:"#",onClick:ve,children:m["Search.geolocationButton"]})}),x.jsx(qa,{show:U,children:x.jsx(Pt,{size:"medium"})})]}):null}function Hm({children:e,apiKey:t,language:n,region:r,libraries:s}){return x.jsx(lm,{apiKey:t,region:r,language:n,libraries:s,children:e})}const Ym=Object.freeze(Object.defineProperty({__proto__:null,default:Hm},Symbol.toStringTag,{value:"Module"}));function Zm(){throw new Error("Mapbox provider is not implemented yet")}const Jm=Object.freeze(Object.defineProperty({__proto__:null,default:Zm},Symbol.toStringTag,{value:"Module"}));function Qm(){throw new Error("HERE Maps provider is not implemented yet")}const eg=Object.freeze(Object.defineProperty({__proto__:null,default:Qm},Symbol.toStringTag,{value:"Module"}));be.Map=Km,be.Search=qm,be.default=Ha,Object.defineProperties(be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
290
305
  //# sourceMappingURL=index.umd.js.map