@dynamo-caffeina-dev/locator-frontend 0.0.12 → 0.0.14
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/README.md +9 -3
- package/dist/{GoogleMapsProvider-CRHSYpue.js → GoogleMapsProvider-u8AIKumV.js} +2 -2
- package/dist/{GoogleMapsProvider-CRHSYpue.js.map → GoogleMapsProvider-u8AIKumV.js.map} +1 -1
- package/dist/index-CK193Zb_.js +9344 -0
- package/dist/index-CK193Zb_.js.map +1 -0
- package/dist/index.d.ts +18 -3
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +65 -55
- package/dist/index.umd.js.map +1 -1
- package/dist/locator-frontend.css +1 -1
- package/package.json +1 -1
- package/dist/index-Wh66GjtQ.js +0 -8952
- package/dist/index-Wh66GjtQ.js.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(be,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):(be=typeof globalThis<"u"?globalThis:be||self,m(be["@dynamo-caffeina-dev/locator-frontend"]={},be.React,be.ReactDOM))})(this,function(be,m,on){"use strict";function Tl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ee=Tl(m);function ur(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rn={exports:{}},Et={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var dr;function El(){if(dr)return Et;dr=1;var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,l,c){var u,d={},f=null,g=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(g=l.ref);for(u in l)o.call(l,u)&&!s.hasOwnProperty(u)&&(d[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:a,key:f,ref:g,props:d,_owner:r.current}}return Et.Fragment=n,Et.jsx=i,Et.jsxs=i,Et}var Pt={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,118 +14,128 @@
|
|
|
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
|
|
18
|
-
`+Ct+
|
|
19
|
-
`),
|
|
20
|
-
`),Z=
|
|
21
|
-
`+
|
|
17
|
+
*/var fr;function Pl(){return fr||(fr=1,process.env.NODE_ENV!=="production"&&function(){var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=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"),g=Symbol.for("react.offscreen"),h=Symbol.iterator,v="@@iterator";function S(p){if(p===null||typeof p!="object")return null;var _=h&&p[h]||p[v];return typeof _=="function"?_:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(p){{for(var _=arguments.length,E=new Array(_>1?_-1:0),O=1;O<_;O++)E[O-1]=arguments[O];C("error",p,E)}}function C(p,_,E){{var O=x.ReactDebugCurrentFrame,F=O.getStackAddendum();F!==""&&(_+="%s",E=E.concat([F]));var U=E.map(function(B){return String(B)});U.unshift("Warning: "+_),Function.prototype.apply.call(console[p],console,U)}}var P=!1,T=!1,M=!1,j=!1,A=!1,V;V=Symbol.for("react.module.reference");function N(p){return!!(typeof p=="string"||typeof p=="function"||p===o||p===s||A||p===r||p===c||p===u||j||p===g||P||T||M||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===d||p.$$typeof===i||p.$$typeof===a||p.$$typeof===l||p.$$typeof===V||p.getModuleId!==void 0))}function q(p,_,E){var O=p.displayName;if(O)return O;var F=_.displayName||_.name||"";return F!==""?E+"("+F+")":E}function le(p){return p.displayName||"Context"}function ce(p){if(p==null)return null;if(typeof p.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case o:return"Fragment";case n:return"Portal";case s:return"Profiler";case r:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case a:var _=p;return le(_)+".Consumer";case i:var E=p;return le(E._context)+".Provider";case l:return q(p,p.render,"ForwardRef");case d:var O=p.displayName||null;return O!==null?O:ce(p.type)||"Memo";case f:{var F=p,U=F._payload,B=F._init;try{return ce(B(U))}catch{return null}}}return null}var L=Object.assign,de=0,J,z,w,R,$,te,ne;function Ne(){}Ne.__reactDisabledLog=!0;function re(){{if(de===0){J=console.log,z=console.info,w=console.warn,R=console.error,$=console.group,te=console.groupCollapsed,ne=console.groupEnd;var p={configurable:!0,enumerable:!0,value:Ne,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}de++}}function Ke(){{if(de--,de===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},p,{value:J}),info:L({},p,{value:z}),warn:L({},p,{value:w}),error:L({},p,{value:R}),group:L({},p,{value:$}),groupCollapsed:L({},p,{value:te}),groupEnd:L({},p,{value:ne})})}de<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var at=x.ReactCurrentDispatcher,Ct;function lt(p,_,E){{if(Ct===void 0)try{throw Error()}catch(F){var O=F.stack.trim().match(/\n( *(at )?)/);Ct=O&&O[1]||""}return`
|
|
18
|
+
`+Ct+p}}var rr=!1,On;{var Dg=typeof WeakMap=="function"?WeakMap:Map;On=new Dg}function ul(p,_){if(!p||rr)return"";{var E=On.get(p);if(E!==void 0)return E}var O;rr=!0;var F=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var U;U=at.current,at.current=null,re();try{if(_){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(pe){O=pe}Reflect.construct(p,[],B)}else{try{B.call()}catch(pe){O=pe}p.call(B.prototype)}}else{try{throw Error()}catch(pe){O=pe}p()}}catch(pe){if(pe&&O&&typeof pe.stack=="string"){for(var I=pe.stack.split(`
|
|
19
|
+
`),fe=O.stack.split(`
|
|
20
|
+
`),Z=I.length-1,Q=fe.length-1;Z>=1&&Q>=0&&I[Z]!==fe[Q];)Q--;for(;Z>=1&&Q>=0;Z--,Q--)if(I[Z]!==fe[Q]){if(Z!==1||Q!==1)do if(Z--,Q--,Q<0||I[Z]!==fe[Q]){var ve=`
|
|
21
|
+
`+I[Z].replace(" at new "," at ");return p.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",p.displayName)),typeof p=="function"&&On.set(p,ve),ve}while(Z>=1&&Q>=0);break}}}finally{rr=!1,at.current=U,Ke(),Error.prepareStackTrace=F}var Tt=p?p.displayName||p.name:"",ct=Tt?lt(Tt):"";return typeof p=="function"&&On.set(p,ct),ct}function kg(p,_,E){return ul(p,!1)}function Og(p){var _=p.prototype;return!!(_&&_.isReactComponent)}function jn(p,_,E){if(p==null)return"";if(typeof p=="function")return ul(p,Og(p));if(typeof p=="string")return lt(p);switch(p){case c:return lt("Suspense");case u:return lt("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case l:return kg(p.render);case d:return jn(p.type,_,E);case f:{var O=p,F=O._payload,U=O._init;try{return jn(U(F),_,E)}catch{}}}return""}var nn=Object.prototype.hasOwnProperty,dl={},fl=x.ReactDebugCurrentFrame;function Nn(p){if(p){var _=p._owner,E=jn(p.type,p._source,_?_.type:null);fl.setExtraStackFrame(E)}else fl.setExtraStackFrame(null)}function jg(p,_,E,O,F){{var U=Function.call.bind(nn);for(var B in p)if(U(p,B)){var I=void 0;try{if(typeof p[B]!="function"){var fe=Error((O||"React class")+": "+E+" type `"+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[B]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw fe.name="Invariant Violation",fe}I=p[B](_,B,O,E,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Z){I=Z}I&&!(I instanceof Error)&&(Nn(F),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",O||"React class",E,B,typeof I),Nn(null)),I instanceof Error&&!(I.message in dl)&&(dl[I.message]=!0,Nn(F),b("Failed %s type: %s",E,I.message),Nn(null))}}}var Ng=Array.isArray;function sr(p){return Ng(p)}function Vg(p){{var _=typeof Symbol=="function"&&Symbol.toStringTag,E=_&&p[Symbol.toStringTag]||p.constructor.name||"Object";return E}}function Ig(p){try{return hl(p),!1}catch{return!0}}function hl(p){return""+p}function pl(p){if(Ig(p))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Vg(p)),hl(p)}var ml=x.ReactCurrentOwner,Rg={key:!0,ref:!0,__self:!0,__source:!0},gl,yl;function Bg(p){if(nn.call(p,"ref")){var _=Object.getOwnPropertyDescriptor(p,"ref").get;if(_&&_.isReactWarning)return!1}return p.ref!==void 0}function Fg(p){if(nn.call(p,"key")){var _=Object.getOwnPropertyDescriptor(p,"key").get;if(_&&_.isReactWarning)return!1}return p.key!==void 0}function $g(p,_){typeof p.ref=="string"&&ml.current}function zg(p,_){{var E=function(){gl||(gl=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",_))};E.isReactWarning=!0,Object.defineProperty(p,"key",{get:E,configurable:!0})}}function Ug(p,_){{var E=function(){yl||(yl=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",_))};E.isReactWarning=!0,Object.defineProperty(p,"ref",{get:E,configurable:!0})}}var Xg=function(p,_,E,O,F,U,B){var I={$$typeof:t,type:p,key:_,ref:E,props:B,_owner:U};return I._store={},Object.defineProperty(I._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(I,"_self",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.defineProperty(I,"_source",{configurable:!1,enumerable:!1,writable:!1,value:F}),Object.freeze&&(Object.freeze(I.props),Object.freeze(I)),I};function Wg(p,_,E,O,F){{var U,B={},I=null,fe=null;E!==void 0&&(pl(E),I=""+E),Fg(_)&&(pl(_.key),I=""+_.key),Bg(_)&&(fe=_.ref,$g(_,F));for(U in _)nn.call(_,U)&&!Rg.hasOwnProperty(U)&&(B[U]=_[U]);if(p&&p.defaultProps){var Z=p.defaultProps;for(U in Z)B[U]===void 0&&(B[U]=Z[U])}if(I||fe){var Q=typeof p=="function"?p.displayName||p.name||"Unknown":p;I&&zg(B,Q),fe&&Ug(B,Q)}return Xg(p,I,fe,F,O,ml.current,B)}}var ir=x.ReactCurrentOwner,vl=x.ReactDebugCurrentFrame;function _t(p){if(p){var _=p._owner,E=jn(p.type,p._source,_?_.type:null);vl.setExtraStackFrame(E)}else vl.setExtraStackFrame(null)}var ar;ar=!1;function lr(p){return typeof p=="object"&&p!==null&&p.$$typeof===t}function xl(){{if(ir.current){var p=ce(ir.current.type);if(p)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+p+"`."}return""}}function Gg(p){return""}var bl={};function Kg(p){{var _=xl();if(!_){var E=typeof p=="string"?p:p.displayName||p.name;E&&(_=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+E+">.")}return _}}function Sl(p,_){{if(!p._store||p._store.validated||p.key!=null)return;p._store.validated=!0;var E=Kg(_);if(bl[E])return;bl[E]=!0;var O="";p&&p._owner&&p._owner!==ir.current&&(O=" It was passed a child from "+ce(p._owner.type)+"."),_t(p),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',E,O),_t(null)}}function wl(p,_){{if(typeof p!="object")return;if(sr(p))for(var E=0;E<p.length;E++){var O=p[E];lr(O)&&Sl(O,_)}else if(lr(p))p._store&&(p._store.validated=!0);else if(p){var F=S(p);if(typeof F=="function"&&F!==p.entries)for(var U=F.call(p),B;!(B=U.next()).done;)lr(B.value)&&Sl(B.value,_)}}}function Hg(p){{var _=p.type;if(_==null||typeof _=="string")return;var E;if(typeof _=="function")E=_.propTypes;else if(typeof _=="object"&&(_.$$typeof===l||_.$$typeof===d))E=_.propTypes;else return;if(E){var O=ce(_);jg(E,p.props,"prop",O,p)}else if(_.PropTypes!==void 0&&!ar){ar=!0;var F=ce(_);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",F||"Unknown")}typeof _.getDefaultProps=="function"&&!_.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qg(p){{for(var _=Object.keys(p.props),E=0;E<_.length;E++){var O=_[E];if(O!=="children"&&O!=="key"){_t(p),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",O),_t(null);break}}p.ref!==null&&(_t(p),b("Invalid attribute `ref` supplied to `React.Fragment`."),_t(null))}}var Cl={};function _l(p,_,E,O,F,U){{var B=N(p);if(!B){var I="";(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(I+=" 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 fe=Gg();fe?I+=fe:I+=xl();var Z;p===null?Z="null":sr(p)?Z="array":p!==void 0&&p.$$typeof===t?(Z="<"+(ce(p.type)||"Unknown")+" />",I=" Did you accidentally export a JSX literal instead of a component?"):Z=typeof p,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Z,I)}var Q=Wg(p,_,E,F,U);if(Q==null)return Q;if(B){var ve=_.children;if(ve!==void 0)if(O)if(sr(ve)){for(var Tt=0;Tt<ve.length;Tt++)wl(ve[Tt],p);Object.freeze&&Object.freeze(ve)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else wl(ve,p)}if(nn.call(_,"key")){var ct=ce(p),pe=Object.keys(_).filter(function(ty){return ty!=="key"}),cr=pe.length>0?"{key: someKey, "+pe.join(": ..., ")+": ...}":"{key: someKey}";if(!Cl[ct+cr]){var ey=pe.length>0?"{"+pe.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,
|
|
30
|
+
<%s key={someKey} {...props} />`,cr,ct,ey,ct),Cl[ct+cr]=!0}}return p===o?qg(Q):Hg(Q),Q}}function Yg(p,_,E){return _l(p,_,E,!0)}function Zg(p,_,E){return _l(p,_,E,!1)}var Jg=Zg,Qg=Yg;Pt.Fragment=o,Pt.jsx=Jg,Pt.jsxs=Qg}()),Pt}var hr;function Al(){return hr||(hr=1,process.env.NODE_ENV==="production"?rn.exports=El():rn.exports=Pl()),rn.exports}var y=Al(),He=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(He||{});const pr=e=>{let t;const n=new Set,o=(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(g=>g(t,f))}},r=()=>t,a={setState:o,getState:r,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(o,r,a);return a},Ml=e=>e?pr(e):pr,Ll=e=>e;function Dl(e,t=Ll){const n=m.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return m.useDebugValue(n),n}const mr={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"},Vn=new Map,sn=e=>{const t=Vn.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,o])=>[n,o.getState()])):{}},kl=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const o=Vn.get(n.name);if(o)return{type:"tracked",store:e,...o};const r={connection:t.connect(n),stores:{}};return Vn.set(n.name,r),{type:"tracked",store:e,...r}},Ol=(e,t={})=>(n,o,r)=>{const{enabled:s,anonymousActionType:i,store:a,...l}=t;let c;try{c=(s??(mr?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,o,r);const{connection:u,...d}=kl(a,c,l);let f=!0;r.setState=(v,S,x)=>{const b=n(v,S);if(!f)return b;const C=x===void 0?{type:i||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(u==null||u.send(C,o()),b):(u==null||u.send({...C,type:`${a}/${C.type}`},{...sn(l.name),[a]:r.getState()}),b)};const g=(...v)=>{const S=f;f=!1,n(...v),f=S},h=e(r.setState,o,r);if(d.type==="untracked"?u==null||u.init(h):(d.stores[d.store]=r,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([v,S])=>[v,v===d.store?h:S.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let v=!1;const S=r.dispatch;r.dispatch=(...x)=>{(mr?"production":void 0)!=="production"&&x[0].type==="__setState"&&!v&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),v=!0),S(...x)}}return u.subscribe(v=>{var S;switch(v.type){case"ACTION":if(typeof v.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return In(v.payload,x=>{if(x.type==="__setState"){if(a===void 0){g(x.state);return}Object.keys(x.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 b=
|
|
34
|
+
`);const b=x.state[a];if(b==null)return;JSON.stringify(r.getState())!==JSON.stringify(b)&&g(b);return}r.dispatchFromDevtools&&typeof r.dispatch=="function"&&r.dispatch(x)});case"DISPATCH":switch(v.payload.type){case"RESET":return g(h),a===void 0?u==null?void 0:u.init(r.getState()):u==null?void 0:u.init(sn(l.name));case"COMMIT":if(a===void 0){u==null||u.init(r.getState());return}return u==null?void 0:u.init(sn(l.name));case"ROLLBACK":return In(v.state,x=>{if(a===void 0){g(x),u==null||u.init(r.getState());return}g(x[a]),u==null||u.init(sn(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return In(v.state,x=>{if(a===void 0){g(x);return}JSON.stringify(r.getState())!==JSON.stringify(x[a])&&g(x[a])});case"IMPORT_STATE":{const{nextLiftedState:x}=v.payload,b=(S=x.computedStates.slice(-1)[0])==null?void 0:S.state;if(!b)return;g(a===void 0?b:b[a]),u==null||u.send(null,x);return}case"PAUSE_RECORDING":return f=!f}return}}),h},In=(e,t)=>{let n;try{n=JSON.parse(e)}catch(o){console.error("[zustand devtools middleware] Could not parse the received json",o)}n!==void 0&&t(n)},jl={lang:"IT",labels:{"InfoWindow.CTA_1":"Percorso","InfoWindow.CTA_2":"Dettagli","LocationList.header":"Mostra {:1} {:2} nella tua area","LocationList.locationDesignator":"luoghi","LocationList.noResults":"Nessun risultato trovato","Map.areaSearchButton":"Cerca nell'area","Map.areaSearchTooltip":"Posiziona la mappa e avvia la ricerca","Map.areaSearchVisualCueCTA":"Esegui ricerca","Search.geolocationButton":"Geolocalizzati","Search.placeholder":"La tua città","ShareSheet.copyLinkErrorNotif":"Impossibile copiare il link","ShareSheet.copyLinkSuccessNotif":"Link copiato in clipboard!","ShareSheet.copyLinkTooltip":"Copia link","ShareSheet.genericShareTooltip":"Condividi su ","ShareSheet.shareViaEmailTooltip":"Condividi via email","ShareSheet.title":"Condividi"}},Nl=()=>Ml()(Ol(e=>({mapId:void 0,locations:[],mapDetail:He.CLUSTER,isFullscreen:!1,selectedLocation:"",shouldRefetch:!1,targetLocation:null,isLocationListExpanded:!1,isShareSheetOpen:!1,localizationConfig:jl,featureFlags:{fullscreen:!0,search:!0,share:!0},setMapId:t=>e({mapId:t},!1,"SET_MAP_ID"),setLocations:t=>e({locations:t},!1,"SET_LOCATIONS"),setMapDetail:t=>e({mapDetail:t},!1,"SET_MAP_DETAIL"),setFullscreen:t=>e({isFullscreen:t},!1,"SET_FULLSCREEN"),setSelectedLocation:t=>e({selectedLocation:t},!1,"SET_SELECTED_LOCATION"),setShouldRefetch:t=>e({shouldRefetch:t},!1,"SET_SHOULD_REFETCH"),zoomToLocation:(t,n=15)=>e({targetLocation:{coords:t,zoom:n}},!1,"ZOOM_TO_LOCATION"),clearTargetLocation:()=>e({targetLocation:null},!1,"CLEAR_TARGET_LOCATION"),setIsLocationListExpanded:t=>e({isLocationListExpanded:t},!1,"SET_IS_LOCATION_LIST_EXPANDED"),toggleShareSheet:t=>e({isShareSheetOpen:t},!1,"TOGGLE_SHARE_SHEET"),setLocalizationConfig:t=>e(n=>({localizationConfig:{...n.localizationConfig,...t,labels:t.labels?{...n.localizationConfig.labels,...t.labels}:n.localizationConfig.labels}}),!1,"SET_LOCALIZATION_CONFIG"),setFeatureFlags:t=>e(n=>({featureFlags:{...n.featureFlags,...t}}),!1,"SET_FEATURE_FLAGS")}),{name:`LocatorStore_${Date.now()}`})),gr=m.createContext(null);function Vl({children:e}){const[t]=m.useState(Nl);return y.jsx(gr.Provider,{value:t,children:e})}function k(e){const t=m.useContext(gr);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return Dl(t,e)}var Rn={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
|
|
38
|
+
*/var yr;function Il(){return yr||(yr=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(s=r(s,o(a)))}return s}function o(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var a in s)t.call(s,a)&&s[a]&&(i=r(i,a));return i}function r(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(Rn)),Rn.exports}var Rl=Il();const W=ur(Rl),vr={root:"_root_q2czu_7",loaderContainer:"_loaderContainer_q2czu_121"},xr={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function At({className:e,size:t="medium",color:n="primary",...o}){const r=W(xr.root,e);return y.jsx("div",{className:r,"data-size":t,"data-color":n,...o,children:y.jsx("div",{className:xr.spinner})})}const Bl=m.lazy(()=>Promise.resolve().then(()=>Eg)),Fl=m.lazy(()=>Promise.resolve().then(()=>Ag)),$l=m.lazy(()=>Promise.resolve().then(()=>Lg));function zl({children:e,mapProvider:t}){const{name:n,APIKey:o,config:r}=t??{};if(!o||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const s=y.jsx("div",{className:vr.loaderContainer,children:y.jsx(At,{size:"large",color:"primary"})});return y.jsx(m.Suspense,{fallback:s,children:(()=>{switch(n){case"mapbox":return y.jsx(Fl,{apiKey:o,...r??{},children:e});case"here":return y.jsx($l,{apiKey:o,...r??{},children:e});case"google":return y.jsx(Bl,{apiKey:o,...r??{},children:e});default:return null}})()})}const Ul={container:"_container_17c19_4"},Mt={root:"_root_3405i_4",header:"_header_3405i_14",icon:"_icon_3405i_25",body:"_body_3405i_47",content:"_content_3405i_50"};/**
|
|
39
39
|
* @license lucide-react v0.483.0 - ISC
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/const
|
|
43
|
+
*/const Xl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),br=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();/**
|
|
44
44
|
* @license lucide-react v0.483.0 - ISC
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the ISC license.
|
|
47
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var
|
|
48
|
+
*/var Wl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
49
49
|
* @license lucide-react v0.483.0 - ISC
|
|
50
50
|
*
|
|
51
51
|
* This source code is licensed under the ISC license.
|
|
52
52
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/const
|
|
53
|
+
*/const Gl=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:i,...a},l)=>m.createElement("svg",{ref:l,...Wl,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:br("lucide",r),...a},[...i.map(([c,u])=>m.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
54
54
|
* @license lucide-react v0.483.0 - ISC
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the ISC license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/const
|
|
58
|
+
*/const se=(e,t)=>{const n=m.forwardRef(({className:o,...r},s)=>m.createElement(Gl,{ref:s,iconNode:t,className:br(`lucide-${Xl(e)}`,o),...r}));return n.displayName=`${e}`,n};/**
|
|
59
59
|
* @license lucide-react v0.483.0 - ISC
|
|
60
60
|
*
|
|
61
61
|
* This source code is licensed under the ISC license.
|
|
62
62
|
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/const
|
|
63
|
+
*/const Kl=se("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
64
64
|
* @license lucide-react v0.483.0 - ISC
|
|
65
65
|
*
|
|
66
66
|
* This source code is licensed under the ISC license.
|
|
67
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/const
|
|
68
|
+
*/const Hl=se("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
69
69
|
* @license lucide-react v0.483.0 - ISC
|
|
70
70
|
*
|
|
71
71
|
* This source code is licensed under the ISC license.
|
|
72
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const
|
|
73
|
+
*/const ql=se("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
74
74
|
* @license lucide-react v0.483.0 - ISC
|
|
75
75
|
*
|
|
76
76
|
* This source code is licensed under the ISC license.
|
|
77
77
|
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const
|
|
78
|
+
*/const Yl=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
79
79
|
* @license lucide-react v0.483.0 - ISC
|
|
80
80
|
*
|
|
81
81
|
* This source code is licensed under the ISC license.
|
|
82
82
|
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const
|
|
83
|
+
*/const Zl=se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
84
84
|
* @license lucide-react v0.483.0 - ISC
|
|
85
85
|
*
|
|
86
86
|
* This source code is licensed under the ISC license.
|
|
87
87
|
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const
|
|
88
|
+
*/const Jl=se("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
89
89
|
* @license lucide-react v0.483.0 - ISC
|
|
90
90
|
*
|
|
91
91
|
* This source code is licensed under the ISC license.
|
|
92
92
|
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const
|
|
93
|
+
*/const Ql=se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
94
94
|
* @license lucide-react v0.483.0 - ISC
|
|
95
95
|
*
|
|
96
96
|
* This source code is licensed under the ISC license.
|
|
97
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const
|
|
98
|
+
*/const ec=se("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
|
|
99
99
|
* @license lucide-react v0.483.0 - ISC
|
|
100
100
|
*
|
|
101
101
|
* This source code is licensed under the ISC license.
|
|
102
102
|
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const
|
|
103
|
+
*/const tc=se("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
|
104
104
|
* @license lucide-react v0.483.0 - ISC
|
|
105
105
|
*
|
|
106
106
|
* This source code is licensed under the ISC license.
|
|
107
107
|
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const
|
|
108
|
+
*/const nc=se("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
|
109
109
|
* @license lucide-react v0.483.0 - ISC
|
|
110
110
|
*
|
|
111
111
|
* This source code is licensed under the ISC license.
|
|
112
112
|
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const
|
|
113
|
+
*/const oc=se("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
114
114
|
* @license lucide-react v0.483.0 - ISC
|
|
115
115
|
*
|
|
116
116
|
* This source code is licensed under the ISC license.
|
|
117
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const
|
|
118
|
+
*/const rc=se("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
|
|
119
119
|
* @license lucide-react v0.483.0 - ISC
|
|
120
120
|
*
|
|
121
121
|
* This source code is licensed under the ISC license.
|
|
122
122
|
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const
|
|
123
|
+
*/const sc=se("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
|
|
124
124
|
* @license lucide-react v0.483.0 - ISC
|
|
125
125
|
*
|
|
126
126
|
* This source code is licensed under the ISC license.
|
|
127
127
|
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const bo=ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),So=g.createContext({});function rc(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Rn=typeof window<"u",oc=Rn?g.useLayoutEffect:g.useEffect,Fn=g.createContext(null),Co=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sc(e=!0){const t=g.useContext(Fn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=g.useId();g.useEffect(()=>{if(e)return o(s)},[e]);const i=g.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}function Bn(e,t){e.indexOf(t)===-1&&e.push(t)}function $n(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const de=e=>e;let lt=de,je=de;process.env.NODE_ENV!=="production"&&(lt=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},je=(e,t)=>{if(!e)throw new Error(t)});const ic={useManualTiming:!1};function zn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ct=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Un{constructor(){this.subscriptions=[]}add(t){return Bn(this.subscriptions,t),()=>$n(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xe=e=>e*1e3,Te=e=>e/1e3;function wo(e,t){return t?e*(1e3/t):0}const To=new Set;function on(e,t,n){e||To.has(t)||(console.warn(t),To.add(t))}const ac=zn(()=>window.ScrollTimeline!==void 0);class lc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(ac()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class cc extends lc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Xn(e,t){return e?e[t]||e.default||e:void 0}const Wn=2e4;function _o(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Wn;)t+=n,r=e.next(t);return t>=Wn?1/0:t}function Kn(e){return typeof e=="function"}function Eo(e,t){e.timeline=t,e.onfinish=null}const Gn=e=>Array.isArray(e)&&typeof e[0]=="number",uc={linearEasing:void 0};function dc(e,t){const n=zn(e);return()=>{var r;return(r=uc[t])!==null&&r!==void 0?r:n()}}const sn=dc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Po=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(ct(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ao(e){return!!(typeof e=="function"&&sn()||!e||typeof e=="string"&&(e in qn||sn())||Gn(e)||Array.isArray(e)&&e.every(Ao))}const Mt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,qn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mt([0,.65,.55,1]),circOut:Mt([.55,0,1,.45]),backIn:Mt([.31,.01,.66,-.59]),backOut:Mt([.33,1.53,.69,.99])};function Mo(e,t){if(e)return typeof e=="function"&&sn()?Po(e,t):Gn(e)?Mt(e):Array.isArray(e)?e.map(n=>Mo(n,t)||qn.easeOut):qn[e]}const an=["read","resolveKeyframes","update","preRender","render","postRender"],Lo={value:null};function fc(e,t){let n=new Set,r=new Set,o=!1,s=!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,m=!1)=>{const y=m&&o?n:r;return f&&i.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Lo.value&&Lo.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const hc=40;function Do(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=an.reduce((v,b)=>(v[b]=fc(s,t?b:void 0),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,m=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,hc),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},p=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:an.reduce((v,b)=>{const w=i[b];return v[b]=(M,_=!1,L=!1)=>(n||p(),w.schedule(M,_,L)),v},{}),cancel:v=>{for(let b=0;b<an.length;b++)i[an[b]].cancel(v)},state:o,steps:i}}const{schedule:U,cancel:Ne,state:re,steps:Hn}=Do(typeof requestAnimationFrame<"u"?requestAnimationFrame:de,!0),{schedule:Yn}=Do(queueMicrotask,!1);let ln;function pc(){ln=void 0}const be={now:()=>(ln===void 0&&be.set(re.isProcessing||ic.useManualTiming?re.timestamp:performance.now()),ln),set:e=>{ln=e,queueMicrotask(pc)}},ye={x:!1,y:!1};function Oo(){return ye.x||ye.y}function mc(e){return e==="x"||e==="y"?ye[e]?null:(ye[e]=!0,()=>{ye[e]=!1}):ye.x||ye.y?null:(ye.x=ye.y=!0,()=>{ye.x=ye.y=!1})}function gc(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const s=(r=void 0)!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function ko(e,t){const n=gc(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function jo(e){return!(e.pointerType==="touch"||Oo())}function yc(e,t,n={}){const[r,o,s]=ko(e,n),i=a=>{if(!jo(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{jo(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function No(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 Vo=(e,t)=>t?e===t?!0:Vo(e,t.parentElement):!1,Zn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,vc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function xc(e){return vc.has(e.tagName)||e.tabIndex!==-1}const Lt=new WeakSet;function Io(e){return t=>{t.key==="Enter"&&e(t)}}function Jn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const bc=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Io(()=>{if(Lt.has(n))return;Jn(n,"down");const o=Io(()=>{Jn(n,"up")}),s=()=>Jn(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ro(e){return Zn(e)&&!Oo()}function Sc(e,t,n={}){const[r,o,s]=ko(e,n),i=a=>{const l=a.currentTarget;if(!l||!Ro(a)||Lt.has(l))return;Lt.add(l),No(a,"set");const c=t(l,a),u=(m,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),No(m,"release"),!(!Ro(m)||!Lt.has(l))&&(Lt.delete(l),typeof c=="function"&&c(m,{success:p}))},d=m=>{(m.isTrusted?Cc(m,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(m,!1):u(m,!(l instanceof Element)||Vo(l,m.target))},f=m=>{u(m,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!xc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>bc(c,o),o)}),s}function Cc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Fo=30,wc=e=>!isNaN(parseFloat(e));class Tc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=be.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&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=wc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&on(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Un);const r=this.events[t].add(n);return t==="change"?()=>{r(),U.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>Fo)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fo);return wo(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Dt(e,t){return new Tc(e,t)}const Bo=g.createContext({strict:!1}),$o={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ut={};for(const e in $o)ut[e]={isEnabled:t=>$o[e].some(n=>!!t[n])};function _c(e){for(const t in e)ut[t]={...ut[t],...e[t]}}const Ec=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function cn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ec.has(e)}let zo=e=>!cn(e);function Pc(e){e&&(zo=t=>t.startsWith("on")?!cn(t):e(t))}try{Pc(require("@emotion/is-prop-valid").default)}catch{}function Ac(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(zo(o)||n===!0&&cn(o)||!t&&!cn(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Mc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&on(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const un=g.createContext({});function dn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ot(e){return typeof e=="string"||Array.isArray(e)}const Qn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],er=["initial",...Qn];function fn(e){return dn(e.animate)||er.some(t=>Ot(e[t]))}function Uo(e){return!!(fn(e)||e.variants)}function Lc(e,t){if(fn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ot(n)?n:void 0,animate:Ot(r)?r:void 0}}return e.inherit!==!1?t:{}}function Dc(e){const{initial:t,animate:n}=Lc(e,g.useContext(un));return g.useMemo(()=>({initial:t,animate:n}),[Xo(t),Xo(n)])}function Xo(e){return Array.isArray(e)?e.join(" "):e}const Oc=Symbol.for("motionComponentSymbol");function dt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kc(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):dt(n)&&(n.current=r))},[t])}const tr=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Wo="data-"+tr("framerAppearId"),Ko=g.createContext({});function jc(e,t,n,r,o){var s,i;const{visualElement:a}=g.useContext(un),l=g.useContext(Bo),c=g.useContext(Fn),u=g.useContext(Co).reducedMotion,d=g.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,m=g.useContext(Ko);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&Nc(d.current,n,o,m);const p=g.useRef(!1);g.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const y=n[Wo],S=g.useRef(!!y&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,y))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,y)));return oc(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Yn.render(f.render),S.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!S.current&&f.animationState&&f.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,y)}),S.current=!1))}),f}function Nc(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Go(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&dt(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Go(e){if(e)return e.options.allowProjection!==!1?e.projection:Go(e.parent)}function Vc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&_c(e);function a(c,u){let d;const f={...g.useContext(Co),...c,layoutId:Ic(c)},{isStatic:m}=f,p=Dc(c),y=r(c,m);if(!m&&Rn){Rc(f,e);const S=Fc(f);d=S.MeasureLayout,p.visualElement=jc(o,y,f,t,S.ProjectionNode)}return x.jsxs(un.Provider,{value:p,children:[d&&p.visualElement?x.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,kc(y,p.visualElement,u),y,m,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=g.forwardRef(a);return l[Oc]=o,l}function Ic({layoutId:e}){const t=g.useContext(So).id;return t&&e!==void 0?t+"-"+e:e}function Rc(e,t){const n=g.useContext(Bo).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?lt(!1,r):je(!1,r)}}function Fc(e){const{drag:t,layout:n}=ut;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const qo=e=>t=>typeof t=="string"&&t.startsWith(e),nr=qo("--"),Bc=qo("var(--"),rr=e=>Bc(e)?$c.test(e.split("/*")[0].trim()):!1,$c=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,kt={};function zc(e){for(const t in e)kt[t]=e[t],nr(t)&&(kt[t].isCSSVariable=!0)}const ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ge=new Set(ft);function Ho(e,{layout:t,layoutId:n}){return Ge.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kt[e]||e==="opacity")}const se=e=>!!(e&&e.getVelocity),Yo=(e,t)=>t&&typeof e=="number"?t.transform(e):e,_e=(e,t,n)=>n>t?t:n<e?e:n,ht={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jt={...ht,transform:e=>_e(0,1,e)},hn={...ht,default:1},Nt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ve=Nt("deg"),Se=Nt("%"),D=Nt("px"),Uc=Nt("vh"),Xc=Nt("vw"),Zo={...Se,parse:e=>Se.parse(e)/100,transform:e=>Se.transform(e*100)},Wc={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,radius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,top:D,right:D,bottom:D,left:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,backgroundPositionX:D,backgroundPositionY:D},Kc={rotate:Ve,rotateX:Ve,rotateY:Ve,rotateZ:Ve,scale:hn,scaleX:hn,scaleY:hn,scaleZ:hn,skew:Ve,skewX:Ve,skewY:Ve,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:jt,originX:Zo,originY:Zo,originZ:D},Jo={...ht,transform:Math.round},or={...Wc,...Kc,zIndex:Jo,size:D,fillOpacity:jt,strokeOpacity:jt,numOctaves:Jo},Gc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qc=ft.length;function Hc(e,t,n){let r="",o=!0;for(let s=0;s<qc;s++){const i=ft[s],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=Yo(a,or[i]);if(!l){o=!1;const u=Gc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function sr(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Ge.has(l)){i=!0;continue}else if(nr(l)){o[l]=c;continue}else{const u=Yo(c,or[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=Hc(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const ir=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qo(e,t,n){for(const r in t)!se(t[r])&&!Ho(r,n)&&(e[r]=t[r])}function Yc({transformTemplate:e},t){return g.useMemo(()=>{const n=ir();return sr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Zc(e,t){const n=e.style||{},r={};return Qo(r,n,e),Object.assign(r,Yc(e,t)),r}function Jc(e,t){const n={},r=Zc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Qc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ar(e){return typeof e!="string"||e.includes("-")?!1:!!(Qc.indexOf(e)>-1||/[A-Z]/u.test(e))}const eu={offset:"stroke-dashoffset",array:"stroke-dasharray"},tu={offset:"strokeDashoffset",array:"strokeDasharray"};function nu(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?eu:tu;e[s.offset]=D.transform(-r);const i=D.transform(t),a=D.transform(n);e[s.array]=`${i} ${a}`}function es(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function ru(e,t,n){const r=es(t,e.x,e.width),o=es(n,e.y,e.height);return`${r} ${o}`}function lr(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(sr(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:p}=e;f.transform&&(p&&(m.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=ru(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&nu(f,i,a,l,!1)}const ts=()=>({...ir(),attrs:{}}),cr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ou(e,t,n,r){const o=g.useMemo(()=>{const s=ts();return lr(s,t,cr(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Qo(s,e.style,e),o.style={...s,...o.style}}return o}function su(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(ar(n)?ou:Jc)(r,s,i,n),c=Ac(r,typeof n=="string",e),u=n!==g.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=g.useMemo(()=>se(d)?d.get():d,[d]);return g.createElement(n,{...u,children:f})}}function ns(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ur(e,t,n,r){if(typeof t=="function"){const[o,s]=ns(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ns(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const dr=e=>Array.isArray(e),iu=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),au=e=>dr(e)?e[e.length-1]||0:e;function pn(e){const t=se(e)?e.get():e;return iu(t)?t.toValue():t}function lu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:cu(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const rs=e=>(t,n)=>{const r=g.useContext(un),o=g.useContext(Fn),s=()=>lu(e,t,r,o);return n?s():rc(s)};function cu(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=pn(s[f]);let{initial:i,animate:a}=e;const l=fn(e),c=Uo(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!dn(d)){const f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){const p=ur(e,f[m]);if(p){const{transitionEnd:y,transition:S,...v}=p;for(const b in v){let w=v[b];if(Array.isArray(w)){const M=u?w.length-1:0;w=w[M]}w!==null&&(o[b]=w)}for(const b in y)o[b]=y[b]}}}return o}function fr(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(se(o[i])||t.style&&se(t.style[i])||Ho(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}const uu={useVisualState:rs({scrapeMotionValuesFromProps:fr,createRenderState:ir})};function os(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 ss(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const is=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 as(e,t,n,r){ss(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(is.has(o)?o:tr(o),t.attrs[o])}function ls(e,t,n){const r=fr(e,t,n);for(const o in e)if(se(e[o])||se(t[o])){const s=ft.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const cs=["x","y","width","height","cx","cy","r"],du={useVisualState:rs({scrapeMotionValuesFromProps:ls,createRenderState:ts,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(Ge.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<cs.length;a++){const l=cs[a];e[l]!==t[l]&&(i=!0)}i&&U.read(()=>{os(n,r),U.render(()=>{lr(r,o,cr(n.tagName),e.transformTemplate),as(n,r)})})}})};function fu(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...ar(r)?du:uu,preloadedFeatures:e,useRender:su(o),createVisualElement:t,Component:r};return Vc(i)}}function Vt(e,t,n){const r=e.getProps();return ur(r,t,n!==void 0?n:r.custom,e)}const us=new Set(["width","height","top","left","right","bottom",...ft]);function hu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Dt(n))}function pu(e,t){const n=Vt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=au(s[i]);hu(e,i,a)}}function mu(e){return!!(se(e)&&e.add)}function hr(e,t){const n=e.getValue("willChange");if(mu(n))return n.add(t)}function ds(e){return e.props[Wo]}const fs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gu=1e-7,yu=12;function vu(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=fs(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>gu&&++a<yu);return i}function It(e,t,n,r){if(e===t&&n===r)return de;const o=s=>vu(s,0,1,e,n);return s=>s===0||s===1?s:fs(o(s),t,r)}const hs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ps=e=>t=>1-e(1-t),ms=It(.33,1.53,.69,.99),pr=ps(ms),gs=hs(pr),ys=e=>(e*=2)<1?.5*pr(e):.5*(2-Math.pow(2,-10*(e-1))),mr=e=>1-Math.sin(Math.acos(e)),vs=ps(mr),xs=hs(mr),bs=e=>/^0[^.\s]+$/u.test(e);function xu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||bs(e):!0}const Rt=e=>Math.round(e*1e5)/1e5,gr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bu(e){return e==null}const Su=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yr=(e,t)=>n=>!!(typeof n=="string"&&Su.test(n)&&n.startsWith(e)||t&&!bu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ss=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(gr);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Cu=e=>_e(0,255,e),vr={...ht,transform:e=>Math.round(Cu(e))},qe={test:yr("rgb","red"),parse:Ss("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vr.transform(e)+", "+vr.transform(t)+", "+vr.transform(n)+", "+Rt(jt.transform(r))+")"};function wu(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const xr={test:yr("#"),parse:wu,transform:qe.transform},pt={test:yr("hsl","hue"),parse:Ss("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Se.transform(Rt(t))+", "+Se.transform(Rt(n))+", "+Rt(jt.transform(r))+")"},ie={test:e=>qe.test(e)||xr.test(e)||pt.test(e),parse:e=>qe.test(e)?qe.parse(e):pt.test(e)?pt.parse(e):xr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qe.transform(e):pt.transform(e)},Tu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _u(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Tu))===null||n===void 0?void 0:n.length)||0)>0}const Cs="number",ws="color",Eu="var",Pu="var(",Ts="${}",Au=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ft(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(Au,l=>(ie.test(l)?(r.color.push(s),o.push(ws),n.push(ie.parse(l))):l.startsWith(Pu)?(r.var.push(s),o.push(Eu),n.push(l)):(r.number.push(s),o.push(Cs),n.push(parseFloat(l))),++s,Ts)).split(Ts);return{values:n,split:a,indexes:r,types:o}}function _s(e){return Ft(e).values}function Es(e){const{split:t,types:n}=Ft(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Cs?s+=Rt(o[i]):a===ws?s+=ie.transform(o[i]):s+=o[i]}return s}}const Mu=e=>typeof e=="number"?0:e;function Lu(e){const t=_s(e);return Es(e)(t.map(Mu))}const Ie={test:_u,parse:_s,createTransformer:Es,getAnimatableNone:Lu},Du=new Set(["brightness","contrast","saturate","opacity"]);function Ou(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(gr)||[];if(!r)return e;const o=n.replace(r,"");let s=Du.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const ku=/\b([a-z-]*)\(.*?\)/gu,br={...Ie,getAnimatableNone:e=>{const t=e.match(ku);return t?t.map(Ou).join(" "):e}},ju={...or,color:ie,backgroundColor:ie,outlineColor:ie,fill:ie,stroke:ie,borderColor:ie,borderTopColor:ie,borderRightColor:ie,borderBottomColor:ie,borderLeftColor:ie,filter:br,WebkitFilter:br},Ps=e=>ju[e];function As(e,t){let n=Ps(e);return n!==br&&(n=Ie),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Nu=new Set(["auto","none","0"]);function Vu(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!Nu.has(s)&&Ft(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=As(n,o)}const He=e=>e*180/Math.PI,Sr=e=>{const t=He(Math.atan2(e[1],e[0]));return Cr(t)},Iu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sr,rotateZ:Sr,skewX:e=>He(Math.atan(e[1])),skewY:e=>He(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cr=e=>(e=e%360,e<0&&(e+=360),e),Ms=Sr,Ls=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ds=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ru={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ls,scaleY:Ds,scale:e=>(Ls(e)+Ds(e))/2,rotateX:e=>Cr(He(Math.atan2(e[6],e[5]))),rotateY:e=>Cr(He(Math.atan2(-e[2],e[0]))),rotateZ:Ms,rotate:Ms,skewX:e=>He(Math.atan(e[4])),skewY:e=>He(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Os(e){return e.includes("scale")?1:0}function wr(e,t){if(!e||e==="none")return Os(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Ru,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Iu,o=a}if(!o)return Os(t);const s=r[t],i=o[1].split(",").map(Bu);return typeof s=="function"?s(i):i[s]}const Fu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return wr(n,t)};function Bu(e){return parseFloat(e.trim())}const ks=e=>e===ht||e===D,$u=new Set(["x","y","z"]),zu=ft.filter(e=>!$u.has(e));function Uu(e){const t=[];return zu.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const mt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>wr(t,"x"),y:(e,{transform:t})=>wr(t,"y")};mt.translateX=mt.x,mt.translateY=mt.y;const Ye=new Set;let Tr=!1,_r=!1;function js(){if(_r){const e=Array.from(Ye).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Uu(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}_r=!1,Tr=!1,Ye.forEach(e=>e.complete()),Ye.clear()}function Ns(){Ye.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_r=!0)})}function Xu(){Ns(),js()}class Er{constructor(t,n,r,o,s,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=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ye.add(this),Tr||(Tr=!0,U.read(Ns),U.resolveKeyframes(js))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.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),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ye.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ye.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Vs=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Wu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ku(e){const t=Wu.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Gu=4;function Is(e,t,n=1){je(n<=Gu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Ku(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Vs(i)?parseFloat(i):i}return rr(o)?Is(o,t,n+1):o}const Rs=e=>t=>t.test(e),Fs=[ht,D,Se,Ve,Xc,Uc,{test:e=>e==="auto",parse:e=>e}],Bs=e=>Fs.find(Rs(e));class $s extends Er{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),rr(c))){const u=Is(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!us.has(r)||t.length!==2)return;const[o,s]=t,i=Bs(o),a=Bs(s);if(i!==a)if(ks(i)&&ks(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 o=0;o<t.length;o++)xu(t[o])&&r.push(o);r.length&&Vu(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=mt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=mt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const zs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ie.test(e)||e==="0")&&!e.startsWith("url("));function qu(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Hu(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=zs(o,t),a=zs(s,t);return lt(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:qu(e)||(n==="spring"||Kn(n))&&r}const Yu=e=>e!==null;function mn(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Yu),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const Zu=40;class Us{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=be.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Zu?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Xu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=be.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Hu(t,r,o,s))if(i)this.options.duration=0;else{l&&l(mn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const K=(e,t,n)=>e+(t-e)*n;function Pr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ju({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Pr(l,a,e+1/3),s=Pr(l,a,e),i=Pr(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function gn(e,t){return n=>n>0?t:e}const Ar=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Qu=[xr,qe,pt],ed=e=>Qu.find(t=>t.test(e));function Xs(e){const t=ed(e);if(lt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===pt&&(n=Ju(n)),n}const Ws=(e,t)=>{const n=Xs(e),r=Xs(t);if(!n||!r)return gn(e,t);const o={...n};return s=>(o.red=Ar(n.red,r.red,s),o.green=Ar(n.green,r.green,s),o.blue=Ar(n.blue,r.blue,s),o.alpha=K(n.alpha,r.alpha,s),qe.transform(o))},td=(e,t)=>n=>t(e(n)),Bt=(...e)=>e.reduce(td),Mr=new Set(["none","hidden"]);function nd(e,t){return Mr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function rd(e,t){return n=>K(e,t,n)}function Lr(e){return typeof e=="number"?rd:typeof e=="string"?rr(e)?gn:ie.test(e)?Ws:id:Array.isArray(e)?Ks:typeof e=="object"?ie.test(e)?Ws:od:gn}function Ks(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Lr(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function od(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Lr(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function sd(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const id=(e,t)=>{const n=Ie.createTransformer(t),r=Ft(e),o=Ft(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Mr.has(e)&&!o.values.length||Mr.has(t)&&!r.values.length?nd(e,t):Bt(Ks(sd(r,o),o.values),n):(lt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),gn(e,t))};function Gs(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?K(e,t,n):Lr(e)(e,t)}const ad=5;function qs(e,t,n){const r=Math.max(t-ad,0);return wo(n-e(r),t-r)}const G={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},Hs=.001;function ld({duration:e=G.duration,bounce:t=G.bounce,velocity:n=G.velocity,mass:r=G.mass}){let o,s;lt(e<=xe(G.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=_e(G.minDamping,G.maxDamping,i),e=_e(G.minDuration,G.maxDuration,Te(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,m=Dr(c,i),p=Math.exp(-d);return Hs-f/m*p},s=c=>{const d=c*i*e,f=d*n+n,m=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),y=Dr(Math.pow(c,2),i);return(-o(c)+Hs>0?-1:1)*((f-m)*p)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=ud(o,s,a);if(e=xe(e),isNaN(l))return{stiffness:G.stiffness,damping:G.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const cd=12;function ud(e,t,n){let r=n;for(let o=1;o<cd;o++)r=r-e(r)/t(r);return r}function Dr(e,t){return e*Math.sqrt(1-t*t)}const dd=["duration","bounce"],fd=["stiffness","damping","mass"];function Ys(e,t){return t.some(n=>e[n]!==void 0)}function hd(e){let t={velocity:G.velocity,stiffness:G.stiffness,damping:G.damping,mass:G.mass,isResolvedFromDuration:!1,...e};if(!Ys(e,fd)&&Ys(e,dd))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*_e(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:G.mass,stiffness:o,damping:s}}else{const n=ld(e);t={...t,...n,mass:G.mass},t.isResolvedFromDuration=!0}return t}function Zs(e=G.visualDuration,t=G.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:m}=hd({...n,velocity:-Te(n.velocity||0)}),p=f||0,y=c/(2*Math.sqrt(l*u)),S=i-s,v=Te(Math.sqrt(l/u)),b=Math.abs(S)<5;r||(r=b?G.restSpeed.granular:G.restSpeed.default),o||(o=b?G.restDelta.granular:G.restDelta.default);let w;if(y<1){const _=Dr(v,y);w=L=>{const k=Math.exp(-y*v*L);return i-k*((p+y*v*S)/_*Math.sin(_*L)+S*Math.cos(_*L))}}else if(y===1)w=_=>i-Math.exp(-v*_)*(S+(p+v*S)*_);else{const _=v*Math.sqrt(y*y-1);w=L=>{const k=Math.exp(-y*v*L),A=Math.min(_*L,300);return i-k*((p+y*v*S)*Math.sinh(A)+_*S*Math.cosh(A))/_}}const M={calculatedDuration:m&&d||null,next:_=>{const L=w(_);if(m)a.done=_>=d;else{let k=0;y<1&&(k=_===0?xe(p):qs(w,_,L));const A=Math.abs(k)<=r,V=Math.abs(i-L)<=o;a.done=A&&V}return a.value=a.done?i:L,a},toString:()=>{const _=Math.min(_o(M),Wn),L=Po(k=>M.next(_*k).value,_,30);return _+"ms "+L}};return M}function Js({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let y=n*t;const S=d+y,v=i===void 0?S:i(S);v!==S&&(y=v-d);const b=A=>-y*Math.exp(-A/r),w=A=>v+b(A),M=A=>{const V=b(A),E=w(A);f.done=Math.abs(V)<=c,f.value=f.done?v:E};let _,L;const k=A=>{m(f.value)&&(_=A,L=Zs({keyframes:[f.value,p(f.value)],velocity:qs(w,A,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:A=>{let V=!1;return!L&&_===void 0&&(V=!0,M(A),k(A)),_!==void 0&&A>=_?L.next(A-_):(!V&&M(A),f)}}}const pd=It(.42,0,1,1),md=It(0,0,.58,1),Qs=It(.42,0,.58,1),gd=e=>Array.isArray(e)&&typeof e[0]!="number",ei={linear:de,easeIn:pd,easeInOut:Qs,easeOut:md,circIn:mr,circInOut:xs,circOut:vs,backIn:pr,backInOut:gs,backOut:ms,anticipate:ys},ti=e=>{if(Gn(e)){je(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return It(t,n,r,o)}else if(typeof e=="string")return je(ei[e]!==void 0,`Invalid easing type '${e}'`),ei[e];return e};function yd(e,t,n){const r=[],o=n||Gs,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||de:t;a=Bt(l,a)}r.push(a)}return r}function vd(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(je(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=yd(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ct(e[d],e[d+1],u);return a[d](f)};return n?u=>c(_e(e[0],e[s-1],u)):c}function xd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ct(0,t,r);e.push(K(n,1,o))}}function bd(e){const t=[0];return xd(t,e.length-1),t}function Sd(e,t){return e.map(n=>n*t)}function Cd(e,t){return e.map(()=>t||Qs).splice(0,e.length-1)}function $t({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=gd(r)?r.map(ti):ti(r),s={done:!1,value:t[0]},i=Sd(n&&n.length===t.length?n:bd(t),e),a=vd(i,t,{ease:Array.isArray(o)?o:Cd(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const wd=e=>{const t=({timestamp:n})=>e(n);return{start:()=>U.update(t,!0),stop:()=>Ne(t),now:()=>re.isProcessing?re.timestamp:be.now()}},Td={decay:Js,inertia:Js,tween:$t,keyframes:$t,spring:Zs},_d=e=>e/100;class Or extends Us{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:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||Er,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),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:o=0,repeatType:s,velocity:i=0}=this.options,a=Kn(n)?n:Td[n]||$t;let l,c;process.env.NODE_ENV!=="production"&&a!==$t&&je(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==$t&&typeof t[0]!="number"&&(l=Bt(_d,Gs(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=_o(u));const{calculatedDuration:d}=u,f=d+o,m=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:m}}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:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:m,repeatType:p,repeatDelay:y,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let w=this.currentTime,M=s;if(m){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,m+1),!!(V%2)&&(p==="reverse"?(E=1-E,y&&(E-=y/d)):p==="mirror"&&(M=i)),w=_e(0,1,E)*d}const _=b?{done:!1,value:l[0]}:M.next(w);a&&(_.value=a(_.value));let{done:L}=_;!b&&c!==null&&(L=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return k&&o!==void 0&&(_.value=mn(l,this.options,o)),S&&S(_.value),k&&this.finish(),_}get duration(){const{resolved:t}=this;return t?Te(t.calculatedDuration):0}get time(){return Te(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=Te(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=wd,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ed=new Set(["opacity","clipPath","filter","transform"]);function Pd(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Mo(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const Ad=zn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),yn=10,Md=2e4;function Ld(e){return Kn(e.type)||e.type==="spring"||!Ao(e.ease)}function Dd(e,t){const n=new Or({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<Md;)r=n.sample(s),o.push(r.value),s+=yn;return{times:void 0,keyframes:o,duration:s-yn,ease:"linear"}}const ni={anticipate:ys,backInOut:gs,circInOut:xs};function Od(e){return e in ni}class ri extends Us{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new $s(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&sn()&&Od(s)&&(s=ni[s]),Ld(this.options)){const{onComplete:d,onUpdate:f,motionValue:m,element:p,...y}=this.options,S=Dd(t,y);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,o=S.times,s=S.ease,i="keyframes"}const u=Pd(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Eo(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(mn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Te(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Te(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 de;const{animation:r}=n;Eo(r,t)}return de}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:o,type:s,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,...m}=this.options,p=new Or({...m,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),y=xe(this.time);c.setWithVelocity(p.sample(y-yn).value,p.sample(y).value,yn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Ad()&&r&&Ed.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const kd={type:"spring",stiffness:500,damping:25,restSpeed:10},jd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Nd={type:"keyframes",duration:.8},Vd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Id=(e,{keyframes:t})=>t.length>2?Nd:Ge.has(e)?e.startsWith("scale")?jd(t[1]):kd:Vd;function Rd({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const kr=(e,t,n,r={},o,s)=>i=>{const a=Xn(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:s?void 0:o};Rd(a)||(u={...u,...Id(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&&!s&&t.get()!==void 0){const f=mn(u.keyframes,a);if(f!==void 0)return U.update(()=>{u.onUpdate(f),u.onComplete()}),new cc([])}return!s&&ri.supports(u)?new ri(u):new Or(u)};function Fd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function oi(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),m=l[d];if(m===void 0||u&&Fd(u,d))continue;const p={delay:n,...Xn(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=ds(e);if(v){const b=window.MotionHandoffAnimation(v,d,U);b!==null&&(p.startTime=b,y=!0)}}hr(e,d),f.start(kr(d,f,m,e.shouldReduceMotion&&us.has(d)?{type:!1}:p,e,y));const S=f.animation;S&&c.push(S)}return a&&Promise.all(c).then(()=>{U.update(()=>{a&&pu(e,a)})}),c}function jr(e,t,n={}){var r;const o=Vt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(oi(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return Bd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Bd(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort($d).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(jr(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function $d(e,t){return e.sortNodePosition(t)}function zd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>jr(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=jr(e,t,n);else{const o=typeof t=="function"?Vt(e,t,n.custom):t;r=Promise.all(oi(e,o,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 Ud=er.length;function ii(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ii(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Ud;n++){const r=er[n],o=e.props[r];(Ot(o)||o===!1)&&(t[r]=o)}return t}const Xd=[...Qn].reverse(),Wd=Qn.length;function Kd(e){return t=>Promise.all(t.map(({animation:n,options:r})=>zd(e,n,r)))}function Gd(e){let t=Kd(e),n=ai(),r=!0;const o=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:m,transitionEnd:p,...y}=f;c={...c,...y,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=ii(e.parent)||{},d=[],f=new Set;let m={},p=1/0;for(let S=0;S<Wd;S++){const v=Xd[S],b=n[v],w=c[v]!==void 0?c[v]:u[v],M=Ot(w),_=v===l?b.isActive:null;_===!1&&(p=S);let L=w===u[v]&&w!==c[v]&&M;if(L&&r&&e.manuallyAnimateOnMount&&(L=!1),b.protectedKeys={...m},!b.isActive&&_===null||!w&&!b.prevProp||dn(w)||typeof w=="boolean")continue;const k=qd(b.prevProp,w);let A=k||v===l&&b.isActive&&!L&&M||S>p&&M,V=!1;const E=Array.isArray(w)?w:[w];let X=E.reduce(o(v),{});_===!1&&(X={});const{prevResolvedValues:$={}}=b,ee={...$,...X},le=W=>{A=!0,f.has(W)&&(V=!0,f.delete(W)),b.needsAnimating[W]=!0;const C=e.getValue(W);C&&(C.liveStyle=!1)};for(const W in ee){const C=X[W],I=$[W];if(m.hasOwnProperty(W))continue;let B=!1;dr(C)&&dr(I)?B=!si(C,I):B=C!==I,B?C!=null?le(W):f.add(W):C!==void 0&&f.has(W)?le(W):b.protectedKeys[W]=!0}b.prevProp=w,b.prevResolvedValues=X,b.isActive&&(m={...m,...X}),r&&e.blockInitialAnimation&&(A=!1),A&&(!(L&&k)||V)&&d.push(...E.map(W=>({animation:W,options:{type:v}})))}if(f.size){const S={};if(typeof c.initial!="boolean"){const v=Vt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(S.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),S[v]=b??null}),d.push({animation:S})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var m;return(m=f.animationState)===null||m===void 0?void 0:m.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:s,getState:()=>n,reset:()=>{n=ai(),r=!0}}}function qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!si(t,e):!1}function Ze(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ai(){return{animate:Ze(!0),whileInView:Ze(),whileHover:Ze(),whileTap:Ze(),whileDrag:Ze(),whileFocus:Ze(),exit:Ze()}}class Re{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Hd extends Re{constructor(t){super(t),t.animationState||(t.animationState=Gd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();dn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Yd=0;class Zd extends Re{constructor(){super(...arguments),this.id=Yd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Jd={animation:{Feature:Hd},exit:{Feature:Zd}};function zt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ut(e){return{point:{x:e.pageX,y:e.pageY}}}const Qd=e=>t=>Zn(t)&&e(t,Ut(t));function Xt(e,t,n,r){return zt(e,t,Qd(n),r)}function li({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ef({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function tf(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const ci=1e-4,nf=1-ci,rf=1+ci,ui=.01,of=0-ui,sf=0+ui;function ae(e){return e.max-e.min}function af(e,t,n){return Math.abs(e-t)<=n}function di(e,t,n,r=.5){e.origin=r,e.originPoint=K(t.min,t.max,e.origin),e.scale=ae(n)/ae(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=nf&&e.scale<=rf||isNaN(e.scale))&&(e.scale=1),(e.translate>=of&&e.translate<=sf||isNaN(e.translate))&&(e.translate=0)}function Wt(e,t,n,r){di(e.x,t.x,n.x,r?r.originX:void 0),di(e.y,t.y,n.y,r?r.originY:void 0)}function fi(e,t,n){e.min=n.min+t.min,e.max=e.min+ae(t)}function lf(e,t,n){fi(e.x,t.x,n.x),fi(e.y,t.y,n.y)}function hi(e,t,n){e.min=t.min-n.min,e.max=e.min+ae(t)}function Kt(e,t,n){hi(e.x,t.x,n.x),hi(e.y,t.y,n.y)}const pi=()=>({translate:0,scale:1,origin:0,originPoint:0}),gt=()=>({x:pi(),y:pi()}),mi=()=>({min:0,max:0}),H=()=>({x:mi(),y:mi()});function pe(e){return[e("x"),e("y")]}function Nr(e){return e===void 0||e===1}function Vr({scale:e,scaleX:t,scaleY:n}){return!Nr(e)||!Nr(t)||!Nr(n)}function Je(e){return Vr(e)||gi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gi(e){return yi(e.x)||yi(e.y)}function yi(e){return e&&e!=="0%"}function vn(e,t,n){const r=e-n,o=t*r;return n+o}function vi(e,t,n,r,o){return o!==void 0&&(e=vn(e,o,r)),vn(e,n,r)+t}function Ir(e,t=0,n=1,r,o){e.min=vi(e.min,t,n,r,o),e.max=vi(e.max,t,n,r,o)}function xi(e,{x:t,y:n}){Ir(e.x,t.translate,t.scale,t.originPoint),Ir(e.y,n.translate,n.scale,n.originPoint)}const bi=.999999999999,Si=1.0000000000001;function cf(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,xi(e,i)),r&&Je(s.latestValues)&&vt(e,s.latestValues))}t.x<Si&&t.x>bi&&(t.x=1),t.y<Si&&t.y>bi&&(t.y=1)}function yt(e,t){e.min=e.min+t,e.max=e.max+t}function Ci(e,t,n,r,o=.5){const s=K(e.min,e.max,o);Ir(e,t,n,s,r)}function vt(e,t){Ci(e.x,t.x,t.scaleX,t.scale,t.originX),Ci(e.y,t.y,t.scaleY,t.scale,t.originY)}function wi(e,t){return li(tf(e.getBoundingClientRect(),t))}function uf(e,t,n){const r=wi(e,n),{scroll:o}=t;return o&&(yt(r.x,o.offset.x),yt(r.y,o.offset.y)),r}const Ti=({current:e})=>e?e.ownerDocument.defaultView:null,_i=(e,t)=>Math.abs(e-t);function df(e,t){const n=_i(e.x,t.x),r=_i(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ei{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Fr(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=df(d.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:p}=d,{timestamp:y}=re;this.history.push({...p,timestamp:y});const{onStart:S,onMove:v}=this.handlers;f||(S&&S(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Rr(f,this.transformPagePoint),U.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:m,onSessionEnd:p,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Fr(d.type==="pointercancel"?this.lastMoveEventInfo:Rr(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,S),p&&p(d,S)},!Zn(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=Ut(t),a=Rr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=re;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Fr(a,this.history)),this.removeListeners=Bt(Xt(this.contextWindow,"pointermove",this.handlePointerMove),Xt(this.contextWindow,"pointerup",this.handlePointerUp),Xt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ne(this.updatePoint)}}function Rr(e,t){return t?{point:t(e.point)}:e}function Pi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fr({point:e},t){return{point:e,delta:Pi(e,Ai(t)),offset:Pi(e,ff(t)),velocity:hf(t,.1)}}function ff(e){return e[0]}function Ai(e){return e[e.length-1]}function hf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ai(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>xe(t)));)n--;if(!r)return{x:0,y:0};const s=Te(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function pf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?K(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?K(n,e,r.max):Math.min(e,n)),e}function Mi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function mf(e,{top:t,left:n,bottom:r,right:o}){return{x:Mi(e.x,n,o),y:Mi(e.y,t,r)}}function Li(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function gf(e,t){return{x:Li(e.x,t.x),y:Li(e.y,t.y)}}function yf(e,t){let n=.5;const r=ae(e),o=ae(t);return o>r?n=ct(t.min,t.max-r,e.min):r>o&&(n=ct(e.min,e.max-o,t.min)),_e(0,1,n)}function vf(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Br=.35;function xf(e=Br){return e===!1?e=0:e===!0&&(e=Br),{x:Di(e,"left","right"),y:Di(e,"top","bottom")}}function Di(e,t,n){return{min:Oi(e,t),max:Oi(e,n)}}function Oi(e,t){return typeof e=="number"?e:e[t]||0}const bf=new WeakMap;class Sf{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=H(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ut(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:m,onDragStart:p}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mc(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pe(S=>{let v=this.getAxisMotionValue(S).get()||0;if(Se.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[S];w&&(v=ae(w)*(parseFloat(v)/100))}}this.originPoint[S]=v}),p&&U.postRender(()=>p(u,d)),hr(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:p,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:S}=d;if(m&&this.currentDirection===null){this.currentDirection=Cf(S),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),this.visualElement.render(),y&&y(u,d)},a=(u,d)=>this.stop(u,d),l=()=>pe(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ei(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Ti(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&U.postRender(()=>s(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:o}=this.getProps();if(!r||!xn(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=pf(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&dt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=mf(o.layoutBox,n):this.constraints=!1,this.elastic=xf(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&pe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=vf(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dt(t))return!1;const r=t.current;je(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=uf(r,o.root,this.visualElement.getTransformPagePoint());let i=gf(o.layout.layoutBox,s);if(n){const a=n(ef(i));this.hasMutatedConstraints=!!a,a&&(i=li(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=pe(u=>{if(!xn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,m=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return hr(this.visualElement,t),r.start(kr(t,r,0,n,this.visualElement,!1))}stopAnimation(){pe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){pe(n=>{const{drag:r}=this.getProps();if(!xn(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-K(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dt(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};pe(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=yf({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pe(i=>{if(!xn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(K(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;bf.set(this.visualElement,this);const t=this.visualElement.current,n=Xt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();dt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),U.read(r);const i=zt(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pe(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Br,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function xn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wf extends Re{constructor(t){super(t),this.removeGroupControls=de,this.removeListeners=de,this.controls=new Sf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||de}unmount(){this.removeGroupControls(),this.removeListeners()}}const ki=e=>(t,n)=>{e&&U.postRender(()=>e(t,n))};class Tf extends Re{constructor(){super(...arguments),this.removePointerDownListener=de}onPointerDown(t){this.session=new Ei(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ti(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ki(t),onStart:ki(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&U.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Xt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const bn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ji(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(D.test(e))e=parseFloat(e);else return e;const n=ji(e,t.target.x),r=ji(e,t.target.y);return`${n}% ${r}%`}},_f={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ie.parse(e);if(o.length>5)return r;const s=Ie.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=K(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class Ef extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;zc(Pf),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),bn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||U.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Yn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ni(e){const[t,n]=sc(),r=g.useContext(So);return x.jsx(Ef,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Ko),isPresent:t,safeToRemove:n})}const Pf={borderRadius:{...Gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gt,borderTopRightRadius:Gt,borderBottomLeftRadius:Gt,borderBottomRightRadius:Gt,boxShadow:_f};function Af(e,t,n){const r=se(e)?e:Dt(e);return r.start(kr("",r,t,n)),r.animation}function Mf(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Lf=(e,t)=>e.depth-t.depth;class Df{constructor(){this.children=[],this.isDirty=!1}add(t){Bn(this.children,t),this.isDirty=!0}remove(t){$n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Lf),this.isDirty=!1,this.children.forEach(t)}}function Of(e,t){const n=be.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Ne(r),e(s-t))};return U.read(r,!0),()=>Ne(r)}const Vi=["TopLeft","TopRight","BottomLeft","BottomRight"],kf=Vi.length,Ii=e=>typeof e=="string"?parseFloat(e):e,Ri=e=>typeof e=="number"||D.test(e);function jf(e,t,n,r,o,s){o?(e.opacity=K(0,n.opacity!==void 0?n.opacity:1,Nf(r)),e.opacityExit=K(t.opacity!==void 0?t.opacity:1,0,Vf(r))):s&&(e.opacity=K(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<kf;i++){const a=`border${Vi[i]}Radius`;let l=Fi(t,a),c=Fi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ri(l)===Ri(c)?(e[a]=Math.max(K(Ii(l),Ii(c),r),0),(Se.test(c)||Se.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=K(t.rotate||0,n.rotate||0,r))}function Fi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Nf=Bi(0,.5,vs),Vf=Bi(.5,.95,de);function Bi(e,t,n){return r=>r<e?0:r>t?1:n(ct(e,t,r))}function $i(e,t){e.min=t.min,e.max=t.max}function me(e,t){$i(e.x,t.x),$i(e.y,t.y)}function zi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ui(e,t,n,r,o){return e-=t,e=vn(e,1/n,r),o!==void 0&&(e=vn(e,1/o,r)),e}function If(e,t=0,n=1,r=.5,o,s=e,i=e){if(Se.test(t)&&(t=parseFloat(t),t=K(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=K(s.min,s.max,r);e===s&&(a-=t),e.min=Ui(e.min,t,n,a,o),e.max=Ui(e.max,t,n,a,o)}function Xi(e,t,[n,r,o],s,i){If(e,t[n],t[r],t[o],t.scale,s,i)}const Rf=["x","scaleX","originX"],Ff=["y","scaleY","originY"];function Wi(e,t,n,r){Xi(e.x,t,Rf,n?n.x:void 0,r?r.x:void 0),Xi(e.y,t,Ff,n?n.y:void 0,r?r.y:void 0)}function Ki(e){return e.translate===0&&e.scale===1}function Gi(e){return Ki(e.x)&&Ki(e.y)}function qi(e,t){return e.min===t.min&&e.max===t.max}function Bf(e,t){return qi(e.x,t.x)&&qi(e.y,t.y)}function Hi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Yi(e,t){return Hi(e.x,t.x)&&Hi(e.y,t.y)}function Zi(e){return ae(e.x)/ae(e.y)}function Ji(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $f{constructor(){this.members=[]}add(t){Bn(this.members,t),t.scheduleRender()}remove(t){if($n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;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:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function zf(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}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:m,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $r=["","X","Y","Z"],Uf={visibility:"hidden"},Qi=1e3;let Xf=0;function zr(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ea(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ds(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ea(r)}function ta({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Xf++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Gf),this.nodes.forEach(Jf),this.nodes.forEach(Qf),this.nodes.forEach(qf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Df)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Un),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Mf(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Of(f,250),bn.hasAnimatedSinceResize&&(bn.hasAnimatedSinceResize=!1,this.nodes.forEach(ra))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||oh,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Yi(this.targetLayout,p),w=!f&&m;if(this.options.layoutRoot||this.resumeFrom||w||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const M={...Xn(y,"layout"),onPlay:S,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M)}else f||ra(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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,Ne(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(eh),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ea(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(na);return}this.isUpdating||this.nodes.forEach(Yf),this.isUpdating=!1,this.nodes.forEach(Zf),this.nodes.forEach(Wf),this.nodes.forEach(Kf),this.clearAllSnapshots();const a=be.now();re.delta=_e(0,1e3/60,a-re.timestamp),re.timestamp=a,re.isProcessing=!0,Hn.update.process(re),Hn.preRender.process(re),Hn.render.process(re),re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hf),this.sharedNodes.forEach(th)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){U.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ae(this.snapshot.measuredBox.x)&&!ae(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=H(),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(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Je(this.latestValues)||u)&&(o(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)),sh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return H();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(ih))){const{scroll:u}=this.root;u&&(yt(l.x,u.offset.x),yt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=H();if(me(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&me(l,i),yt(l.x,d.offset.x),yt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=H();me(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&vt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Je(u.latestValues)&&vt(l,u.latestValues)}return Je(this.latestValues)&&vt(l,this.latestValues),l}removeTransform(i){const a=H();me(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Je(c.latestValues))continue;Vr(c.latestValues)&&c.updateSnapshot();const u=H(),d=c.measurePageBox();me(u,d),Wi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Je(this.latestValues)&&Wi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==re.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=re.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=H(),this.relativeTargetOrigin=H(),Kt(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=H(),this.targetWithTransforms=H()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):me(this.target,this.layout.layoutBox),xi(this.target,this.targetDelta)):me(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=H(),this.relativeTargetOrigin=H(),Kt(this.relativeTargetOrigin,this.target,m.target),me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Vr(this.parent.latestValues)||gi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===re.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;me(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;cf(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=H());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zi(this.prevProjectionDelta.x,this.projectionDelta.x),zi(this.prevProjectionDelta.y,this.projectionDelta.y)),Wt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!Ji(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ji(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gt(),this.projectionDelta=gt(),this.projectionDeltaWithTransform=gt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=H(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,y=m!==p,S=this.getStack(),v=!S||S.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(rh));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const _=M/1e3;oa(d.x,i.x,_),oa(d.y,i.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nh(this.relativeTarget,this.relativeTargetOrigin,f,_),w&&Bf(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=H()),me(w,this.relativeTarget)),y&&(this.animationValues=u,jf(u,c,this.latestValues,_,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},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&&(Ne(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.update(()=>{bn.hasAnimatedSinceResize=!0,this.currentAnimation=Af(0,Qi,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qi),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&ca(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||H();const d=ae(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=ae(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}me(a,l),vt(a,u),Wt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new $f),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&zr("z",i,c,this.animationValues);for(let u=0;u<$r.length;u++)zr(`rotate${$r[u]}`,i,c,this.animationValues),zr(`skew${$r[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Uf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=pn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=pn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Je(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=zf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:m,y:p}=this.projectionDelta;c.transformOrigin=`${m.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in kt){if(f[y]===void 0)continue;const{correct:S,applyTo:v,isCSSVariable:b}=kt[y],w=c.transform==="none"?f[y]:S(f[y],d);if(v){const M=v.length;for(let _=0;_<M;_++)c[v[_]]=w}else b?this.options.visualElement.renderState.vars[y]=w:c[y]=w}return this.options.layoutId&&(c.pointerEvents=d===this?pn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(na),this.root.sharedNodes.clear()}}}function Wf(e){e.updateLayout()}function Kf(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?pe(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],m=ae(f);f.min=r[d].min,f.max=f.min+m}):ca(s,n.layoutBox,r)&&pe(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],m=ae(r[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=gt();Wt(a,r,n.layoutBox);const l=gt();i?Wt(l,e.applyTransform(o,!0),n.measuredBox):Wt(l,r,n.layoutBox);const c=!Gi(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const p=H();Kt(p,n.layoutBox,f.layoutBox);const y=H();Kt(y,r,m.layoutBox),Yi(p,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Gf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function qf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hf(e){e.clearSnapshot()}function na(e){e.clearMeasurements()}function Yf(e){e.isLayoutDirty=!1}function Zf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ra(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jf(e){e.resolveTargetDelta()}function Qf(e){e.calcProjection()}function eh(e){e.resetSkewAndRotation()}function th(e){e.removeLeadSnapshot()}function oa(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sa(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function nh(e,t,n,r){sa(e.x,t.x,n.x,r),sa(e.y,t.y,n.y,r)}function rh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const oh={duration:.45,ease:[.4,0,.1,1]},ia=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),aa=ia("applewebkit/")&&!ia("chrome/")?Math.round:de;function la(e){e.min=aa(e.min),e.max=aa(e.max)}function sh(e){la(e.x),la(e.y)}function ca(e,t,n){return e==="position"||e==="preserve-aspect"&&!af(Zi(t),Zi(n),.2)}function ih(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const ah=ta({attachResizeListener:(e,t)=>zt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ur={current:void 0},ua=ta({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ur.current){const e=new ah({});e.mount(window),e.setOptions({layoutScroll:!0}),Ur.current=e}return Ur.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),lh={pan:{Feature:Tf},drag:{Feature:wf,ProjectionNode:ua,MeasureLayout:Ni}};function da(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&U.postRender(()=>s(t,Ut(t)))}class ch extends Re{mount(){const{current:t}=this.node;t&&(this.unmount=yc(t,(n,r)=>(da(this.node,r,"Start"),o=>da(this.node,o,"End"))))}unmount(){}}class uh extends Re{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Bt(zt(this.node.current,"focus",()=>this.onFocus()),zt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fa(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&U.postRender(()=>s(t,Ut(t)))}class dh extends Re{mount(){const{current:t}=this.node;t&&(this.unmount=Sc(t,(n,r)=>(fa(this.node,r,"Start"),(o,{success:s})=>fa(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xr=new WeakMap,Wr=new WeakMap,fh=e=>{const t=Xr.get(e.target);t&&t(e)},hh=e=>{e.forEach(fh)};function ph({root:e,...t}){const n=e||document;Wr.has(n)||Wr.set(n,{});const r=Wr.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(hh,{root:e,...t})),r[o]}function mh(e,t,n){const r=ph(t);return Xr.set(e,n),r.observe(e),()=>{Xr.delete(e),r.unobserve(e)}}const gh={some:0,all:1};class yh extends Re{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:gh[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return mh(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(vh(t,n))&&this.startObserver()}unmount(){}}function vh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xh={inView:{Feature:yh},tap:{Feature:dh},focus:{Feature:uh},hover:{Feature:ch}},bh={layout:{ProjectionNode:ua,MeasureLayout:Ni}},Kr={current:null},ha={current:!1};function Sh(){if(ha.current=!0,!!Rn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kr.current=e.matches;e.addListener(t),t()}else Kr.current=!1}const Ch=[...Fs,ie,Ie],wh=e=>Ch.find(Rs(e)),Th=new WeakMap;function _h(e,t,n){for(const r in t){const o=t[r],s=n[r];if(se(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&on(o.version==="12.5.0",`Attempting to mix Motion versions ${o.version} with 12.5.0 may not work as expected.`);else if(se(s))e.addValue(r,Dt(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Dt(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const pa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Eh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Er,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=be.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,U.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=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=fn(n),this.isVariantNode=Uo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const p=f[m];l[m]!==void 0&&se(p)&&p.set(l[m],!1)}}mount(t){this.current=t,Th.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),ha.current||Sh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kr.current,process.env.NODE_ENV!=="production"&&on(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(),Ne(this.notifyUpdate),Ne(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=Ge.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&U.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ut){const n=ut[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):H()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<pa.length;r++){const o=pa[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=_h(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Dt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=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 o!=null&&(typeof o=="string"&&(Vs(o)||bs(o))?o=parseFloat(o):!wh(o)&&Ie.test(n)&&(o=As(t,n)),this.setBaseTarget(t,se(o)?o.get():o)),se(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=ur(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!se(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Un),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ma extends Eh{constructor(){super(...arguments),this.KeyframeResolver=$s}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;se(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ph(e){return window.getComputedStyle(e)}class Ah extends ma{constructor(){super(...arguments),this.type="html",this.renderInstance=ss}readValueFromInstance(t,n){if(Ge.has(n))return Fu(t,n);{const r=Ph(t),o=(nr(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wi(t,n)}build(t,n,r){sr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fr(t,n,r)}}class Mh extends ma{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=H,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&os(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ge.has(n)){const r=Ps(n);return r&&r.default||0}return n=is.has(n)?n:tr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ls(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&U.postRender(this.updateDimensions)}build(t,n,r){lr(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){as(t,n,r,o)}mount(t){this.isSVGTag=cr(t.tagName),super.mount(t)}}const Lh=(e,t)=>ar(e)?new Mh(t):new Ah(t,{allowProjection:e!==g.Fragment}),Dh=fu({...Jd,...xh,...lh,...bh},Lh),Qe=Mc(Dh),Oh={root:"_root_uup2j_1"},ga={bgDefault:"c-corporate-default-bg",cBlack:"c-corporate-default-black",cBlue:"c-corporate-default-blue",bgDark:"c-corporate-default-dark-bg",cDarkBlue:"c-corporate-default-dark-blue",cDarkGreen:"c-corporate-default-dark-green",cGreen:"c-corporate-default-green",cRichBlue:"c-corporate-default-rich-blue",grey050:"c-grey-050",grey100:"c-grey-100",grey200:"c-grey-200",grey300:"c-grey-300",grey400:"c-grey-400",grey500:"c-grey-500",grey600:"c-grey-600",grey700:"c-grey-700",grey800:"c-grey-800",grey900:"c-grey-900",rFull:"radius-full",rL:"radius-l",rM:"radius-m",rNone:"radius-none",rS:"radius-s",rXL:"radius-xl",rXS:"radius-xs",rXXL:"radius-xxl",rXXS:"radius-xxs",pXXS:"p-xxs",pXS:"p-xs",pS:"p-s",pM:"p-m",pL:"p-l",pXL:"p-xl",pXXL:"p-xxl",pxXXS:"px-xxs",pxXS:"px-xs",pxS:"px-s",pxM:"px-m",pxL:"px-l",pxXL:"px-xl",pxXXL:"px-xxl",pyXXS:"py-xxs",pyXS:"py-xs",pyS:"py-s",pyM:"py-m",pyL:"py-l",pyXL:"py-xl",pyXXL:"py-xxl",ptXXS:"pt-xxs",ptXS:"pt-xs",ptS:"pt-s",ptM:"pt-m",ptL:"pt-l",ptXL:"pt-xl",ptXXL:"pt-xxl",prXXS:"pr-xxs",prXS:"pr-xs",prS:"pr-s",prM:"pr-m",prL:"pr-l",prXL:"pr-xl",prXXL:"pr-xxl",pbXXS:"pb-xxs",pbXS:"pb-xs",pbS:"pb-s",pbM:"pb-m",pbL:"pb-l",pbXL:"pb-xl",pbXXL:"pb-xxl",plXXS:"pl-xxs",plXS:"pl-xs",plS:"pl-s",plM:"pl-m",plL:"pl-l",plXL:"pl-xl",plXXL:"pl-xxl",mXXS:"m-xxs",mXS:"m-xs",mS:"m-s",mM:"m-m",mL:"m-l",mXL:"m-xl",mXXL:"m-xxl",mxXXS:"mx-xxs",mxXS:"mx-xs",mxS:"mx-s",mxM:"mx-m",mxL:"mx-l",mxXL:"mx-xl",mxXXL:"mx-xxl",myXXS:"my-xxs",myXS:"my-xs",myS:"my-s",myM:"my-m",myL:"my-l",myXL:"my-xl",myXXL:"my-xxl",mtXXS:"mt-xxs",mtXS:"mt-xs",mtS:"mt-s",mtM:"mt-m",mtL:"mt-l",mtXL:"mt-xl",mtXXL:"mt-xxl",mrXXS:"mr-xxs",mrXS:"mr-xs",mrS:"mr-s",mrM:"mr-m",mrL:"mr-l",mrXL:"mr-xl",mrXXL:"mr-xxl",mbXXS:"mb-xxs",mbXS:"mb-xs",mbS:"mb-s",mbM:"mb-m",mbL:"mb-l",mbXL:"mb-xl",mbXXL:"mb-xxl",mlXXS:"ml-xxs",mlXS:"ml-xs",mlS:"ml-s",mlM:"ml-m",mlL:"ml-l",mlXL:"ml-xl",mlXXL:"ml-xxl",fsXXXS:"fs-xxxs",fsXXS:"fs-xxs",fsXS:"fs-xs",fsS:"fs-s",fsM:"fs-m",fsL:"fs-l",fsXL:"fs-xl",fsXXL:"fs-xxl",fsXXXL:"fs-xxxl",fwRegular:"fw-regular",fwSemibold:"fw-semibold",fwBold:"fw-bold",dBlock:"d-block",dInBlock:"d-in-block",taLeft:"ta-left",taCenter:"ta-center",mwSM:"mw-sm",mwMD:"mw-md",mwLG:"mw-lg",mwXL:"mw-xl",mwXXL:"mw-xxl",mw3XL:"mw-3xl",shNone:"sh-none"};function Fe(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ga).includes(t)).filter(t=>e[t]===!0).map(t=>ga[t]):null}const et="Errore: ",kh="Impossibile acquisire la posizione.",Gr="Impossibile caricare i punti di mappa.",jh="Si è verificato un errore.",Nh="Impossibile caricare i suggerimenti.",Vh="Impossibile caricare i dettagli della location.",Ih="Impossibile caricare la mappa.",Rh="Impossibile trovare punti di mappa nell'area di ricerca.",Fh="Ottieni indicazioni di navigazione per questa destinazione",Bh="Condividi questa destinazione",$h="Scarica l'evento",zh=3e3,ya=6,qt={north:47.1,south:36.6,east:18.6,west:6.6},Uh={lat:(qt.north+qt.south)/2,lng:(qt.east+qt.west)/2},Xh=2e4;function Ee(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Pe(e){return e?e.split("").reduce((t,n)=>(/[A-Z]/.test(n)?e.indexOf(n)===0?t+=n.toLowerCase():t+="-"+n.toLowerCase():t+=n,t),""):""}function qr(e){const{type:t,url:n}=e??{};switch(t){case"navigate":case"directions":return{"aria-label":Fh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"share":return{"aria-label":Bh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":$h,as:"a",href:n??"#",download:!0,target:"_blank",rel:"noopener noreferrer"};case"email":default:return{}}}function Wh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}const va="Anchor";function xa({as:e,wrapper:t,children:n,variant:r="default",className:o,animate:s=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},m){const p=t||"span",y=s?Qe[p]:p,S=e||"a",v=Fe(f)??[],b=s?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},M=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return x.jsx(y,{className:q(Oh.root,"dyn-locator__"+Pe(va),Ee(o),...v),"data-variant":r,...d?{style:d}:{},...b,...f,children:x.jsx(S,{ref:m,href:a,target:l,rel:M,...u,children:n})})}xa.displayName=va;const ba=g.forwardRef(xa),Sa="ErrorBanner";function Ca({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:r,errorDetails:o,className:s,children:i,...a}){const l=Fe(a)??[];return x.jsxs("div",{className:q("dyn-locator__"+Pe(Sa),At.root,Ee(s),...l??[]),children:[x.jsxs("header",{className:At.header,children:[x.jsx(Hl,{size:28,color:"currentColor",className:At.icon})," ",x.jsx("h3",{children:e})]}),x.jsxs("div",{className:At.body,children:[x.jsx("p",{children:t}),n&&r&&x.jsxs("p",{children:["Prova a"," ",x.jsx(ba,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,o&&x.jsx("div",{className:At.content,children:x.jsx("pre",{children:o})})]})]})}Ca.displayName=Sa;const wa=Ca;class Kh extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||x.jsx("div",{className:Bl.container,children:x.jsx(wa,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Ta={ArrowLeft:Xl,ArrowUpRight:Kl,ChevronUp:ql,ChevronDown:Gl,Close:bo,Expand:Jl,Location:Zl,Search:tc,Share:nc,Target:Yl},Ae={root:"_root_1cmog_4",header:"_header_1cmog_21",body:"_body_1cmog_22",cta:"_cta_1cmog_23",titleContainer:"_titleContainer_1cmog_40",shareButton:"_shareButton_1cmog_51",capabilities:"_capabilities_1cmog_59",tagContainer:"_tagContainer_1cmog_72",tag:"_tag_1cmog_72"},xt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Hr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function Gh(e){return g.isValidElement(e)||typeof e=="function"}function qh(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function Hh(e){return!!e&&typeof e=="object"&&"path"in e}const _a="Icon";function Ea({as:e,icon:t,iconRef:n,label:r,size:o="S",radius:s,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const m=e||"span",p=l?Qe[m]:m,{iconMap:y}=np();function S(w){if(qh(w)){const M=typeof w=="string"?w:w.name;return y[M]?g.createElement(y[M],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Hr.icon}):'No icon found for "'+M+'"!'}return Hh(w)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),x.jsx("img",{...n?{ref:n}:{},src:w.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:Hr.icon})):"No icon provided"}const v=Fe(d)??[],b=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return x.jsx(p,{ref:f,className:q(Hr.root,"dyn-locator__"+Pe(_a),Ee(a),...v),...u?{style:u}:{},"data-variant":i,"data-size":o,...s?{"data-radius":s}:{},...b,...d,children:S(t)})}Ea.displayName=_a;const Be=g.forwardRef(Ea),Pa="Tag";function Aa({as:e,iconPosition:t="left",children:n,icon:r,className:o,animate:s=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=s?Qe[u]:u,f=Fe(l)??[],m=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return x.jsx(d,{ref:c,className:q(xt.root,"dyn-locator__"+Pe(Pa),Ee(o),...f),"data-icon-position":t,...a?{style:a}:{},...m,...l,children:x.jsxs("div",{className:xt.container,children:[r?x.jsx("div",{className:xt.icon,children:Gh(r)?typeof r=="function"?x.jsx(r,{className:xt.icon}):r:x.jsx(Be,{className:xt.icon,icon:r})}):null,x.jsx("div",{className:xt.label,children:n})]})})}Aa.displayName=Pa;const Yh=g.forwardRef(Aa),Zh={root:"_root_u5v4v_1"},Ma="IconButton";function La({as:e,children:t,className:n,variant:r="default",animate:o=!0,animationDelay:s=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},m){const p=e||"button",y=o?Qe[p]:p,S=Fe(f)??[],v=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:s,duration:.2}}:{},b=p==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return x.jsx(y,{ref:m,className:q(Zh.root,"dyn-locator__"+Pe(Ma),Ee(n),...S),"data-variant":r,"data-element":p,"aria-label":a,disabled:d,...i?{style:i}:{},...v,...b,...f,children:t})}La.displayName=Ma;const bt=g.forwardRef(La),Da={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Oa="Card";function ka({as:e,children:t,className:n,variant:r="default",animate:o=!0,animationDelay:s=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=o?Qe[d]:d,m=Fe(c)??[],p=o?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:s,duration:.3}}:{};return x.jsx(f,{ref:u,className:q(Da.root,"dyn-locator__"+Pe(Oa),Ee(n),...m),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...p,...c,children:r==="bare"?t:x.jsx("div",{className:Da.content,children:t})})}ka.displayName=Oa;const Jh=g.forwardRef(ka);function ja(e){const{componentMap:t}=rp();return t[e]}const Na="LocationCard";function Va({title:e,timestamp:t,address:n,capabilities:r,on_share:o,actions:s,className:i,...a},l){const c=ja("ctaButton");return x.jsx(Jh,{ref:l,variant:"bare",clickable:!0,className:q("dyn-locator__"+Pe(Na),Ee(i)),...a,style:{...a.style?a.style:{},padding:"var(--dyn-locator__spacing-xs) 0",borderRadius:"var(--dyn-locator__radius-s)",border:"1px solid var(--dyn-locator__colors-grey-grey-100)",boxShadow:"none"},children:x.jsxs("div",{className:Ae.root,children:[x.jsxs("header",{className:Ae.header,children:[t?x.jsx("time",{children:new Date(t).toLocaleDateString("it",{day:"numeric",month:"long",year:"numeric"})}):null,x.jsxs("div",{className:Ae.titleContainer,children:[e?x.jsx("h4",{children:e}):null,x.jsx(bt,{className:Ae.shareButton,variant:"bare",...qr(o),children:x.jsx(Be,{size:"M",icon:"Share"})})]}),n?x.jsx("address",{children:n}):null]}),r!=null&&r.length?x.jsx("div",{className:Ae.body,children:r.map((u,d)=>x.jsxs("div",{className:Ae.capabilities,children:[x.jsx("h5",{children:u.title}),x.jsx("ul",{className:Ae.tagContainer,children:(u.capabilities??[]).map((f,m)=>x.jsx(Yh,{as:"li",animationDelay:+`.${m+1}`,className:Ae.tag,children:f.label},m))})]},d))}):null,s!=null&&s.length?x.jsx("div",{className:Ae.cta,children:s.map((u,d)=>x.jsx(c,{animate:!1,fullWidth:!0,variant:d===0?"themed":"secondary",...qr(u),children:u.label},d))}):null]})})}Va.displayName=Na;const Qh=g.forwardRef(Va),Ia={root:"_root_o9d55_1",loader:"_loader_o9d55_73"},Ra="Button";function Fa({as:e,children:t,className:n,variant:r="default",size:o="medium",disabled:s=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:m,...p},y){const S=e||(u?"a":"button"),v=l?Qe[S]:S,b=Fe(p)??[],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 x.jsx(v,{ref:y,className:q(Ia.root,"dyn-locator__"+Pe(Ra),Ee(n),...b),"data-variant":r,"data-size":o,"data-full-width":a,disabled:s||i,...m?{style:m}:{},...w,...M,...p,children:i?x.jsxs("span",{style:{display:"flex",gap:10},children:[t,x.jsx("span",{className:Ia.loader,"aria-hidden":"true"})]}):t})}Fa.displayName=Ra;const Ht=g.forwardRef(Fa),Ba={locationCard:Qh,ctaButton:Ht},ep={iconMap:Ta,componentMap:Ba},Yr=g.createContext(ep);function tp({children:e,customIcons:t,customComponents:n}){const r={...Ta,...t??{}},o={...Ba,...n??{}};return x.jsx(Yr.Provider,{value:{iconMap:r,componentMap:o},children:e})}function np(){const{iconMap:e}=g.useContext(Yr);return{iconMap:e}}function rp(){const{componentMap:e}=g.useContext(Yr);return{componentMap:e}}var Yt=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(Yt||{});const $a=g.createContext({endpointMap:{},apiUrl:""});function op({children:e,endpoints:t,apiUrl:n}){var r;if(!n||!((r=Object.keys(t??{}))!=null&&r.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return x.jsx($a.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function sp(e){const{endpointMap:t,apiUrl:n}=g.useContext($a);return{getEndpoint:(r={})=>{const o=t[e];if(!o)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let s="";return o.buildPath?s=o.buildPath(r):(s=o.path,Object.entries(r).forEach(([i,a])=>{s=s.replace(`:${i}`,String(a))})),{url:`${n}${s}`,method:o.method}}}}let ip={data:""},ap=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||ip,lp=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,cp=/\/\*[^]*?\*\/| +/g,za=/\n+/g,$e=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":r+=s[1]=="f"?$e(i,s):s+"{"+$e(i,s[1]=="k"?"":t)+"}":typeof i=="object"?r+=$e(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=$e.p?$e.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Me={},Ua=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ua(e[n]);return t}return e},up=(e,t,n,r,o)=>{let s=Ua(e),i=Me[s]||(Me[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!Me[i]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=lp.exec(c.replace(cp,""));)u[4]?f.shift():u[3]?(d=u[3].replace(za," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(za," ").trim();return f[0]})(e);Me[i]=$e(o?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&Me.g?Me.g:null;return n&&(Me.g=Me[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)})(Me[i],t,r,a),i},dp=(e,t,n)=>e.reduce((r,o,s)=>{let i=t[s];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?"":$e(a,""):a===!1?"":a}return r+o+(i??"")},"");function Sn(e){let t=this||{},n=e.call?e(t.p):e;return up(n.unshift?n.raw?dp(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,ap(t.target),t.g,t.o,t.k)}let Xa,Zr,Jr;Sn.bind({g:1});let Le=Sn.bind({k:1});function fp(e,t,n,r){$e.p=t,Xa=e,Zr=n,Jr=r}function ze(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),l=a.className||o.className;n.p=Object.assign({theme:Zr&&Zr()},a),n.o=/ *go\d+/.test(l),a.className=Sn.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Jr&&c[0]&&Jr(a),Xa(c,a)}return t?t(o):o}}var hp=e=>typeof e=="function",Cn=(e,t)=>hp(e)?e(t):e,pp=(()=>{let e=0;return()=>(++e).toString()})(),Wa=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),mp=20,Ka=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,mp)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return Ka(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},wn=[],tt={toasts:[],pausedAt:void 0},nt=e=>{tt=Ka(tt,e),wn.forEach(t=>{t(tt)})},gp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},yp=(e={})=>{let[t,n]=g.useState(tt),r=g.useRef(tt);g.useEffect(()=>(r.current!==tt&&n(tt),wn.push(n),()=>{let s=wn.indexOf(n);s>-1&&wn.splice(s,1)}),[]);let o=t.toasts.map(s=>{var i,a,l;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((a=e[s.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||gp[s.type],style:{...e.style,...(l=e[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:o}},vp=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||pp()}),Zt=e=>(t,n)=>{let r=vp(t,e,n);return nt({type:2,toast:r}),r.id},Y=(e,t)=>Zt("blank")(e,t);Y.error=Zt("error"),Y.success=Zt("success"),Y.loading=Zt("loading"),Y.custom=Zt("custom"),Y.dismiss=e=>{nt({type:3,toastId:e})},Y.remove=e=>nt({type:4,toastId:e}),Y.promise=(e,t,n)=>{let r=Y.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(o=>{let s=t.success?Cn(t.success,o):void 0;return s?Y.success(s,{id:r,...n,...n==null?void 0:n.success}):Y.dismiss(r),o}).catch(o=>{let s=t.error?Cn(t.error,o):void 0;s?Y.error(s,{id:r,...n,...n==null?void 0:n.error}):Y.dismiss(r)}),e};var xp=(e,t)=>{nt({type:1,toast:{id:e,height:t}})},bp=()=>{nt({type:5,time:Date.now()})},Jt=new Map,Sp=1e3,Cp=(e,t=Sp)=>{if(Jt.has(e))return;let n=setTimeout(()=>{Jt.delete(e),nt({type:4,toastId:e})},t);Jt.set(e,n)},wp=e=>{let{toasts:t,pausedAt:n}=yp(e);g.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(l<0){a.visible&&Y.dismiss(a.id);return}return setTimeout(()=>Y.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=g.useCallback(()=>{n&&nt({type:6,time:Date.now()})},[n]),o=g.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(m=>(m.position||c)===(s.position||c)&&m.height),d=u.findIndex(m=>m.id===s.id),f=u.filter((m,p)=>p<d&&m.visible).length;return u.filter(m=>m.visible).slice(...a?[f+1]:[0,f]).reduce((m,p)=>m+(p.height||0)+l,0)},[t]);return g.useEffect(()=>{t.forEach(s=>{if(s.dismissed)Cp(s.id,s.removeDelay);else{let i=Jt.get(s.id);i&&(clearTimeout(i),Jt.delete(s.id))}})},[t]),{toasts:t,handlers:{updateHeight:xp,startPause:bp,endPause:r,calculateOffset:o}}},Tp=Le`
|
|
128
|
+
*/const ic=se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
129
|
+
* @license lucide-react v0.483.0 - ISC
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the ISC license.
|
|
132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/const ac=se("SquareArrowOutUpRight",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]]);/**
|
|
134
|
+
* @license lucide-react v0.483.0 - ISC
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the ISC license.
|
|
137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/const Sr=se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wr=m.createContext({});function lc(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Bn=typeof window<"u",cc=Bn?m.useLayoutEffect:m.useEffect,Fn=m.createContext(null),Cr=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function uc(e=!0){const t=m.useContext(Fn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=m.useId();m.useEffect(()=>{if(e)return r(s)},[e]);const i=m.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,i]:[!0]}function $n(e,t){e.indexOf(t)===-1&&e.push(t)}function zn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const he=e=>e;let ut=he,Ve=he;process.env.NODE_ENV!=="production"&&(ut=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ve=(e,t)=>{if(!e)throw new Error(t)});const dc={useManualTiming:!1};function Un(e){let t;return()=>(t===void 0&&(t=e()),t)}const dt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Xn{constructor(){this.subscriptions=[]}add(t){return $n(this.subscriptions,t),()=>zn(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const i=this.subscriptions[s];i&&i(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Se=e=>e*1e3,Ee=e=>e/1e3;function _r(e,t){return t?e*(1e3/t):0}const Tr=new Set;function an(e,t,n){e||Tr.has(t)||(console.warn(t),Tr.add(t))}const fc=Un(()=>window.ScrollTimeline!==void 0);class hc{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 o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if(fc()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].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 pc extends hc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Wn(e,t){return e?e[t]||e.default||e:void 0}const Gn=2e4;function Er(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Gn;)t+=n,o=e.next(t);return t>=Gn?1/0:t}function Kn(e){return typeof e=="function"}function Pr(e,t){e.timeline=t,e.onfinish=null}const Hn=e=>Array.isArray(e)&&typeof e[0]=="number",mc={linearEasing:void 0};function gc(e,t){const n=Un(e);return()=>{var o;return(o=mc[t])!==null&&o!==void 0?o:n()}}const ln=gc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ar=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(dt(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function Mr(e){return!!(typeof e=="function"&&ln()||!e||typeof e=="string"&&(e in qn||ln())||Hn(e)||Array.isArray(e)&&e.every(Mr))}const Lt=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,qn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Lt([0,.65,.55,1]),circOut:Lt([.55,0,1,.45]),backIn:Lt([.31,.01,.66,-.59]),backOut:Lt([.33,1.53,.69,.99])};function Lr(e,t){if(e)return typeof e=="function"&&ln()?Ar(e,t):Hn(e)?Lt(e):Array.isArray(e)?e.map(n=>Lr(n,t)||qn.easeOut):qn[e]}const cn=["read","resolveKeyframes","update","preRender","render","postRender"],Dr={value:null};function yc(e,t){let n=new Set,o=new Set,r=!1,s=!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,g=!1)=>{const v=g&&r?n:o;return f&&i.add(d),v.has(d)||v.add(d),d},cancel:d=>{o.delete(d),i.delete(d)},process:d=>{if(a=d,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(c),t&&Dr.value&&Dr.value.frameloop[t].push(l),l=0,n.clear(),r=!1,s&&(s=!1,u.process(d))}};return u}const vc=40;function kr(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=cn.reduce((x,b)=>(x[b]=yc(s,t?b:void 0),x),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,g=()=>{const x=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(x-r.timestamp,vc),1),r.timestamp=x,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(g))},h=()=>{n=!0,o=!0,r.isProcessing||e(g)};return{schedule:cn.reduce((x,b)=>{const C=i[b];return x[b]=(P,T=!1,M=!1)=>(n||h(),C.schedule(P,T,M)),x},{}),cancel:x=>{for(let b=0;b<cn.length;b++)i[cn[b]].cancel(x)},state:r,steps:i}}const{schedule:X,cancel:Ie,state:oe,steps:Yn}=kr(typeof requestAnimationFrame<"u"?requestAnimationFrame:he,!0),{schedule:Zn}=kr(queueMicrotask,!1);let un;function xc(){un=void 0}const we={now:()=>(un===void 0&&we.set(oe.isProcessing||dc.useManualTiming?oe.timestamp:performance.now()),un),set:e=>{un=e,queueMicrotask(xc)}},xe={x:!1,y:!1};function Or(){return xe.x||xe.y}function bc(e){return e==="x"||e==="y"?xe[e]?null:(xe[e]=!0,()=>{xe[e]=!1}):xe.x||xe.y?null:(xe.x=xe.y=!0,()=>{xe.x=xe.y=!1})}function Sc(e,t,n){var o;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function jr(e,t){const n=Sc(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function Nr(e){return!(e.pointerType==="touch"||Or())}function wc(e,t,n={}){const[o,r,s]=jr(e,n),i=a=>{if(!Nr(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Nr(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,r)};return o.forEach(a=>{a.addEventListener("pointerenter",i,r)}),s}function Vr(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 Ir=(e,t)=>t?e===t?!0:Ir(e,t.parentElement):!1,Jn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Cc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _c(e){return Cc.has(e.tagName)||e.tabIndex!==-1}const Dt=new WeakSet;function Rr(e){return t=>{t.key==="Enter"&&e(t)}}function Qn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Tc=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Rr(()=>{if(Dt.has(n))return;Qn(n,"down");const r=Rr(()=>{Qn(n,"up")}),s=()=>Qn(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Br(e){return Jn(e)&&!Or()}function Ec(e,t,n={}){const[o,r,s]=jr(e,n),i=a=>{const l=a.currentTarget;if(!l||!Br(a)||Dt.has(l))return;Dt.add(l),Vr(a,"set");const c=t(l,a),u=(g,h)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Vr(g,"release"),!(!Br(g)||!Dt.has(l))&&(Dt.delete(l),typeof c=="function"&&c(g,{success:h}))},d=g=>{(g.isTrusted?Pc(g,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(g,!1):u(g,!(l instanceof Element)||Ir(l,g.target))},f=g=>{u(g,!1)};l.addEventListener("pointerup",d,r),l.addEventListener("pointercancel",f,r),l.addEventListener("lostpointercapture",f,r)};return o.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!_c(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,r),l&&a.addEventListener("focus",c=>Tc(c,r),r)}),s}function Pc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Fr=30,Ac=e=>!isNaN(parseFloat(e));class Mc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=we.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&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=we.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Ac(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&an(!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 Xn);const o=this.events[t].add(n);return t==="change"?()=>{o(),X.read(()=>{this.events.change.getSize()||this.stop()})}:o}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,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}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=we.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fr);return _r(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 kt(e,t){return new Mc(e,t)}const $r=m.createContext({strict:!1}),zr={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"]},ft={};for(const e in zr)ft[e]={isEnabled:t=>zr[e].some(n=>!!t[n])};function Lc(e){for(const t in e)ft[t]={...ft[t],...e[t]}}const Dc=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 dn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Dc.has(e)}let Ur=e=>!dn(e);function kc(e){e&&(Ur=t=>t.startsWith("on")?!dn(t):e(t))}try{kc(require("@emotion/is-prop-valid").default)}catch{}function Oc(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(Ur(r)||n===!0&&dn(r)||!t&&!dn(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}function jc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&an(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const fn=m.createContext({});function hn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ot(e){return typeof e=="string"||Array.isArray(e)}const eo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],to=["initial",...eo];function pn(e){return hn(e.animate)||to.some(t=>Ot(e[t]))}function Xr(e){return!!(pn(e)||e.variants)}function Nc(e,t){if(pn(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Ot(n)?n:void 0,animate:Ot(o)?o:void 0}}return e.inherit!==!1?t:{}}function Vc(e){const{initial:t,animate:n}=Nc(e,m.useContext(fn));return m.useMemo(()=>({initial:t,animate:n}),[Wr(t),Wr(n)])}function Wr(e){return Array.isArray(e)?e.join(" "):e}const Ic=Symbol.for("motionComponentSymbol");function ht(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Rc(e,t,n){return m.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):ht(n)&&(n.current=o))},[t])}const no=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Gr="data-"+no("framerAppearId"),Kr=m.createContext({});function Bc(e,t,n,o,r){var s,i;const{visualElement:a}=m.useContext(fn),l=m.useContext($r),c=m.useContext(Fn),u=m.useContext(Cr).reducedMotion,d=m.useRef(null);o=o||l.renderer,!d.current&&o&&(d.current=o(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,g=m.useContext(Kr);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&Fc(d.current,n,r,g);const h=m.useRef(!1);m.useInsertionEffect(()=>{f&&h.current&&f.update(n,c)});const v=n[Gr],S=m.useRef(!!v&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,v))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,v)));return cc(()=>{f&&(h.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Zn.render(f.render),S.current&&f.animationState&&f.animationState.animateChanges())}),m.useEffect(()=>{f&&(!S.current&&f.animationState&&f.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,v)}),S.current=!1))}),f}function Fc(e,t,n,o){const{layoutId:r,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Hr(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!i||a&&ht(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:c})}function Hr(e){if(e)return e.options.allowProjection!==!1?e.projection:Hr(e.parent)}function $c({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,i;e&&Lc(e);function a(c,u){let d;const f={...m.useContext(Cr),...c,layoutId:zc(c)},{isStatic:g}=f,h=Vc(c),v=o(c,g);if(!g&&Bn){Uc(f,e);const S=Xc(f);d=S.MeasureLayout,h.visualElement=Bc(r,v,f,t,S.ProjectionNode)}return y.jsxs(fn.Provider,{value:h,children:[d&&h.visualElement?y.jsx(d,{visualElement:h.visualElement,...f}):null,n(r,c,Rc(v,h.visualElement,u),v,g,h.visualElement)]})}a.displayName=`motion.${typeof r=="string"?r:`create(${(i=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&i!==void 0?i:""})`}`;const l=m.forwardRef(a);return l[Ic]=r,l}function zc({layoutId:e}){const t=m.useContext(wr).id;return t&&e!==void 0?t+"-"+e:e}function Uc(e,t){const n=m.useContext($r).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ut(!1,o):Ve(!1,o)}}function Xc(e){const{drag:t,layout:n}=ft;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const qr=e=>t=>typeof t=="string"&&t.startsWith(e),oo=qr("--"),Wc=qr("var(--"),ro=e=>Wc(e)?Gc.test(e.split("/*")[0].trim()):!1,Gc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,jt={};function Kc(e){for(const t in e)jt[t]=e[t],oo(t)&&(jt[t].isCSSVariable=!0)}const pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qe=new Set(pt);function Yr(e,{layout:t,layoutId:n}){return qe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!jt[e]||e==="opacity")}const ie=e=>!!(e&&e.getVelocity),Zr=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Pe=(e,t,n)=>n>t?t:n<e?e:n,mt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Nt={...mt,transform:e=>Pe(0,1,e)},mn={...mt,default:1},Vt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Re=Vt("deg"),Ce=Vt("%"),D=Vt("px"),Hc=Vt("vh"),qc=Vt("vw"),Jr={...Ce,parse:e=>Ce.parse(e)/100,transform:e=>Ce.transform(e*100)},Yc={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},Zc={rotate:Re,rotateX:Re,rotateY:Re,rotateZ:Re,scale:mn,scaleX:mn,scaleY:mn,scaleZ:mn,skew:Re,skewX:Re,skewY:Re,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:Nt,originX:Jr,originY:Jr,originZ:D},Qr={...mt,transform:Math.round},so={...Yc,...Zc,zIndex:Qr,size:D,fillOpacity:Nt,strokeOpacity:Nt,numOctaves:Qr},Jc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qc=pt.length;function eu(e,t,n){let o="",r=!0;for(let s=0;s<Qc;s++){const i=pt[s],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=Zr(a,so[i]);if(!l){r=!1;const u=Jc[i]||i;o+=`${u}(${c}) `}n&&(t[i]=c)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function io(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(qe.has(l)){i=!0;continue}else if(oo(l)){r[l]=c;continue}else{const u=Zr(c,so[l]);l.startsWith("origin")?(a=!0,s[l]=u):o[l]=u}}if(t.transform||(i||n?o.transform=eu(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;o.transformOrigin=`${l} ${c} ${u}`}}const ao=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function es(e,t,n){for(const o in t)!ie(t[o])&&!Yr(o,n)&&(e[o]=t[o])}function tu({transformTemplate:e},t){return m.useMemo(()=>{const n=ao();return io(n,t,e),Object.assign({},n.vars,n.style)},[t])}function nu(e,t){const n=e.style||{},o={};return es(o,n,e),Object.assign(o,tu(e,t)),o}function ou(e,t){const n={},o=nu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,n}const ru=["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 lo(e){return typeof e!="string"||e.includes("-")?!1:!!(ru.indexOf(e)>-1||/[A-Z]/u.test(e))}const su={offset:"stroke-dashoffset",array:"stroke-dasharray"},iu={offset:"strokeDashoffset",array:"strokeDasharray"};function au(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?su:iu;e[s.offset]=D.transform(-o);const i=D.transform(t),a=D.transform(n);e[s.array]=`${i} ${a}`}function ts(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function lu(e,t,n){const o=ts(t,e.x,e.width),r=ts(n,e.y,e.height);return`${o} ${r}`}function co(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(io(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:g,dimensions:h}=e;f.transform&&(h&&(g.transform=f.transform),delete f.transform),h&&(r!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=lu(h,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),i!==void 0&&au(f,i,a,l,!1)}const ns=()=>({...ao(),attrs:{}}),uo=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cu(e,t,n,o){const r=m.useMemo(()=>{const s=ns();return co(s,t,uo(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};es(s,e.style,e),r.style={...s,...r.style}}return r}function uu(e=!1){return(n,o,r,{latestValues:s},i)=>{const l=(lo(n)?cu:ou)(o,s,i,n),c=Oc(o,typeof n=="string",e),u=n!==m.Fragment?{...c,...l,ref:r}:{},{children:d}=o,f=m.useMemo(()=>ie(d)?d.get():d,[d]);return m.createElement(n,{...u,children:f})}}function os(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function fo(e,t,n,o){if(typeof t=="function"){const[r,s]=os(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=os(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const ho=e=>Array.isArray(e),du=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),fu=e=>ho(e)?e[e.length-1]||0:e;function gn(e){const t=ie(e)?e.get():e;return du(t)?t.toValue():t}function hu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const i={latestValues:pu(o,r,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:o,current:a,...i}),i.onUpdate=a=>n(a)),i}const rs=e=>(t,n)=>{const o=m.useContext(fn),r=m.useContext(Fn),s=()=>hu(e,t,o,r);return n?s():lc(s)};function pu(e,t,n,o){const r={},s=o(e,{});for(const f in s)r[f]=gn(s[f]);let{initial:i,animate:a}=e;const l=pn(e),c=Xr(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"&&!hn(d)){const f=Array.isArray(d)?d:[d];for(let g=0;g<f.length;g++){const h=fo(e,f[g]);if(h){const{transitionEnd:v,transition:S,...x}=h;for(const b in x){let C=x[b];if(Array.isArray(C)){const P=u?C.length-1:0;C=C[P]}C!==null&&(r[b]=C)}for(const b in v)r[b]=v[b]}}}return r}function po(e,t,n){var o;const{style:r}=e,s={};for(const i in r)(ie(r[i])||t.style&&ie(t.style[i])||Yr(i,e)||((o=n==null?void 0:n.getValue(i))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(s[i]=r[i]);return s}const mu={useVisualState:rs({scrapeMotionValuesFromProps:po,createRenderState:ao})};function ss(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 is(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const as=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 ls(e,t,n,o){is(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(as.has(r)?r:no(r),t.attrs[r])}function cs(e,t,n){const o=po(e,t,n);for(const r in e)if(ie(e[r])||ie(t[r])){const s=pt.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const us=["x","y","width","height","cx","cy","r"],gu={useVisualState:rs({scrapeMotionValuesFromProps:cs,createRenderState:ns,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in r)if(qe.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<us.length;a++){const l=us[a];e[l]!==t[l]&&(i=!0)}i&&X.read(()=>{ss(n,o),X.render(()=>{co(o,r,uo(n.tagName),e.transformTemplate),ls(n,o)})})}})};function yu(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const i={...lo(o)?gu:mu,preloadedFeatures:e,useRender:uu(r),createVisualElement:t,Component:o};return $c(i)}}function It(e,t,n){const o=e.getProps();return fo(o,t,n!==void 0?n:o.custom,e)}const ds=new Set(["width","height","top","left","right","bottom",...pt]);function vu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,kt(n))}function xu(e,t){const n=It(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const i in s){const a=fu(s[i]);vu(e,i,a)}}function bu(e){return!!(ie(e)&&e.add)}function mo(e,t){const n=e.getValue("willChange");if(bu(n))return n.add(t)}function fs(e){return e.props[Gr]}const hs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Su=1e-7,wu=12;function Cu(e,t,n,o,r){let s,i,a=0;do i=t+(n-t)/2,s=hs(i,o,r)-e,s>0?n=i:t=i;while(Math.abs(s)>Su&&++a<wu);return i}function Rt(e,t,n,o){if(e===t&&n===o)return he;const r=s=>Cu(s,0,1,e,n);return s=>s===0||s===1?s:hs(r(s),t,o)}const ps=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ms=e=>t=>1-e(1-t),gs=Rt(.33,1.53,.69,.99),go=ms(gs),ys=ps(go),vs=e=>(e*=2)<1?.5*go(e):.5*(2-Math.pow(2,-10*(e-1))),yo=e=>1-Math.sin(Math.acos(e)),xs=ms(yo),bs=ps(yo),Ss=e=>/^0[^.\s]+$/u.test(e);function _u(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ss(e):!0}const Bt=e=>Math.round(e*1e5)/1e5,vo=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Tu(e){return e==null}const Eu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xo=(e,t)=>n=>!!(typeof n=="string"&&Eu.test(n)&&n.startsWith(e)||t&&!Tu(n)&&Object.prototype.hasOwnProperty.call(n,t)),ws=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,i,a]=o.match(vo);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Pu=e=>Pe(0,255,e),bo={...mt,transform:e=>Math.round(Pu(e))},Ye={test:xo("rgb","red"),parse:ws("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+bo.transform(e)+", "+bo.transform(t)+", "+bo.transform(n)+", "+Bt(Nt.transform(o))+")"};function Au(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const So={test:xo("#"),parse:Au,transform:Ye.transform},gt={test:xo("hsl","hue"),parse:ws("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Ce.transform(Bt(t))+", "+Ce.transform(Bt(n))+", "+Bt(Nt.transform(o))+")"},ae={test:e=>Ye.test(e)||So.test(e)||gt.test(e),parse:e=>Ye.test(e)?Ye.parse(e):gt.test(e)?gt.parse(e):So.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ye.transform(e):gt.transform(e)},Mu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Lu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(vo))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Mu))===null||n===void 0?void 0:n.length)||0)>0}const Cs="number",_s="color",Du="var",ku="var(",Ts="${}",Ou=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ft(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const a=t.replace(Ou,l=>(ae.test(l)?(o.color.push(s),r.push(_s),n.push(ae.parse(l))):l.startsWith(ku)?(o.var.push(s),r.push(Du),n.push(l)):(o.number.push(s),r.push(Cs),n.push(parseFloat(l))),++s,Ts)).split(Ts);return{values:n,split:a,indexes:o,types:r}}function Es(e){return Ft(e).values}function Ps(e){const{split:t,types:n}=Ft(e),o=t.length;return r=>{let s="";for(let i=0;i<o;i++)if(s+=t[i],r[i]!==void 0){const a=n[i];a===Cs?s+=Bt(r[i]):a===_s?s+=ae.transform(r[i]):s+=r[i]}return s}}const ju=e=>typeof e=="number"?0:e;function Nu(e){const t=Es(e);return Ps(e)(t.map(ju))}const Be={test:Lu,parse:Es,createTransformer:Ps,getAnimatableNone:Nu},Vu=new Set(["brightness","contrast","saturate","opacity"]);function Iu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(vo)||[];if(!o)return e;const r=n.replace(o,"");let s=Vu.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const Ru=/\b([a-z-]*)\(.*?\)/gu,wo={...Be,getAnimatableNone:e=>{const t=e.match(Ru);return t?t.map(Iu).join(" "):e}},Bu={...so,color:ae,backgroundColor:ae,outlineColor:ae,fill:ae,stroke:ae,borderColor:ae,borderTopColor:ae,borderRightColor:ae,borderBottomColor:ae,borderLeftColor:ae,filter:wo,WebkitFilter:wo},As=e=>Bu[e];function Ms(e,t){let n=As(e);return n!==wo&&(n=Be),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Fu=new Set(["auto","none","0"]);function $u(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!Fu.has(s)&&Ft(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=Ms(n,r)}const Ze=e=>e*180/Math.PI,Co=e=>{const t=Ze(Math.atan2(e[1],e[0]));return _o(t)},zu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Co,rotateZ:Co,skewX:e=>Ze(Math.atan(e[1])),skewY:e=>Ze(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_o=e=>(e=e%360,e<0&&(e+=360),e),Ls=Co,Ds=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ks=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Uu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ds,scaleY:ks,scale:e=>(Ds(e)+ks(e))/2,rotateX:e=>_o(Ze(Math.atan2(e[6],e[5]))),rotateY:e=>_o(Ze(Math.atan2(-e[2],e[0]))),rotateZ:Ls,rotate:Ls,skewX:e=>Ze(Math.atan(e[4])),skewY:e=>Ze(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Os(e){return e.includes("scale")?1:0}function To(e,t){if(!e||e==="none")return Os(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,r;if(n)o=Uu,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=zu,r=a}if(!r)return Os(t);const s=o[t],i=r[1].split(",").map(Wu);return typeof s=="function"?s(i):i[s]}const Xu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return To(n,t)};function Wu(e){return parseFloat(e.trim())}const js=e=>e===mt||e===D,Gu=new Set(["x","y","z"]),Ku=pt.filter(e=>!Gu.has(e));function Hu(e){const t=[];return Ku.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const yt={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})=>To(t,"x"),y:(e,{transform:t})=>To(t,"y")};yt.translateX=yt.x,yt.translateY=yt.y;const Je=new Set;let Eo=!1,Po=!1;function Ns(){if(Po){const e=Array.from(Je).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=Hu(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,i])=>{var a;(a=o.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Po=!1,Eo=!1,Je.forEach(e=>e.complete()),Je.clear()}function Vs(){Je.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Po=!0)})}function qu(){Vs(),Ns()}class Ao{constructor(t,n,o,r,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Je.add(this),Eo||(Eo=!0,X.read(Vs),X.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=r==null?void 0:r.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&n){const l=o.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),r&&i===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Je.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Je.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Is=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Yu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zu(e){const t=Yu.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const Ju=4;function Rs(e,t,n=1){Ve(n<=Ju,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=Zu(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const i=s.trim();return Is(i)?parseFloat(i):i}return ro(r)?Rs(r,t,n+1):r}const Bs=e=>t=>t.test(e),Fs=[mt,D,Ce,Re,qc,Hc,{test:e=>e==="auto",parse:e=>e}],$s=e=>Fs.find(Bs(e));class zs extends Ao{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=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(),ro(c))){const u=Rs(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ds.has(o)||t.length!==2)return;const[r,s]=t,i=$s(r),a=$s(s);if(i!==a)if(js(i)&&js(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,o=[];for(let r=0;r<t.length;r++)_u(t[r])&&o.push(r);o.length&&$u(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=yt[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:o,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const s=n.getValue(o);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=yt[o](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 Us=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Be.test(e)||e==="0")&&!e.startsWith("url("));function Qu(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ed(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=Us(r,t),a=Us(s,t);return ut(i===a,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:Qu(e)||(n==="spring"||Kn(n))&&o}const td=e=>e!==null;function yn(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(td),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const nd=40;class Xs{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=we.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>nd?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&qu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=we.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!ed(t,o,r,s))if(i)this.options.duration=0;else{l&&l(yn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const G=(e,t,n)=>e+(t-e)*n;function Mo(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 od({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,i=0;if(!t)r=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=Mo(l,a,e+1/3),s=Mo(l,a,e),i=Mo(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:o}}function vn(e,t){return n=>n>0?t:e}const Lo=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},rd=[So,Ye,gt],sd=e=>rd.find(t=>t.test(e));function Ws(e){const t=sd(e);if(ut(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===gt&&(n=od(n)),n}const Gs=(e,t)=>{const n=Ws(e),o=Ws(t);if(!n||!o)return vn(e,t);const r={...n};return s=>(r.red=Lo(n.red,o.red,s),r.green=Lo(n.green,o.green,s),r.blue=Lo(n.blue,o.blue,s),r.alpha=G(n.alpha,o.alpha,s),Ye.transform(r))},id=(e,t)=>n=>t(e(n)),$t=(...e)=>e.reduce(id),Do=new Set(["none","hidden"]);function ad(e,t){return Do.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ld(e,t){return n=>G(e,t,n)}function ko(e){return typeof e=="number"?ld:typeof e=="string"?ro(e)?vn:ae.test(e)?Gs:dd:Array.isArray(e)?Ks:typeof e=="object"?ae.test(e)?Gs:cd:vn}function Ks(e,t){const n=[...e],o=n.length,r=e.map((s,i)=>ko(s)(s,t[i]));return s=>{for(let i=0;i<o;i++)n[i]=r[i](s);return n}}function cd(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=ko(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function ud(e,t){var n;const o=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][r[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;o[s]=l,r[i]++}return o}const dd=(e,t)=>{const n=Be.createTransformer(t),o=Ft(e),r=Ft(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?Do.has(e)&&!r.values.length||Do.has(t)&&!o.values.length?ad(e,t):$t(Ks(ud(o,r),r.values),n):(ut(!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.`),vn(e,t))};function Hs(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?G(e,t,n):ko(e)(e,t)}const fd=5;function qs(e,t,n){const o=Math.max(t-fd,0);return _r(n-e(o),t-o)}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},Ys=.001;function hd({duration:e=K.duration,bounce:t=K.bounce,velocity:n=K.velocity,mass:o=K.mass}){let r,s;ut(e<=Se(K.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Pe(K.minDamping,K.maxDamping,i),e=Pe(K.minDuration,K.maxDuration,Ee(e)),i<1?(r=c=>{const u=c*i,d=u*e,f=u-n,g=Oo(c,i),h=Math.exp(-d);return Ys-f/g*h},s=c=>{const d=c*i*e,f=d*n+n,g=Math.pow(i,2)*Math.pow(c,2)*e,h=Math.exp(-d),v=Oo(Math.pow(c,2),i);return(-r(c)+Ys>0?-1:1)*((f-g)*h)/v}):(r=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=md(r,s,a);if(e=Se(e),isNaN(l))return{stiffness:K.stiffness,damping:K.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:i*2*Math.sqrt(o*c),duration:e}}}const pd=12;function md(e,t,n){let o=n;for(let r=1;r<pd;r++)o=o-e(o)/t(o);return o}function Oo(e,t){return e*Math.sqrt(1-t*t)}const gd=["duration","bounce"],yd=["stiffness","damping","mass"];function Zs(e,t){return t.some(n=>e[n]!==void 0)}function vd(e){let t={velocity:K.velocity,stiffness:K.stiffness,damping:K.damping,mass:K.mass,isResolvedFromDuration:!1,...e};if(!Zs(e,yd)&&Zs(e,gd))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*Pe(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:K.mass,stiffness:r,damping:s}}else{const n=hd(e);t={...t,...n,mass:K.mass},t.isResolvedFromDuration=!0}return t}function Js(e=K.visualDuration,t=K.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:g}=vd({...n,velocity:-Ee(n.velocity||0)}),h=f||0,v=c/(2*Math.sqrt(l*u)),S=i-s,x=Ee(Math.sqrt(l/u)),b=Math.abs(S)<5;o||(o=b?K.restSpeed.granular:K.restSpeed.default),r||(r=b?K.restDelta.granular:K.restDelta.default);let C;if(v<1){const T=Oo(x,v);C=M=>{const j=Math.exp(-v*x*M);return i-j*((h+v*x*S)/T*Math.sin(T*M)+S*Math.cos(T*M))}}else if(v===1)C=T=>i-Math.exp(-x*T)*(S+(h+x*S)*T);else{const T=x*Math.sqrt(v*v-1);C=M=>{const j=Math.exp(-v*x*M),A=Math.min(T*M,300);return i-j*((h+v*x*S)*Math.sinh(A)+T*S*Math.cosh(A))/T}}const P={calculatedDuration:g&&d||null,next:T=>{const M=C(T);if(g)a.done=T>=d;else{let j=0;v<1&&(j=T===0?Se(h):qs(C,T,M));const A=Math.abs(j)<=o,V=Math.abs(i-M)<=r;a.done=A&&V}return a.value=a.done?i:M,a},toString:()=>{const T=Math.min(Er(P),Gn),M=Ar(j=>P.next(T*j).value,T,30);return T+"ms "+M}};return P}function Qs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},g=A=>a!==void 0&&A<a||l!==void 0&&A>l,h=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let v=n*t;const S=d+v,x=i===void 0?S:i(S);x!==S&&(v=x-d);const b=A=>-v*Math.exp(-A/o),C=A=>x+b(A),P=A=>{const V=b(A),N=C(A);f.done=Math.abs(V)<=c,f.value=f.done?x:N};let T,M;const j=A=>{g(f.value)&&(T=A,M=Js({keyframes:[f.value,h(f.value)],velocity:qs(C,A,f.value),damping:r,stiffness:s,restDelta:c,restSpeed:u}))};return j(0),{calculatedDuration:null,next:A=>{let V=!1;return!M&&T===void 0&&(V=!0,P(A),j(A)),T!==void 0&&A>=T?M.next(A-T):(!V&&P(A),f)}}}const xd=Rt(.42,0,1,1),bd=Rt(0,0,.58,1),ei=Rt(.42,0,.58,1),Sd=e=>Array.isArray(e)&&typeof e[0]!="number",ti={linear:he,easeIn:xd,easeInOut:ei,easeOut:bd,circIn:yo,circInOut:bs,circOut:xs,backIn:go,backInOut:ys,backOut:gs,anticipate:vs},ni=e=>{if(Hn(e)){Ve(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return Rt(t,n,o,r)}else if(typeof e=="string")return Ve(ti[e]!==void 0,`Invalid easing type '${e}'`),ti[e];return e};function wd(e,t,n){const o=[],r=n||Hs,s=e.length-1;for(let i=0;i<s;i++){let a=r(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||he:t;a=$t(l,a)}o.push(a)}return o}function Cd(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(Ve(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=wd(t,o,r),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=dt(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Pe(e[0],e[s-1],u)):c}function _d(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=dt(0,t,o);e.push(G(n,1,r))}}function Td(e){const t=[0];return _d(t,e.length-1),t}function Ed(e,t){return e.map(n=>n*t)}function Pd(e,t){return e.map(()=>t||ei).splice(0,e.length-1)}function zt({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=Sd(o)?o.map(ni):ni(o),s={done:!1,value:t[0]},i=Ed(n&&n.length===t.length?n:Td(t),e),a=Cd(i,t,{ease:Array.isArray(r)?r:Pd(t,r)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Ad=e=>{const t=({timestamp:n})=>e(n);return{start:()=>X.update(t,!0),stop:()=>Ie(t),now:()=>oe.isProcessing?oe.timestamp:we.now()}},Md={decay:Qs,inertia:Qs,tween:zt,keyframes:zt,spring:Js},Ld=e=>e/100;class jo extends Xs{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:o,element:r,keyframes:s}=this.options,i=(r==null?void 0:r.KeyframeResolver)||Ao,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:i=0}=this.options,a=Kn(n)?n:Md[n]||zt;let l,c;process.env.NODE_ENV!=="production"&&a!==zt&&Ve(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==zt&&typeof t[0]!="number"&&(l=$t(Ld,Hs(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Er(u));const{calculatedDuration:d}=u,f=d+r,g=f*(o+1)-r;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:g}}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:o}=this;if(!o){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=o;if(this.startTime===null)return s.next(0);const{delay:f,repeat:g,repeatType:h,repeatDelay:v,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 x=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?x<0:x>u;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let C=this.currentTime,P=s;if(g){const A=Math.min(this.currentTime,u)/d;let V=Math.floor(A),N=A%1;!N&&A>=1&&(N=1),N===1&&V--,V=Math.min(V,g+1),!!(V%2)&&(h==="reverse"?(N=1-N,v&&(N-=v/d)):h==="mirror"&&(P=i)),C=Pe(0,1,N)*d}const T=b?{done:!1,value:l[0]}:P.next(C);a&&(T.value=a(T.value));let{done:M}=T;!b&&c!==null&&(M=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return j&&r!==void 0&&(T.value=yn(l,this.options,r)),S&&S(T.value),j&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Ee(t.calculatedDuration):0}get time(){return Ee(this.currentTime)}set time(t){t=Se(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ee(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Ad,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??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 Dd=new Set(["opacity","clipPath","filter","transform"]);function kd(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Lr(a,r);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:o,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const Od=Un(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xn=10,jd=2e4;function Nd(e){return Kn(e.type)||e.type==="spring"||!Mr(e.ease)}function Vd(e,t){const n=new jo({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<jd;)o=n.sample(s),r.push(o.value),s+=xn;return{times:void 0,keyframes:r,duration:s-xn,ease:"linear"}}const oi={anticipate:vs,backInOut:ys,circInOut:bs};function Id(e){return e in oi}class ri extends Xs{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new zs(s,(i,a)=>this.onKeyframesResolved(i,a),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ln()&&Id(s)&&(s=oi[s]),Nd(this.options)){const{onComplete:d,onUpdate:f,motionValue:g,element:h,...v}=this.options,S=Vd(t,v);t=S.keyframes,t.length===1&&(t[1]=t[0]),o=S.duration,r=S.times,s=S.ease,i="keyframes"}const u=kd(a.owner.current,l,t,{...this.options,duration:o,times:r,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Pr(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(yn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:r,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ee(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ee(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=Se(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.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 he;const{animation:o}=n;Pr(o,t)}return he}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:o,duration:r,type:s,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,...g}=this.options,h=new jo({...g,keyframes:o,duration:r,type:s,ease:i,times:a,isGenerator:!0}),v=Se(this.time);c.setWithVelocity(h.sample(v-xn).value,h.sample(v).value,xn)}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:o,repeatDelay:r,repeatType:s,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 Od()&&o&&Dd.has(o)&&!l&&!c&&!r&&s!=="mirror"&&i!==0&&a!=="inertia"}}const Rd={type:"spring",stiffness:500,damping:25,restSpeed:10},Bd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fd={type:"keyframes",duration:.8},$d={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zd=(e,{keyframes:t})=>t.length>2?Fd:qe.has(e)?e.startsWith("scale")?Bd(t[1]):Rd:$d;function Ud({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const No=(e,t,n,o={},r,s)=>i=>{const a=Wn(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-Se(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:r};Ud(a)||(u={...u,...zd(e,u)}),u.duration&&(u.duration=Se(u.duration)),u.repeatDelay&&(u.repeatDelay=Se(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=yn(u.keyframes,a);if(f!==void 0)return X.update(()=>{u.onUpdate(f),u.onComplete()}),new pc([])}return!s&&ri.supports(u)?new ri(u):new jo(u)};function Xd({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function si(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;o&&(i=o);const c=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),g=l[d];if(g===void 0||u&&Xd(u,d))continue;const h={delay:n,...Wn(i||{},d)};let v=!1;if(window.MotionHandoffAnimation){const x=fs(e);if(x){const b=window.MotionHandoffAnimation(x,d,X);b!==null&&(h.startTime=b,v=!0)}}mo(e,d),f.start(No(d,f,g,e.shouldReduceMotion&&ds.has(d)?{type:!1}:h,e,v));const S=f.animation;S&&c.push(S)}return a&&Promise.all(c).then(()=>{X.update(()=>{a&&xu(e,a)})}),c}function Vo(e,t,n={}){var o;const r=It(e,t,n.type==="exit"?(o=e.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(si(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return Wd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Wd(e,t,n=0,o=0,r=1,s){const i=[],a=(e.variantChildren.size-1)*o,l=r===1?(c=0)=>c*o:(c=0)=>a-c*o;return Array.from(e.variantChildren).sort(Gd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Vo(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Gd(e,t){return e.sortNodePosition(t)}function Kd(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>Vo(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=Vo(e,t,n);else{const r=typeof t=="function"?It(e,t,n.custom):t;o=Promise.all(si(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function ii(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const Hd=to.length;function ai(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ai(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Hd;n++){const o=to[n],r=e.props[o];(Ot(r)||r===!1)&&(t[o]=r)}return t}const qd=[...eo].reverse(),Yd=eo.length;function Zd(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Kd(e,n,o)))}function Jd(e){let t=Zd(e),n=li(),o=!0;const r=l=>(c,u)=>{var d;const f=It(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:g,transitionEnd:h,...v}=f;c={...c,...v,...h}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=ai(e.parent)||{},d=[],f=new Set;let g={},h=1/0;for(let S=0;S<Yd;S++){const x=qd[S],b=n[x],C=c[x]!==void 0?c[x]:u[x],P=Ot(C),T=x===l?b.isActive:null;T===!1&&(h=S);let M=C===u[x]&&C!==c[x]&&P;if(M&&o&&e.manuallyAnimateOnMount&&(M=!1),b.protectedKeys={...g},!b.isActive&&T===null||!C&&!b.prevProp||hn(C)||typeof C=="boolean")continue;const j=Qd(b.prevProp,C);let A=j||x===l&&b.isActive&&!M&&P||S>h&&P,V=!1;const N=Array.isArray(C)?C:[C];let q=N.reduce(r(x),{});T===!1&&(q={});const{prevResolvedValues:le={}}=b,ce={...le,...q},L=z=>{A=!0,f.has(z)&&(V=!0,f.delete(z)),b.needsAnimating[z]=!0;const w=e.getValue(z);w&&(w.liveStyle=!1)};for(const z in ce){const w=q[z],R=le[z];if(g.hasOwnProperty(z))continue;let $=!1;ho(w)&&ho(R)?$=!ii(w,R):$=w!==R,$?w!=null?L(z):f.add(z):w!==void 0&&f.has(z)?L(z):b.protectedKeys[z]=!0}b.prevProp=C,b.prevResolvedValues=q,b.isActive&&(g={...g,...q}),o&&e.blockInitialAnimation&&(A=!1),A&&(!(M&&j)||V)&&d.push(...N.map(z=>({animation:z,options:{type:x}})))}if(f.size){const S={};if(typeof c.initial!="boolean"){const x=It(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(S.transition=x.transition)}f.forEach(x=>{const b=e.getBaseTarget(x),C=e.getValue(x);C&&(C.liveStyle=!0),S[x]=b??null}),d.push({animation:S})}let v=!!d.length;return o&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(v=!1),o=!1,v?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 g;return(g=f.animationState)===null||g===void 0?void 0:g.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:s,getState:()=>n,reset:()=>{n=li(),o=!0}}}function Qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ii(t,e):!1}function Qe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function li(){return{animate:Qe(!0),whileInView:Qe(),whileHover:Qe(),whileTap:Qe(),whileDrag:Qe(),whileFocus:Qe(),exit:Qe()}}class Fe{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ef extends Fe{constructor(t){super(t),t.animationState||(t.animationState=Jd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();hn(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 tf=0;class nf extends Fe{constructor(){super(...arguments),this.id=tf++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.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 of={animation:{Feature:ef},exit:{Feature:nf}};function Ut(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function Xt(e){return{point:{x:e.pageX,y:e.pageY}}}const rf=e=>t=>Jn(t)&&e(t,Xt(t));function Wt(e,t,n,o){return Ut(e,t,rf(n),o)}function ci({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function sf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function af(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}const ui=1e-4,lf=1-ui,cf=1+ui,di=.01,uf=0-di,df=0+di;function ue(e){return e.max-e.min}function ff(e,t,n){return Math.abs(e-t)<=n}function fi(e,t,n,o=.5){e.origin=o,e.originPoint=G(t.min,t.max,e.origin),e.scale=ue(n)/ue(t),e.translate=G(n.min,n.max,e.origin)-e.originPoint,(e.scale>=lf&&e.scale<=cf||isNaN(e.scale))&&(e.scale=1),(e.translate>=uf&&e.translate<=df||isNaN(e.translate))&&(e.translate=0)}function Gt(e,t,n,o){fi(e.x,t.x,n.x,o?o.originX:void 0),fi(e.y,t.y,n.y,o?o.originY:void 0)}function hi(e,t,n){e.min=n.min+t.min,e.max=e.min+ue(t)}function hf(e,t,n){hi(e.x,t.x,n.x),hi(e.y,t.y,n.y)}function pi(e,t,n){e.min=t.min-n.min,e.max=e.min+ue(t)}function Kt(e,t,n){pi(e.x,t.x,n.x),pi(e.y,t.y,n.y)}const mi=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:mi(),y:mi()}),gi=()=>({min:0,max:0}),Y=()=>({x:gi(),y:gi()});function ge(e){return[e("x"),e("y")]}function Io(e){return e===void 0||e===1}function Ro({scale:e,scaleX:t,scaleY:n}){return!Io(e)||!Io(t)||!Io(n)}function et(e){return Ro(e)||yi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function yi(e){return vi(e.x)||vi(e.y)}function vi(e){return e&&e!=="0%"}function bn(e,t,n){const o=e-n,r=t*o;return n+r}function xi(e,t,n,o,r){return r!==void 0&&(e=bn(e,r,o)),bn(e,n,o)+t}function Bo(e,t=0,n=1,o,r){e.min=xi(e.min,t,n,o,r),e.max=xi(e.max,t,n,o,r)}function bi(e,{x:t,y:n}){Bo(e.x,t.translate,t.scale,t.originPoint),Bo(e.y,n.translate,n.scale,n.originPoint)}const Si=.999999999999,wi=1.0000000000001;function pf(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,i;for(let a=0;a<r;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&bt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,bi(e,i)),o&&et(s.latestValues)&&bt(e,s.latestValues))}t.x<wi&&t.x>Si&&(t.x=1),t.y<wi&&t.y>Si&&(t.y=1)}function xt(e,t){e.min=e.min+t,e.max=e.max+t}function Ci(e,t,n,o,r=.5){const s=G(e.min,e.max,r);Bo(e,t,n,s,o)}function bt(e,t){Ci(e.x,t.x,t.scaleX,t.scale,t.originX),Ci(e.y,t.y,t.scaleY,t.scale,t.originY)}function _i(e,t){return ci(af(e.getBoundingClientRect(),t))}function mf(e,t,n){const o=_i(e,n),{scroll:r}=t;return r&&(xt(o.x,r.offset.x),xt(o.y,r.offset.y)),o}const Ti=({current:e})=>e?e.ownerDocument.defaultView:null,Ei=(e,t)=>Math.abs(e-t);function gf(e,t){const n=Ei(e.x,t.x),o=Ei(e.y,t.y);return Math.sqrt(n**2+o**2)}class Pi{constructor(t,n,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:s=!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=$o(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,g=gf(d.offset,{x:0,y:0})>=3;if(!f&&!g)return;const{point:h}=d,{timestamp:v}=oe;this.history.push({...h,timestamp:v});const{onStart:S,onMove:x}=this.handlers;f||(S&&S(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Fo(f,this.transformPagePoint),X.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:g,onSessionEnd:h,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=$o(d.type==="pointercancel"?this.lastMoveEventInfo:Fo(f,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,S),h&&h(d,S)},!Jn(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.contextWindow=r||window;const i=Xt(t),a=Fo(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=oe;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,$o(a,this.history)),this.removeListeners=$t(Wt(this.contextWindow,"pointermove",this.handlePointerMove),Wt(this.contextWindow,"pointerup",this.handlePointerUp),Wt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ie(this.updatePoint)}}function Fo(e,t){return t?{point:t(e.point)}:e}function Ai(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $o({point:e},t){return{point:e,delta:Ai(e,Mi(t)),offset:Ai(e,yf(t)),velocity:vf(t,.1)}}function yf(e){return e[0]}function Mi(e){return e[e.length-1]}function vf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=Mi(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Se(t)));)n--;if(!o)return{x:0,y:0};const s=Ee(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const i={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function xf(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?G(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?G(n,e,o.max):Math.min(e,n)),e}function Li(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 bf(e,{top:t,left:n,bottom:o,right:r}){return{x:Li(e.x,n,r),y:Li(e.y,t,o)}}function Di(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function Sf(e,t){return{x:Di(e.x,t.x),y:Di(e.y,t.y)}}function wf(e,t){let n=.5;const o=ue(e),r=ue(t);return r>o?n=dt(t.min,t.max-o,e.min):o>r&&(n=dt(e.min,e.max-r,t.min)),Pe(0,1,n)}function Cf(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 zo=.35;function _f(e=zo){return e===!1?e=0:e===!0&&(e=zo),{x:ki(e,"left","right"),y:ki(e,"top","bottom")}}function ki(e,t,n){return{min:Oi(e,t),max:Oi(e,n)}}function Oi(e,t){return typeof e=="number"?e:e[t]||0}const Tf=new WeakMap;class Ef{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Y(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Xt(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:g,onDragStart:h}=this.getProps();if(f&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bc(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),ge(S=>{let x=this.getAxisMotionValue(S).get()||0;if(Ce.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const C=b.layout.layoutBox[S];C&&(x=ue(C)*(parseFloat(x)/100))}}this.originPoint[S]=x}),h&&X.postRender(()=>h(u,d)),mo(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:g,onDirectionLock:h,onDrag:v}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:S}=d;if(g&&this.currentDirection===null){this.currentDirection=Pf(S),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),this.visualElement.render(),v&&v(u,d)},a=(u,d)=>this.stop(u,d),l=()=>ge(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:r,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Ti(this.visualElement)})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&X.postRender(()=>s(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:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!Sn(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=xf(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ht(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=bf(r.layoutBox,n):this.constraints=!1,this.elastic=_f(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ge(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Cf(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ht(t))return!1;const o=t.current;Ve(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=mf(o,r.root,this.visualElement.getTransformPagePoint());let i=Sf(r.layout.layoutBox,s);if(n){const a=n(sf(i));this.hasMutatedConstraints=!!a,a&&(i=ci(a))}return i}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ge(u=>{if(!Sn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=r?200:1e6,g=r?40:1e7,h={type:"inertia",velocity:o?t[u]:0,bounceStiffness:f,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return mo(this.visualElement,t),o.start(No(t,o,0,n,this.visualElement,!1))}stopAnimation(){ge(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ge(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()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){ge(n=>{const{drag:o}=this.getProps();if(!Sn(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[n];s.set(t[n]-G(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!ht(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ge(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();r[i]=wf({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),ge(i=>{if(!Sn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(G(l,c,r[i]))})}addListeners(){if(!this.visualElement.current)return;Tf.set(this.visualElement,this);const t=this.visualElement.current,n=Wt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();ht(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),X.read(o);const i=Ut(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ge(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(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:i=zo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Sn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Pf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Af extends Fe{constructor(t){super(t),this.removeGroupControls=he,this.removeListeners=he,this.controls=new Ef(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||he}unmount(){this.removeGroupControls(),this.removeListeners()}}const ji=e=>(t,n)=>{e&&X.postRender(()=>e(t,n))};class Mf extends Fe{constructor(){super(...arguments),this.removePointerDownListener=he}onPointerDown(t){this.session=new Pi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ti(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:ji(t),onStart:ji(n),onMove:o,onEnd:(s,i)=>{delete this.session,r&&X.postRender(()=>r(s,i))}}}mount(){this.removePointerDownListener=Wt(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 wn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ni(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ht={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(D.test(e))e=parseFloat(e);else return e;const n=Ni(e,t.target.x),o=Ni(e,t.target.y);return`${n}% ${o}%`}},Lf={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=Be.parse(e);if(r.length>5)return o;const s=Be.createTransformer(e),i=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+i]/=a,r[1+i]/=l;const c=G(a,l,.5);return typeof r[2+i]=="number"&&(r[2+i]/=c),typeof r[3+i]=="number"&&(r[3+i]/=c),s(r)}};class Df extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;Kc(kf),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),wn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,i=o.projection;return i&&(i.isPresent=s,r||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||X.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Zn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Vi(e){const[t,n]=uc(),o=m.useContext(wr);return y.jsx(Df,{...e,layoutGroup:o,switchLayoutGroup:m.useContext(Kr),isPresent:t,safeToRemove:n})}const kf={borderRadius:{...Ht,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ht,borderTopRightRadius:Ht,borderBottomLeftRadius:Ht,borderBottomRightRadius:Ht,boxShadow:Lf};function Of(e,t,n){const o=ie(e)?e:kt(e);return o.start(No("",o,t,n)),o.animation}function jf(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Nf=(e,t)=>e.depth-t.depth;class Vf{constructor(){this.children=[],this.isDirty=!1}add(t){$n(this.children,t),this.isDirty=!0}remove(t){zn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Nf),this.isDirty=!1,this.children.forEach(t)}}function If(e,t){const n=we.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(Ie(o),e(s-t))};return X.read(o,!0),()=>Ie(o)}const Ii=["TopLeft","TopRight","BottomLeft","BottomRight"],Rf=Ii.length,Ri=e=>typeof e=="string"?parseFloat(e):e,Bi=e=>typeof e=="number"||D.test(e);function Bf(e,t,n,o,r,s){r?(e.opacity=G(0,n.opacity!==void 0?n.opacity:1,Ff(o)),e.opacityExit=G(t.opacity!==void 0?t.opacity:1,0,$f(o))):s&&(e.opacity=G(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let i=0;i<Rf;i++){const a=`border${Ii[i]}Radius`;let l=Fi(t,a),c=Fi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Bi(l)===Bi(c)?(e[a]=Math.max(G(Ri(l),Ri(c),o),0),(Ce.test(c)||Ce.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=G(t.rotate||0,n.rotate||0,o))}function Fi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ff=$i(0,.5,xs),$f=$i(.5,.95,he);function $i(e,t,n){return o=>o<e?0:o>t?1:n(dt(e,t,o))}function zi(e,t){e.min=t.min,e.max=t.max}function ye(e,t){zi(e.x,t.x),zi(e.y,t.y)}function Ui(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Xi(e,t,n,o,r){return e-=t,e=bn(e,1/n,o),r!==void 0&&(e=bn(e,1/r,o)),e}function zf(e,t=0,n=1,o=.5,r,s=e,i=e){if(Ce.test(t)&&(t=parseFloat(t),t=G(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=G(s.min,s.max,o);e===s&&(a-=t),e.min=Xi(e.min,t,n,a,r),e.max=Xi(e.max,t,n,a,r)}function Wi(e,t,[n,o,r],s,i){zf(e,t[n],t[o],t[r],t.scale,s,i)}const Uf=["x","scaleX","originX"],Xf=["y","scaleY","originY"];function Gi(e,t,n,o){Wi(e.x,t,Uf,n?n.x:void 0,o?o.x:void 0),Wi(e.y,t,Xf,n?n.y:void 0,o?o.y:void 0)}function Ki(e){return e.translate===0&&e.scale===1}function Hi(e){return Ki(e.x)&&Ki(e.y)}function qi(e,t){return e.min===t.min&&e.max===t.max}function Wf(e,t){return qi(e.x,t.x)&&qi(e.y,t.y)}function Yi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Zi(e,t){return Yi(e.x,t.x)&&Yi(e.y,t.y)}function Ji(e){return ue(e.x)/ue(e.y)}function Qi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Gf{constructor(){this.members=[]}add(t){$n(this.members,t),t.scheduleRender()}remove(t){if(zn(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(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Kf(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((r||s||i)&&(o=`translate3d(${r}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:g,skewY:h}=n;c&&(o=`perspective(${c}px) ${o}`),u&&(o+=`rotate(${u}deg) `),d&&(o+=`rotateX(${d}deg) `),f&&(o+=`rotateY(${f}deg) `),g&&(o+=`skewX(${g}deg) `),h&&(o+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(o+=`scale(${a}, ${l})`),o||"none"}const Uo=["","X","Y","Z"],Hf={visibility:"hidden"},ea=1e3;let qf=0;function Xo(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function ta(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fs(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",X,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&ta(o)}function na({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(i={},a=t==null?void 0:t()){this.id=qf++,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(Jf),this.nodes.forEach(oh),this.nodes.forEach(rh),this.nodes.forEach(Qf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vf)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Xn),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=jf(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=If(f,250),wn.hasAnimatedSinceResize&&(wn.hasAnimatedSinceResize=!1,this.nodes.forEach(ra))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:g,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||ch,{onLayoutAnimationStart:S,onLayoutAnimationComplete:x}=u.getProps(),b=!this.targetLayout||!Zi(this.targetLayout,h),C=!f&&g;if(this.options.layoutRoot||this.resumeFrom||C||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,C);const P={...Wn(v,"layout"),onPlay:S,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else f||ra(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,Ie(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(sh),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&&ta(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(oa);return}this.isUpdating||this.nodes.forEach(th),this.isUpdating=!1,this.nodes.forEach(nh),this.nodes.forEach(Yf),this.nodes.forEach(Zf),this.clearAllSnapshots();const a=we.now();oe.delta=Pe(0,1e3/60,a-oe.timestamp),oe.timestamp=a,oe.isProcessing=!0,Yn.update.process(oe),Yn.preRender.process(oe),Yn.render.process(oe),oe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eh),this.sharedNodes.forEach(ih)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,X.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){X.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ue(this.snapshot.measuredBox.x)&&!ue(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Y(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=o(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(!r)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Hi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||et(this.latestValues)||u)&&(r(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)),uh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return Y();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(dh))){const{scroll:u}=this.root;u&&(xt(l.x,u.offset.x),xt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=Y();if(ye(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&&ye(l,i),xt(l.x,d.offset.x),xt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=Y();ye(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&&bt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),et(u.latestValues)&&bt(l,u.latestValues)}return et(this.latestValues)&&bt(l,this.latestValues),l}removeTransform(i){const a=Y();ye(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!et(c.latestValues))continue;Ro(c.latestValues)&&c.updateSnapshot();const u=Y(),d=c.measurePageBox();ye(u,d),Gi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return et(this.latestValues)&&Gi(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!==oe.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=oe.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Kt(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),ye(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),hf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ye(this.target,this.layout.layoutBox),bi(this.target,this.targetDelta)):ye(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Kt(this.relativeTargetOrigin,this.target,g.target),ye(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ro(this.parent.latestValues)||yi(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===oe.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;ye(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,g=this.treeScale.y;pf(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Y());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ui(this.prevProjectionDelta.x,this.projectionDelta.x),Ui(this.prevProjectionDelta.y,this.projectionDelta.y)),Gt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==g||!Qi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}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=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Y(),g=l?l.source:void 0,h=this.layout?this.layout.source:void 0,v=g!==h,S=this.getStack(),x=!S||S.members.length<=1,b=!!(v&&!x&&this.options.crossfade===!0&&!this.path.some(lh));this.animationProgress=0;let C;this.mixTargetDelta=P=>{const T=P/1e3;sa(d.x,i.x,T),sa(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ah(this.relativeTarget,this.relativeTargetOrigin,f,T),C&&Wf(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Y()),ye(C,this.relativeTarget)),v&&(this.animationValues=u,Bf(u,c,this.latestValues,T,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ie(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=X.update(()=>{wn.hasAnimatedSinceResize=!0,this.currentAnimation=Of(0,ea,{...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(ea),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&&ua(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Y();const d=ue(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=ue(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}ye(a,l),bt(a,u),Gt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Gf),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&&Xo("z",i,c,this.animationValues);for(let u=0;u<Uo.length;u++)Xo(`rotate${Uo[u]}`,i,c,this.animationValues),Xo(`skew${Uo[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 Hf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=gn(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 v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=gn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!et(this.latestValues)&&(v.transform=u?u({},""):"none",this.hasProjected=!1),v}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Kf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:g,y:h}=this.projectionDelta;c.transformOrigin=`${g.origin*100}% ${h.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 v in jt){if(f[v]===void 0)continue;const{correct:S,applyTo:x,isCSSVariable:b}=jt[v],C=c.transform==="none"?f[v]:S(f[v],d);if(x){const P=x.length;for(let T=0;T<P;T++)c[x[T]]=C}else b?this.options.visualElement.renderState.vars[v]=C:c[v]=C}return this.options.layoutId&&(c.pointerEvents=d===this?gn(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(oa),this.root.sharedNodes.clear()}}}function Yf(e){e.updateLayout()}function Zf(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:o,measuredBox:r}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?ge(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],g=ue(f);f.min=o[d].min,f.max=f.min+g}):ua(s,n.layoutBox,o)&&ge(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],g=ue(o[d]);f.max=f.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+g)});const a=vt();Gt(a,o,n.layoutBox);const l=vt();i?Gt(l,e.applyTransform(r,!0),n.measuredBox):Gt(l,o,n.layoutBox);const c=!Hi(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:g}=d;if(f&&g){const h=Y();Kt(h,n.layoutBox,f.layoutBox);const v=Y();Kt(v,o,g.layoutBox),Zi(h,v)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function Jf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Qf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eh(e){e.clearSnapshot()}function oa(e){e.clearMeasurements()}function th(e){e.isLayoutDirty=!1}function nh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ra(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function oh(e){e.resolveTargetDelta()}function rh(e){e.calcProjection()}function sh(e){e.resetSkewAndRotation()}function ih(e){e.removeLeadSnapshot()}function sa(e,t,n){e.translate=G(t.translate,0,n),e.scale=G(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ia(e,t,n,o){e.min=G(t.min,n.min,o),e.max=G(t.max,n.max,o)}function ah(e,t,n,o){ia(e.x,t.x,n.x,o),ia(e.y,t.y,n.y,o)}function lh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ch={duration:.45,ease:[.4,0,.1,1]},aa=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),la=aa("applewebkit/")&&!aa("chrome/")?Math.round:he;function ca(e){e.min=la(e.min),e.max=la(e.max)}function uh(e){ca(e.x),ca(e.y)}function ua(e,t,n){return e==="position"||e==="preserve-aspect"&&!ff(Ji(t),Ji(n),.2)}function dh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const fh=na({attachResizeListener:(e,t)=>Ut(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Wo={current:void 0},da=na({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wo.current){const e=new fh({});e.mount(window),e.setOptions({layoutScroll:!0}),Wo.current=e}return Wo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hh={pan:{Feature:Mf},drag:{Feature:Af,ProjectionNode:da,MeasureLayout:Vi}};function fa(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&X.postRender(()=>s(t,Xt(t)))}class ph extends Fe{mount(){const{current:t}=this.node;t&&(this.unmount=wc(t,(n,o)=>(fa(this.node,o,"Start"),r=>fa(this.node,r,"End"))))}unmount(){}}class mh extends Fe{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=$t(Ut(this.node.current,"focus",()=>this.onFocus()),Ut(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ha(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&X.postRender(()=>s(t,Xt(t)))}class gh extends Fe{mount(){const{current:t}=this.node;t&&(this.unmount=Ec(t,(n,o)=>(ha(this.node,o,"Start"),(r,{success:s})=>ha(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Go=new WeakMap,Ko=new WeakMap,yh=e=>{const t=Go.get(e.target);t&&t(e)},vh=e=>{e.forEach(yh)};function xh({root:e,...t}){const n=e||document;Ko.has(n)||Ko.set(n,{});const o=Ko.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(vh,{root:e,...t})),o[r]}function bh(e,t,n){const o=xh(t);return Go.set(e,n),o.observe(e),()=>{Go.delete(e),o.unobserve(e)}}const Sh={some:0,all:1};class wh extends Fe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:Sh[r]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!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 bh(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(Ch(t,n))&&this.startObserver()}unmount(){}}function Ch({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _h={inView:{Feature:wh},tap:{Feature:gh},focus:{Feature:mh},hover:{Feature:ph}},Th={layout:{ProjectionNode:da,MeasureLayout:Vi}},Ho={current:null},pa={current:!1};function Eh(){if(pa.current=!0,!!Bn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ho.current=e.matches;e.addListener(t),t()}else Ho.current=!1}const Ph=[...Fs,ae,Be],Ah=e=>Ph.find(Bs(e)),Mh=new WeakMap;function Lh(e,t,n){for(const o in t){const r=t[o],s=n[o];if(ie(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&an(r.version==="12.5.0",`Attempting to mix Motion versions ${r.version} with 12.5.0 may not work as expected.`);else if(ie(s))e.addValue(o,kt(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const i=e.getValue(o);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(o);e.addValue(o,kt(i!==void 0?i:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const ma=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Dh{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,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=Ao,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=we.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,X.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=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=pn(n),this.isVariantNode=Xr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in f){const h=f[g];l[g]!==void 0&&ie(h)&&h.set(l[g],!1)}}mount(t){this.current=t,Mh.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,o)=>this.bindToMotionValue(o,n)),pa.current||Eh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ho.current,process.env.NODE_ENV!=="production"&&an(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ie(this.notifyUpdate),Ie(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=qe.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&X.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),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 ft){const n=ft[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<ma.length;o++){const r=ma[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,i=t[s];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=Lh(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 o=this.values.get(t);n!==o&&(o&&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 o=this.values.get(t);return o===void 0&&n!==void 0&&(o=kt(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){var o;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(o=this.getBaseTargetFromProps(this.props,t))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Is(r)||Ss(r))?r=parseFloat(r):!Ah(r)&&Be.test(n)&&(r=Ms(t,n)),this.setBaseTarget(t,ie(r)?r.get():r)),ie(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const i=fo(this.props,o,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(r=i[t])}if(o&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ie(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Xn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ga extends Dh{constructor(){super(...arguments),this.KeyframeResolver=zs}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:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ie(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kh(e){return window.getComputedStyle(e)}class Oh extends ga{constructor(){super(...arguments),this.type="html",this.renderInstance=is}readValueFromInstance(t,n){if(qe.has(n))return Xu(t,n);{const o=kh(t),r=(oo(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return _i(t,n)}build(t,n,o){io(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return po(t,n,o)}}class jh extends ga{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&ss(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qe.has(n)){const o=As(n);return o&&o.default||0}return n=as.has(n)?n:no(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return cs(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&X.postRender(this.updateDimensions)}build(t,n,o){co(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){ls(t,n,o,r)}mount(t){this.isSVGTag=uo(t.tagName),super.mount(t)}}const Nh=(e,t)=>lo(e)?new jh(t):new Oh(t,{allowProjection:e!==m.Fragment}),Vh=yu({...of,..._h,...hh,...Th},Nh),tt=jc(Vh),Ih={root:"_root_uup2j_1"},ya={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 $e(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ya).includes(t)).filter(t=>e[t]===!0).map(t=>ya[t]):null}const nt="Errore: ",Rh="Impossibile acquisire la posizione.",qo="Impossibile caricare i punti di mappa.",Bh="Si è verificato un errore.",Fh="Impossibile caricare i suggerimenti.",$h="Impossibile caricare i dettagli della location.",zh="Impossibile caricare la mappa.",Uh="Impossibile trovare punti di mappa nell'area di ricerca.",Xh="Ottieni indicazioni di navigazione per questa destinazione",Wh="Condividi questa destinazione",Gh="Scarica l'evento",Kh="dyn-locator__portal-root",Hh=3e3,va=6,qh=2e4,qt={north:47.1,south:36.6,east:18.6,west:6.6},Yh={lat:(qt.north+qt.south)/2,lng:(qt.east+qt.west)/2};function Ae(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Me(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 xa(e){const{type:t,url:n}=e??{};switch(t){case"navigate":case"directions":return{"aria-label":Xh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"share":return{"aria-label":Wh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Gh,as:"a",href:n??"#",download:!0,target:"_blank",rel:"noopener noreferrer"};case"email":default:return{}}}function Zh(e,t){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>e(...o),t)}}const ba="Anchor";function Sa({as:e,wrapper:t,children:n,variant:o="default",className:r,animate:s=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},g){const h=t||"span",v=s?tt[h]:h,S=e||"a",x=$e(f)??[],b=s?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},P=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return y.jsx(v,{className:W(Ih.root,"dyn-locator__"+Me(ba),Ae(r),...x),"data-variant":o,...d?{style:d}:{},...b,...f,children:y.jsx(S,{ref:g,href:a,target:l,rel:P,...u,children:n})})}Sa.displayName=ba;const wa=m.forwardRef(Sa),Ca="ErrorBanner";function _a({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:o,errorDetails:r,className:s,children:i,...a}){const l=$e(a)??[];return y.jsxs("div",{className:W("dyn-locator__"+Me(Ca),Mt.root,Ae(s),...l??[]),children:[y.jsxs("header",{className:Mt.header,children:[y.jsx(Jl,{size:28,color:"currentColor",className:Mt.icon})," ",y.jsx("h3",{children:e})]}),y.jsxs("div",{className:Mt.body,children:[y.jsx("p",{children:t}),n&&o&&y.jsxs("p",{children:["Prova a"," ",y.jsx(wa,{animate:!1,"aria-label":n,href:"#",onClick:o,children:n})]}),i,r&&y.jsx("div",{className:Mt.content,children:y.jsx("pre",{children:r})})]})]})}_a.displayName=Ca;const Ta=_a;class Jh 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||y.jsx("div",{className:Ul.container,children:y.jsx(Ta,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Qh=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",fillRule:"evenodd",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M12 2.5a9.5 9.5 0 1 0 0 19 9.5 9.5 0 0 0 0-19ZM13.286 14.518h2.459l.386-2.498h-2.845v-1.365c0-1.037.338-1.957 1.309-1.957h1.56v-2.18c-.275-.037-.854-.118-1.949-.118-2.287 0-3.627 1.208-3.627 3.959v1.661h-2.35v2.498h2.35v6.864c.465.07.937.118 1.421.118.438 0 .864-.04 1.286-.097v-6.885Z"})]}),ep=m.forwardRef(Qh),tp=m.memo(ep),np=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M8 3a5 5 0 0 0-5 5v8a5 5 0 0 0 5 5h8a5 5 0 0 0 5-5V8a5 5 0 0 0-5-5H8Zm10 2a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm-6 2a5 5 0 1 1-.001 10.001A5 5 0 0 1 12 7Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"})]}),op=m.forwardRef(np),rp=m.memo(op),sp=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2ZM9 17H6.477v-7H9v7ZM7.694 8.717c-.771 0-1.286-.514-1.286-1.2 0-.686.514-1.2 1.371-1.2.771 0 1.286.514 1.286 1.2 0 .686-.514 1.2-1.371 1.2ZM18 17h-2.442v-3.826c0-1.058-.651-1.302-.895-1.302s-1.058.163-1.058 1.302V17h-2.523v-7h2.523v.977c.325-.57.976-.977 2.197-.977S18 10.977 18 13.174V17Z"})]}),ip=m.forwardRef(sp),ap=m.memo(ip),lp=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.68 1.92H4.32a2.403 2.403 0 0 0-2.4 2.4v15.36c0 1.323 1.077 2.4 2.4 2.4h15.36c1.323 0 2.4-1.077 2.4-2.4V4.32c0-1.323-1.077-2.4-2.4-2.4Zm-1.917 8.795a3.596 3.596 0 0 1-3.34-1.61v5.538a4.093 4.093 0 1 1-4.093-4.093c.085 0 .169.008.253.013v2.017c-.084-.01-.167-.025-.253-.025a2.089 2.089 0 1 0 0 4.178c1.154 0 2.173-.91 2.173-2.063l.02-9.405h1.927a3.594 3.594 0 0 0 3.313 3.208v2.242Z"})]}),cp=m.forwardRef(lp),up=m.memo(cp),dp=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.077 4.928A9.927 9.927 0 0 0 12.011 2c-5.506 0-9.987 4.479-9.989 9.985a9.962 9.962 0 0 0 1.333 4.992L2 22l5.233-1.237a9.98 9.98 0 0 0 4.773 1.216h.004c5.505 0 9.986-4.48 9.989-9.985a9.922 9.922 0 0 0-2.922-7.066Zm-2.179 10.626c-.208.583-1.227 1.145-1.685 1.186-.458.042-.887.207-2.995-.624-2.537-1-4.139-3.601-4.263-3.767-.125-.167-1.019-1.353-1.019-2.581s.645-1.832.874-2.081a.916.916 0 0 1 .666-.312c.166 0 .333 0 .478.006.178.007.375.016.562.431.222.494.707 1.728.769 1.853.062.125.104.271.021.437-.083.166-.125.27-.249.416-.125.146-.262.325-.374.437-.125.124-.255.26-.11.509.146.25.646 1.067 1.388 1.728.954.85 1.757 1.113 2.007 1.239.25.125.395.104.541-.063.146-.166.624-.728.79-.978.166-.25.333-.208.562-.125.229.083 1.456.687 1.705.812.25.125.416.187.478.291.062.103.062.603-.146 1.186Z"})]}),fp=m.forwardRef(dp),hp=m.memo(fp),pp=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsxs("g",{transform:"scale(1.2) translate(-2.4, -2.4)",children:[y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.5 3 4.965 21H3.108L18.643 3H20.5Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillOpacity:"0.3",fillRule:"evenodd",d:"M15.572 20.5 3.91 3.5h4.479l11.661 17h-4.479Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.862 4.5 10.29 15h-2.054L5.81 4.5h2.053Zm.79-1.5h-5.69l12.346 18H21L8.652 3Z",clipRule:"evenodd"})]})]}),mp=m.forwardRef(pp),Ea=m.memo(mp),gp=({title:e,titleId:t,...n},o)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M21.551 6.96c-.191-1.056-1.102-1.824-2.16-2.064-1.582-.336-4.511-.576-7.68-.576-3.167 0-6.142.24-7.727.576-1.055.24-1.968.96-2.16 2.064-.193 1.2-.384 2.88-.384 5.04s.191 3.84.431 5.04c.193 1.056 1.105 1.824 2.16 2.064 1.68.336 4.56.576 7.729.576 3.169 0 6.049-.24 7.729-.576 1.055-.24 1.967-.96 2.16-2.064.19-1.2.43-2.929.48-5.04-.098-2.16-.338-3.84-.578-5.04ZM9.12 15.36V8.64L14.976 12 9.12 15.36Z"})]}),yp=m.forwardRef(gp),vp=m.memo(yp),Pa={ArrowLeft:Kl,ArrowUpRight:ql,ChevronUp:Zl,ChevronDown:Yl,Close:Sr,Expand:oc,Location:nc,Search:ic,Share:ac,Target:ec,Email:tc,Copy:Ql,X:Ea,Twitter:Ea,Facebook:tp,Instagram:rp,Linkedin:ap,TikTok:up,Whatsapp:hp,Youtube:vp},Le={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"},St={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Yo={root:"_root_71ove_4",icon:"_icon_71ove_43"};function xp(e){return m.isValidElement(e)||typeof e=="function"}function bp(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function Sp(e){return!!e&&typeof e=="object"&&"path"in e}const Aa="Icon";function Ma({as:e,icon:t,iconRef:n,label:o,size:r="S",radius:s,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const g=e||"span",h=l?tt[g]:g,{iconMap:v}=Ap();function S(C){if(bp(C)){const P=typeof C=="string"?C:C.name;return v[P]?m.createElement(v[P],{...n?{ref:n}:{},...o?{title:o,titleId:o.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Yo.icon}):'No icon found for "'+P+'"!'}return Sp(C)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),y.jsx("img",{...n?{ref:n}:{},src:C.path,alt:`Icona decorativa${o?" che rappresenta '"+o+"'":""}`,className:Yo.icon})):"No icon provided"}const x=$e(d)??[],b=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return y.jsx(h,{ref:f,className:W(Yo.root,"dyn-locator__"+Me(Aa),Ae(a),...x),...u?{style:u}:{},"data-variant":i,"data-size":r,...s?{"data-radius":s}:{},...b,...d,children:S(t)})}Ma.displayName=Aa;const _e=m.forwardRef(Ma),La="Tag";function Da({as:e,iconPosition:t="left",children:n,icon:o,className:r,animate:s=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=s?tt[u]:u,f=$e(l)??[],g=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return y.jsx(d,{ref:c,className:W(St.root,"dyn-locator__"+Me(La),Ae(r),...f),"data-icon-position":t,...a?{style:a}:{},...g,...l,children:y.jsxs("div",{className:St.container,children:[o?y.jsx("div",{className:St.icon,children:xp(o)?typeof o=="function"?y.jsx(o,{className:St.icon}):o:y.jsx(_e,{className:St.icon,icon:o})}):null,y.jsx("div",{className:St.label,children:n})]})})}Da.displayName=La;const wp=m.forwardRef(Da),Cp={root:"_root_u5v4v_1"},ka="IconButton";function Oa({as:e,children:t,className:n,variant:o="default",animate:r=!0,animationDelay:s=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},g){const h=e||"button",v=r?tt[h]:h,S=$e(f)??[],x=r?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:s,duration:.2}}:{},b=h==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return y.jsx(v,{ref:g,className:W(Cp.root,"dyn-locator__"+Me(ka),Ae(n),...S),"data-variant":o,"data-element":h,"aria-label":a,disabled:d,...i?{style:i}:{},...x,...b,...f,children:t})}Oa.displayName=ka;const ze=m.forwardRef(Oa),ja={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Na="Card";function Va({as:e,children:t,className:n,variant:o="default",animate:r=!0,animationDelay:s=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=r?tt[d]:d,g=$e(c)??[],h=r?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:s,duration:.3}}:{};return y.jsx(f,{ref:u,className:W(ja.root,"dyn-locator__"+Me(Na),Ae(n),...g),"data-variant":o,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...h,...c,children:o==="bare"?t:y.jsx("div",{className:ja.content,children:t})})}Va.displayName=Na;const _p=m.forwardRef(Va);function Ia(e){const{componentMap:t}=Mp();return t[e]}const Ra="LocationCard";function Ba({id:e,title:t,timestamp:n,address:o,capabilities:r,on_share:s,actions:i,className:a,...l},c){const u=Ia("ctaButton"),d=k(h=>h.toggleShareSheet),f=k(h=>h.featureFlags);function g(){d(!0)}return y.jsx(_p,{ref:c,variant:"bare",clickable:!0,className:W("dyn-locator__"+Me(Ra),Ae(a)),...l,style:{...l.style?l.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:y.jsxs("div",{className:Le.root,children:[y.jsxs("header",{className:Le.header,children:[n?y.jsx("time",{children:n}):null,y.jsxs("div",{className:Le.titleContainer,children:[t?y.jsx("h4",{children:t}):null,f.share?y.jsx(ze,{className:Le.shareButton,variant:"bare",onClick:g,children:y.jsx(_e,{size:"M",icon:"Share"})}):null]}),o?y.jsx("address",{children:o}):null]}),r!=null&&r.length?y.jsx("div",{className:Le.body,children:r.map((h,v)=>y.jsxs("div",{className:Le.capabilities,children:[y.jsx("h5",{children:h.title}),y.jsx("ul",{className:Le.tagContainer,children:(h.capabilities??[]).map((S,x)=>y.jsx(wp,{as:"li",animationDelay:+`.${x+1}`,className:Le.tag,children:S.label},x))})]},v))}):null,i!=null&&i.length?y.jsx("div",{className:Le.cta,children:i.map((h,v)=>y.jsx(u,{animate:!1,fullWidth:!0,variant:v===0?"themed":"secondary",...xa(h),children:h.label},v))}):null]})})}Ba.displayName=Ra;const Tp=m.forwardRef(Ba),Fa={root:"_root_o9d55_1",loader:"_loader_o9d55_73"},$a="Button";function za({as:e,children:t,className:n,variant:o="default",size:r="medium",disabled:s=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:g,...h},v){const S=e||(u?"a":"button"),x=l?tt[S]:S,b=$e(h)??[],C=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},P=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return y.jsx(x,{ref:v,className:W(Fa.root,"dyn-locator__"+Me($a),Ae(n),...b),"data-variant":o,"data-size":r,"data-full-width":a,disabled:s||i,...g?{style:g}:{},...C,...P,...h,children:i?y.jsxs("span",{style:{display:"flex",gap:10},children:[t,y.jsx("span",{className:Fa.loader,"aria-hidden":"true"})]}):t})}za.displayName=$a;const Yt=m.forwardRef(za),Ua={locationCard:Tp,ctaButton:Yt},Ep={iconMap:Pa,componentMap:Ua},Zo=m.createContext(Ep);function Pp({children:e,customIcons:t,customComponents:n}){const o={...Pa,...t??{}},r={...Ua,...n??{}};return y.jsx(Zo.Provider,{value:{iconMap:o,componentMap:r},children:e})}function Ap(){const{iconMap:e}=m.useContext(Zo);return{iconMap:e}}function Mp(){const{componentMap:e}=m.useContext(Zo);return{componentMap:e}}var Zt=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(Zt||{});const Xa=m.createContext({endpointMap:{},apiUrl:""});function Lp({children:e,endpoints:t,apiUrl:n}){var o;if(!n||!((o=Object.keys(t??{}))!=null&&o.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return y.jsx(Xa.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function Dp(e){const{endpointMap:t,apiUrl:n}=m.useContext(Xa);return{getEndpoint:(o={})=>{const r=t[e];if(!r)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let s="";return r.buildPath?s=r.buildPath(o):(s=r.path,Object.entries(o).forEach(([i,a])=>{s=s.replace(`:${i}`,String(a))})),{url:`${n}${s}`,method:r.method}}}}let kp={data:""},Op=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||kp,jp=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Np=/\/\*[^]*?\*\/| +/g,Wa=/\n+/g,Ue=(e,t)=>{let n="",o="",r="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":o+=s[1]=="f"?Ue(i,s):s+"{"+Ue(i,s[1]=="k"?"":t)+"}":typeof i=="object"?o+=Ue(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=Ue.p?Ue.p(s,i):s+":"+i+";")}return n+(t&&r?t+"{"+r+"}":r)+o},De={},Ga=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ga(e[n]);return t}return e},Vp=(e,t,n,o,r)=>{let s=Ga(e),i=De[s]||(De[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!De[i]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=jp.exec(c.replace(Np,""));)u[4]?f.shift():u[3]?(d=u[3].replace(Wa," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(Wa," ").trim();return f[0]})(e);De[i]=Ue(r?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&De.g?De.g:null;return n&&(De.g=De[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)})(De[i],t,o,a),i},Ip=(e,t,n)=>e.reduce((o,r,s)=>{let i=t[s];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?"":Ue(a,""):a===!1?"":a}return o+r+(i??"")},"");function Cn(e){let t=this||{},n=e.call?e(t.p):e;return Vp(n.unshift?n.raw?Ip(n,[].slice.call(arguments,1),t.p):n.reduce((o,r)=>Object.assign(o,r&&r.call?r(t.p):r),{}):n,Op(t.target),t.g,t.o,t.k)}let Ka,Jo,Qo;Cn.bind({g:1});let ke=Cn.bind({k:1});function Rp(e,t,n,o){Ue.p=t,Ka=e,Jo=n,Qo=o}function Xe(e,t){let n=this||{};return function(){let o=arguments;function r(s,i){let a=Object.assign({},s),l=a.className||r.className;n.p=Object.assign({theme:Jo&&Jo()},a),n.o=/ *go\d+/.test(l),a.className=Cn.apply(n,o)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Qo&&c[0]&&Qo(a),Ka(c,a)}return t?t(r):r}}var Bp=e=>typeof e=="function",_n=(e,t)=>Bp(e)?e(t):e,Fp=(()=>{let e=0;return()=>(++e).toString()})(),Ha=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),$p=20,qa=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,$p)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return qa(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:o}=t;return{...e,toasts:e.toasts.map(s=>s.id===o||o===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let r=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+r}))}}},Tn=[],ot={toasts:[],pausedAt:void 0},rt=e=>{ot=qa(ot,e),Tn.forEach(t=>{t(ot)})},zp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Up=(e={})=>{let[t,n]=m.useState(ot),o=m.useRef(ot);m.useEffect(()=>(o.current!==ot&&n(ot),Tn.push(n),()=>{let s=Tn.indexOf(n);s>-1&&Tn.splice(s,1)}),[]);let r=t.toasts.map(s=>{var i,a,l;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((a=e[s.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||zp[s.type],style:{...e.style,...(l=e[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:r}},Xp=(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)||Fp()}),Jt=e=>(t,n)=>{let o=Xp(t,e,n);return rt({type:2,toast:o}),o.id},H=(e,t)=>Jt("blank")(e,t);H.error=Jt("error"),H.success=Jt("success"),H.loading=Jt("loading"),H.custom=Jt("custom"),H.dismiss=e=>{rt({type:3,toastId:e})},H.remove=e=>rt({type:4,toastId:e}),H.promise=(e,t,n)=>{let o=H.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(r=>{let s=t.success?_n(t.success,r):void 0;return s?H.success(s,{id:o,...n,...n==null?void 0:n.success}):H.dismiss(o),r}).catch(r=>{let s=t.error?_n(t.error,r):void 0;s?H.error(s,{id:o,...n,...n==null?void 0:n.error}):H.dismiss(o)}),e};var Wp=(e,t)=>{rt({type:1,toast:{id:e,height:t}})},Gp=()=>{rt({type:5,time:Date.now()})},Qt=new Map,Kp=1e3,Hp=(e,t=Kp)=>{if(Qt.has(e))return;let n=setTimeout(()=>{Qt.delete(e),rt({type:4,toastId:e})},t);Qt.set(e,n)},qp=e=>{let{toasts:t,pausedAt:n}=Up(e);m.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(l<0){a.visible&&H.dismiss(a.id);return}return setTimeout(()=>H.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let o=m.useCallback(()=>{n&&rt({type:6,time:Date.now()})},[n]),r=m.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(g=>(g.position||c)===(s.position||c)&&g.height),d=u.findIndex(g=>g.id===s.id),f=u.filter((g,h)=>h<d&&g.visible).length;return u.filter(g=>g.visible).slice(...a?[f+1]:[0,f]).reduce((g,h)=>g+(h.height||0)+l,0)},[t]);return m.useEffect(()=>{t.forEach(s=>{if(s.dismissed)Hp(s.id,s.removeDelay);else{let i=Qt.get(s.id);i&&(clearTimeout(i),Qt.delete(s.id))}})},[t]),{toasts:t,handlers:{updateHeight:Wp,startPause:Gp,endPause:o,calculateOffset:r}}},Yp=ke`
|
|
129
139
|
from {
|
|
130
140
|
transform: scale(0) rotate(45deg);
|
|
131
141
|
opacity: 0;
|
|
@@ -133,7 +143,7 @@ from {
|
|
|
133
143
|
to {
|
|
134
144
|
transform: scale(1) rotate(45deg);
|
|
135
145
|
opacity: 1;
|
|
136
|
-
}`,
|
|
146
|
+
}`,Zp=ke`
|
|
137
147
|
from {
|
|
138
148
|
transform: scale(0);
|
|
139
149
|
opacity: 0;
|
|
@@ -141,7 +151,7 @@ from {
|
|
|
141
151
|
to {
|
|
142
152
|
transform: scale(1);
|
|
143
153
|
opacity: 1;
|
|
144
|
-
}`,
|
|
154
|
+
}`,Jp=ke`
|
|
145
155
|
from {
|
|
146
156
|
transform: scale(0) rotate(90deg);
|
|
147
157
|
opacity: 0;
|
|
@@ -149,7 +159,7 @@ from {
|
|
|
149
159
|
to {
|
|
150
160
|
transform: scale(1) rotate(90deg);
|
|
151
161
|
opacity: 1;
|
|
152
|
-
}`,
|
|
162
|
+
}`,Qp=Xe("div")`
|
|
153
163
|
width: 20px;
|
|
154
164
|
opacity: 0;
|
|
155
165
|
height: 20px;
|
|
@@ -158,14 +168,14 @@ to {
|
|
|
158
168
|
position: relative;
|
|
159
169
|
transform: rotate(45deg);
|
|
160
170
|
|
|
161
|
-
animation: ${
|
|
171
|
+
animation: ${Yp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
162
172
|
forwards;
|
|
163
173
|
animation-delay: 100ms;
|
|
164
174
|
|
|
165
175
|
&:after,
|
|
166
176
|
&:before {
|
|
167
177
|
content: '';
|
|
168
|
-
animation: ${
|
|
178
|
+
animation: ${Zp} 0.15s ease-out forwards;
|
|
169
179
|
animation-delay: 150ms;
|
|
170
180
|
position: absolute;
|
|
171
181
|
border-radius: 3px;
|
|
@@ -178,18 +188,18 @@ to {
|
|
|
178
188
|
}
|
|
179
189
|
|
|
180
190
|
&:before {
|
|
181
|
-
animation: ${
|
|
191
|
+
animation: ${Jp} 0.15s ease-out forwards;
|
|
182
192
|
animation-delay: 180ms;
|
|
183
193
|
transform: rotate(90deg);
|
|
184
194
|
}
|
|
185
|
-
`,
|
|
195
|
+
`,em=ke`
|
|
186
196
|
from {
|
|
187
197
|
transform: rotate(0deg);
|
|
188
198
|
}
|
|
189
199
|
to {
|
|
190
200
|
transform: rotate(360deg);
|
|
191
201
|
}
|
|
192
|
-
`,
|
|
202
|
+
`,tm=Xe("div")`
|
|
193
203
|
width: 12px;
|
|
194
204
|
height: 12px;
|
|
195
205
|
box-sizing: border-box;
|
|
@@ -197,8 +207,8 @@ to {
|
|
|
197
207
|
border-radius: 100%;
|
|
198
208
|
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
199
209
|
border-right-color: ${e=>e.primary||"#616161"};
|
|
200
|
-
animation: ${
|
|
201
|
-
`,
|
|
210
|
+
animation: ${em} 1s linear infinite;
|
|
211
|
+
`,nm=ke`
|
|
202
212
|
from {
|
|
203
213
|
transform: scale(0) rotate(45deg);
|
|
204
214
|
opacity: 0;
|
|
@@ -206,7 +216,7 @@ from {
|
|
|
206
216
|
to {
|
|
207
217
|
transform: scale(1) rotate(45deg);
|
|
208
218
|
opacity: 1;
|
|
209
|
-
}`,
|
|
219
|
+
}`,om=ke`
|
|
210
220
|
0% {
|
|
211
221
|
height: 0;
|
|
212
222
|
width: 0;
|
|
@@ -220,7 +230,7 @@ to {
|
|
|
220
230
|
100% {
|
|
221
231
|
opacity: 1;
|
|
222
232
|
height: 10px;
|
|
223
|
-
}`,
|
|
233
|
+
}`,rm=Xe("div")`
|
|
224
234
|
width: 20px;
|
|
225
235
|
opacity: 0;
|
|
226
236
|
height: 20px;
|
|
@@ -229,13 +239,13 @@ to {
|
|
|
229
239
|
position: relative;
|
|
230
240
|
transform: rotate(45deg);
|
|
231
241
|
|
|
232
|
-
animation: ${
|
|
242
|
+
animation: ${nm} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
233
243
|
forwards;
|
|
234
244
|
animation-delay: 100ms;
|
|
235
245
|
&:after {
|
|
236
246
|
content: '';
|
|
237
247
|
box-sizing: border-box;
|
|
238
|
-
animation: ${
|
|
248
|
+
animation: ${om} 0.2s ease-out forwards;
|
|
239
249
|
opacity: 0;
|
|
240
250
|
animation-delay: 200ms;
|
|
241
251
|
position: absolute;
|
|
@@ -247,16 +257,16 @@ to {
|
|
|
247
257
|
height: 10px;
|
|
248
258
|
width: 6px;
|
|
249
259
|
}
|
|
250
|
-
`,
|
|
260
|
+
`,sm=Xe("div")`
|
|
251
261
|
position: absolute;
|
|
252
|
-
`,
|
|
262
|
+
`,im=Xe("div")`
|
|
253
263
|
position: relative;
|
|
254
264
|
display: flex;
|
|
255
265
|
justify-content: center;
|
|
256
266
|
align-items: center;
|
|
257
267
|
min-width: 20px;
|
|
258
268
|
min-height: 20px;
|
|
259
|
-
`,
|
|
269
|
+
`,am=ke`
|
|
260
270
|
from {
|
|
261
271
|
transform: scale(0.6);
|
|
262
272
|
opacity: 0.4;
|
|
@@ -264,20 +274,20 @@ from {
|
|
|
264
274
|
to {
|
|
265
275
|
transform: scale(1);
|
|
266
276
|
opacity: 1;
|
|
267
|
-
}`,
|
|
277
|
+
}`,lm=Xe("div")`
|
|
268
278
|
position: relative;
|
|
269
279
|
transform: scale(0.6);
|
|
270
280
|
opacity: 0.4;
|
|
271
281
|
min-width: 20px;
|
|
272
|
-
animation: ${
|
|
282
|
+
animation: ${am} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
273
283
|
forwards;
|
|
274
|
-
`,
|
|
284
|
+
`,cm=({toast:e})=>{let{icon:t,type:n,iconTheme:o}=e;return t!==void 0?typeof t=="string"?ee.createElement(lm,null,t):t:n==="blank"?null:ee.createElement(im,null,ee.createElement(tm,{...o}),n!=="loading"&&ee.createElement(sm,null,n==="error"?ee.createElement(Qp,{...o}):ee.createElement(rm,{...o})))},um=e=>`
|
|
275
285
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
276
286
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
277
|
-
`,
|
|
287
|
+
`,dm=e=>`
|
|
278
288
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
279
289
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
280
|
-
`,
|
|
290
|
+
`,fm="0%{opacity:0;} 100%{opacity:1;}",hm="0%{opacity:1;} 100%{opacity:0;}",pm=Xe("div")`
|
|
281
291
|
display: flex;
|
|
282
292
|
align-items: center;
|
|
283
293
|
background: #fff;
|
|
@@ -289,17 +299,17 @@ to {
|
|
|
289
299
|
pointer-events: auto;
|
|
290
300
|
padding: 8px 10px;
|
|
291
301
|
border-radius: 8px;
|
|
292
|
-
`,
|
|
302
|
+
`,mm=Xe("div")`
|
|
293
303
|
display: flex;
|
|
294
304
|
justify-content: center;
|
|
295
305
|
margin: 4px 10px;
|
|
296
306
|
color: inherit;
|
|
297
307
|
flex: 1 1 auto;
|
|
298
308
|
white-space: pre-line;
|
|
299
|
-
`,
|
|
309
|
+
`,gm=(e,t)=>{let n=e.includes("top")?1:-1,[o,r]=Ha()?[fm,hm]:[um(n),dm(n)];return{animation:t?`${ke(o)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${ke(r)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Ya=ee.memo(({toast:e,position:t,style:n,children:o})=>{let r=e.height?gm(e.position||t||"top-center",e.visible):{opacity:0},s=ee.createElement(cm,{toast:e}),i=ee.createElement(mm,{...e.ariaProps},_n(e.message,e));return ee.createElement(pm,{className:e.className,style:{...r,...n,...e.style}},typeof o=="function"?o({icon:s,message:i}):ee.createElement(ee.Fragment,null,s,i))});Rp(ee.createElement);var ym=({id:e,className:t,style:n,onHeightUpdate:o,children:r})=>{let s=ee.useCallback(i=>{if(i){let a=()=>{let l=i.getBoundingClientRect().height;o(e,l)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,o]);return ee.createElement("div",{ref:s,className:t,style:n},r)},vm=(e,t)=>{let n=e.includes("top"),o=n?{top:0}:{bottom:0},r=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Ha()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...o,...r}},xm=Cn`
|
|
300
310
|
z-index: 9999;
|
|
301
311
|
> * {
|
|
302
312
|
pointer-events: auto;
|
|
303
313
|
}
|
|
304
|
-
`,Tn=16,qp=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:l}=wp(n);return Q.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Tn,left:Tn,right:Tn,bottom:Tn,pointerEvents:"none",...s},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),f=Kp(u,d);return Q.createElement(Wp,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?Gp:"",style:f},c.type==="custom"?Cn(c.message,c):o?o(c):Q.createElement(Ga,{toast:c,position:u}))}))};const Hp={root:"_root_movxa_4"};function qa({className:e,children:t,show:n=!0,variant:r="light",...o}){const s=q("dyn-locator__overlay",Hp.root,e);return n?x.jsx("div",{className:s,"data-variant":r,...o,children:t}):null}function _n(e){const[t,n]=g.useState(!1),[r,o]=g.useState(null),{getEndpoint:s}=sp(e);return{request:async(a={},l={})=>{n(!0),o(null);try{let c;try{c=s(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 o(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:r}}function Yp({children:e,customComponents:t,customIcons:n,featureFlags:r,fetchLocations:o,localizationConfig:s,locations:i=[],mapId:a}){const l=j(E=>E.isFullscreen),c=j(E=>E.setLocations),u=j(E=>E.setMapId),d=j(E=>E.setFeatureFlags),f=j(E=>E.setLocalizationConfig),m=j(E=>E.setMapDetail),p=j(E=>E.shouldRefetch),y=j(E=>E.setShouldRefetch),{request:S,loading:v,error:b}=_n(Yt.CLUSTERS),{request:w,loading:M,error:_}=_n(Yt.MARKERS),L=v||M,k=!!b||!!_;async function A(E){var X;try{if(typeof E!="number"||E<0||isNaN(E))throw new Error("No map ID provided");const{data:$}=await S({mapId:String(E)})??{};if(!$)throw new Error("No cluster data received from the server");c((X=$.map)==null?void 0:X.call($,ee=>({...ee,onMarkerClick:async()=>{await V(E,ee.id)}})))}catch($){console.error("Error fetching clusters: ",$),Y.error(et+Gr),c([])}}async function V(E,X){try{if(typeof E!="number"||E<0||isNaN(E))throw new Error("No map ID provided");const{data:$}=await w({mapId:E,clusterId:X})??{};if(!$)throw new Error("No marker data received from the server");c($),m(Ke.MARKER)}catch($){console.error("Error fetching markers: ",$),Y.error(et+Gr),c([])}}return g.useEffect(()=>{s&&f(s),r&&d(r),typeof a=="number"&&a>0&&!isNaN(a)&&u(a),i!=null&&i.length?c(i):o?o().then(E=>c(E)):A(a)},[]),g.useEffect(()=>{let E=!0;return p&&a&&A(a).finally(()=>{E&&y(!1)}),()=>{E=!1}},[p,a]),x.jsx("div",{id:"dyn-locator",className:q("dyn-locator__locator",yo.root),"data-fullscreen":l,children:x.jsxs(tp,{customIcons:n,customComponents:t,children:[e,x.jsxs(qa,{show:L||k,variant:"light",children:[L?x.jsx(Pt,{size:"large"}):null,k?x.jsx(wa,{title:jh,message:Gr,actionText:"ricaricare la pagina.",errorDetails:(b==null?void 0:b.message)||(_==null?void 0:_.message),onAction:E=>{E.preventDefault(),window.location.reload()}}):null]}),x.jsx(qp,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:E=>x.jsx(Ga,{toast:E,children:({icon:X,message:$})=>x.jsxs(x.Fragment,{children:[X,$,E.type==="error"&&x.jsx(bt,{variant:"bare",onClick:()=>Y.dismiss(E.id),children:x.jsx(Be,{icon:"Close"})})]})})})]})})}function Ha({mapProvider:e,endpoints:t,apiUrl:n,children:r,...o}){return x.jsx(Kh,{children:x.jsx(kl,{children:x.jsx(Fl,{mapProvider:e,children:x.jsx(op,{endpoints:t,apiUrl:n,children:x.jsx(Yp,{children:r,...o})})})})})}Ha.displayName="Locator";var Qr,Ya;function Zp(){return Ya||(Ya=1,Qr=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))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(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),Qr}var Jp=Zp();const Qp=lo(Jp);function Ce(){return Ce=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},Ce.apply(null,arguments)}function rt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function em(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tm(e){var t=em(e,"string");return typeof t=="symbol"?t:t+""}const he={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},nm="https://maps.googleapis.com/maps/api/js";class Qt{static async load(t,n){var r;const o=t.libraries?t.libraries.split(","):[],s=this.serializeParams(t);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=he.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=s,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==s&&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",...o];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((o,s)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[c,u]of Object.entries(t)){const d=c.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(u))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=nm+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=he.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=he.LOADED,this.notifyLoadingStatusListeners(),o()},window.gm_authFailure=()=>{this.loadingStatus=he.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=he.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=o=>r().then(()=>google.maps.importLibrary(o))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}Qt.loadingStatus=he.NOT_LOADED,Qt.serializedApiParams=void 0,Qt.listeners=[];const rm=["onLoad","onError","apiKey","version","libraries"],om=["children"],sm="GMP_visgl_rgmlibrary_v1_default",en=g.createContext(null);function im(){const[e,t]=g.useState({});return{mapInstances:e,addMapInstance:(s,i="default")=>{t(a=>Ce({},a,{[i]:s}))},removeMapInstance:(s="default")=>{t(i=>rt(i,[s].map(tm)))},clearMapInstances:()=>{t({})}}}function am(e){const{onLoad:t,onError:n,apiKey:r,version:o,libraries:s=[]}=e,i=rt(e,rm),[a,l]=g.useState(Qt.loadingStatus),[c,u]=g.useReducer((p,y)=>p[y.name]?p:Ce({},p,{[y.name]:y.value}),{}),d=g.useMemo(()=>s==null?void 0:s.join(","),[s]),f=g.useMemo(()=>JSON.stringify(Ce({apiKey:r,version:o},i)),[r,o,i]),m=g.useCallback(async p=>{var y;if(c[p])return c[p];if(!((y=google)!=null&&(y=y.maps)!=null&&y.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const S=await window.google.maps.importLibrary(p);return u({name:p,value:S}),S},[c]);return g.useEffect(()=>{(async()=>{try{const p=Ce({key:r},i);o&&(p.v=o),(d==null?void 0:d.length)>0&&(p.libraries=d),(p.channel===void 0||p.channel<0||p.channel>999)&&delete p.channel,p.solutionChannel===void 0?p.solutionChannel=sm:p.solutionChannel===""&&delete p.solutionChannel,await Qt.load(p,y=>l(y));for(const y of["core","maps",...s])await m(y);t&&t()}catch(p){n?n(p):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",p)}})()},[r,d,f]),{status:a,loadedLibraries:c,importLibrary:m}}const lm=e=>{const{children:t}=e,n=rt(e,om),{mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i}=im(),{status:a,loadedLibraries:l,importLibrary:c}=am(n),u=g.useMemo(()=>({mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[r,o,s,i,a,l,c]);return g.createElement(en.Provider,{value:u},t)};function cm(e,t){for(const n of hm){const r=t[n],o=Za[n];g.useEffect(()=>{if(!e||!r)return;const s=google.maps.event.addListener(e,o,i=>{r(um(o,e,i))});return()=>s.remove()},[e,o,r])}}function um(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(dm.includes(e)){const s=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"),s.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}},s}else if(fm.includes(e)){var o;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=r;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((o=n.latLng)==null?void 0:o.toJSON())||null,placeId:n.placeId},s}return r}const Za={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},dm=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],fm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],hm=Object.keys(Za);function eo(e,t){const n=g.useRef(void 0);(!n.current||!Qp(t,n.current))&&(n.current=t),g.useEffect(e,n.current)}const pm=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function mm(e,t){const n={},r=Object.keys(t);for(const o of r)pm.has(o)&&(n[o]=t[o]);eo(()=>{e&&e.setOptions(n)},[n])}function to(){var e;return((e=g.useContext(en))==null?void 0:e.status)||he.NOT_LOADED}function gm(e,t){const{viewport:n,viewState:r}=t,o=!!n;return g.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:s,longitude:i,bearing:a,pitch:l,zoom:c}=r;e.moveCamera({center:{lat:s,lng:i},heading:a,tilt:l,zoom:c+1})},[e,r]),o}function ym(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function Ja(e){return ym(e)?e:e.toJSON()}function vm(e,t,n){const r=n.center?Ja(n.center):null;let o=null,s=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(o=r.lat,s=r.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,l=Number.isFinite(n.tilt)?n.tilt:null;g.useLayoutEffect(()=>{if(!e)return;const c={};let u=!1;o!==null&&s!==null&&(t.current.center.lat!==o||t.current.center.lng!==s)&&(c.center={lat:o,lng:s},u=!0),i!==null&&t.current.zoom!==i&&(c.zoom=i,u=!0),a!==null&&t.current.heading!==a&&(c.heading=a,u=!0),l!==null&&t.current.tilt!==l&&(c.tilt=l,u=!0),u&&e.moveCamera(c)})}const xm=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return g.createElement("div",{style:e},g.createElement("h2",null,"Error: AuthFailure"),g.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",g.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function bm(){const[e,t]=g.useState(null),n=g.useCallback(r=>t(r),[t]);return[e,n]}function Qa(){return to()===he.LOADED}function Sm(){const[,e]=g.useReducer(t=>t+1,0);return e}function Cm(e,t){const n=e.getCenter(),r=e.getZoom(),o=e.getHeading()||0,s=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:o,tilt:s})}function wm(e){const t=Sm(),n=g.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return g.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{Cm(e,n),t()});return()=>r.remove()},[e,t]),n}const Tm=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],_m=["padding"];class En{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}En.entries={};function Em(e,t){const n=Qa(),[r,o]=g.useState(null),[s,i]=bm(),a=wm(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:m,reuseMaps:p,renderingType:y,colorScheme:S}=e,v=rt(e,Tm),b=e.zoom!==void 0||e.defaultZoom!==void 0,w=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!b||!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(m)&&(v.tilt=m);for(const _ of Object.keys(v))v[_]===void 0&&delete v[_];const M=g.useRef(void 0);return g.useEffect(()=>{if(!s||!n)return;const{addMapInstance:_,removeMapInstance:L}=t,{mapId:k}=e,A=`${k||"default"}:${y||"default"}:${S||"LIGHT"}`;let V,E;if(p&&En.has(A)?(E=En.pop(A),V=E.getDiv(),s.appendChild(V),E.setOptions(v),setTimeout(()=>E.setCenter(E.getCenter()),0)):(V=document.createElement("div"),V.style.height="100%",s.appendChild(V),E=new google.maps.Map(V,Ce({},v,y?{renderingType:y}:{},S?{colorScheme:S}:{}))),o(E),_(E,l),c){const{padding:X}=c,$=rt(c,_m);E.fitBounds($,X)}else(!b||!w)&&E.fitBounds({east:180,west:-180,south:-90,north:90});if(M.current){const{mapId:X,cameraState:$}=M.current;X!==k&&E.setOptions($)}return()=>{M.current={mapId:k,cameraState:a.current},V.remove(),p?En.push(A,E):google.maps.event.clearInstanceListeners(E),o(null),L(l)}},[s,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const el=g.createContext(null),tl=e=>{const{children:t,id:n,className:r,style:o}=e,s=g.useContext(en),i=to();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=Em(e,s);vm(a,c,e),cm(a,e),mm(a,e);const u=gm(a,e),d=!!e.controlled;g.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,u,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?Ja(e.center):null;let m=null,p=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(m=f.lat,p=f.lng);const y=g.useMemo(()=>{var b,w,M,_,L;return{center:{lat:(b=m)!=null?b:0,lng:(w=p)!=null?w:0},zoom:(M=e.zoom)!=null?M:0,heading:(_=e.heading)!=null?_:0,tilt:(L=e.tilt)!=null?L:0}},[m,p,e.zoom,e.heading,e.tilt]);g.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(y);const b=a.addListener("bounds_changed",()=>{a.moveCamera(y)});return()=>b.remove()},[a,d,y]);const S=g.useMemo(()=>Ce({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},o),[o,u]),v=g.useMemo(()=>({map:a}),[a]);return i===he.AUTH_FAILURE?g.createElement("div",{style:Ce({position:"relative"},r?{}:S),className:r},g.createElement(xm,null)):g.createElement("div",Ce({ref:l,"data-testid":"map",style:r?void 0:S,className:r},n?{id:n}:{}),a?g.createElement(el.Provider,{value:v},t):null)};tl.deckGLViewProps=!0;const nl=new Set;function Pm(...e){const t=JSON.stringify(e);nl.has(t)||(nl.add(t),console.error(...e))}const Pn=(e=null)=>{const t=g.useContext(en),{map:n}=g.useContext(el)||{};if(t===null)return Pm("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function An(e){const t=Qa(),n=g.useContext(en);return g.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function St(e,t,n){g.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function Mn(e,t,n){g.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function rl(e,t,n){g.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function Am(e){return e.content!==void 0}function Mm(e){return e.nodeType===Node.ELEMENT_NODE}const Lm=g.createContext(null),Dm={BOTTOM:["50%","100%"]},Om=({children:e,styles:t,className:n,anchorPoint:r})=>{const[o,s]=r??Dm.BOTTOM;let i=`-${o}`,a=`-${s}`;o.trimStart().startsWith("-")&&(i=o.substring(1)),s.trimStart().startsWith("-")&&(a=s.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return g.createElement("div",{style:{transform:l}},g.createElement("div",{className:n,style:t},e))};function km(e){const[t,n]=g.useState(null),[r,o]=g.useState(null),s=Pn(),i=An("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:m,onDragEnd:p,collisionBehavior:y,clickable:S,draggable:v,position:b,title:w,zIndex:M}=e,_=g.Children.count(a);return g.useEffect(()=>{if(!s||!i)return;const L=new i.AdvancedMarkerElement;L.map=s,n(L);let k=null;return _>0&&(k=document.createElement("div"),k.isCustomMarker=!0,L.content=k,o(k)),()=>{var A;L.map=null,(A=k)==null||A.remove(),n(null),o(null)}},[s,i,_]),g.useEffect(()=>{!t||!t.content||_>0||(t.content.className=c||"")},[t,c,_]),Mn(t,"position",b),Mn(t,"title",w??""),Mn(t,"zIndex",M),Mn(t,"collisionBehavior",y),g.useEffect(()=>{t&&(v!==void 0?t.gmpDraggable=v:f||m||p?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,v,f,p,m]),g.useEffect(()=>{if(!t)return;const L=S!==void 0||!!l||!!u||!!d;t.gmpClickable=L,L&&t!=null&&t.content&&Mm(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,S,l,u,d]),St(t,"click",l),St(t,"drag",f),St(t,"dragstart",m),St(t,"dragend",p),rl(t==null?void 0:t.element,"mouseenter",u),rl(t==null?void 0:t.element,"mouseleave",d),[t,r]}g.forwardRef((e,t)=>{const{children:n,style:r,className:o,anchorPoint:s}=e,[i,a]=km(e),l=g.useMemo(()=>i?{marker:i}:null,[i]);return g.useImperativeHandle(t,()=>i,[i]),a?g.createElement(Lm.Provider,{value:l},jn.createPortal(g.createElement(Om,{anchorPoint:s,styles:r,className:o},n),a)):null});function jm(e,t,n){if(t!=null&&typeof t!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const r=e.style;if(n==null){if(t==null)return;for(const o in t)t.hasOwnProperty(o)&&ol(r,o,t[o]);return}for(const o in n)n.hasOwnProperty(o)&&(t==null||!t.hasOwnProperty(o))&&(o.indexOf("--")===0?r.setProperty(o,""):o==="float"?r.cssFloat="":r[o]="");if(t!=null)for(const o in t){const s=t[o];t.hasOwnProperty(o)&&n[o]!==s&&ol(r,o,s)}}function ol(e,t,n){const r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n=="number"&&n!==0&&!Vm(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const Nm=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function Vm(e){return Nm.has(e)}const Im=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Rm=e=>{const{children:t,headerContent:n,style:r,className:o,pixelOffset:s,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=rt(e,Im),d=An("maps"),[f,m]=g.useState(null),p=g.useRef(null),y=g.useRef(null);g.useEffect(()=>{if(!d)return;p.current=document.createElement("div"),y.current=document.createElement("div");const b=u;s&&(b.pixelOffset=new google.maps.Size(s[0],s[1])),n&&(b.headerContent=typeof n=="string"?n:y.current);const w=new google.maps.InfoWindow(u);return w.setContent(p.current),m(w),()=>{var M,_;w.setContent(null),(M=p.current)==null||M.remove(),(_=y.current)==null||_.remove(),p.current=null,y.current=null,m(null)}},[d]);const S=g.useRef(null);g.useEffect(()=>{!f||!p.current||(jm(p.current,r||null,S.current),S.current=r||null,o!==p.current.className&&(p.current.className=o||""))},[f,o,r]),eo(()=>{if(!f)return;const b=u;s?b.pixelOffset=new google.maps.Size(s[0],s[1]):b.pixelOffset=null,n?b.headerContent=typeof n=="string"?n:y.current:b.headerContent=null,f.setOptions(u)},[u,s,n]),St(f,"close",l),St(f,"closeclick",c);const v=Pn();return eo(()=>{if(!v||!f||i===null)return;const b=!!i,w={map:v};if(i&&(w.anchor=i,Am(i)&&i.content instanceof Element)){const _=i.content,L=_==null?void 0:_.getBoundingClientRect();if(L&&_!=null&&_.isCustomMarker){var M;const k=(M=i.content.firstElementChild)==null?void 0:M.firstElementChild,A=k==null?void 0:k.getBoundingClientRect(),V=A.x-L.x+(A.width-L.width)/2,E=A.y-L.y,X=u;X.pixelOffset=new google.maps.Size(s?s[0]+V:V,s?s[1]+E:E),f.setOptions(X)}}return a!==void 0&&(w.shouldFocus=a),f.open(w),()=>{b&&f.set("anchor",null),f.close()}},[f,i,v,a,u,s]),g.createElement(g.Fragment,null,p.current&&jn.createPortal(t,p.current),y.current!==null&&jn.createPortal(n,y.current))},Fm=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function Bm(e){const[t,n]=g.useState(null),r=Pn(),{onClick:o,onDrag:s,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=rt(e,Fm),{position:d,draggable:f}=u;return g.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const m=new google.maps.Marker(u);return m.setMap(r),n(m),()=>{m.setMap(null),n(null)}},[r]),g.useEffect(()=>{if(!t)return;const m=t,p=google.maps.event;return o&&p.addListener(m,"click",o),s&&p.addListener(m,"drag",s),i&&p.addListener(m,"dragstart",i),a&&p.addListener(m,"dragend",a),l&&p.addListener(m,"mouseover",l),c&&p.addListener(m,"mouseout",c),t.setDraggable(!!f),()=>{p.clearInstanceListeners(m)}},[t,f,o,s,i,a,l,c]),g.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),g.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const sl=g.forwardRef((e,t)=>{const n=Bm(e);return g.useImperativeHandle(t,()=>n,[n]),g.createElement(g.Fragment,null)});function $m(){const[e,t]=g.useState(null);return[g.useCallback(r=>{t(r)},[]),e]}const Ue={root:"_root_faay1_10",header:"_header_faay1_18",body:"_body_faay1_31",highlighted:"_highlighted_faay1_43",toggleButton:"_toggleButton_faay1_46",toggleButtonIcon:"_toggleButtonIcon_faay1_46"};function zm({onLocationSelect:e}){const t=ja("locationCard"),n=j(p=>p.locations),{labels:r}=j(p=>p.localizationConfig),o=j(p=>p.isLocationListExpanded),s=j(p=>p.setIsLocationListExpanded),i=j(p=>p.selectedLocation),a=j(p=>p.setSelectedLocation),l=g.useRef({}),c=r["LocationList.header"],u=r["LocationList.locationDesignator"],d=c.split(/(\{:\d\})/g),f=g.useMemo(()=>d.map((p,y)=>p==="{:1}"?x.jsx("span",{className:Ue.highlighted,children:(n==null?void 0:n.length)??0},y):p==="{:2}"?x.jsx("span",{className:Ue.highlighted,children:u},y):p),[u,n.length,d]);g.useEffect(()=>{if(i&&o){const p=l.current[i];p!=null&&p.current&&requestAnimationFrame(()=>{p.current.scrollIntoView({behavior:"smooth",block:"start"})})}},[i,o]);function m(p){return()=>{e==null||e(p.coords),a==null||a(p.id)}}return x.jsxs("div",{className:q("dyn-locator__location-list",Ue.root),"data-expanded":o,children:[x.jsxs("header",{className:Ue.header,onClick:()=>s(!o),role:"button","aria-expanded":o,children:[x.jsx("span",{children:f}),x.jsx(bt,{className:Ue.toggleButton,variant:"bare",children:x.jsx(Be,{className:Ue.toggleButtonIcon,animate:!1,icon:"ChevronDown"})})]}),x.jsx("div",{className:Ue.body,children:n!=null&&n.length?n.map(p=>{const y=p.id;l.current[y]||(l.current[y]=g.createRef());const S=l.current[y];return x.jsx(t,{ref:S,"data-active":i===p.id,onClick:m(p),...p},p.id)}):x.jsx("div",{className:Ue.noResults,children:r["LocationList.noResults"]})})]})}const De={root:"_root_b3glo_21",loaderContainer:"_loaderContainer_b3glo_29",fullscreenButton:"_fullscreenButton_b3glo_36",backButton:"_backButton_b3glo_37",areaSearchButton:"_areaSearchButton_b3glo_52",visualCue:"_visualCue_b3glo_77",closeButton:"_closeButton_b3glo_102",searchButton:"_searchButton_b3glo_120"},Ln={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function Um({id:e,title:t,address:n,coords:r,actions:o,onClick:s,onZoom:i}){var m;const{labels:a}=j(p=>p.localizationConfig),l=j(p=>p.selectedLocation),c=j(p=>p.setSelectedLocation),[u,d]=$m(),f=g.useCallback(()=>{c==null||c("")},[c]);return x.jsxs(x.Fragment,{children:[x.jsx(sl,{ref:u,position:r,onClick:()=>{s==null||s()}}),l===e?x.jsxs(Rm,{anchor:d,headerContent:t,onCloseClick:f,className:Ln.root,children:[x.jsxs("header",{className:Ln.header,children:[x.jsx("h6",{children:t}),x.jsx("address",{children:n})]}),x.jsx("div",{className:Ln.body,children:x.jsxs("div",{className:Ln.cta,children:[x.jsx(Ht,{animate:!1,variant:"secondary",size:"small",...qr((m=o==null?void 0:o.find)==null?void 0:m.call(o,p=>p.type==="navigate")),children:a["InfoWindow.CTA_1"]}),x.jsx(Ht,{animate:!1,variant:"secondary",size:"small",onClick:i,children:a["InfoWindow.CTA_2"]})]})})]}):null]})}function Xm(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function Wm(e){return"title"in e&&!("size"in e)}function Km(){var W;const[e,t]=g.useState({zoom:ya}),[n,r]=g.useState(!1),[o,s]=g.useState("inactive"),i=g.useRef(""),a=to(),{request:l,loading:c}=_n(Yt.FIND),u=j(C=>C.locations),d=j(C=>C.featureFlags),{labels:f}=j(C=>C.localizationConfig),m=j(C=>C.targetLocation),p=j(C=>C.clearTargetLocation),y=j(C=>C.mapDetail),S=j(C=>C.setMapDetail),v=j(C=>C.isFullscreen),b=j(C=>C.setFullscreen),w=j(C=>C.isLocationListExpanded),M=j(C=>C.setIsLocationListExpanded),_=j(C=>C.shouldRefetch),L=j(C=>C.setShouldRefetch),k=j(C=>C.setSelectedLocation),A=y===Ke.MARKER;function V({detail:C}){const{center:I,zoom:B}=C;t({center:I,zoom:B}),n||r(!0)}function E(){n&&e.center&&o==="inactive"&&s("active")}function X(C){t(I=>({center:C,zoom:I.zoom}))}function $(){s("inactive"),M(!1),S(Ke.CLUSTER),t({center:Uh,zoom:ya}),L(!0)}const ee=j(C=>C.mapId),le=j(C=>C.setLocations),we=g.useCallback(async()=>{if(!e.center)return;const{lat:C,lng:I}=e.center,B={location:{type:"Feature",geometry:{type:"Point",coordinates:[I,C]},properties:{distance:Xh}}};try{const{data:te}=await l({mapId:ee},{body:B})??{};if(!(te!=null&&te.pins))throw new Error("No locations found");le(te.pins),S(Ke.MARKER),s("inactive")}catch(te){console.error("Error finding locations in this area: ",te),Y.error(et+Rh)}},[e.center,l,S,ee,le]);function Xe(C){function I(){t({center:C.coords,zoom:18}),w||M(!0)}if(Xm(C))return x.jsx(sl,{position:C.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(C.range??0)/zh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await C.onMarkerClick(),t({center:C.coords,zoom:C.zoom||15})}},C.id);if(Wm(C))return x.jsx(Um,{id:C.id,title:C.title??"No title",address:C.address??"No address",coords:C.coords,actions:C.actions,onZoom:I,onClick:()=>{k(C.id)}},C.id)}if(g.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),g.useEffect(()=>{m&&(t({center:m.coords,zoom:m.zoom}),p())},[m,p]),a===he.LOADING)return x.jsx("div",{className:q("dyn-locator__map",De.root),children:x.jsx("div",{className:De.loaderContainer,children:x.jsx(Pt,{size:"large"})})});if(a===he.FAILED||a===he.AUTH_FAILURE)throw new Error(Ih);if(a===he.LOADED)return x.jsxs("div",{className:q("dyn-locator__map",De.root),children:[d.fullscreen?x.jsx(bt,{className:q(De.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>b==null?void 0:b(!v),children:x.jsx(Be,{size:"M",icon:v?"Close":"Expand"})}):null,A?x.jsx(bt,{className:q(De.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:$,children:x.jsx(Be,{size:"M",icon:"ArrowLeft"})}):null,o!=="inactive"&&x.jsxs(Ht,{className:q(De.areaSearchButton,"dyn-locator__map__area-search-button",A&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||o==="select_area",loading:c,onClick:()=>s("select_area"),children:[x.jsx(Ql,{}),f["Map.areaSearchButton"]]}),o==="select_area"&&x.jsxs("div",{className:De.visualCue,children:[x.jsxs("i",{children:[x.jsx("button",{className:De.closeButton,onClick:()=>s("active"),"aria-label":"Close area search",children:x.jsx(bo,{size:16})}),x.jsx(ec,{size:48,strokeWidth:1,color:"currentColor"})]}),x.jsxs(Ht,{className:De.searchButton,disabled:c,loading:c,onClick:we,size:"small",variant:"themed",children:[f["Map.areaSearchVisualCueCTA"]," ",x.jsx(Wl,{size:22,style:{position:"relative",left:-8}})]})]}),x.jsx(tl,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:V,onDragend:E,defaultBounds:qt,children:!_&&((W=u==null?void 0:u.map)==null?void 0:W.call(u,Xe))}),A?x.jsx(zm,{onLocationSelect:X}):null]})}const Oe={root:"_root_h6kw7_10",validIcon:"_validIcon_h6kw7_23",errorIcon:"_errorIcon_h6kw7_30",label:"_label_h6kw7_51",input:"_input_h6kw7_61",sideButton:"_sideButton_h6kw7_92",sideOrnament:"_sideOrnament_h6kw7_95",clearButton:"_clearButton_h6kw7_129",dropdown:"_dropdown_h6kw7_169"},il="Input";function al({label:e,className:t,showValidation:n=!0,error:r=!1,valid:o=!1,clearable:s=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:m,sideOrnament:p,...y},S){const v=a?Qe.div:"div",b=Fe(y)??[],w=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return x.jsxs(v,{className:q("dyn-locator__"+Pe(il),Oe.root,Ee(t),...b??[]),"data-valid":o,"data-error":r,"data-expanded":u,"data-side-button":!!m,...f?{style:f}:{},...w,children:[n&&x.jsxs(x.Fragment,{children:[o&&x.jsx("span",{className:Oe.validIcon}),r&&x.jsx("span",{className:Oe.errorIcon})]}),e?x.jsx("label",{className:Oe.label,...y.id?{htmlFor:y.id}:{},children:e}):null,p?x.jsx("span",{className:Oe.sideOrnament,children:p}):null,x.jsx("input",{ref:S,className:q(Oe.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!m,"data-side-ornament":!!p,...y}),m?x.jsx("span",{className:Oe.sideButton,children:m}):null,s&&(y==null?void 0:y.value)&&x.jsx("button",{className:Oe.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&x.jsx("div",{className:Oe.dropdown,children:c})]})}al.displayName=il;const Gm=g.forwardRef(al),ot={root:"_root_1vbtg_7",input:"_input_1vbtg_7",clearButton:"_clearButton_1vbtg_10",sideOrnament:"_sideOrnament_1vbtg_13",predictionsContainer:"_predictionsContainer_1vbtg_18",predictionItem:"_predictionItem_1vbtg_29",loadingItem:"_loadingItem_1vbtg_47"};function qm(){const[e,t]=g.useState(""),[n,r]=g.useState([]),[o,s]=g.useState(!1),[i,a]=g.useState(!1),[l,c]=g.useState(!1),u=j(C=>C.mapId),d=j(C=>C.setLocations),f=j(C=>C.setMapDetail),m=j(C=>C.zoomToLocation),{labels:p}=j(C=>C.localizationConfig),{search:y}=j(C=>C.featureFlags),{request:S,loading:v}=_n(Yt.FIND),b=An("places"),w=An("geocoding"),M=Pn(),_=g.useRef(null),L=g.useRef(null),k=g.useRef(null),A=g.useRef(null);g.useEffect(()=>{w&&(k.current||(k.current=new w.Geocoder))},[w]),g.useEffect(()=>{b&&(_.current||(_.current=new b.AutocompleteService),A.current||(A.current=new b.AutocompleteSessionToken))},[b]),g.useEffect(()=>{!b||!M||L.current||(L.current=new b.PlacesService(M))},[b,M]);const V=async C=>{var I;if(!C||C.length<3){r([]),s(!1);return}a(!0);try{if(!b||!_.current)throw new Error("Places library or Autocomplete Service not available");const B=await _.current.getPlacePredictions({input:C,...A.current?{sessionToken:A.current}:{}});if(a(!1),!((I=B==null?void 0:B.predictions)!=null&&I.length)){r([]),s(!1);return}r(B.predictions),s(!0)}catch(B){console.error("Error fetching predictions: ",B),a(!1),r([]),s(!1),Y.error(et+Nh)}},E=g.useMemo(()=>Wh(C=>V(C),600),[V]),X=C=>{const I=C.currentTarget.value;if(t(I),!I||I.length<3){r([]),s(!1);return}E(I)},$=async C=>{var I,B,te,ne,ke;t(C.description),s(!1);try{if(!b||!L.current)throw new Error("Places library or Places Service not available");const oe=await new Promise((We,st)=>{L.current.getDetails({placeId:C.place_id,fields:["geometry"],...A.current?{sessionToken:A.current}:{}},(Ct,it)=>{it===b.PlacesServiceStatus.OK&&Ct?We(Ct):st(new Error(`Place details request failed with status: ${it}`))})});if((I=oe==null?void 0:oe.geometry)!=null&&I.location){const We=(te=(B=oe.geometry.location).lat)==null?void 0:te.call(B),st=(ke=(ne=oe.geometry.location).lng)==null?void 0:ke.call(ne);await Xe({lat:We,lng:st})}}catch(oe){console.error("Error getting place details:",oe),Y.error(et+Vh)}finally{b&&(A.current=new b.AutocompleteSessionToken)}},ee=()=>{t(""),r([]),s(!1)},le=()=>!o||n.length===0?null:x.jsx("div",{className:ot.predictionsContainer,children:i?x.jsx("div",{className:ot.loadingItem,children:x.jsx(Pt,{size:"medium"})}):n.map(C=>x.jsx("div",{className:ot.predictionItem,onClick:()=>$(C),children:C.description},C.place_id))});async function we(C){C.preventDefault(),c(!0);try{const I=await new Promise((ne,ke)=>{navigator.geolocation.getCurrentPosition(oe=>ne(oe),oe=>ke(oe),{timeout:5e3})}),B={lat:I.coords.latitude,lng:I.coords.longitude};if(await Xe(B),!w||!(k!=null&&k.current)||!M)throw new Error("Geocoding library or Geocoder not available");const te=await new Promise((ne,ke)=>{k.current.geocode({location:B},(oe,We)=>{We===google.maps.GeocoderStatus.OK&&oe&&oe.length>0?ne(oe):ke(new Error(`Geocoding failed with status: ${We}`))})});te&&te[0]&&t(te[0].formatted_address)}catch(I){console.error("Error getting location: ",I);const B=I instanceof GeolocationPositionError?et+I.message:et+kh;Y.error(B)}finally{c(!1)}}async function Xe(C){const{lng:I,lat:B}=C,te={location:{type:"Feature",geometry:{type:"Point",coordinates:[I,B]},properties:{}}};try{const{data:ne}=await S({mapId:u},{body:te})??{};if(!(ne!=null&&ne.pins))throw new Error("No locations found");d(ne.pins),f(Ke.MARKER),m({lat:B,lng:I},ne.zoom||15)}catch(ne){throw console.error("Error finding locations: ",ne),ne}}const W=v||l;return y?x.jsxs("div",{className:q("dyn-locator__search",ot.root),children:[x.jsx(Gm,{name:"locator_search_field",className:q("dyn-locator__search__field",ot.input),value:e,onChange:X,placeholder:p["Search.placeholder"],dropdown:le(),dropdownVisible:o,disabled:W,sideOrnament:e?void 0:x.jsx(Be,{className:ot.sideOrnament,icon:"Search",size:"M"}),sideButton:e?x.jsx(bt,{variant:"bare",className:ot.clearButton,onClick:ee,"aria-label":"Clear",children:x.jsx(Be,{icon:"Close",size:"M"})}):x.jsx(ba,{href:"#",onClick:we,children:p["Search.geolocationButton"]})}),x.jsx(qa,{show:W,children:x.jsx(Pt,{size:"medium"})})]}):null}function Hm({children:e,apiKey:t,language:n,region:r,libraries:o}){return x.jsx(lm,{apiKey:t,region:r,language:n,libraries:o,children:e})}const Ym=Object.freeze(Object.defineProperty({__proto__:null,default:Hm},Symbol.toStringTag,{value:"Module"}));function Zm(){throw new Error("Mapbox provider is not implemented yet")}const Jm=Object.freeze(Object.defineProperty({__proto__:null,default:Zm},Symbol.toStringTag,{value:"Module"}));function Qm(){throw new Error("HERE Maps provider is not implemented yet")}const eg=Object.freeze(Object.defineProperty({__proto__:null,default:Qm},Symbol.toStringTag,{value:"Module"}));ve.Map=Km,ve.Search=qm,ve.default=Ha,Object.defineProperties(ve,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
314
|
+
`,En=16,bm=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:o,children:r,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:l}=qp(n);return ee.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:En,left:En,right:En,bottom:En,pointerEvents:"none",...s},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:o,defaultPosition:t}),f=vm(u,d);return ee.createElement(ym,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?xm:"",style:f},c.type==="custom"?_n(c.message,c):r?r(c):ee.createElement(Ya,{toast:c,position:u}))}))};const Sm={root:"_root_movxa_4"};function er({className:e,children:t,show:n=!0,variant:o="light",...r}){const s=W("dyn-locator__overlay",Sm.root,e);return n?y.jsx("div",{className:s,"data-variant":o,...r,children:t}):null}function Pn(e){const[t,n]=m.useState(!1),[o,r]=m.useState(null),{getEndpoint:s}=Dp(e);return{request:async(a={},l={})=>{n(!0),r(null);try{let c;try{c=s(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 r(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:o}}const We={content:"_content_jvati_17",header:"_header_jvati_29",locationInfo:"_locationInfo_jvati_30",title:"_title_jvati_42",closeButton:"_closeButton_jvati_49",body:"_body_jvati_56",shareButtons:"_shareButtons_jvati_77",shareButton:"_shareButton_jvati_77"},wm={root:"_root_1re47_4"};function Cm({children:e,className:t,position:n="top"}){return y.jsx("span",{className:W("dyn-locator__tooltip",wm.root,t),role:"tooltip","aria-hidden":"true","data-position":n,children:e})}function _m({isOpen:e,onClose:t,portalContainer:n=document.body}){var c,u;const{labels:o}=k(d=>d.localizationConfig),r=k(d=>d.locations),s=k(d=>d.selectedLocation),i=m.useMemo(()=>s?r.find(d=>d.id===s):void 0,[r,s]);function a(d){const{name:f,shareURL:g}=d;switch(f){case"facebook":return{style:{"--icon-button-bg":"#1877F2","--icon-button-hover-bg":"#0a4992"},href:g??"#",target:"_blank",rel:"noopener noreferrer"};case"x":case"twitter":return{style:{"--icon-button-bg":"#000","--icon-button-hover-bg":"#333"},href:g??"#",target:"_blank",rel:"noopener noreferrer"};case"whatsapp":return{style:{"--icon-button-bg":"#25D366","--icon-button-hover-bg":"#167d3c"},href:g??"#",target:"_blank",rel:"noopener noreferrer"};case"email":return{style:{"--icon-button-bg":"var(--dyn-locator__colors-grey-grey-300)","--icon-button-hover-bg":"var(--dyn-locator__colors-grey-grey-400)"},href:g??"#"};case"copy":return{style:{"--icon-button-bg":"var(--dyn-locator__colors-grey-grey-300)","--icon-button-hover-bg":"var(--dyn-locator__colors-grey-grey-400)"},href:"#",onClick:h=>{h.preventDefault(),navigator.clipboard.writeText(g).then(()=>{H.success(o["ShareSheet.copyLinkSuccessNotif"])}).catch(v=>{H.error(o["ShareSheet.copyLinkErrorNotif"]),console.error("Failed to copy link: ",v)})}};default:return{}}}if(!e)return null;const l=y.jsx(er,{show:e,variant:"dark",onClick:t,children:y.jsxs("div",{className:W("dyn-locator__share-sheet",We.content),onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"share-sheet-title",children:[y.jsxs("header",{className:We.header,children:[y.jsx("h2",{id:"share-sheet-title",className:We.title,children:o["ShareSheet.title"]}),y.jsx(ze,{className:We.closeButton,onClick:t,"aria-label":"Close",variant:"bare",children:y.jsx(_e,{icon:"Close"})})]}),y.jsxs("div",{className:We.body,children:[i&&y.jsxs("div",{className:We.locationInfo,children:[y.jsx("h3",{children:i.title}),y.jsx("p",{children:i.address})]}),y.jsx("div",{className:We.shareButtons,children:(u=(c=i==null?void 0:i.on_share)==null?void 0:c.map)==null?void 0:u.call(c,d=>{const{name:f,shareURL:g}=d,h=f.charAt(0).toUpperCase()+f.slice(1),v=f==="copy"?o["ShareSheet.copyLinkTooltip"]:f==="email"?o["ShareSheet.shareViaEmailTooltip"]:o["ShareSheet.genericShareTooltip"]+h;return y.jsxs(ze,{as:"a",href:g,variant:"negative",className:We.shareButton,...a(d),children:[y.jsx(_e,{icon:h,size:"M"}),y.jsx(Cm,{children:v})]})})})]})]})});return n?on.createPortal(l,n):l}function Tm(){return y.jsx(bm,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:e=>y.jsx(Ya,{toast:e,children:({icon:t,message:n})=>y.jsxs(y.Fragment,{children:[t,n,e.type==="error"&&y.jsx(ze,{variant:"bare",onClick:()=>H.dismiss(e.id),children:y.jsx(_e,{icon:"Close"})})]})})})}function Em({children:e,customComponents:t,customIcons:n,featureFlags:o,fetchLocations:r,localizationConfig:s,locations:i=[],mapId:a}){const l=k(L=>L.shouldRefetch),c=k(L=>L.setShouldRefetch),u=k(L=>L.isShareSheetOpen),d=k(L=>L.toggleShareSheet),f=k(L=>L.featureFlags),g=k(L=>L.setFeatureFlags),h=k(L=>L.setMapId),v=k(L=>L.setLocalizationConfig),S=k(L=>L.setMapDetail),x=k(L=>L.setLocations),b=k(L=>L.isFullscreen),C=m.useRef(null),{request:P,loading:T,error:M}=Pn(Zt.CLUSTERS),{request:j,loading:A,error:V}=Pn(Zt.MARKERS),N=T||A,q=!!M||!!V;async function le(L){var de;try{if(typeof L!="number"||L<0||isNaN(L))throw new Error("No map ID provided");const{data:J}=await P({mapId:String(L)})??{};if(!J)throw new Error("No cluster data received from the server");x((de=J.map)==null?void 0:de.call(J,z=>({...z,onMarkerClick:async()=>{await ce(L,z.id)}})))}catch(J){console.error("Error fetching clusters: ",J),H.error(nt+qo),x([])}}async function ce(L,de){try{if(typeof L!="number"||L<0||isNaN(L))throw new Error("No map ID provided");const{data:J}=await j({mapId:L,clusterId:de})??{};if(!J)throw new Error("No marker data received from the server");x(J),S(He.MARKER)}catch(J){console.error("Error fetching markers: ",J),H.error(nt+qo),x([])}}return m.useEffect(()=>{s&&v(s),o&&g(o),typeof a=="number"&&a>0&&!isNaN(a)&&h(a),i!=null&&i.length?x(i):r?r().then(L=>x(L)):le(a)},[]),m.useEffect(()=>{let L=!0;return l&&a&&le(a).finally(()=>{L&&c(!1)}),()=>{L=!1}},[l,a]),y.jsx("div",{id:"dyn-locator",className:W("dyn-locator__locator",vr.root),"data-fullscreen":b,children:y.jsxs(Pp,{customIcons:n,customComponents:t,children:[e,y.jsxs(er,{show:N||q,variant:"light",children:[N?y.jsx(At,{size:"large"}):null,q?y.jsx(Ta,{title:Bh,message:qo,actionText:"ricaricare la pagina.",errorDetails:(M==null?void 0:M.message)||(V==null?void 0:V.message),onAction:L=>{L.preventDefault(),window.location.reload()}}):null]}),y.jsx(Tm,{}),y.jsx("div",{ref:C,className:Kh}),f.share?y.jsx(_m,{isOpen:u,onClose:()=>d(!1),portalContainer:C.current}):null]})})}function Za({mapProvider:e,endpoints:t,apiUrl:n,children:o,...r}){return y.jsx(Jh,{children:y.jsx(Vl,{children:y.jsx(zl,{mapProvider:e,children:y.jsx(Lp,{endpoints:t,apiUrl:n,children:y.jsx(Em,{children:o,...r})})})})})}Za.displayName="Locator";var tr,Ja;function Pm(){return Ja||(Ja=1,tr=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 o,r,s;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))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(s=Object.keys(t),o=s.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[r]))return!1;for(r=o;r--!==0;){var i=s[r];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),tr}var Am=Pm();const Mm=ur(Am);function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Te.apply(null,arguments)}function st(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function Lm(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Dm(e){var t=Lm(e,"string");return typeof t=="symbol"?t:t+""}const me={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},km="https://maps.googleapis.com/maps/api/js";class en{static async load(t,n){var o;const r=t.libraries?t.libraries.split(","):[],s=this.serializeParams(t);this.listeners.push(n),(o=window.google)!=null&&(o=o.maps)!=null&&o.importLibrary?(this.serializedApiParams||(this.loadingStatus=me.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=s,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==s&&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",...r];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 o=()=>n||(n=new Promise((r,s)=>{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=km+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=me.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=me.LOADED,this.notifyLoadingStatusListeners(),r()},window.gm_authFailure=()=>{this.loadingStatus=me.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=me.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=r=>o().then(()=>google.maps.importLibrary(r))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}en.loadingStatus=me.NOT_LOADED,en.serializedApiParams=void 0,en.listeners=[];const Om=["onLoad","onError","apiKey","version","libraries"],jm=["children"],Nm="GMP_visgl_rgmlibrary_v1_default",tn=m.createContext(null);function Vm(){const[e,t]=m.useState({});return{mapInstances:e,addMapInstance:(s,i="default")=>{t(a=>Te({},a,{[i]:s}))},removeMapInstance:(s="default")=>{t(i=>st(i,[s].map(Dm)))},clearMapInstances:()=>{t({})}}}function Im(e){const{onLoad:t,onError:n,apiKey:o,version:r,libraries:s=[]}=e,i=st(e,Om),[a,l]=m.useState(en.loadingStatus),[c,u]=m.useReducer((h,v)=>h[v.name]?h:Te({},h,{[v.name]:v.value}),{}),d=m.useMemo(()=>s==null?void 0:s.join(","),[s]),f=m.useMemo(()=>JSON.stringify(Te({apiKey:o,version:r},i)),[o,r,i]),g=m.useCallback(async h=>{var v;if(c[h])return c[h];if(!((v=google)!=null&&(v=v.maps)!=null&&v.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const S=await window.google.maps.importLibrary(h);return u({name:h,value:S}),S},[c]);return m.useEffect(()=>{(async()=>{try{const h=Te({key:o},i);r&&(h.v=r),(d==null?void 0:d.length)>0&&(h.libraries=d),(h.channel===void 0||h.channel<0||h.channel>999)&&delete h.channel,h.solutionChannel===void 0?h.solutionChannel=Nm:h.solutionChannel===""&&delete h.solutionChannel,await en.load(h,v=>l(v));for(const v of["core","maps",...s])await g(v);t&&t()}catch(h){n?n(h):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",h)}})()},[o,d,f]),{status:a,loadedLibraries:c,importLibrary:g}}const Rm=e=>{const{children:t}=e,n=st(e,jm),{mapInstances:o,addMapInstance:r,removeMapInstance:s,clearMapInstances:i}=Vm(),{status:a,loadedLibraries:l,importLibrary:c}=Im(n),u=m.useMemo(()=>({mapInstances:o,addMapInstance:r,removeMapInstance:s,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[o,r,s,i,a,l,c]);return m.createElement(tn.Provider,{value:u},t)};function Bm(e,t){for(const n of Um){const o=t[n],r=Qa[n];m.useEffect(()=>{if(!e||!o)return;const s=google.maps.event.addListener(e,r,i=>{o(Fm(r,e,i))});return()=>s.remove()},[e,r,o])}}function Fm(e,t,n){const o={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if($m.includes(e)){const s=o,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"),s.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}},s}else if(zm.includes(e)){var r;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=o;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((r=n.latLng)==null?void 0:r.toJSON())||null,placeId:n.placeId},s}return o}const Qa={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"},$m=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],zm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Um=Object.keys(Qa);function nr(e,t){const n=m.useRef(void 0);(!n.current||!Mm(t,n.current))&&(n.current=t),m.useEffect(e,n.current)}const Xm=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 Wm(e,t){const n={},o=Object.keys(t);for(const r of o)Xm.has(r)&&(n[r]=t[r]);nr(()=>{e&&e.setOptions(n)},[n])}function or(){var e;return((e=m.useContext(tn))==null?void 0:e.status)||me.NOT_LOADED}function Gm(e,t){const{viewport:n,viewState:o}=t,r=!!n;return m.useLayoutEffect(()=>{if(!e||!o)return;const{latitude:s,longitude:i,bearing:a,pitch:l,zoom:c}=o;e.moveCamera({center:{lat:s,lng:i},heading:a,tilt:l,zoom:c+1})},[e,o]),r}function Km(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function el(e){return Km(e)?e:e.toJSON()}function Hm(e,t,n){const o=n.center?el(n.center):null;let r=null,s=null;o&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&(r=o.lat,s=o.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;r!==null&&s!==null&&(t.current.center.lat!==r||t.current.center.lng!==s)&&(c.center={lat:r,lng:s},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 qm=()=>{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 Ym(){const[e,t]=m.useState(null),n=m.useCallback(o=>t(o),[t]);return[e,n]}function tl(){return or()===me.LOADED}function Zm(){const[,e]=m.useReducer(t=>t+1,0);return e}function Jm(e,t){const n=e.getCenter(),o=e.getZoom(),r=e.getHeading()||0,s=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(o))&&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:o||0,heading:r,tilt:s})}function Qm(e){const t=Zm(),n=m.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return m.useEffect(()=>{if(!e)return;const o=google.maps.event.addListener(e,"bounds_changed",()=>{Jm(e,n),t()});return()=>o.remove()},[e,t]),n}const eg=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],tg=["padding"];class An{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)}}An.entries={};function ng(e,t){const n=tl(),[o,r]=m.useState(null),[s,i]=Ym(),a=Qm(o),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:g,reuseMaps:h,renderingType:v,colorScheme:S}=e,x=st(e,eg),b=e.zoom!==void 0||e.defaultZoom!==void 0,C=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!b||!C)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!x.center&&u&&(x.center=u),!x.zoom&&Number.isFinite(d)&&(x.zoom=d),!x.heading&&Number.isFinite(f)&&(x.heading=f),!x.tilt&&Number.isFinite(g)&&(x.tilt=g);for(const T of Object.keys(x))x[T]===void 0&&delete x[T];const P=m.useRef(void 0);return m.useEffect(()=>{if(!s||!n)return;const{addMapInstance:T,removeMapInstance:M}=t,{mapId:j}=e,A=`${j||"default"}:${v||"default"}:${S||"LIGHT"}`;let V,N;if(h&&An.has(A)?(N=An.pop(A),V=N.getDiv(),s.appendChild(V),N.setOptions(x),setTimeout(()=>N.setCenter(N.getCenter()),0)):(V=document.createElement("div"),V.style.height="100%",s.appendChild(V),N=new google.maps.Map(V,Te({},x,v?{renderingType:v}:{},S?{colorScheme:S}:{}))),r(N),T(N,l),c){const{padding:q}=c,le=st(c,tg);N.fitBounds(le,q)}else(!b||!C)&&N.fitBounds({east:180,west:-180,south:-90,north:90});if(P.current){const{mapId:q,cameraState:le}=P.current;q!==j&&N.setOptions(le)}return()=>{P.current={mapId:j,cameraState:a.current},V.remove(),h?An.push(A,N):google.maps.event.clearInstanceListeners(N),r(null),M(l)}},[s,n,l,e.mapId,e.renderingType,e.colorScheme]),[o,i,a]}const nl=m.createContext(null),ol=e=>{const{children:t,id:n,className:o,style:r}=e,s=m.useContext(tn),i=or();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=ng(e,s);Hm(a,c,e),Bm(a,e),Wm(a,e);const u=Gm(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?el(e.center):null;let g=null,h=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(g=f.lat,h=f.lng);const v=m.useMemo(()=>{var b,C,P,T,M;return{center:{lat:(b=g)!=null?b:0,lng:(C=h)!=null?C:0},zoom:(P=e.zoom)!=null?P:0,heading:(T=e.heading)!=null?T:0,tilt:(M=e.tilt)!=null?M:0}},[g,h,e.zoom,e.heading,e.tilt]);m.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(v);const b=a.addListener("bounds_changed",()=>{a.moveCamera(v)});return()=>b.remove()},[a,d,v]);const S=m.useMemo(()=>Te({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},r),[r,u]),x=m.useMemo(()=>({map:a}),[a]);return i===me.AUTH_FAILURE?m.createElement("div",{style:Te({position:"relative"},o?{}:S),className:o},m.createElement(qm,null)):m.createElement("div",Te({ref:l,"data-testid":"map",style:o?void 0:S,className:o},n?{id:n}:{}),a?m.createElement(nl.Provider,{value:x},t):null)};ol.deckGLViewProps=!0;const rl=new Set;function og(...e){const t=JSON.stringify(e);rl.has(t)||(rl.add(t),console.error(...e))}const Mn=(e=null)=>{const t=m.useContext(tn),{map:n}=m.useContext(nl)||{};if(t===null)return og("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:o}=t;return e!==null?o[e]||null:n||o.default||null};function Ln(e){const t=tl(),n=m.useContext(tn);return m.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function wt(e,t,n){m.useEffect(()=>{if(!e||!t||!n)return;const o=google.maps.event.addListener(e,t,n);return()=>o.remove()},[e,t,n])}function Dn(e,t,n){m.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function sl(e,t,n){m.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function rg(e){return e.content!==void 0}function sg(e){return e.nodeType===Node.ELEMENT_NODE}const ig=m.createContext(null),ag={BOTTOM:["50%","100%"]},lg=({children:e,styles:t,className:n,anchorPoint:o})=>{const[r,s]=o??ag.BOTTOM;let i=`-${r}`,a=`-${s}`;r.trimStart().startsWith("-")&&(i=r.substring(1)),s.trimStart().startsWith("-")&&(a=s.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 cg(e){const[t,n]=m.useState(null),[o,r]=m.useState(null),s=Mn(),i=Ln("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:g,onDragEnd:h,collisionBehavior:v,clickable:S,draggable:x,position:b,title:C,zIndex:P}=e,T=m.Children.count(a);return m.useEffect(()=>{if(!s||!i)return;const M=new i.AdvancedMarkerElement;M.map=s,n(M);let j=null;return T>0&&(j=document.createElement("div"),j.isCustomMarker=!0,M.content=j,r(j)),()=>{var A;M.map=null,(A=j)==null||A.remove(),n(null),r(null)}},[s,i,T]),m.useEffect(()=>{!t||!t.content||T>0||(t.content.className=c||"")},[t,c,T]),Dn(t,"position",b),Dn(t,"title",C??""),Dn(t,"zIndex",P),Dn(t,"collisionBehavior",v),m.useEffect(()=>{t&&(x!==void 0?t.gmpDraggable=x:f||g||h?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,x,f,h,g]),m.useEffect(()=>{if(!t)return;const M=S!==void 0||!!l||!!u||!!d;t.gmpClickable=M,M&&t!=null&&t.content&&sg(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,S,l,u,d]),wt(t,"click",l),wt(t,"drag",f),wt(t,"dragstart",g),wt(t,"dragend",h),sl(t==null?void 0:t.element,"mouseenter",u),sl(t==null?void 0:t.element,"mouseleave",d),[t,o]}m.forwardRef((e,t)=>{const{children:n,style:o,className:r,anchorPoint:s}=e,[i,a]=cg(e),l=m.useMemo(()=>i?{marker:i}:null,[i]);return m.useImperativeHandle(t,()=>i,[i]),a?m.createElement(ig.Provider,{value:l},on.createPortal(m.createElement(lg,{anchorPoint:s,styles:o,className:r},n),a)):null});function ug(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 o=e.style;if(n==null){if(t==null)return;for(const r in t)t.hasOwnProperty(r)&&il(o,r,t[r]);return}for(const r in n)n.hasOwnProperty(r)&&(t==null||!t.hasOwnProperty(r))&&(r.indexOf("--")===0?o.setProperty(r,""):r==="float"?o.cssFloat="":o[r]="");if(t!=null)for(const r in t){const s=t[r];t.hasOwnProperty(r)&&n[r]!==s&&il(o,r,s)}}function il(e,t,n){const o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n=="number"&&n!==0&&!fg(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const dg=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 fg(e){return dg.has(e)}const hg=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],pg=e=>{const{children:t,headerContent:n,style:o,className:r,pixelOffset:s,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=st(e,hg),d=Ln("maps"),[f,g]=m.useState(null),h=m.useRef(null),v=m.useRef(null);m.useEffect(()=>{if(!d)return;h.current=document.createElement("div"),v.current=document.createElement("div");const b=u;s&&(b.pixelOffset=new google.maps.Size(s[0],s[1])),n&&(b.headerContent=typeof n=="string"?n:v.current);const C=new google.maps.InfoWindow(u);return C.setContent(h.current),g(C),()=>{var P,T;C.setContent(null),(P=h.current)==null||P.remove(),(T=v.current)==null||T.remove(),h.current=null,v.current=null,g(null)}},[d]);const S=m.useRef(null);m.useEffect(()=>{!f||!h.current||(ug(h.current,o||null,S.current),S.current=o||null,r!==h.current.className&&(h.current.className=r||""))},[f,r,o]),nr(()=>{if(!f)return;const b=u;s?b.pixelOffset=new google.maps.Size(s[0],s[1]):b.pixelOffset=null,n?b.headerContent=typeof n=="string"?n:v.current:b.headerContent=null,f.setOptions(u)},[u,s,n]),wt(f,"close",l),wt(f,"closeclick",c);const x=Mn();return nr(()=>{if(!x||!f||i===null)return;const b=!!i,C={map:x};if(i&&(C.anchor=i,rg(i)&&i.content instanceof Element)){const T=i.content,M=T==null?void 0:T.getBoundingClientRect();if(M&&T!=null&&T.isCustomMarker){var P;const j=(P=i.content.firstElementChild)==null?void 0:P.firstElementChild,A=j==null?void 0:j.getBoundingClientRect(),V=A.x-M.x+(A.width-M.width)/2,N=A.y-M.y,q=u;q.pixelOffset=new google.maps.Size(s?s[0]+V:V,s?s[1]+N:N),f.setOptions(q)}}return a!==void 0&&(C.shouldFocus=a),f.open(C),()=>{b&&f.set("anchor",null),f.close()}},[f,i,x,a,u,s]),m.createElement(m.Fragment,null,h.current&&on.createPortal(t,h.current),v.current!==null&&on.createPortal(n,v.current))},mg=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function gg(e){const[t,n]=m.useState(null),o=Mn(),{onClick:r,onDrag:s,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=st(e,mg),{position:d,draggable:f}=u;return m.useEffect(()=>{if(!o){o===void 0&&console.error("<Marker> has to be inside a Map component.");return}const g=new google.maps.Marker(u);return g.setMap(o),n(g),()=>{g.setMap(null),n(null)}},[o]),m.useEffect(()=>{if(!t)return;const g=t,h=google.maps.event;return r&&h.addListener(g,"click",r),s&&h.addListener(g,"drag",s),i&&h.addListener(g,"dragstart",i),a&&h.addListener(g,"dragend",a),l&&h.addListener(g,"mouseover",l),c&&h.addListener(g,"mouseout",c),t.setDraggable(!!f),()=>{h.clearInstanceListeners(g)}},[t,f,r,s,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 al=m.forwardRef((e,t)=>{const n=gg(e);return m.useImperativeHandle(t,()=>n,[n]),m.createElement(m.Fragment,null)});function yg(){const[e,t]=m.useState(null);return[m.useCallback(o=>{t(o)},[]),e]}const Ge={root:"_root_faay1_10",header:"_header_faay1_18",body:"_body_faay1_31",highlighted:"_highlighted_faay1_43",toggleButton:"_toggleButton_faay1_46",toggleButtonIcon:"_toggleButtonIcon_faay1_46"};function vg({onLocationSelect:e}){const t=Ia("locationCard"),n=k(h=>h.locations),{labels:o}=k(h=>h.localizationConfig),r=k(h=>h.isLocationListExpanded),s=k(h=>h.setIsLocationListExpanded),i=k(h=>h.selectedLocation),a=k(h=>h.setSelectedLocation),l=m.useRef({}),c=o["LocationList.header"],u=o["LocationList.locationDesignator"],d=c.split(/(\{:\d\})/g),f=m.useMemo(()=>d.map((h,v)=>h==="{:1}"?y.jsx("span",{className:Ge.highlighted,children:(n==null?void 0:n.length)??0},v):h==="{:2}"?y.jsx("span",{className:Ge.highlighted,children:u},v):h),[u,n.length,d]);function g(h){return()=>{e==null||e(h.coords),a==null||a(h.id)}}return m.useEffect(()=>{if(i&&r){const h=l.current[i];h!=null&&h.current&&requestAnimationFrame(()=>{const v=window.scrollY;h.current.scrollIntoView({behavior:"smooth",block:"start"}),window.scrollTo({top:v,behavior:"auto"})})}},[i,r]),y.jsxs("div",{className:W("dyn-locator__location-list",Ge.root),"data-expanded":r,children:[y.jsxs("header",{className:Ge.header,onClick:()=>s(!r),role:"button","aria-expanded":r,children:[y.jsx("span",{children:f}),y.jsx(ze,{className:Ge.toggleButton,variant:"bare",children:y.jsx(_e,{className:Ge.toggleButtonIcon,animate:!1,icon:"ChevronUp"})})]}),y.jsx("div",{className:Ge.body,children:n!=null&&n.length?n.map(h=>{const v=h.id;l.current[v]||(l.current[v]=m.createRef());const S=l.current[v];return y.jsx(t,{ref:S,"data-active":i===h.id,onClick:g(h),...h},h.id)}):y.jsx("div",{className:Ge.noResults,children:o["LocationList.noResults"]})})]})}const Oe={root:"_root_b3glo_21",loaderContainer:"_loaderContainer_b3glo_29",fullscreenButton:"_fullscreenButton_b3glo_36",backButton:"_backButton_b3glo_37",areaSearchButton:"_areaSearchButton_b3glo_52",visualCue:"_visualCue_b3glo_77",closeButton:"_closeButton_b3glo_102",searchButton:"_searchButton_b3glo_120"},kn={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function xg({id:e,title:t,address:n,coords:o,actions:r,onClick:s,onRightButtonClick:i}){var g;const{labels:a}=k(h=>h.localizationConfig),l=k(h=>h.selectedLocation),c=k(h=>h.setSelectedLocation),[u,d]=yg(),f=m.useCallback(()=>{c==null||c("")},[c]);return y.jsxs(y.Fragment,{children:[y.jsx(al,{ref:u,position:o,onClick:()=>{s==null||s()}}),l===e?y.jsxs(pg,{anchor:d,headerContent:t,onCloseClick:f,className:kn.root,children:[y.jsxs("header",{className:kn.header,children:[y.jsx("h6",{children:t}),y.jsx("address",{children:n})]}),y.jsx("div",{className:kn.body,children:y.jsxs("div",{className:kn.cta,children:[y.jsx(Yt,{animate:!1,variant:"secondary",size:"small",...xa((g=r==null?void 0:r.find)==null?void 0:g.call(r,h=>h.type==="navigate")),children:a["InfoWindow.CTA_1"]}),y.jsx(Yt,{animate:!1,variant:"secondary",size:"small",onClick:i,children:a["InfoWindow.CTA_2"]})]})})]}):null]})}function bg(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function Sg(e){return"title"in e&&!("size"in e)}function wg(){var z;const[e,t]=m.useState({zoom:va}),[n,o]=m.useState(!1),[r,s]=m.useState("inactive"),i=m.useRef(""),a=or(),{request:l,loading:c}=Pn(Zt.FIND),u=k(w=>w.mapId),d=k(w=>w.featureFlags),{labels:f}=k(w=>w.localizationConfig),g=k(w=>w.locations),h=k(w=>w.setLocations),v=k(w=>w.targetLocation),S=k(w=>w.clearTargetLocation),x=k(w=>w.mapDetail),b=k(w=>w.setMapDetail),C=k(w=>w.isFullscreen),P=k(w=>w.setFullscreen),T=k(w=>w.isLocationListExpanded),M=k(w=>w.setIsLocationListExpanded),j=k(w=>w.shouldRefetch),A=k(w=>w.setShouldRefetch),V=k(w=>w.setSelectedLocation),N=x===He.MARKER;function q({detail:w}){const{center:R,zoom:$}=w;t({center:R,zoom:$}),n||o(!0)}function le(){n&&e.center&&r==="inactive"&&s("active")}function ce(w){t(R=>({center:w,zoom:R.zoom}))}function L(){s("inactive"),V(""),M(!1),b(He.CLUSTER),t({center:Yh,zoom:va}),A(!0)}const de=m.useCallback(async()=>{if(!e.center)return;const{lat:w,lng:R}=e.center,$={location:{type:"Feature",geometry:{type:"Point",coordinates:[R,w]},properties:{distance:qh}}};try{const{data:te}=await l({mapId:u},{body:$})??{};if(!(te!=null&&te.pins))throw new Error("No locations found");h(te.pins),b(He.MARKER),s("inactive")}catch(te){console.error("Error finding locations in this area: ",te),H.error(nt+Uh)}},[e.center,l,b,u,h]);function J(w){function R(){t({center:w.coords,zoom:18}),T||M(!0)}if(bg(w))return y.jsx(al,{position:w.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(w.range??0)/Hh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await w.onMarkerClick(),t({center:w.coords,zoom:w.zoom||15})}},w.id);if(Sg(w))return y.jsx(xg,{id:w.id,title:w.title??"No title",address:w.address??"No address",coords:w.coords,actions:w.actions,onRightButtonClick:R,onClick:()=>{V(w.id)}},w.id)}if(m.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),m.useEffect(()=>{v&&(t({center:v.coords,zoom:v.zoom}),S())},[v,S]),a===me.LOADING)return y.jsx("div",{className:W("dyn-locator__map",Oe.root),children:y.jsx("div",{className:Oe.loaderContainer,children:y.jsx(At,{size:"large"})})});if(a===me.FAILED||a===me.AUTH_FAILURE)throw new Error(zh);if(a===me.LOADED)return y.jsxs("div",{className:W("dyn-locator__map",Oe.root),children:[d.fullscreen?y.jsx(ze,{className:W(Oe.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>P==null?void 0:P(!C),children:y.jsx(_e,{size:"M",icon:C?"Close":"Expand"})}):null,N?y.jsx(ze,{className:W(Oe.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:L,children:y.jsx(_e,{size:"M",icon:"ArrowLeft"})}):null,r!=="inactive"&&y.jsxs(Yt,{className:W(Oe.areaSearchButton,"dyn-locator__map__area-search-button",N&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||r==="select_area",loading:c,onClick:()=>s("select_area"),children:[y.jsx(rc,{}),f["Map.areaSearchButton"]]}),r==="select_area"&&y.jsxs("div",{className:Oe.visualCue,children:[y.jsxs("i",{children:[y.jsx("button",{className:Oe.closeButton,onClick:()=>s("active"),"aria-label":"Close area search",children:y.jsx(Sr,{size:16})}),y.jsx(sc,{size:48,strokeWidth:1,color:"currentColor"})]}),y.jsxs(Yt,{className:Oe.searchButton,disabled:c,loading:c,onClick:de,size:"small",variant:"themed",children:[f["Map.areaSearchVisualCueCTA"]," ",y.jsx(Hl,{size:22,style:{position:"relative",left:-8}})]})]}),y.jsx(ol,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:q,onDragend:le,defaultBounds:qt,children:!j&&((z=g==null?void 0:g.map)==null?void 0:z.call(g,J))}),N?y.jsx(vg,{onLocationSelect:ce}):null]})}const je={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"},ll="Input";function cl({label:e,className:t,showValidation:n=!0,error:o=!1,valid:r=!1,clearable:s=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:g,sideOrnament:h,...v},S){const x=a?tt.div:"div",b=$e(v)??[],C=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return y.jsxs(x,{className:W("dyn-locator__"+Me(ll),je.root,Ae(t),...b??[]),"data-valid":r,"data-error":o,"data-expanded":u,"data-side-button":!!g,...f?{style:f}:{},...C,children:[n&&y.jsxs(y.Fragment,{children:[r&&y.jsx("span",{className:je.validIcon}),o&&y.jsx("span",{className:je.errorIcon})]}),e?y.jsx("label",{className:je.label,...v.id?{htmlFor:v.id}:{},children:e}):null,h?y.jsx("span",{className:je.sideOrnament,children:h}):null,y.jsx("input",{ref:S,className:W(je.input),"aria-label":d,"aria-invalid":o,"data-side-button":!!g,"data-side-ornament":!!h,...v}),g?y.jsx("span",{className:je.sideButton,children:g}):null,s&&(v==null?void 0:v.value)&&y.jsx("button",{className:je.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&y.jsx("div",{className:je.dropdown,children:c})]})}cl.displayName=ll;const Cg=m.forwardRef(cl),it={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 _g(){const[e,t]=m.useState(""),[n,o]=m.useState([]),[r,s]=m.useState(!1),[i,a]=m.useState(!1),[l,c]=m.useState(!1),u=k(w=>w.mapId),d=k(w=>w.setLocations),f=k(w=>w.setMapDetail),g=k(w=>w.zoomToLocation),{labels:h}=k(w=>w.localizationConfig),{search:v}=k(w=>w.featureFlags),{request:S,loading:x}=Pn(Zt.FIND),b=Ln("places"),C=Ln("geocoding"),P=Mn(),T=m.useRef(null),M=m.useRef(null),j=m.useRef(null),A=m.useRef(null);m.useEffect(()=>{C&&(j.current||(j.current=new C.Geocoder))},[C]),m.useEffect(()=>{b&&(T.current||(T.current=new b.AutocompleteService),A.current||(A.current=new b.AutocompleteSessionToken))},[b]),m.useEffect(()=>{!b||!P||M.current||(M.current=new b.PlacesService(P))},[b,P]);const V=async w=>{var R;if(!w||w.length<3){o([]),s(!1);return}a(!0);try{if(!b||!T.current)throw new Error("Places library or Autocomplete Service not available");const $=await T.current.getPlacePredictions({input:w,...A.current?{sessionToken:A.current}:{}});if(a(!1),!((R=$==null?void 0:$.predictions)!=null&&R.length)){o([]),s(!1);return}o($.predictions),s(!0)}catch($){console.error("Error fetching predictions: ",$),a(!1),o([]),s(!1),H.error(nt+Fh)}},N=m.useMemo(()=>Zh(w=>V(w),600),[V]),q=w=>{const R=w.currentTarget.value;if(t(R),!R||R.length<3){o([]),s(!1);return}N(R)},le=async w=>{var R,$,te,ne,Ne;t(w.description),s(!1);try{if(!b||!M.current)throw new Error("Places library or Places Service not available");const re=await new Promise((Ke,at)=>{M.current.getDetails({placeId:w.place_id,fields:["geometry"],...A.current?{sessionToken:A.current}:{}},(Ct,lt)=>{lt===b.PlacesServiceStatus.OK&&Ct?Ke(Ct):at(new Error(`Place details request failed with status: ${lt}`))})});if((R=re==null?void 0:re.geometry)!=null&&R.location){const Ke=(te=($=re.geometry.location).lat)==null?void 0:te.call($),at=(Ne=(ne=re.geometry.location).lng)==null?void 0:Ne.call(ne);await J({lat:Ke,lng:at})}}catch(re){console.error("Error getting place details:",re),H.error(nt+$h)}finally{b&&(A.current=new b.AutocompleteSessionToken)}},ce=()=>{t(""),o([]),s(!1)},L=()=>!r||n.length===0?null:y.jsx("div",{className:it.predictionsContainer,children:i?y.jsx("div",{className:it.loadingItem,children:y.jsx(At,{size:"medium"})}):n.map(w=>y.jsx("div",{className:it.predictionItem,onClick:()=>le(w),children:w.description},w.place_id))});async function de(w){w.preventDefault(),c(!0);try{const R=await new Promise((ne,Ne)=>{navigator.geolocation.getCurrentPosition(re=>ne(re),re=>Ne(re),{timeout:5e3})}),$={lat:R.coords.latitude,lng:R.coords.longitude};if(await J($),!C||!(j!=null&&j.current)||!P)throw new Error("Geocoding library or Geocoder not available");const te=await new Promise((ne,Ne)=>{j.current.geocode({location:$},(re,Ke)=>{Ke===google.maps.GeocoderStatus.OK&&re&&re.length>0?ne(re):Ne(new Error(`Geocoding failed with status: ${Ke}`))})});te&&te[0]&&t(te[0].formatted_address)}catch(R){console.error("Error getting location: ",R);const $=R instanceof GeolocationPositionError?nt+R.message:nt+Rh;H.error($)}finally{c(!1)}}async function J(w){const{lng:R,lat:$}=w,te={location:{type:"Feature",geometry:{type:"Point",coordinates:[R,$]},properties:{}}};try{const{data:ne}=await S({mapId:u},{body:te})??{};if(!(ne!=null&&ne.pins))throw new Error("No locations found");d(ne.pins),f(He.MARKER),g({lat:$,lng:R},ne.zoom||15)}catch(ne){throw console.error("Error finding locations: ",ne),ne}}const z=x||l;return v?y.jsxs("div",{className:W("dyn-locator__search",it.root),children:[y.jsx(Cg,{name:"locator_search_field",className:W("dyn-locator__search__field",it.input),value:e,onChange:q,placeholder:h["Search.placeholder"],dropdown:L(),dropdownVisible:r,disabled:z,sideOrnament:e?void 0:y.jsx(_e,{className:it.sideOrnament,icon:"Search",size:"M"}),sideButton:e?y.jsx(ze,{variant:"bare",className:it.clearButton,onClick:ce,"aria-label":"Clear",children:y.jsx(_e,{icon:"Close",size:"M"})}):y.jsx(wa,{href:"#",onClick:de,children:h["Search.geolocationButton"]})}),y.jsx(er,{show:z,children:y.jsx(At,{size:"medium"})})]}):null}function Tg({children:e,apiKey:t,language:n,region:o,libraries:r}){return y.jsx(Rm,{apiKey:t,region:o,language:n,libraries:r,children:e})}const Eg=Object.freeze(Object.defineProperty({__proto__:null,default:Tg},Symbol.toStringTag,{value:"Module"}));function Pg(){throw new Error("Mapbox provider is not implemented yet")}const Ag=Object.freeze(Object.defineProperty({__proto__:null,default:Pg},Symbol.toStringTag,{value:"Module"}));function Mg(){throw new Error("HERE Maps provider is not implemented yet")}const Lg=Object.freeze(Object.defineProperty({__proto__:null,default:Mg},Symbol.toStringTag,{value:"Module"}));be.Map=wg,be.Search=_g,be.default=Za,Object.defineProperties(be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
305
315
|
//# sourceMappingURL=index.umd.js.map
|