@dynamo-caffeina-dev/locator-frontend 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,112 +1,112 @@
1
- (function(X,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],m):(X=typeof globalThis<"u"?globalThis:X||self,m(X["@dynamo-caffeina-dev/locator-frontend"]={},X.jsxRuntime,X.React,X.ReactDOM))})(this,function(X,m,p,Fe){"use strict";var Vm=Object.defineProperty;var Bm=(X,m,p)=>m in X?Vm(X,m,{enumerable:!0,configurable:!0,writable:!0,value:p}):X[m]=p;var hn=(X,m,p)=>Bm(X,typeof m!="symbol"?m+"":m,p);function Va(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const R=Va(p);var St=(t=>(t[t.CLUSTER=0]="CLUSTER",t[t.MARKER=1]="MARKER",t))(St||{});const Bo=t=>{let e;const n=new Set,o=(c,u)=>{const d=typeof c=="function"?c(e):c;if(!Object.is(d,e)){const f=e;e=u??(typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(h=>h(e,f))}},s=()=>e,a={setState:o,getState:s,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=e=t(o,s,a);return a},Ba=t=>t?Bo(t):Bo,Fa=t=>t;function $a(t,e=Fa){const n=p.useSyncExternalStore(t.subscribe,()=>e(t.getState()),()=>e(t.getInitialState()));return p.useDebugValue(n),n}const Fo={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"},pn=new Map,$e=t=>{const e=pn.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,o])=>[n,o.getState()])):{}},ja=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const o=pn.get(n.name);if(o)return{type:"tracked",store:t,...o};const s={connection:e.connect(n),stores:{}};return pn.set(n.name,s),{type:"tracked",store:t,...s}},za=(t,e={})=>(n,o,s)=>{const{enabled:r,anonymousActionType:i,store:a,...l}=e;let c;try{c=(r??(Fo?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return t(n,o,s);const{connection:u,...d}=ja(a,c,l);let f=!0;s.setState=(g,b,v)=>{const S=n(g,b);if(!f)return S;const x=v===void 0?{type:i||"anonymous"}:typeof v=="string"?{type:v}:v;return a===void 0?(u==null||u.send(x,o()),S):(u==null||u.send({...x,type:`${a}/${x.type}`},{...$e(l.name),[a]:s.getState()}),S)};const h=(...g)=>{const b=f;f=!1,n(...g),f=b},y=t(s.setState,o,s);if(d.type==="untracked"?u==null||u.init(y):(d.stores[d.store]=s,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([g,b])=>[g,g===d.store?y:b.getState()])))),s.dispatchFromDevtools&&typeof s.dispatch=="function"){let g=!1;const b=s.dispatch;s.dispatch=(...v)=>{(Fo?"production":void 0)!=="production"&&v[0].type==="__setState"&&!g&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),g=!0),b(...v)}}return u.subscribe(g=>{var b;switch(g.type){case"ACTION":if(typeof g.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return mn(g.payload,v=>{if(v.type==="__setState"){if(a===void 0){h(v.state);return}Object.keys(v.state).length!==1&&console.error(`
1
+ (function(R,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],y):(R=typeof globalThis<"u"?globalThis:R||self,y(R["@dynamo-caffeina-dev/locator-frontend"]={},R.jsxRuntime,R.React,R.ReactDOM))})(this,function(R,y,g,en){"use strict";var by=Object.defineProperty;var Cy=(R,y,g)=>y in R?by(R,y,{enumerable:!0,configurable:!0,writable:!0,value:g}):R[y]=g;var On=(R,y,g)=>Cy(R,typeof y!="symbol"?y+"":y,g);function Tl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const q=Tl(g);var Ee=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(Ee||{});const ls=e=>{let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,f))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,s,a);return a},Al=e=>e?ls(e):ls,Ml=e=>e;function Pl(e,t=Ml){const n=g.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return g.useDebugValue(n),n}const cs={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_LOCATOR_DEMO_APP_API_BASE_URL:"https://store-locator.thesiadgroup.com/api",VITE_LOCATOR_DEMO_APP_GOOGLE_MAPS_API_KEY:"AIzaSyCGovi7EwOkxeOMzUs0nUWjmy8tOhXukQQ"},kn=new Map,tn=e=>{const t=kn.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},Ll=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=kn.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return kn.set(n.name,s),{type:"tracked",store:e,...s}},Ol=(e,t={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:i,store:a,...l}=t;let c;try{c=(o??(cs?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,r,s);const{connection:u,...d}=Ll(a,c,l);let f=!0;s.setState=(m,v,b)=>{const C=n(m,v);if(!f)return C;const S=b===void 0?{type:i||"anonymous"}:typeof b=="string"?{type:b}:b;return a===void 0?(u==null||u.send(S,r()),C):(u==null||u.send({...S,type:`${a}/${S.type}`},{...tn(l.name),[a]:s.getState()}),C)};const p=(...m)=>{const v=f;f=!1,n(...m),f=v},h=e(s.setState,r,s);if(d.type==="untracked"?u==null||u.init(h):(d.stores[d.store]=s,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([m,v])=>[m,m===d.store?h:v.getState()])))),s.dispatchFromDevtools&&typeof s.dispatch=="function"){let m=!1;const v=s.dispatch;s.dispatch=(...b)=>{(cs?"production":void 0)!=="production"&&b[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),v(...b)}}return u.subscribe(m=>{var v;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Dn(m.payload,b=>{if(b.type==="__setState"){if(a===void 0){p(b.state);return}Object.keys(b.state).length!==1&&console.error(`
2
2
  [zustand devtools middleware] Unsupported __setState action format.
3
3
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
4
4
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
5
- `);const S=v.state[a];if(S==null)return;JSON.stringify(s.getState())!==JSON.stringify(S)&&h(S);return}s.dispatchFromDevtools&&typeof s.dispatch=="function"&&s.dispatch(v)});case"DISPATCH":switch(g.payload.type){case"RESET":return h(y),a===void 0?u==null?void 0:u.init(s.getState()):u==null?void 0:u.init($e(l.name));case"COMMIT":if(a===void 0){u==null||u.init(s.getState());return}return u==null?void 0:u.init($e(l.name));case"ROLLBACK":return mn(g.state,v=>{if(a===void 0){h(v),u==null||u.init(s.getState());return}h(v[a]),u==null||u.init($e(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return mn(g.state,v=>{if(a===void 0){h(v);return}JSON.stringify(s.getState())!==JSON.stringify(v[a])&&h(v[a])});case"IMPORT_STATE":{const{nextLiftedState:v}=g.payload,S=(b=v.computedStates.slice(-1)[0])==null?void 0:b.state;if(!S)return;h(a===void 0?S:S[a]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return f=!f}return}}),y},mn=(t,e)=>{let n;try{n=JSON.parse(t)}catch(o){console.error("[zustand devtools middleware] Could not parse the received json",o)}n!==void 0&&e(n)},Ua={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"}},Xa=()=>Ba()(za(t=>({mapId:void 0,locations:[],mapDetail:St.CLUSTER,isFullscreen:!1,selectedLocation:"",shouldRefetch:!1,targetLocation:null,isLocationListExpanded:!1,isShareSheetOpen:!1,localizationConfig:Ua,featureFlags:{fullscreen:!0,search:!0,share:!0,withClusters:!0,withCustomMarkers:!1},customMarkers:[],setMapId:e=>t({mapId:e},!1,"SET_MAP_ID"),setLocations:e=>t({locations:e},!1,"SET_LOCATIONS"),setMapDetail:e=>t({mapDetail:e},!1,"SET_MAP_DETAIL"),setFullscreen:e=>t({isFullscreen:e},!1,"SET_FULLSCREEN"),setSelectedLocation:e=>t({selectedLocation:e},!1,"SET_SELECTED_LOCATION"),setShouldRefetch:e=>t({shouldRefetch:e},!1,"SET_SHOULD_REFETCH"),zoomToLocation:(e,n=15)=>t({targetLocation:{coords:e,zoom:n}},!1,"ZOOM_TO_LOCATION"),clearTargetLocation:()=>t({targetLocation:null},!1,"CLEAR_TARGET_LOCATION"),setIsLocationListExpanded:e=>t({isLocationListExpanded:e},!1,"SET_IS_LOCATION_LIST_EXPANDED"),toggleShareSheet:e=>t({isShareSheetOpen:e},!1,"TOGGLE_SHARE_SHEET"),setLocalizationConfig:e=>t(n=>({localizationConfig:{...n.localizationConfig,...e,labels:e.labels?{...n.localizationConfig.labels,...e.labels}:n.localizationConfig.labels}}),!1,"SET_LOCALIZATION_CONFIG"),setFeatureFlags:e=>t(n=>({featureFlags:{...n.featureFlags,...e}}),!1,"SET_FEATURE_FLAGS"),setCustomMarkers:e=>t({customMarkers:e},!1,"SET_CUSTOM_MARKERS")}),{name:`LocatorStore_${Date.now()}`})),$o=p.createContext(null);function Ga({children:t}){const[e]=p.useState(Xa);return m.jsx($o.Provider,{value:e,children:t})}function M(t){const e=p.useContext($o);if(e===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return $a(e,t)}function jo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gn={exports:{}};/*!
5
+ `);const C=b.state[a];if(C==null)return;JSON.stringify(s.getState())!==JSON.stringify(C)&&p(C);return}s.dispatchFromDevtools&&typeof s.dispatch=="function"&&s.dispatch(b)});case"DISPATCH":switch(m.payload.type){case"RESET":return p(h),a===void 0?u==null?void 0:u.init(s.getState()):u==null?void 0:u.init(tn(l.name));case"COMMIT":if(a===void 0){u==null||u.init(s.getState());return}return u==null?void 0:u.init(tn(l.name));case"ROLLBACK":return Dn(m.state,b=>{if(a===void 0){p(b),u==null||u.init(s.getState());return}p(b[a]),u==null||u.init(tn(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Dn(m.state,b=>{if(a===void 0){p(b);return}JSON.stringify(s.getState())!==JSON.stringify(b[a])&&p(b[a])});case"IMPORT_STATE":{const{nextLiftedState:b}=m.payload,C=(v=b.computedStates.slice(-1)[0])==null?void 0:v.state;if(!C)return;p(a===void 0?C:C[a]),u==null||u.send(null,b);return}case"PAUSE_RECORDING":return f=!f}return}}),h},Dn=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)},kl={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"}},Dl=()=>Al()(Ol(e=>({mapId:void 0,locations:[],mapDetail:Ee.CLUSTER,isFullscreen:!1,selectedLocation:"",shouldRefetch:!1,targetLocation:null,isLocationListExpanded:!1,isShareSheetOpen:!1,localizationConfig:kl,featureFlags:{fullscreen:!0,search:!0,share:!0,withClusters:!0,withCustomMarkers:!1,withCustomInfoWindow:!1,withAreaSearch:!0,withGoogleClustering:!1},clusteringProvider:"airc",googleClustererConfig:null,customMarkers:[],customInfoWindow:null,customZoomLevels:null,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"),setCustomMarkers:t=>e({customMarkers:t},!1,"SET_CUSTOM_MARKERS"),setCustomInfoWindow:t=>e({customInfoWindow:t},!1,"SET_CUSTOM_INFO_WINDOW"),setCustomZoomLevels:t=>e({customZoomLevels:t},!1,"SET_CUSTOM_ZOOM_LEVELS"),setClusteringProvider:t=>e({clusteringProvider:t},!1,"SET_CLUSTERING_PROVIDER")}),{name:`LocatorStore_${Date.now()}`})),us=g.createContext(null);function Nl({children:e}){const[t]=g.useState(Dl);return y.jsx(us.Provider,{value:t,children:e})}function M(e){const t=g.useContext(us);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return Pl(t,e)}function ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nn={exports:{}};/*!
6
6
  Copyright (c) 2018 Jed Watson.
7
7
  Licensed under the MIT License (MIT), see
8
8
  http://jedwatson.github.io/classnames
9
- */var zo;function Ha(){return zo||(zo=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(r=s(r,o(a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var a in r)e.call(r,a)&&r[a]&&(i=s(i,a));return i}function s(r,i){return i?r?r+" "+i:r+i:r}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(gn)),gn.exports}var Ra=Ha();const F=jo(Ra),Uo={root:"_root_q2czu_7",loaderContainer:"_loaderContainer_q2czu_121"},Xo={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function ce({className:t,size:e="medium",color:n="primary",...o}){const s=F(Xo.root,t);return m.jsx("div",{className:s,"data-size":e,"data-color":n,...o,children:m.jsx("div",{className:Xo.spinner})})}const Ka=p.lazy(()=>Promise.resolve().then(()=>Lm)),Wa=p.lazy(()=>Promise.resolve().then(()=>Om)),qa=p.lazy(()=>Promise.resolve().then(()=>Nm));function Ya({children:t,mapProvider:e}){const{name:n,APIKey:o,config:s}=e??{};if(!o||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const r=m.jsx("div",{className:Uo.loaderContainer,children:m.jsx(ce,{size:"large",color:"primary"})});return m.jsx(p.Suspense,{fallback:r,children:(()=>{switch(n){case"mapbox":return m.jsx(Wa,{apiKey:o,...s??{},children:t});case"here":return m.jsx(qa,{apiKey:o,...s??{},children:t});case"google":return m.jsx(Ka,{apiKey:o,...s??{},children:t});default:return null}})()})}const Za={container:"_container_17c19_4"},ue={root:"_root_3405i_4",header:"_header_3405i_14",icon:"_icon_3405i_25",body:"_body_3405i_47",content:"_content_3405i_50"};/**
9
+ */var fs;function Il(){return fs||(fs=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)t.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(Nn)),Nn.exports}var Vl=Il();const $=ds(Vl),hs={root:"_root_q2czu_7",loaderContainer:"_loaderContainer_q2czu_121"},ps={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function wt({className:e,size:t="medium",color:n="primary",...r}){const s=$(ps.root,e);return y.jsx("div",{className:s,"data-size":t,"data-color":n,...r,children:y.jsx("div",{className:ps.spinner})})}const Bl=g.lazy(()=>Promise.resolve().then(()=>py)),Fl=g.lazy(()=>Promise.resolve().then(()=>gy)),$l=g.lazy(()=>Promise.resolve().then(()=>vy));function jl({children:e,mapProvider:t}){const{name:n,APIKey:r,config:s}=t??{};if(!r||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const o=y.jsx("div",{className:hs.loaderContainer,children:y.jsx(wt,{size:"large",color:"primary"})});return y.jsx(g.Suspense,{fallback:o,children:(()=>{switch(n){case"mapbox":return y.jsx(Fl,{apiKey:r,...s??{},children:e});case"here":return y.jsx($l,{apiKey:r,...s??{},children:e});case"google":return y.jsx(Bl,{apiKey:r,...s??{},children:e});default:return null}})()})}const zl={container:"_container_17c19_4"},xt={root:"_root_3405i_4",header:"_header_3405i_14",icon:"_icon_3405i_25",body:"_body_3405i_47",content:"_content_3405i_50"};/**
10
10
  * @license lucide-react v0.483.0 - ISC
11
11
  *
12
12
  * This source code is licensed under the ISC license.
13
13
  * See the LICENSE file in the root directory of this source tree.
14
- */const Ja=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Go=(...t)=>t.filter((e,n,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===n).join(" ").trim();/**
14
+ */const Ul=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ms=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
15
15
  * @license lucide-react v0.483.0 - ISC
16
16
  *
17
17
  * This source code is licensed under the ISC license.
18
18
  * See the LICENSE file in the root directory of this source tree.
19
- */var Qa={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"};/**
19
+ */var Xl={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"};/**
20
20
  * @license lucide-react v0.483.0 - ISC
21
21
  *
22
22
  * This source code is licensed under the ISC license.
23
23
  * See the LICENSE file in the root directory of this source tree.
24
- */const tl=p.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:s="",children:r,iconNode:i,...a},l)=>p.createElement("svg",{ref:l,...Qa,width:e,height:e,stroke:t,strokeWidth:o?Number(n)*24/Number(e):n,className:Go("lucide",s),...a},[...i.map(([c,u])=>p.createElement(c,u)),...Array.isArray(r)?r:[r]]));/**
24
+ */const Rl=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>g.createElement("svg",{ref:l,...Xl,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ms("lucide",s),...a},[...i.map(([c,u])=>g.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
25
25
  * @license lucide-react v0.483.0 - ISC
26
26
  *
27
27
  * This source code is licensed under the ISC license.
28
28
  * See the LICENSE file in the root directory of this source tree.
29
- */const W=(t,e)=>{const n=p.forwardRef(({className:o,...s},r)=>p.createElement(tl,{ref:r,iconNode:e,className:Go(`lucide-${Ja(t)}`,o),...s}));return n.displayName=`${t}`,n};/**
29
+ */const Y=(e,t)=>{const n=g.forwardRef(({className:r,...s},o)=>g.createElement(Rl,{ref:o,iconNode:t,className:ms(`lucide-${Ul(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
30
30
  * @license lucide-react v0.483.0 - ISC
31
31
  *
32
32
  * This source code is licensed under the ISC license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
- */const el=W("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
34
+ */const ql=Y("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
35
35
  * @license lucide-react v0.483.0 - ISC
36
36
  *
37
37
  * This source code is licensed under the ISC license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
- */const nl=W("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
39
+ */const Gl=Y("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
40
40
  * @license lucide-react v0.483.0 - ISC
41
41
  *
42
42
  * This source code is licensed under the ISC license.
43
43
  * See the LICENSE file in the root directory of this source tree.
44
- */const ol=W("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
44
+ */const Wl=Y("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
45
45
  * @license lucide-react v0.483.0 - ISC
46
46
  *
47
47
  * This source code is licensed under the ISC license.
48
48
  * See the LICENSE file in the root directory of this source tree.
49
- */const sl=W("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
49
+ */const Kl=Y("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
50
50
  * @license lucide-react v0.483.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
- */const rl=W("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
54
+ */const Hl=Y("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
55
55
  * @license lucide-react v0.483.0 - ISC
56
56
  *
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
- */const il=W("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"}]]);/**
59
+ */const Zl=Y("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"}]]);/**
60
60
  * @license lucide-react v0.483.0 - ISC
61
61
  *
62
62
  * This source code is licensed under the ISC license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
- */const al=W("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"}]]);/**
64
+ */const Yl=Y("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"}]]);/**
65
65
  * @license lucide-react v0.483.0 - ISC
66
66
  *
67
67
  * This source code is licensed under the ISC license.
68
68
  * See the LICENSE file in the root directory of this source tree.
69
- */const ll=W("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"}]]);/**
69
+ */const Jl=Y("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"}]]);/**
70
70
  * @license lucide-react v0.483.0 - ISC
71
71
  *
72
72
  * This source code is licensed under the ISC license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
- */const cl=W("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"}]]);/**
74
+ */const Ql=Y("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"}]]);/**
75
75
  * @license lucide-react v0.483.0 - ISC
76
76
  *
77
77
  * This source code is licensed under the ISC license.
78
78
  * See the LICENSE file in the root directory of this source tree.
79
- */const ul=W("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"}]]);/**
79
+ */const ec=Y("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"}]]);/**
80
80
  * @license lucide-react v0.483.0 - ISC
81
81
  *
82
82
  * This source code is licensed under the ISC license.
83
83
  * See the LICENSE file in the root directory of this source tree.
84
- */const dl=W("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"}]]);/**
84
+ */const tc=Y("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"}]]);/**
85
85
  * @license lucide-react v0.483.0 - ISC
86
86
  *
87
87
  * This source code is licensed under the ISC license.
88
88
  * See the LICENSE file in the root directory of this source tree.
89
- */const fl=W("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"}]]);/**
89
+ */const nc=Y("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"}]]);/**
90
90
  * @license lucide-react v0.483.0 - ISC
91
91
  *
92
92
  * This source code is licensed under the ISC license.
93
93
  * See the LICENSE file in the root directory of this source tree.
94
- */const hl=W("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"}]]);/**
94
+ */const rc=Y("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"}]]);/**
95
95
  * @license lucide-react v0.483.0 - ISC
96
96
  *
97
97
  * This source code is licensed under the ISC license.
98
98
  * See the LICENSE file in the root directory of this source tree.
99
- */const pl=W("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
99
+ */const sc=Y("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
100
100
  * @license lucide-react v0.483.0 - ISC
101
101
  *
102
102
  * This source code is licensed under the ISC license.
103
103
  * See the LICENSE file in the root directory of this source tree.
104
- */const ml=W("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"}]]);/**
104
+ */const oc=Y("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"}]]);/**
105
105
  * @license lucide-react v0.483.0 - ISC
106
106
  *
107
107
  * This source code is licensed under the ISC license.
108
108
  * See the LICENSE file in the root directory of this source tree.
109
- */const Ho=W("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ro=p.createContext({});function gl(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const yn=typeof window<"u",yl=yn?p.useLayoutEffect:p.useEffect,vn=p.createContext(null),Ko=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function vl(t=!0){const e=p.useContext(vn);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:s}=e,r=p.useId();p.useEffect(()=>{if(t)return s(r)},[t]);const i=p.useCallback(()=>t&&o&&o(r),[r,o,t]);return!n&&o?[!1,i]:[!0]}function bn(t,e){t.indexOf(e)===-1&&t.push(e)}function Sn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Q=t=>t;let qt=Q,xt=Q;process.env.NODE_ENV!=="production"&&(qt=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},xt=(t,e)=>{if(!t)throw new Error(e)});const bl={useManualTiming:!1};function xn(t){let e;return()=>(e===void 0&&(e=t()),e)}const Yt=(t,e,n)=>{const o=e-t;return o===0?1:(n-t)/o};class Cn{constructor(){this.subscriptions=[]}add(e){return bn(this.subscriptions,e),()=>Sn(this.subscriptions,e)}notify(e,n,o){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,o);else for(let r=0;r<s;r++){const i=this.subscriptions[r];i&&i(e,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const it=t=>t*1e3,dt=t=>t/1e3;function Wo(t,e){return e?t*(1e3/e):0}const qo=new Set;function je(t,e,n){t||qo.has(e)||(console.warn(e),qo.add(e))}const Sl=xn(()=>window.ScrollTimeline!==void 0);class xl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let o=0;o<this.animations.length;o++)this.animations[o][e]=n}attachTimeline(e,n){const o=this.animations.map(s=>{if(Sl()&&s.attachTimeline)return s.attachTimeline(e);if(typeof n=="function")return n(s)});return()=>{o.forEach((s,r)=>{s&&s(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Cl extends xl{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function _n(t,e){return t?t[e]||t.default||t:void 0}const wn=2e4;function Yo(t){let e=0;const n=50;let o=t.next(e);for(;!o.done&&e<wn;)e+=n,o=t.next(e);return e>=wn?1/0:e}function Tn(t){return typeof t=="function"}function Zo(t,e){t.timeline=e,t.onfinish=null}const En=t=>Array.isArray(t)&&typeof t[0]=="number",_l={linearEasing:void 0};function wl(t,e){const n=xn(t);return()=>{var o;return(o=_l[e])!==null&&o!==void 0?o:n()}}const ze=wl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Jo=(t,e,n=10)=>{let o="";const s=Math.max(Math.round(e/n),2);for(let r=0;r<s;r++)o+=t(Yt(0,s-1,r))+", ";return`linear(${o.substring(0,o.length-2)})`};function Qo(t){return!!(typeof t=="function"&&ze()||!t||typeof t=="string"&&(t in An||ze())||En(t)||Array.isArray(t)&&t.every(Qo))}const de=([t,e,n,o])=>`cubic-bezier(${t}, ${e}, ${n}, ${o})`,An={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:de([0,.65,.55,1]),circOut:de([.55,0,1,.45]),backIn:de([.31,.01,.66,-.59]),backOut:de([.33,1.53,.69,.99])};function ts(t,e){if(t)return typeof t=="function"&&ze()?Jo(t,e):En(t)?de(t):Array.isArray(t)?t.map(n=>ts(n,e)||An.easeOut):An[t]}const Ue=["read","resolveKeyframes","update","preRender","render","postRender"],es={value:null};function Tl(t,e){let n=new Set,o=new Set,s=!1,r=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),t()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const g=h&&s?n:o;return f&&i.add(d),g.has(d)||g.add(d),d},cancel:d=>{o.delete(d),i.delete(d)},process:d=>{if(a=d,s){r=!0;return}s=!0,[n,o]=[o,n],n.forEach(c),e&&es.value&&es.value.frameloop[e].push(l),l=0,n.clear(),s=!1,r&&(r=!1,u.process(d))}};return u}const El=40;function ns(t,e){let n=!1,o=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,i=Ue.reduce((v,S)=>(v[S]=Tl(r,e?S:void 0),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const v=performance.now();n=!1,s.delta=o?1e3/60:Math.max(Math.min(v-s.timestamp,El),1),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),s.isProcessing=!1,n&&e&&(o=!1,t(h))},y=()=>{n=!0,o=!0,s.isProcessing||t(h)};return{schedule:Ue.reduce((v,S)=>{const x=i[S];return v[S]=(T,_=!1,A=!1)=>(n||y(),x.schedule(T,_,A)),v},{}),cancel:v=>{for(let S=0;S<Ue.length;S++)i[Ue[S]].cancel(v)},state:s,steps:i}}const{schedule:V,cancel:Ct,state:K,steps:Pn}=ns(typeof requestAnimationFrame<"u"?requestAnimationFrame:Q,!0),{schedule:Mn}=ns(queueMicrotask,!1);let Xe;function Al(){Xe=void 0}const at={now:()=>(Xe===void 0&&at.set(K.isProcessing||bl.useManualTiming?K.timestamp:performance.now()),Xe),set:t=>{Xe=t,queueMicrotask(Al)}},st={x:!1,y:!1};function os(){return st.x||st.y}function Pl(t){return t==="x"||t==="y"?st[t]?null:(st[t]=!0,()=>{st[t]=!1}):st.x||st.y?null:(st.x=st.y=!0,()=>{st.x=st.y=!1})}function Ml(t,e,n){var o;if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const r=(o=void 0)!==null&&o!==void 0?o:s.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function ss(t,e){const n=Ml(t),o=new AbortController,s={passive:!0,...e,signal:o.signal};return[n,s,()=>o.abort()]}function rs(t){return!(t.pointerType==="touch"||os())}function Ll(t,e,n={}){const[o,s,r]=ss(t,n),i=a=>{if(!rs(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{rs(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return o.forEach(a=>{a.addEventListener("pointerenter",i,s)}),r}function is(t,e){const n=`${e}PointerCapture`;if(t.target instanceof Element&&n in t.target&&t.pointerId!==void 0)try{t.target[n](t.pointerId)}catch{}}const as=(t,e)=>e?t===e?!0:as(t,e.parentElement):!1,Ln=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Dl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ol(t){return Dl.has(t.tagName)||t.tabIndex!==-1}const fe=new WeakSet;function ls(t){return e=>{e.key==="Enter"&&t(e)}}function Dn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const kl=(t,e)=>{const n=t.currentTarget;if(!n)return;const o=ls(()=>{if(fe.has(n))return;Dn(n,"down");const s=ls(()=>{Dn(n,"up")}),r=()=>Dn(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",o,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),e)};function cs(t){return Ln(t)&&!os()}function Nl(t,e,n={}){const[o,s,r]=ss(t,n),i=a=>{const l=a.currentTarget;if(!l||!cs(a)||fe.has(l))return;fe.add(l),is(a,"set");const c=e(l,a),u=(h,y)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),is(h,"release"),!(!cs(h)||!fe.has(l))&&(fe.delete(l),typeof c=="function"&&c(h,{success:y}))},d=h=>{(h.isTrusted?Il(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||as(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,s),l.addEventListener("pointercancel",f,s),l.addEventListener("lostpointercapture",f,s)};return o.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!Ol(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,s),l&&a.addEventListener("focus",c=>kl(c,s),s)}),r}function Il(t,e){return t.clientX<e.left||t.clientX>e.right||t.clientY<e.top||t.clientY>e.bottom}const us=30,Vl=t=>!isNaN(parseFloat(t));class Bl{constructor(e,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,s=!0)=>{const r=at.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=at.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Vl(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&je(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Cn);const o=this.events[e].add(n);return e==="change"?()=>{o(),V.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-o}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=at.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>us)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,us);return Wo(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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 he(t,e){return new Bl(t,e)}const ds=p.createContext({strict:!1}),fs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Zt={};for(const t in fs)Zt[t]={isEnabled:e=>fs[t].some(n=>!!e[n])};function Fl(t){for(const e in t)Zt[e]={...Zt[e],...t[e]}}const $l=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 Ge(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$l.has(t)}let hs=t=>!Ge(t);function jl(t){t&&(hs=e=>e.startsWith("on")?!Ge(e):t(e))}try{jl(require("@emotion/is-prop-valid").default)}catch{}function zl(t,e,n){const o={};for(const s in t)s==="values"&&typeof t.values=="object"||(hs(s)||n===!0&&Ge(s)||!e&&!Ge(s)||t.draggable&&s.startsWith("onDrag"))&&(o[s]=t[s]);return o}function Ul(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&je(!1,"motion() is deprecated. Use motion.create() instead."),t(...o));return new Proxy(n,{get:(o,s)=>s==="create"?t:(e.has(s)||e.set(s,t(s)),e.get(s))})}const He=p.createContext({});function Re(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function pe(t){return typeof t=="string"||Array.isArray(t)}const On=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kn=["initial",...On];function Ke(t){return Re(t.animate)||kn.some(e=>pe(t[e]))}function ps(t){return!!(Ke(t)||t.variants)}function Xl(t,e){if(Ke(t)){const{initial:n,animate:o}=t;return{initial:n===!1||pe(n)?n:void 0,animate:pe(o)?o:void 0}}return t.inherit!==!1?e:{}}function Gl(t){const{initial:e,animate:n}=Xl(t,p.useContext(He));return p.useMemo(()=>({initial:e,animate:n}),[ms(e),ms(n)])}function ms(t){return Array.isArray(t)?t.join(" "):t}const Hl=Symbol.for("motionComponentSymbol");function Jt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Rl(t,e,n){return p.useCallback(o=>{o&&t.onMount&&t.onMount(o),e&&(o?e.mount(o):e.unmount()),n&&(typeof n=="function"?n(o):Jt(n)&&(n.current=o))},[e])}const Nn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),gs="data-"+Nn("framerAppearId"),ys=p.createContext({});function Kl(t,e,n,o,s){var r,i;const{visualElement:a}=p.useContext(He),l=p.useContext(ds),c=p.useContext(vn),u=p.useContext(Ko).reducedMotion,d=p.useRef(null);o=o||l.renderer,!d.current&&o&&(d.current=o(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=p.useContext(ys);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&Wl(d.current,n,s,h);const y=p.useRef(!1);p.useInsertionEffect(()=>{f&&y.current&&f.update(n,c)});const g=n[gs],b=p.useRef(!!g&&!(!((r=window.MotionHandoffIsComplete)===null||r===void 0)&&r.call(window,g))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,g)));return yl(()=>{f&&(y.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Mn.render(f.render),b.current&&f.animationState&&f.animationState.animateChanges())}),p.useEffect(()=>{f&&(!b.current&&f.animationState&&f.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),b.current=!1))}),f}function Wl(t,e,n,o){const{layoutId:s,layout:r,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:vs(t.parent)),t.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!i||a&&Jt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:c})}function vs(t){if(t)return t.options.allowProjection!==!1?t.projection:vs(t.parent)}function ql({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:o,Component:s}){var r,i;t&&Fl(t);function a(c,u){let d;const f={...p.useContext(Ko),...c,layoutId:Yl(c)},{isStatic:h}=f,y=Gl(c),g=o(c,h);if(!h&&yn){Zl(f,t);const b=Jl(f);d=b.MeasureLayout,y.visualElement=Kl(s,g,f,e,b.ProjectionNode)}return m.jsxs(He.Provider,{value:y,children:[d&&y.visualElement?m.jsx(d,{visualElement:y.visualElement,...f}):null,n(s,c,Rl(g,y.visualElement,u),g,h,y.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(i=(r=s.displayName)!==null&&r!==void 0?r:s.name)!==null&&i!==void 0?i:""})`}`;const l=p.forwardRef(a);return l[Hl]=s,l}function Yl({layoutId:t}){const e=p.useContext(Ro).id;return e&&t!==void 0?e+"-"+t:t}function Zl(t,e){const n=p.useContext(ds).strict;if(process.env.NODE_ENV!=="production"&&e&&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.";t.ignoreStrict?qt(!1,o):xt(!1,o)}}function Jl(t){const{drag:e,layout:n}=Zt;if(!e&&!n)return{};const o={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const bs=t=>e=>typeof e=="string"&&e.startsWith(t),In=bs("--"),Ql=bs("var(--"),Vn=t=>Ql(t)?tc.test(t.split("/*")[0].trim()):!1,tc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,me={};function ec(t){for(const e in t)me[e]=t[e],In(e)&&(me[e].isCSSVariable=!0)}const Qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vt=new Set(Qt);function Ss(t,{layout:e,layoutId:n}){return Vt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!me[t]||t==="opacity")}const q=t=>!!(t&&t.getVelocity),xs=(t,e)=>e&&typeof t=="number"?e.transform(t):t,ft=(t,e,n)=>n>e?e:n<t?t:n,te={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ge={...te,transform:t=>ft(0,1,t)},We={...te,default:1},ye=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),_t=ye("deg"),lt=ye("%"),L=ye("px"),nc=ye("vh"),oc=ye("vw"),Cs={...lt,parse:t=>lt.parse(t)/100,transform:t=>lt.transform(t*100)},sc={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,backgroundPositionX:L,backgroundPositionY:L},rc={rotate:_t,rotateX:_t,rotateY:_t,rotateZ:_t,scale:We,scaleX:We,scaleY:We,scaleZ:We,skew:_t,skewX:_t,skewY:_t,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:ge,originX:Cs,originY:Cs,originZ:L},_s={...te,transform:Math.round},Bn={...sc,...rc,zIndex:_s,size:L,fillOpacity:ge,strokeOpacity:ge,numOctaves:_s},ic={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ac=Qt.length;function lc(t,e,n){let o="",s=!0;for(let r=0;r<ac;r++){const i=Qt[r],a=t[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=xs(a,Bn[i]);if(!l){s=!1;const u=ic[i]||i;o+=`${u}(${c}) `}n&&(e[i]=c)}}return o=o.trim(),n?o=n(e,s?"":o):s&&(o="none"),o}function Fn(t,e,n){const{style:o,vars:s,transformOrigin:r}=t;let i=!1,a=!1;for(const l in e){const c=e[l];if(Vt.has(l)){i=!0;continue}else if(In(l)){s[l]=c;continue}else{const u=xs(c,Bn[l]);l.startsWith("origin")?(a=!0,r[l]=u):o[l]=u}}if(e.transform||(i||n?o.transform=lc(e,t.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;o.transformOrigin=`${l} ${c} ${u}`}}const $n=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ws(t,e,n){for(const o in e)!q(e[o])&&!Ss(o,n)&&(t[o]=e[o])}function cc({transformTemplate:t},e){return p.useMemo(()=>{const n=$n();return Fn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function uc(t,e){const n=t.style||{},o={};return ws(o,n,t),Object.assign(o,cc(t,e)),o}function dc(t,e){const n={},o=uc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=o,n}const fc=["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 jn(t){return typeof t!="string"||t.includes("-")?!1:!!(fc.indexOf(t)>-1||/[A-Z]/u.test(t))}const hc={offset:"stroke-dashoffset",array:"stroke-dasharray"},pc={offset:"strokeDashoffset",array:"strokeDasharray"};function mc(t,e,n=1,o=0,s=!0){t.pathLength=1;const r=s?hc:pc;t[r.offset]=L.transform(-o);const i=L.transform(e),a=L.transform(n);t[r.array]=`${i} ${a}`}function Ts(t,e,n){return typeof t=="string"?t:L.transform(e+n*t)}function gc(t,e,n){const o=Ts(e,t.x,t.width),s=Ts(n,t.y,t.height);return`${o} ${s}`}function zn(t,{attrX:e,attrY:n,attrScale:o,originX:s,originY:r,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Fn(t,c,d),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h,dimensions:y}=t;f.transform&&(y&&(h.transform=f.transform),delete f.transform),y&&(s!==void 0||r!==void 0||h.transform)&&(h.transformOrigin=gc(y,s!==void 0?s:.5,r!==void 0?r:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),i!==void 0&&mc(f,i,a,l,!1)}const Es=()=>({...$n(),attrs:{}}),Un=t=>typeof t=="string"&&t.toLowerCase()==="svg";function yc(t,e,n,o){const s=p.useMemo(()=>{const r=Es();return zn(r,e,Un(o),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};ws(r,t.style,t),s.style={...r,...s.style}}return s}function vc(t=!1){return(n,o,s,{latestValues:r},i)=>{const l=(jn(n)?yc:dc)(o,r,i,n),c=zl(o,typeof n=="string",t),u=n!==p.Fragment?{...c,...l,ref:s}:{},{children:d}=o,f=p.useMemo(()=>q(d)?d.get():d,[d]);return p.createElement(n,{...u,children:f})}}function As(t){const e=[{},{}];return t==null||t.values.forEach((n,o)=>{e[0][o]=n.get(),e[1][o]=n.getVelocity()}),e}function Xn(t,e,n,o){if(typeof e=="function"){const[s,r]=As(o);e=e(n!==void 0?n:t.custom,s,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,r]=As(o);e=e(n!==void 0?n:t.custom,s,r)}return e}const Gn=t=>Array.isArray(t),bc=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Sc=t=>Gn(t)?t[t.length-1]||0:t;function qe(t){const e=q(t)?t.get():t;return bc(e)?e.toValue():e}function xc({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},o,s,r){const i={latestValues:Cc(o,s,r,t),renderState:e()};return n&&(i.onMount=a=>n({props:o,current:a,...i}),i.onUpdate=a=>n(a)),i}const Ps=t=>(e,n)=>{const o=p.useContext(He),s=p.useContext(vn),r=()=>xc(t,e,o,s);return n?r():gl(r)};function Cc(t,e,n,o){const s={},r=o(t,{});for(const f in r)s[f]=qe(r[f]);let{initial:i,animate:a}=t;const l=Ke(t),c=ps(t);e&&c&&!l&&t.inherit!==!1&&(i===void 0&&(i=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!Re(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const y=Xn(t,f[h]);if(y){const{transitionEnd:g,transition:b,...v}=y;for(const S in v){let x=v[S];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(s[S]=x)}for(const S in g)s[S]=g[S]}}}return s}function Hn(t,e,n){var o;const{style:s}=t,r={};for(const i in s)(q(s[i])||e.style&&q(e.style[i])||Ss(i,t)||((o=n==null?void 0:n.getValue(i))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(r[i]=s[i]);return r}const _c={useVisualState:Ps({scrapeMotionValuesFromProps:Hn,createRenderState:$n})};function Ms(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}function Ls(t,{style:e,vars:n},o,s){Object.assign(t.style,e,s&&s.getProjectionStyles(o));for(const r in n)t.style.setProperty(r,n[r])}const Ds=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Os(t,e,n,o){Ls(t,e,void 0,o);for(const s in e.attrs)t.setAttribute(Ds.has(s)?s:Nn(s),e.attrs[s])}function ks(t,e,n){const o=Hn(t,e,n);for(const s in t)if(q(t[s])||q(e[s])){const r=Qt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;o[r]=t[s]}return o}const Ns=["x","y","width","height","cx","cy","r"],wc={useVisualState:Ps({scrapeMotionValuesFromProps:ks,createRenderState:Es,onUpdate:({props:t,prevProps:e,current:n,renderState:o,latestValues:s})=>{if(!n)return;let r=!!t.drag;if(!r){for(const a in s)if(Vt.has(a)){r=!0;break}}if(!r)return;let i=!e;if(e)for(let a=0;a<Ns.length;a++){const l=Ns[a];t[l]!==e[l]&&(i=!0)}i&&V.read(()=>{Ms(n,o),V.render(()=>{zn(o,s,Un(n.tagName),t.transformTemplate),Os(n,o)})})}})};function Tc(t,e){return function(o,{forwardMotionProps:s}={forwardMotionProps:!1}){const i={...jn(o)?wc:_c,preloadedFeatures:t,useRender:vc(s),createVisualElement:e,Component:o};return ql(i)}}function ve(t,e,n){const o=t.getProps();return Xn(o,e,n!==void 0?n:o.custom,t)}const Is=new Set(["width","height","top","left","right","bottom",...Qt]);function Ec(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,he(n))}function Ac(t,e){const n=ve(t,e);let{transitionEnd:o={},transition:s={},...r}=n||{};r={...r,...o};for(const i in r){const a=Sc(r[i]);Ec(t,i,a)}}function Pc(t){return!!(q(t)&&t.add)}function Rn(t,e){const n=t.getValue("willChange");if(Pc(n))return n.add(e)}function Vs(t){return t.props[gs]}const Bs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Mc=1e-7,Lc=12;function Dc(t,e,n,o,s){let r,i,a=0;do i=e+(n-e)/2,r=Bs(i,o,s)-t,r>0?n=i:e=i;while(Math.abs(r)>Mc&&++a<Lc);return i}function be(t,e,n,o){if(t===e&&n===o)return Q;const s=r=>Dc(r,0,1,t,n);return r=>r===0||r===1?r:Bs(s(r),e,o)}const Fs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,$s=t=>e=>1-t(1-e),js=be(.33,1.53,.69,.99),Kn=$s(js),zs=Fs(Kn),Us=t=>(t*=2)<1?.5*Kn(t):.5*(2-Math.pow(2,-10*(t-1))),Wn=t=>1-Math.sin(Math.acos(t)),Xs=$s(Wn),Gs=Fs(Wn),Hs=t=>/^0[^.\s]+$/u.test(t);function Oc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Hs(t):!0}const Se=t=>Math.round(t*1e5)/1e5,qn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function kc(t){return t==null}const Nc=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yn=(t,e)=>n=>!!(typeof n=="string"&&Nc.test(n)&&n.startsWith(t)||e&&!kc(n)&&Object.prototype.hasOwnProperty.call(n,e)),Rs=(t,e,n)=>o=>{if(typeof o!="string")return o;const[s,r,i,a]=o.match(qn);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Ic=t=>ft(0,255,t),Zn={...te,transform:t=>Math.round(Ic(t))},Bt={test:Yn("rgb","red"),parse:Rs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:o=1})=>"rgba("+Zn.transform(t)+", "+Zn.transform(e)+", "+Zn.transform(n)+", "+Se(ge.transform(o))+")"};function Vc(t){let e="",n="",o="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),o=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),o=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,o+=o,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:s?parseInt(s,16)/255:1}}const Jn={test:Yn("#"),parse:Vc,transform:Bt.transform},ee={test:Yn("hsl","hue"),parse:Rs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:o=1})=>"hsla("+Math.round(t)+", "+lt.transform(Se(e))+", "+lt.transform(Se(n))+", "+Se(ge.transform(o))+")"},Y={test:t=>Bt.test(t)||Jn.test(t)||ee.test(t),parse:t=>Bt.test(t)?Bt.parse(t):ee.test(t)?ee.parse(t):Jn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Bt.transform(t):ee.transform(t)},Bc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fc(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(qn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Bc))===null||n===void 0?void 0:n.length)||0)>0}const Ks="number",Ws="color",$c="var",jc="var(",qs="${}",zc=/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 xe(t){const e=t.toString(),n=[],o={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(zc,l=>(Y.test(l)?(o.color.push(r),s.push(Ws),n.push(Y.parse(l))):l.startsWith(jc)?(o.var.push(r),s.push($c),n.push(l)):(o.number.push(r),s.push(Ks),n.push(parseFloat(l))),++r,qs)).split(qs);return{values:n,split:a,indexes:o,types:s}}function Ys(t){return xe(t).values}function Zs(t){const{split:e,types:n}=xe(t),o=e.length;return s=>{let r="";for(let i=0;i<o;i++)if(r+=e[i],s[i]!==void 0){const a=n[i];a===Ks?r+=Se(s[i]):a===Ws?r+=Y.transform(s[i]):r+=s[i]}return r}}const Uc=t=>typeof t=="number"?0:t;function Xc(t){const e=Ys(t);return Zs(t)(e.map(Uc))}const wt={test:Fc,parse:Ys,createTransformer:Zs,getAnimatableNone:Xc},Gc=new Set(["brightness","contrast","saturate","opacity"]);function Hc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[o]=n.match(qn)||[];if(!o)return t;const s=n.replace(o,"");let r=Gc.has(e)?1:0;return o!==n&&(r*=100),e+"("+r+s+")"}const Rc=/\b([a-z-]*)\(.*?\)/gu,Qn={...wt,getAnimatableNone:t=>{const e=t.match(Rc);return e?e.map(Hc).join(" "):t}},Kc={...Bn,color:Y,backgroundColor:Y,outlineColor:Y,fill:Y,stroke:Y,borderColor:Y,borderTopColor:Y,borderRightColor:Y,borderBottomColor:Y,borderLeftColor:Y,filter:Qn,WebkitFilter:Qn},Js=t=>Kc[t];function Qs(t,e){let n=Js(t);return n!==Qn&&(n=wt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Wc=new Set(["auto","none","0"]);function qc(t,e,n){let o=0,s;for(;o<t.length&&!s;){const r=t[o];typeof r=="string"&&!Wc.has(r)&&xe(r).values.length&&(s=t[o]),o++}if(s&&n)for(const r of e)t[r]=Qs(n,s)}const Ft=t=>t*180/Math.PI,to=t=>{const e=Ft(Math.atan2(t[1],t[0]));return eo(e)},Yc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:to,rotateZ:to,skewX:t=>Ft(Math.atan(t[1])),skewY:t=>Ft(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},eo=t=>(t=t%360,t<0&&(t+=360),t),tr=to,er=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),nr=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Zc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:er,scaleY:nr,scale:t=>(er(t)+nr(t))/2,rotateX:t=>eo(Ft(Math.atan2(t[6],t[5]))),rotateY:t=>eo(Ft(Math.atan2(-t[2],t[0]))),rotateZ:tr,rotate:tr,skewX:t=>Ft(Math.atan(t[4])),skewY:t=>Ft(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function or(t){return t.includes("scale")?1:0}function no(t,e){if(!t||t==="none")return or(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,s;if(n)o=Zc,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Yc,s=a}if(!s)return or(e);const r=o[e],i=s[1].split(",").map(Qc);return typeof r=="function"?r(i):i[r]}const Jc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return no(n,e)};function Qc(t){return parseFloat(t.trim())}const sr=t=>t===te||t===L,tu=new Set(["x","y","z"]),eu=Qt.filter(t=>!tu.has(t));function nu(t){const e=[];return eu.forEach(n=>{const o=t.getValue(n);o!==void 0&&(e.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),e}const ne={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>no(e,"x"),y:(t,{transform:e})=>no(e,"y")};ne.translateX=ne.x,ne.translateY=ne.y;const $t=new Set;let oo=!1,so=!1;function rr(){if(so){const t=Array.from($t).filter(o=>o.needsMeasurement),e=new Set(t.map(o=>o.element)),n=new Map;e.forEach(o=>{const s=nu(o);s.length&&(n.set(o,s),o.render())}),t.forEach(o=>o.measureInitialState()),e.forEach(o=>{o.render();const s=n.get(o);s&&s.forEach(([r,i])=>{var a;(a=o.getValue(r))===null||a===void 0||a.set(i)})}),t.forEach(o=>o.measureEndState()),t.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}so=!1,oo=!1,$t.forEach(t=>t.complete()),$t.clear()}function ir(){$t.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(so=!0)})}function ou(){ir(),rr()}class ro{constructor(e,n,o,s,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=o,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?($t.add(this),oo||(oo=!0,V.read(ir),V.resolveKeyframes(rr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:o,motionValue:s}=this;for(let r=0;r<e.length;r++)if(e[r]===null)if(r===0){const i=s==null?void 0:s.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(o&&n){const l=o.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),s&&i===void 0&&s.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),$t.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,$t.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ar=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),su=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ru(t){const e=su.exec(t);if(!e)return[,];const[,n,o,s]=e;return[`--${n??o}`,s]}const iu=4;function lr(t,e,n=1){xt(n<=iu,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[o,s]=ru(t);if(!o)return;const r=window.getComputedStyle(e).getPropertyValue(o);if(r){const i=r.trim();return ar(i)?parseFloat(i):i}return Vn(s)?lr(s,e,n+1):s}const cr=t=>e=>e.test(t),ur=[te,L,lt,_t,oc,nc,{test:t=>t==="auto",parse:t=>t}],dr=t=>ur.find(cr(t));class fr extends ro{constructor(e,n,o,s,r){super(e,n,o,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Vn(c))){const u=lr(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Is.has(o)||e.length!==2)return;const[s,r]=e,i=dr(s),a=dr(r);if(i!==a)if(sr(i)&&sr(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,o=[];for(let s=0;s<e.length;s++)Oc(e[s])&&o.push(s);o.length&&qc(e,o,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:o}=this;if(!e||!e.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ne[o](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(o,s).jump(s,!1)}measureEndState(){var e;const{element:n,name:o,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const r=n.getValue(o);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,a=s[i];s[i]=ne[o](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const hr=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wt.test(t)||t==="0")&&!t.startsWith("url("));function au(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function lu(t,e,n,o){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],i=hr(s,e),a=hr(r,e);return qt(i===a,`You are trying to animate ${e} from "${s}" to "${r}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${r} via the \`style\` property.`),!i||!a?!1:au(t)||(n==="spring"||Tn(n))&&o}const cu=t=>t!==null;function Ye(t,{repeat:e,repeatType:n="loop"},o){const s=t.filter(cu),r=e&&n!=="loop"&&e%2===1?0:s.length-1;return!r||o===void 0?s[r]:o}const uu=40;class pr{constructor({autoplay:e=!0,delay:n=0,type:o="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=at.now(),this.options={autoplay:e,delay:n,type:o,repeat:s,repeatDelay:r,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>uu?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ou(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=at.now(),this.hasAttemptedResolve=!0;const{name:o,type:s,velocity:r,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!lu(e,o,s,r))if(i)this.options.duration=0;else{l&&l(Ye(e,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const $=(t,e,n)=>t+(e-t)*n;function io(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function du({hue:t,saturation:e,lightness:n,alpha:o}){t/=360,e/=100,n/=100;let s=0,r=0,i=0;if(!e)s=r=i=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=io(l,a,t+1/3),r=io(l,a,t),i=io(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(i*255),alpha:o}}function Ze(t,e){return n=>n>0?e:t}const ao=(t,e,n)=>{const o=t*t,s=n*(e*e-o)+o;return s<0?0:Math.sqrt(s)},fu=[Jn,Bt,ee],hu=t=>fu.find(e=>e.test(t));function mr(t){const e=hu(t);if(qt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===ee&&(n=du(n)),n}const gr=(t,e)=>{const n=mr(t),o=mr(e);if(!n||!o)return Ze(t,e);const s={...n};return r=>(s.red=ao(n.red,o.red,r),s.green=ao(n.green,o.green,r),s.blue=ao(n.blue,o.blue,r),s.alpha=$(n.alpha,o.alpha,r),Bt.transform(s))},pu=(t,e)=>n=>e(t(n)),Ce=(...t)=>t.reduce(pu),lo=new Set(["none","hidden"]);function mu(t,e){return lo.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function gu(t,e){return n=>$(t,e,n)}function co(t){return typeof t=="number"?gu:typeof t=="string"?Vn(t)?Ze:Y.test(t)?gr:bu:Array.isArray(t)?yr:typeof t=="object"?Y.test(t)?gr:yu:Ze}function yr(t,e){const n=[...t],o=n.length,s=t.map((r,i)=>co(r)(r,e[i]));return r=>{for(let i=0;i<o;i++)n[i]=s[i](r);return n}}function yu(t,e){const n={...t,...e},o={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(o[s]=co(t[s])(t[s],e[s]));return s=>{for(const r in o)n[r]=o[r](s);return n}}function vu(t,e){var n;const o=[],s={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const i=e.types[r],a=t.indexes[i][s[i]],l=(n=t.values[a])!==null&&n!==void 0?n:0;o[r]=l,s[i]++}return o}const bu=(t,e)=>{const n=wt.createTransformer(e),o=xe(t),s=xe(e);return o.indexes.var.length===s.indexes.var.length&&o.indexes.color.length===s.indexes.color.length&&o.indexes.number.length>=s.indexes.number.length?lo.has(t)&&!s.values.length||lo.has(e)&&!o.values.length?mu(t,e):Ce(yr(vu(o,s),s.values),n):(qt(!0,`Complex values '${t}' and '${e}' 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.`),Ze(t,e))};function vr(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?$(t,e,n):co(t)(t,e)}const Su=5;function br(t,e,n){const o=Math.max(e-Su,0);return Wo(n-t(o),e-o)}const j={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},Sr=.001;function xu({duration:t=j.duration,bounce:e=j.bounce,velocity:n=j.velocity,mass:o=j.mass}){let s,r;qt(t<=it(j.maxDuration),"Spring duration must be 10 seconds or less");let i=1-e;i=ft(j.minDamping,j.maxDamping,i),t=ft(j.minDuration,j.maxDuration,dt(t)),i<1?(s=c=>{const u=c*i,d=u*t,f=u-n,h=uo(c,i),y=Math.exp(-d);return Sr-f/h*y},r=c=>{const d=c*i*t,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*t,y=Math.exp(-d),g=uo(Math.pow(c,2),i);return(-s(c)+Sr>0?-1:1)*((f-h)*y)/g}):(s=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-.001+u*d},r=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=_u(s,r,a);if(t=it(t),isNaN(l))return{stiffness:j.stiffness,damping:j.damping,duration:t};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:i*2*Math.sqrt(o*c),duration:t}}}const Cu=12;function _u(t,e,n){let o=n;for(let s=1;s<Cu;s++)o=o-t(o)/e(o);return o}function uo(t,e){return t*Math.sqrt(1-e*e)}const wu=["duration","bounce"],Tu=["stiffness","damping","mass"];function xr(t,e){return e.some(n=>t[n]!==void 0)}function Eu(t){let e={velocity:j.velocity,stiffness:j.stiffness,damping:j.damping,mass:j.mass,isResolvedFromDuration:!1,...t};if(!xr(t,Tu)&&xr(t,wu))if(t.visualDuration){const n=t.visualDuration,o=2*Math.PI/(n*1.2),s=o*o,r=2*ft(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:j.mass,stiffness:s,damping:r}}else{const n=xu(t);e={...e,...n,mass:j.mass},e.isResolvedFromDuration=!0}return e}function Cr(t=j.visualDuration,e=j.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:o,restDelta:s}=n;const r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=Eu({...n,velocity:-dt(n.velocity||0)}),y=f||0,g=c/(2*Math.sqrt(l*u)),b=i-r,v=dt(Math.sqrt(l/u)),S=Math.abs(b)<5;o||(o=S?j.restSpeed.granular:j.restSpeed.default),s||(s=S?j.restDelta.granular:j.restDelta.default);let x;if(g<1){const _=uo(v,g);x=A=>{const D=Math.exp(-g*v*A);return i-D*((y+g*v*b)/_*Math.sin(_*A)+b*Math.cos(_*A))}}else if(g===1)x=_=>i-Math.exp(-v*_)*(b+(y+v*b)*_);else{const _=v*Math.sqrt(g*g-1);x=A=>{const D=Math.exp(-g*v*A),E=Math.min(_*A,300);return i-D*((y+g*v*b)*Math.sinh(E)+_*b*Math.cosh(E))/_}}const T={calculatedDuration:h&&d||null,next:_=>{const A=x(_);if(h)a.done=_>=d;else{let D=0;g<1&&(D=_===0?it(y):br(x,_,A));const E=Math.abs(D)<=o,N=Math.abs(i-A)<=s;a.done=E&&N}return a.value=a.done?i:A,a},toString:()=>{const _=Math.min(Yo(T),wn),A=Jo(D=>T.next(_*D).value,_,30);return _+"ms "+A}};return T}function _r({keyframes:t,velocity:e=0,power:n=.8,timeConstant:o=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],f={done:!1,value:d},h=E=>a!==void 0&&E<a||l!==void 0&&E>l,y=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let g=n*e;const b=d+g,v=i===void 0?b:i(b);v!==b&&(g=v-d);const S=E=>-g*Math.exp(-E/o),x=E=>v+S(E),T=E=>{const N=S(E),O=x(E);f.done=Math.abs(N)<=c,f.value=f.done?v:O};let _,A;const D=E=>{h(f.value)&&(_=E,A=Cr({keyframes:[f.value,y(f.value)],velocity:br(x,E,f.value),damping:s,stiffness:r,restDelta:c,restSpeed:u}))};return D(0),{calculatedDuration:null,next:E=>{let N=!1;return!A&&_===void 0&&(N=!0,T(E),D(E)),_!==void 0&&E>=_?A.next(E-_):(!N&&T(E),f)}}}const Au=be(.42,0,1,1),Pu=be(0,0,.58,1),wr=be(.42,0,.58,1),Mu=t=>Array.isArray(t)&&typeof t[0]!="number",Tr={linear:Q,easeIn:Au,easeInOut:wr,easeOut:Pu,circIn:Wn,circInOut:Gs,circOut:Xs,backIn:Kn,backInOut:zs,backOut:js,anticipate:Us},Er=t=>{if(En(t)){xt(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,o,s]=t;return be(e,n,o,s)}else if(typeof t=="string")return xt(Tr[t]!==void 0,`Invalid easing type '${t}'`),Tr[t];return t};function Lu(t,e,n){const o=[],s=n||vr,r=t.length-1;for(let i=0;i<r;i++){let a=s(t[i],t[i+1]);if(e){const l=Array.isArray(e)?e[i]||Q:e;a=Ce(l,a)}o.push(a)}return o}function Du(t,e,{clamp:n=!0,ease:o,mixer:s}={}){const r=t.length;if(xt(r===e.length,"Both input and output ranges must be the same length"),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const i=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Lu(e,o,s),l=a.length,c=u=>{if(i&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const f=Yt(t[d],t[d+1],u);return a[d](f)};return n?u=>c(ft(t[0],t[r-1],u)):c}function Ou(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const s=Yt(0,e,o);t.push($(n,1,s))}}function ku(t){const e=[0];return Ou(e,t.length-1),e}function Nu(t,e){return t.map(n=>n*e)}function Iu(t,e){return t.map(()=>e||wr).splice(0,t.length-1)}function _e({duration:t=300,keyframes:e,times:n,ease:o="easeInOut"}){const s=Mu(o)?o.map(Er):Er(o),r={done:!1,value:e[0]},i=Nu(n&&n.length===e.length?n:ku(e),t),a=Du(i,e,{ease:Array.isArray(s)?s:Iu(e,s)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Vu=t=>{const e=({timestamp:n})=>t(n);return{start:()=>V.update(e,!0),stop:()=>Ct(e),now:()=>K.isProcessing?K.timestamp:at.now()}},Bu={decay:_r,inertia:_r,tween:_e,keyframes:_e,spring:Cr},Fu=t=>t/100;class fo extends pr{constructor(e){super(e),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:s,keyframes:r}=this.options,i=(s==null?void 0:s.KeyframeResolver)||ro,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(r,a,n,o,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,a=Tn(n)?n:Bu[n]||_e;let l,c;process.env.NODE_ENV!=="production"&&a!==_e&&xt(e.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),a!==_e&&typeof e[0]!="number"&&(l=Ce(Fu,vr(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});r==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Yo(u));const{calculatedDuration:d}=u,f=d+s,h=f*(o+1)-s;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:o}=this;if(!o){const{keyframes:E}=this.options;return{done:!0,value:E[E.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=o;if(this.startTime===null)return r.next(0);const{delay:f,repeat:h,repeatType:y,repeatDelay:g,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),S=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,T=r;if(h){const E=Math.min(this.currentTime,u)/d;let N=Math.floor(E),O=E%1;!O&&E>=1&&(O=1),O===1&&N--,N=Math.min(N,h+1),!!(N%2)&&(y==="reverse"?(O=1-O,g&&(O-=g/d)):y==="mirror"&&(T=i)),x=ft(0,1,O)*d}const _=S?{done:!1,value:l[0]}:T.next(x);a&&(_.value=a(_.value));let{done:A}=_;!S&&c!==null&&(A=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return D&&s!==void 0&&(_.value=Ye(l,this.options,s)),b&&b(_.value),D&&this.finish(),_}get duration(){const{resolved:e}=this;return e?dt(e.calculatedDuration):0}get time(){return dt(this.currentTime)}set time(e){e=it(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=dt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Vu,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}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(e){return this.startTime=0,this.tick(e,!0)}}const $u=new Set(["opacity","clipPath","filter","transform"]);function ju(t,e,n,{delay:o=0,duration:s=300,repeat:r=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=ts(a,s);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:o,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:i==="reverse"?"alternate":"normal"})}const zu=xn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Je=10,Uu=2e4;function Xu(t){return Tn(t.type)||t.type==="spring"||!Qo(t.ease)}function Gu(t,e){const n=new fo({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:t[0]};const s=[];let r=0;for(;!o.done&&r<Uu;)o=n.sample(r),s.push(o.value),r+=Je;return{times:void 0,keyframes:s,duration:r-Je,ease:"linear"}}const Ar={anticipate:Us,backInOut:zs,circInOut:Gs};function Hu(t){return t in Ar}class Pr extends pr{constructor(e){super(e);const{name:n,motionValue:o,element:s,keyframes:r}=this.options;this.resolver=new fr(r,(i,a)=>this.onKeyframesResolved(i,a),n,o,s),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:o=300,times:s,ease:r,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof r=="string"&&ze()&&Hu(r)&&(r=Ar[r]),Xu(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:y,...g}=this.options,b=Gu(e,g);e=b.keyframes,e.length===1&&(e[1]=e[0]),o=b.duration,s=b.times,r=b.ease,i="keyframes"}const u=ju(a.owner.current,l,e,{...this.options,duration:o,times:s,ease:r});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Zo(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(Ye(e,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:i,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return dt(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return dt(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=it(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return Q;const{animation:o}=n;Zo(o,e)}return Q}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:o,duration:s,type:r,ease:i,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,y=new fo({...h,keyframes:o,duration:s,type:r,ease:i,times:a,isGenerator:!0}),g=it(this.time);c.setWithVelocity(y.sample(g-Je).value,y.sample(g).value,Je)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:o,repeatDelay:s,repeatType:r,damping:i,type:a}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return zu()&&o&&$u.has(o)&&!l&&!c&&!s&&r!=="mirror"&&i!==0&&a!=="inertia"}}const Ru={type:"spring",stiffness:500,damping:25,restSpeed:10},Ku=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Wu={type:"keyframes",duration:.8},qu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yu=(t,{keyframes:e})=>e.length>2?Wu:Vt.has(t)?t.startsWith("scale")?Ku(e[1]):Ru:qu;function Zu({when:t,delay:e,delayChildren:n,staggerChildren:o,staggerDirection:s,repeat:r,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const ho=(t,e,n,o={},s,r)=>i=>{const a=_n(o,t)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-it(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};Zu(a)||(u={...u,...Yu(t,u)}),u.duration&&(u.duration=it(u.duration)),u.repeatDelay&&(u.repeatDelay=it(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&&!r&&e.get()!==void 0){const f=Ye(u.keyframes,a);if(f!==void 0)return V.update(()=>{u.onUpdate(f),u.onComplete()}),new Cl([])}return!r&&Pr.supports(u)?new Pr(u):new fo(u)};function Ju({protectedKeys:t,needsAnimating:e},n){const o=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,o}function Mr(t,e,{delay:n=0,transitionOverride:o,type:s}={}){var r;let{transition:i=t.getDefaultTransition(),transitionEnd:a,...l}=e;o&&(i=o);const c=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const d in l){const f=t.getValue(d,(r=t.latestValues[d])!==null&&r!==void 0?r:null),h=l[d];if(h===void 0||u&&Ju(u,d))continue;const y={delay:n,..._n(i||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=Vs(t);if(v){const S=window.MotionHandoffAnimation(v,d,V);S!==null&&(y.startTime=S,g=!0)}}Rn(t,d),f.start(ho(d,f,h,t.shouldReduceMotion&&Is.has(d)?{type:!1}:y,t,g));const b=f.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{V.update(()=>{a&&Ac(t,a)})}),c}function po(t,e,n={}){var o;const s=ve(t,e,n.type==="exit"?(o=t.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>Promise.all(Mr(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=r;return Qu(t,e,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Qu(t,e,n=0,o=0,s=1,r){const i=[],a=(t.variantChildren.size-1)*o,l=s===1?(c=0)=>c*o:(c=0)=>a-c*o;return Array.from(t.variantChildren).sort(td).forEach((c,u)=>{c.notify("AnimationStart",e),i.push(po(c,e,{...r,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(i)}function td(t,e){return t.sortNodePosition(e)}function ed(t,e,n={}){t.notify("AnimationStart",e);let o;if(Array.isArray(e)){const s=e.map(r=>po(t,r,n));o=Promise.all(s)}else if(typeof e=="string")o=po(t,e,n);else{const s=typeof e=="function"?ve(t,e,n.custom):e;o=Promise.all(Mr(t,s,n))}return o.then(()=>{t.notify("AnimationComplete",e)})}function Lr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0}const nd=kn.length;function Dr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Dr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<nd;n++){const o=kn[n],s=t.props[o];(pe(s)||s===!1)&&(e[o]=s)}return e}const od=[...On].reverse(),sd=On.length;function rd(t){return e=>Promise.all(e.map(({animation:n,options:o})=>ed(t,n,o)))}function id(t){let e=rd(t),n=Or(),o=!0;const s=l=>(c,u)=>{var d;const f=ve(t,u,l==="exit"?(d=t.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:y,...g}=f;c={...c,...g,...y}}return c};function r(l){e=l(t)}function i(l){const{props:c}=t,u=Dr(t.parent)||{},d=[],f=new Set;let h={},y=1/0;for(let b=0;b<sd;b++){const v=od[b],S=n[v],x=c[v]!==void 0?c[v]:u[v],T=pe(x),_=v===l?S.isActive:null;_===!1&&(y=b);let A=x===u[v]&&x!==c[v]&&T;if(A&&o&&t.manuallyAnimateOnMount&&(A=!1),S.protectedKeys={...h},!S.isActive&&_===null||!x&&!S.prevProp||Re(x)||typeof x=="boolean")continue;const D=ad(S.prevProp,x);let E=D||v===l&&S.isActive&&!A&&T||b>y&&T,N=!1;const O=Array.isArray(x)?x:[x];let G=O.reduce(s(v),{});_===!1&&(G={});const{prevResolvedValues:J={}}=S,Kt={...J,...G},Nt=P=>{E=!0,f.has(P)&&(N=!0,f.delete(P)),S.needsAnimating[P]=!0;const C=t.getValue(P);C&&(C.liveStyle=!1)};for(const P in Kt){const C=G[P],I=J[P];if(h.hasOwnProperty(P))continue;let U=!1;Gn(C)&&Gn(I)?U=!Lr(C,I):U=C!==I,U?C!=null?Nt(P):f.add(P):C!==void 0&&f.has(P)?Nt(P):S.protectedKeys[P]=!0}S.prevProp=x,S.prevResolvedValues=G,S.isActive&&(h={...h,...G}),o&&t.blockInitialAnimation&&(E=!1),E&&(!(A&&D)||N)&&d.push(...O.map(P=>({animation:P,options:{type:v}})))}if(f.size){const b={};if(typeof c.initial!="boolean"){const v=ve(t,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(b.transition=v.transition)}f.forEach(v=>{const S=t.getBaseTarget(v),x=t.getValue(v);x&&(x.liveStyle=!0),b[v]=S??null}),d.push({animation:b})}let g=!!d.length;return o&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),o=!1,g?e(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.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:r,getState:()=>n,reset:()=>{n=Or(),o=!0}}}function ad(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Lr(e,t):!1}function jt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Or(){return{animate:jt(!0),whileInView:jt(),whileHover:jt(),whileTap:jt(),whileDrag:jt(),whileFocus:jt(),exit:jt()}}class Tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class ld extends Tt{constructor(e){super(e),e.animationState||(e.animationState=id(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Re(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let cd=0;class ud extends Tt{constructor(){super(...arguments),this.id=cd++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===o)return;const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const dd={animation:{Feature:ld},exit:{Feature:ud}};function we(t,e,n,o={passive:!0}){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n)}function Te(t){return{point:{x:t.pageX,y:t.pageY}}}const fd=t=>e=>Ln(e)&&t(e,Te(e));function Ee(t,e,n,o){return we(t,e,fd(n),o)}function kr({top:t,left:e,right:n,bottom:o}){return{x:{min:e,max:n},y:{min:t,max:o}}}function hd({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function pd(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),o=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}const Nr=1e-4,md=1-Nr,gd=1+Nr,Ir=.01,yd=0-Ir,vd=0+Ir;function Z(t){return t.max-t.min}function bd(t,e,n){return Math.abs(t-e)<=n}function Vr(t,e,n,o=.5){t.origin=o,t.originPoint=$(e.min,e.max,t.origin),t.scale=Z(n)/Z(e),t.translate=$(n.min,n.max,t.origin)-t.originPoint,(t.scale>=md&&t.scale<=gd||isNaN(t.scale))&&(t.scale=1),(t.translate>=yd&&t.translate<=vd||isNaN(t.translate))&&(t.translate=0)}function Ae(t,e,n,o){Vr(t.x,e.x,n.x,o?o.originX:void 0),Vr(t.y,e.y,n.y,o?o.originY:void 0)}function Br(t,e,n){t.min=n.min+e.min,t.max=t.min+Z(e)}function Sd(t,e,n){Br(t.x,e.x,n.x),Br(t.y,e.y,n.y)}function Fr(t,e,n){t.min=e.min-n.min,t.max=t.min+Z(e)}function Pe(t,e,n){Fr(t.x,e.x,n.x),Fr(t.y,e.y,n.y)}const $r=()=>({translate:0,scale:1,origin:0,originPoint:0}),oe=()=>({x:$r(),y:$r()}),jr=()=>({min:0,max:0}),z=()=>({x:jr(),y:jr()});function et(t){return[t("x"),t("y")]}function mo(t){return t===void 0||t===1}function go({scale:t,scaleX:e,scaleY:n}){return!mo(t)||!mo(e)||!mo(n)}function zt(t){return go(t)||zr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function zr(t){return Ur(t.x)||Ur(t.y)}function Ur(t){return t&&t!=="0%"}function Qe(t,e,n){const o=t-n,s=e*o;return n+s}function Xr(t,e,n,o,s){return s!==void 0&&(t=Qe(t,s,o)),Qe(t,n,o)+e}function yo(t,e=0,n=1,o,s){t.min=Xr(t.min,e,n,o,s),t.max=Xr(t.max,e,n,o,s)}function Gr(t,{x:e,y:n}){yo(t.x,e.translate,e.scale,e.originPoint),yo(t.y,n.translate,n.scale,n.originPoint)}const Hr=.999999999999,Rr=1.0000000000001;function xd(t,e,n,o=!1){const s=n.length;if(!s)return;e.x=e.y=1;let r,i;for(let a=0;a<s;a++){r=n[a],i=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&r.options.layoutScroll&&r.scroll&&r!==r.root&&re(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),i&&(e.x*=i.x.scale,e.y*=i.y.scale,Gr(t,i)),o&&zt(r.latestValues)&&re(t,r.latestValues))}e.x<Rr&&e.x>Hr&&(e.x=1),e.y<Rr&&e.y>Hr&&(e.y=1)}function se(t,e){t.min=t.min+e,t.max=t.max+e}function Kr(t,e,n,o,s=.5){const r=$(t.min,t.max,s);yo(t,e,n,r,o)}function re(t,e){Kr(t.x,e.x,e.scaleX,e.scale,e.originX),Kr(t.y,e.y,e.scaleY,e.scale,e.originY)}function Wr(t,e){return kr(pd(t.getBoundingClientRect(),e))}function Cd(t,e,n){const o=Wr(t,n),{scroll:s}=e;return s&&(se(o.x,s.offset.x),se(o.y,s.offset.y)),o}const qr=({current:t})=>t?t.ownerDocument.defaultView:null,Yr=(t,e)=>Math.abs(t-e);function _d(t,e){const n=Yr(t.x,e.x),o=Yr(t.y,e.y);return Math.sqrt(n**2+o**2)}class Zr{constructor(e,n,{transformPagePoint:o,contextWindow:s,dragSnapToOrigin:r=!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=bo(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=_d(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:y}=d,{timestamp:g}=K;this.history.push({...y,timestamp:g});const{onStart:b,onMove:v}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=vo(f,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=bo(d.type==="pointercancel"?this.lastMoveEventInfo:vo(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,b),y&&y(d,b)},!Ln(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=o,this.contextWindow=s||window;const i=Te(e),a=vo(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=K;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,bo(a,this.history)),this.removeListeners=Ce(Ee(this.contextWindow,"pointermove",this.handlePointerMove),Ee(this.contextWindow,"pointerup",this.handlePointerUp),Ee(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ct(this.updatePoint)}}function vo(t,e){return e?{point:e(t.point)}:t}function Jr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function bo({point:t},e){return{point:t,delta:Jr(t,Qr(e)),offset:Jr(t,wd(e)),velocity:Td(e,.1)}}function wd(t){return t[0]}function Qr(t){return t[t.length-1]}function Td(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,o=null;const s=Qr(t);for(;n>=0&&(o=t[n],!(s.timestamp-o.timestamp>it(e)));)n--;if(!o)return{x:0,y:0};const r=dt(s.timestamp-o.timestamp);if(r===0)return{x:0,y:0};const i={x:(s.x-o.x)/r,y:(s.y-o.y)/r};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Ed(t,{min:e,max:n},o){return e!==void 0&&t<e?t=o?$(e,t,o.min):Math.max(t,e):n!==void 0&&t>n&&(t=o?$(n,t,o.max):Math.min(t,n)),t}function ti(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Ad(t,{top:e,left:n,bottom:o,right:s}){return{x:ti(t.x,n,s),y:ti(t.y,e,o)}}function ei(t,e){let n=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,o]=[o,n]),{min:n,max:o}}function Pd(t,e){return{x:ei(t.x,e.x),y:ei(t.y,e.y)}}function Md(t,e){let n=.5;const o=Z(t),s=Z(e);return s>o?n=Yt(e.min,e.max-o,t.min):o>s&&(n=Yt(t.min,t.max-s,e.min)),ft(0,1,n)}function Ld(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const So=.35;function Dd(t=So){return t===!1?t=0:t===!0&&(t=So),{x:ni(t,"left","right"),y:ni(t,"top","bottom")}}function ni(t,e,n){return{min:oi(t,e),max:oi(t,n)}}function oi(t,e){return typeof t=="number"?t:t[e]||0}const Od=new WeakMap;class kd{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=z(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Te(u).point)},r=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:y}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Pl(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),et(b=>{let v=this.getAxisMotionValue(b).get()||0;if(lt.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const x=S.layout.layoutBox[b];x&&(v=Z(x)*(parseFloat(v)/100))}}this.originPoint[b]=v}),y&&V.postRender(()=>y(u,d)),Rn(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:y,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=d;if(h&&this.currentDirection===null){this.currentDirection=Nd(b),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),g&&g(u,d)},a=(u,d)=>this.stop(u,d),l=()=>et(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 Zr(e,{onSessionStart:s,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:qr(this.visualElement)})}stop(e,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:r}=this.getProps();r&&V.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.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(e,n,o){const{drag:s}=this.getProps();if(!o||!tn(e,s,this.currentDirection))return;const r=this.getAxisMotionValue(e);let i=this.originPoint[e]+o[e];this.constraints&&this.constraints[e]&&(i=Ed(i,this.constraints[e],this.elastic[e])),r.set(i)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:o}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,r=this.constraints;n&&Jt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=Ad(s.layoutBox,n):this.constraints=!1,this.elastic=Dd(o),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&et(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Ld(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Jt(e))return!1;const o=e.current;xt(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const r=Cd(o,s.root,this.visualElement.getTransformPagePoint());let i=Pd(s.layout.layoutBox,r);if(n){const a=n(hd(i));this.hasMutatedConstraints=!!a,a&&(i=kr(a))}return i}startAnimation(e){const{drag:n,dragMomentum:o,dragElastic:s,dragTransition:r,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=et(u=>{if(!tn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=s?200:1e6,h=s?40:1e7,y={type:"inertia",velocity:o?e[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...r,...d};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const o=this.getAxisMotionValue(e);return Rn(this.visualElement,e),o.start(ho(e,o,0,n,this.visualElement,!1))}stopAnimation(){et(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){et(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,o=this.visualElement.getProps(),s=o[n];return s||this.visualElement.getValue(e,(o.initial?o.initial[e]:void 0)||0)}snapToCursor(e){et(n=>{const{drag:o}=this.getProps();if(!tn(n,o,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:a}=s.layout.layoutBox[n];r.set(e[n]-$(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!Jt(n)||!o||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};et(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();s[i]=Md({min:l,max:l},this.constraints[i])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),et(i=>{if(!tn(i,e,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set($(l,c,s[i]))})}addListeners(){if(!this.visualElement.current)return;Od.set(this.visualElement,this);const e=this.visualElement.current,n=Ee(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();Jt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,r=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),V.read(o);const i=we(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(et(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(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:i=So,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:o,dragPropagation:s,dragConstraints:r,dragElastic:i,dragMomentum:a}}}function tn(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Nd(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Id extends Tt{constructor(e){super(e),this.removeGroupControls=Q,this.removeListeners=Q,this.controls=new kd(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Q}unmount(){this.removeGroupControls(),this.removeListeners()}}const si=t=>(e,n)=>{t&&V.postRender(()=>t(e,n))};class Vd extends Tt{constructor(){super(...arguments),this.removePointerDownListener=Q}onPointerDown(e){this.session=new Zr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:qr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:o,onPanEnd:s}=this.node.getProps();return{onSessionStart:si(e),onStart:si(n),onMove:o,onEnd:(r,i)=>{delete this.session,s&&V.postRender(()=>s(r,i))}}}mount(){this.removePointerDownListener=Ee(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const en={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ri(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Me={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(L.test(t))t=parseFloat(t);else return t;const n=ri(t,e.target.x),o=ri(t,e.target.y);return`${n}% ${o}%`}},Bd={correct:(t,{treeScale:e,projectionDelta:n})=>{const o=t,s=wt.parse(t);if(s.length>5)return o;const r=wt.createTransformer(t),i=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+i]/=a,s[1+i]/=l;const c=$(a,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=c),typeof s[3+i]=="number"&&(s[3+i]/=c),r(s)}};class Fd extends p.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:o,layoutId:s}=this.props,{projection:r}=e;ec($d),r&&(n.group&&n.group.add(r),o&&o.register&&s&&o.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),en.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:o,drag:s,isPresent:r}=this.props,i=o.projection;return i&&(i.isPresent=r,s||e.layoutDependency!==n||n===void 0||e.isPresent!==r?i.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?i.promote():i.relegate()||V.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Mn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),o&&o.deregister&&o.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ii(t){const[e,n]=vl(),o=p.useContext(Ro);return m.jsx(Fd,{...t,layoutGroup:o,switchLayoutGroup:p.useContext(ys),isPresent:e,safeToRemove:n})}const $d={borderRadius:{...Me,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomLeftRadius:Me,borderBottomRightRadius:Me,boxShadow:Bd};function jd(t,e,n){const o=q(t)?t:he(t);return o.start(ho("",o,e,n)),o.animation}function zd(t){return t instanceof SVGElement&&t.tagName!=="svg"}const Ud=(t,e)=>t.depth-e.depth;class Xd{constructor(){this.children=[],this.isDirty=!1}add(e){bn(this.children,e),this.isDirty=!0}remove(e){Sn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ud),this.isDirty=!1,this.children.forEach(e)}}function Gd(t,e){const n=at.now(),o=({timestamp:s})=>{const r=s-n;r>=e&&(Ct(o),t(r-e))};return V.read(o,!0),()=>Ct(o)}const ai=["TopLeft","TopRight","BottomLeft","BottomRight"],Hd=ai.length,li=t=>typeof t=="string"?parseFloat(t):t,ci=t=>typeof t=="number"||L.test(t);function Rd(t,e,n,o,s,r){s?(t.opacity=$(0,n.opacity!==void 0?n.opacity:1,Kd(o)),t.opacityExit=$(e.opacity!==void 0?e.opacity:1,0,Wd(o))):r&&(t.opacity=$(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let i=0;i<Hd;i++){const a=`border${ai[i]}Radius`;let l=ui(e,a),c=ui(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||ci(l)===ci(c)?(t[a]=Math.max($(li(l),li(c),o),0),(lt.test(c)||lt.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=$(e.rotate||0,n.rotate||0,o))}function ui(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Kd=di(0,.5,Xs),Wd=di(.5,.95,Q);function di(t,e,n){return o=>o<t?0:o>e?1:n(Yt(t,e,o))}function fi(t,e){t.min=e.min,t.max=e.max}function nt(t,e){fi(t.x,e.x),fi(t.y,e.y)}function hi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function pi(t,e,n,o,s){return t-=e,t=Qe(t,1/n,o),s!==void 0&&(t=Qe(t,1/s,o)),t}function qd(t,e=0,n=1,o=.5,s,r=t,i=t){if(lt.test(e)&&(e=parseFloat(e),e=$(i.min,i.max,e/100)-i.min),typeof e!="number")return;let a=$(r.min,r.max,o);t===r&&(a-=e),t.min=pi(t.min,e,n,a,s),t.max=pi(t.max,e,n,a,s)}function mi(t,e,[n,o,s],r,i){qd(t,e[n],e[o],e[s],e.scale,r,i)}const Yd=["x","scaleX","originX"],Zd=["y","scaleY","originY"];function gi(t,e,n,o){mi(t.x,e,Yd,n?n.x:void 0,o?o.x:void 0),mi(t.y,e,Zd,n?n.y:void 0,o?o.y:void 0)}function yi(t){return t.translate===0&&t.scale===1}function vi(t){return yi(t.x)&&yi(t.y)}function bi(t,e){return t.min===e.min&&t.max===e.max}function Jd(t,e){return bi(t.x,e.x)&&bi(t.y,e.y)}function Si(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function xi(t,e){return Si(t.x,e.x)&&Si(t.y,e.y)}function Ci(t){return Z(t.x)/Z(t.y)}function _i(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Qd{constructor(){this.members=[]}add(e){bn(this.members,e),e.scheduleRender()}remove(e){if(Sn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===s);if(n===0)return!1;let o;for(let s=n;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1){o=r;break}}return o?(this.promote(o),!0):!1}promote(e,n){const o=this.lead;if(e!==o&&(this.prevLead=o,this.lead=e,e.show(),o)){o.instance&&o.scheduleRender(),e.scheduleRender(),e.resumeFrom=o,n&&(e.resumeFrom.preserveOpacity=!0),o.snapshot&&(e.snapshot=o.snapshot,e.snapshot.latestValues=o.animationValues||o.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:o}=e;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function tf(t,e,n){let o="";const s=t.x.translate/e.x,r=t.y.translate/e.y,i=(n==null?void 0:n.z)||0;if((s||r||i)&&(o=`translate3d(${s}px, ${r}px, ${i}px) `),(e.x!==1||e.y!==1)&&(o+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:y}=n;c&&(o=`perspective(${c}px) ${o}`),u&&(o+=`rotate(${u}deg) `),d&&(o+=`rotateX(${d}deg) `),f&&(o+=`rotateY(${f}deg) `),h&&(o+=`skewX(${h}deg) `),y&&(o+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(o+=`scale(${a}, ${l})`),o||"none"}const xo=["","X","Y","Z"],ef={visibility:"hidden"},wi=1e3;let nf=0;function Co(t,e,n,o){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),o&&(o[t]=0))}function Ti(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Vs(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(s||r))}const{parent:o}=t;o&&!o.hasCheckedOptimisedAppear&&Ti(o)}function Ei({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:o,resetTransform:s}){return class{constructor(i={},a=e==null?void 0:e()){this.id=nf++,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(rf),this.nodes.forEach(df),this.nodes.forEach(ff),this.nodes.forEach(af)},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 Xd)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Cn),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=zd(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),t){let d;const f=()=>this.root.updateBlockedByResize=!1;t(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Gd(f,250),en.hasAnimatedSinceResize&&(en.hasAnimatedSinceResize=!1,this.nodes.forEach(Pi))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||yf,{onLayoutAnimationStart:b,onLayoutAnimationComplete:v}=u.getProps(),S=!this.targetLayout||!xi(this.targetLayout,y),x=!f&&h;if(this.options.layoutRoot||this.resumeFrom||x||f&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const T={..._n(g,"layout"),onPlay:b,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||Pi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ct(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(hf),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&&Ti(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(Ai);return}this.isUpdating||this.nodes.forEach(cf),this.isUpdating=!1,this.nodes.forEach(uf),this.nodes.forEach(of),this.nodes.forEach(sf),this.clearAllSnapshots();const a=at.now();K.delta=ft(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,Pn.update.process(K),Pn.preRender.process(K),Pn.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lf),this.sharedNodes.forEach(pf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(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=z(),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(!s)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!vi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||zt(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),vf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return z();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(bf))){const{scroll:u}=this.root;u&&(se(l.x,u.offset.x),se(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=z();if(nt(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&&nt(l,i),se(l.x,d.offset.x),se(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=z();nt(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&&re(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),zt(u.latestValues)&&re(l,u.latestValues)}return zt(this.latestValues)&&re(l,this.latestValues),l}removeTransform(i){const a=z();nt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!zt(c.latestValues))continue;go(c.latestValues)&&c.updateSnapshot();const u=z(),d=c.measurePageBox();nt(u,d),gi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return zt(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!==K.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=K.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),Pe(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),nt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Sd(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nt(this.target,this.layout.layoutBox),Gr(this.target,this.targetDelta)):nt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),Pe(this.relativeTargetOrigin,this.target,h.target),nt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||go(this.parent.latestValues)||zr(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===K.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;nt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;xd(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=z());const{target:y}=a;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hi(this.prevProjectionDelta.x,this.projectionDelta.x),hi(this.prevProjectionDelta.y,this.projectionDelta.y)),Ae(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!_i(this.projectionDelta.x,this.prevProjectionDelta.x)||!_i(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=oe(),this.projectionDelta=oe(),this.projectionDeltaWithTransform=oe()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=oe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=z(),h=l?l.source:void 0,y=this.layout?this.layout.source:void 0,g=h!==y,b=this.getStack(),v=!b||b.members.length<=1,S=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(gf));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const _=T/1e3;Mi(d.x,i.x,_),Mi(d.y,i.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pe(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mf(this.relativeTarget,this.relativeTargetOrigin,f,_),x&&Jd(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=z()),nt(x,this.relativeTarget)),g&&(this.animationValues=u,Rd(u,c,this.latestValues,_,S,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&&(Ct(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{en.hasAnimatedSinceResize=!0,this.currentAnimation=jd(0,wi,{...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(wi),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&&Ni(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||z();const d=Z(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Z(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}nt(a,l),re(a,u),Ae(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Qd),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&&Co("z",i,c,this.animationValues);for(let u=0;u<xo.length;u++)Co(`rotate${xo[u]}`,i,c,this.animationValues),Co(`skew${xo[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 ef;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=qe(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=qe(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!zt(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=tf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${y.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in me){if(f[g]===void 0)continue;const{correct:b,applyTo:v,isCSSVariable:S}=me[g],x=c.transform==="none"?f[g]:b(f[g],d);if(v){const T=v.length;for(let _=0;_<T;_++)c[v[_]]=x}else S?this.options.visualElement.renderState.vars[g]=x:c[g]=x}return this.options.layoutId&&(c.pointerEvents=d===this?qe(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(Ai),this.root.sharedNodes.clear()}}}function of(t){t.updateLayout()}function sf(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:s}=t.layout,{animationType:r}=t.options,i=n.source!==t.layout.source;r==="size"?et(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Z(f);f.min=o[d].min,f.max=f.min+h}):Ni(r,n.layoutBox,o)&&et(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=Z(o[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=oe();Ae(a,o,n.layoutBox);const l=oe();i?Ae(l,t.applyTransform(s,!0),n.measuredBox):Ae(l,o,n.layoutBox);const c=!vi(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const y=z();Pe(y,n.layoutBox,f.layoutBox);const g=z();Pe(g,o,h.layoutBox),xi(y,g)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=y,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:o}=t.options;o&&o()}t.options.transition=void 0}function rf(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function af(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function lf(t){t.clearSnapshot()}function Ai(t){t.clearMeasurements()}function cf(t){t.isLayoutDirty=!1}function uf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Pi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function df(t){t.resolveTargetDelta()}function ff(t){t.calcProjection()}function hf(t){t.resetSkewAndRotation()}function pf(t){t.removeLeadSnapshot()}function Mi(t,e,n){t.translate=$(e.translate,0,n),t.scale=$(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Li(t,e,n,o){t.min=$(e.min,n.min,o),t.max=$(e.max,n.max,o)}function mf(t,e,n,o){Li(t.x,e.x,n.x,o),Li(t.y,e.y,n.y,o)}function gf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const yf={duration:.45,ease:[.4,0,.1,1]},Di=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Oi=Di("applewebkit/")&&!Di("chrome/")?Math.round:Q;function ki(t){t.min=Oi(t.min),t.max=Oi(t.max)}function vf(t){ki(t.x),ki(t.y)}function Ni(t,e,n){return t==="position"||t==="preserve-aspect"&&!bd(Ci(e),Ci(n),.2)}function bf(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const Sf=Ei({attachResizeListener:(t,e)=>we(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),_o={current:void 0},Ii=Ei({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!_o.current){const t=new Sf({});t.mount(window),t.setOptions({layoutScroll:!0}),_o.current=t}return _o.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),xf={pan:{Feature:Vd},drag:{Feature:Id,ProjectionNode:Ii,MeasureLayout:ii}};function Vi(t,e,n){const{props:o}=t;t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,r=o[s];r&&V.postRender(()=>r(e,Te(e)))}class Cf extends Tt{mount(){const{current:e}=this.node;e&&(this.unmount=Ll(e,(n,o)=>(Vi(this.node,o,"Start"),s=>Vi(this.node,s,"End"))))}unmount(){}}class _f extends Tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=Ce(we(this.node.current,"focus",()=>this.onFocus()),we(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Bi(t,e,n){const{props:o}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&o.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),r=o[s];r&&V.postRender(()=>r(e,Te(e)))}class wf extends Tt{mount(){const{current:e}=this.node;e&&(this.unmount=Nl(e,(n,o)=>(Bi(this.node,o,"Start"),(s,{success:r})=>Bi(this.node,s,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const wo=new WeakMap,To=new WeakMap,Tf=t=>{const e=wo.get(t.target);e&&e(t)},Ef=t=>{t.forEach(Tf)};function Af({root:t,...e}){const n=t||document;To.has(n)||To.set(n,{});const o=To.get(n),s=JSON.stringify(e);return o[s]||(o[s]=new IntersectionObserver(Ef,{root:t,...e})),o[s]}function Pf(t,e,n){const o=Af(e);return wo.set(t,n),o.observe(t),()=>{wo.delete(t),o.unobserve(t)}}const Mf={some:0,all:1};class Lf extends Tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:o,amount:s="some",once:r}=e,i={root:n?n.current:void 0,rootMargin:o,threshold:typeof s=="number"?s:Mf[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,r&&!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 Pf(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Df(e,n))&&this.startObserver()}unmount(){}}function Df({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Of={inView:{Feature:Lf},tap:{Feature:wf},focus:{Feature:_f},hover:{Feature:Cf}},kf={layout:{ProjectionNode:Ii,MeasureLayout:ii}},Eo={current:null},Fi={current:!1};function Nf(){if(Fi.current=!0,!!yn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Eo.current=t.matches;t.addListener(e),e()}else Eo.current=!1}const If=[...ur,Y,wt],Vf=t=>If.find(cr(t)),Bf=new WeakMap;function Ff(t,e,n){for(const o in e){const s=e[o],r=n[o];if(q(s))t.addValue(o,s),process.env.NODE_ENV==="development"&&je(s.version==="12.5.0",`Attempting to mix Motion versions ${s.version} with 12.5.0 may not work as expected.`);else if(q(r))t.addValue(o,he(s,{owner:t}));else if(r!==s)if(t.hasValue(o)){const i=t.getValue(o);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=t.getStaticValue(o);t.addValue(o,he(i!==void 0?i:s,{owner:t}))}}for(const o in n)e[o]===void 0&&t.removeValue(o);return e}const $i=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $f{scrapeMotionValuesFromProps(e,n,o){return{}}constructor({parent:e,props:n,presenceContext:o,reducedMotionConfig:s,blockInitialAnimation:r,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=ro,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 h=at.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,V.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=e,this.props=n,this.presenceContext=o,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Ke(n),this.isVariantNode=ps(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const y=f[h];l[h]!==void 0&&q(y)&&y.set(l[h],!1)}}mount(e){this.current=e,Bf.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),Fi.current||Nf(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Eo.current,process.env.NODE_ENV!=="production"&&je(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(),Ct(this.notifyUpdate),Ct(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const o=Vt.has(e);o&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&V.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),r(),i&&i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Zt){const n=Zt[e];if(!n)continue;const{isEnabled:o,Feature:s}=n;if(!this.features[e]&&s&&o(this.props)&&(this.features[e]=new s(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<$i.length;o++){const s=$i[o];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,i=e[r];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=Ff(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const o=this.values.get(e);n!==o&&(o&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let o=this.values.get(e);return o===void 0&&n!==void 0&&(o=he(n===null?void 0:n,{owner:this}),this.addValue(e,o)),o}readValue(e,n){var o;let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(o=this.getBaseTargetFromProps(this.props,e))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(ar(s)||Hs(s))?s=parseFloat(s):!Vf(s)&&wt.test(n)&&(s=Qs(e,n)),this.setBaseTarget(e,q(s)?s.get():s)),q(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:o}=this.props;let s;if(typeof o=="string"||typeof o=="object"){const i=Xn(this.props,o,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(s=i[e])}if(o&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!q(r)?r:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Cn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class ji extends $f{constructor(){super(...arguments),this.KeyframeResolver=fr}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:o}){delete n[e],delete o[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;q(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function jf(t){return window.getComputedStyle(t)}class zf extends ji{constructor(){super(...arguments),this.type="html",this.renderInstance=Ls}readValueFromInstance(e,n){if(Vt.has(n))return Jc(e,n);{const o=jf(e),s=(In(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Wr(e,n)}build(e,n,o){Fn(e,n,o.transformTemplate)}scrapeMotionValuesFromProps(e,n,o){return Hn(e,n,o)}}class Uf extends ji{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Ms(this.current,this.renderState)}}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Vt.has(n)){const o=Js(n);return o&&o.default||0}return n=Ds.has(n)?n:Nn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,o){return ks(e,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&V.postRender(this.updateDimensions)}build(e,n,o){zn(e,n,this.isSVGTag,o.transformTemplate)}renderInstance(e,n,o,s){Os(e,n,o,s)}mount(e){this.isSVGTag=Un(e.tagName),super.mount(e)}}const Xf=(t,e)=>jn(t)?new Uf(e):new zf(e,{allowProjection:t!==p.Fragment}),Gf=Tc({...dd,...Of,...xf,...kf},Xf),Ut=Ul(Gf),Hf={root:"_root_uup2j_1"},zi={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 Et(t){return t&&Object.keys(t).length?Object.keys(t).filter(e=>Object.keys(zi).includes(e)).filter(e=>t[e]===!0).map(e=>zi[e]):null}const At="Errore: ",Rf="Impossibile acquisire la posizione.",nn="Impossibile caricare i punti di mappa.",Kf="Si è verificato un errore.",Wf="Impossibile caricare i suggerimenti.",qf="Impossibile caricare i dettagli della location.",Yf="Impossibile caricare la mappa.",Zf="Impossibile trovare punti di mappa nell'area di ricerca.",Jf="Ottieni indicazioni di navigazione per questa destinazione",Qf="Condividi questa destinazione",th="Scarica l'evento",eh="dyn-locator__portal-root",nh=3e3,Ui=6,Xi=2e4,oh=300,Le={north:47.1,south:36.6,east:18.6,west:6.6},sh={lat:(Le.north+Le.south)/2,lng:(Le.east+Le.west)/2};function ht(t){if(t)return t.trim().split(" ").filter(e=>e.length)}function pt(t){return t?t.split("").reduce((e,n)=>(/[A-Z]/.test(n)?t.indexOf(n)===0?e+=n.toLowerCase():e+="-"+n.toLowerCase():e+=n,e),""):""}function Gi(t,e){const{type:n,url:o}=t??{};switch(n){case"navigate":case"directions":return{"aria-label":Jf,as:"a",href:o??"#",target:"_blank",rel:"noopener noreferrer",...typeof e=="function"?{onClick(){e()}}:{}};case"share":return{"aria-label":Qf,as:"a",href:o??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":th,as:"a",href:o??"#",download:!0,target:"_blank",rel:"noopener noreferrer",...typeof e=="function"?{onClick(){e()}}:{}};case"email":default:return{}}}function rh(t,e){let n;return(...o)=>{clearTimeout(n),n=setTimeout(()=>t(...o),e)}}function ih(t){var l,c,u,d;const e=(t==null?void 0:t.address_components)??[];function n(f){return e.find(h=>h.types.includes(f))}const o=(t==null?void 0:t.formatted_address)??"No address found",s=((l=n("locality"))==null?void 0:l.long_name)??"No city found",r=((c=n("country"))==null?void 0:c.long_name)??"No country found",i=((u=n("administrative_area_level_1"))==null?void 0:u.long_name)??"No region found",a=((d=n("administrative_area_level_2"))==null?void 0:d.short_name)??"No province found";return{address:o,city:s,province:a,region:i,country:r}}const Hi="Anchor";function Ri({as:t,wrapper:e,children:n,variant:o="default",className:s,animate:r=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},h){const y=e||"span",g=r?Ut[y]:y,b=t||"a",v=Et(f)??[],S=r?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},T=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return m.jsx(g,{className:F(Hf.root,"dyn-locator__"+pt(Hi),ht(s),...v),"data-variant":o,...d?{style:d}:{},...S,...f,children:m.jsx(b,{ref:h,href:a,target:l,rel:T,...u,children:n})})}Ri.displayName=Hi;const Ki=p.forwardRef(Ri),Wi="ErrorBanner";function qi({title:t="Si è verificato un errore",message:e="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:o,errorDetails:s,className:r,children:i,...a}){const l=Et(a)??[];return m.jsxs("div",{className:F("dyn-locator__"+pt(Wi),ue.root,ht(r),...l??[]),children:[m.jsxs("header",{className:ue.header,children:[m.jsx(il,{size:28,color:"currentColor",className:ue.icon})," ",m.jsx("h3",{children:t})]}),m.jsxs("div",{className:ue.body,children:[m.jsx("p",{children:e}),n&&o&&m.jsxs("p",{children:["Prova a"," ",m.jsx(Ki,{animate:!1,"aria-label":n,href:"#",onClick:o,children:n})]}),i,s&&m.jsx("div",{className:ue.content,children:m.jsx("pre",{children:s})})]})]})}qi.displayName=Wi;const Yi=qi;class ah extends p.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,n){console.error("Locator error: ",e,n)}render(){var e;return this.state.hasError?this.props.fallback||m.jsx("div",{className:Za.container,children:m.jsx(Yi,{message:"Something went wrong with the Locator component",errorDetails:(e=this.state.error)==null?void 0:e.message})}):this.props.children}}const lh=({title:t,titleId:e,...n},o)=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":e,viewBox:"0 0 24 24",...n,children:[t?m.jsx("title",{id:e,children:t}):null,m.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"})]}),ch=p.forwardRef(lh),uh=({title:t,titleId:e,...n},o)=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":e,viewBox:"0 0 24 24",...n,children:[t?m.jsx("title",{id:e,children:t}):null,m.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"})]}),dh=p.forwardRef(uh),fh=({title:t,titleId:e,...n},o)=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":e,viewBox:"0 0 24 24",...n,children:[t?m.jsx("title",{id:e,children:t}):null,m.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"})]}),hh=p.forwardRef(fh),ph=({title:t,titleId:e,...n},o)=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":e,viewBox:"0 0 24 24",...n,children:[t?m.jsx("title",{id:e,children:t}):null,m.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"})]}),mh=p.forwardRef(ph),gh=({title:t,titleId:e,...n},o)=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":e,viewBox:"0 0 24 24",...n,children:[t?m.jsx("title",{id:e,children:t}):null,m.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"})]}),yh=p.forwardRef(gh),vh=({title:t,titleId:e,...n},o)=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":e,viewBox:"0 0 24 24",...n,children:[t?m.jsx("title",{id:e,children:t}):null,m.jsxs("g",{transform:"scale(1.2) translate(-2.4, -2.4)",children:[m.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.5 3 4.965 21H3.108L18.643 3H20.5Z",clipRule:"evenodd"}),m.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"}),m.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"})]})]}),Zi=p.forwardRef(vh),bh=({title:t,titleId:e,...n},o)=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:o,"aria-labelledby":e,viewBox:"0 0 24 24",...n,children:[t?m.jsx("title",{id:e,children:t}):null,m.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"})]}),Sh=p.forwardRef(bh),Ji={ArrowLeft:el,ArrowUpRight:ol,ChevronUp:rl,ChevronDown:sl,Close:Ho,Expand:dl,Location:ul,Search:pl,Share:ml,Target:ll,Email:cl,Copy:al,X:Zi,Twitter:Zi,Facebook:ch,Instagram:dh,Linkedin:hh,TikTok:mh,Whatsapp:yh,Youtube:Sh},mt={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"},ie={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Ao={root:"_root_71ove_4",icon:"_icon_71ove_43"};function xh(t){return p.isValidElement(t)||typeof t=="function"}function Ch(t){return t?typeof t=="string"||typeof t=="object"&&"name"in t:!1}function _h(t){return!!t&&typeof t=="object"&&"path"in t}const Qi="Icon";function ta({as:t,icon:e,iconRef:n,label:o,size:s="S",radius:r,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const h=t||"span",y=l?Ut[h]:h,{iconMap:g}=Dh();function b(x){if(Ch(x)){const T=typeof x=="string"?x:x.name;return g[T]?p.createElement(g[T],{...n?{ref:n}:{},...o?{title:o,titleId:o.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Ao.icon}):'No icon found for "'+T+'"!'}return _h(x)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),m.jsx("img",{...n?{ref:n}:{},src:x.path,alt:`Icona decorativa${o?" che rappresenta '"+o+"'":""}`,className:Ao.icon})):"No icon provided"}const v=Et(d)??[],S=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return m.jsx(y,{ref:f,className:F(Ao.root,"dyn-locator__"+pt(Qi),ht(a),...v),...u?{style:u}:{},"data-variant":i,"data-size":s,...r?{"data-radius":r}:{},...S,...d,children:b(e)})}ta.displayName=Qi;const ct=p.forwardRef(ta),ea="Tag";function na({as:t,iconPosition:e="left",children:n,icon:o,className:s,animate:r=!0,animationDelay:i=0,style:a,...l},c){const u=t||"span",d=r?Ut[u]:u,f=Et(l)??[],h=r?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return m.jsx(d,{ref:c,className:F(ie.root,"dyn-locator__"+pt(ea),ht(s),...f),"data-icon-position":e,...a?{style:a}:{},...h,...l,children:m.jsxs("div",{className:ie.container,children:[o?m.jsx("div",{className:ie.icon,children:xh(o)?typeof o=="function"?m.jsx(o,{className:ie.icon}):o:m.jsx(ct,{className:ie.icon,icon:o})}):null,m.jsx("div",{className:ie.label,children:n})]})})}na.displayName=ea;const wh=p.forwardRef(na),Th={root:"_root_u5v4v_1"},oa="IconButton";function sa({as:t,children:e,className:n,variant:o="default",animate:s=!0,animationDelay:r=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},h){const y=t||"button",g=s?Ut[y]:y,b=Et(f)??[],v=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:r,duration:.2}}:{},S=y==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return m.jsx(g,{ref:h,className:F(Th.root,"dyn-locator__"+pt(oa),ht(n),...b),"data-variant":o,"data-element":y,"aria-label":a,disabled:d,...i?{style:i}:{},...v,...S,...f,children:e})}sa.displayName=oa;const Pt=p.forwardRef(sa),ra={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},ia="Card";function aa({as:t,children:e,className:n,variant:o="default",animate:s=!0,animationDelay:r=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=t||"article",f=s?Ut[d]:d,h=Et(c)??[],y=s?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:r,duration:.3}}:{};return m.jsx(f,{ref:u,className:F(ra.root,"dyn-locator__"+pt(ia),ht(n),...h),"data-variant":o,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...y,...c,children:o==="bare"?e:m.jsx("div",{className:ra.content,children:e})})}aa.displayName=ia;const Eh=p.forwardRef(aa);function la(t){const{componentMap:e}=Oh();return e[t]}var ot=(t=>(t.FULLSCREEN_TOGGLE="fullscreen",t.BACK_BUTTON_CLICK="back_button",t.SEARCH="search",t.AUTOCOMPLETE_ITEM_SELECT="autocomplete_item_select",t.GEOLOCATION="geolocation",t.LOCATION_CARD_CLICK="location_card_click",t.LOCATION_CARD_PRIMARY_ACTION="location_card_primary_action",t.LOCATION_CARD_SECONDARY_ACTION="location_card_secondary_action",t.INFO_WINDOW_PRIMARY_ACTION="info_window_primary_action",t.INFO_WINDOW_SECONDARY_ACTION="info_window_secondary_action",t.CARD_LIST_TOGGLE="card_list_toggle",t.SHARE_SHEET_OPEN="share_sheet_open",t.SHARE_SHEET_CLOSE="share_sheet_close",t.SHARE_SHEET_SHARE="share_sheet_share",t.AREA_SEARCH_TOGGLE="area_search_toggle",t.AREA_SEARCH_SUBMIT="area_search_submit",t.AREA_SEARCH_CANCEL="area_search_cancel",t))(ot||{});const Po=[ot.LOCATION_CARD_PRIMARY_ACTION,ot.LOCATION_CARD_SECONDARY_ACTION,ot.AUTOCOMPLETE_ITEM_SELECT];class Ah{constructor(){hn(this,"config",{});hn(this,"isInitialized",!1);hn(this,"warnedEvents",new Set)}initialize(e={}){this.config=e,this.isInitialized=!0,Object.keys(e).forEach(n=>{var o;(o=e[n])!=null&&o.enabled&&!Po.includes(n)&&console.warn(`[TrackingService] Event "${n}" is configured but not yet implemented in the codebase.`)})}isEventEnabled(e){var n,o;return this.isInitialized?(!Po.includes(e)&&!this.warnedEvents.has(e)&&(console.warn(`[TrackingService] Event "${e}" is not yet implemented in the codebase.`),this.warnedEvents.add(e)),!!((n=this.config[e])!=null&&n.enabled)&&typeof((o=this.config[e])==null?void 0:o.tracker)=="function"):!1}track(e,n={}){if(!Po.includes(e)&&!this.warnedEvents.has(e)&&(console.warn(`[TrackingService] Event "${e}" is not yet implemented in the codebase.`),this.warnedEvents.add(e)),!this.isEventEnabled(e))return;const o={...n,timestamp:n.timestamp||Date.now()},{tracker:s}=this.config[e]??{};typeof s=="function"&&s(o)}isTrackerInitialized(){return this.isInitialized}reset(){this.config={},this.isInitialized=!1,this.warnedEvents.clear()}}const Mt=new Ah,ca="LocationCard";function ua({title:t,timestamp:e,address:n,capabilities:o,actions:s,className:r,id:i,coords:a,on_share:l,...c},u){const d=la("ctaButton"),f=M(b=>b.toggleShareSheet),h=M(b=>b.featureFlags);function y(){f(!0)}function g(b){if(Mt.isEventEnabled(ot.LOCATION_CARD_PRIMARY_ACTION))return()=>Mt.track(ot.LOCATION_CARD_PRIMARY_ACTION,{cta_event_type:b.type??"",cta_url:b.url??"",cta_label:b.label??""});if(Mt.isEventEnabled(ot.LOCATION_CARD_SECONDARY_ACTION))return()=>Mt.track(ot.LOCATION_CARD_SECONDARY_ACTION,{cta_event_type:b.type??"",cta_url:b.url??"",cta_label:b.label??""})}return m.jsx(Eh,{ref:u,variant:"bare",clickable:!0,className:F("dyn-locator__"+pt(ca),ht(r)),...c,style:{...c.style?c.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:m.jsxs("div",{className:mt.root,children:[m.jsxs("header",{className:mt.header,children:[e?m.jsx("time",{children:e}):null,m.jsxs("div",{className:mt.titleContainer,children:[t?m.jsx("h4",{children:t}):null,h.share?m.jsx(Pt,{className:mt.shareButton,variant:"bare",onClick:y,children:m.jsx(ct,{size:"M",icon:"Share"})}):null]}),n?m.jsx("address",{children:n}):null]}),o!=null&&o.length?m.jsx("div",{className:mt.body,children:o.map((b,v)=>m.jsxs("div",{className:mt.capabilities,children:[m.jsx("h5",{children:b.title}),m.jsx("ul",{className:mt.tagContainer,children:(b.capabilities??[]).map((S,x)=>m.jsx(wh,{as:"li",animationDelay:+`.${x+1}`,className:mt.tag,children:S.label},x))})]},v))}):null,s!=null&&s.length?m.jsx("div",{className:mt.cta,children:s.map((b,v)=>m.jsx(d,{animate:!1,fullWidth:!0,variant:v===0?"themed":"secondary",...Gi(b,g(b)),children:b.label},v))}):null]})})}ua.displayName=ca;const Ph=p.forwardRef(ua),da={root:"_root_o9d55_1",loader:"_loader_o9d55_73"},fa="Button";function ha({as:t,children:e,className:n,variant:o="default",size:s="medium",disabled:r=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:h,...y},g){const b=t||(u?"a":"button"),v=l?Ut[b]:b,S=Et(y)??[],x=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},T=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return m.jsx(v,{ref:g,className:F(da.root,"dyn-locator__"+pt(fa),ht(n),...S),"data-variant":o,"data-size":s,"data-full-width":a,disabled:r||i,...h?{style:h}:{},...x,...T,...y,children:i?m.jsxs("span",{style:{display:"flex",gap:10},children:[e,m.jsx("span",{className:da.loader,"aria-hidden":"true"})]}):e})}ha.displayName=fa;const De=p.forwardRef(ha),pa={locationCard:Ph,ctaButton:De},Mh={iconMap:Ji,componentMap:pa},Mo=p.createContext(Mh);function Lh({children:t,customIcons:e,customComponents:n}){const o={...Ji,...e??{}},s={...pa,...n??{}};return m.jsx(Mo.Provider,{value:{iconMap:o,componentMap:s},children:t})}function Dh(){const{iconMap:t}=p.useContext(Mo);return{iconMap:t}}function Oh(){const{componentMap:t}=p.useContext(Mo);return{componentMap:t}}var ae=(t=>(t.CLUSTERS="clusters",t.MARKERS="markers",t.FIND="find",t.ALL_MARKERS="allMarkers",t))(ae||{});const ma=p.createContext({endpointMap:{},apiUrl:""});function kh({children:t,endpoints:e,apiUrl:n}){var o;if(!n||!((o=Object.keys(e??{}))!=null&&o.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return m.jsx(ma.Provider,{value:{endpointMap:e,apiUrl:n},children:t})}function Nh(t){const{endpointMap:e,apiUrl:n}=p.useContext(ma);return{getEndpoint:(o={})=>{const s=e[t];if(!s)throw new Error(`Endpoint with id "${t}" not configured. Make sure to provide all required endpoints.`);let r="";return s.buildPath?r=s.buildPath(o):(r=s.path,Object.entries(o).forEach(([i,a])=>{r=r.replace(`:${i}`,String(a))})),{url:`${n}${r}`,method:s.method}}}}let Ih={data:""},Vh=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||Ih,Bh=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Fh=/\/\*[^]*?\*\/| +/g,ga=/\n+/g,Lt=(t,e)=>{let n="",o="",s="";for(let r in t){let i=t[r];r[0]=="@"?r[1]=="i"?n=r+" "+i+";":o+=r[1]=="f"?Lt(i,r):r+"{"+Lt(i,r[1]=="k"?"":e)+"}":typeof i=="object"?o+=Lt(i,e?e.replace(/([^,])+/g,a=>r.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):r):i!=null&&(r=/^--/.test(r)?r:r.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=Lt.p?Lt.p(r,i):r+":"+i+";")}return n+(e&&s?e+"{"+s+"}":s)+o},gt={},ya=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+ya(t[n]);return e}return t},$h=(t,e,n,o,s)=>{let r=ya(t),i=gt[r]||(gt[r]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(r));if(!gt[i]){let l=r!==t?t:(c=>{let u,d,f=[{}];for(;u=Bh.exec(c.replace(Fh,""));)u[4]?f.shift():u[3]?(d=u[3].replace(ga," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(ga," ").trim();return f[0]})(t);gt[i]=Lt(s?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&gt.g?gt.g:null;return n&&(gt.g=gt[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)})(gt[i],e,o,a),i},jh=(t,e,n)=>t.reduce((o,s,r)=>{let i=e[r];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?"":Lt(a,""):a===!1?"":a}return o+s+(i??"")},"");function on(t){let e=this||{},n=t.call?t(e.p):t;return $h(n.unshift?n.raw?jh(n,[].slice.call(arguments,1),e.p):n.reduce((o,s)=>Object.assign(o,s&&s.call?s(e.p):s),{}):n,Vh(e.target),e.g,e.o,e.k)}let va,Lo,Do;on.bind({g:1});let yt=on.bind({k:1});function zh(t,e,n,o){Lt.p=e,va=t,Lo=n,Do=o}function Dt(t,e){let n=this||{};return function(){let o=arguments;function s(r,i){let a=Object.assign({},r),l=a.className||s.className;n.p=Object.assign({theme:Lo&&Lo()},a),n.o=/ *go\d+/.test(l),a.className=on.apply(n,o)+(l?" "+l:"");let c=t;return t[0]&&(c=a.as||t,delete a.as),Do&&c[0]&&Do(a),va(c,a)}return e?e(s):s}}var Uh=t=>typeof t=="function",sn=(t,e)=>Uh(t)?t(e):t,Xh=(()=>{let t=0;return()=>(++t).toString()})(),ba=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),Gh=20,Sa=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,Gh)};case 1:return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case 2:let{toast:n}=e;return Sa(t,{type:t.toasts.find(r=>r.id===n.id)?1:0,toast:n});case 3:let{toastId:o}=e;return{...t,toasts:t.toasts.map(r=>r.id===o||o===void 0?{...r,dismissed:!0,visible:!1}:r)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let s=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(r=>({...r,pauseDuration:r.pauseDuration+s}))}}},rn=[],Xt={toasts:[],pausedAt:void 0},Gt=t=>{Xt=Sa(Xt,t),rn.forEach(e=>{e(Xt)})},Hh={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Rh=(t={})=>{let[e,n]=p.useState(Xt),o=p.useRef(Xt);p.useEffect(()=>(o.current!==Xt&&n(Xt),rn.push(n),()=>{let r=rn.indexOf(n);r>-1&&rn.splice(r,1)}),[]);let s=e.toasts.map(r=>{var i,a,l;return{...t,...t[r.type],...r,removeDelay:r.removeDelay||((i=t[r.type])==null?void 0:i.removeDelay)||(t==null?void 0:t.removeDelay),duration:r.duration||((a=t[r.type])==null?void 0:a.duration)||(t==null?void 0:t.duration)||Hh[r.type],style:{...t.style,...(l=t[r.type])==null?void 0:l.style,...r.style}}});return{...e,toasts:s}},Kh=(t,e="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Xh()}),Oe=t=>(e,n)=>{let o=Kh(e,t,n);return Gt({type:2,toast:o}),o.id},B=(t,e)=>Oe("blank")(t,e);B.error=Oe("error"),B.success=Oe("success"),B.loading=Oe("loading"),B.custom=Oe("custom"),B.dismiss=t=>{Gt({type:3,toastId:t})},B.remove=t=>Gt({type:4,toastId:t}),B.promise=(t,e,n)=>{let o=B.loading(e.loading,{...n,...n==null?void 0:n.loading});return typeof t=="function"&&(t=t()),t.then(s=>{let r=e.success?sn(e.success,s):void 0;return r?B.success(r,{id:o,...n,...n==null?void 0:n.success}):B.dismiss(o),s}).catch(s=>{let r=e.error?sn(e.error,s):void 0;r?B.error(r,{id:o,...n,...n==null?void 0:n.error}):B.dismiss(o)}),t};var Wh=(t,e)=>{Gt({type:1,toast:{id:t,height:e}})},qh=()=>{Gt({type:5,time:Date.now()})},ke=new Map,Yh=1e3,Zh=(t,e=Yh)=>{if(ke.has(t))return;let n=setTimeout(()=>{ke.delete(t),Gt({type:4,toastId:t})},e);ke.set(t,n)},Jh=t=>{let{toasts:e,pausedAt:n}=Rh(t);p.useEffect(()=>{if(n)return;let r=Date.now(),i=e.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(r-a.createdAt);if(l<0){a.visible&&B.dismiss(a.id);return}return setTimeout(()=>B.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[e,n]);let o=p.useCallback(()=>{n&&Gt({type:6,time:Date.now()})},[n]),s=p.useCallback((r,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=e.filter(h=>(h.position||c)===(r.position||c)&&h.height),d=u.findIndex(h=>h.id===r.id),f=u.filter((h,y)=>y<d&&h.visible).length;return u.filter(h=>h.visible).slice(...a?[f+1]:[0,f]).reduce((h,y)=>h+(y.height||0)+l,0)},[e]);return p.useEffect(()=>{e.forEach(r=>{if(r.dismissed)Zh(r.id,r.removeDelay);else{let i=ke.get(r.id);i&&(clearTimeout(i),ke.delete(r.id))}})},[e]),{toasts:e,handlers:{updateHeight:Wh,startPause:qh,endPause:o,calculateOffset:s}}},Qh=yt`
109
+ */const gs=Y("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ys=g.createContext({});function ic(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const In=typeof window<"u",ac=In?g.useLayoutEffect:g.useEffect,Vn=g.createContext(null),vs=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function lc(e=!0){const t=g.useContext(Vn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=g.useId();g.useEffect(()=>{if(e)return s(o)},[e]);const i=g.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}function Bn(e,t){e.indexOf(t)===-1&&e.push(t)}function Fn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ne=e=>e;let lt=ne,Te=ne;process.env.NODE_ENV!=="production"&&(lt=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Te=(e,t)=>{if(!e)throw new Error(t)});const cc={useManualTiming:!1};function $n(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 jn{constructor(){this.subscriptions=[]}add(t){return Bn(this.subscriptions,t),()=>Fn(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ue=e=>e*1e3,ge=e=>e/1e3;function bs(e,t){return t?e*(1e3/t):0}const Cs=new Set;function nn(e,t,n){e||Cs.has(t)||(console.warn(t),Cs.add(t))}const uc=$n(()=>window.ScrollTimeline!==void 0);class dc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(uc()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,o)=>{s&&s(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class fc extends dc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function zn(e,t){return e?e[t]||e.default||e:void 0}const Un=2e4;function Ss(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Un;)t+=n,r=e.next(t);return t>=Un?1/0:t}function Xn(e){return typeof e=="function"}function ws(e,t){e.timeline=t,e.onfinish=null}const Rn=e=>Array.isArray(e)&&typeof e[0]=="number",hc={linearEasing:void 0};function pc(e,t){const n=$n(e);return()=>{var r;return(r=hc[t])!==null&&r!==void 0?r:n()}}const rn=pc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),xs=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=e(ct(0,s-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function _s(e){return!!(typeof e=="function"&&rn()||!e||typeof e=="string"&&(e in qn||rn())||Rn(e)||Array.isArray(e)&&e.every(_s))}const _t=([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:_t([0,.65,.55,1]),circOut:_t([.55,0,1,.45]),backIn:_t([.31,.01,.66,-.59]),backOut:_t([.33,1.53,.69,.99])};function Es(e,t){if(e)return typeof e=="function"&&rn()?xs(e,t):Rn(e)?_t(e):Array.isArray(e)?e.map(n=>Es(n,t)||qn.easeOut):qn[e]}const sn=["read","resolveKeyframes","update","preRender","render","postRender"],Ts={value:null};function mc(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,p=!1)=>{const m=p&&s?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),t&&Ts.value&&Ts.value.frameloop[t].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(d))}};return u}const gc=40;function As(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=sn.reduce((b,C)=>(b[C]=mc(o,t?C:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,p=()=>{const b=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(b-s.timestamp,gc),1),s.timestamp=b,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(p))},h=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:sn.reduce((b,C)=>{const S=i[C];return b[C]=(x,w=!1,_=!1)=>(n||h(),S.schedule(x,w,_)),b},{}),cancel:b=>{for(let C=0;C<sn.length;C++)i[sn[C]].cancel(b)},state:s,steps:i}}const{schedule:I,cancel:Ae,state:H,steps:Gn}=As(typeof requestAnimationFrame<"u"?requestAnimationFrame:ne,!0),{schedule:Wn}=As(queueMicrotask,!1);let on;function yc(){on=void 0}const de={now:()=>(on===void 0&&de.set(H.isProcessing||cc.useManualTiming?H.timestamp:performance.now()),on),set:e=>{on=e,queueMicrotask(yc)}},ce={x:!1,y:!1};function Ms(){return ce.x||ce.y}function vc(e){return e==="x"||e==="y"?ce[e]?null:(ce[e]=!0,()=>{ce[e]=!1}):ce.x||ce.y?null:(ce.x=ce.y=!0,()=>{ce.x=ce.y=!1})}function bc(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const o=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function Ps(e,t){const n=bc(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Ls(e){return!(e.pointerType==="touch"||Ms())}function Cc(e,t,n={}){const[r,s,o]=Ps(e,n),i=a=>{if(!Ls(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Ls(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",i,s)}),o}function Os(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 ks=(e,t)=>t?e===t?!0:ks(e,t.parentElement):!1,Kn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Sc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function wc(e){return Sc.has(e.tagName)||e.tabIndex!==-1}const Et=new WeakSet;function Ds(e){return t=>{t.key==="Enter"&&e(t)}}function Hn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const xc=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ds(()=>{if(Et.has(n))return;Hn(n,"down");const s=Ds(()=>{Hn(n,"up")}),o=()=>Hn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ns(e){return Kn(e)&&!Ms()}function _c(e,t,n={}){const[r,s,o]=Ps(e,n),i=a=>{const l=a.currentTarget;if(!l||!Ns(a)||Et.has(l))return;Et.add(l),Os(a,"set");const c=t(l,a),u=(p,h)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Os(p,"release"),!(!Ns(p)||!Et.has(l))&&(Et.delete(l),typeof c=="function"&&c(p,{success:h}))},d=p=>{(p.isTrusted?Ec(p,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(p,!1):u(p,!(l instanceof Element)||ks(l,p.target))},f=p=>{u(p,!1)};l.addEventListener("pointerup",d,s),l.addEventListener("pointercancel",f,s),l.addEventListener("lostpointercapture",f,s)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!wc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,s),l&&a.addEventListener("focus",c=>xc(c,s),s)}),o}function Ec(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Is=30,Tc=e=>!isNaN(parseFloat(e));class Ac{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const o=de.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=de.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Tc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&nn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new jn);const r=this.events[t].add(n);return t==="change"?()=>{r(),I.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=de.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Is)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Is);return bs(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 Tt(e,t){return new Ac(e,t)}const Vs=g.createContext({strict:!1}),Bs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ut={};for(const e in Bs)ut[e]={isEnabled:t=>Bs[e].some(n=>!!t[n])};function Mc(e){for(const t in e)ut[t]={...ut[t],...e[t]}}const Pc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function an(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Pc.has(e)}let Fs=e=>!an(e);function Lc(e){e&&(Fs=t=>t.startsWith("on")?!an(t):e(t))}try{Lc(require("@emotion/is-prop-valid").default)}catch{}function Oc(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(Fs(s)||n===!0&&an(s)||!t&&!an(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function kc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&nn(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const ln=g.createContext({});function cn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function At(e){return typeof e=="string"||Array.isArray(e)}const Zn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yn=["initial",...Zn];function un(e){return cn(e.animate)||Yn.some(t=>At(e[t]))}function $s(e){return!!(un(e)||e.variants)}function Dc(e,t){if(un(e)){const{initial:n,animate:r}=e;return{initial:n===!1||At(n)?n:void 0,animate:At(r)?r:void 0}}return e.inherit!==!1?t:{}}function Nc(e){const{initial:t,animate:n}=Dc(e,g.useContext(ln));return g.useMemo(()=>({initial:t,animate:n}),[js(t),js(n)])}function js(e){return Array.isArray(e)?e.join(" "):e}const Ic=Symbol.for("motionComponentSymbol");function dt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Vc(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 Jn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),zs="data-"+Jn("framerAppearId"),Us=g.createContext({});function Bc(e,t,n,r,s){var o,i;const{visualElement:a}=g.useContext(ln),l=g.useContext(Vs),c=g.useContext(Vn),u=g.useContext(vs).reducedMotion,d=g.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,p=g.useContext(Us);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&Fc(d.current,n,s,p);const h=g.useRef(!1);g.useInsertionEffect(()=>{f&&h.current&&f.update(n,c)});const m=n[zs],v=g.useRef(!!m&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return ac(()=>{f&&(h.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Wn.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),v.current=!1))}),f}function Fc(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Xs(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&dt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Xs(e){if(e)return e.options.allowProjection!==!1?e.projection:Xs(e.parent)}function $c({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var o,i;e&&Mc(e);function a(c,u){let d;const f={...g.useContext(vs),...c,layoutId:jc(c)},{isStatic:p}=f,h=Nc(c),m=r(c,p);if(!p&&In){zc(f,e);const v=Uc(f);d=v.MeasureLayout,h.visualElement=Bc(s,m,f,t,v.ProjectionNode)}return y.jsxs(ln.Provider,{value:h,children:[d&&h.visualElement?y.jsx(d,{visualElement:h.visualElement,...f}):null,n(s,c,Vc(m,h.visualElement,u),m,p,h.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(i=(o=s.displayName)!==null&&o!==void 0?o:s.name)!==null&&i!==void 0?i:""})`}`;const l=g.forwardRef(a);return l[Ic]=s,l}function jc({layoutId:e}){const t=g.useContext(ys).id;return t&&e!==void 0?t+"-"+e:e}function zc(e,t){const n=g.useContext(Vs).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):Te(!1,r)}}function Uc(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 Rs=e=>t=>typeof t=="string"&&t.startsWith(e),Qn=Rs("--"),Xc=Rs("var(--"),er=e=>Xc(e)?Rc.test(e.split("/*")[0].trim()):!1,Rc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Mt={};function qc(e){for(const t in e)Mt[t]=e[t],Qn(t)&&(Mt[t].isCSSVariable=!0)}const ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Re=new Set(ft);function qs(e,{layout:t,layoutId:n}){return Re.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Mt[e]||e==="opacity")}const J=e=>!!(e&&e.getVelocity),Gs=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ye=(e,t,n)=>n>t?t:n<e?e:n,ht={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Pt={...ht,transform:e=>ye(0,1,e)},dn={...ht,default:1},Lt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Me=Lt("deg"),fe=Lt("%"),L=Lt("px"),Gc=Lt("vh"),Wc=Lt("vw"),Ws={...fe,parse:e=>fe.parse(e)/100,transform:e=>fe.transform(e*100)},Kc={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,backgroundPositionX:L,backgroundPositionY:L},Hc={rotate:Me,rotateX:Me,rotateY:Me,rotateZ:Me,scale:dn,scaleX:dn,scaleY:dn,scaleZ:dn,skew:Me,skewX:Me,skewY:Me,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:Pt,originX:Ws,originY:Ws,originZ:L},Ks={...ht,transform:Math.round},tr={...Kc,...Hc,zIndex:Ks,size:L,fillOpacity:Pt,strokeOpacity:Pt,numOctaves:Ks},Zc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yc=ft.length;function Jc(e,t,n){let r="",s=!0;for(let o=0;o<Yc;o++){const i=ft[o],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Gs(a,tr[i]);if(!l){s=!1;const u=Zc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function nr(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Re.has(l)){i=!0;continue}else if(Qn(l)){s[l]=c;continue}else{const u=Gs(c,tr[l]);l.startsWith("origin")?(a=!0,o[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=Jc(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;r.transformOrigin=`${l} ${c} ${u}`}}const rr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Hs(e,t,n){for(const r in t)!J(t[r])&&!qs(r,n)&&(e[r]=t[r])}function Qc({transformTemplate:e},t){return g.useMemo(()=>{const n=rr();return nr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function eu(e,t){const n=e.style||{},r={};return Hs(r,n,e),Object.assign(r,Qc(e,t)),r}function tu(e,t){const n={},r=eu(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 nu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function sr(e){return typeof e!="string"||e.includes("-")?!1:!!(nu.indexOf(e)>-1||/[A-Z]/u.test(e))}const ru={offset:"stroke-dashoffset",array:"stroke-dasharray"},su={offset:"strokeDashoffset",array:"strokeDasharray"};function ou(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?ru:su;e[o.offset]=L.transform(-r);const i=L.transform(t),a=L.transform(n);e[o.array]=`${i} ${a}`}function Zs(e,t,n){return typeof e=="string"?e:L.transform(t+n*e)}function iu(e,t,n){const r=Zs(t,e.x,e.width),s=Zs(n,e.y,e.height);return`${r} ${s}`}function or(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(nr(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(s!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=iu(h,s!==void 0?s:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&ou(f,i,a,l,!1)}const Ys=()=>({...rr(),attrs:{}}),ir=e=>typeof e=="string"&&e.toLowerCase()==="svg";function au(e,t,n,r){const s=g.useMemo(()=>{const o=Ys();return or(o,t,ir(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Hs(o,e.style,e),s.style={...o,...s.style}}return s}function lu(e=!1){return(n,r,s,{latestValues:o},i)=>{const l=(sr(n)?au:tu)(r,o,i,n),c=Oc(r,typeof n=="string",e),u=n!==g.Fragment?{...c,...l,ref:s}:{},{children:d}=r,f=g.useMemo(()=>J(d)?d.get():d,[d]);return g.createElement(n,{...u,children:f})}}function Js(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ar(e,t,n,r){if(typeof t=="function"){const[s,o]=Js(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Js(r);t=t(n!==void 0?n:e.custom,s,o)}return t}const lr=e=>Array.isArray(e),cu=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),uu=e=>lr(e)?e[e.length-1]||0:e;function fn(e){const t=J(e)?e.get():e;return cu(t)?t.toValue():t}function du({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,o){const i={latestValues:fu(r,s,o,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const Qs=e=>(t,n)=>{const r=g.useContext(ln),s=g.useContext(Vn),o=()=>du(e,t,r,s);return n?o():ic(o)};function fu(e,t,n,r){const s={},o=r(e,{});for(const f in o)s[f]=fn(o[f]);let{initial:i,animate:a}=e;const l=un(e),c=$s(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!cn(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const h=ar(e,f[p]);if(h){const{transitionEnd:m,transition:v,...b}=h;for(const C in b){let S=b[C];if(Array.isArray(S)){const x=u?S.length-1:0;S=S[x]}S!==null&&(s[C]=S)}for(const C in m)s[C]=m[C]}}}return s}function cr(e,t,n){var r;const{style:s}=e,o={};for(const i in s)(J(s[i])||t.style&&J(t.style[i])||qs(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[i]=s[i]);return o}const hu={useVisualState:Qs({scrapeMotionValuesFromProps:cr,createRenderState:rr})};function eo(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 to(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const no=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 ro(e,t,n,r){to(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(no.has(s)?s:Jn(s),t.attrs[s])}function so(e,t,n){const r=cr(e,t,n);for(const s in e)if(J(e[s])||J(t[s])){const o=ft.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const oo=["x","y","width","height","cx","cy","r"],pu={useVisualState:Qs({scrapeMotionValuesFromProps:so,createRenderState:Ys,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let o=!!e.drag;if(!o){for(const a in s)if(Re.has(a)){o=!0;break}}if(!o)return;let i=!t;if(t)for(let a=0;a<oo.length;a++){const l=oo[a];e[l]!==t[l]&&(i=!0)}i&&I.read(()=>{eo(n,r),I.render(()=>{or(r,s,ir(n.tagName),e.transformTemplate),ro(n,r)})})}})};function mu(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const i={...sr(r)?pu:hu,preloadedFeatures:e,useRender:lu(s),createVisualElement:t,Component:r};return $c(i)}}function Ot(e,t,n){const r=e.getProps();return ar(r,t,n!==void 0?n:r.custom,e)}const io=new Set(["width","height","top","left","right","bottom",...ft]);function gu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Tt(n))}function yu(e,t){const n=Ot(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=uu(o[i]);gu(e,i,a)}}function vu(e){return!!(J(e)&&e.add)}function ur(e,t){const n=e.getValue("willChange");if(vu(n))return n.add(t)}function ao(e){return e.props[zs]}const lo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,bu=1e-7,Cu=12;function Su(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=lo(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>bu&&++a<Cu);return i}function kt(e,t,n,r){if(e===t&&n===r)return ne;const s=o=>Su(o,0,1,e,n);return o=>o===0||o===1?o:lo(s(o),t,r)}const co=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uo=e=>t=>1-e(1-t),fo=kt(.33,1.53,.69,.99),dr=uo(fo),ho=co(dr),po=e=>(e*=2)<1?.5*dr(e):.5*(2-Math.pow(2,-10*(e-1))),fr=e=>1-Math.sin(Math.acos(e)),mo=uo(fr),go=co(fr),yo=e=>/^0[^.\s]+$/u.test(e);function wu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||yo(e):!0}const Dt=e=>Math.round(e*1e5)/1e5,hr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xu(e){return e==null}const _u=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,pr=(e,t)=>n=>!!(typeof n=="string"&&_u.test(n)&&n.startsWith(e)||t&&!xu(n)&&Object.prototype.hasOwnProperty.call(n,t)),vo=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(hr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Eu=e=>ye(0,255,e),mr={...ht,transform:e=>Math.round(Eu(e))},qe={test:pr("rgb","red"),parse:vo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+mr.transform(e)+", "+mr.transform(t)+", "+mr.transform(n)+", "+Dt(Pt.transform(r))+")"};function Tu(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const gr={test:pr("#"),parse:Tu,transform:qe.transform},pt={test:pr("hsl","hue"),parse:vo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fe.transform(Dt(t))+", "+fe.transform(Dt(n))+", "+Dt(Pt.transform(r))+")"},Q={test:e=>qe.test(e)||gr.test(e)||pt.test(e),parse:e=>qe.test(e)?qe.parse(e):pt.test(e)?pt.parse(e):gr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qe.transform(e):pt.transform(e)},Au=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Mu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(hr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Au))===null||n===void 0?void 0:n.length)||0)>0}const bo="number",Co="color",Pu="var",Lu="var(",So="${}",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 Nt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Ou,l=>(Q.test(l)?(r.color.push(o),s.push(Co),n.push(Q.parse(l))):l.startsWith(Lu)?(r.var.push(o),s.push(Pu),n.push(l)):(r.number.push(o),s.push(bo),n.push(parseFloat(l))),++o,So)).split(So);return{values:n,split:a,indexes:r,types:s}}function wo(e){return Nt(e).values}function xo(e){const{split:t,types:n}=Nt(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const a=n[i];a===bo?o+=Dt(s[i]):a===Co?o+=Q.transform(s[i]):o+=s[i]}return o}}const ku=e=>typeof e=="number"?0:e;function Du(e){const t=wo(e);return xo(e)(t.map(ku))}const Pe={test:Mu,parse:wo,createTransformer:xo,getAnimatableNone:Du},Nu=new Set(["brightness","contrast","saturate","opacity"]);function Iu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(hr)||[];if(!r)return e;const s=n.replace(r,"");let o=Nu.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const Vu=/\b([a-z-]*)\(.*?\)/gu,yr={...Pe,getAnimatableNone:e=>{const t=e.match(Vu);return t?t.map(Iu).join(" "):e}},Bu={...tr,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:yr,WebkitFilter:yr},_o=e=>Bu[e];function Eo(e,t){let n=_o(e);return n!==yr&&(n=Pe),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Fu=new Set(["auto","none","0"]);function $u(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!Fu.has(o)&&Nt(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Eo(n,s)}const Ge=e=>e*180/Math.PI,vr=e=>{const t=Ge(Math.atan2(e[1],e[0]));return br(t)},ju={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:vr,rotateZ:vr,skewX:e=>Ge(Math.atan(e[1])),skewY:e=>Ge(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},br=e=>(e=e%360,e<0&&(e+=360),e),To=vr,Ao=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Mo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ao,scaleY:Mo,scale:e=>(Ao(e)+Mo(e))/2,rotateX:e=>br(Ge(Math.atan2(e[6],e[5]))),rotateY:e=>br(Ge(Math.atan2(-e[2],e[0]))),rotateZ:To,rotate:To,skewX:e=>Ge(Math.atan(e[4])),skewY:e=>Ge(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Po(e){return e.includes("scale")?1:0}function Cr(e,t){if(!e||e==="none")return Po(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=zu,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ju,s=a}if(!s)return Po(t);const o=r[t],i=s[1].split(",").map(Xu);return typeof o=="function"?o(i):i[o]}const Uu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Cr(n,t)};function Xu(e){return parseFloat(e.trim())}const Lo=e=>e===ht||e===L,Ru=new Set(["x","y","z"]),qu=ft.filter(e=>!Ru.has(e));function Gu(e){const t=[];return qu.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})=>Cr(t,"x"),y:(e,{transform:t})=>Cr(t,"y")};mt.translateX=mt.x,mt.translateY=mt.y;const We=new Set;let Sr=!1,wr=!1;function Oo(){if(wr){const e=Array.from(We).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Gu(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var a;(a=r.getValue(o))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}wr=!1,Sr=!1,We.forEach(e=>e.complete()),We.clear()}function ko(){We.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wr=!0)})}function Wu(){ko(),Oo()}class xr{constructor(t,n,r,s,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(We.add(this),Sr||(Sr=!0,I.read(ko),I.resolveKeyframes(Oo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const i=s==null?void 0:s.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&i===void 0&&s.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),We.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,We.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Do=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Ku=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hu(e){const t=Ku.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Zu=4;function No(e,t,n=1){Te(n<=Zu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=Hu(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return Do(i)?parseFloat(i):i}return er(s)?No(s,t,n+1):s}const Io=e=>t=>t.test(e),Vo=[ht,L,fe,Me,Wc,Gc,{test:e=>e==="auto",parse:e=>e}],Bo=e=>Vo.find(Io(e));class Fo extends xr{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),er(c))){const u=No(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!io.has(r)||t.length!==2)return;const[s,o]=t,i=Bo(s),a=Bo(o);if(i!==a)if(Lo(i)&&Lo(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)wu(t[s])&&r.push(s);r.length&&$u(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=mt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const i=s.length-1,a=s[i];s[i]=mt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const $o=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Pe.test(e)||e==="0")&&!e.startsWith("url("));function Yu(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 Ju(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=$o(s,t),a=$o(o,t);return lt(i===a,`You are trying to animate ${t} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!i||!a?!1:Yu(e)||(n==="spring"||Xn(n))&&r}const Qu=e=>e!==null;function hn(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Qu),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const ed=40;class jo{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=de.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>ed?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Wu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=de.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:o,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Ju(t,r,s,o))if(i)this.options.duration=0;else{l&&l(hn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const j=(e,t,n)=>e+(t-e)*n;function _r(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 td({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=_r(l,a,e+1/3),o=_r(l,a,e),i=_r(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function pn(e,t){return n=>n>0?t:e}const Er=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},nd=[gr,qe,pt],rd=e=>nd.find(t=>t.test(e));function zo(e){const t=rd(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=td(n)),n}const Uo=(e,t)=>{const n=zo(e),r=zo(t);if(!n||!r)return pn(e,t);const s={...n};return o=>(s.red=Er(n.red,r.red,o),s.green=Er(n.green,r.green,o),s.blue=Er(n.blue,r.blue,o),s.alpha=j(n.alpha,r.alpha,o),qe.transform(s))},sd=(e,t)=>n=>t(e(n)),It=(...e)=>e.reduce(sd),Tr=new Set(["none","hidden"]);function od(e,t){return Tr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function id(e,t){return n=>j(e,t,n)}function Ar(e){return typeof e=="number"?id:typeof e=="string"?er(e)?pn:Q.test(e)?Uo:cd:Array.isArray(e)?Xo:typeof e=="object"?Q.test(e)?Uo:ad:pn}function Xo(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>Ar(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function ad(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Ar(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function ld(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][s[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[o]=l,s[i]++}return r}const cd=(e,t)=>{const n=Pe.createTransformer(t),r=Nt(e),s=Nt(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Tr.has(e)&&!s.values.length||Tr.has(t)&&!r.values.length?od(e,t):It(Xo(ld(r,s),s.values),n):(lt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),pn(e,t))};function Ro(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?j(e,t,n):Ar(e)(e,t)}const ud=5;function qo(e,t,n){const r=Math.max(t-ud,0);return bs(n-e(r),t-r)}const z={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},Go=.001;function dd({duration:e=z.duration,bounce:t=z.bounce,velocity:n=z.velocity,mass:r=z.mass}){let s,o;lt(e<=ue(z.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=ye(z.minDamping,z.maxDamping,i),e=ye(z.minDuration,z.maxDuration,ge(e)),i<1?(s=c=>{const u=c*i,d=u*e,f=u-n,p=Mr(c,i),h=Math.exp(-d);return Go-f/p*h},o=c=>{const d=c*i*e,f=d*n+n,p=Math.pow(i,2)*Math.pow(c,2)*e,h=Math.exp(-d),m=Mr(Math.pow(c,2),i);return(-s(c)+Go>0?-1:1)*((f-p)*h)/m}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=hd(s,o,a);if(e=ue(e),isNaN(l))return{stiffness:z.stiffness,damping:z.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const fd=12;function hd(e,t,n){let r=n;for(let s=1;s<fd;s++)r=r-e(r)/t(r);return r}function Mr(e,t){return e*Math.sqrt(1-t*t)}const pd=["duration","bounce"],md=["stiffness","damping","mass"];function Wo(e,t){return t.some(n=>e[n]!==void 0)}function gd(e){let t={velocity:z.velocity,stiffness:z.stiffness,damping:z.damping,mass:z.mass,isResolvedFromDuration:!1,...e};if(!Wo(e,md)&&Wo(e,pd))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*ye(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:z.mass,stiffness:s,damping:o}}else{const n=dd(e);t={...t,...n,mass:z.mass},t.isResolvedFromDuration=!0}return t}function Ko(e=z.visualDuration,t=z.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=gd({...n,velocity:-ge(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),v=i-o,b=ge(Math.sqrt(l/u)),C=Math.abs(v)<5;r||(r=C?z.restSpeed.granular:z.restSpeed.default),s||(s=C?z.restDelta.granular:z.restDelta.default);let S;if(m<1){const w=Mr(b,m);S=_=>{const P=Math.exp(-m*b*_);return i-P*((h+m*b*v)/w*Math.sin(w*_)+v*Math.cos(w*_))}}else if(m===1)S=w=>i-Math.exp(-b*w)*(v+(h+b*v)*w);else{const w=b*Math.sqrt(m*m-1);S=_=>{const P=Math.exp(-m*b*_),T=Math.min(w*_,300);return i-P*((h+m*b*v)*Math.sinh(T)+w*v*Math.cosh(T))/w}}const x={calculatedDuration:p&&d||null,next:w=>{const _=S(w);if(p)a.done=w>=d;else{let P=0;m<1&&(P=w===0?ue(h):qo(S,w,_));const T=Math.abs(P)<=r,N=Math.abs(i-_)<=s;a.done=T&&N}return a.value=a.done?i:_,a},toString:()=>{const w=Math.min(Ss(x),Un),_=xs(P=>x.next(w*P).value,w,30);return w+"ms "+_}};return x}function Ho({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=T=>a!==void 0&&T<a||l!==void 0&&T>l,h=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*t;const v=d+m,b=i===void 0?v:i(v);b!==v&&(m=b-d);const C=T=>-m*Math.exp(-T/r),S=T=>b+C(T),x=T=>{const N=C(T),k=S(T);f.done=Math.abs(N)<=c,f.value=f.done?b:k};let w,_;const P=T=>{p(f.value)&&(w=T,_=Ko({keyframes:[f.value,h(f.value)],velocity:qo(S,T,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:T=>{let N=!1;return!_&&w===void 0&&(N=!0,x(T),P(T)),w!==void 0&&T>=w?_.next(T-w):(!N&&x(T),f)}}}const yd=kt(.42,0,1,1),vd=kt(0,0,.58,1),Zo=kt(.42,0,.58,1),bd=e=>Array.isArray(e)&&typeof e[0]!="number",Yo={linear:ne,easeIn:yd,easeInOut:Zo,easeOut:vd,circIn:fr,circInOut:go,circOut:mo,backIn:dr,backInOut:ho,backOut:fo,anticipate:po},Jo=e=>{if(Rn(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return kt(t,n,r,s)}else if(typeof e=="string")return Te(Yo[e]!==void 0,`Invalid easing type '${e}'`),Yo[e];return e};function Cd(e,t,n){const r=[],s=n||Ro,o=e.length-1;for(let i=0;i<o;i++){let a=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||ne:t;a=It(l,a)}r.push(a)}return r}function Sd(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Te(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Cd(t,r,s),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ct(e[d],e[d+1],u);return a[d](f)};return n?u=>c(ye(e[0],e[o-1],u)):c}function wd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ct(0,t,r);e.push(j(n,1,s))}}function xd(e){const t=[0];return wd(t,e.length-1),t}function _d(e,t){return e.map(n=>n*t)}function Ed(e,t){return e.map(()=>t||Zo).splice(0,e.length-1)}function Vt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=bd(r)?r.map(Jo):Jo(r),o={done:!1,value:t[0]},i=_d(n&&n.length===t.length?n:xd(t),e),a=Sd(i,t,{ease:Array.isArray(s)?s:Ed(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const Td=e=>{const t=({timestamp:n})=>e(n);return{start:()=>I.update(t,!0),stop:()=>Ae(t),now:()=>H.isProcessing?H.timestamp:de.now()}},Ad={decay:Ho,inertia:Ho,tween:Vt,keyframes:Vt,spring:Ko},Md=e=>e/100;class Pr extends jo{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:o}=this.options,i=(s==null?void 0:s.KeyframeResolver)||xr,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(o,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=this.options,a=Xn(n)?n:Ad[n]||Vt;let l,c;process.env.NODE_ENV!=="production"&&a!==Vt&&Te(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Vt&&typeof t[0]!="number"&&(l=It(Md,Ro(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});o==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Ss(u));const{calculatedDuration:d}=u,f=d+s,p=f*(r+1)-s;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:s,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:p,repeatType:h,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-f*(this.speed>=0?1:-1),C=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let S=this.currentTime,x=o;if(p){const T=Math.min(this.currentTime,u)/d;let N=Math.floor(T),k=T%1;!k&&T>=1&&(k=1),k===1&&N--,N=Math.min(N,p+1),!!(N%2)&&(h==="reverse"?(k=1-k,m&&(k-=m/d)):h==="mirror"&&(x=i)),S=ye(0,1,k)*d}const w=C?{done:!1,value:l[0]}:x.next(S);a&&(w.value=a(w.value));let{done:_}=w;!C&&c!==null&&(_=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return P&&s!==void 0&&(w.value=hn(l,this.options,s)),v&&v(w.value),P&&this.finish(),w}get duration(){const{resolved:t}=this;return t?ge(t.calculatedDuration):0}get time(){return ge(this.currentTime)}set time(t){t=ue(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=ge(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Td,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Pd=new Set(["opacity","clipPath","filter","transform"]);function Ld(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Es(a,s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"})}const Od=$n(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),mn=10,kd=2e4;function Dd(e){return Xn(e.type)||e.type==="spring"||!_s(e.ease)}function Nd(e,t){const n=new Pr({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let o=0;for(;!r.done&&o<kd;)r=n.sample(o),s.push(r.value),o+=mn;return{times:void 0,keyframes:s,duration:o-mn,ease:"linear"}}const Qo={anticipate:po,backInOut:ho,circInOut:go};function Id(e){return e in Qo}class ei extends jo{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:o}=this.options;this.resolver=new Fo(o,(i,a)=>this.onKeyframesResolved(i,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:o,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&rn()&&Id(o)&&(o=Qo[o]),Dd(this.options)){const{onComplete:d,onUpdate:f,motionValue:p,element:h,...m}=this.options,v=Nd(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,s=v.times,o=v.ease,i="keyframes"}const u=Ld(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:o});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(ws(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(hn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:i,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ge(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ge(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ue(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 ne;const{animation:r}=n;ws(r,t)}return ne}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:o,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...p}=this.options,h=new Pr({...p,keyframes:r,duration:s,type:o,ease:i,times:a,isGenerator:!0}),m=ue(this.time);c.setWithVelocity(h.sample(m-mn).value,h.sample(m).value,mn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:o,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Od()&&r&&Pd.has(r)&&!l&&!c&&!s&&o!=="mirror"&&i!==0&&a!=="inertia"}}const Vd={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},jd=(e,{keyframes:t})=>t.length>2?Fd:Re.has(e)?e.startsWith("scale")?Bd(t[1]):Vd:$d;function zd({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Lr=(e,t,n,r={},s,o)=>i=>{const a=zn(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-ue(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};zd(a)||(u={...u,...jd(e,u)}),u.duration&&(u.duration=ue(u.duration)),u.repeatDelay&&(u.repeatDelay=ue(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=hn(u.keyframes,a);if(f!==void 0)return I.update(()=>{u.onUpdate(f),u.onComplete()}),new fc([])}return!o&&ei.supports(u)?new ei(u):new Pr(u)};function Ud({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ti(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var o;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const d in l){const f=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),p=l[d];if(p===void 0||u&&Ud(u,d))continue;const h={delay:n,...zn(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=ao(e);if(b){const C=window.MotionHandoffAnimation(b,d,I);C!==null&&(h.startTime=C,m=!0)}}ur(e,d),f.start(Lr(d,f,p,e.shouldReduceMotion&&io.has(d)?{type:!1}:h,e,m));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{I.update(()=>{a&&yu(e,a)})}),c}function Or(e,t,n={}){var r;const s=Ot(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const i=s?()=>Promise.all(ti(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=o;return Xd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Xd(e,t,n=0,r=0,s=1,o){const i=[],a=(e.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(Rd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Or(c,t,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Rd(e,t){return e.sortNodePosition(t)}function qd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Or(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Or(e,t,n);else{const s=typeof t=="function"?Ot(e,t,n.custom):t;r=Promise.all(ti(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function ni(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 Gd=Yn.length;function ri(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ri(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Gd;n++){const r=Yn[n],s=e.props[r];(At(s)||s===!1)&&(t[r]=s)}return t}const Wd=[...Zn].reverse(),Kd=Zn.length;function Hd(e){return t=>Promise.all(t.map(({animation:n,options:r})=>qd(e,n,r)))}function Zd(e){let t=Hd(e),n=si(),r=!0;const s=l=>(c,u)=>{var d;const f=Ot(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:h,...m}=f;c={...c,...m,...h}}return c};function o(l){t=l(e)}function i(l){const{props:c}=e,u=ri(e.parent)||{},d=[],f=new Set;let p={},h=1/0;for(let v=0;v<Kd;v++){const b=Wd[v],C=n[b],S=c[b]!==void 0?c[b]:u[b],x=At(S),w=b===l?C.isActive:null;w===!1&&(h=v);let _=S===u[b]&&S!==c[b]&&x;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),C.protectedKeys={...p},!C.isActive&&w===null||!S&&!C.prevProp||cn(S)||typeof S=="boolean")continue;const P=Yd(C.prevProp,S);let T=P||b===l&&C.isActive&&!_&&x||v>h&&x,N=!1;const k=Array.isArray(S)?S:[S];let X=k.reduce(s(b),{});w===!1&&(X={});const{prevResolvedValues:te={}}=C,ot={...te,...X},Ue=O=>{T=!0,f.has(O)&&(N=!0,f.delete(O)),C.needsAnimating[O]=!0;const D=e.getValue(O);D&&(D.liveStyle=!1)};for(const O in ot){const D=X[O],V=te[O];if(p.hasOwnProperty(O))continue;let Z=!1;lr(D)&&lr(V)?Z=!ni(D,V):Z=D!==V,Z?D!=null?Ue(O):f.add(O):D!==void 0&&f.has(O)?Ue(O):C.protectedKeys[O]=!0}C.prevProp=S,C.prevResolvedValues=X,C.isActive&&(p={...p,...X}),r&&e.blockInitialAnimation&&(T=!1),T&&(!(_&&P)||N)&&d.push(...k.map(O=>({animation:O,options:{type:b}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const b=Ot(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(v.transition=b.transition)}f.forEach(b=>{const C=e.getBaseTarget(b),S=e.getValue(b);S&&(S.liveStyle=!0),v[b]=C??null}),d.push({animation:v})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=si(),r=!0}}}function Yd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ni(t,e):!1}function Ke(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function si(){return{animate:Ke(!0),whileInView:Ke(),whileHover:Ke(),whileTap:Ke(),whileDrag:Ke(),whileFocus:Ke(),exit:Ke()}}class Le{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Jd extends Le{constructor(t){super(t),t.animationState||(t.animationState=Zd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();cn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Qd=0;class ef extends Le{constructor(){super(...arguments),this.id=Qd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const tf={animation:{Feature:Jd},exit:{Feature:ef}};function Bt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ft(e){return{point:{x:e.pageX,y:e.pageY}}}const nf=e=>t=>Kn(t)&&e(t,Ft(t));function $t(e,t,n,r){return Bt(e,t,nf(n),r)}function oi({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function rf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function sf(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 ii=1e-4,of=1-ii,af=1+ii,ai=.01,lf=0-ai,cf=0+ai;function ee(e){return e.max-e.min}function uf(e,t,n){return Math.abs(e-t)<=n}function li(e,t,n,r=.5){e.origin=r,e.originPoint=j(t.min,t.max,e.origin),e.scale=ee(n)/ee(t),e.translate=j(n.min,n.max,e.origin)-e.originPoint,(e.scale>=of&&e.scale<=af||isNaN(e.scale))&&(e.scale=1),(e.translate>=lf&&e.translate<=cf||isNaN(e.translate))&&(e.translate=0)}function jt(e,t,n,r){li(e.x,t.x,n.x,r?r.originX:void 0),li(e.y,t.y,n.y,r?r.originY:void 0)}function ci(e,t,n){e.min=n.min+t.min,e.max=e.min+ee(t)}function df(e,t,n){ci(e.x,t.x,n.x),ci(e.y,t.y,n.y)}function ui(e,t,n){e.min=t.min-n.min,e.max=e.min+ee(t)}function zt(e,t,n){ui(e.x,t.x,n.x),ui(e.y,t.y,n.y)}const di=()=>({translate:0,scale:1,origin:0,originPoint:0}),gt=()=>({x:di(),y:di()}),fi=()=>({min:0,max:0}),U=()=>({x:fi(),y:fi()});function ie(e){return[e("x"),e("y")]}function kr(e){return e===void 0||e===1}function Dr({scale:e,scaleX:t,scaleY:n}){return!kr(e)||!kr(t)||!kr(n)}function He(e){return Dr(e)||hi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function hi(e){return pi(e.x)||pi(e.y)}function pi(e){return e&&e!=="0%"}function gn(e,t,n){const r=e-n,s=t*r;return n+s}function mi(e,t,n,r,s){return s!==void 0&&(e=gn(e,s,r)),gn(e,n,r)+t}function Nr(e,t=0,n=1,r,s){e.min=mi(e.min,t,n,r,s),e.max=mi(e.max,t,n,r,s)}function gi(e,{x:t,y:n}){Nr(e.x,t.translate,t.scale,t.originPoint),Nr(e.y,n.translate,n.scale,n.originPoint)}const yi=.999999999999,vi=1.0000000000001;function ff(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,i;for(let a=0;a<s;a++){o=n[a],i=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&vt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,gi(e,i)),r&&He(o.latestValues)&&vt(e,o.latestValues))}t.x<vi&&t.x>yi&&(t.x=1),t.y<vi&&t.y>yi&&(t.y=1)}function yt(e,t){e.min=e.min+t,e.max=e.max+t}function bi(e,t,n,r,s=.5){const o=j(e.min,e.max,s);Nr(e,t,n,o,r)}function vt(e,t){bi(e.x,t.x,t.scaleX,t.scale,t.originX),bi(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ci(e,t){return oi(sf(e.getBoundingClientRect(),t))}function hf(e,t,n){const r=Ci(e,n),{scroll:s}=t;return s&&(yt(r.x,s.offset.x),yt(r.y,s.offset.y)),r}const Si=({current:e})=>e?e.ownerDocument.defaultView:null,wi=(e,t)=>Math.abs(e-t);function pf(e,t){const n=wi(e.x,t.x),r=wi(e.y,t.y);return Math.sqrt(n**2+r**2)}class xi{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Vr(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=pf(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:h}=d,{timestamp:m}=H;this.history.push({...h,timestamp:m});const{onStart:v,onMove:b}=this.handlers;f||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Ir(f,this.transformPagePoint),I.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:h,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Vr(d.type==="pointercancel"?this.lastMoveEventInfo:Ir(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,v),h&&h(d,v)},!Kn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const i=Ft(t),a=Ir(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=H;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Vr(a,this.history)),this.removeListeners=It($t(this.contextWindow,"pointermove",this.handlePointerMove),$t(this.contextWindow,"pointerup",this.handlePointerUp),$t(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ae(this.updatePoint)}}function Ir(e,t){return t?{point:t(e.point)}:e}function _i(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vr({point:e},t){return{point:e,delta:_i(e,Ei(t)),offset:_i(e,mf(t)),velocity:gf(t,.1)}}function mf(e){return e[0]}function Ei(e){return e[e.length-1]}function gf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Ei(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>ue(t)));)n--;if(!r)return{x:0,y:0};const o=ge(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const i={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function yf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?j(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?j(n,e,r.max):Math.min(e,n)),e}function Ti(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 vf(e,{top:t,left:n,bottom:r,right:s}){return{x:Ti(e.x,n,s),y:Ti(e.y,t,r)}}function Ai(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 bf(e,t){return{x:Ai(e.x,t.x),y:Ai(e.y,t.y)}}function Cf(e,t){let n=.5;const r=ee(e),s=ee(t);return s>r?n=ct(t.min,t.max-r,e.min):r>s&&(n=ct(e.min,e.max-s,t.min)),ye(0,1,n)}function Sf(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 wf(e=Br){return e===!1?e=0:e===!0&&(e=Br),{x:Mi(e,"left","right"),y:Mi(e,"top","bottom")}}function Mi(e,t,n){return{min:Pi(e,t),max:Pi(e,n)}}function Pi(e,t){return typeof e=="number"?e:e[t]||0}const xf=new WeakMap;class _f{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=U(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ft(u).point)},o=(u,d)=>{const{drag:f,dragPropagation:p,onDragStart:h}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=vc(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),ie(v=>{let b=this.getAxisMotionValue(v).get()||0;if(fe.test(b)){const{projection:C}=this.visualElement;if(C&&C.layout){const S=C.layout.layoutBox[v];S&&(b=ee(S)*(parseFloat(b)/100))}}this.originPoint[v]=b}),h&&I.postRender(()=>h(u,d)),ur(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:h,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=d;if(p&&this.currentDirection===null){this.currentDirection=Ef(v),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>ie(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 xi(t,{onSessionStart:s,onStart:o,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Si(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&I.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!yn(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=yf(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&dt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=vf(s.layoutBox,n):this.constraints=!1,this.elastic=wf(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&ie(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Sf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dt(t))return!1;const r=t.current;Te(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=hf(r,s.root,this.visualElement.getTransformPagePoint());let i=bf(s.layout.layoutBox,o);if(n){const a=n(rf(i));this.hasMutatedConstraints=!!a,a&&(i=oi(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ie(u=>{if(!yn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,h={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,h)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ur(this.visualElement,t),r.start(Lr(t,r,0,n,this.visualElement,!1))}stopAnimation(){ie(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ie(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ie(n=>{const{drag:r}=this.getProps();if(!yn(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:a}=s.layout.layoutBox[n];o.set(t[n]-j(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dt(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ie(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();s[i]=Cf({min:l,max:l},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ie(i=>{if(!yn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(j(l,c,s[i]))})}addListeners(){if(!this.visualElement.current)return;xf.set(this.visualElement,this);const t=this.visualElement.current,n=$t(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();dt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),I.read(r);const i=Bt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ie(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:i=Br,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function yn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Ef(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Tf extends Le{constructor(t){super(t),this.removeGroupControls=ne,this.removeListeners=ne,this.controls=new _f(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ne}unmount(){this.removeGroupControls(),this.removeListeners()}}const Li=e=>(t,n)=>{e&&I.postRender(()=>e(t,n))};class Af extends Le{constructor(){super(...arguments),this.removePointerDownListener=ne}onPointerDown(t){this.session=new xi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Si(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Li(t),onStart:Li(n),onMove:r,onEnd:(o,i)=>{delete this.session,s&&I.postRender(()=>s(o,i))}}}mount(){this.removePointerDownListener=$t(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const vn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Oi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ut={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=Oi(e,t.target.x),r=Oi(e,t.target.y);return`${n}% ${r}%`}},Mf={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Pe.parse(e);if(s.length>5)return r;const o=Pe.createTransformer(e),i=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=a,s[1+i]/=l;const c=j(a,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=c),typeof s[3+i]=="number"&&(s[3+i]/=c),o(s)}};class Pf extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;qc(Lf),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),vn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,i=r.projection;return i&&(i.isPresent=o,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||I.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Wn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ki(e){const[t,n]=lc(),r=g.useContext(ys);return y.jsx(Pf,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Us),isPresent:t,safeToRemove:n})}const Lf={borderRadius:{...Ut,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ut,borderTopRightRadius:Ut,borderBottomLeftRadius:Ut,borderBottomRightRadius:Ut,boxShadow:Mf};function Of(e,t,n){const r=J(e)?e:Tt(e);return r.start(Lr("",r,t,n)),r.animation}function kf(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Df=(e,t)=>e.depth-t.depth;class Nf{constructor(){this.children=[],this.isDirty=!1}add(t){Bn(this.children,t),this.isDirty=!0}remove(t){Fn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Df),this.isDirty=!1,this.children.forEach(t)}}function If(e,t){const n=de.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(Ae(r),e(o-t))};return I.read(r,!0),()=>Ae(r)}const Di=["TopLeft","TopRight","BottomLeft","BottomRight"],Vf=Di.length,Ni=e=>typeof e=="string"?parseFloat(e):e,Ii=e=>typeof e=="number"||L.test(e);function Bf(e,t,n,r,s,o){s?(e.opacity=j(0,n.opacity!==void 0?n.opacity:1,Ff(r)),e.opacityExit=j(t.opacity!==void 0?t.opacity:1,0,$f(r))):o&&(e.opacity=j(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<Vf;i++){const a=`border${Di[i]}Radius`;let l=Vi(t,a),c=Vi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ii(l)===Ii(c)?(e[a]=Math.max(j(Ni(l),Ni(c),r),0),(fe.test(c)||fe.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=j(t.rotate||0,n.rotate||0,r))}function Vi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ff=Bi(0,.5,mo),$f=Bi(.5,.95,ne);function Bi(e,t,n){return r=>r<e?0:r>t?1:n(ct(e,t,r))}function Fi(e,t){e.min=t.min,e.max=t.max}function ae(e,t){Fi(e.x,t.x),Fi(e.y,t.y)}function $i(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ji(e,t,n,r,s){return e-=t,e=gn(e,1/n,r),s!==void 0&&(e=gn(e,1/s,r)),e}function jf(e,t=0,n=1,r=.5,s,o=e,i=e){if(fe.test(t)&&(t=parseFloat(t),t=j(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=j(o.min,o.max,r);e===o&&(a-=t),e.min=ji(e.min,t,n,a,s),e.max=ji(e.max,t,n,a,s)}function zi(e,t,[n,r,s],o,i){jf(e,t[n],t[r],t[s],t.scale,o,i)}const zf=["x","scaleX","originX"],Uf=["y","scaleY","originY"];function Ui(e,t,n,r){zi(e.x,t,zf,n?n.x:void 0,r?r.x:void 0),zi(e.y,t,Uf,n?n.y:void 0,r?r.y:void 0)}function Xi(e){return e.translate===0&&e.scale===1}function Ri(e){return Xi(e.x)&&Xi(e.y)}function qi(e,t){return e.min===t.min&&e.max===t.max}function Xf(e,t){return qi(e.x,t.x)&&qi(e.y,t.y)}function Gi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Wi(e,t){return Gi(e.x,t.x)&&Gi(e.y,t.y)}function Ki(e){return ee(e.x)/ee(e.y)}function Hi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Rf{constructor(){this.members=[]}add(t){Bn(this.members,t),t.scheduleRender()}remove(t){if(Fn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qf(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((s||o||i)&&(r=`translate3d(${s}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:h}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),h&&(r+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Fr=["","X","Y","Z"],Gf={visibility:"hidden"},Zi=1e3;let Wf=0;function $r(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Yi(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ao(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",I,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Yi(r)}function Ji({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Wf++,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(Zf),this.nodes.forEach(th),this.nodes.forEach(nh),this.nodes.forEach(Yf)},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 Nf)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new jn),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=kf(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),vn.hasAnimatedSinceResize&&(vn.hasAnimatedSinceResize=!1,this.nodes.forEach(ea))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||ah,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),C=!this.targetLayout||!Wi(this.targetLayout,h),S=!f&&p;if(this.options.layoutRoot||this.resumeFrom||S||f&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,S);const x={...zn(m,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else f||ea(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,Ae(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(rh),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&&Yi(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(Qi);return}this.isUpdating||this.nodes.forEach(Qf),this.isUpdating=!1,this.nodes.forEach(eh),this.nodes.forEach(Kf),this.nodes.forEach(Hf),this.clearAllSnapshots();const a=de.now();H.delta=ye(0,1e3/60,a-H.timestamp),H.timestamp=a,H.isProcessing=!0,Gn.update.process(H),Gn.preRender.process(H),Gn.render.process(H),H.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Jf),this.sharedNodes.forEach(sh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ee(this.snapshot.measuredBox.x)&&!ee(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=U(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ri(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||He(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),lh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return U();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(ch))){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=U();if(ae(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&&ae(l,i),yt(l.x,d.offset.x),yt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=U();ae(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}),He(u.latestValues)&&vt(l,u.latestValues)}return He(this.latestValues)&&vt(l,this.latestValues),l}removeTransform(i){const a=U();ae(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!He(c.latestValues))continue;Dr(c.latestValues)&&c.updateSnapshot();const u=U(),d=c.measurePageBox();ae(u,d),Ui(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return He(this.latestValues)&&Ui(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!==H.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=H.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U(),this.relativeTargetOrigin=U(),zt(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),ae(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=U(),this.targetWithTransforms=U()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),df(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ae(this.target,this.layout.layoutBox),gi(this.target,this.targetDelta)):ae(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U(),this.relativeTargetOrigin=U(),zt(this.relativeTargetOrigin,this.target,p.target),ae(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Dr(this.parent.latestValues)||hi(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===H.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;ae(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;ff(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=U());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($i(this.prevProjectionDelta.x,this.projectionDelta.x),$i(this.prevProjectionDelta.y,this.projectionDelta.y)),jt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Hi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Hi(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=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=U(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,v=this.getStack(),b=!v||v.members.length<=1,C=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(ih));this.animationProgress=0;let S;this.mixTargetDelta=x=>{const w=x/1e3;ta(d.x,i.x,w),ta(d.y,i.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),oh(this.relativeTarget,this.relativeTargetOrigin,f,w),S&&Xf(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=U()),ae(S,this.relativeTarget)),m&&(this.animationValues=u,Bf(u,c,this.latestValues,w,C,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},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&&(Ae(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=I.update(()=>{vn.hasAnimatedSinceResize=!0,this.currentAnimation=Of(0,Zi,{...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(Zi),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&&ia(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||U();const d=ee(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=ee(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}ae(a,l),vt(a,u),jt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Rf),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&$r("z",i,c,this.animationValues);for(let u=0;u<Fr.length;u++)$r(`rotate${Fr[u]}`,i,c,this.animationValues),$r(`skew${Fr[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Gf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=fn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=fn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!He(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=qf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:p,y:h}=this.projectionDelta;c.transformOrigin=`${p.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 m in Mt){if(f[m]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:C}=Mt[m],S=c.transform==="none"?f[m]:v(f[m],d);if(b){const x=b.length;for(let w=0;w<x;w++)c[b[w]]=S}else C?this.options.visualElement.renderState.vars[m]=S:c[m]=S}return this.options.layoutId&&(c.pointerEvents=d===this?fn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Qi),this.root.sharedNodes.clear()}}}function Kf(e){e.updateLayout()}function Hf(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;o==="size"?ie(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=ee(f);f.min=r[d].min,f.max=f.min+p}):ia(o,n.layoutBox,r)&&ie(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=ee(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=gt();jt(a,r,n.layoutBox);const l=gt();i?jt(l,e.applyTransform(s,!0),n.measuredBox):jt(l,r,n.layoutBox);const c=!Ri(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const h=U();zt(h,n.layoutBox,f.layoutBox);const m=U();zt(m,r,p.layoutBox),Wi(h,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,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 Zf(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 Yf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Jf(e){e.clearSnapshot()}function Qi(e){e.clearMeasurements()}function Qf(e){e.isLayoutDirty=!1}function eh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ea(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function th(e){e.resolveTargetDelta()}function nh(e){e.calcProjection()}function rh(e){e.resetSkewAndRotation()}function sh(e){e.removeLeadSnapshot()}function ta(e,t,n){e.translate=j(t.translate,0,n),e.scale=j(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function na(e,t,n,r){e.min=j(t.min,n.min,r),e.max=j(t.max,n.max,r)}function oh(e,t,n,r){na(e.x,t.x,n.x,r),na(e.y,t.y,n.y,r)}function ih(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ah={duration:.45,ease:[.4,0,.1,1]},ra=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sa=ra("applewebkit/")&&!ra("chrome/")?Math.round:ne;function oa(e){e.min=sa(e.min),e.max=sa(e.max)}function lh(e){oa(e.x),oa(e.y)}function ia(e,t,n){return e==="position"||e==="preserve-aspect"&&!uf(Ki(t),Ki(n),.2)}function ch(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const uh=Ji({attachResizeListener:(e,t)=>Bt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),jr={current:void 0},aa=Ji({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!jr.current){const e=new uh({});e.mount(window),e.setOptions({layoutScroll:!0}),jr.current=e}return jr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dh={pan:{Feature:Af},drag:{Feature:Tf,ProjectionNode:aa,MeasureLayout:ki}};function la(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&I.postRender(()=>o(t,Ft(t)))}class fh extends Le{mount(){const{current:t}=this.node;t&&(this.unmount=Cc(t,(n,r)=>(la(this.node,r,"Start"),s=>la(this.node,s,"End"))))}unmount(){}}class hh extends Le{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=It(Bt(this.node.current,"focus",()=>this.onFocus()),Bt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ca(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&I.postRender(()=>o(t,Ft(t)))}class ph extends Le{mount(){const{current:t}=this.node;t&&(this.unmount=_c(t,(n,r)=>(ca(this.node,r,"Start"),(s,{success:o})=>ca(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const zr=new WeakMap,Ur=new WeakMap,mh=e=>{const t=zr.get(e.target);t&&t(e)},gh=e=>{e.forEach(mh)};function yh({root:e,...t}){const n=e||document;Ur.has(n)||Ur.set(n,{});const r=Ur.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(gh,{root:e,...t})),r[s]}function vh(e,t,n){const r=yh(t);return zr.set(e,n),r.observe(e),()=>{zr.delete(e),r.unobserve(e)}}const bh={some:0,all:1};class Ch extends Le{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:bh[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return vh(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(Sh(t,n))&&this.startObserver()}unmount(){}}function Sh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const wh={inView:{Feature:Ch},tap:{Feature:ph},focus:{Feature:hh},hover:{Feature:fh}},xh={layout:{ProjectionNode:aa,MeasureLayout:ki}},Xr={current:null},ua={current:!1};function _h(){if(ua.current=!0,!!In)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xr.current=e.matches;e.addListener(t),t()}else Xr.current=!1}const Eh=[...Vo,Q,Pe],Th=e=>Eh.find(Io(e)),Ah=new WeakMap;function Mh(e,t,n){for(const r in t){const s=t[r],o=n[r];if(J(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&nn(s.version==="12.5.0",`Attempting to mix Motion versions ${s.version} with 12.5.0 may not work as expected.`);else if(J(o))e.addValue(r,Tt(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,Tt(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const da=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ph{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=de.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,I.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=un(n),this.isVariantNode=$s(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const h=f[p];l[p]!==void 0&&J(h)&&h.set(l[p],!1)}}mount(t){this.current=t,Ah.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)),ua.current||_h(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xr.current,process.env.NODE_ENV!=="production"&&nn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ae(this.notifyUpdate),Ae(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=Re.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&I.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ut){const n=ut[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):U()}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<da.length;r++){const s=da[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=Mh(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=Tt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Do(s)||yo(s))?s=parseFloat(s):!Th(s)&&Pe.test(n)&&(s=Eo(t,n)),this.setBaseTarget(t,J(s)?s.get():s)),J(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const i=ar(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(s=i[t])}if(r&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!J(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new jn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class fa extends Ph{constructor(){super(...arguments),this.KeyframeResolver=Fo}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;J(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Lh(e){return window.getComputedStyle(e)}class Oh extends fa{constructor(){super(...arguments),this.type="html",this.renderInstance=to}readValueFromInstance(t,n){if(Re.has(n))return Uu(t,n);{const r=Lh(t),s=(Qn(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ci(t,n)}build(t,n,r){nr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return cr(t,n,r)}}class kh extends fa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=U,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&eo(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Re.has(n)){const r=_o(n);return r&&r.default||0}return n=no.has(n)?n:Jn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return so(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&I.postRender(this.updateDimensions)}build(t,n,r){or(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){ro(t,n,r,s)}mount(t){this.isSVGTag=ir(t.tagName),super.mount(t)}}const Dh=(e,t)=>sr(e)?new kh(t):new Oh(t,{allowProjection:e!==g.Fragment}),Nh=mu({...tf,...wh,...dh,...xh},Dh),Ze=kc(Nh),Ih={root:"_root_uup2j_1"},ha={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 Oe(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ha).includes(t)).filter(t=>e[t]===!0).map(t=>ha[t]):null}const ke="Errore: ",Vh="Impossibile acquisire la posizione.",bn="Impossibile caricare i punti di mappa.",Bh="Si è verificato un errore.",Fh="Impossibile caricare i suggerimenti.",$h="Impossibile caricare i dettagli della location.",jh="Impossibile caricare la mappa.",zh="Impossibile trovare punti di mappa nell'area di ricerca.",Uh="Ottieni indicazioni di navigazione per questa destinazione",Xh="Condividi questa destinazione",Rh="Scarica l'evento",qh="dyn-locator__portal-root",pa=3e3,ma=6,ga=2e4,Gh=300,Xt={north:47.1,south:36.6,east:18.6,west:6.6},Wh={lat:(Xt.north+Xt.south)/2,lng:(Xt.east+Xt.west)/2},Ye={AIRC:"airc",GOOGLE:"google"};function ve(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function be(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 ya(e,t){const{type:n,url:r}=e??{};switch(n){case"navigate":case"directions":return{"aria-label":Uh,as:"a",href:r??"#",target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"share":return{"aria-label":Xh,as:"a",href:r??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Rh,as:"a",href:r??"#",download:!0,target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"email":default:return{}}}function Kh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}function Hh(e){var l,c,u,d;const t=(e==null?void 0:e.address_components)??[];function n(f){return t.find(p=>p.types.includes(f))}const r=(e==null?void 0:e.formatted_address)??"No address found",s=((l=n("locality"))==null?void 0:l.long_name)??"No city found",o=((c=n("country"))==null?void 0:c.long_name)??"No country found",i=((u=n("administrative_area_level_1"))==null?void 0:u.long_name)??"No region found",a=((d=n("administrative_area_level_2"))==null?void 0:d.short_name)??"No province found";return{address:r,city:s,province:a,region:i,country:o}}const va="Anchor";function ba({as:e,wrapper:t,children:n,variant:r="default",className:s,animate:o=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},p){const h=t||"span",m=o?Ze[h]:h,v=e||"a",b=Oe(f)??[],C=o?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},x=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return y.jsx(m,{className:$(Ih.root,"dyn-locator__"+be(va),ve(s),...b),"data-variant":r,...d?{style:d}:{},...C,...f,children:y.jsx(v,{ref:p,href:a,target:l,rel:x,...u,children:n})})}ba.displayName=va;const Ca=g.forwardRef(ba),Sa="ErrorBanner";function wa({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:r,errorDetails:s,className:o,children:i,...a}){const l=Oe(a)??[];return y.jsxs("div",{className:$("dyn-locator__"+be(Sa),xt.root,ve(o),...l??[]),children:[y.jsxs("header",{className:xt.header,children:[y.jsx(Zl,{size:28,color:"currentColor",className:xt.icon})," ",y.jsx("h3",{children:e})]}),y.jsxs("div",{className:xt.body,children:[y.jsx("p",{children:t}),n&&r&&y.jsxs("p",{children:["Prova a"," ",y.jsx(Ca,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,s&&y.jsx("div",{className:xt.content,children:y.jsx("pre",{children:s})})]})]})}wa.displayName=Sa;const xa=wa;class Zh 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||y.jsx("div",{className:zl.container,children:y.jsx(xa,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Yh=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"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"})]}),Jh=g.forwardRef(Yh),Qh=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"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"})]}),ep=g.forwardRef(Qh),tp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"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"})]}),np=g.forwardRef(tp),rp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"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"})]}),sp=g.forwardRef(rp),op=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"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"})]}),ip=g.forwardRef(op),ap=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"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"})]})]}),_a=g.forwardRef(ap),lp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"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"})]}),cp=g.forwardRef(lp),Ea={ArrowLeft:ql,ArrowUpRight:Wl,ChevronUp:Hl,ChevronDown:Kl,Close:gs,Expand:tc,Location:ec,Search:sc,Share:oc,Target:Jl,Email:Ql,Copy:Yl,X:_a,Twitter:_a,Facebook:Jh,Instagram:ep,Linkedin:np,TikTok:sp,Whatsapp:ip,Youtube:cp},Ce={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"},bt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Rr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function up(e){return g.isValidElement(e)||typeof e=="function"}function dp(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function fp(e){return!!e&&typeof e=="object"&&"path"in e}const Ta="Icon";function Aa({as:e,icon:t,iconRef:n,label:r,size:s="S",radius:o,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const p=e||"span",h=l?Ze[p]:p,{iconMap:m}=Cp();function v(S){if(dp(S)){const x=typeof S=="string"?S:S.name;return m[x]?g.createElement(m[x],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Rr.icon}):'No icon found for "'+x+'"!'}return fp(S)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),y.jsx("img",{...n?{ref:n}:{},src:S.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:Rr.icon})):"No icon provided"}const b=Oe(d)??[],C=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return y.jsx(h,{ref:f,className:$(Rr.root,"dyn-locator__"+be(Ta),ve(a),...b),...u?{style:u}:{},"data-variant":i,"data-size":s,...o?{"data-radius":o}:{},...C,...d,children:v(t)})}Aa.displayName=Ta;const he=g.forwardRef(Aa),Ma="Tag";function Pa({as:e,iconPosition:t="left",children:n,icon:r,className:s,animate:o=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=o?Ze[u]:u,f=Oe(l)??[],p=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return y.jsx(d,{ref:c,className:$(bt.root,"dyn-locator__"+be(Ma),ve(s),...f),"data-icon-position":t,...a?{style:a}:{},...p,...l,children:y.jsxs("div",{className:bt.container,children:[r?y.jsx("div",{className:bt.icon,children:up(r)?typeof r=="function"?y.jsx(r,{className:bt.icon}):r:y.jsx(he,{className:bt.icon,icon:r})}):null,y.jsx("div",{className:bt.label,children:n})]})})}Pa.displayName=Ma;const hp=g.forwardRef(Pa),pp={root:"_root_u5v4v_1"},La="IconButton";function Oa({as:e,children:t,className:n,variant:r="default",animate:s=!0,animationDelay:o=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},p){const h=e||"button",m=s?Ze[h]:h,v=Oe(f)??[],b=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:o,duration:.2}}:{},C=h==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return y.jsx(m,{ref:p,className:$(pp.root,"dyn-locator__"+be(La),ve(n),...v),"data-variant":r,"data-element":h,"aria-label":a,disabled:d,...i?{style:i}:{},...b,...C,...f,children:t})}Oa.displayName=La;const De=g.forwardRef(Oa),ka={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Da="Card";function Na({as:e,children:t,className:n,variant:r="default",animate:s=!0,animationDelay:o=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=s?Ze[d]:d,p=Oe(c)??[],h=s?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:o,duration:.3}}:{};return y.jsx(f,{ref:u,className:$(ka.root,"dyn-locator__"+be(Da),ve(n),...p),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...h,...c,children:r==="bare"?t:y.jsx("div",{className:ka.content,children:t})})}Na.displayName=Da;const mp=g.forwardRef(Na);function Ia(e){const{componentMap:t}=Sp();return t[e]}var le=(e=>(e.FULLSCREEN_TOGGLE="fullscreen",e.BACK_BUTTON_CLICK="back_button",e.SEARCH="search",e.AUTOCOMPLETE_ITEM_SELECT="autocomplete_item_select",e.GEOLOCATION="geolocation",e.LOCATION_CARD_CLICK="location_card_click",e.LOCATION_CARD_PRIMARY_ACTION="location_card_primary_action",e.LOCATION_CARD_SECONDARY_ACTION="location_card_secondary_action",e.INFO_WINDOW_PRIMARY_ACTION="info_window_primary_action",e.INFO_WINDOW_SECONDARY_ACTION="info_window_secondary_action",e.CARD_LIST_TOGGLE="card_list_toggle",e.SHARE_SHEET_OPEN="share_sheet_open",e.SHARE_SHEET_CLOSE="share_sheet_close",e.SHARE_SHEET_SHARE="share_sheet_share",e.AREA_SEARCH_TOGGLE="area_search_toggle",e.AREA_SEARCH_SUBMIT="area_search_submit",e.AREA_SEARCH_CANCEL="area_search_cancel",e))(le||{});const qr=[le.LOCATION_CARD_PRIMARY_ACTION,le.LOCATION_CARD_SECONDARY_ACTION,le.AUTOCOMPLETE_ITEM_SELECT];class gp{constructor(){On(this,"config",{});On(this,"isInitialized",!1);On(this,"warnedEvents",new Set)}initialize(t={}){this.config=t,this.isInitialized=!0,Object.keys(t).forEach(n=>{var r;(r=t[n])!=null&&r.enabled&&!qr.includes(n)&&console.warn(`[TrackingService] Event "${n}" is configured but not yet implemented in the codebase.`)})}isEventEnabled(t){var n,r;return this.isInitialized?(!qr.includes(t)&&!this.warnedEvents.has(t)&&(console.warn(`[TrackingService] Event "${t}" is not yet implemented in the codebase.`),this.warnedEvents.add(t)),!!((n=this.config[t])!=null&&n.enabled)&&typeof((r=this.config[t])==null?void 0:r.tracker)=="function"):!1}track(t,n={}){if(!qr.includes(t)&&!this.warnedEvents.has(t)&&(console.warn(`[TrackingService] Event "${t}" is not yet implemented in the codebase.`),this.warnedEvents.add(t)),!this.isEventEnabled(t))return;const r={...n,timestamp:n.timestamp||Date.now()},{tracker:s}=this.config[t]??{};typeof s=="function"&&s(r)}isTrackerInitialized(){return this.isInitialized}reset(){this.config={},this.isInitialized=!1,this.warnedEvents.clear()}}const Ne=new gp,Va="LocationCard";function Ba({title:e,timestamp:t,address:n,capabilities:r,actions:s,className:o,id:i,coords:a,on_share:l,...c},u){const d=Ia("ctaButton"),f=M(v=>v.toggleShareSheet),p=M(v=>v.featureFlags);function h(){f(!0)}function m(v){if(Ne.isEventEnabled(le.LOCATION_CARD_PRIMARY_ACTION))return()=>Ne.track(le.LOCATION_CARD_PRIMARY_ACTION,{cta_event_type:v.type??"",cta_url:v.url??"",cta_label:v.label??""});if(Ne.isEventEnabled(le.LOCATION_CARD_SECONDARY_ACTION))return()=>Ne.track(le.LOCATION_CARD_SECONDARY_ACTION,{cta_event_type:v.type??"",cta_url:v.url??"",cta_label:v.label??""})}return y.jsx(mp,{ref:u,variant:"bare",clickable:!0,className:$("dyn-locator__"+be(Va),ve(o)),...c,style:{...c.style?c.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:Ce.root,children:[y.jsxs("header",{className:Ce.header,children:[t?y.jsx("time",{children:t}):null,y.jsxs("div",{className:Ce.titleContainer,children:[e?y.jsx("h4",{children:e}):null,p.share?y.jsx(De,{className:Ce.shareButton,variant:"bare",onClick:h,children:y.jsx(he,{size:"M",icon:"Share"})}):null]}),n?y.jsx("address",{children:n}):null]}),r!=null&&r.length?y.jsx("div",{className:Ce.body,children:r.map((v,b)=>y.jsxs("div",{className:Ce.capabilities,children:[y.jsx("h5",{children:v.title}),y.jsx("ul",{className:Ce.tagContainer,children:(v.capabilities??[]).map((C,S)=>y.jsx(hp,{as:"li",animationDelay:+`.${S+1}`,className:Ce.tag,children:C.label},S))})]},b))}):null,s!=null&&s.length?y.jsx("div",{className:Ce.cta,children:s.map((v,b)=>y.jsx(d,{animate:!1,fullWidth:!0,variant:b===0?"themed":"secondary",...ya(v,m(v)),children:v.label},b))}):null]})})}Ba.displayName=Va;const yp=g.forwardRef(Ba),Fa={root:"_root_o9d55_1",loader:"_loader_o9d55_73"},$a="Button";function ja({as:e,children:t,className:n,variant:r="default",size:s="medium",disabled:o=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:p,...h},m){const v=e||(u?"a":"button"),b=l?Ze[v]:v,C=Oe(h)??[],S=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},x=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return y.jsx(b,{ref:m,className:$(Fa.root,"dyn-locator__"+be($a),ve(n),...C),"data-variant":r,"data-size":s,"data-full-width":a,disabled:o||i,...p?{style:p}:{},...S,...x,...h,children:i?y.jsxs("span",{style:{display:"flex",gap:10},children:[t,y.jsx("span",{className:Fa.loader,"aria-hidden":"true"})]}):t})}ja.displayName=$a;const Rt=g.forwardRef(ja),za={locationCard:yp,ctaButton:Rt},vp={iconMap:Ea,componentMap:za},Gr=g.createContext(vp);function bp({children:e,customIcons:t,customComponents:n}){const r={...Ea,...t??{}},s={...za,...n??{}};return y.jsx(Gr.Provider,{value:{iconMap:r,componentMap:s},children:e})}function Cp(){const{iconMap:e}=g.useContext(Gr);return{iconMap:e}}function Sp(){const{componentMap:e}=g.useContext(Gr);return{componentMap:e}}var Ct=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e.ALL_MARKERS="allMarkers",e))(Ct||{});const Ua=g.createContext({endpointMap:{},apiUrl:""});function wp({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 y.jsx(Ua.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function xp(e){const{endpointMap:t,apiUrl:n}=g.useContext(Ua);return{getEndpoint:(r={})=>{const s=t[e];if(!s)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let o="";return s.buildPath?o=s.buildPath(r):(o=s.path,Object.entries(r).forEach(([i,a])=>{o=o.replace(`:${i}`,String(a))})),{url:`${n}${o}`,method:s.method}}}}let _p={data:""},Ep=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||_p,Tp=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Ap=/\/\*[^]*?\*\/| +/g,Xa=/\n+/g,Ie=(e,t)=>{let n="",r="",s="";for(let o in e){let i=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+i+";":r+=o[1]=="f"?Ie(i,o):o+"{"+Ie(i,o[1]=="k"?"":t)+"}":typeof i=="object"?r+=Ie(i,t?t.replace(/([^,])+/g,a=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):o):i!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=Ie.p?Ie.p(o,i):o+":"+i+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Se={},Ra=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ra(e[n]);return t}return e},Mp=(e,t,n,r,s)=>{let o=Ra(e),i=Se[o]||(Se[o]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(o));if(!Se[i]){let l=o!==e?e:(c=>{let u,d,f=[{}];for(;u=Tp.exec(c.replace(Ap,""));)u[4]?f.shift():u[3]?(d=u[3].replace(Xa," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(Xa," ").trim();return f[0]})(e);Se[i]=Ie(s?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&Se.g?Se.g:null;return n&&(Se.g=Se[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)})(Se[i],t,r,a),i},Pp=(e,t,n)=>e.reduce((r,s,o)=>{let i=t[o];if(i&&i.call){let a=i(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=l?"."+l:a&&typeof a=="object"?a.props?"":Ie(a,""):a===!1?"":a}return r+s+(i??"")},"");function Cn(e){let t=this||{},n=e.call?e(t.p):e;return Mp(n.unshift?n.raw?Pp(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,Ep(t.target),t.g,t.o,t.k)}let qa,Wr,Kr;Cn.bind({g:1});let we=Cn.bind({k:1});function Lp(e,t,n,r){Ie.p=t,qa=e,Wr=n,Kr=r}function Ve(e,t){let n=this||{};return function(){let r=arguments;function s(o,i){let a=Object.assign({},o),l=a.className||s.className;n.p=Object.assign({theme:Wr&&Wr()},a),n.o=/ *go\d+/.test(l),a.className=Cn.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Kr&&c[0]&&Kr(a),qa(c,a)}return t?t(s):s}}var Op=e=>typeof e=="function",Sn=(e,t)=>Op(e)?e(t):e,kp=(()=>{let e=0;return()=>(++e).toString()})(),Ga=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Dp=20,Wa=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Dp)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return Wa(e,{type:e.toasts.find(o=>o.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},wn=[],Je={toasts:[],pausedAt:void 0},Qe=e=>{Je=Wa(Je,e),wn.forEach(t=>{t(Je)})},Np={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Ip=(e={})=>{let[t,n]=g.useState(Je),r=g.useRef(Je);g.useEffect(()=>(r.current!==Je&&n(Je),wn.push(n),()=>{let o=wn.indexOf(n);o>-1&&wn.splice(o,1)}),[]);let s=t.toasts.map(o=>{var i,a,l;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((i=e[o.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((a=e[o.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||Np[o.type],style:{...e.style,...(l=e[o.type])==null?void 0:l.style,...o.style}}});return{...t,toasts:s}},Vp=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||kp()}),qt=e=>(t,n)=>{let r=Vp(t,e,n);return Qe({type:2,toast:r}),r.id},B=(e,t)=>qt("blank")(e,t);B.error=qt("error"),B.success=qt("success"),B.loading=qt("loading"),B.custom=qt("custom"),B.dismiss=e=>{Qe({type:3,toastId:e})},B.remove=e=>Qe({type:4,toastId:e}),B.promise=(e,t,n)=>{let r=B.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(s=>{let o=t.success?Sn(t.success,s):void 0;return o?B.success(o,{id:r,...n,...n==null?void 0:n.success}):B.dismiss(r),s}).catch(s=>{let o=t.error?Sn(t.error,s):void 0;o?B.error(o,{id:r,...n,...n==null?void 0:n.error}):B.dismiss(r)}),e};var Bp=(e,t)=>{Qe({type:1,toast:{id:e,height:t}})},Fp=()=>{Qe({type:5,time:Date.now()})},Gt=new Map,$p=1e3,jp=(e,t=$p)=>{if(Gt.has(e))return;let n=setTimeout(()=>{Gt.delete(e),Qe({type:4,toastId:e})},t);Gt.set(e,n)},zp=e=>{let{toasts:t,pausedAt:n}=Ip(e);g.useEffect(()=>{if(n)return;let o=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(l<0){a.visible&&B.dismiss(a.id);return}return setTimeout(()=>B.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=g.useCallback(()=>{n&&Qe({type:6,time:Date.now()})},[n]),s=g.useCallback((o,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(p=>(p.position||c)===(o.position||c)&&p.height),d=u.findIndex(p=>p.id===o.id),f=u.filter((p,h)=>h<d&&p.visible).length;return u.filter(p=>p.visible).slice(...a?[f+1]:[0,f]).reduce((p,h)=>p+(h.height||0)+l,0)},[t]);return g.useEffect(()=>{t.forEach(o=>{if(o.dismissed)jp(o.id,o.removeDelay);else{let i=Gt.get(o.id);i&&(clearTimeout(i),Gt.delete(o.id))}})},[t]),{toasts:t,handlers:{updateHeight:Bp,startPause:Fp,endPause:r,calculateOffset:s}}},Up=we`
110
110
  from {
111
111
  transform: scale(0) rotate(45deg);
112
112
  opacity: 0;
@@ -114,7 +114,7 @@ from {
114
114
  to {
115
115
  transform: scale(1) rotate(45deg);
116
116
  opacity: 1;
117
- }`,tp=yt`
117
+ }`,Xp=we`
118
118
  from {
119
119
  transform: scale(0);
120
120
  opacity: 0;
@@ -122,7 +122,7 @@ from {
122
122
  to {
123
123
  transform: scale(1);
124
124
  opacity: 1;
125
- }`,ep=yt`
125
+ }`,Rp=we`
126
126
  from {
127
127
  transform: scale(0) rotate(90deg);
128
128
  opacity: 0;
@@ -130,28 +130,28 @@ from {
130
130
  to {
131
131
  transform: scale(1) rotate(90deg);
132
132
  opacity: 1;
133
- }`,np=Dt("div")`
133
+ }`,qp=Ve("div")`
134
134
  width: 20px;
135
135
  opacity: 0;
136
136
  height: 20px;
137
137
  border-radius: 10px;
138
- background: ${t=>t.primary||"#ff4b4b"};
138
+ background: ${e=>e.primary||"#ff4b4b"};
139
139
  position: relative;
140
140
  transform: rotate(45deg);
141
141
 
142
- animation: ${Qh} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
142
+ animation: ${Up} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
143
143
  forwards;
144
144
  animation-delay: 100ms;
145
145
 
146
146
  &:after,
147
147
  &:before {
148
148
  content: '';
149
- animation: ${tp} 0.15s ease-out forwards;
149
+ animation: ${Xp} 0.15s ease-out forwards;
150
150
  animation-delay: 150ms;
151
151
  position: absolute;
152
152
  border-radius: 3px;
153
153
  opacity: 0;
154
- background: ${t=>t.secondary||"#fff"};
154
+ background: ${e=>e.secondary||"#fff"};
155
155
  bottom: 9px;
156
156
  left: 4px;
157
157
  height: 2px;
@@ -159,27 +159,27 @@ to {
159
159
  }
160
160
 
161
161
  &:before {
162
- animation: ${ep} 0.15s ease-out forwards;
162
+ animation: ${Rp} 0.15s ease-out forwards;
163
163
  animation-delay: 180ms;
164
164
  transform: rotate(90deg);
165
165
  }
166
- `,op=yt`
166
+ `,Gp=we`
167
167
  from {
168
168
  transform: rotate(0deg);
169
169
  }
170
170
  to {
171
171
  transform: rotate(360deg);
172
172
  }
173
- `,sp=Dt("div")`
173
+ `,Wp=Ve("div")`
174
174
  width: 12px;
175
175
  height: 12px;
176
176
  box-sizing: border-box;
177
177
  border: 2px solid;
178
178
  border-radius: 100%;
179
- border-color: ${t=>t.secondary||"#e0e0e0"};
180
- border-right-color: ${t=>t.primary||"#616161"};
181
- animation: ${op} 1s linear infinite;
182
- `,rp=yt`
179
+ border-color: ${e=>e.secondary||"#e0e0e0"};
180
+ border-right-color: ${e=>e.primary||"#616161"};
181
+ animation: ${Gp} 1s linear infinite;
182
+ `,Kp=we`
183
183
  from {
184
184
  transform: scale(0) rotate(45deg);
185
185
  opacity: 0;
@@ -187,7 +187,7 @@ from {
187
187
  to {
188
188
  transform: scale(1) rotate(45deg);
189
189
  opacity: 1;
190
- }`,ip=yt`
190
+ }`,Hp=we`
191
191
  0% {
192
192
  height: 0;
193
193
  width: 0;
@@ -201,43 +201,43 @@ to {
201
201
  100% {
202
202
  opacity: 1;
203
203
  height: 10px;
204
- }`,ap=Dt("div")`
204
+ }`,Zp=Ve("div")`
205
205
  width: 20px;
206
206
  opacity: 0;
207
207
  height: 20px;
208
208
  border-radius: 10px;
209
- background: ${t=>t.primary||"#61d345"};
209
+ background: ${e=>e.primary||"#61d345"};
210
210
  position: relative;
211
211
  transform: rotate(45deg);
212
212
 
213
- animation: ${rp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
213
+ animation: ${Kp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
214
214
  forwards;
215
215
  animation-delay: 100ms;
216
216
  &:after {
217
217
  content: '';
218
218
  box-sizing: border-box;
219
- animation: ${ip} 0.2s ease-out forwards;
219
+ animation: ${Hp} 0.2s ease-out forwards;
220
220
  opacity: 0;
221
221
  animation-delay: 200ms;
222
222
  position: absolute;
223
223
  border-right: 2px solid;
224
224
  border-bottom: 2px solid;
225
- border-color: ${t=>t.secondary||"#fff"};
225
+ border-color: ${e=>e.secondary||"#fff"};
226
226
  bottom: 6px;
227
227
  left: 6px;
228
228
  height: 10px;
229
229
  width: 6px;
230
230
  }
231
- `,lp=Dt("div")`
231
+ `,Yp=Ve("div")`
232
232
  position: absolute;
233
- `,cp=Dt("div")`
233
+ `,Jp=Ve("div")`
234
234
  position: relative;
235
235
  display: flex;
236
236
  justify-content: center;
237
237
  align-items: center;
238
238
  min-width: 20px;
239
239
  min-height: 20px;
240
- `,up=yt`
240
+ `,Qp=we`
241
241
  from {
242
242
  transform: scale(0.6);
243
243
  opacity: 0.4;
@@ -245,20 +245,20 @@ from {
245
245
  to {
246
246
  transform: scale(1);
247
247
  opacity: 1;
248
- }`,dp=Dt("div")`
248
+ }`,em=Ve("div")`
249
249
  position: relative;
250
250
  transform: scale(0.6);
251
251
  opacity: 0.4;
252
252
  min-width: 20px;
253
- animation: ${up} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
253
+ animation: ${Qp} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
254
254
  forwards;
255
- `,fp=({toast:t})=>{let{icon:e,type:n,iconTheme:o}=t;return e!==void 0?typeof e=="string"?R.createElement(dp,null,e):e:n==="blank"?null:R.createElement(cp,null,R.createElement(sp,{...o}),n!=="loading"&&R.createElement(lp,null,n==="error"?R.createElement(np,{...o}):R.createElement(ap,{...o})))},hp=t=>`
256
- 0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
255
+ `,tm=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?q.createElement(em,null,t):t:n==="blank"?null:q.createElement(Jp,null,q.createElement(Wp,{...r}),n!=="loading"&&q.createElement(Yp,null,n==="error"?q.createElement(qp,{...r}):q.createElement(Zp,{...r})))},nm=e=>`
256
+ 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
257
257
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
258
- `,pp=t=>`
258
+ `,rm=e=>`
259
259
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
260
- 100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
261
- `,mp="0%{opacity:0;} 100%{opacity:1;}",gp="0%{opacity:1;} 100%{opacity:0;}",yp=Dt("div")`
260
+ 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
261
+ `,sm="0%{opacity:0;} 100%{opacity:1;}",om="0%{opacity:1;} 100%{opacity:0;}",im=Ve("div")`
262
262
  display: flex;
263
263
  align-items: center;
264
264
  background: #fff;
@@ -270,17 +270,22 @@ to {
270
270
  pointer-events: auto;
271
271
  padding: 8px 10px;
272
272
  border-radius: 8px;
273
- `,vp=Dt("div")`
273
+ `,am=Ve("div")`
274
274
  display: flex;
275
275
  justify-content: center;
276
276
  margin: 4px 10px;
277
277
  color: inherit;
278
278
  flex: 1 1 auto;
279
279
  white-space: pre-line;
280
- `,bp=(t,e)=>{let n=t.includes("top")?1:-1,[o,s]=ba()?[mp,gp]:[hp(n),pp(n)];return{animation:e?`${yt(o)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${yt(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},xa=R.memo(({toast:t,position:e,style:n,children:o})=>{let s=t.height?bp(t.position||e||"top-center",t.visible):{opacity:0},r=R.createElement(fp,{toast:t}),i=R.createElement(vp,{...t.ariaProps},sn(t.message,t));return R.createElement(yp,{className:t.className,style:{...s,...n,...t.style}},typeof o=="function"?o({icon:r,message:i}):R.createElement(R.Fragment,null,r,i))});zh(R.createElement);var Sp=({id:t,className:e,style:n,onHeightUpdate:o,children:s})=>{let r=R.useCallback(i=>{if(i){let a=()=>{let l=i.getBoundingClientRect().height;o(t,l)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[t,o]);return R.createElement("div",{ref:r,className:e,style:n},s)},xp=(t,e)=>{let n=t.includes("top"),o=n?{top:0}:{bottom:0},s=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:ba()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(n?1:-1)}px)`,...o,...s}},Cp=on`
280
+ `,lm=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=Ga()?[sm,om]:[nm(n),rm(n)];return{animation:t?`${we(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${we(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Ka=q.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?lm(e.position||t||"top-center",e.visible):{opacity:0},o=q.createElement(tm,{toast:e}),i=q.createElement(am,{...e.ariaProps},Sn(e.message,e));return q.createElement(im,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:o,message:i}):q.createElement(q.Fragment,null,o,i))});Lp(q.createElement);var cm=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let o=q.useCallback(i=>{if(i){let a=()=>{let l=i.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return q.createElement("div",{ref:o,className:t,style:n},s)},um=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Ga()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},dm=Cn`
281
281
  z-index: 9999;
282
282
  > * {
283
283
  pointer-events: auto;
284
284
  }
285
- `,an=16,_p=({reverseOrder:t,position:e="top-center",toastOptions:n,gutter:o,children:s,containerStyle:r,containerClassName:i})=>{let{toasts:a,handlers:l}=Jh(n);return R.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:an,left:an,right:an,bottom:an,pointerEvents:"none",...r},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||e,d=l.calculateOffset(c,{reverseOrder:t,gutter:o,defaultPosition:e}),f=xp(u,d);return R.createElement(Sp,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?Cp:"",style:f},c.type==="custom"?sn(c.message,c):s?s(c):R.createElement(xa,{toast:c,position:u}))}))};const wp={root:"_root_movxa_4"};function Oo({className:t,children:e,show:n=!0,variant:o="light",...s}){const r=F("dyn-locator__overlay",wp.root,t);return n?m.jsx("div",{className:r,"data-variant":o,...s,children:e}):null}function Ne(t){const[e,n]=p.useState(!1),[o,s]=p.useState(null),{getEndpoint:r}=Nh(t);return{request:async(a={},l={})=>{n(!0),s(null);try{let c;try{c=r(a)}catch{throw new Error(`Endpoint "${t}" is not configured. The host application must provide all required endpoints.`)}const{url:u,method:d}=c,f=await fetch(u,{method:d,headers:{"Content-Type":"application/json",...l.headers},...d!=="GET"&&l.body?{body:JSON.stringify(l.body)}:{}});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return{data:await f.json()}}catch(c){const u=c instanceof Error?c:new Error(String(c));throw s(u),console.error(`Error in API request to "${t}":`,u),u}finally{n(!1)}},loading:e,error:o}}const Ot={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"},Tp={root:"_root_1re47_4"};function Ep({children:t,className:e,position:n="top"}){return m.jsx("span",{className:F("dyn-locator__tooltip",Tp.root,e),role:"tooltip","aria-hidden":"true","data-position":n,children:t})}function Ap({isOpen:t,onClose:e,portalContainer:n=document.body}){var c,u;const{labels:o}=M(d=>d.localizationConfig),s=M(d=>d.locations),r=M(d=>d.selectedLocation),i=p.useMemo(()=>r?s.find(d=>d.id===r):void 0,[s,r]);function a(d){const{name:f,shareURL:h}=d;switch(f){case"facebook":return{style:{"--icon-button-bg":"#1877F2","--icon-button-hover-bg":"#0a4992"},href:h??"#",target:"_blank",rel:"noopener noreferrer"};case"x":case"twitter":return{style:{"--icon-button-bg":"#000","--icon-button-hover-bg":"#333"},href:h??"#",target:"_blank",rel:"noopener noreferrer"};case"whatsapp":return{style:{"--icon-button-bg":"#25D366","--icon-button-hover-bg":"#167d3c"},href:h??"#",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:h??"#"};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:y=>{y.preventDefault(),navigator.clipboard.writeText(h).then(()=>{B.success(o["ShareSheet.copyLinkSuccessNotif"])}).catch(g=>{B.error(o["ShareSheet.copyLinkErrorNotif"]),console.error("Failed to copy link: ",g)})}};default:return{}}}if(!t)return null;const l=m.jsx(Oo,{show:t,variant:"dark",onClick:e,children:m.jsxs("div",{className:F("dyn-locator__share-sheet",Ot.content),onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"share-sheet-title",children:[m.jsxs("header",{className:Ot.header,children:[m.jsx("h2",{id:"share-sheet-title",className:Ot.title,children:o["ShareSheet.title"]}),m.jsx(Pt,{className:Ot.closeButton,onClick:e,"aria-label":"Close",variant:"bare",children:m.jsx(ct,{icon:"Close"})})]}),m.jsxs("div",{className:Ot.body,children:[i&&m.jsxs("div",{className:Ot.locationInfo,children:[m.jsx("h3",{children:i.title}),m.jsx("p",{children:i.address})]}),m.jsx("div",{className:Ot.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:h}=d,y=f.charAt(0).toUpperCase()+f.slice(1),g=f==="copy"?o["ShareSheet.copyLinkTooltip"]:f==="email"?o["ShareSheet.shareViaEmailTooltip"]:o["ShareSheet.genericShareTooltip"]+y;return m.jsxs(Pt,{as:"a",href:h,variant:"negative",className:Ot.shareButton,...a(d),children:[m.jsx(ct,{icon:y,size:"M"}),m.jsx(Ep,{children:g})]})})})]})]})});return n?Fe.createPortal(l,n):l}function Pp({isFullscreen:t}){return m.jsx(_p,{...t?{}:{containerStyle:{position:"absolute"}},toastOptions:{position:t?"top-center":"bottom-right",duration:3e3,error:{duration:1/0}},children:e=>m.jsx(xa,{toast:e,children:({icon:n,message:o})=>m.jsxs(m.Fragment,{children:[n,o,e.type==="error"&&m.jsx(Pt,{variant:"bare",onClick:()=>B.dismiss(e.id),children:m.jsx(ct,{icon:"Close"})})]})})})}function Mp({children:t,customComponents:e,customIcons:n,featureFlags:o,fetchLocations:s,localizationConfig:r,locations:i=[],mapId:a,trackingConfig:l,customMarkers:c=[]}){const u=M(w=>w.shouldRefetch),d=M(w=>w.setShouldRefetch),f=M(w=>w.isShareSheetOpen),h=M(w=>w.toggleShareSheet),y=M(w=>w.featureFlags),g=M(w=>w.setFeatureFlags),b=M(w=>w.setMapId),v=M(w=>w.setLocalizationConfig),S=M(w=>w.setMapDetail),x=M(w=>w.setLocations),T=M(w=>w.isFullscreen),_=M(w=>w.setCustomMarkers),A=p.useRef(null),{request:D,loading:E,error:N}=Ne(ae.CLUSTERS),{request:O,loading:G,error:J}=Ne(ae.MARKERS),{request:Kt,loading:Nt,error:Wt}=Ne(ae.ALL_MARKERS),It=E||G||Nt,P=!!N||!!J||!!Wt;async function C(w){try{if(typeof w!="number"||w<0||isNaN(w))throw new Error("No map ID provided");const H=[];try{const{data:k}=await Kt({mapId:String(w)})??{};k&&Array.isArray(k)&&H.push(...k)}catch(k){console.warn("Error fetching markers",k)}x(H),S(St.CLUSTER)}catch(H){console.error("Error fetching all markers: ",H),B.error(At+nn),x([])}}async function I(w){var H;try{if(typeof w!="number"||w<0||isNaN(w))throw new Error("No map ID provided");const{data:k}=await D({mapId:String(w)})??{};if(!k)throw new Error("No cluster data received from the server");x((H=k.map)==null?void 0:H.call(k,rt=>({...rt,onMarkerClick:async()=>{await U(w,rt.id)}})))}catch(k){console.error("Error fetching clusters: ",k),B.error(At+nn),x([])}}async function U(w,H){try{if(typeof w!="number"||w<0||isNaN(w))throw new Error("No map ID provided");const{data:k}=await O({mapId:w,clusterId:H})??{};if(!k)throw new Error("No marker data received from the server");x(k),S(St.MARKER)}catch(k){console.error("Error fetching markers: ",k),B.error(At+nn),x([])}}return p.useEffect(()=>{r&&v(r),o&&g(o),c.length&&(o!=null&&o.withCustomMarkers)&&_(c),l&&Mt.initialize(l),typeof a=="number"&&a>0&&!isNaN(a)&&b(a),i!=null&&i.length?x(i):s?s().then(w=>x(w)):(o==null?void 0:o.withClusters)!==!1?I(a):C(a)},[]),p.useEffect(()=>{let w=!0;return u&&a&&((o==null?void 0:o.withClusters)!==!1?I:C)(a).finally(()=>{w&&d(!1)}),()=>{w=!1}},[u,a,y.withClusters]),m.jsx("div",{id:"dyn-locator",className:F("dyn-locator__locator",Uo.root),"data-fullscreen":T,children:m.jsxs(Lh,{customIcons:n,customComponents:e,children:[t,m.jsxs(Oo,{show:It||P,variant:"light",children:[It?m.jsx(ce,{size:"large"}):null,P?m.jsx(Yi,{title:Kf,message:nn,actionText:"ricaricare la pagina.",errorDetails:(N==null?void 0:N.message)||(J==null?void 0:J.message),onAction:w=>{w.preventDefault(),window.location.reload()}}):null]}),m.jsx(Pp,{isFullscreen:T}),m.jsx("div",{ref:A,className:eh}),y.share?m.jsx(Ap,{isOpen:f,onClose:()=>h(!1),portalContainer:A.current}):null]})})}function Ca({mapProvider:t,endpoints:e,apiUrl:n,children:o,...s}){return m.jsx(ah,{children:m.jsx(Ga,{children:m.jsx(Ya,{mapProvider:t,children:m.jsx(kh,{endpoints:e,apiUrl:n,children:m.jsx(Mp,{...s,children:o})})})})})}Ca.displayName="Locator";var ko,_a;function Lp(){return _a||(_a=1,ko=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var o,s,r;if(Array.isArray(e)){if(o=e.length,o!=n.length)return!1;for(s=o;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(r=Object.keys(e),o=r.length,o!==Object.keys(n).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,r[s]))return!1;for(s=o;s--!==0;){var i=r[s];if(!t(e[i],n[i]))return!1}return!0}return e!==e&&n!==n}),ko}var Dp=Lp();const Op=jo(Dp);function ut(){return ut=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ut.apply(null,arguments)}function Ht(t,e){if(t==null)return{};var n={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(e.indexOf(o)!==-1)continue;n[o]=t[o]}return n}function kp(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Np(t){var e=kp(t,"string");return typeof e=="symbol"?e:e+""}const tt={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Ip="https://maps.googleapis.com/maps/api/js";class Ie{static async load(e,n){var o;const s=e.libraries?e.libraries.split(","):[],r=this.serializeParams(e);this.listeners.push(n),(o=window.google)!=null&&(o=o.maps)!=null&&o.importLibrary?(this.serializedApiParams||(this.loadingStatus=tt.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=r,this.initImportLibrary(e)),this.serializedApiParams&&this.serializedApiParams!==r&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const i=["maps",...s];await Promise.all(i.map(a=>google.maps.importLibrary(a)))}static serializeParams(e){return[e.v,e.key,e.language,e.region,e.authReferrerPolicy,e.solutionChannel].join("/")}static initImportLibrary(e){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((s,r)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[c,u]of Object.entries(e)){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=Ip+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=tt.FAILED,this.notifyLoadingStatusListeners(),r(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=tt.LOADED,this.notifyLoadingStatusListeners(),s()},window.gm_authFailure=()=>{this.loadingStatus=tt.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=tt.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=s=>o().then(()=>google.maps.importLibrary(s))}static notifyLoadingStatusListeners(){for(const e of this.listeners)e(this.loadingStatus)}}Ie.loadingStatus=tt.NOT_LOADED,Ie.serializedApiParams=void 0,Ie.listeners=[];const Vp=["onLoad","onError","apiKey","version","libraries"],Bp=["children"],Fp="GMP_visgl_rgmlibrary_v1_default",Ve=p.createContext(null);function $p(){const[t,e]=p.useState({});return{mapInstances:t,addMapInstance:(r,i="default")=>{e(a=>ut({},a,{[i]:r}))},removeMapInstance:(r="default")=>{e(i=>Ht(i,[r].map(Np)))},clearMapInstances:()=>{e({})}}}function jp(t){const{onLoad:e,onError:n,apiKey:o,version:s,libraries:r=[]}=t,i=Ht(t,Vp),[a,l]=p.useState(Ie.loadingStatus),[c,u]=p.useReducer((y,g)=>y[g.name]?y:ut({},y,{[g.name]:g.value}),{}),d=p.useMemo(()=>r==null?void 0:r.join(","),[r]),f=p.useMemo(()=>JSON.stringify(ut({apiKey:o,version:s},i)),[o,s,i]),h=p.useCallback(async y=>{var g;if(c[y])return c[y];if(!((g=google)!=null&&(g=g.maps)!=null&&g.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const b=await window.google.maps.importLibrary(y);return u({name:y,value:b}),b},[c]);return p.useEffect(()=>{(async()=>{try{const y=ut({key:o},i);s&&(y.v=s),(d==null?void 0:d.length)>0&&(y.libraries=d),(y.channel===void 0||y.channel<0||y.channel>999)&&delete y.channel,y.solutionChannel===void 0?y.solutionChannel=Fp:y.solutionChannel===""&&delete y.solutionChannel,await Ie.load(y,g=>l(g));for(const g of["core","maps",...r])await h(g);e&&e()}catch(y){n?n(y):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",y)}})()},[o,d,f]),{status:a,loadedLibraries:c,importLibrary:h}}const zp=t=>{const{children:e}=t,n=Ht(t,Bp),{mapInstances:o,addMapInstance:s,removeMapInstance:r,clearMapInstances:i}=$p(),{status:a,loadedLibraries:l,importLibrary:c}=jp(n),u=p.useMemo(()=>({mapInstances:o,addMapInstance:s,removeMapInstance:r,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[o,s,r,i,a,l,c]);return p.createElement(Ve.Provider,{value:u},e)};function Up(t,e){for(const n of Rp){const o=e[n],s=wa[n];p.useEffect(()=>{if(!t||!o)return;const r=google.maps.event.addListener(t,s,i=>{o(Xp(s,t,i))});return()=>r.remove()},[t,s,o])}}function Xp(t,e,n){const o={type:t,map:e,detail:{},stoppable:!1,stop:()=>{}};if(Gp.includes(t)){const r=o,i=e.getCenter(),a=e.getZoom(),l=e.getHeading()||0,c=e.getTilt()||0,u=e.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"),r.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}},r}else if(Hp.includes(t)){var s;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const r=o;return r.domEvent=n.domEvent,r.stoppable=!0,r.stop=()=>n.stop(),r.detail={latLng:((s=n.latLng)==null?void 0:s.toJSON())||null,placeId:n.placeId},r}return o}const wa={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"},Gp=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Hp=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Rp=Object.keys(wa);function No(t,e){const n=p.useRef(void 0);(!n.current||!Op(e,n.current))&&(n.current=e),p.useEffect(t,n.current)}const Kp=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 Wp(t,e){const n={},o=Object.keys(e);for(const s of o)Kp.has(s)&&(n[s]=e[s]);No(()=>{t&&t.setOptions(n)},[n])}function Io(){var t;return((t=p.useContext(Ve))==null?void 0:t.status)||tt.NOT_LOADED}function qp(t,e){const{viewport:n,viewState:o}=e,s=!!n;return p.useLayoutEffect(()=>{if(!t||!o)return;const{latitude:r,longitude:i,bearing:a,pitch:l,zoom:c}=o;t.moveCamera({center:{lat:r,lng:i},heading:a,tilt:l,zoom:c+1})},[t,o]),s}function Yp(t){return!t||typeof t!="object"||!("lat"in t&&"lng"in t)?!1:Number.isFinite(t.lat)&&Number.isFinite(t.lng)}function Ta(t){return Yp(t)?t:t.toJSON()}function Zp(t,e,n){const o=n.center?Ta(n.center):null;let s=null,r=null;o&&Number.isFinite(o.lat)&&Number.isFinite(o.lng)&&(s=o.lat,r=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;p.useLayoutEffect(()=>{if(!t)return;const c={};let u=!1;s!==null&&r!==null&&(e.current.center.lat!==s||e.current.center.lng!==r)&&(c.center={lat:s,lng:r},u=!0),i!==null&&e.current.zoom!==i&&(c.zoom=i,u=!0),a!==null&&e.current.heading!==a&&(c.heading=a,u=!0),l!==null&&e.current.tilt!==l&&(c.tilt=l,u=!0),u&&t.moveCamera(c)})}const Jp=()=>{const t={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 p.createElement("div",{style:t},p.createElement("h2",null,"Error: AuthFailure"),p.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",p.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function Qp(){const[t,e]=p.useState(null),n=p.useCallback(o=>e(o),[e]);return[t,n]}function Ea(){return Io()===tt.LOADED}function tm(){const[,t]=p.useReducer(e=>e+1,0);return t}function em(t,e){const n=t.getCenter(),o=t.getZoom(),s=t.getHeading()||0,r=t.getTilt()||0,i=t.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(e.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:o||0,heading:s,tilt:r})}function nm(t){const e=tm(),n=p.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return p.useEffect(()=>{if(!t)return;const o=google.maps.event.addListener(t,"bounds_changed",()=>{em(t,n),e()});return()=>o.remove()},[t,e]),n}const om=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],sm=["padding"];class ln{static has(e){return this.entries[e]&&this.entries[e].length>0}static pop(e){return this.entries[e]&&this.entries[e].pop()||null}static push(e,n){this.entries[e]||(this.entries[e]=[]),this.entries[e].push(n)}}ln.entries={};function rm(t,e){const n=Ea(),[o,s]=p.useState(null),[r,i]=Qp(),a=nm(o),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:h,reuseMaps:y,renderingType:g,colorScheme:b}=t,v=Ht(t,om),S=t.zoom!==void 0||t.defaultZoom!==void 0,x=t.center!==void 0||t.defaultCenter!==void 0;!c&&(!S||!x)&&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(h)&&(v.tilt=h);for(const _ of Object.keys(v))v[_]===void 0&&delete v[_];const T=p.useRef(void 0);return p.useEffect(()=>{if(!r||!n)return;const{addMapInstance:_,removeMapInstance:A}=e,{mapId:D}=t,E=`${D||"default"}:${g||"default"}:${b||"LIGHT"}`;let N,O;if(y&&ln.has(E)?(O=ln.pop(E),N=O.getDiv(),r.appendChild(N),O.setOptions(v),setTimeout(()=>O.setCenter(O.getCenter()),0)):(N=document.createElement("div"),N.style.height="100%",r.appendChild(N),O=new google.maps.Map(N,ut({},v,g?{renderingType:g}:{},b?{colorScheme:b}:{}))),s(O),_(O,l),c){const{padding:G}=c,J=Ht(c,sm);O.fitBounds(J,G)}else(!S||!x)&&O.fitBounds({east:180,west:-180,south:-90,north:90});if(T.current){const{mapId:G,cameraState:J}=T.current;G!==D&&O.setOptions(J)}return()=>{T.current={mapId:D,cameraState:a.current},N.remove(),y?ln.push(E,O):google.maps.event.clearInstanceListeners(O),s(null),A(l)}},[r,n,l,t.mapId,t.renderingType,t.colorScheme]),[o,i,a]}const Aa=p.createContext(null),Pa=t=>{const{children:e,id:n,className:o,style:s}=t,r=p.useContext(Ve),i=Io();if(!r)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=rm(t,r);Zp(a,c,t),Up(a,t),Wp(a,t);const u=qp(a,t),d=!!t.controlled;p.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:t.gestureHandling,keyboardShortcuts:t.keyboardShortcuts})}},[a,u,d,t.gestureHandling,t.keyboardShortcuts]);const f=t.center?Ta(t.center):null;let h=null,y=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(h=f.lat,y=f.lng);const g=p.useMemo(()=>{var S,x,T,_,A;return{center:{lat:(S=h)!=null?S:0,lng:(x=y)!=null?x:0},zoom:(T=t.zoom)!=null?T:0,heading:(_=t.heading)!=null?_:0,tilt:(A=t.tilt)!=null?A:0}},[h,y,t.zoom,t.heading,t.tilt]);p.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(g);const S=a.addListener("bounds_changed",()=>{a.moveCamera(g)});return()=>S.remove()},[a,d,g]);const b=p.useMemo(()=>ut({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},s),[s,u]),v=p.useMemo(()=>({map:a}),[a]);return i===tt.AUTH_FAILURE?p.createElement("div",{style:ut({position:"relative"},o?{}:b),className:o},p.createElement(Jp,null)):p.createElement("div",ut({ref:l,"data-testid":"map",style:o?void 0:b,className:o},n?{id:n}:{}),a?p.createElement(Aa.Provider,{value:v},e):null)};Pa.deckGLViewProps=!0;const Ma=new Set;function im(...t){const e=JSON.stringify(t);Ma.has(e)||(Ma.add(e),console.error(...t))}const cn=(t=null)=>{const e=p.useContext(Ve),{map:n}=p.useContext(Aa)||{};if(e===null)return im("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}=e;return t!==null?o[t]||null:n||o.default||null};function un(t){const e=Ea(),n=p.useContext(Ve);return p.useEffect(()=>{!e||!n||n.importLibrary(t)},[e,n,t]),(n==null?void 0:n.loadedLibraries[t])||null}function le(t,e,n){p.useEffect(()=>{if(!t||!e||!n)return;const o=google.maps.event.addListener(t,e,n);return()=>o.remove()},[t,e,n])}function dn(t,e,n){p.useEffect(()=>{t&&(t[e]=n)},[t,e,n])}function La(t,e,n){p.useEffect(()=>{if(!(!t||!e||!n))return t.addEventListener(e,n),()=>t.removeEventListener(e,n)},[t,e,n])}function am(t){return t.content!==void 0}function lm(t){return t.nodeType===Node.ELEMENT_NODE}const cm=p.createContext(null),um={BOTTOM:["50%","100%"]},dm=({children:t,styles:e,className:n,anchorPoint:o})=>{const[s,r]=o??um.BOTTOM;let i=`-${s}`,a=`-${r}`;s.trimStart().startsWith("-")&&(i=s.substring(1)),r.trimStart().startsWith("-")&&(a=r.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return p.createElement("div",{style:{transform:l}},p.createElement("div",{className:n,style:e},t))};function fm(t){const[e,n]=p.useState(null),[o,s]=p.useState(null),r=cn(),i=un("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:h,onDragEnd:y,collisionBehavior:g,clickable:b,draggable:v,position:S,title:x,zIndex:T}=t,_=p.Children.count(a);return p.useEffect(()=>{if(!r||!i)return;const A=new i.AdvancedMarkerElement;A.map=r,n(A);let D=null;return _>0&&(D=document.createElement("div"),D.isCustomMarker=!0,A.content=D,s(D)),()=>{var E;A.map=null,(E=D)==null||E.remove(),n(null),s(null)}},[r,i,_]),p.useEffect(()=>{!e||!e.content||_>0||(e.content.className=c||"")},[e,c,_]),dn(e,"position",S),dn(e,"title",x??""),dn(e,"zIndex",T),dn(e,"collisionBehavior",g),p.useEffect(()=>{e&&(v!==void 0?e.gmpDraggable=v:f||h||y?e.gmpDraggable=!0:e.gmpDraggable=!1)},[e,v,f,y,h]),p.useEffect(()=>{if(!e)return;const A=b!==void 0||!!l||!!u||!!d;e.gmpClickable=A,A&&e!=null&&e.content&&lm(e.content)&&(e.content.style.pointerEvents="none",e.content.firstElementChild&&(e.content.firstElementChild.style.pointerEvents="all"))},[e,b,l,u,d]),le(e,"click",l),le(e,"drag",f),le(e,"dragstart",h),le(e,"dragend",y),La(e==null?void 0:e.element,"mouseenter",u),La(e==null?void 0:e.element,"mouseleave",d),[e,o]}const hm=p.forwardRef((t,e)=>{const{children:n,style:o,className:s,anchorPoint:r}=t,[i,a]=fm(t),l=p.useMemo(()=>i?{marker:i}:null,[i]);return p.useImperativeHandle(e,()=>i,[i]),a?p.createElement(cm.Provider,{value:l},Fe.createPortal(p.createElement(dm,{anchorPoint:r,styles:o,className:s},n),a)):null});function pm(t,e,n){if(e!=null&&typeof e!="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=t.style;if(n==null){if(e==null)return;for(const s in e)e.hasOwnProperty(s)&&Da(o,s,e[s]);return}for(const s in n)n.hasOwnProperty(s)&&(e==null||!e.hasOwnProperty(s))&&(s.indexOf("--")===0?o.setProperty(s,""):s==="float"?o.cssFloat="":o[s]="");if(e!=null)for(const s in e){const r=e[s];e.hasOwnProperty(s)&&n[s]!==r&&Da(o,s,r)}}function Da(t,e,n){const o=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":o?t.setProperty(e,n):typeof n=="number"&&n!==0&&!gm(e)?t[e]=n+"px":e==="float"?t.cssFloat=n:t[e]=(""+n).trim()}const mm=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function gm(t){return mm.has(t)}const ym=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],vm=t=>{const{children:e,headerContent:n,style:o,className:s,pixelOffset:r,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=t,u=Ht(t,ym),d=un("maps"),[f,h]=p.useState(null),y=p.useRef(null),g=p.useRef(null);p.useEffect(()=>{if(!d)return;y.current=document.createElement("div"),g.current=document.createElement("div");const S=u;r&&(S.pixelOffset=new google.maps.Size(r[0],r[1])),n&&(S.headerContent=typeof n=="string"?n:g.current);const x=new google.maps.InfoWindow(u);return x.setContent(y.current),h(x),()=>{var T,_;x.setContent(null),(T=y.current)==null||T.remove(),(_=g.current)==null||_.remove(),y.current=null,g.current=null,h(null)}},[d]);const b=p.useRef(null);p.useEffect(()=>{!f||!y.current||(pm(y.current,o||null,b.current),b.current=o||null,s!==y.current.className&&(y.current.className=s||""))},[f,s,o]),No(()=>{if(!f)return;const S=u;r?S.pixelOffset=new google.maps.Size(r[0],r[1]):S.pixelOffset=null,n?S.headerContent=typeof n=="string"?n:g.current:S.headerContent=null,f.setOptions(u)},[u,r,n]),le(f,"close",l),le(f,"closeclick",c);const v=cn();return No(()=>{if(!v||!f||i===null)return;const S=!!i,x={map:v};if(i&&(x.anchor=i,am(i)&&i.content instanceof Element)){const _=i.content,A=_==null?void 0:_.getBoundingClientRect();if(A&&_!=null&&_.isCustomMarker){var T;const D=(T=i.content.firstElementChild)==null?void 0:T.firstElementChild,E=D==null?void 0:D.getBoundingClientRect(),N=E.x-A.x+(E.width-A.width)/2,O=E.y-A.y,G=u;G.pixelOffset=new google.maps.Size(r?r[0]+N:N,r?r[1]+O:O),f.setOptions(G)}}return a!==void 0&&(x.shouldFocus=a),f.open(x),()=>{S&&f.set("anchor",null),f.close()}},[f,i,v,a,u,r]),p.createElement(p.Fragment,null,y.current&&Fe.createPortal(e,y.current),g.current!==null&&Fe.createPortal(n,g.current))},bm=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function Sm(t){const[e,n]=p.useState(null),o=cn(),{onClick:s,onDrag:r,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=t,u=Ht(t,bm),{position:d,draggable:f}=u;return p.useEffect(()=>{if(!o){o===void 0&&console.error("<Marker> has to be inside a Map component.");return}const h=new google.maps.Marker(u);return h.setMap(o),n(h),()=>{h.setMap(null),n(null)}},[o]),p.useEffect(()=>{if(!e)return;const h=e,y=google.maps.event;return s&&y.addListener(h,"click",s),r&&y.addListener(h,"drag",r),i&&y.addListener(h,"dragstart",i),a&&y.addListener(h,"dragend",a),l&&y.addListener(h,"mouseover",l),c&&y.addListener(h,"mouseout",c),e.setDraggable(!!f),()=>{y.clearInstanceListeners(h)}},[e,f,s,r,i,a,l,c]),p.useEffect(()=>{e&&u&&e.setOptions(u)},[e,u]),p.useEffect(()=>{f||!d||!e||e.setPosition(d)},[f,d,e]),e}const Oa=p.forwardRef((t,e)=>{const n=Sm(t);return p.useImperativeHandle(e,()=>n,[n]),p.createElement(p.Fragment,null)});function xm(){const[t,e]=p.useState(null);return[p.useCallback(o=>{e(o)},[]),t]}const kt={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 Cm({onLocationSelect:t}){var y;const e=la("locationCard"),n=M(g=>g.locations),{labels:o}=M(g=>g.localizationConfig),s=M(g=>g.isLocationListExpanded),r=M(g=>g.setIsLocationListExpanded),i=M(g=>g.selectedLocation),a=M(g=>g.setSelectedLocation),l=p.useRef({}),c=o["LocationList.header"],u=o["LocationList.locationDesignator"],d=(y=c==null?void 0:c.split)==null?void 0:y.call(c,/(\{:\d\})/g),f=p.useMemo(()=>(d??[]).map((g,b)=>g==="{:1}"?m.jsx("span",{className:kt.highlighted,children:(n==null?void 0:n.length)??0},b):g==="{:2}"?m.jsx("span",{className:kt.highlighted,children:u},b):g),[u,n.length,d]);function h(g){return()=>{t==null||t(g.coords),a==null||a(g.id)}}return p.useEffect(()=>{if(i&&s){const g=l.current[i];g!=null&&g.current&&requestAnimationFrame(()=>{const b=window.scrollY;g.current.scrollIntoView({behavior:"smooth",block:"start"}),window.scrollTo({top:b,behavior:"auto"})})}},[i,s]),m.jsxs("div",{className:F("dyn-locator__location-list",kt.root),"data-expanded":s,children:[m.jsxs("header",{className:kt.header,onClick:()=>r(!s),role:"button","aria-expanded":s,children:[m.jsx("span",{children:f}),m.jsx(Pt,{className:kt.toggleButton,variant:"bare",children:m.jsx(ct,{className:kt.toggleButtonIcon,animate:!1,icon:"ChevronUp"})})]}),m.jsx("div",{className:kt.body,children:n!=null&&n.length?n.map(g=>{const b=g.id;l.current[b]||(l.current[b]=p.createRef());const v=l.current[b];return m.jsx(e,{ref:v,"data-active":i===g.id,onClick:h(g),...g},g.id)}):m.jsx("div",{className:kt.noResults,children:o["LocationList.noResults"]})})]})}const vt={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"},fn={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function _m({id:t,title:e,address:n,coords:o,actions:s,onClick:r,onRightButtonClick:i,markerType:a}){var v;const{labels:l}=M(S=>S.localizationConfig),c=M(S=>S.selectedLocation),u=M(S=>S.featureFlags),d=M(S=>S.customMarkers),f=M(S=>S.setSelectedLocation),[h,y]=xm(),g=p.useCallback(()=>{f==null||f("")},[f]),b=S=>{const x=d.find(_=>_.markerType===S),T=x==null?void 0:x.component;return T?m.jsx(T,{}):null};return m.jsxs(m.Fragment,{children:[u.withCustomMarkers&&a&&a!=="default"?m.jsx(hm,{onClick:()=>{r==null||r()},position:o,ref:h,children:b(a)}):m.jsx(Oa,{ref:h,position:o,onClick:()=>{r==null||r()}}),c===t?m.jsxs(vm,{anchor:y,headerContent:e,onCloseClick:g,className:fn.root,children:[m.jsxs("header",{className:fn.header,children:[m.jsx("h6",{children:e}),m.jsx("address",{children:n})]}),m.jsx("div",{className:fn.body,children:m.jsxs("div",{className:fn.cta,children:[m.jsx(De,{animate:!1,variant:"secondary",size:"small",...Gi((v=s==null?void 0:s.find)==null?void 0:v.call(s,S=>S.type==="navigate")),children:l["InfoWindow.CTA_1"]}),m.jsx(De,{animate:!1,variant:"secondary",size:"small",onClick:i,children:l["InfoWindow.CTA_2"]})]})})]}):null]})}function wm(t){return"size"in t&&"range"in t&&"onMarkerClick"in t}function Tm(t){return"title"in t&&!("size"in t)}function Em(){var P;const[t,e]=p.useState({zoom:Ui}),[n,o]=p.useState(!1),[s,r]=p.useState("inactive"),i=p.useRef(""),a=Io(),{request:l,loading:c}=Ne(ae.FIND),u=M(C=>C.mapId),d=M(C=>C.featureFlags),{labels:f}=M(C=>C.localizationConfig),h=M(C=>C.locations),y=M(C=>C.setLocations),g=M(C=>C.targetLocation),b=M(C=>C.clearTargetLocation),v=M(C=>C.mapDetail),S=M(C=>C.setMapDetail),x=M(C=>C.isFullscreen),T=M(C=>C.setFullscreen),_=M(C=>C.isLocationListExpanded),A=M(C=>C.setIsLocationListExpanded),D=M(C=>C.shouldRefetch),E=M(C=>C.setShouldRefetch),N=M(C=>C.setSelectedLocation),O=v===St.MARKER;function G({detail:C}){const{center:I,zoom:U}=C;e({center:I,zoom:U}),n||o(!0)}function J(){n&&t.center&&s==="inactive"&&r("active")}function Kt(C){e(I=>({center:C,zoom:I.zoom}))}function Nt(){r("inactive"),N(""),A(!1),S(St.CLUSTER),e({center:sh,zoom:Ui}),E(!0)}const Wt=p.useCallback(async()=>{if(!t.center)return;const{lat:C,lng:I}=t.center,U={location:{type:"Feature",geometry:{type:"Point",coordinates:[I,C]},properties:{}},distance:Xi};try{const{data:w}=await l({mapId:u},{body:U})??{};if(!(w!=null&&w.pins))throw new Error("No locations found");y(w.pins),S(St.MARKER),r("inactive")}catch(w){console.error("Error finding locations in this area: ",w),B.error(At+Zf)}},[t.center,l,S,u,y]);function It(C){function I(){e({center:C.coords,zoom:18}),_||A(!0)}if(wm(C))return m.jsx(Oa,{position:C.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(C.range??0)/nh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await C.onMarkerClick(),e({center:C.coords,zoom:C.zoom||15})}},C.id);if(Tm(C)){const U=C.id,w=C.title??"No title",H=C.address??"No address",k=C.coords,rt=C.actions,Be=C.markerType;return m.jsx(_m,{id:U,title:w,address:H,coords:k,actions:rt,markerType:Be,onRightButtonClick:I,onClick:()=>{N(C.id)}},U)}}if(p.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),p.useEffect(()=>{g&&(e({center:g.coords,zoom:g.zoom}),b())},[g,b]),a===tt.LOADING)return m.jsx("div",{className:F("dyn-locator__map",vt.root),children:m.jsx("div",{className:vt.loaderContainer,children:m.jsx(ce,{size:"large"})})});if(a===tt.FAILED||a===tt.AUTH_FAILURE)throw new Error(Yf);if(a===tt.LOADED)return m.jsxs("div",{className:F("dyn-locator__map",vt.root),children:[d.fullscreen?m.jsx(Pt,{className:F(vt.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>T==null?void 0:T(!x),children:m.jsx(ct,{size:"M",icon:x?"Close":"Expand"})}):null,O?m.jsx(Pt,{className:F(vt.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:Nt,children:m.jsx(ct,{size:"M",icon:"ArrowLeft"})}):null,s!=="inactive"&&m.jsxs(De,{className:F(vt.areaSearchButton,"dyn-locator__map__area-search-button",O&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||s==="select_area",loading:c,onClick:()=>r("select_area"),children:[m.jsx(fl,{}),f["Map.areaSearchButton"]]}),s==="select_area"&&m.jsxs("div",{className:vt.visualCue,children:[m.jsxs("i",{children:[m.jsx("button",{className:vt.closeButton,onClick:()=>r("active"),"aria-label":"Close area search",children:m.jsx(Ho,{size:16})}),m.jsx(hl,{size:48,strokeWidth:1,color:"currentColor"})]}),m.jsxs(De,{className:vt.searchButton,disabled:c,loading:c,onClick:Wt,size:"small",variant:"themed",children:[f["Map.areaSearchVisualCueCTA"]," ",m.jsx(nl,{size:22,style:{position:"relative",left:-8}})]})]}),m.jsx(Pa,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...t,onCameraChanged:G,onDragend:J,defaultBounds:Le,mapId:"DEMO_MAP_ID",children:!D&&((P=h==null?void 0:h.map)==null?void 0:P.call(h,It))}),O?m.jsx(Cm,{onLocationSelect:Kt}):null]})}const bt={root:"_root_1nmik_10",validIcon:"_validIcon_1nmik_20",errorIcon:"_errorIcon_1nmik_27",label:"_label_1nmik_48",input:"_input_1nmik_58",sideButton:"_sideButton_1nmik_89",sideOrnament:"_sideOrnament_1nmik_92",clearButton:"_clearButton_1nmik_126",dropdown:"_dropdown_1nmik_166"},ka="Input";function Na({label:t,className:e,showValidation:n=!0,error:o=!1,valid:s=!1,clearable:r=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:h,sideOrnament:y,...g},b){const v=a?Ut.div:"div",S=Et(g)??[],x=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return m.jsxs(v,{className:F("dyn-locator__"+pt(ka),bt.root,ht(e),...S??[]),"data-valid":s,"data-error":o,"data-expanded":u,"data-side-button":!!h,...f?{style:f}:{},...x,children:[n&&m.jsxs(m.Fragment,{children:[s&&m.jsx("span",{className:bt.validIcon}),o&&m.jsx("span",{className:bt.errorIcon})]}),t?m.jsx("label",{className:bt.label,...g.id?{htmlFor:g.id}:{},children:t}):null,y?m.jsx("span",{className:bt.sideOrnament,children:y}):null,m.jsx("input",{ref:b,className:F(bt.input),"aria-label":d,"aria-invalid":o,"data-side-button":!!h,"data-side-ornament":!!y,...g}),h?m.jsx("span",{className:bt.sideButton,children:h}):null,r&&(g==null?void 0:g.value)&&m.jsx("button",{className:bt.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&m.jsx("div",{className:bt.dropdown,children:c})]})}Na.displayName=ka;const Am=p.forwardRef(Na),Rt={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 Pm(){const[t,e]=p.useState(""),[n,o]=p.useState([]),[s,r]=p.useState(!1),[i,a]=p.useState(!1),[l,c]=p.useState(!1),u=M(P=>P.mapId),d=M(P=>P.setLocations),f=M(P=>P.setMapDetail),h=M(P=>P.zoomToLocation),{labels:y}=M(P=>P.localizationConfig),{search:g}=M(P=>P.featureFlags),{request:b,loading:v}=Ne(ae.FIND),S=un("places"),x=un("geocoding"),T=cn(),_=p.useRef(null),A=p.useRef(null),D=p.useRef(null),E=p.useRef(null);p.useEffect(()=>{x&&(D.current||(D.current=new x.Geocoder))},[x]),p.useEffect(()=>{S&&(_.current||(_.current=new S.AutocompleteService),E.current||(E.current=new S.AutocompleteSessionToken))},[S]),p.useEffect(()=>{!S||!T||A.current||(A.current=new S.PlacesService(T))},[S,T]);const N=p.useCallback(rh(async P=>{var C;if(!P||P.length<3){o([]),r(!1);return}a(!0);try{if(!S||!_.current)throw new Error("Places library or Autocomplete Service not available");const I=await _.current.getPlacePredictions({input:P,...E.current?{sessionToken:E.current}:{}});if(a(!1),!((C=I==null?void 0:I.predictions)!=null&&C.length)){o([]),r(!1);return}o(I.predictions),r(!0)}catch(I){console.error("Error fetching predictions: ",I),a(!1),o([]),r(!1),B.error(At+Wf)}},oh),[S]),O=P=>{const C=P.currentTarget.value;if(e(C),!C||C.length<3){o([]),r(!1);return}N(C)},G=async P=>{var C,I,U,w,H;e(P.description),r(!1);try{if(!S||!A.current)throw new Error("Places library or Places Service not available");const k=await new Promise((rt,Be)=>{A.current.getDetails({placeId:P.place_id,fields:["geometry","address_components","formatted_address"],...E.current?{sessionToken:E.current}:{}},(Vo,Ia)=>{if(Ia===S.PlacesServiceStatus.OK&&Vo){rt(Vo);try{Mt.isEventEnabled(ot.AUTOCOMPLETE_ITEM_SELECT)&&Mt.track(ot.AUTOCOMPLETE_ITEM_SELECT,{label:P.description,...ih(Vo)})}catch(Im){console.error(`Could not track event: "${ot.AUTOCOMPLETE_ITEM_SELECT}"`,Im)}}else Be(new Error(`Place details request failed with status: ${Ia}`))})});if((C=k==null?void 0:k.geometry)!=null&&C.location){const rt=(U=(I=k.geometry.location).lat)==null?void 0:U.call(I),Be=(H=(w=k.geometry.location).lng)==null?void 0:H.call(w);await Wt({lat:rt,lng:Be})}}catch(k){console.error("Error getting place details:",k),B.error(At+qf)}finally{S&&(E.current=new S.AutocompleteSessionToken)}},J=()=>{e(""),o([]),r(!1)},Kt=()=>!s||n.length===0?null:m.jsx("div",{className:Rt.predictionsContainer,children:i?m.jsx("div",{className:Rt.loadingItem,children:m.jsx(ce,{size:"medium"})}):n.map(P=>m.jsx("div",{className:Rt.predictionItem,onClick:()=>G(P),children:P.description},P.place_id))});async function Nt(P){P.preventDefault(),c(!0);try{const C=await new Promise((w,H)=>{navigator.geolocation.getCurrentPosition(k=>w(k),k=>H(k),{timeout:5e3})}),I={lat:C.coords.latitude,lng:C.coords.longitude};if(await Wt(I),!x||!(D!=null&&D.current)||!T)throw new Error("Geocoding library or Geocoder not available");const U=await new Promise((w,H)=>{D.current.geocode({location:I},(k,rt)=>{rt===google.maps.GeocoderStatus.OK&&k&&k.length>0?w(k):H(new Error(`Geocoding failed with status: ${rt}`))})});U&&U[0]&&e(U[0].formatted_address)}catch(C){console.error("Error getting location: ",C);const I=C instanceof GeolocationPositionError?At+C.message:At+Rf;B.error(I)}finally{c(!1)}}async function Wt(P){const{lng:C,lat:I}=P,U={location:{type:"Feature",geometry:{type:"Point",coordinates:[C,I]},properties:{}},distance:Xi/2};try{const{data:w}=await b({mapId:u},{body:U})??{};if(!(w!=null&&w.pins))throw new Error("No locations found");d(w.pins),f(St.MARKER),h({lat:I,lng:C},w.zoom||15)}catch(w){throw console.error("Error finding locations: ",w),w}}const It=v||l;return g?m.jsxs("div",{className:F("dyn-locator__search",Rt.root),children:[m.jsx(Am,{name:"locator_search_field",className:F("dyn-locator__search__field",Rt.input),value:t,onChange:O,placeholder:y["Search.placeholder"],dropdown:Kt(),dropdownVisible:s,disabled:It,sideOrnament:t?void 0:m.jsx(ct,{className:Rt.sideOrnament,icon:"Search",size:"M"}),sideButton:t?m.jsx(Pt,{variant:"bare",className:Rt.clearButton,onClick:J,"aria-label":"Clear",children:m.jsx(ct,{icon:"Close",size:"M"})}):m.jsx(Ki,{href:"#",onClick:Nt,children:y["Search.geolocationButton"]})}),m.jsx(Oo,{show:It,children:m.jsx(ce,{size:"medium"})})]}):null}function Mm({children:t,apiKey:e,language:n,region:o,libraries:s}){return m.jsx(zp,{apiKey:e,region:o,language:n,libraries:s,children:t})}const Lm=Object.freeze(Object.defineProperty({__proto__:null,default:Mm},Symbol.toStringTag,{value:"Module"}));function Dm(){throw new Error("Mapbox provider is not implemented yet")}const Om=Object.freeze(Object.defineProperty({__proto__:null,default:Dm},Symbol.toStringTag,{value:"Module"}));function km(){throw new Error("HERE Maps provider is not implemented yet")}const Nm=Object.freeze(Object.defineProperty({__proto__:null,default:km},Symbol.toStringTag,{value:"Module"}));X.Map=Em,X.Search=Pm,X.TrackingEvent=ot,X.default=Ca,X.trackingService=Mt,Object.defineProperties(X,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
285
+ `,xn=16,fm=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,containerStyle:o,containerClassName:i})=>{let{toasts:a,handlers:l}=zp(n);return q.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:xn,left:xn,right:xn,bottom:xn,pointerEvents:"none",...o},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),f=um(u,d);return q.createElement(cm,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?dm:"",style:f},c.type==="custom"?Sn(c.message,c):s?s(c):q.createElement(Ka,{toast:c,position:u}))}))};const hm={root:"_root_movxa_4"};function Hr({className:e,children:t,show:n=!0,variant:r="light",...s}){const o=$("dyn-locator__overlay",hm.root,e);return n?y.jsx("div",{className:o,"data-variant":r,...s,children:t}):null}function Wt(e){const[t,n]=g.useState(!1),[r,s]=g.useState(null),{getEndpoint:o}=xp(e);return{request:async(a={},l={})=>{n(!0),s(null);try{let c;try{c=o(a)}catch{throw new Error(`Endpoint "${e}" is not configured. The host application must provide all required endpoints.`)}const{url:u,method:d}=c,f=await fetch(u,{method:d,headers:{"Content-Type":"application/json",...l.headers},...d!=="GET"&&l.body?{body:JSON.stringify(l.body)}:{}});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return{data:await f.json()}}catch(c){const u=c instanceof Error?c:new Error(String(c));throw s(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:r}}const Be={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"},pm={root:"_root_1re47_4"};function mm({children:e,className:t,position:n="top"}){return y.jsx("span",{className:$("dyn-locator__tooltip",pm.root,t),role:"tooltip","aria-hidden":"true","data-position":n,children:e})}function gm({isOpen:e,onClose:t,portalContainer:n=document.body}){var c,u;const{labels:r}=M(d=>d.localizationConfig),s=M(d=>d.locations),o=M(d=>d.selectedLocation),i=g.useMemo(()=>o?s.find(d=>d.id===o):void 0,[s,o]);function a(d){const{name:f,shareURL:p}=d;switch(f){case"facebook":return{style:{"--icon-button-bg":"#1877F2","--icon-button-hover-bg":"#0a4992"},href:p??"#",target:"_blank",rel:"noopener noreferrer"};case"x":case"twitter":return{style:{"--icon-button-bg":"#000","--icon-button-hover-bg":"#333"},href:p??"#",target:"_blank",rel:"noopener noreferrer"};case"whatsapp":return{style:{"--icon-button-bg":"#25D366","--icon-button-hover-bg":"#167d3c"},href:p??"#",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:p??"#"};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(p).then(()=>{B.success(r["ShareSheet.copyLinkSuccessNotif"])}).catch(m=>{B.error(r["ShareSheet.copyLinkErrorNotif"]),console.error("Failed to copy link: ",m)})}};default:return{}}}if(!e)return null;const l=y.jsx(Hr,{show:e,variant:"dark",onClick:t,children:y.jsxs("div",{className:$("dyn-locator__share-sheet",Be.content),onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"share-sheet-title",children:[y.jsxs("header",{className:Be.header,children:[y.jsx("h2",{id:"share-sheet-title",className:Be.title,children:r["ShareSheet.title"]}),y.jsx(De,{className:Be.closeButton,onClick:t,"aria-label":"Close",variant:"bare",children:y.jsx(he,{icon:"Close"})})]}),y.jsxs("div",{className:Be.body,children:[i&&y.jsxs("div",{className:Be.locationInfo,children:[y.jsx("h3",{children:i.title}),y.jsx("p",{children:i.address})]}),y.jsx("div",{className:Be.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:p}=d,h=f.charAt(0).toUpperCase()+f.slice(1),m=f==="copy"?r["ShareSheet.copyLinkTooltip"]:f==="email"?r["ShareSheet.shareViaEmailTooltip"]:r["ShareSheet.genericShareTooltip"]+h;return y.jsxs(De,{as:"a",href:p,variant:"negative",className:Be.shareButton,...a(d),children:[y.jsx(he,{icon:h,size:"M"}),y.jsx(mm,{children:m})]})})})]})]})});return n?en.createPortal(l,n):l}function ym({isFullscreen:e}){return y.jsx(fm,{...e?{}:{containerStyle:{position:"absolute"}},toastOptions:{position:e?"top-center":"bottom-right",duration:3e3,error:{duration:1/0}},children:t=>y.jsx(Ka,{toast:t,children:({icon:n,message:r})=>y.jsxs(y.Fragment,{children:[n,r,t.type==="error"&&y.jsx(De,{variant:"bare",onClick:()=>B.dismiss(t.id),children:y.jsx(he,{icon:"Close"})})]})})})}function vm({children:e,customComponents:t,customIcons:n,featureFlags:r,fetchLocations:s,localizationConfig:o,locations:i=[],mapId:a,trackingConfig:l,customMarkers:c=[],customInfoWindow:u=null,customZoomLevels:d=null,clusteringProvider:f=Ye.AIRC}){const p=M(A=>A.shouldRefetch),h=M(A=>A.setShouldRefetch),m=M(A=>A.isShareSheetOpen),v=M(A=>A.toggleShareSheet),b=M(A=>A.featureFlags),C=M(A=>A.setFeatureFlags),S=M(A=>A.setMapId),x=M(A=>A.setLocalizationConfig),w=M(A=>A.setMapDetail),_=M(A=>A.setLocations),P=M(A=>A.isFullscreen),T=M(A=>A.setCustomMarkers),N=M(A=>A.setCustomInfoWindow),k=M(A=>A.setCustomZoomLevels),X=M(A=>A.setClusteringProvider),te=g.useRef(null),{request:ot,loading:Ue,error:me}=Wt(Ct.CLUSTERS),{request:it,loading:O,error:D}=Wt(Ct.MARKERS),{request:V,loading:Z,error:E}=Wt(Ct.ALL_MARKERS),G=Ue||O||Z,F=!!me||!!D||!!E;async function W(A){try{if(typeof A!="number"||A<0||isNaN(A))throw new Error("No map ID provided");const se=[];try{const{data:K}=await V({mapId:String(A)})??{};K&&Array.isArray(K)&&se.push(...K)}catch(K){console.warn("Error fetching markers",K)}_(se),w(Ee.CLUSTER)}catch(se){console.error("Error fetching all markers: ",se),B.error(ke+bn),_([])}}async function Xe(A){var se;try{if(typeof A!="number"||A<0||isNaN(A))throw new Error("No map ID provided");const{data:K}=await ot({mapId:String(A)})??{};if(!K)throw new Error("No cluster data received from the server");_((se=K.map)==null?void 0:se.call(K,El=>({...El,onMarkerClick:async()=>{await at(A,El.id)}})))}catch(K){console.error("Error fetching clusters: ",K),B.error(ke+bn),_([])}}async function at(A,se){try{if(typeof A!="number"||A<0||isNaN(A))throw new Error("No map ID provided");const{data:K}=await it({mapId:A,clusterId:se})??{};if(!K)throw new Error("No marker data received from the server");_(K),w(Ee.MARKER)}catch(K){console.error("Error fetching markers: ",K),B.error(ke+bn),_([])}}return g.useEffect(()=>{o&&x(o),r&&C(r),c.length&&(r!=null&&r.withCustomMarkers)&&T(c),u&&(r!=null&&r.withCustomInfoWindow)&&N(u),d&&k(d),f&&X(f),l&&Ne.initialize(l),typeof a=="number"&&a>0&&!isNaN(a)&&S(a),i!=null&&i.length?_(i):s?s().then(A=>_(A)):(r?r.withClusters&&f===Ye.AIRC:b.withClusters&&f===Ye.AIRC)?Xe(a):W(a)},[]),g.useEffect(()=>{let A=!0;return p&&a&&((r?r.withClusters&&f===Ye.AIRC:b.withClusters&&f===Ye.AIRC)?Xe:W)(a).finally(()=>{A&&h(!1)}),()=>{A=!1}},[p,a,b.withClusters]),y.jsx("div",{id:"dyn-locator",className:$("dyn-locator__locator",hs.root),"data-fullscreen":P,children:y.jsxs(bp,{customIcons:n,customComponents:t,children:[e,y.jsxs(Hr,{show:G||F,variant:"light",children:[G?y.jsx(wt,{size:"large"}):null,F?y.jsx(xa,{title:Bh,message:bn,actionText:"ricaricare la pagina.",errorDetails:(me==null?void 0:me.message)||(D==null?void 0:D.message),onAction:A=>{A.preventDefault(),window.location.reload()}}):null]}),y.jsx(ym,{isFullscreen:P}),y.jsx("div",{ref:te,className:qh}),b.share?y.jsx(gm,{isOpen:m,onClose:()=>v(!1),portalContainer:te.current}):null]})})}function Ha({mapProvider:e,endpoints:t,apiUrl:n,children:r,...s}){return y.jsx(Zh,{children:y.jsx(Nl,{children:y.jsx(jl,{mapProvider:e,children:y.jsx(wp,{endpoints:t,apiUrl:n,children:y.jsx(vm,{...s,children:r})})})})})}Ha.displayName="Locator";var Zr,Za;function bm(){return Za||(Za=1,Zr=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,s,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[s]))return!1;for(s=r;s--!==0;){var i=o[s];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),Zr}var Cm=bm();const Sm=ds(Cm);function pe(){return pe=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},pe.apply(null,arguments)}function et(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 wm(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 xm(e){var t=wm(e,"string");return typeof t=="symbol"?t:t+""}const oe={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},_m="https://maps.googleapis.com/maps/api/js";class Kt{static async load(t,n){var r;const s=t.libraries?t.libraries.split(","):[],o=this.serializeParams(t);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=oe.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=o,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==o&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const i=["maps",...s];await Promise.all(i.map(a=>google.maps.importLibrary(a)))}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((s,o)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[c,u]of Object.entries(t)){const d=c.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(u))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=_m+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=oe.FAILED,this.notifyLoadingStatusListeners(),o(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=oe.LOADED,this.notifyLoadingStatusListeners(),s()},window.gm_authFailure=()=>{this.loadingStatus=oe.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=oe.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=s=>r().then(()=>google.maps.importLibrary(s))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}Kt.loadingStatus=oe.NOT_LOADED,Kt.serializedApiParams=void 0,Kt.listeners=[];const Em=["onLoad","onError","apiKey","version","libraries"],Tm=["children"],Am="GMP_visgl_rgmlibrary_v1_default",Ht=g.createContext(null);function Mm(){const[e,t]=g.useState({});return{mapInstances:e,addMapInstance:(o,i="default")=>{t(a=>pe({},a,{[i]:o}))},removeMapInstance:(o="default")=>{t(i=>et(i,[o].map(xm)))},clearMapInstances:()=>{t({})}}}function Pm(e){const{onLoad:t,onError:n,apiKey:r,version:s,libraries:o=[]}=e,i=et(e,Em),[a,l]=g.useState(Kt.loadingStatus),[c,u]=g.useReducer((h,m)=>h[m.name]?h:pe({},h,{[m.name]:m.value}),{}),d=g.useMemo(()=>o==null?void 0:o.join(","),[o]),f=g.useMemo(()=>JSON.stringify(pe({apiKey:r,version:s},i)),[r,s,i]),p=g.useCallback(async h=>{var m;if(c[h])return c[h];if(!((m=google)!=null&&(m=m.maps)!=null&&m.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const v=await window.google.maps.importLibrary(h);return u({name:h,value:v}),v},[c]);return g.useEffect(()=>{(async()=>{try{const h=pe({key:r},i);s&&(h.v=s),(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=Am:h.solutionChannel===""&&delete h.solutionChannel,await Kt.load(h,m=>l(m));for(const m of["core","maps",...o])await p(m);t&&t()}catch(h){n?n(h):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",h)}})()},[r,d,f]),{status:a,loadedLibraries:c,importLibrary:p}}const Lm=e=>{const{children:t}=e,n=et(e,Tm),{mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i}=Mm(),{status:a,loadedLibraries:l,importLibrary:c}=Pm(n),u=g.useMemo(()=>({mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[r,s,o,i,a,l,c]);return g.createElement(Ht.Provider,{value:u},t)};function Om(e,t){for(const n of Im){const r=t[n],s=Ya[n];g.useEffect(()=>{if(!e||!r)return;const o=google.maps.event.addListener(e,s,i=>{r(km(s,e,i))});return()=>o.remove()},[e,s,r])}}function km(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(Dm.includes(e)){const o=r,i=t.getCenter(),a=t.getZoom(),l=t.getHeading()||0,c=t.getTilt()||0,u=t.getBounds();return(!i||!u||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),o.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:l,tilt:c,bounds:(u==null?void 0:u.toJSON())||{north:90,east:180,south:-90,west:-180}},o}else if(Nm.includes(e)){var s;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const o=r;return o.domEvent=n.domEvent,o.stoppable=!0,o.stop=()=>n.stop(),o.detail={latLng:((s=n.latLng)==null?void 0:s.toJSON())||null,placeId:n.placeId},o}return r}const Ya={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},Dm=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Nm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Im=Object.keys(Ya);function Yr(e,t){const n=g.useRef(void 0);(!n.current||!Sm(t,n.current))&&(n.current=t),g.useEffect(e,n.current)}const Vm=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 Bm(e,t){const n={},r=Object.keys(t);for(const s of r)Vm.has(s)&&(n[s]=t[s]);Yr(()=>{e&&e.setOptions(n)},[n])}function Jr(){var e;return((e=g.useContext(Ht))==null?void 0:e.status)||oe.NOT_LOADED}function Fm(e,t){const{viewport:n,viewState:r}=t,s=!!n;return g.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:o,longitude:i,bearing:a,pitch:l,zoom:c}=r;e.moveCamera({center:{lat:o,lng:i},heading:a,tilt:l,zoom:c+1})},[e,r]),s}function $m(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 $m(e)?e:e.toJSON()}function jm(e,t,n){const r=n.center?Ja(n.center):null;let s=null,o=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(s=r.lat,o=r.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,l=Number.isFinite(n.tilt)?n.tilt:null;g.useLayoutEffect(()=>{if(!e)return;const c={};let u=!1;s!==null&&o!==null&&(t.current.center.lat!==s||t.current.center.lng!==o)&&(c.center={lat:s,lng:o},u=!0),i!==null&&t.current.zoom!==i&&(c.zoom=i,u=!0),a!==null&&t.current.heading!==a&&(c.heading=a,u=!0),l!==null&&t.current.tilt!==l&&(c.tilt=l,u=!0),u&&e.moveCamera(c)})}const zm=()=>{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 Um(){const[e,t]=g.useState(null),n=g.useCallback(r=>t(r),[t]);return[e,n]}function Qa(){return Jr()===oe.LOADED}function Xm(){const[,e]=g.useReducer(t=>t+1,0);return e}function Rm(e,t){const n=e.getCenter(),r=e.getZoom(),s=e.getHeading()||0,o=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:s,tilt:o})}function qm(e){const t=Xm(),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",()=>{Rm(e,n),t()});return()=>r.remove()},[e,t]),n}const Gm=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],Wm=["padding"];class _n{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)}}_n.entries={};function Km(e,t){const n=Qa(),[r,s]=g.useState(null),[o,i]=Um(),a=qm(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:p,reuseMaps:h,renderingType:m,colorScheme:v}=e,b=et(e,Gm),C=e.zoom!==void 0||e.defaultZoom!==void 0,S=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!C||!S)&&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"),!b.center&&u&&(b.center=u),!b.zoom&&Number.isFinite(d)&&(b.zoom=d),!b.heading&&Number.isFinite(f)&&(b.heading=f),!b.tilt&&Number.isFinite(p)&&(b.tilt=p);for(const w of Object.keys(b))b[w]===void 0&&delete b[w];const x=g.useRef(void 0);return g.useEffect(()=>{if(!o||!n)return;const{addMapInstance:w,removeMapInstance:_}=t,{mapId:P}=e,T=`${P||"default"}:${m||"default"}:${v||"LIGHT"}`;let N,k;if(h&&_n.has(T)?(k=_n.pop(T),N=k.getDiv(),o.appendChild(N),k.setOptions(b),setTimeout(()=>k.setCenter(k.getCenter()),0)):(N=document.createElement("div"),N.style.height="100%",o.appendChild(N),k=new google.maps.Map(N,pe({},b,m?{renderingType:m}:{},v?{colorScheme:v}:{}))),s(k),w(k,l),c){const{padding:X}=c,te=et(c,Wm);k.fitBounds(te,X)}else(!C||!S)&&k.fitBounds({east:180,west:-180,south:-90,north:90});if(x.current){const{mapId:X,cameraState:te}=x.current;X!==P&&k.setOptions(te)}return()=>{x.current={mapId:P,cameraState:a.current},N.remove(),h?_n.push(T,k):google.maps.event.clearInstanceListeners(k),s(null),_(l)}},[o,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const el=g.createContext(null),tl=e=>{const{children:t,id:n,className:r,style:s}=e,o=g.useContext(Ht),i=Jr();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=Km(e,o);jm(a,c,e),Om(a,e),Bm(a,e);const u=Fm(a,e),d=!!e.controlled;g.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,u,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?Ja(e.center):null;let p=null,h=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(p=f.lat,h=f.lng);const m=g.useMemo(()=>{var C,S,x,w,_;return{center:{lat:(C=p)!=null?C:0,lng:(S=h)!=null?S:0},zoom:(x=e.zoom)!=null?x:0,heading:(w=e.heading)!=null?w:0,tilt:(_=e.tilt)!=null?_:0}},[p,h,e.zoom,e.heading,e.tilt]);g.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(m);const C=a.addListener("bounds_changed",()=>{a.moveCamera(m)});return()=>C.remove()},[a,d,m]);const v=g.useMemo(()=>pe({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},s),[s,u]),b=g.useMemo(()=>({map:a}),[a]);return i===oe.AUTH_FAILURE?g.createElement("div",{style:pe({position:"relative"},r?{}:v),className:r},g.createElement(zm,null)):g.createElement("div",pe({ref:l,"data-testid":"map",style:r?void 0:v,className:r},n?{id:n}:{}),a?g.createElement(el.Provider,{value:b},t):null)};tl.deckGLViewProps=!0;const nl=new Set;function Hm(...e){const t=JSON.stringify(e);nl.has(t)||(nl.add(t),console.error(...e))}const Zt=(e=null)=>{const t=g.useContext(Ht),{map:n}=g.useContext(el)||{};if(t===null)return Hm("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 En(e){const t=Qa(),n=g.useContext(Ht);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 Tn(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 Zm(e){return e.content!==void 0}function Ym(e){return e.nodeType===Node.ELEMENT_NODE}const Jm=g.createContext(null),Qm={BOTTOM:["50%","100%"]},eg=({children:e,styles:t,className:n,anchorPoint:r})=>{const[s,o]=r??Qm.BOTTOM;let i=`-${s}`,a=`-${o}`;s.trimStart().startsWith("-")&&(i=s.substring(1)),o.trimStart().startsWith("-")&&(a=o.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return g.createElement("div",{style:{transform:l}},g.createElement("div",{className:n,style:t},e))};function tg(e){const[t,n]=g.useState(null),[r,s]=g.useState(null),o=Zt(),i=En("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:p,onDragEnd:h,collisionBehavior:m,clickable:v,draggable:b,position:C,title:S,zIndex:x}=e,w=g.Children.count(a);return g.useEffect(()=>{if(!o||!i)return;const _=new i.AdvancedMarkerElement;_.map=o,n(_);let P=null;return w>0&&(P=document.createElement("div"),P.isCustomMarker=!0,_.content=P,s(P)),()=>{var T;_.map=null,(T=P)==null||T.remove(),n(null),s(null)}},[o,i,w]),g.useEffect(()=>{!t||!t.content||w>0||(t.content.className=c||"")},[t,c,w]),Tn(t,"position",C),Tn(t,"title",S??""),Tn(t,"zIndex",x),Tn(t,"collisionBehavior",m),g.useEffect(()=>{t&&(b!==void 0?t.gmpDraggable=b:f||p||h?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,b,f,h,p]),g.useEffect(()=>{if(!t)return;const _=v!==void 0||!!l||!!u||!!d;t.gmpClickable=_,_&&t!=null&&t.content&&Ym(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,v,l,u,d]),St(t,"click",l),St(t,"drag",f),St(t,"dragstart",p),St(t,"dragend",h),rl(t==null?void 0:t.element,"mouseenter",u),rl(t==null?void 0:t.element,"mouseleave",d),[t,r]}const ng=g.forwardRef((e,t)=>{const{children:n,style:r,className:s,anchorPoint:o}=e,[i,a]=tg(e),l=g.useMemo(()=>i?{marker:i}:null,[i]);return g.useImperativeHandle(t,()=>i,[i]),a?g.createElement(Jm.Provider,{value:l},en.createPortal(g.createElement(eg,{anchorPoint:o,styles:r,className:s},n),a)):null});function rg(e,t,n){if(t!=null&&typeof t!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const r=e.style;if(n==null){if(t==null)return;for(const s in t)t.hasOwnProperty(s)&&sl(r,s,t[s]);return}for(const s in n)n.hasOwnProperty(s)&&(t==null||!t.hasOwnProperty(s))&&(s.indexOf("--")===0?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="");if(t!=null)for(const s in t){const o=t[s];t.hasOwnProperty(s)&&n[s]!==o&&sl(r,s,o)}}function sl(e,t,n){const r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n=="number"&&n!==0&&!og(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const sg=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 og(e){return sg.has(e)}const ig=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],ag=e=>{const{children:t,headerContent:n,style:r,className:s,pixelOffset:o,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=et(e,ig),d=En("maps"),[f,p]=g.useState(null),h=g.useRef(null),m=g.useRef(null);g.useEffect(()=>{if(!d)return;h.current=document.createElement("div"),m.current=document.createElement("div");const C=u;o&&(C.pixelOffset=new google.maps.Size(o[0],o[1])),n&&(C.headerContent=typeof n=="string"?n:m.current);const S=new google.maps.InfoWindow(u);return S.setContent(h.current),p(S),()=>{var x,w;S.setContent(null),(x=h.current)==null||x.remove(),(w=m.current)==null||w.remove(),h.current=null,m.current=null,p(null)}},[d]);const v=g.useRef(null);g.useEffect(()=>{!f||!h.current||(rg(h.current,r||null,v.current),v.current=r||null,s!==h.current.className&&(h.current.className=s||""))},[f,s,r]),Yr(()=>{if(!f)return;const C=u;o?C.pixelOffset=new google.maps.Size(o[0],o[1]):C.pixelOffset=null,n?C.headerContent=typeof n=="string"?n:m.current:C.headerContent=null,f.setOptions(u)},[u,o,n]),St(f,"close",l),St(f,"closeclick",c);const b=Zt();return Yr(()=>{if(!b||!f||i===null)return;const C=!!i,S={map:b};if(i&&(S.anchor=i,Zm(i)&&i.content instanceof Element)){const w=i.content,_=w==null?void 0:w.getBoundingClientRect();if(_&&w!=null&&w.isCustomMarker){var x;const P=(x=i.content.firstElementChild)==null?void 0:x.firstElementChild,T=P==null?void 0:P.getBoundingClientRect(),N=T.x-_.x+(T.width-_.width)/2,k=T.y-_.y,X=u;X.pixelOffset=new google.maps.Size(o?o[0]+N:N,o?o[1]+k:k),f.setOptions(X)}}return a!==void 0&&(S.shouldFocus=a),f.open(S),()=>{C&&f.set("anchor",null),f.close()}},[f,i,b,a,u,o]),g.createElement(g.Fragment,null,h.current&&en.createPortal(t,h.current),m.current!==null&&en.createPortal(n,m.current))},lg=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function cg(e){const[t,n]=g.useState(null),r=Zt(),{onClick:s,onDrag:o,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=et(e,lg),{position:d,draggable:f}=u;return g.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const p=new google.maps.Marker(u);return p.setMap(r),n(p),()=>{p.setMap(null),n(null)}},[r]),g.useEffect(()=>{if(!t)return;const p=t,h=google.maps.event;return s&&h.addListener(p,"click",s),o&&h.addListener(p,"drag",o),i&&h.addListener(p,"dragstart",i),a&&h.addListener(p,"dragend",a),l&&h.addListener(p,"mouseover",l),c&&h.addListener(p,"mouseout",c),t.setDraggable(!!f),()=>{h.clearInstanceListeners(p)}},[t,f,s,o,i,a,l,c]),g.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),g.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const Qr=g.forwardRef((e,t)=>{const n=cg(e);return g.useImperativeHandle(t,()=>n,[n]),g.createElement(g.Fragment,null)});function ug(){const[e,t]=g.useState(null);return[g.useCallback(r=>{t(r)},[]),e]}const Fe={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 dg({onLocationSelect:e}){var h;const t=Ia("locationCard"),n=M(m=>m.locations),{labels:r}=M(m=>m.localizationConfig),s=M(m=>m.isLocationListExpanded),o=M(m=>m.setIsLocationListExpanded),i=M(m=>m.selectedLocation),a=M(m=>m.setSelectedLocation),l=g.useRef({}),c=r["LocationList.header"],u=r["LocationList.locationDesignator"],d=(h=c==null?void 0:c.split)==null?void 0:h.call(c,/(\{:\d\})/g),f=g.useMemo(()=>(d??[]).map((m,v)=>m==="{:1}"?y.jsx("span",{className:Fe.highlighted,children:(n==null?void 0:n.length)??0},v):m==="{:2}"?y.jsx("span",{className:Fe.highlighted,children:u},v):m),[u,n.length,d]);function p(m){return()=>{e==null||e(m.coords),a==null||a(m.id)}}return g.useEffect(()=>{if(i&&s){const m=l.current[i];m!=null&&m.current&&requestAnimationFrame(()=>{const v=window.scrollY;m.current.scrollIntoView({behavior:"smooth",block:"start"}),window.scrollTo({top:v,behavior:"auto"})})}},[i,s]),y.jsxs("div",{className:$("dyn-locator__location-list",Fe.root),"data-expanded":s,children:[y.jsxs("header",{className:Fe.header,onClick:()=>o(!s),role:"button","aria-expanded":s,children:[y.jsx("span",{children:f}),y.jsx(De,{className:Fe.toggleButton,variant:"bare",children:y.jsx(he,{className:Fe.toggleButtonIcon,animate:!1,icon:"ChevronUp"})})]}),y.jsx("div",{className:Fe.body,children:n!=null&&n.length?n.map(m=>{const v=m.id;l.current[v]||(l.current[v]=g.createRef());const b=l.current[v];return y.jsx(t,{ref:b,"data-active":i===m.id,onClick:p(m),...m},m.id)}):y.jsx("div",{className:Fe.noResults,children:r["LocationList.noResults"]})})]})}const xe={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"},An={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function ol({id:e,title:t,address:n,coords:r,actions:s,onClick:o,onRightButtonClick:i,markerType:a,...l}){var x;const{labels:c}=M(w=>w.localizationConfig),u=M(w=>w.selectedLocation),d=M(w=>w.featureFlags),f=M(w=>w.customMarkers),p=M(w=>w.customInfoWindow),h=M(w=>w.setSelectedLocation),[m,v]=ug(),b=g.useCallback(()=>{h==null||h("")},[h]),C=w=>{const _=f.find(T=>T.markerType===w),P=_==null?void 0:_.component;return P?y.jsx(P,{}):null},S=w=>{const _=p==null?void 0:p.component;return _?y.jsx(_,{...w}):null};return y.jsxs(y.Fragment,{children:[d.withCustomMarkers&&a&&a!=="default"?y.jsx(ng,{onClick:()=>{o==null||o()},position:r,ref:m,children:C(a)}):y.jsx(Qr,{ref:m,position:r,onClick:()=>{o==null||o()}}),u===e?y.jsx(ag,{anchor:v,headerContent:t,onCloseClick:b,className:An.root,children:d.withCustomInfoWindow&&(p!=null&&p.component)&&typeof p.component=="function"?S({...l,title:t,address:n,actions:s}):y.jsxs(y.Fragment,{children:[y.jsxs("header",{className:An.header,children:[y.jsx("h6",{children:t}),y.jsx("address",{children:n})]}),y.jsx("div",{className:An.body,children:y.jsxs("div",{className:An.cta,children:[y.jsx(Rt,{animate:!1,variant:"secondary",size:"small",...ya((x=s==null?void 0:s.find)==null?void 0:x.call(s,w=>w.type==="navigate")),children:c["InfoWindow.CTA_1"]}),y.jsx(Rt,{animate:!1,variant:"secondary",size:"small",onClick:i,children:c["InfoWindow.CTA_2"]})]})})]})}):null]})}var fg=Object.getOwnPropertyNames,hg=Object.getOwnPropertySymbols,pg=Object.prototype.hasOwnProperty;function il(e,t){return function(r,s,o){return e(r,s,o)&&t(r,s,o)}}function Mn(e){return function(n,r,s){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,s);var o=s.cache,i=o.get(n),a=o.get(r);if(i&&a)return i===r&&a===n;o.set(n,r),o.set(r,n);var l=e(n,r,s);return o.delete(n),o.delete(r),l}}function al(e){return fg(e).concat(hg(e))}var mg=Object.hasOwn||function(e,t){return pg.call(e,t)};function tt(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var gg="__v",yg="__o",vg="_owner",ll=Object.getOwnPropertyDescriptor,cl=Object.keys;function bg(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Cg(e,t){return tt(e.getTime(),t.getTime())}function Sg(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function wg(e,t){return e===t}function ul(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var s=new Array(r),o=e.entries(),i,a,l=0;(i=o.next())&&!i.done;){for(var c=t.entries(),u=!1,d=0;(a=c.next())&&!a.done;){if(s[d]){d++;continue}var f=i.value,p=a.value;if(n.equals(f[0],p[0],l,d,e,t,n)&&n.equals(f[1],p[1],f[0],p[0],e,t,n)){u=s[d]=!0;break}d++}if(!u)return!1;l++}return!0}var xg=tt;function _g(e,t,n){var r=cl(e),s=r.length;if(cl(t).length!==s)return!1;for(;s-- >0;)if(!fl(e,t,n,r[s]))return!1;return!0}function Yt(e,t,n){var r=al(e),s=r.length;if(al(t).length!==s)return!1;for(var o,i,a;s-- >0;)if(o=r[s],!fl(e,t,n,o)||(i=ll(e,o),a=ll(t,o),(i||a)&&(!i||!a||i.configurable!==a.configurable||i.enumerable!==a.enumerable||i.writable!==a.writable)))return!1;return!0}function Eg(e,t){return tt(e.valueOf(),t.valueOf())}function Tg(e,t){return e.source===t.source&&e.flags===t.flags}function dl(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var s=new Array(r),o=e.values(),i,a;(i=o.next())&&!i.done;){for(var l=t.values(),c=!1,u=0;(a=l.next())&&!a.done;){if(!s[u]&&n.equals(i.value,a.value,i.value,a.value,e,t,n)){c=s[u]=!0;break}u++}if(!c)return!1}return!0}function Ag(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Mg(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function fl(e,t,n,r){return(r===vg||r===yg||r===gg)&&(e.$$typeof||t.$$typeof)?!0:mg(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Pg="[object Arguments]",Lg="[object Boolean]",Og="[object Date]",kg="[object Error]",Dg="[object Map]",Ng="[object Number]",Ig="[object Object]",Vg="[object RegExp]",Bg="[object Set]",Fg="[object String]",$g="[object URL]",jg=Array.isArray,hl=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,pl=Object.assign,zg=Object.prototype.toString.call.bind(Object.prototype.toString);function Ug(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,s=e.areFunctionsEqual,o=e.areMapsEqual,i=e.areNumbersEqual,a=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,u=e.areSetsEqual,d=e.areTypedArraysEqual,f=e.areUrlsEqual;return function(h,m,v){if(h===m)return!0;if(h==null||m==null)return!1;var b=typeof h;if(b!==typeof m)return!1;if(b!=="object")return b==="number"?i(h,m,v):b==="function"?s(h,m,v):!1;var C=h.constructor;if(C!==m.constructor)return!1;if(C===Object)return a(h,m,v);if(jg(h))return t(h,m,v);if(hl!=null&&hl(h))return d(h,m,v);if(C===Date)return n(h,m,v);if(C===RegExp)return c(h,m,v);if(C===Map)return o(h,m,v);if(C===Set)return u(h,m,v);var S=zg(h);return S===Og?n(h,m,v):S===Vg?c(h,m,v):S===Dg?o(h,m,v):S===Bg?u(h,m,v):S===Ig?typeof h.then!="function"&&typeof m.then!="function"&&a(h,m,v):S===$g?f(h,m,v):S===kg?r(h,m,v):S===Pg?a(h,m,v):S===Lg||S===Ng||S===Fg?l(h,m,v):!1}}function Xg(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,s={areArraysEqual:r?Yt:bg,areDatesEqual:Cg,areErrorsEqual:Sg,areFunctionsEqual:wg,areMapsEqual:r?il(ul,Yt):ul,areNumbersEqual:xg,areObjectsEqual:r?Yt:_g,arePrimitiveWrappersEqual:Eg,areRegExpsEqual:Tg,areSetsEqual:r?il(dl,Yt):dl,areTypedArraysEqual:r?Yt:Ag,areUrlsEqual:Mg};if(n&&(s=pl({},s,n(s))),t){var o=Mn(s.areArraysEqual),i=Mn(s.areMapsEqual),a=Mn(s.areObjectsEqual),l=Mn(s.areSetsEqual);s=pl({},s,{areArraysEqual:o,areMapsEqual:i,areObjectsEqual:a,areSetsEqual:l})}return s}function Rg(e){return function(t,n,r,s,o,i,a){return e(t,n,a)}}function qg(e){var t=e.circular,n=e.comparator,r=e.createState,s=e.equals,o=e.strict;if(r)return function(l,c){var u=r(),d=u.cache,f=d===void 0?t?new WeakMap:void 0:d,p=u.meta;return n(l,c,{cache:f,equals:s,meta:p,strict:o})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:s,meta:void 0,strict:o})};var i={cache:void 0,equals:s,meta:void 0,strict:o};return function(l,c){return n(l,c,i)}}var ml=$e();$e({strict:!0}),$e({circular:!0}),$e({circular:!0,strict:!0}),$e({createInternalComparator:function(){return tt}}),$e({strict:!0,createInternalComparator:function(){return tt}}),$e({circular:!0,createInternalComparator:function(){return tt}}),$e({circular:!0,createInternalComparator:function(){return tt},strict:!0});function $e(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,s=e.createState,o=e.strict,i=o===void 0?!1:o,a=Xg(e),l=Ug(a),c=r?r(l):Rg(l);return qg({circular:n,comparator:l,createState:s,equals:c,strict:i})}const gl=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],es=1,Jt=8;class ts{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const s=r>>4;if(s!==es)throw new Error(`Got v${s} data when expected v${es}.`);const o=gl[r&15];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new ts(a,i,o,t)}constructor(t,n=64,r=Float64Array,s){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=gl.indexOf(this.ArrayType),i=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,Jt,t),this.coords=new this.ArrayType(this.data,Jt+a+l,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(Jt+i+a+l),this.ids=new this.IndexArrayType(this.data,Jt,t),this.coords=new this.ArrayType(this.data,Jt+a+l,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(es<<4)+o]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=n,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return ns(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:a}=this,l=[0,o.length-1,0],c=[];for(;l.length;){const u=l.pop()||0,d=l.pop()||0,f=l.pop()||0;if(d-f<=a){for(let v=f;v<=d;v++){const b=i[2*v],C=i[2*v+1];b>=t&&b<=r&&C>=n&&C<=s&&c.push(o[v])}continue}const p=f+d>>1,h=i[2*p],m=i[2*p+1];h>=t&&h<=r&&m>=n&&m<=s&&c.push(o[p]),(u===0?t<=h:n<=m)&&(l.push(f),l.push(p-1),l.push(1-u)),(u===0?r>=h:s>=m)&&(l.push(p+1),l.push(d),l.push(1-u))}return c}within(t,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:i}=this,a=[0,s.length-1,0],l=[],c=r*r;for(;a.length;){const u=a.pop()||0,d=a.pop()||0,f=a.pop()||0;if(d-f<=i){for(let v=f;v<=d;v++)vl(o[2*v],o[2*v+1],t,n)<=c&&l.push(s[v]);continue}const p=f+d>>1,h=o[2*p],m=o[2*p+1];vl(h,m,t,n)<=c&&l.push(s[p]),(u===0?t-r<=h:n-r<=m)&&(a.push(f),a.push(p-1),a.push(1-u)),(u===0?t+r>=h:n+r>=m)&&(a.push(p+1),a.push(d),a.push(1-u))}return l}}function ns(e,t,n,r,s,o){if(s-r<=n)return;const i=r+s>>1;yl(e,t,i,r,s,o),ns(e,t,n,r,i-1,1-o),ns(e,t,n,i+1,s,1-o)}function yl(e,t,n,r,s,o){for(;s>r;){if(s-r>600){const c=s-r+1,u=n-r+1,d=Math.log(c),f=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),h=Math.max(r,Math.floor(n-u*f/c+p)),m=Math.min(s,Math.floor(n+(c-u)*f/c+p));yl(e,t,n,h,m,o)}const i=t[2*n+o];let a=r,l=s;for(Qt(e,t,r,n),t[2*s+o]>i&&Qt(e,t,r,s);a<l;){for(Qt(e,t,a,l),a++,l--;t[2*a+o]<i;)a++;for(;t[2*l+o]>i;)l--}t[2*r+o]===i?Qt(e,t,r,l):(l++,Qt(e,t,l,s)),l<=n&&(r=l+1),n<=l&&(s=l-1)}}function Qt(e,t,n,r){rs(e,n,r),rs(t,2*n,2*r),rs(t,2*n+1,2*r+1)}function rs(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function vl(e,t,n,r){const s=e-n,o=t-r;return s*s+o*o}const Gg={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},bl=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),nt=2,je=3,ss=4,ze=5,Cl=6;class Wg{constructor(t){this.options=Object.assign(Object.create(Gg),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:n,minZoom:r,maxZoom:s}=this.options;n&&console.time("total time");const o=`prepare ${t.length} points`;n&&console.time(o),this.points=t;const i=[];for(let l=0;l<t.length;l++){const c=t[l];if(!c.geometry)continue;const[u,d]=c.geometry.coordinates,f=bl(Pn(u)),p=bl(Ln(d));i.push(f,p,1/0,l,-1,1),this.options.reduce&&i.push(0)}let a=this.trees[s+1]=this._createTree(i);n&&console.timeEnd(o);for(let l=s;l>=r;l--){const c=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let r=((t[0]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,t[1]));let o=t[2]===180?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,o=180;else if(r>o){const d=this.getClusters([r,s,180,i],n),f=this.getClusters([-180,s,o,i],n);return d.concat(f)}const a=this.trees[this._limitZoom(n)],l=a.range(Pn(r),Ln(i),Pn(o),Ln(s)),c=a.data,u=[];for(const d of l){const f=this.stride*d;u.push(c[f+ze]>1?Sl(c,f,this.clusterProps):this.points[c[f+je]])}return u}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),s="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(s);const i=o.data;if(n*this.stride>=i.length)throw new Error(s);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=i[n*this.stride],c=i[n*this.stride+1],u=o.within(l,c,a),d=[];for(const f of u){const p=f*this.stride;i[p+ss]===t&&d.push(i[p+ze]>1?Sl(i,p,this.clusterProps):this.points[i[p+je]])}if(d.length===0)throw new Error(s);return d}getLeaves(t,n,r){n=n||10,r=r||0;const s=[];return this._appendLeaves(s,t,n,r,0),s}getTile(t,n,r){const s=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:i,radius:a}=this.options,l=a/i,c=(r-l)/o,u=(r+1+l)/o,d={features:[]};return this._addTileFeatures(s.range((n-l)/o,c,(n+1+l)/o,u),s.data,n,r,o,d),n===0&&this._addTileFeatures(s.range(1-l/o,c,1,u),s.data,o,r,o,d),n===o-1&&this._addTileFeatures(s.range(0,c,l/o,u),s.data,-1,r,o,d),d.features.length?d:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,s,o){const i=this.getChildren(n);for(const a of i){const l=a.properties;if(l&&l.cluster?o+l.point_count<=s?o+=l.point_count:o=this._appendLeaves(t,l.cluster_id,r,s,o):o<s?o++:t.push(a),t.length===r)break}return o}_createTree(t){const n=new ts(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)n.add(t[r],t[r+1]);return n.finish(),n.data=t,n}_addTileFeatures(t,n,r,s,o,i){for(const a of t){const l=a*this.stride,c=n[l+ze]>1;let u,d,f;if(c)u=wl(n,l,this.clusterProps),d=n[l],f=n[l+1];else{const m=this.points[n[l+je]];u=m.properties;const[v,b]=m.geometry.coordinates;d=Pn(v),f=Ln(b)}const p={type:1,geometry:[[Math.round(this.options.extent*(d*o-r)),Math.round(this.options.extent*(f*o-s))]],tags:u};let h;c||this.options.generateId?h=n[l+je]:h=this.points[n[l+je]].id,h!==void 0&&(p.id=h),i.features.push(p)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,n){const{radius:r,extent:s,reduce:o,minPoints:i}=this.options,a=r/(s*Math.pow(2,n)),l=t.data,c=[],u=this.stride;for(let d=0;d<l.length;d+=u){if(l[d+nt]<=n)continue;l[d+nt]=n;const f=l[d],p=l[d+1],h=t.within(l[d],l[d+1],a),m=l[d+ze];let v=m;for(const b of h){const C=b*u;l[C+nt]>n&&(v+=l[C+ze])}if(v>m&&v>=i){let b=f*m,C=p*m,S,x=-1;const w=((d/u|0)<<5)+(n+1)+this.points.length;for(const _ of h){const P=_*u;if(l[P+nt]<=n)continue;l[P+nt]=n;const T=l[P+ze];b+=l[P]*T,C+=l[P+1]*T,l[P+ss]=w,o&&(S||(S=this._map(l,d,!0),x=this.clusterProps.length,this.clusterProps.push(S)),o(S,this._map(l,P)))}l[d+ss]=w,c.push(b/v,C/v,1/0,w,-1,v),o&&c.push(x)}else{for(let b=0;b<u;b++)c.push(l[d+b]);if(v>1)for(const b of h){const C=b*u;if(!(l[C+nt]<=n)){l[C+nt]=n;for(let S=0;S<u;S++)c.push(l[C+S])}}}}return c}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n,r){if(t[n+ze]>1){const i=this.clusterProps[t[n+Cl]];return r?Object.assign({},i):i}const s=this.points[t[n+je]].properties,o=this.options.map(s);return r&&o===s?Object.assign({},o):o}}function Sl(e,t,n){return{type:"Feature",id:e[t+je],properties:wl(e,t,n),geometry:{type:"Point",coordinates:[Kg(e[t]),Hg(e[t+1])]}}}function wl(e,t,n){const r=e[t+ze],s=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=e[t+Cl],i=o===-1?{}:Object.assign({},n[o]);return Object.assign(i,{cluster:!0,cluster_id:e[t+je],point_count:r,point_count_abbreviated:s})}function Pn(e){return e/360+.5}function Ln(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Kg(e){return(e-.5)*360}function Hg(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Zg(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}typeof SuppressedError=="function"&&SuppressedError;class re{static isAdvancedMarkerAvailable(t){return google.maps.marker&&t.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,n){this.isAdvancedMarker(t)?t.map=n:t.setMap(n)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(Number.isFinite(t.position.lat)&&Number.isFinite(t.position.lng))return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return this.isAdvancedMarker(t)?!0:t.getVisible()}}class os{constructor({markers:t,position:n}){this.markers=[],t&&(this.markers=t),n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)t.extend(re.getPosition(n));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>re.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(re.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function is(e,t="assertion failed"){if(e==null)throw Error(t)}class Yg{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return Jg(t)}}const Jg=e=>e.map(n=>new os({position:re.getPosition(n),markers:[n]}));class Qg extends Yg{constructor(t){var{maxZoom:n,radius:r=60}=t,s=Zg(t,["maxZoom","radius"]);super({maxZoom:n}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Wg(Object.assign({maxZoom:this.maxZoom,radius:r},s))}calculate(t){let n=!1,r=t.map.getZoom();is(r),r=Math.round(r);const s={zoom:r};if(!ml(t.markers,this.markers)){n=!0,this.markers=[...t.markers];const o=this.markers.map(i=>{const a=re.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:i}}});this.superCluster.load(o)}return n||(this.state.zoom<=this.maxZoom||s.zoom<=this.maxZoom)&&(n=!ml(this.state,s)),this.state=s,t.markers.length===0?(this.clusters=[],{clusters:this.clusters,changed:n}):(n&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:n})}cluster({map:t}){const n=t.getZoom();return is(n),this.superCluster.getClusters([-180,-90,180,90],Math.round(n)).map(r=>this.transformCluster(r))}transformCluster({geometry:{coordinates:[t,n]},properties:r}){if(r.cluster)return new os({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:n,lng:t}});const s=r.marker;return new os({markers:[s],position:re.getPosition(s)})}}class ey{constructor(t,n){this.markers={sum:t.length};const r=n.map(o=>o.count),s=r.reduce((o,i)=>o+i,0);this.clusters={count:n.length,markers:{mean:s/n.length,sum:s,min:Math.min(...r),max:Math.max(...r)}}}}class ty{render({count:t,position:n},r,s){const i=`<svg fill="${t>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
286
+ <circle cx="120" cy="120" opacity=".6" r="70" />
287
+ <circle cx="120" cy="120" opacity=".3" r="90" />
288
+ <circle cx="120" cy="120" opacity=".2" r="110" />
289
+ <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text>
290
+ </svg>`,a=`Cluster of ${t} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+t;if(re.isAdvancedMarkerAvailable(s)){const d=new DOMParser().parseFromString(i,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const f={map:s,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(f)}const c={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function ny(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}class as{constructor(){ny(as,google.maps.OverlayView)}}var rt;(function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click",e.GMP_CLICK="gmp-click"})(rt||(rt={}));const ry=(e,t,n)=>{t.bounds&&n.fitBounds(t.bounds)};class sy extends as{constructor({map:t,markers:n=[],algorithmOptions:r={},algorithm:s=new Qg(r),renderer:o=new ty,onClusterClick:i=ry}){super(),this.map=null,this.idleListener=null,this.markers=[...n],this.clusters=[],this.algorithm=s,this.renderer=o,this.onClusterClick=i,t&&this.setMap(t)}addMarker(t,n){this.markers.includes(t)||(this.markers.push(t),n||this.render())}addMarkers(t,n){t.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(t,n){const r=this.markers.indexOf(t);return r===-1?!1:(re.setMap(t,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(t,n){let r=!1;return t.forEach(s=>{r=this.removeMarker(s,!0)||r}),r&&!n&&this.render(),r}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,rt.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||r==null){const s=new Set;for(const i of n)i.markers.length==1&&s.add(i.markers[0]);const o=[];for(const i of this.clusters)i.marker!=null&&(i.markers.length==1?s.has(i.marker)||re.setMap(i.marker,null):o.push(i.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(i=>re.setMap(i,null)))}google.maps.event.trigger(this,rt.CLUSTERING_END,this)}}onAdd(){const t=this.getMap();is(t),this.idleListener=t.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>re.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){const t=new ey(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{if(r.markers.length===1)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,t,n),r.markers.forEach(s=>re.setMap(s,null)),this.onClusterClick){const s=re.isAdvancedMarker(r.marker)?rt.GMP_CLICK:rt.CLUSTER_CLICK;r.marker.addListener(s,o=>{google.maps.event.trigger(this,rt.CLUSTER_CLICK,r),this.onClusterClick(o,r,n)})}re.setMap(r.marker,n)})}}function oy(e){return e!=null&&"coords"in e&&("size"in e||"range"in e)&&"onMarkerClick"in e}function iy(e){return e!=null&&"coords"in e&&!("size"in e)}function ay({locations:e,onRightButtonClick:t}){const n=Zt(),r=M(h=>h.setSelectedLocation),s=g.useRef(""),o=g.useRef([]),i=g.useRef(null),a=g.useRef(new Map),[l,c]=g.useState(new Set),u=g.useRef(null);g.useEffect(()=>{s.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]);const{clusters:d,markers:f}=g.useMemo(()=>{const h=[],m=[];for(const v of e||[])oy(v)?h.push(v):iy(v)&&m.push(v);return{clusters:h,markers:m}},[e]);g.useEffect(()=>{if(!n)return;const h=()=>{var x,w;u.current!=null&&(cancelAnimationFrame(u.current),u.current=null),(x=i.current)==null||x.clearMarkers(),(w=i.current)==null||w.setMap(null),i.current=null,o.current.forEach(_=>_.setMap(null)),o.current=[],a.current.clear(),c(new Set)};if(f.length===0){h();return}o.current=f.map(x=>{const w=new google.maps.Marker({position:x.coords,title:x.title||"",opacity:0,clickable:!1,zIndex:p.NATIVE});return a.current.set(w,x.id),w}),i.current=new sy({map:n,markers:o.current});const m=()=>{const x=new Set;for(const w of o.current)if(w.getMap()){const _=a.current.get(w);_&&x.add(_)}c(x)},v=()=>{u.current!=null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(m)};v();const b=n.addListener("zoom_changed",v),C=n.addListener("dragend",v);let S;return i.current&&(S=i.current.addListener("clusteringend",v)),()=>{b==null||b.remove(),C==null||C.remove(),S==null||S.remove(),h()}},[n,f]);const p={NATIVE:-1e3,CLUSTER:1};return y.jsxs(y.Fragment,{children:[d.map(h=>y.jsx(Qr,{position:h.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:(s.current||"#00acde").trim()||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(h.range??0)/pa,labelOrigin:new google.maps.Point(0,0),anchor:new google.maps.Point(0,0)},optimized:!1,zIndex:p.CLUSTER,onClick:async()=>{await h.onMarkerClick()}},h.id)),f.filter(h=>l.has(h.id)).map(h=>{const{id:m="",title:v="No Title",address:b="No Address",coords:C={lat:0,lng:0},actions:S=[],markerType:x="default",...w}=h;return y.jsx(ol,{id:m,title:v,address:b,coords:C,actions:S,markerType:x,onRightButtonClick:()=>t(h),onClick:()=>r(m),...w},m)})]})}function ly(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function cy(e){return"title"in e&&!("size"in e)}function uy(){var Z;const[e,t]=g.useState({zoom:ma}),[n,r]=g.useState(!1),[s,o]=g.useState("inactive"),i=g.useRef(""),a=Jr(),{request:l,loading:c}=Wt(Ct.FIND),u=M(E=>E.mapId),d=M(E=>E.featureFlags),{labels:f}=M(E=>E.localizationConfig),p=M(E=>E.locations),h=M(E=>E.setLocations),m=M(E=>E.targetLocation),v=M(E=>E.clearTargetLocation),b=M(E=>E.mapDetail),C=M(E=>E.setMapDetail),S=M(E=>E.isFullscreen),x=M(E=>E.setFullscreen),w=M(E=>E.isLocationListExpanded),_=M(E=>E.setIsLocationListExpanded),P=M(E=>E.shouldRefetch),T=M(E=>E.setShouldRefetch),N=M(E=>E.setSelectedLocation),k=M(E=>E.customZoomLevels),X=M(E=>E.clusteringProvider),te=b===Ee.MARKER;g.useEffect(()=>{k!=null&&k.INITIAL_ZOOM_LEVEL&&t({zoom:k==null?void 0:k.INITIAL_ZOOM_LEVEL})},[k]);function ot({detail:E}){const{center:G,zoom:F}=E;t({center:G,zoom:F}),n||r(!0)}function Ue(){n&&e.center&&s==="inactive"&&o("active")}function me(E){t(G=>({center:E,zoom:G.zoom}))}function it(){o("inactive"),N(""),_(!1),C(Ee.CLUSTER),t({center:Wh,zoom:(k==null?void 0:k.INITIAL_ZOOM_LEVEL)||ma}),T(!0)}const O=g.useCallback(async()=>{if(!e.center)return;const{lat:E,lng:G}=e.center,F={location:{type:"Feature",geometry:{type:"Point",coordinates:[G,E]},properties:{}},distance:ga};try{const{data:W}=await l({mapId:u},{body:F})??{};if(!(W!=null&&W.pins))throw new Error("No locations found");h(W.pins),C(Ee.MARKER),o("inactive")}catch(W){console.error("Error finding locations in this area: ",W),B.error(ke+zh)}},[e.center,l,C,u,h]);function D(E){t({center:E.coords,zoom:20}),w||_(!0)}function V(E){if(ly(E))return y.jsx(Qr,{position:E.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(E.range??0)/pa,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await E.onMarkerClick(),t({center:E.coords,zoom:E.zoom||15})}},E.id);if(cy(E)){const{id:G="",title:F="No Title",address:W="No Address",coords:Xe={lat:0,lng:0},actions:at=[],markerType:A="default",...se}=E;return y.jsx(ol,{id:G,title:F,address:W,coords:Xe,actions:at,markerType:A,onRightButtonClick:()=>D(E),onClick:()=>{N(E.id)},...se},G)}}if(g.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),g.useEffect(()=>{m&&(t({center:m.coords,zoom:m.zoom}),v())},[m,v]),a===oe.LOADING)return y.jsx("div",{className:$("dyn-locator__map",xe.root),children:y.jsx("div",{className:xe.loaderContainer,children:y.jsx(wt,{size:"large"})})});if(a===oe.FAILED||a===oe.AUTH_FAILURE)throw new Error(jh);if(a===oe.LOADED)return y.jsxs("div",{className:$("dyn-locator__map",xe.root),children:[d.fullscreen?y.jsx(De,{className:$(xe.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>x==null?void 0:x(!S),children:y.jsx(he,{size:"M",icon:S?"Close":"Expand"})}):null,te?y.jsx(De,{className:$(xe.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:it,children:y.jsx(he,{size:"M",icon:"ArrowLeft"})}):null,s!=="inactive"&&d.withAreaSearch&&y.jsxs(Rt,{className:$(xe.areaSearchButton,"dyn-locator__map__area-search-button",te&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||s==="select_area",loading:c,onClick:()=>o("select_area"),children:[y.jsx(nc,{}),f["Map.areaSearchButton"]]}),s==="select_area"&&d.withAreaSearch&&y.jsxs("div",{className:xe.visualCue,children:[y.jsxs("i",{children:[y.jsx("button",{className:xe.closeButton,onClick:()=>o("active"),"aria-label":"Close area search",children:y.jsx(gs,{size:16})}),y.jsx(rc,{size:48,strokeWidth:1,color:"currentColor"})]}),y.jsxs(Rt,{className:xe.searchButton,disabled:c,loading:c,onClick:O,size:"small",variant:"themed",children:[f["Map.areaSearchVisualCueCTA"]," ",y.jsx(Gl,{size:22,style:{position:"relative",left:-8}})]})]}),y.jsxs(tl,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:ot,onDragend:Ue,defaultBounds:Xt,mapId:"DEMO_MAP_ID",children:[!P&&X!==Ye.GOOGLE?(Z=p==null?void 0:p.map)==null?void 0:Z.call(p,V):null,!P&&d.withClusters&&X===Ye.GOOGLE?y.jsx(ay,{locations:p,onRightButtonClick:D,setLocations:h}):null]}),te?y.jsx(dg,{onLocationSelect:me}):null]})}const _e={root:"_root_1nmik_10",validIcon:"_validIcon_1nmik_20",errorIcon:"_errorIcon_1nmik_27",label:"_label_1nmik_48",input:"_input_1nmik_58",sideButton:"_sideButton_1nmik_89",sideOrnament:"_sideOrnament_1nmik_92",clearButton:"_clearButton_1nmik_126",dropdown:"_dropdown_1nmik_166"},xl="Input";function _l({label:e,className:t,showValidation:n=!0,error:r=!1,valid:s=!1,clearable:o=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:p,sideOrnament:h,...m},v){const b=a?Ze.div:"div",C=Oe(m)??[],S=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return y.jsxs(b,{className:$("dyn-locator__"+be(xl),_e.root,ve(t),...C??[]),"data-valid":s,"data-error":r,"data-expanded":u,"data-side-button":!!p,...f?{style:f}:{},...S,children:[n&&y.jsxs(y.Fragment,{children:[s&&y.jsx("span",{className:_e.validIcon}),r&&y.jsx("span",{className:_e.errorIcon})]}),e?y.jsx("label",{className:_e.label,...m.id?{htmlFor:m.id}:{},children:e}):null,h?y.jsx("span",{className:_e.sideOrnament,children:h}):null,y.jsx("input",{ref:v,className:$(_e.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!p,"data-side-ornament":!!h,...m}),p?y.jsx("span",{className:_e.sideButton,children:p}):null,o&&(m==null?void 0:m.value)&&y.jsx("button",{className:_e.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&y.jsx("div",{className:_e.dropdown,children:c})]})}_l.displayName=xl;const dy=g.forwardRef(_l),st={root:"_root_1vbtg_7",input:"_input_1vbtg_7",clearButton:"_clearButton_1vbtg_10",sideOrnament:"_sideOrnament_1vbtg_13",predictionsContainer:"_predictionsContainer_1vbtg_18",predictionItem:"_predictionItem_1vbtg_29",loadingItem:"_loadingItem_1vbtg_47"};function fy(){const[e,t]=g.useState(""),[n,r]=g.useState([]),[s,o]=g.useState(!1),[i,a]=g.useState(!1),[l,c]=g.useState(!1),u=M(O=>O.mapId),d=M(O=>O.setLocations),f=M(O=>O.setMapDetail),p=M(O=>O.zoomToLocation),{labels:h}=M(O=>O.localizationConfig),{search:m}=M(O=>O.featureFlags),{request:v,loading:b}=Wt(Ct.FIND),C=En("places"),S=En("geocoding"),x=Zt(),w=g.useRef(null),_=g.useRef(null),P=g.useRef(null),T=g.useRef(null);g.useEffect(()=>{S&&(P.current||(P.current=new S.Geocoder))},[S]),g.useEffect(()=>{C&&(w.current||(w.current=new C.AutocompleteService),T.current||(T.current=new C.AutocompleteSessionToken))},[C]),g.useEffect(()=>{!C||!x||_.current||(_.current=new C.PlacesService(x))},[C,x]);const N=g.useCallback(Kh(async O=>{var D;if(!O||O.length<3){r([]),o(!1);return}a(!0);try{if(!C||!w.current)throw new Error("Places library or Autocomplete Service not available");const V=await w.current.getPlacePredictions({input:O,...T.current?{sessionToken:T.current}:{}});if(a(!1),!((D=V==null?void 0:V.predictions)!=null&&D.length)){r([]),o(!1);return}r(V.predictions),o(!0)}catch(V){console.error("Error fetching predictions: ",V),a(!1),r([]),o(!1),B.error(ke+Fh)}},Gh),[C]),k=O=>{const D=O.currentTarget.value;if(t(D),!D||D.length<3){r([]),o(!1);return}N(D)},X=async O=>{var D,V,Z,E,G;t(O.description),o(!1);try{if(!C||!_.current)throw new Error("Places library or Places Service not available");const F=await new Promise((W,Xe)=>{_.current.getDetails({placeId:O.place_id,fields:["geometry","address_components","formatted_address"],...T.current?{sessionToken:T.current}:{}},(at,A)=>{if(A===C.PlacesServiceStatus.OK&&at){W(at);try{Ne.isEventEnabled(le.AUTOCOMPLETE_ITEM_SELECT)&&Ne.track(le.AUTOCOMPLETE_ITEM_SELECT,{label:O.description,...Hh(at)})}catch(se){console.error(`Could not track event: "${le.AUTOCOMPLETE_ITEM_SELECT}"`,se)}}else Xe(new Error(`Place details request failed with status: ${A}`))})});if((D=F==null?void 0:F.geometry)!=null&&D.location){const W=(Z=(V=F.geometry.location).lat)==null?void 0:Z.call(V),Xe=(G=(E=F.geometry.location).lng)==null?void 0:G.call(E);await me({lat:W,lng:Xe})}}catch(F){console.error("Error getting place details:",F),B.error(ke+$h)}finally{C&&(T.current=new C.AutocompleteSessionToken)}},te=()=>{t(""),r([]),o(!1)},ot=()=>!s||n.length===0?null:y.jsx("div",{className:st.predictionsContainer,children:i?y.jsx("div",{className:st.loadingItem,children:y.jsx(wt,{size:"medium"})}):n.map(O=>y.jsx("div",{className:st.predictionItem,onClick:()=>X(O),children:O.description},O.place_id))});async function Ue(O){O.preventDefault(),c(!0);try{const D=await new Promise((E,G)=>{navigator.geolocation.getCurrentPosition(F=>E(F),F=>G(F),{timeout:5e3})}),V={lat:D.coords.latitude,lng:D.coords.longitude};if(await me(V),!S||!(P!=null&&P.current)||!x)throw new Error("Geocoding library or Geocoder not available");const Z=await new Promise((E,G)=>{P.current.geocode({location:V},(F,W)=>{W===google.maps.GeocoderStatus.OK&&F&&F.length>0?E(F):G(new Error(`Geocoding failed with status: ${W}`))})});Z&&Z[0]&&t(Z[0].formatted_address)}catch(D){console.error("Error getting location: ",D);const V=D instanceof GeolocationPositionError?ke+D.message:ke+Vh;B.error(V)}finally{c(!1)}}async function me(O){const{lng:D,lat:V}=O,Z={location:{type:"Feature",geometry:{type:"Point",coordinates:[D,V]},properties:{}},distance:ga/2};try{const{data:E}=await v({mapId:u},{body:Z})??{};if(!(E!=null&&E.pins))throw new Error("No locations found");d(E.pins),f(Ee.MARKER),p({lat:V,lng:D},E.zoom||15)}catch(E){throw console.error("Error finding locations: ",E),E}}const it=b||l;return m?y.jsxs("div",{className:$("dyn-locator__search",st.root),children:[y.jsx(dy,{name:"locator_search_field",className:$("dyn-locator__search__field",st.input),value:e,onChange:k,placeholder:h["Search.placeholder"],dropdown:ot(),dropdownVisible:s,disabled:it,sideOrnament:e?void 0:y.jsx(he,{className:st.sideOrnament,icon:"Search",size:"M"}),sideButton:e?y.jsx(De,{variant:"bare",className:st.clearButton,onClick:te,"aria-label":"Clear",children:y.jsx(he,{icon:"Close",size:"M"})}):y.jsx(Ca,{href:"#",onClick:Ue,children:h["Search.geolocationButton"]})}),y.jsx(Hr,{show:it,children:y.jsx(wt,{size:"medium"})})]}):null}function hy({children:e,apiKey:t,language:n,region:r,libraries:s}){return y.jsx(Lm,{apiKey:t,region:r,language:n,libraries:s,children:e})}const py=Object.freeze(Object.defineProperty({__proto__:null,default:hy},Symbol.toStringTag,{value:"Module"}));function my(){throw new Error("Mapbox provider is not implemented yet")}const gy=Object.freeze(Object.defineProperty({__proto__:null,default:my},Symbol.toStringTag,{value:"Module"}));function yy(){throw new Error("HERE Maps provider is not implemented yet")}const vy=Object.freeze(Object.defineProperty({__proto__:null,default:yy},Symbol.toStringTag,{value:"Module"}));R.Map=uy,R.Search=fy,R.TrackingEvent=le,R.default=Ha,R.trackingService=Ne,Object.defineProperties(R,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
286
291
  //# sourceMappingURL=index.umd.js.map