@dynamo-caffeina-dev/locator-frontend 0.0.8 → 0.0.9
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/{GoogleMapsProvider-Cc3efA-l.js → GoogleMapsProvider-B-flNXvH.js} +2 -2
- package/dist/{GoogleMapsProvider-Cc3efA-l.js.map → GoogleMapsProvider-B-flNXvH.js.map} +1 -1
- package/dist/{index-DfbfyngA.js → index--1R5GQbs.js} +1140 -1137
- package/dist/{index-DfbfyngA.js.map → index--1R5GQbs.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +35 -35
- package/dist/index.umd.js.map +1 -1
- package/dist/locator-frontend.css +1 -1
- package/package.json +4 -2
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,
|
|
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={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -14,28 +14,28 @@
|
|
|
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
|
|
18
|
-
`+St+h}}var ns=!1,
|
|
19
|
-
`),ae=
|
|
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
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"&&
|
|
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`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+h+"`."}return""}}function
|
|
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=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+_+">.")}return
|
|
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:
|
|
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,
|
|
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(`
|
|
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(
|
|
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:{}};/*!
|
|
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})()}(
|
|
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"};/**
|
|
39
39
|
* @license lucide-react v0.483.0 - ISC
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
@@ -110,7 +110,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
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 Vn=typeof window<"u",tc=Vn?m.useLayoutEffect:m.useEffect,Nn=m.createContext(null),bs=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function nc(e=!0){const t=m.useContext(Nn);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 In(e,t){e.indexOf(t)===-1&&e.push(t)}function Rn(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 Fn(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 Bn{constructor(){this.subscriptions=[]}add(t){return In(this.subscriptions,t),()=>Rn(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 tn(e,t,n){e||ws.has(t)||(console.warn(t),ws.add(t))}const sc=Fn(()=>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 $n(e,t){return e?e[t]||e.default||e:void 0}const zn=2e4;function Cs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<zn;)t+=n,r=e.next(t);return t>=zn?1/0:t}function Un(e){return typeof e=="function"}function Ts(e,t){e.timeline=t,e.onfinish=null}const Xn=e=>Array.isArray(e)&&typeof e[0]=="number",ac={linearEasing:void 0};function lc(e,t){const n=Fn(e);return()=>{var r;return(r=ac[t])!==null&&r!==void 0?r:n()}}const nn=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 Es(e){return!!(typeof e=="function"&&nn()||!e||typeof e=="string"&&(e in Wn||nn())||Xn(e)||Array.isArray(e)&&e.every(Es))}const At=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Wn={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 _s(e,t){if(e)return typeof e=="function"&&nn()?Ps(e,t):Xn(e)?At(e):Array.isArray(e)?e.map(n=>_s(n,t)||Wn.easeOut):Wn[e]}const rn=["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=rn.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:rn.reduce((v,x)=>{const w=i[x];return v[x]=(M,P=!1,L=!1)=>(n||y(),w.schedule(M,P,L)),v},{}),cancel:v=>{for(let x=0;x<rn.length;x++)i[rn[x]].cancel(v)},state:s,steps:i}}const{schedule:$,cancel:ke,state:ee,steps:Kn}=Ms(typeof requestAnimationFrame<"u"?requestAnimationFrame:le,!0),{schedule:Gn}=Ms(queueMicrotask,!1);let sn;function dc(){sn=void 0}const be={now:()=>(sn===void 0&&be.set(ee.isProcessing||rc.useManualTiming?ee.timestamp:performance.now()),sn),set:e=>{sn=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,Hn=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 qn(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;qn(n,"down");const s=Vs(()=>{qn(n,"up")}),o=()=>qn(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 Hn(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"&&tn(!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 Bn);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 on(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=>!on(e);function Tc(e){e&&(Bs=t=>t.startsWith("on")?!on(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&&on(s)||!t&&!on(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Ec(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&tn(!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 an=m.createContext({});function ln(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Dt(e){return typeof e=="string"||Array.isArray(e)}const Yn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zn=["initial",...Yn];function cn(e){return ln(e.animate)||Zn.some(t=>Dt(e[t]))}function $s(e){return!!(cn(e)||e.variants)}function _c(e,t){if(cn(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}=_c(e,m.useContext(an));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 Jn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Us="data-"+Jn("framerAppearId"),Xs=m.createContext({});function Dc(e,t,n,r,s){var o,i;const{visualElement:a}=m.useContext(an),l=m.useContext(Rs),c=m.useContext(Nn),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],S=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(),Gn.render(f.render),S.current&&f.animationState&&f.animationState.animateChanges())}),m.useEffect(()=>{f&&(!S.current&&f.animationState&&f.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),S.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&<(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&&Vn){Vc(f,e);const S=Nc(f);d=S.MeasureLayout,y.visualElement=Dc(s,g,f,t,S.ProjectionNode)}return b.jsxs(an.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),Qn=Ks("--"),Ic=Ks("var(--"),er=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],Qn(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 ne=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)},un={...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("%"),D=jt("px"),Bc=jt("vh"),$c=jt("vw"),qs={...Se,parse:e=>Se.parse(e)/100,transform:e=>Se.transform(e*100)},zc={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},Uc={rotate:je,rotateX:je,rotateY:je,rotateZ:je,scale:un,scaleX:un,scaleY:un,scaleZ:un,skew:je,skewX:je,skewY:je,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:kt,originX:qs,originY:qs,originZ:D},Ys={...ut,transform:Math.round},tr={...zc,...Uc,zIndex:Ys,size:D,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,tr[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 nr(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(Qn(l)){s[l]=c;continue}else{const u=Hs(c,tr[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 rr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zs(e,t,n){for(const r in t)!ne(t[r])&&!Gs(r,n)&&(e[r]=t[r])}function Gc({transformTemplate:e},t){return m.useMemo(()=>{const n=rr();return nr(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 sr(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]=D.transform(-r);const i=D.transform(t),a=D.transform(n);e[o.array]=`${i} ${a}`}function Js(e,t,n){return typeof e=="string"?e:D.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 or(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(nr(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=()=>({...rr(),attrs:{}}),ir=e=>typeof e=="string"&&e.toLowerCase()==="svg";function tu(e,t,n,r){const s=m.useMemo(()=>{const o=Qs();return or(o,t,ir(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=(sr(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(()=>ne(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 ar(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 lr=e=>Array.isArray(e),ru=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),su=e=>lr(e)?e[e.length-1]||0:e;function dn(e){const t=ne(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(an),s=m.useContext(Nn),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]=dn(o[f]);let{initial:i,animate:a}=e;const l=cn(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"&&!ln(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const y=ar(e,f[p]);if(y){const{transitionEnd:g,transition:S,...v}=y;for(const x in v){let w=v[x];if(Array.isArray(w)){const M=u?w.length-1:0;w=w[M]}w!==null&&(s[x]=w)}for(const x in g)s[x]=g[x]}}}return s}function cr(e,t,n){var r;const{style:s}=e,o={};for(const i in s)(ne(s[i])||t.style&&ne(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:cr,createRenderState:rr})};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:Jn(s),t.attrs[s])}function io(e,t,n){const r=cr(e,t,n);for(const s in e)if(ne(e[s])||ne(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(()=>{or(r,s,ir(n.tagName),e.transformTemplate),oo(n,r)})})}})};function cu(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const i={...sr(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 ar(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!!(ne(e)&&e.add)}function ur(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),dr=ho(po),mo=fo(dr),go=e=>(e*=2)<1?.5*dr(e):.5*(2-Math.pow(2,-10*(e-1))),fr=e=>1-Math.sin(Math.acos(e)),yo=ho(fr),vo=fo(fr),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,hr=/-?(?:\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,pr=(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(hr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},xu=e=>Te(0,255,e),mr={...ut,transform:e=>Math.round(xu(e))},Xe={test:pr("rgb","red"),parse:bo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+mr.transform(e)+", "+mr.transform(t)+", "+mr.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 gr={test:pr("#"),parse:bu,transform:Xe.transform},dt={test:pr("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))+")"},re={test:e=>Xe.test(e)||gr.test(e)||dt.test(e),parse:e=>Xe.test(e)?Xe.parse(e):dt.test(e)?dt.parse(e):gr.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(hr))===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=>(re.test(l)?(r.color.push(o),s.push(wo),n.push(re.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+=re.transform(s[i]):o+=s[i]}return o}}const Eu=e=>typeof e=="number"?0:e;function _u(e){const t=To(e);return Po(e)(t.map(Eu))}const Ve={test:wu,parse:To,createTransformer:Po,getAnimatableNone:_u},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(hr)||[];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,yr={...Ve,getAnimatableNone:e=>{const t=e.match(Lu);return t?t.map(Mu).join(" "):e}},Du={...tr,color:re,backgroundColor:re,outlineColor:re,fill:re,stroke:re,borderColor:re,borderTopColor:re,borderRightColor:re,borderBottomColor:re,borderLeftColor:re,filter:yr,WebkitFilter:yr},Eo=e=>Du[e];function _o(e,t){let n=Eo(e);return n!==yr&&(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]=_o(n,s)}const We=e=>e*180/Math.PI,vr=e=>{const t=We(Math.atan2(e[1],e[0]));return xr(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:vr,rotateZ:vr,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},xr=e=>(e=e%360,e<0&&(e+=360),e),Ao=vr,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=>xr(We(Math.atan2(e[6],e[5]))),rotateY:e=>xr(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 br(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 br(n,t)};function Iu(e){return parseFloat(e.trim())}const Oo=e=>e===ut||e===D,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})=>br(t,"x"),y:(e,{transform:t})=>br(t,"y")};ft.translateX=ft.x,ft.translateY=ft.y;const Ke=new Set;let Sr=!1,wr=!1;function ko(){if(wr){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)})}wr=!1,Sr=!1,Ke.forEach(e=>e.complete()),Ke.clear()}function jo(){Ke.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wr=!0)})}function $u(){jo(),ko()}class Cr{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),Sr||(Sr=!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 er(s)?No(s,t,n+1):s}const Io=e=>t=>t.test(e),Ro=[ut,D,Se,je,$c,Bc,{test:e=>e==="auto",parse:e=>e}],Fo=e=>Ro.find(Io(e));class Bo extends Cr{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(),er(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"||Un(n))&&r}const Gu=e=>e!==null;function fn(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(fn(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 Tr(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=Tr(l,a,e+1/3),o=Tr(l,a,e),i=Tr(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function hn(e,t){return n=>n>0?t:e}const Pr=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Yu=[gr,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 hn(e,t);const s={...n};return o=>(s.red=Pr(n.red,r.red,o),s.green=Pr(n.green,r.green,o),s.blue=Pr(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 _r(e){return typeof e=="number"?ed:typeof e=="string"?er(e)?hn:re.test(e)?Xo:rd:Array.isArray(e)?Wo:typeof e=="object"?re.test(e)?Xo:td:hn}function Wo(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>_r(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]=_r(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.`),hn(e,t))};function Ko(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?W(e,t,n):_r(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=Ar(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=Ar(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 Ar(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)),S=i-o,v=Ce(Math.sqrt(l/u)),x=Math.abs(S)<5;r||(r=x?K.restSpeed.granular:K.restSpeed.default),s||(s=x?K.restDelta.granular:K.restDelta.default);let w;if(g<1){const P=Ar(v,g);w=L=>{const T=Math.exp(-g*v*L);return i-T*((y+g*v*S)/P*Math.sin(P*L)+S*Math.cos(P*L))}}else if(g===1)w=P=>i-Math.exp(-v*P)*(S+(y+v*S)*P);else{const P=v*Math.sqrt(g*g-1);w=L=>{const T=Math.exp(-g*v*L),A=Math.min(P*L,300);return i-T*((y+g*v*S)*Math.sinh(A)+P*S*Math.cosh(A))/P}}const M={calculatedDuration:p&&d||null,next:P=>{const L=w(P);if(p)a.done=P>=d;else{let T=0;g<1&&(T=P===0?xe(y):Go(w,P,L));const A=Math.abs(T)<=r,V=Math.abs(i-L)<=s;a.done=A&&V}return a.value=a.done?i:L,a},toString:()=>{const P=Math.min(Cs(M),zn),L=Ps(T=>M.next(P*T).value,P,30);return P+"ms "+L}};return M}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 S=d+g,v=i===void 0?S:i(S);v!==S&&(g=v-d);const x=A=>-g*Math.exp(-A/r),w=A=>v+x(A),M=A=>{const V=x(A),E=w(A);f.done=Math.abs(V)<=c,f.value=f.done?v:E};let P,L;const T=A=>{p(f.value)&&(P=A,L=Yo({keyframes:[f.value,y(f.value)],velocity:Go(w,A,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:A=>{let V=!1;return!L&&P===void 0&&(V=!0,M(A),T(A)),P!==void 0&&A>=P?L.next(A-P):(!V&&M(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:fr,circInOut:vo,circOut:yo,backIn:dr,backInOut:mo,backOut:po,anticipate:go},ei=e=>{if(Xn(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:()=>ee.isProcessing?ee.timestamp:be.now()}},Sd={decay:Zo,inertia:Zo,tween:Bt,keyframes:Bt,spring:Yo},wd=e=>e/100;class Mr 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)||Cr,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=Un(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: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),x=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let w=this.currentTime,M=o;if(p){const A=Math.min(this.currentTime,u)/d;let V=Math.floor(A),E=A%1;!E&&A>=1&&(E=1),E===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(y==="reverse"?(E=1-E,g&&(E-=g/d)):y==="mirror"&&(M=i)),w=Te(0,1,E)*d}const P=x?{done:!1,value:l[0]}:M.next(w);a&&(P.value=a(P.value));let{done:L}=P;!x&&c!==null&&(L=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return T&&s!==void 0&&(P.value=fn(l,this.options,s)),S&&S(P.value),T&&this.finish(),P}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=_s(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=Fn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),pn=10,Ed=2e4;function _d(e){return Un(e.type)||e.type==="spring"||!Es(e.ease)}function Ad(e,t){const n=new Mr({...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<Ed;)r=n.sample(o),s.push(r.value),o+=pn;return{times:void 0,keyframes:s,duration:o-pn,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"&&nn()&&Md(o)&&(o=ti[o]),_d(this.options)){const{onComplete:d,onUpdate:f,motionValue:p,element:y,...g}=this.options,S=Ad(t,g);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,s=S.times,o=S.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(fn(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 Mr({...p,keyframes:r,duration:s,type:o,ease:i,times:a,isGenerator:!0}),g=xe(this.time);c.setWithVelocity(y.sample(g-pn).value,y.sample(g).value,pn)}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 Lr=(e,t,n,r={},s,o)=>i=>{const a=$n(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=fn(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 Mr(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,...$n(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)}}ur(e,d),f.start(Lr(d,f,p,e.shouldReduceMotion&&lo.has(d)?{type:!1}:y,e,g));const S=f.animation;S&&c.push(S)}return a&&Promise.all(c).then(()=>{$.update(()=>{a&&du(e,a)})}),c}function Dr(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(Dr(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=>Dr(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Dr(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=Zn.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=Zn[n],s=e.props[r];(Dt(s)||s===!1)&&(t[r]=s)}return t}const $d=[...Yn].reverse(),zd=Yn.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 S=0;S<zd;S++){const v=$d[S],x=n[v],w=c[v]!==void 0?c[v]:u[v],M=Dt(w),P=v===l?x.isActive:null;P===!1&&(y=S);let L=w===u[v]&&w!==c[v]&&M;if(L&&r&&e.manuallyAnimateOnMount&&(L=!1),x.protectedKeys={...p},!x.isActive&&P===null||!w&&!x.prevProp||ln(w)||typeof w=="boolean")continue;const T=Wd(x.prevProp,w);let A=T||v===l&&x.isActive&&!L&&M||S>y&&M,V=!1;const E=Array.isArray(w)?w:[w];let U=E.reduce(s(v),{});P===!1&&(U={});const{prevResolvedValues:z={}}=x,oe={...z,...U},he=H=>{A=!0,f.has(H)&&(V=!0,f.delete(H)),x.needsAnimating[H]=!0;const k=e.getValue(H);k&&(k.liveStyle=!1)};for(const H in oe){const k=U[H],F=z[H];if(p.hasOwnProperty(H))continue;let X=!1;lr(k)&&lr(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=w,x.prevResolvedValues=U,x.isActive&&(p={...p,...U}),r&&e.blockInitialAnimation&&(A=!1),A&&(!(L&&T)||V)&&d.push(...E.map(H=>({animation:H,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 x=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),S[v]=x??null}),d.push({animation:S})}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();ln(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=>Hn(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 se(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=se(n)/se(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+se(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+se(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 Or(e){return e===void 0||e===1}function kr({scale:e,scaleX:t,scaleY:n}){return!Or(e)||!Or(t)||!Or(n)}function He(e){return kr(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 mn(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=mn(e,s,r)),mn(e,n,r)+t}function jr(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}){jr(e.x,t.translate,t.scale,t.originPoint),jr(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);jr(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=Nr(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}=ee;this.history.push({...y,timestamp:g});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=Vr(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 S=Nr(d.type==="pointercancel"?this.lastMoveEventInfo:Vr(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,S),y&&y(d,S)},!Hn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const i=zt(t),a=Vr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=ee;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Nr(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 Vr(e,t){return t?{point:t(e.point)}:e}function Ei(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nr({point:e},t){return{point:e,delta:Ei(e,_i(t)),offset:Ei(e,cf(t)),velocity:uf(t,.1)}}function cf(e){return e[0]}function _i(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=_i(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=se(e),s=se(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 Ir=.35;function gf(e=Ir){return e===!1?e=0:e===!0&&(e=Ir),{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(S=>{let v=this.getAxisMotionValue(S).get()||0;if(Se.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[S];w&&(v=se(w)*(parseFloat(v)/100))}}this.originPoint[S]=v}),y&&$.postRender(()=>y(u,d)),ur(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:S}=d;if(p&&this.currentDirection===null){this.currentDirection=xf(S),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),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||!gn(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&<(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(!gn(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 ur(this.visualElement,t),r.start(Lr(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(!gn(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(!gn(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=Ir,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function gn(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 yn={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(D.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()})),yn.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(),Gn.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=ne(e)?e:Lt(e);return r.start(Lr("",r,t,n)),r.animation}function Ef(e){return e instanceof SVGElement&&e.tagName!=="svg"}const _f=(e,t)=>e.depth-t.depth;class Af{constructor(){this.children=[],this.isDirty=!1}add(t){In(this.children,t),this.isDirty=!0}remove(t){Rn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_f),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"||D.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=mn(e,1/n,r),s!==void 0&&(e=mn(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 se(e.x)/se(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){In(this.members,t),t.scheduleRender()}remove(t){if(Rn(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 Rr=["","X","Y","Z"],Bf={visibility:"hidden"},Ji=1e3;let $f=0;function Fr(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 Bn),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=Ef(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),yn.hasAnimatedSinceResize&&(yn.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:S,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!qi(this.targetLayout,y),w=!f&&p;if(this.options.layoutRoot||this.resumeFrom||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const M={...$n(g,"layout"),onPlay:S,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M)}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();ee.delta=Te(0,1e3/60,a-ee.timestamp),ee.timestamp=a,ee.isProcessing=!0,Kn.update.process(ee),Kn.preRender.process(ee),Kn.render.process(ee),ee.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gn.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&&!se(this.snapshot.measuredBox.x)&&!se(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;kr(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!==ee.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=ee.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||kr(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===ee.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,S=this.getStack(),v=!S||S.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(eh));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const P=M/1e3;ra(d.x,i.x,P),ra(d.y,i.y,P),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,P),w&&If(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=G()),fe(w,this.relativeTarget)),g&&(this.animationValues=u,Df(u,c,this.latestValues,P,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},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(()=>{yn.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=se(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=se(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&&Fr("z",i,c,this.animationValues);for(let u=0;u<Rr.length;u++)Fr(`rotate${Rr[u]}`,i,c,this.animationValues),Fr(`skew${Rr[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=dn(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=dn(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:S,applyTo:v,isCSSVariable:x}=Ot[g],w=c.transform==="none"?f[g]:S(f[g],d);if(v){const M=v.length;for(let P=0;P<M;P++)c[v[P]]=w}else x?this.options.visualElement.renderState.vars[g]=w:c[g]=w}return this.options.layoutId&&(c.pointerEvents=d===this?dn(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=se(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=se(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}),Br={current:void 0},ca=ea({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Br.current){const e=new sh({});e.mount(window),e.setOptions({layoutScroll:!0}),Br.current=e}return Br.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 $r=new WeakMap,zr=new WeakMap,ch=e=>{const t=$r.get(e.target);t&&t(e)},uh=e=>{e.forEach(ch)};function dh({root:e,...t}){const n=e||document;zr.has(n)||zr.set(n,{});const r=zr.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 $r.set(e,n),r.observe(e),()=>{$r.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}},Ur={current:null},fa={current:!1};function vh(){if(fa.current=!0,!!Vn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ur.current=e.matches;e.addListener(t),t()}else Ur.current=!1}const xh=[...Ro,re,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(ne(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&tn(s.version==="12.5.0",`Attempting to mix Motion versions ${s.version} with 12.5.0 may not work as expected.`);else if(ne(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=Cr,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=cn(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&&ne(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:Ur.current,process.env.NODE_ENV!=="production"&&tn(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=_o(t,n)),this.setBaseTarget(t,ne(s)?s.get():s)),ne(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=ar(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&&!ne(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 Bn),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;ne(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=(Qn(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){nr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return cr(t,n,r)}}class Eh 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=Eo(n);return r&&r.default||0}return n=so.has(n)?n:Jn(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){or(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){oo(t,n,r,s)}mount(t){this.isSVGTag=ir(t.tagName),super.mount(t)}}const _h=(e,t)=>sr(e)?new Eh(t):new Ph(t,{allowProjection:e!==m.Fragment}),Ah=cu({...qd,...gh,...oh,...yh},_h),qe=Ec(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.",Xr="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,Wr={lat:45.4642,lng:9.19};function Pe(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Ee(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 Fh(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,S=e||"a",v=Ie(f)??[],x=o?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},M=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return b.jsx(g,{className:Y(Mh.root,"dyn-locator__"+Ee(ya),Pe(s),...v),"data-variant":r,...d?{style:d}:{},...x,...f,children:b.jsx(S,{ref:p,href:a,target:l,rel:M,...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__"+Ee(ba),_t.root,Pe(o),...l??[]),children:[b.jsxs("header",{className:_t.header,children:[b.jsx(Gl,{size:28,color:"currentColor",className:_t.icon})," ",b.jsx("h3",{children:e})]}),b.jsxs("div",{className:_t.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:_t.content,children:b.jsx("pre",{children:s})})]})]})}Sa.displayName=ba;const wa=Sa;class Bh 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},_e={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 $h(e){return m.isValidElement(e)||typeof e=="function"}function zh(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function Uh(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}=Yh();function S(w){if(zh(w)){const M=typeof w=="string"?w:w.name;return g[M]?m.createElement(g[M],{...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 "'+M+'"!'}return Uh(w)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),b.jsx("img",{...n?{ref:n}:{},src:w.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__"+Ee(Ta),Pe(a),...v),...u?{style:u}:{},"data-variant":i,"data-size":s,...o?{"data-radius":o}:{},...x,...d,children:S(t)})}Pa.displayName=Ta;const Re=m.forwardRef(Pa),Ea="Tag";function _a({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__"+Ee(Ea),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:$h(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})]})})}_a.displayName=Ea;const Xh=m.forwardRef(_a),Wh={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,S=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(Wh.root,"dyn-locator__"+Ee(Aa),Pe(n),...S),"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__"+Ee(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 Kh=m.forwardRef(Oa);function ka(e){const{componentMap:t}=Zh();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(Kh,{ref:l,variant:"bare",clickable:!0,className:Y("dyn-locator__"+Ee(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:_e.root,children:[b.jsxs("header",{className:_e.header,children:[t?b.jsx("time",{children:new Date(t).toLocaleDateString("it",{day:"numeric",month:"long",year:"numeric"})}):null,b.jsxs("div",{className:_e.titleContainer,children:[e?b.jsx("h4",{children:e}):null,b.jsx(vt,{className:_e.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:_e.body,children:r.map((u,d)=>{var f;return b.jsxs("div",{className:_e.capabilities,children:[b.jsx("h5",{children:u==null?void 0:u.title}),b.jsx("ul",{className:_e.tagContainer,children:(f=u==null?void 0:u.capabilities)==null?void 0:f.map((p,y)=>b.jsx(Xh,{as:"li",animationDelay:+`.${y+1}`,className:_e.tag,children:p.label},y))})]},d)})}):null,o!=null&&o.length?b.jsx("div",{className:_e.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 Gh=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 S=e||(u?"a":"button"),v=l?qe[S]:S,x=Ie(y)??[],w=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},M=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return b.jsx(v,{ref:g,className:Y(Na.root,"dyn-locator__"+Ee(Ia),Pe(n),...x),"data-variant":r,"data-size":s,"data-full-width":a,disabled:o||i,...p?{style:p}:{},...w,...M,...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:Gh,ctaButton:Hr},Hh={iconMap:Ca,componentMap:Fa},qr=m.createContext(Hh);function qh({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 Yh(){const{iconMap:e}=m.useContext(qr);return{iconMap:e}}function Zh(){const{componentMap:e}=m.useContext(qr);return{componentMap:e}}var vn=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(vn||{});const Ba=m.createContext({endpointMap:{},apiUrl:""});function Jh({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 Qh(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 ep={data:""},tp=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||ep,np=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,rp=/\/\*[^]*?\*\/| +/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},sp=(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=np.exec(c.replace(rp,""));)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},op=(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 xn(e){let t=this||{},n=e.call?e(t.p):e;return sp(n.unshift?n.raw?op(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,tp(t.target),t.g,t.o,t.k)}let Ua,Yr,Zr;xn.bind({g:1});let Me=xn.bind({k:1});function ip(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=xn.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 ap=e=>typeof e=="function",bn=(e,t)=>ap(e)?e(t):e,lp=(()=>{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}})(),cp=20,Wa=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,cp)};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}))}}},Sn=[],Ye={toasts:[],pausedAt:void 0},Ze=e=>{Ye=Wa(Ye,e),Sn.forEach(t=>{t(Ye)})},up={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},dp=(e={})=>{let[t,n]=m.useState(Ye),r=m.useRef(Ye);m.useEffect(()=>(r.current!==Ye&&n(Ye),Sn.push(n),()=>{let o=Sn.indexOf(n);o>-1&&Sn.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)||up[o.type],style:{...e.style,...(l=e[o.type])==null?void 0:l.style,...o.style}}});return{...t,toasts:s}},fp=(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)||lp()}),Gt=e=>(t,n)=>{let r=fp(t,e,n);return Ze({type:2,toast:r}),r.id},Z=(e,t)=>Gt("blank")(e,t);Z.error=Gt("error"),Z.success=Gt("success"),Z.loading=Gt("loading"),Z.custom=Gt("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?bn(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?bn(t.error,s):void 0;o?Z.error(o,{id:r,...n,...n==null?void 0:n.error}):Z.dismiss(r)}),e};var hp=(e,t)=>{Ze({type:1,toast:{id:e,height:t}})},pp=()=>{Ze({type:5,time:Date.now()})},Ht=new Map,mp=1e3,gp=(e,t=mp)=>{if(Ht.has(e))return;let n=setTimeout(()=>{Ht.delete(e),Ze({type:4,toastId:e})},t);Ht.set(e,n)},yp=e=>{let{toasts:t,pausedAt:n}=dp(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)gp(o.id,o.removeDelay);else{let i=Ht.get(o.id);i&&(clearTimeout(i),Ht.delete(o.id))}})},[t]),{toasts:t,handlers:{updateHeight:hp,startPause:pp,endPause:r,calculateOffset:s}}},vp=Me`
|
|
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&<(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&<(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`
|
|
114
114
|
from {
|
|
115
115
|
transform: scale(0) rotate(45deg);
|
|
116
116
|
opacity: 0;
|
|
@@ -118,7 +118,7 @@ from {
|
|
|
118
118
|
to {
|
|
119
119
|
transform: scale(1) rotate(45deg);
|
|
120
120
|
opacity: 1;
|
|
121
|
-
}`,
|
|
121
|
+
}`,bp=Me`
|
|
122
122
|
from {
|
|
123
123
|
transform: scale(0);
|
|
124
124
|
opacity: 0;
|
|
@@ -126,7 +126,7 @@ from {
|
|
|
126
126
|
to {
|
|
127
127
|
transform: scale(1);
|
|
128
128
|
opacity: 1;
|
|
129
|
-
}`,
|
|
129
|
+
}`,Sp=Me`
|
|
130
130
|
from {
|
|
131
131
|
transform: scale(0) rotate(90deg);
|
|
132
132
|
opacity: 0;
|
|
@@ -134,7 +134,7 @@ from {
|
|
|
134
134
|
to {
|
|
135
135
|
transform: scale(1) rotate(90deg);
|
|
136
136
|
opacity: 1;
|
|
137
|
-
}`,
|
|
137
|
+
}`,wp=Be("div")`
|
|
138
138
|
width: 20px;
|
|
139
139
|
opacity: 0;
|
|
140
140
|
height: 20px;
|
|
@@ -143,14 +143,14 @@ to {
|
|
|
143
143
|
position: relative;
|
|
144
144
|
transform: rotate(45deg);
|
|
145
145
|
|
|
146
|
-
animation: ${
|
|
146
|
+
animation: ${xp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
147
147
|
forwards;
|
|
148
148
|
animation-delay: 100ms;
|
|
149
149
|
|
|
150
150
|
&:after,
|
|
151
151
|
&:before {
|
|
152
152
|
content: '';
|
|
153
|
-
animation: ${
|
|
153
|
+
animation: ${bp} 0.15s ease-out forwards;
|
|
154
154
|
animation-delay: 150ms;
|
|
155
155
|
position: absolute;
|
|
156
156
|
border-radius: 3px;
|
|
@@ -163,18 +163,18 @@ to {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
&:before {
|
|
166
|
-
animation: ${
|
|
166
|
+
animation: ${Sp} 0.15s ease-out forwards;
|
|
167
167
|
animation-delay: 180ms;
|
|
168
168
|
transform: rotate(90deg);
|
|
169
169
|
}
|
|
170
|
-
`,
|
|
170
|
+
`,Cp=Me`
|
|
171
171
|
from {
|
|
172
172
|
transform: rotate(0deg);
|
|
173
173
|
}
|
|
174
174
|
to {
|
|
175
175
|
transform: rotate(360deg);
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
177
|
+
`,Tp=Be("div")`
|
|
178
178
|
width: 12px;
|
|
179
179
|
height: 12px;
|
|
180
180
|
box-sizing: border-box;
|
|
@@ -182,8 +182,8 @@ to {
|
|
|
182
182
|
border-radius: 100%;
|
|
183
183
|
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
184
184
|
border-right-color: ${e=>e.primary||"#616161"};
|
|
185
|
-
animation: ${
|
|
186
|
-
`,
|
|
185
|
+
animation: ${Cp} 1s linear infinite;
|
|
186
|
+
`,Pp=Me`
|
|
187
187
|
from {
|
|
188
188
|
transform: scale(0) rotate(45deg);
|
|
189
189
|
opacity: 0;
|
|
@@ -191,7 +191,7 @@ from {
|
|
|
191
191
|
to {
|
|
192
192
|
transform: scale(1) rotate(45deg);
|
|
193
193
|
opacity: 1;
|
|
194
|
-
}`,
|
|
194
|
+
}`,_p=Me`
|
|
195
195
|
0% {
|
|
196
196
|
height: 0;
|
|
197
197
|
width: 0;
|
|
@@ -214,13 +214,13 @@ to {
|
|
|
214
214
|
position: relative;
|
|
215
215
|
transform: rotate(45deg);
|
|
216
216
|
|
|
217
|
-
animation: ${
|
|
217
|
+
animation: ${Pp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
218
218
|
forwards;
|
|
219
219
|
animation-delay: 100ms;
|
|
220
220
|
&:after {
|
|
221
221
|
content: '';
|
|
222
222
|
box-sizing: border-box;
|
|
223
|
-
animation: ${
|
|
223
|
+
animation: ${_p} 0.2s ease-out forwards;
|
|
224
224
|
opacity: 0;
|
|
225
225
|
animation-delay: 200ms;
|
|
226
226
|
position: absolute;
|
|
@@ -232,16 +232,16 @@ to {
|
|
|
232
232
|
height: 10px;
|
|
233
233
|
width: 6px;
|
|
234
234
|
}
|
|
235
|
-
`,_p=Be("div")`
|
|
236
|
-
position: absolute;
|
|
237
235
|
`,Ap=Be("div")`
|
|
236
|
+
position: absolute;
|
|
237
|
+
`,Mp=Be("div")`
|
|
238
238
|
position: relative;
|
|
239
239
|
display: flex;
|
|
240
240
|
justify-content: center;
|
|
241
241
|
align-items: center;
|
|
242
242
|
min-width: 20px;
|
|
243
243
|
min-height: 20px;
|
|
244
|
-
`,
|
|
244
|
+
`,Lp=Me`
|
|
245
245
|
from {
|
|
246
246
|
transform: scale(0.6);
|
|
247
247
|
opacity: 0.4;
|
|
@@ -249,20 +249,20 @@ from {
|
|
|
249
249
|
to {
|
|
250
250
|
transform: scale(1);
|
|
251
251
|
opacity: 1;
|
|
252
|
-
}`,
|
|
252
|
+
}`,Dp=Be("div")`
|
|
253
253
|
position: relative;
|
|
254
254
|
transform: scale(0.6);
|
|
255
255
|
opacity: 0.4;
|
|
256
256
|
min-width: 20px;
|
|
257
|
-
animation: ${
|
|
257
|
+
animation: ${Lp} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
258
258
|
forwards;
|
|
259
|
-
`,
|
|
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=>`
|
|
260
260
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
261
261
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
262
|
-
`,
|
|
262
|
+
`,jp=e=>`
|
|
263
263
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
264
264
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
265
|
-
`,
|
|
265
|
+
`,Vp="0%{opacity:0;} 100%{opacity:1;}",Np="0%{opacity:1;} 100%{opacity:0;}",Ip=Be("div")`
|
|
266
266
|
display: flex;
|
|
267
267
|
align-items: center;
|
|
268
268
|
background: #fff;
|
|
@@ -274,17 +274,17 @@ to {
|
|
|
274
274
|
pointer-events: auto;
|
|
275
275
|
padding: 8px 10px;
|
|
276
276
|
border-radius: 8px;
|
|
277
|
-
`,
|
|
277
|
+
`,Rp=Be("div")`
|
|
278
278
|
display: flex;
|
|
279
279
|
justify-content: center;
|
|
280
280
|
margin: 4px 10px;
|
|
281
281
|
color: inherit;
|
|
282
282
|
flex: 1 1 auto;
|
|
283
283
|
white-space: pre-line;
|
|
284
|
-
`,
|
|
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`
|
|
285
285
|
z-index: 9999;
|
|
286
286
|
> * {
|
|
287
287
|
pointer-events: auto;
|
|
288
288
|
}
|
|
289
|
-
`,wn=16,zp=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,containerStyle:o,containerClassName:i})=>{let{toasts:a,handlers:l}=yp(n);return Q.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:wn,left:wn,right:wn,bottom:wn,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=Bp(u,d);return Q.createElement(Fp,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?$p:"",style:f},c.type==="custom"?bn(c.message,c):s?s(c):Q.createElement(Ka,{toast:c,position:u}))}))};const Up={root:"_root_movxa_4"};function Ga({className:e,children:t,show:n=!0,variant:r="light",...s}){const o=Y("dyn-locator__overlay",Up.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}=Qh(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 Xp({children:e,customComponents:t,customIcons:n,featureFlags:r,fetchLocations:s,localizationConfig:o,locations:i=[],mapId:a}){const l=I(E=>E.isFullscreen),c=I(E=>E.setLocations),u=I(E=>E.setMapId),d=I(E=>E.setFeatureFlags),f=I(E=>E.setLocalizationConfig),p=I(E=>E.setMapDetail),y=I(E=>E.shouldRefetch),g=I(E=>E.setShouldRefetch),{request:S,loading:v,error:x}=Jr(vn.CLUSTERS),{request:w,loading:M,error:P}=Jr(vn.MARKERS),L=v||M,T=!!x||!!P;async function A(E){var U;try{if(typeof E!="number"||E<0||isNaN(E))throw new Error("No map ID provided");const{data:z}=await S({mapId:String(E)})??{};if(!z)throw new Error("No cluster data received from the server");c((U=z.map)==null?void 0:U.call(z,oe=>({...oe,onMarkerClick:async()=>{await V(E,oe.id)}})))}catch(z){console.error("Error fetching clusters: ",z),Z.error(gt+Xr),c([])}}async function V(E,U){try{if(typeof E!="number"||E<0||isNaN(E))throw new Error("No map ID provided");const{data:z}=await w({mapId:String(E),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+Xr),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(E=>c(E)):A(a)},[]),m.useEffect(()=>{let E=!0;return y&&a&&A(a).finally(()=>{E&&g(!1)}),()=>{E=!1}},[y,a]),b.jsx("div",{id:"dyn-locator",className:Y("dyn-locator__locator",gs.root),"data-fullscreen":l,children:b.jsxs(qh,{customIcons:n,customComponents:t,children:[e,b.jsxs(Ga,{show:L||T,variant:"light",children:[L?b.jsx(Et,{size:"large"}):null,T?b.jsx(wa,{title:Dh,message:Xr,actionText:"ricaricare la pagina.",errorDetails:(x==null?void 0:x.message)||(P==null?void 0:P.message),onAction:E=>{E.preventDefault(),window.location.reload()}}):null]}),b.jsx(zp,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:E=>b.jsx(Ka,{toast:E,children:({icon:U,message:z})=>b.jsxs(b.Fragment,{children:[U,z,E.type==="error"&&b.jsx(vt,{variant:"bare",onClick:()=>Z.dismiss(E.id),children:b.jsx(Re,{icon:"Close"})})]})})})]})})}function Ha({mapProvider:e,endpoints:t,apiUrl:n,children:r,...s}){return b.jsx(Bh,{children:b.jsx(Ol,{children:b.jsx(Rl,{mapProvider:e,children:b.jsx(Jh,{endpoints:t,apiUrl:n,children:b.jsx(Xp,{children:r,...s})})})})})}Ha.displayName="Locator";var Qr,qa;function Wp(){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 Kp=Wp();const Gp=ls(Kp);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 Hp(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 qp(e){var t=Hp(e,"string");return typeof t=="symbol"?t:t+""}const ue={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Yp="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=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=Yp+"?"+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)}}qt.loadingStatus=ue.NOT_LOADED,qt.serializedApiParams=void 0,qt.listeners=[];const Zp=["onLoad","onError","apiKey","version","libraries"],Jp=["children"],Qp="GMP_visgl_rgmlibrary_v1_default",Yt=m.createContext(null);function em(){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(qp)))},clearMapInstances:()=>{t({})}}}function tm(e){const{onLoad:t,onError:n,apiKey:r,version:s,libraries:o=[]}=e,i=Je(e,Zp),[a,l]=m.useState(qt.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 S=await window.google.maps.importLibrary(y);return u({name:y,value:S}),S},[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=Qp:y.solutionChannel===""&&delete y.solutionChannel,await qt.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 nm=e=>{const{children:t}=e,n=Je(e,Jp),{mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i}=em(),{status:a,loadedLibraries:l,importLibrary:c}=tm(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(Yt.Provider,{value:u},t)};function rm(e,t){for(const n of am){const r=t[n],s=Ya[n];m.useEffect(()=>{if(!e||!r)return;const o=google.maps.event.addListener(e,s,i=>{r(sm(s,e,i))});return()=>o.remove()},[e,s,r])}}function sm(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(om.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(im.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"},om=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],im=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],am=Object.keys(Ya);function es(e,t){const n=m.useRef(void 0);(!n.current||!Gp(t,n.current))&&(n.current=t),m.useEffect(e,n.current)}const lm=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 cm(e,t){const n={},r=Object.keys(t);for(const s of r)lm.has(s)&&(n[s]=t[s]);es(()=>{e&&e.setOptions(n)},[n])}function ts(){var e;return((e=m.useContext(Yt))==null?void 0:e.status)||ue.NOT_LOADED}function um(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 dm(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 dm(e)?e:e.toJSON()}function fm(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 hm=()=>{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 pm(){const[e,t]=m.useState(null),n=m.useCallback(r=>t(r),[t]);return[e,n]}function Ja(){return ts()===ue.LOADED}function mm(){const[,e]=m.useReducer(t=>t+1,0);return e}function gm(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 ym(e){const t=mm(),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",()=>{gm(e,n),t()});return()=>r.remove()},[e,t]),n}const vm=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],xm=["padding"];class Cn{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)}}Cn.entries={};function bm(e,t){const n=Ja(),[r,s]=m.useState(null),[o,i]=pm(),a=ym(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:p,reuseMaps:y,renderingType:g,colorScheme:S}=e,v=Je(e,vm),x=e.zoom!==void 0||e.defaultZoom!==void 0,w=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!x||!w)&&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 P of Object.keys(v))v[P]===void 0&&delete v[P];const M=m.useRef(void 0);return m.useEffect(()=>{if(!o||!n)return;const{addMapInstance:P,removeMapInstance:L}=t,{mapId:T}=e,A=`${T||"default"}:${g||"default"}:${S||"LIGHT"}`;let V,E;if(y&&Cn.has(A)?(E=Cn.pop(A),V=E.getDiv(),o.appendChild(V),E.setOptions(v),setTimeout(()=>E.setCenter(E.getCenter()),0)):(V=document.createElement("div"),V.style.height="100%",o.appendChild(V),E=new google.maps.Map(V,we({},v,g?{renderingType:g}:{},S?{colorScheme:S}:{}))),s(E),P(E,l),c){const{padding:U}=c,z=Je(c,xm);E.fitBounds(z,U)}else(!x||!w)&&E.fitBounds({east:180,west:-180,south:-90,north:90});if(M.current){const{mapId:U,cameraState:z}=M.current;U!==T&&E.setOptions(z)}return()=>{M.current={mapId:T,cameraState:a.current},V.remove(),y?Cn.push(A,E):google.maps.event.clearInstanceListeners(E),s(null),L(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(Yt),i=ts();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=bm(e,o);fm(a,c,e),rm(a,e),cm(a,e);const u=um(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,w,M,P,L;return{center:{lat:(x=p)!=null?x:0,lng:(w=y)!=null?w:0},zoom:(M=e.zoom)!=null?M:0,heading:(P=e.heading)!=null?P:0,tilt:(L=e.tilt)!=null?L: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 S=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?{}:S),className:r},m.createElement(hm,null)):m.createElement("div",we({ref:l,"data-testid":"map",style:r?void 0:S,className:r},n?{id:n}:{}),a?m.createElement(Qa.Provider,{value:v},t):null)};el.deckGLViewProps=!0;const tl=new Set;function Sm(...e){const t=JSON.stringify(e);tl.has(t)||(tl.add(t),console.error(...e))}const Tn=(e=null)=>{const t=m.useContext(Yt),{map:n}=m.useContext(Qa)||{};if(t===null)return Sm("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 Pn(e){const t=Ja(),n=m.useContext(Yt);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 wm(e){return e.content!==void 0}function Cm(e){return e.nodeType===Node.ELEMENT_NODE}const Tm=m.createContext(null),Pm={BOTTOM:["50%","100%"]},Em=({children:e,styles:t,className:n,anchorPoint:r})=>{const[s,o]=r??Pm.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 _m(e){const[t,n]=m.useState(null),[r,s]=m.useState(null),o=Tn(),i=Pn("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:p,onDragEnd:y,collisionBehavior:g,clickable:S,draggable:v,position:x,title:w,zIndex:M}=e,P=m.Children.count(a);return m.useEffect(()=>{if(!o||!i)return;const L=new i.AdvancedMarkerElement;L.map=o,n(L);let T=null;return P>0&&(T=document.createElement("div"),T.isCustomMarker=!0,L.content=T,s(T)),()=>{var A;L.map=null,(A=T)==null||A.remove(),n(null),s(null)}},[o,i,P]),m.useEffect(()=>{!t||!t.content||P>0||(t.content.className=c||"")},[t,c,P]),En(t,"position",x),En(t,"title",w??""),En(t,"zIndex",M),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 L=S!==void 0||!!l||!!u||!!d;t.gmpClickable=L,L&&t!=null&&t.content&&Cm(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,S,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]=_m(e),l=m.useMemo(()=>i?{marker:i}:null,[i]);return m.useImperativeHandle(t,()=>i,[i]),a?m.createElement(Tm.Provider,{value:l},Dn.createPortal(m.createElement(Em,{anchorPoint:o,styles:r,className:s},n),a)):null});function Am(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&&!Lm(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const Mm=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 Lm(e){return Mm.has(e)}const Dm=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Om=e=>{const{children:t,headerContent:n,style:r,className:s,pixelOffset:o,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=Je(e,Dm),d=Pn("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 w=new google.maps.InfoWindow(u);return w.setContent(y.current),p(w),()=>{var M,P;w.setContent(null),(M=y.current)==null||M.remove(),(P=g.current)==null||P.remove(),y.current=null,g.current=null,p(null)}},[d]);const S=m.useRef(null);m.useEffect(()=>{!f||!y.current||(Am(y.current,r||null,S.current),S.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=Tn();return es(()=>{if(!v||!f||i===null)return;const x=!!i,w={map:v};if(i&&(w.anchor=i,wm(i)&&i.content instanceof Element)){const P=i.content,L=P==null?void 0:P.getBoundingClientRect();if(L&&P!=null&&P.isCustomMarker){var M;const T=(M=i.content.firstElementChild)==null?void 0:M.firstElementChild,A=T==null?void 0:T.getBoundingClientRect(),V=A.x-L.x+(A.width-L.width)/2,E=A.y-L.y,U=u;U.pixelOffset=new google.maps.Size(o?o[0]+V:V,o?o[1]+E:E),f.setOptions(U)}}return a!==void 0&&(w.shouldFocus=a),f.open(w),()=>{x&&f.set("anchor",null),f.close()}},[f,i,v,a,u,o]),m.createElement(m.Fragment,null,y.current&&Dn.createPortal(t,y.current),g.current!==null&&Dn.createPortal(n,g.current))},km=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function jm(e){const[t,n]=m.useState(null),r=Tn(),{onClick:s,onDrag:o,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=Je(e,km),{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=jm(e);return m.useImperativeHandle(t,()=>n,[n]),m.createElement(m.Fragment,null)});function Vm(){const[e,t]=m.useState(null);return[m.useCallback(r=>{t(r)},[]),e]}const Qe={root:"_root_xftk3_10",header:"_header_xftk3_17",highlighted:"_highlighted_xftk3_30",body:"_body_xftk3_51"};function Nm({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,S)=>g==="{:1}"?b.jsx("span",{className:Qe.highlighted,children:s.length},S):g==="{:2}"?b.jsx("span",{className:Qe.highlighted,children:u},S):g),[u,s.length,d]);m.useEffect(()=>{if(i){const g=l.current[i];g!=null&&g.current&&g.current.scrollIntoView({behavior:"smooth",block:"start"})}},[i]);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"]}),n?b.jsx("div",{className:Qe.body,children:(y=s==null?void 0:s.map)==null?void 0:y.call(s,g=>{const S=g.id;l.current[S]||(l.current[S]=m.createRef());const v=l.current[S];return b.jsx(t,{ref:v,"data-active":i===g.id,onClick:p(g),...g},g.id)})}):null]})}const Zt={root:"_root_1l10e_4",loaderContainer:"_loaderContainer_1l10e_10",fullscreenButton:"_fullscreenButton_1l10e_17",backButton:"_backButton_1l10e_18"},_n={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function Im({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]=Vm(),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(Om,{anchor:u,headerContent:t,onClose:d,className:_n.root,children:[b.jsxs("header",{className:_n.header,children:[b.jsx("h6",{children:t}),b.jsx("address",{children:n})]}),b.jsx("div",{className:_n.body,children:b.jsxs("div",{className:_n.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 Rm(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function Fm(e){return"title"in e&&!("size"in e)}function Bm({zoom:e=ga,center:t={lat:Wr.lat,lng:Wr.lng}}){var L;const[n,r]=m.useState({zoom:e,center:t}),s=m.useRef(""),o=ts(),i=I(T=>T.locations),a=I(T=>T.featureFlags),l=I(T=>T.targetLocation),c=I(T=>T.clearTargetLocation),u=I(T=>T.mapDetail),d=I(T=>T.setMapDetail),f=I(T=>T.isFullscreen),p=I(T=>T.setFullscreen),y=I(T=>T.shouldRefetch),g=I(T=>T.setShouldRefetch),S=I(T=>T.setSelectedLocation),v=u===st.MARKER;function x({detail:T}){const{center:A,zoom:V}=T;r({center:A,zoom:V})}function w(T){r(A=>({center:T,zoom:A.zoom}))}function M(){d(st.CLUSTER),r({center:Wr,zoom:ga}),g(!0)}function P(T){if(Rm(T))return b.jsx(sl,{position:T.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:s.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(T.range??0)/Rh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await T.onMarkerClick(),r({center:T.coords,zoom:T.zoom||15})}},T.id);if(Fm(T))return b.jsx(Im,{id:T.id,title:T.title??"No title",address:T.address??"No address",coords:T.coords,actions:T.actions,onZoom:()=>r({center:T.coords,zoom:18}),onClick:()=>{S(T.id)}},T.id)}if(m.useEffect(()=>{s.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),m.useEffect(()=>{l&&(r({center:l.coords,zoom:l.zoom}),c())},[l,c]),o===ue.LOADING)return b.jsx("div",{className:Y("dyn-locator__map",Zt.root),children:b.jsx("div",{className:Zt.loaderContainer,children:b.jsx(Et,{size:"large"})})});if(o===ue.FAILED||o===ue.AUTH_FAILURE)throw new Error(jh);if(o===ue.LOADED)return b.jsxs("div",{className:Y("dyn-locator__map",Zt.root),children:[a.fullscreen?b.jsx(vt,{className:Y(Zt.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>p==null?void 0:p(!f),children:b.jsx(Re,{size:"M",icon:f?"Close":"Expand"})}):null,v?b.jsx(vt,{className:Y(Zt.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:M,children:b.jsx(Re,{size:"M",icon:"ArrowLeft"})}):null,b.jsx(el,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...n,onCameraChanged:x,children:!y&&((L=i==null?void 0:i.map)==null?void 0:L.call(i,P))}),v?b.jsx(Nm,{onLocationSelect:w}):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},S){const v=a?qe.div:"div",x=Ie(g)??[],w=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return b.jsxs(v,{className:Y("dyn-locator__"+Ee(ol),Le.root,Pe(t),...x??[]),"data-valid":s,"data-error":r,"data-expanded":u,"data-side-button":!!p,...f?{style:f}:{},...w,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:S,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 $m=m.forwardRef(il),et={root:"_root_1pdcn_7",input:"_input_1pdcn_7",clearButton:"_clearButton_1pdcn_10",sideOrnament:"_sideOrnament_1pdcn_13",predictionsContainer:"_predictionsContainer_1pdcn_18",predictionItem:"_predictionItem_1pdcn_28",loadingItem:"_loadingItem_1pdcn_46"};function zm(){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:S,loading:v}=Jr(vn.FIND),x=Pn("places"),w=Pn("geocoding"),M=Tn(),P=m.useRef(null),L=m.useRef(null),T=m.useRef(null),A=m.useRef(null);m.useEffect(()=>{w&&(T.current||(T.current=new w.Geocoder))},[w]),m.useEffect(()=>{x&&(P.current||(P.current=new x.AutocompleteService),A.current||(A.current=new x.AutocompleteSessionToken))},[x]),m.useEffect(()=>{!x||!M||L.current||(L.current=new x.PlacesService(M))},[x,M]);const V=async k=>{var F;if(!k||k.length<3){r([]),o(!1);return}a(!0);try{if(!x||!P.current)throw new Error("Places library or Autocomplete Service not available");const X=await P.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)}},E=m.useMemo(()=>Fh(k=>V(k),600),[V]),U=k=>{const F=k.currentTarget.value;if(t(F),!F||F.length<3){r([]),o(!1);return}E(F)},z=async k=>{var F,X,ye,ie,De;t(k.description),o(!1);try{if(!x||!L.current)throw new Error("Places library or Places Service not available");const te=await new Promise((ze,tt)=>{L.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=te==null?void 0:te.geometry)!=null&&F.location){const ze=(ye=(X=te.geometry.location).lat)==null?void 0:ye.call(X),tt=(De=(ie=te.geometry.location).lng)==null?void 0:De.call(ie);await bt({lat:ze,lng:tt})}}catch(te){console.error("Error getting place details:",te),Z.error(gt+kh)}finally{x&&(A.current=new x.AutocompleteSessionToken)}},oe=()=>{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(Et,{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((ie,De)=>{navigator.geolocation.getCurrentPosition(te=>ie(te),te=>De(te),{timeout:5e3})}),X={lat:F.coords.latitude,lng:F.coords.longitude};if(await bt(X),!w||!(T!=null&&T.current)||!M)throw new Error("Geocoding library or Geocoder not available");const ye=await new Promise((ie,De)=>{T.current.geocode({location:X},(te,ze)=>{ze===google.maps.GeocoderStatus.OK&&te&&te.length>0?ie(te):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:ie}=await S({mapId:u},{body:ye})??{};if(!ie)throw new Error("No locations found");d(ie),f(st.MARKER),p({lat:X,lng:F},15)}catch(ie){throw console.error("Error finding locations: ",ie),ie}}const H=v||l;return g?b.jsxs("div",{className:Y("dyn-locator__search",et.root),children:[b.jsx($m,{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:oe,"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(Et,{size:"medium"})})]}):null}function Um({children:e,apiKey:t,language:n,region:r,libraries:s}){return b.jsx(nm,{apiKey:t,region:r,language:n,libraries:s,children:e})}const Xm=Object.freeze(Object.defineProperty({__proto__:null,default:Um},Symbol.toStringTag,{value:"Module"}));function Wm(){throw new Error("Mapbox provider is not implemented yet")}const Km=Object.freeze(Object.defineProperty({__proto__:null,default:Wm},Symbol.toStringTag,{value:"Module"}));function Gm(){throw new Error("HERE Maps provider is not implemented yet")}const Hm=Object.freeze(Object.defineProperty({__proto__:null,default:Gm},Symbol.toStringTag,{value:"Module"}));ve.Map=Bm,ve.Search=zm,ve.default=Ha,Object.defineProperties(ve,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
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"}})});
|
|
290
290
|
//# sourceMappingURL=index.umd.js.map
|