thecore-auth 0.0.203 → 0.0.205
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/thecore-auth.cjs.js +12 -12
- package/dist/thecore-auth.esm.js +911 -917
- package/package.json +1 -1
package/dist/thecore-auth.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),yr=require("jwt-decode"),U=require("react-router-dom"),oa=require("axios"),aa=require("react-dom"),_c=require("virtual:pwa-register/react");function Fc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const V=Fc(p);var Wn={exports:{}},pn={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var vr;function $c(){if(vr)return pn;vr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,s,o){var r=null;if(o!==void 0&&(r=""+o),s.key!==void 0&&(r=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:e,type:i,key:r,ref:s!==void 0?s:null,props:o}}return pn.Fragment=t,pn.jsx=n,pn.jsxs=n,pn}var mn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var br;function zc(){return br||(br=1,process.env.NODE_ENV!=="production"&&function(){function e(g){if(g==null)return null;if(typeof g=="function")return g.$$typeof===G?null:g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case R:return"Fragment";case w:return"Portal";case M:return"Profiler";case L:return"StrictMode";case ye:return"Suspense";case ve:return"SuspenseList"}if(typeof g=="object")switch(typeof g.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),g.$$typeof){case B:return(g.displayName||"Context")+".Provider";case I:return(g._context.displayName||"Context")+".Consumer";case J:var O=g.render;return g=g.displayName,g||(g=O.displayName||O.name||"",g=g!==""?"ForwardRef("+g+")":"ForwardRef"),g;case Q:return O=g.displayName||null,O!==null?O:e(g.type)||"Memo";case z:O=g._payload,g=g._init;try{return e(g(O))}catch{}}return null}function t(g){return""+g}function n(g){try{t(g);var O=!1}catch{O=!0}if(O){O=console;var D=O.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&g[Symbol.toStringTag]||g.constructor.name||"Object";return D.call(O,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),t(g)}}function i(){}function s(){if(Ye===0){oe=console.log,ee=console.info,W=console.warn,ae=console.error,Y=console.group,Pe=console.groupCollapsed,Ke=console.groupEnd;var g={configurable:!0,enumerable:!0,value:i,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}Ye++}function o(){if(Ye--,Ye===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:pe({},g,{value:oe}),info:pe({},g,{value:ee}),warn:pe({},g,{value:W}),error:pe({},g,{value:ae}),group:pe({},g,{value:Y}),groupCollapsed:pe({},g,{value:Pe}),groupEnd:pe({},g,{value:Ke})})}0>Ye&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function r(g){if(Xe===void 0)try{throw Error()}catch(D){var O=D.stack.trim().match(/\n( *(at )?)/);Xe=O&&O[1]||"",Ze=-1<D.stack.indexOf(`
|
|
18
18
|
at`)?" (<anonymous>)":-1<D.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+Xe+g+Ze}function a(g,O){if(!g||dt)return"";var D=Bt.get(g);if(D!==void 0)return D;dt=!0,D=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var H=null;H=re.H,re.H=null,s();try{var ce={DetermineComponentFrameRoot:function(){try{if(O){var Me=function(){throw Error()};if(Object.defineProperty(Me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Me,[])}catch(Ve){var
|
|
20
|
-
`)
|
|
21
|
-
`);for(F=K=0;K<me.length&&!me[K].includes("DetermineComponentFrameRoot");)K++;for(;F
|
|
22
|
-
`+me[K].replace(" at new "," at ");return g.displayName&&pt.includes("<anonymous>")&&(pt=pt.replace("<anonymous>",g.displayName)),typeof g=="function"&&Bt.set(g,pt),pt}while(1<=K&&0<=F);break}}}finally{dt=!1,re.H=H,o(),Error.prepareStackTrace=D}return me=(me=g?g.displayName||g.name:"")?r(me):"",typeof g=="function"&&Bt.set(g,me),me}function l(g){if(g==null)return"";if(typeof g=="function"){var O=g.prototype;return a(g,!(!O||!O.isReactComponent))}if(typeof g=="string")return r(g);switch(g){case ye:return r("Suspense");case ve:return r("SuspenseList")}if(typeof g=="object")switch(g.$$typeof){case J:return g=a(g.render,!1),g;case Q:return l(g.type);case
|
|
19
|
+
`+Xe+g+Ze}function a(g,O){if(!g||dt)return"";var D=Bt.get(g);if(D!==void 0)return D;dt=!0,D=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var H=null;H=re.H,re.H=null,s();try{var ce={DetermineComponentFrameRoot:function(){try{if(O){var Me=function(){throw Error()};if(Object.defineProperty(Me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Me,[])}catch(Ve){var Pt=Ve}Reflect.construct(g,[],Me)}else{try{Me.call()}catch(Ve){Pt=Ve}g.call(Me.prototype)}}else{try{throw Error()}catch(Ve){Pt=Ve}(Me=g())&&typeof Me.catch=="function"&&Me.catch(function(){})}}catch(Ve){if(Ve&&Pt&&typeof Ve.stack=="string")return[Ve.stack,Pt.stack]}return[null,null]}};ce.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var K=Object.getOwnPropertyDescriptor(ce.DetermineComponentFrameRoot,"name");K&&K.configurable&&Object.defineProperty(ce.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var F=ce.DetermineComponentFrameRoot(),Re=F[0],Fe=F[1];if(Re&&Fe){var me=Re.split(`
|
|
20
|
+
`),$e=Fe.split(`
|
|
21
|
+
`);for(F=K=0;K<me.length&&!me[K].includes("DetermineComponentFrameRoot");)K++;for(;F<$e.length&&!$e[F].includes("DetermineComponentFrameRoot");)F++;if(K===me.length||F===$e.length)for(K=me.length-1,F=$e.length-1;1<=K&&0<=F&&me[K]!==$e[F];)F--;for(;1<=K&&0<=F;K--,F--)if(me[K]!==$e[F]){if(K!==1||F!==1)do if(K--,F--,0>F||me[K]!==$e[F]){var pt=`
|
|
22
|
+
`+me[K].replace(" at new "," at ");return g.displayName&&pt.includes("<anonymous>")&&(pt=pt.replace("<anonymous>",g.displayName)),typeof g=="function"&&Bt.set(g,pt),pt}while(1<=K&&0<=F);break}}}finally{dt=!1,re.H=H,o(),Error.prepareStackTrace=D}return me=(me=g?g.displayName||g.name:"")?r(me):"",typeof g=="function"&&Bt.set(g,me),me}function l(g){if(g==null)return"";if(typeof g=="function"){var O=g.prototype;return a(g,!(!O||!O.isReactComponent))}if(typeof g=="string")return r(g);switch(g){case ye:return r("Suspense");case ve:return r("SuspenseList")}if(typeof g=="object")switch(g.$$typeof){case J:return g=a(g.render,!1),g;case Q:return l(g.type);case z:O=g._payload,g=g._init;try{return l(g(O))}catch{}}return""}function c(){var g=re.A;return g===null?null:g.getOwner()}function u(g){if(te.call(g,"key")){var O=Object.getOwnPropertyDescriptor(g,"key").get;if(O&&O.isReactWarning)return!1}return g.key!==void 0}function d(g,O){function D(){Je||(Je=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",O))}D.isReactWarning=!0,Object.defineProperty(g,"key",{get:D,configurable:!0})}function f(){var g=e(this.type);return ft[g]||(ft[g]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),g=this.props.ref,g!==void 0?g:null}function m(g,O,D,H,ce,K){return D=K.ref,g={$$typeof:j,type:g,key:O,props:K,_owner:ce},(D!==void 0?D:null)!==null?Object.defineProperty(g,"ref",{enumerable:!1,get:f}):Object.defineProperty(g,"ref",{enumerable:!1,value:null}),g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(g,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g}function y(g,O,D,H,ce,K){if(typeof g=="string"||typeof g=="function"||g===R||g===M||g===L||g===ye||g===ve||g===se||typeof g=="object"&&g!==null&&(g.$$typeof===z||g.$$typeof===Q||g.$$typeof===B||g.$$typeof===I||g.$$typeof===J||g.$$typeof===Nt||g.getModuleId!==void 0)){var F=O.children;if(F!==void 0)if(H)if(qe(F)){for(H=0;H<F.length;H++)T(F[H],g);Object.freeze&&Object.freeze(F)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else T(F,g)}else F="",(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(F+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),g===null?H="null":qe(g)?H="array":g!==void 0&&g.$$typeof===j?(H="<"+(e(g.type)||"Unknown")+" />",F=" Did you accidentally export a JSX literal instead of a component?"):H=typeof g,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",H,F);if(te.call(O,"key")){F=e(g);var Re=Object.keys(O).filter(function(me){return me!=="key"});H=0<Re.length?"{key: someKey, "+Re.join(": ..., ")+": ...}":"{key: someKey}",ht[F+H]||(Re=0<Re.length?"{"+Re.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
24
24
|
<%s {...props} />
|
|
25
25
|
React keys must be passed directly to JSX without using spread:
|
|
26
26
|
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,H,F,Re,F),ht[F+H]=!0)}if(F=null,D!==void 0&&(n(D),F=""+D),u(O)&&(n(O.key),F=""+O.key),"key"in O){D={};for(var Fe in O)Fe!=="key"&&(D[Fe]=O[Fe])}else D=O;return F&&d(D,typeof g=="function"?g.displayName||g.name||"Unknown":g),m(g,F,K,ce,c(),D)}function T(g,O){if(typeof g=="object"&&g&&g.$$typeof
|
|
27
|
+
<%s key={someKey} {...props} />`,H,F,Re,F),ht[F+H]=!0)}if(F=null,D!==void 0&&(n(D),F=""+D),u(O)&&(n(O.key),F=""+O.key),"key"in O){D={};for(var Fe in O)Fe!=="key"&&(D[Fe]=O[Fe])}else D=O;return F&&d(D,typeof g=="function"?g.displayName||g.name||"Unknown":g),m(g,F,K,ce,c(),D)}function T(g,O){if(typeof g=="object"&&g&&g.$$typeof!==$n){if(qe(g))for(var D=0;D<g.length;D++){var H=g[D];x(H)&&v(H,O)}else if(x(g))g._store&&(g._store.validated=1);else if(g===null||typeof g!="object"?D=null:(D=q&&g[q]||g["@@iterator"],D=typeof D=="function"?D:null),typeof D=="function"&&D!==g.entries&&(D=D.call(g),D!==g))for(;!(g=D.next()).done;)x(g.value)&&v(g.value,O)}}function x(g){return typeof g=="object"&&g!==null&&g.$$typeof===j}function v(g,O){if(g._store&&!g._store.validated&&g.key==null&&(g._store.validated=1,O=b(O),!_e[O])){_e[O]=!0;var D="";g&&g._owner!=null&&g._owner!==c()&&(D=null,typeof g._owner.tag=="number"?D=e(g._owner.type):typeof g._owner.name=="string"&&(D=g._owner.name),D=" It was passed a child from "+D+".");var H=re.getCurrentStack;re.getCurrentStack=function(){var ce=l(g.type);return H&&(ce+=H()||""),ce},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',O,D),re.getCurrentStack=H}}function b(g){var O="",D=c();return D&&(D=e(D.type))&&(O=`
|
|
28
28
|
|
|
29
29
|
Check the render method of \``+D+"`."),O||(g=e(g))&&(O=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+g+">."),O}var S=p,j=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),B=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),ye=Symbol.for("react.suspense"),ve=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo")
|
|
31
|
+
Check the top-level render call using <`+g+">."),O}var S=p,j=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),B=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),ye=Symbol.for("react.suspense"),ve=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),q=Symbol.iterator,G=Symbol.for("react.client.reference"),re=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=Object.prototype.hasOwnProperty,pe=Object.assign,Nt=Symbol.for("react.client.reference"),qe=Array.isArray,Ye=0,oe,ee,W,ae,Y,Pe,Ke;i.__reactDisabledLog=!0;var Xe,Ze,dt=!1,Bt=new(typeof WeakMap=="function"?WeakMap:Map),$n=Symbol.for("react.client.reference"),Je,ft={},ht={},_e={};mn.Fragment=R,mn.jsx=function(g,O,D,H,ce){return y(g,O,D,!1,H,ce)},mn.jsxs=function(g,O,D,H,ce){return y(g,O,D,!0,H,ce)}}()),mn}var xr;function Uc(){return xr||(xr=1,process.env.NODE_ENV==="production"?Wn.exports=$c():Wn.exports=zc()),Wn.exports}var h=Uc();const la=p.createContext(),Hc=({children:e,defaultComponent:t})=>{const[n,i]=p.useState(!1),[s,o]=p.useState({}),[r,a]=p.useState(t),c={isLoading:n,setIsLoading:i,loadingProps:s,setLoadingProps:o,loadingComponent:r,setLoadingComponent:a,showLoadingFor:(u=2e3,d={})=>{o(d),i(!0),setTimeout(()=>{i(!1)},u)}};return h.jsx(la.Provider,{value:c,children:e})},It=()=>{const e=p.useContext(la);if(e===void 0)throw new Error("Non puoi settare il loading");return e},Wc="0.0.205",ca=({errorMessage:e,errorShow:t})=>h.jsx("section",{className:t?"":"hidden",children:h.jsxs("div",{className:"container mx-auto",children:[h.jsx("h1",{className:"text-center text-8xl my-12",children:"Errore"}),h.jsx("pre",{className:"text-xl",children:e})]})});function Gc(){const[e,t]=p.useState(document.visibilityState),[n,i]=p.useState(document.hasFocus()),[s,o]=p.useState(!1),[r,a]=p.useState(!1),l=()=>{t(document.visibilityState)},c=()=>i(!0),u=()=>i(!1),d=y=>{o(y.persisted),a(!1)},f=()=>{a(!0)};p.useEffect(()=>(document.addEventListener("visibilitychange",l),window.addEventListener("focus",c),window.addEventListener("blur",u),window.addEventListener("pageshow",d),window.addEventListener("pagehide",f),()=>{document.removeEventListener("visibilitychange",l),window.removeEventListener("focus",c),window.removeEventListener("blur",u),window.removeEventListener("pageshow",d),window.removeEventListener("pagehide",f)}),[]);const m=p.useMemo(()=>e==="visible"&&n,[e,n]);return{visibilityState:e,isVisible:e==="visible",isHidden:e==="hidden",hasFocus:n,isActive:m,isFromBFCache:s,isPageHidden:r}}const ua=p.createContext(),qc=({children:e})=>{const t=Gc(),[n,i]=p.useState({}),[s,o]=p.useState(!1),r=p.useRef(!1),a=`Creare un file config.json in public per il corretto funzionamento
|
|
32
32
|
Esempio di config.json:
|
|
33
33
|
|
|
34
34
|
{
|
|
@@ -55,7 +55,7 @@ Esempio di config.json:
|
|
|
55
55
|
"backendToken": "",
|
|
56
56
|
"isDebug": "",
|
|
57
57
|
"showHeaderButton": ""
|
|
58
|
-
}`,l=(x,v)=>{if(!x)return null;let b=sessionStorage.getItem("sessionKey");return b||(b=`${v?v+"-":""}${crypto.randomUUID()}`,sessionStorage.setItem("sessionKey",b)),b},c=()=>{const x=new Date,v=String(x.getDate()).padStart(2,"0"),b=String(x.getMonth()+1).padStart(2,"0"),S=x.getFullYear(),j=String(x.getHours()).padStart(2,"0"),w=String(x.getMinutes()).padStart(2,"0"),R=String(x.getSeconds()).padStart(2,"0");return`${v}/${b}/${S} ${j}:${w}:${R}`},u=(x,v)=>new Promise((b,S)=>{const j=indexedDB.open(x,1);j.onupgradeneeded=w=>{const R=w.target.result;R.objectStoreNames.contains(v)||R.createObjectStore(v,{keyPath:"id"})},j.onsuccess=w=>b(w.target.result),j.onerror=w=>S(w.target.error)}),d=async(x,v,b)=>{const S=await u(x,v);return new Promise((j,w)=>{if(!S){w("Errore: DB non disponibile");return}const R=S==null?void 0:S.transaction(v,"readonly"),L=R==null?void 0:R.objectStore(v),M=L==null?void 0:L.get(b);M.onsuccess=()=>j(M.result),M.onerror=I=>w(I.target.error)})},f=async(x,v,b)=>{const S=await u(x,v);return new Promise((j,w)=>{if(!S){w("Errore: DB non disponibile");return}const R=S==null?void 0:S.transaction(v,"readwrite"),L=R==null?void 0:R.objectStore(v),M=L==null?void 0:L.put(b);M.onsuccess=()=>j(M.result),M.onerror=I=>w(I.target.error)})},m=async(x,v)=>{let b=Date.now(),S;do S=await d(x,v,b),S&&b++;while(S);return b},y=async(x,v,b)=>{b.id||(b.id=await m(x,v)),await f(x,v,b)},T=async()=>{try{const v=await(await fetch("/config.json")).json();let b;v.isDevelopment?b=Wc:b=(await(await fetch("/package.json")).json()).version;const S=l(v.hasSessionKey,v.appKey),j={...v,version:b,openIndexedDB:u,getDataIndexedDB:d,setDataIndexedDB:f,generateUniqueId:m,setDataWithAutoId:y,setCurrentDate:c,activity:t};v.hasSessionKey&&(j.sessionKey=S),i(j)}catch(x){console.error(x),o(!0)}};return p.useEffect(()=>{r.current||(r.current=!0,T())},[]),Object.keys(n).length===0?h.jsx(ua,{errorShow:s,errorMessage:a}):h.jsx(da.Provider,{value:n,children:e})},Le=()=>{const e=p.useContext(da);if(e===void 0)throw new Error("Non puoi leggere i config");return e},Yc=e=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:500,height:500,viewBox:"0 0 375 375",...e},V.createElement("defs",null,V.createElement("clipPath",{id:"6ca7e2bf04"},V.createElement("path",{d:"M265.137 0 375 109.863v155.274L265.137 375H109.863L0 265.137V109.863L109.863 0Zm0 0"})),V.createElement("clipPath",{id:"2c77c820c6"},V.createElement("path",{d:"M12.879 12.879H362.12V362.12H12.88Zm0 0"})),V.createElement("clipPath",{id:"3d94df7d66"},V.createElement("path",{d:"M259.805 12.879 362.12 115.195v144.61L259.805 362.12h-144.61L12.88 259.805v-144.61L115.195 12.88Zm0 0"})),V.createElement("clipPath",{id:"8793709a64"},V.createElement("path",{d:"M12.879 12.879h349.23v349.23H12.88Zm0 0"})),V.createElement("clipPath",{id:"fdb3fe29d8"},V.createElement("path",{d:"M259.797 12.879 362.109 115.19v144.606L259.797 362.109H115.19L12.88 259.797V115.19L115.19 12.88Zm0 0"}))),V.createElement("g",{clipPath:"url(#6ca7e2bf04)"},V.createElement("path",{fill:"#b91c1c",d:"M-37.5-37.5h450v450h-450z"})),V.createElement("g",{clipPath:"url(#2c77c820c6)"},V.createElement("g",{clipPath:"url(#3d94df7d66)"},V.createElement("path",{fill:"#b91c1c",d:"M12.879 12.879H362.12V362.12H12.88Zm0 0"}))),V.createElement("g",{clipPath:"url(#8793709a64)"},V.createElement("g",{clipPath:"url(#fdb3fe29d8)"},V.createElement("path",{fill:"none",stroke:"#fff",strokeWidth:25.5,d:"M259.797 12.879 362.109 115.19v144.606L259.797 362.109H115.19L12.88 259.797V115.19L115.19 12.88Zm0 0"}))),V.createElement("path",{fill:"#fff",d:"m114.477 267.442 53.421-79.859-53.203-79.75h34.235l38.625 61.563 38.625-61.563h34.234l-53.203 79.75 53.422 79.86h-34.219l-39.094-60.657-38.625 60.656Zm0 0"})),Kc=e=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:500,height:500,viewBox:"0 0 375 375",...e},V.createElement("defs",null,V.createElement("clipPath",{id:"30562604dd"},V.createElement("path",{d:"M187.5 0C83.945 0 0 83.945 0 187.5S83.945 375 187.5 375 375 291.055 375 187.5 291.055 0 187.5 0m0 0"})),V.createElement("clipPath",{id:"971fcd5f72"},V.createElement("path",{d:"M18.57 18.57h337.86v337.86H18.57Zm0 0"})),V.createElement("clipPath",{id:"e891a7f57e"},V.createElement("path",{d:"M187.5 18.57c-93.297 0-168.93 75.633-168.93 168.93S94.203 356.43 187.5 356.43s168.93-75.633 168.93-168.93S280.797 18.57 187.5 18.57m0 0"})),V.createElement("clipPath",{id:"19a9ddc130"},V.createElement("path",{d:"M18.57 18.57h337.5v337.5H18.57Zm0 0"})),V.createElement("clipPath",{id:"5e650d5bd0"},V.createElement("path",{d:"M187.496 18.57C94.2 18.57 18.57 94.2 18.57 187.496c0 93.297 75.63 168.926 168.926 168.926 93.297 0 168.926-75.629 168.926-168.926S280.793 18.57 187.496 18.57m0 0"}))),V.createElement("g",{clipPath:"url(#30562604dd)"},V.createElement("path",{fill:"#1d4ed8",d:"M-37.5-37.5h450v450h-450z"})),V.createElement("g",{clipPath:"url(#971fcd5f72)"},V.createElement("g",{clipPath:"url(#e891a7f57e)"},V.createElement("path",{fill:"#1d4ed8",d:"M18.57 18.57h337.86v337.86H18.57Zm0 0"}))),V.createElement("g",{clipPath:"url(#19a9ddc130)"},V.createElement("g",{clipPath:"url(#5e650d5bd0)"},V.createElement("path",{fill:"none",stroke:"#fff",strokeWidth:25.5,d:"M187.496 18.57C94.2 18.57 18.57 94.2 18.57 187.496c0 93.297 75.63 168.926 168.926 168.926 93.297 0 168.926-75.629 168.926-168.926S280.793 18.57 187.496 18.57Zm0 0"}))),V.createElement("path",{fill:"#fff",d:"M196.122 107.056q-7.938 0-13.797-5.86c-3.906-3.913-5.86-8.515-5.86-13.796q0-7.936 5.86-13.797 5.858-5.86 13.797-5.86 7.922 0 13.781 5.86c3.914 3.906 5.875 8.508 5.875 13.797 0 5.281-1.96 9.883-5.875 13.797q-5.86 5.86-13.781 5.86m-14.828 198.61c-5.98 0-9.891-2.415-11.735-7.235-1.836-4.832-2.75-11.27-2.75-19.312q-.002-19.313 3.266-37.922a2076 2076 0 0 1 6.562-35.516q3.282-16.906 3.282-31.39 0-3.797-.36-8.266-.346-4.482-1.718-6.906-5.52 3.456-14.313 11.39-8.784 7.922-13.953 17.578-2.424-2.42-2.422-6.562-.001-5.859 4.656-12.75 4.654-6.891 12.407-13.266 7.763-6.389 16.734-10.53 8.964-4.14 17.578-4.142 7.934 0 10.172 3.797 2.25 3.797 2.25 9.657 0 8.626-2.25 22.25a1236 1236 0 0 1-5.172 29.125 745 745 0 0 0-5.172 31.03q-2.236 15.519-2.234 28.282c0 4.367.226 8.445.687 12.234q.687 5.689 1.719 9.485 8.624-3.797 16.375-11.203 7.764-7.406 11.563-13.97 2.062 3.113 2.062 6.563 0 5.52-4.828 12.063-4.83 6.55-12.078 12.422-7.236 5.859-15.344 9.469c-5.398 2.414-10.39 3.625-14.984 3.625m0 0"})),Xc=e=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:500,height:500,viewBox:"0 0 375 375",...e},V.createElement("defs",null,V.createElement("clipPath",{id:"59a10ac27a"},V.createElement("path",{d:"M17.18 32.695H360V337.5H17.18Zm0 0"})),V.createElement("clipPath",{id:"664b27481e"},V.createElement("path",{d:"m207.043 43.574 149.352 261.367a21.77 21.77 0 0 1-.07 21.72A21.76 21.76 0 0 1 337.5 337.5H39.375a21.75 21.75 0 0 1-18.82-10.84 21.76 21.76 0 0 1-.075-21.719L169.832 43.574a21.43 21.43 0 0 1 37.211 0m0 0"}))),V.createElement("g",{clipPath:"url(#59a10ac27a)"},V.createElement("g",{clipPath:"url(#664b27481e)"},V.createElement("path",{fill:"#d97706",d:"M1.875 11.016h373.672V337.5H1.875Zm0 0"}))),V.createElement("path",{fill:"#fff",d:"M205.301 232.437v-113.25q0-3.686-2.11-5.797t-5.796-2.11h-17.906q-3.69 0-5.797 2.11-2.11 2.11-2.11 5.797v109.562c0 2.461.703 4.39 2.11 5.797q2.107 2.11 5.797 2.11h17.906q3.686 0 5.797-2.11zm0 59v-21.328q0-3.687-2.11-5.797t-5.796-2.11h-17.906q-3.69 0-5.797 2.11-2.11 2.11-2.11 5.797v17.64c0 2.461.703 4.39 2.11 5.797q2.107 2.11 5.797 2.11h17.906q3.686 0 5.797-2.11zm0 0"}));var fa={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Sr=p.createContext&&p.createContext(fa),Zc=["attr","size","title"];function Jc(e,t){if(e==null)return{};var n=Qc(e,t),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Qc(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function ci(){return ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ci.apply(this,arguments)}function Tr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function ui(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tr(Object(n),!0).forEach(function(i){eu(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tr(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function eu(e,t,n){return t=tu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tu(e){var t=nu(e,"string");return typeof t=="symbol"?t:t+""}function nu(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ha(e){return e&&e.map((t,n)=>p.createElement(t.tag,ui({key:n},t.attr),ha(t.child)))}function St(e){return t=>p.createElement(iu,ci({attr:ui({},e.attr)},t),ha(e.child))}function iu(e){var t=n=>{var{attr:i,size:s,title:o}=e,r=Jc(e,Zc),a=s||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),p.createElement("svg",ci({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,r,{className:l,style:ui(ui({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&p.createElement("title",null,o),e.children)};return Sr!==void 0?p.createElement(Sr.Consumer,null,n=>t(n)):t(fa)}function su(e){return St({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M17.47 250.9C88.82 328.1 158 397.6 224.5 485.5c72.3-143.8 146.3-288.1 268.4-444.37L460 26.06C356.9 135.4 276.8 238.9 207.2 361.9c-48.4-43.6-126.62-105.3-174.38-137z"},child:[]}]})(e)}var ru="2.0.9",ou=500,Er="user-agent",tn="",Pr="?",le={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},je="browser",at="cpu",it="device",We="engine",De="os",nn="result",C="name",E="type",k="vendor",A="version",Te="architecture",jn="major",P="model",ti="console",z="mobile",X="tablet",de="smarttv",tt="wearable",Gn="xr",Tn="embedded",au="fetcher",zt="inapp",Is="brands",Mt="formFactors",Ns="fullVersionList",sn="platform",Bs="platformVersion",Ti="bitness",Tt="sec-ch-ua",lu=Tt+"-full-version-list",cu=Tt+"-arch",uu=Tt+"-"+Ti,du=Tt+"-form-factors",fu=Tt+"-"+z,hu=Tt+"-"+P,pa=Tt+"-"+sn,pu=pa+"-version",ma=[Is,Ns,z,P,sn,Bs,Te,Mt,Ti],qn="Amazon",$t="Apple",Cr="ASUS",Ar="BlackBerry",At="Google",kr="Huawei",Ri="Lenovo",jr="Honor",Yn="LG",Mi="Microsoft",Di="Motorola",Rr="Nvidia",Mr="OnePlus",Li="OPPO",gn="Samsung",Dr="Sharp",yn="Sony",Vi="Xiaomi",Oi="Zebra",Lr="Chrome",Vr="Chromium",mt="Chromecast",ni="Edge",vn="Firefox",Ut="Opera",Ii="Facebook",Or="Sogou",Ht="Mobile ",Wt=" Browser",ns="Windows",mu=typeof window!==le.UNDEFINED,ke=mu&&window.navigator?window.navigator:void 0,Dt=ke&&ke.userAgentData?ke.userAgentData:void 0,gu=function(e,t){var n={},i=t;if(!di(t)){i={};for(var s in t)for(var o in t[s])i[o]=t[s][o].concat(i[o]?i[o]:[])}for(var r in e)n[r]=i[r]&&i[r].length%2===0?i[r].concat(e[r]):e[r];return n},Ei=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},is=function(e,t){if(typeof e===le.OBJECT&&e.length>0){for(var n in e)if(vt(t)==vt(e[n]))return!0;return!1}return On(e)?vt(t)==vt(e):!1},di=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||(t?di(e[n]):!1)},On=function(e){return typeof e===le.STRING},Ni=function(e){if(e){for(var t=[],n=rn(/\\?\"/g,e).split(","),i=0;i<n.length;i++)if(n[i].indexOf(";")>-1){var s=fi(n[i]).split(";v=");t[i]={brand:s[0],version:s[1]}}else t[i]=fi(n[i]);return t}},vt=function(e){return On(e)?e.toLowerCase():e},ss=function(e){return On(e)?rn(/[^\d\.]/g,e).split(".")[0]:void 0},ot=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==le.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},rn=function(e,t){return On(t)?t.replace(e,tn):t},bn=function(e){return rn(/\\?\"/g,e)},fi=function(e,t){return e=rn(/^\s\s*/,String(e)),typeof t===le.UNDEFINED?e:e.substring(0,t)},rs=function(e,t){if(!(!e||!t))for(var n=0,i,s,o,r,a,l;n<t.length&&!a;){var c=t[n],u=t[n+1];for(i=s=0;i<c.length&&!a&&c[i];)if(a=c[i++].exec(e),a)for(o=0;o<u.length;o++)l=a[++s],r=u[o],typeof r===le.OBJECT&&r.length>0?r.length===2?typeof r[1]==le.FUNCTION?this[r[0]]=r[1].call(this,l):this[r[0]]=r[1]:r.length>=3&&(typeof r[1]===le.FUNCTION&&!(r[1].exec&&r[1].test)?r.length>3?this[r[0]]=l?r[1].apply(this,r.slice(2)):void 0:this[r[0]]=l?r[1].call(this,l,r[2]):void 0:r.length==3?this[r[0]]=l?l.replace(r[1],r[2]):void 0:r.length==4?this[r[0]]=l?r[3].call(this,l.replace(r[1],r[2])):void 0:r.length>4&&(this[r[0]]=l?r[3].apply(this,[l.replace(r[1],r[2])].concat(r.slice(4))):void 0)):this[r]=l||void 0;n+=2}},He=function(e,t){for(var n in t)if(typeof t[n]===le.OBJECT&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(is(t[n][i],e))return n===Pr?void 0:n}else if(is(t[n],e))return n===Pr?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},Ir={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},Nr={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},yu={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Br={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[A,[C,Ht+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[A,[C,ni+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[A,[C,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[C,A],[/opios[\/ ]+([\w\.]+)/i],[A,[C,Ut+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[A,[C,Ut+" GX"]],[/\bopr\/([\w\.]+)/i],[A,[C,Ut]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[A,[C,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[A,[C,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[C,A],[/quark(?:pc)?\/([-\w\.]+)/i],[A,[C,"Quark"]],[/\bddg\/([\w\.]+)/i],[A,[C,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[A,[C,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[A,[C,"WeChat"]],[/konqueror\/([\w\.]+)/i],[A,[C,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[A,[C,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[A,[C,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[A,[C,"Smart "+Ri+Wt]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[C,/(.+)/,"$1 Secure"+Wt],A],[/norton\/([\w\.]+)/i],[A,[C,"Norton Private"+Wt]],[/\bfocus\/([\w\.]+)/i],[A,[C,vn+" Focus"]],[/ mms\/([\w\.]+)$/i],[A,[C,Ut+" Neon"]],[/ opt\/([\w\.]+)$/i],[A,[C,Ut+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[A,[C,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[A,[C,"Dolphin"]],[/coast\/([\w\.]+)/i],[A,[C,Ut+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[A,[C,"MIUI"+Wt]],[/fxios\/([\w\.-]+)/i],[A,[C,Ht+vn]],[/\bqihoobrowser\/?([\w\.]*)/i],[A,[C,"360"]],[/\b(qq)\/([\w\.]+)/i],[[C,/(.+)/,"$1Browser"],A],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[C,/(.+)/,"$1"+Wt],A],[/samsungbrowser\/([\w\.]+)/i],[A,[C,gn+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[A,[C,Or+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[C,Or+" Mobile"],A],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[C,A],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[C],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[A,C],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[C,Ii],A,[E,zt]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[C,A,[E,zt]],[/\bgsa\/([\w\.]+) .*safari\//i],[A,[C,"GSA"],[E,zt]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[A,[C,"TikTok"],[E,zt]],[/\[(linkedin)app\]/i],[C,[E,zt]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[C,/(.+)/,"Zalo"],A,[E,zt]],[/(chromium)[\/ ]([-\w\.]+)/i],[C,A],[/ome-(lighthouse)$/i],[C,[E,au]],[/headlesschrome(?:\/([\w\.]+)| )/i],[A,[C,Lr+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[A,[C,ni+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[C,Lr+" WebView"],A],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[A,[C,"Android"+Wt]],[/chrome\/([\w\.]+) mobile/i],[A,[C,Ht+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[C,A],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[A,[C,Ht+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[C,Ht+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[A,C],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[C,[A,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[C,A],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[C,Ht+vn],A],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[C,"Netscape"],A],[/(wolvic|librewolf)\/([\w\.]+)/i],[C,A],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[A,[C,vn+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[C,[A,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[C,[A,/[^\d\.]+./,tn]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Te,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Te,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Te,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Te,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Te,"arm"]],[/ sun4\w[;\)]/i],[[Te,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[Te,/ower/,tn,vt]],[/mc680.0/i],[[Te,"68k"]],[/winnt.+\[axp/i],[[Te,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[P,[k,gn],[E,X]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[P,[k,gn],[E,z]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[P,[k,$t],[E,z]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[P,[k,$t],[E,X]],[/(macintosh);/i],[P,[k,$t]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[P,[k,Dr],[E,z]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[P,[k,jr],[E,X]],[/honor([-\w ]+)[;\)]/i],[P,[k,jr],[E,z]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[P,[k,kr],[E,X]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[P,[k,kr],[E,z]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[P,/_/g," "],[k,Vi],[E,X]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[P,/_/g," "],[k,Vi],[E,z]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[P,[k,Mr],[E,z]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[P,[k,Li],[E,z]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[P,[k,He,{OnePlus:["203","304","403","404","413","415"],"*":Li}],[E,X]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[P,[k,"BLU"],[E,z]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[P,[k,"Vivo"],[E,z]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[P,[k,"Realme"],[E,z]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[P,[k,Ri],[E,X]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[P,[k,Ri],[E,z]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[P,[k,Di],[E,z]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[P,[k,Di],[E,X]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[P,[k,Yn],[E,X]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[P,[k,Yn],[E,z]],[/(nokia) (t[12][01])/i],[k,P,[E,X]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[P,/_/g," "],[E,z],[k,"Nokia"]],[/(pixel (c|tablet))\b/i],[P,[k,At],[E,X]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[P,[k,At],[E,z]],[/(google) (pixelbook( go)?)/i],[k,P],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[P,[k,yn],[E,z]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[P,"Xperia Tablet"],[k,yn],[E,X]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[P,[k,qn],[E,X]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[P,/(.+)/g,"Fire Phone $1"],[k,qn],[E,z]],[/(playbook);[-\w\),; ]+(rim)/i],[P,k,[E,X]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[P,[k,Ar],[E,z]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[P,[k,Cr],[E,X]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[P,[k,Cr],[E,z]],[/(nexus 9)/i],[P,[k,"HTC"],[E,X]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[k,[P,/_/g," "],[E,z]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[P,[k,"TCL"],[E,X]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[P,[k,"TCL"],[E,z]],[/(itel) ((\w+))/i],[[k,vt],P,[E,He,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[P,[k,"Acer"],[E,X]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[P,[k,"Meizu"],[E,z]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[P,[k,"Ulefone"],[E,z]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[P,[k,"Energizer"],[E,z]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[P,[k,"Cat"],[E,z]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[P,[k,"Smartfren"],[E,z]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[P,[k,"Nothing"],[E,z]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[P,[k,"Archos"],[E,X]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[P,[k,"Archos"],[E,z]],[/; (n159v)/i],[P,[k,"HMD"],[E,z]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[k,P,[E,X]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[k,P,[E,z]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[k,P,[E,X]],[/(surface duo)/i],[P,[k,Mi],[E,X]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[P,[k,"Fairphone"],[E,z]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[P,[k,Rr],[E,X]],[/(sprint) (\w+)/i],[k,P,[E,z]],[/(kin\.[onetw]{3})/i],[[P,/\./g," "],[k,Mi],[E,z]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[P,[k,Oi],[E,X]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[P,[k,Oi],[E,z]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[k,[E,de]],[/hbbtv.+maple;(\d+)/i],[[P,/^/,"SmartTV"],[k,gn],[E,de]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[k,P,[E,de]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[k,Yn],[E,de]],[/(apple) ?tv/i],[k,[P,$t+" TV"],[E,de]],[/crkey.*devicetype\/chromecast/i],[[P,mt+" Third Generation"],[k,At],[E,de]],[/crkey.*devicetype\/([^/]*)/i],[[P,/^/,"Chromecast "],[k,At],[E,de]],[/fuchsia.*crkey/i],[[P,mt+" Nest Hub"],[k,At],[E,de]],[/crkey/i],[[P,mt],[k,At],[E,de]],[/(portaltv)/i],[P,[k,Ii],[E,de]],[/droid.+aft(\w+)( bui|\))/i],[P,[k,qn],[E,de]],[/(shield \w+ tv)/i],[P,[k,Rr],[E,de]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[P,[k,Dr],[E,de]],[/(bravia[\w ]+)( bui|\))/i],[P,[k,yn],[E,de]],[/(mi(tv|box)-?\w+) bui/i],[P,[k,Vi],[E,de]],[/Hbbtv.*(technisat) (.*);/i],[k,P,[E,de]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[k,/.+\/(\w+)/,"$1",He,{LG:"lge"}],[P,fi],[E,de]],[/(playstation \w+)/i],[P,[k,yn],[E,ti]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[P,[k,Mi],[E,ti]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[k,He,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],P,[E,ti]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[P,[k,gn],[E,tt]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[k,P,[E,tt]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[P,[k,Li],[E,tt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[P,[k,$t],[E,tt]],[/(opwwe\d{3})/i],[P,[k,Mr],[E,tt]],[/(moto 360)/i],[P,[k,Di],[E,tt]],[/(smartwatch 3)/i],[P,[k,yn],[E,tt]],[/(g watch r)/i],[P,[k,Yn],[E,tt]],[/droid.+; (wt63?0{2,3})\)/i],[P,[k,Oi],[E,tt]],[/droid.+; (glass) \d/i],[P,[k,At],[E,Gn]],[/(pico) ([\w ]+) os\d/i],[k,P,[E,Gn]],[/(quest( \d| pro)?s?).+vr/i],[P,[k,Ii],[E,Gn]],[/mobile vr; rv.+firefox/i],[[E,Gn]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[k,[E,Tn]],[/(aeobc)\b/i],[P,[k,qn],[E,Tn]],[/(homepod).+mac os/i],[P,[k,$t],[E,Tn]],[/windows iot/i],[[E,Tn]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[P,[E,de]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[E,de]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[P,[E,He,{mobile:"Mobile",xr:"VR","*":X}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[E,X]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[E,z]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[P,[k,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[A,[C,ni+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[C,A],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[A,[C,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[C,A],[/ladybird\//i],[[C,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[A,C]],os:[[/(windows nt) (6\.[23]); arm/i],[[C,/N/,"R"],[A,He,Ir]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[C,A],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[A,/(;|\))/g,"",He,Ir],[C,ns]],[/(windows ce)\/?([\d\.]*)/i],[C,A],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[A,/_/g,"."],[C,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[C,"macOS"],[A,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[A,[C,mt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[A,[C,mt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[A,[C,mt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[A,[C,mt+" Linux"]],[/crkey\/([\d\.]+)/i],[A,[C,mt]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[A,C],[/(ubuntu) ([\w\.]+) like android/i],[[C,/(.+)/,"$1 Touch"],A],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[C,A],[/\(bb(10);/i],[A,[C,Ar]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[A,[C,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[A,[C,vn+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[A,[C,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[A,He,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[C,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[A,[C,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[A,[C,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[A,[C,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[C,A],[/(sunos) ?([\d\.]*)/i],[[C,"Solaris"],A],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[C,A]]},Kn=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return ot.call(e.init,[[je,[C,A,jn,E]],[at,[Te]],[it,[E,P,k]],[We,[C,A]],[De,[C,A]]]),ot.call(e.isIgnore,[[je,[A,jn]],[We,[A]],[De,[A]]]),ot.call(e.isIgnoreRgx,[[je,/ ?browser$/i],[De,/ ?os$/i]]),ot.call(e.toString,[[je,[C,A]],[at,[Te]],[it,[k,P]],[We,[C,A]],[De,[C,A]]]),e}(),vu=function(e,t){var n=Kn.init[t],i=Kn.isIgnore[t]||0,s=Kn.isIgnoreRgx[t]||0,o=Kn.toString[t]||0;function r(){ot.call(this,n)}return r.prototype.getItem=function(){return e},r.prototype.withClientHints=function(){return Dt?Dt.getHighEntropyValues(ma).then(function(a){return e.setCH(new ga(a,!1)).parseCH().get()}):e.parseCH().get()},r.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=nn&&(r.prototype.is=function(a){var l=!1;for(var c in this)if(this.hasOwnProperty(c)&&!is(i,c)&&vt(s?rn(s,this[c]):this[c])==vt(s?rn(s,a):a)){if(l=!0,a!=le.UNDEFINED)break}else if(a==le.UNDEFINED&&l){l=!l;break}return l},r.prototype.toString=function(){var a=tn;for(var l in o)typeof this[o[l]]!==le.UNDEFINED&&(a+=(a?" ":tn)+this[o[l]]);return a||le.UNDEFINED}),r.prototype.then=function(a){var l=this,c=function(){for(var d in l)l.hasOwnProperty(d)&&(this[d]=l[d])};c.prototype={is:r.prototype.is,toString:r.prototype.toString,withClientHints:r.prototype.withClientHints,withFeatureCheck:r.prototype.withFeatureCheck};var u=new c;return a(u),u},new r};function ga(e,t){if(e=e||{},ot.call(this,ma),t)ot.call(this,[[Is,Ni(e[Tt])],[Ns,Ni(e[lu])],[z,/\?1/.test(e[fu])],[P,bn(e[hu])],[sn,bn(e[pa])],[Bs,bn(e[pu])],[Te,bn(e[cu])],[Mt,Ni(e[du])],[Ti,bn(e[uu])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==le.UNDEFINED&&(this[n]=e[n])}function xt(e,t,n,i){return ot.call(this,[["itemType",e],["ua",t],["uaCH",i],["rgxMap",n],["data",vu(this,e)]]),this}xt.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data};xt.prototype.set=function(e,t){return this.data[e]=t,this};xt.prototype.setCH=function(e){return this.uaCH=e,this};xt.prototype.detectFeature=function(){if(ke&&ke.userAgent==this.ua)switch(this.itemType){case je:ke.brave&&typeof ke.brave.isBrave==le.FUNCTION&&this.set(C,"Brave");break;case it:!this.get(E)&&Dt&&Dt[z]&&this.set(E,z),this.get(P)=="Macintosh"&&ke&&typeof ke.standalone!==le.UNDEFINED&&ke.maxTouchPoints&&ke.maxTouchPoints>2&&this.set(P,"iPad").set(E,X);break;case De:!this.get(C)&&Dt&&Dt[sn]&&this.set(C,Dt[sn]);break;case nn:var e=this.data,t=function(n){return e[n].getItem().detectFeature().get()};this.set(je,t(je)).set(at,t(at)).set(it,t(it)).set(We,t(We)).set(De,t(De))}return this};xt.prototype.parseUA=function(){switch(this.itemType!=nn&&rs.call(this.data,this.ua,this.rgxMap),this.itemType){case je:this.set(jn,ss(this.get(A)));break;case De:if(this.get(C)=="iOS"&&this.get(A)=="18.6"){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(A,e[1])}break}return this};xt.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case je:case We:var n=e[Ns]||e[Is],i;if(n)for(var s=0;s<n.length;s++){var o=n[s].brand||n[s],r=n[s].version;this.itemType==je&&!/not.a.brand/i.test(o)&&(!i||/Chrom/.test(i)&&o!=Vr||i==ni&&/WebView2/.test(o))&&(o=He(o,yu),i=this.get(C),i&&!/Chrom/.test(i)&&/Chrom/.test(o)||this.set(C,o).set(A,r).set(jn,ss(r)),i=o),this.itemType==We&&o==Vr&&this.set(A,r)}break;case at:var a=e[Te];a&&(a&&e[Ti]=="64"&&(a+="64"),rs.call(this.data,a+";",t));break;case it:if(e[z]&&this.set(E,z),e[P]&&(this.set(P,e[P]),!this.get(E)||!this.get(k))){var l={};rs.call(l,"droid 9; "+e[P]+")",t),!this.get(E)&&l.type&&this.set(E,l.type),!this.get(k)&&l.vendor&&this.set(k,l.vendor)}if(e[Mt]){var c;if(typeof e[Mt]!="string")for(var u=0;!c&&u<e[Mt].length;)c=He(e[Mt][u++],Nr);else c=He(e[Mt],Nr);this.set(E,c)}break;case De:var d=e[sn];if(d){var f=e[Bs];d==ns&&(f=parseInt(ss(f),10)>=13?"11":"10"),this.set(C,d).set(A,f)}this.get(C)==ns&&e[P]=="Xbox"&&this.set(C,"Xbox").set(A,void 0);break;case nn:var m=this.data,y=function(T){return m[T].getItem().setCH(e).parseCH().get()};this.set(je,y(je)).set(at,y(at)).set(it,y(it)).set(We,y(We)).set(De,y(De))}return this};function lt(e,t,n){if(typeof e===le.OBJECT?(di(e,!0)?(typeof t===le.OBJECT&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e===le.STRING&&!di(t,!0)&&(n=t,t=void 0),n)if(typeof n.append===le.FUNCTION){var i={};n.forEach(function(u,d){i[String(d).toLowerCase()]=u}),n=i}else{var s={};for(var o in n)n.hasOwnProperty(o)&&(s[String(o).toLowerCase()]=n[o]);n=s}if(!(this instanceof lt))return new lt(e,t,n).getResult();var r=typeof e===le.STRING?e:n&&n[Er]?n[Er]:ke&&ke.userAgent?ke.userAgent:tn,a=new ga(n,!0),l=t?gu(Br,t):Br,c=function(u){return u==nn?function(){return new xt(u,r,l,a).set("ua",r).set(je,this.getBrowser()).set(at,this.getCPU()).set(it,this.getDevice()).set(We,this.getEngine()).set(De,this.getOS()).get()}:function(){return new xt(u,r,l[u],a).parseUA().get()}};return ot.call(this,[["getBrowser",c(je)],["getCPU",c(at)],["getDevice",c(it)],["getEngine",c(We)],["getOS",c(De)],["getResult",c(nn)],["getUA",function(){return r}],["setUA",function(u){return On(u)&&(r=fi(u,ou)),this}]]).setUA(r),this}lt.VERSION=ru;lt.BROWSER=Ei([C,A,jn,E]);lt.CPU=Ei([Te]);lt.DEVICE=Ei([P,k,E,ti,z,de,X,tt,Tn]);lt.ENGINE=lt.OS=Ei([C,A]);let Xn=null;const bu=()=>{if(Xn)return Xn;const t=new lt().getResult(),{device:n,os:i,browser:s}=t,o=n.model==="iPad"||/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&"ontouchend"in document;return Xn={type:n.type||(o?"tablet":"desktop"),os:i.name,browser:s.name,vendor:n.vendor||null,model:n.model||(o?"iPad":null),isMobile:n.type==="mobile",isTablet:n.type==="tablet"||o,isDesktop:!n.type&&!o,isIPhone:n.model==="iPhone",isIPad:o,isAndroid:i.name==="Android"},Xn},ya=()=>p.useMemo(()=>bu(),[]);function he(){return he=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},he.apply(this,arguments)}function xu(e,t){if(e==null)return{};var n={},i=Object.getOwnPropertyNames(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s]);return n}const va=p.createContext({});function wu(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const ba=typeof window<"u",Su=ba?p.useLayoutEffect:p.useEffect,_s=p.createContext(null);function Fs(e,t){e.indexOf(t)===-1&&e.push(t)}function hi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const rt=(e,t,n)=>n>t?t:n<e?e:n;function os(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let an=()=>{},ct=()=>{};var oa;typeof process<"u"&&((oa=process.env)==null?void 0:oa.NODE_ENV)!=="production"&&(an=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(os(t,n))},ct=(e,t,n)=>{if(!e)throw new Error(os(t,n))});const ut={},xa=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function wa(e){return typeof e=="object"&&e!==null}const Sa=e=>/^0[^.\s]+$/u.test(e);function Ta(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ne=e=>e,Tu=(e,t)=>n=>t(e(n)),In=(...e)=>e.reduce(Tu),Rn=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class zs{constructor(){this.subscriptions=[]}add(t){return Fs(this.subscriptions,t),()=>hi(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Be=e=>e*1e3,Ie=e=>e/1e3;function Ea(e,t){return t?e*(1e3/t):0}const _r=new Set;function $s(e,t,n){e||_r.has(t)||(console.warn(os(t,n)),_r.add(t))}const Pa=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Eu=1e-7,Pu=12;function Cu(e,t,n,i,s){let o,r,a=0;do r=t+(n-t)/2,o=Pa(r,i,s)-e,o>0?n=r:t=r;while(Math.abs(o)>Eu&&++a<Pu);return r}function Nn(e,t,n,i){if(e===t&&n===i)return Ne;const s=o=>Cu(o,0,1,e,n);return o=>o===0||o===1?o:Pa(s(o),t,i)}const Ca=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Aa=e=>t=>1-e(1-t),ka=Nn(.33,1.53,.69,.99),Us=Aa(ka),ja=Ca(Us),Ra=e=>(e*=2)<1?.5*Us(e):.5*(2-Math.pow(2,-10*(e-1))),Hs=e=>1-Math.sin(Math.acos(e)),Ma=Aa(Hs),Da=Ca(Hs),Au=Nn(.42,0,1,1),ku=Nn(0,0,.58,1),La=Nn(.42,0,.58,1),ju=e=>Array.isArray(e)&&typeof e[0]!="number",Va=e=>Array.isArray(e)&&typeof e[0]=="number",Fr={linear:Ne,easeIn:Au,easeInOut:La,easeOut:ku,circIn:Hs,circInOut:Da,circOut:Ma,backIn:Us,backInOut:ja,backOut:ka,anticipate:Ra},Ru=e=>typeof e=="string",zr=e=>{if(Va(e)){ct(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Nn(t,n,i,s)}else if(Ru(e))return ct(Fr[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Fr[e];return e},Zn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Mu(e,t){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const y=f&&s?n:i;return d&&r.add(u),y.has(u)||y.add(u),u},cancel:u=>{i.delete(u),r.delete(u)},process:u=>{if(a=u,s){o=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,c.process(u))}};return c}const Du=40;function Oa(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Zn.reduce((S,j)=>(S[j]=Mu(o),S),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:m,postRender:y}=r,T=()=>{const S=ut.useManualTiming?s.timestamp:performance.now();n=!1,ut.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(S-s.timestamp,Du),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),m.process(s),y.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(T))},x=()=>{n=!0,i=!0,s.isProcessing||e(T)};return{schedule:Zn.reduce((S,j)=>{const w=r[j];return S[j]=(R,L=!1,M=!1)=>(n||x(),w.schedule(R,L,M)),S},{}),cancel:S=>{for(let j=0;j<Zn.length;j++)r[Zn[j]].cancel(S)},state:s,steps:r}}const{schedule:Z,cancel:wt,state:xe,steps:Bi}=Oa(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ne,!0);let ii;function Lu(){ii=void 0}const Ee={now:()=>(ii===void 0&&Ee.set(xe.isProcessing||ut.useManualTiming?xe.timestamp:performance.now()),ii),set:e=>{ii=e,queueMicrotask(Lu)}},Ia=e=>t=>typeof t=="string"&&t.startsWith(e),Na=Ia("--"),Vu=Ia("var(--"),Ws=e=>Vu(e)?Ou.test(e.split("/*")[0].trim()):!1,Ou=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $r(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ln={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Mn={...ln,transform:e=>rt(0,1,e)},Jn={...ln,default:1},Cn=e=>Math.round(e*1e5)/1e5,Gs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Iu(e){return e==null}const Nu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qs=(e,t)=>n=>!!(typeof n=="string"&&Nu.test(n)&&n.startsWith(e)||t&&!Iu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ba=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,o,r,a]=i.match(Gs);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Bu=e=>rt(0,255,e),_i={...ln,transform:e=>Math.round(Bu(e))},Lt={test:qs("rgb","red"),parse:Ba("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+_i.transform(e)+", "+_i.transform(t)+", "+_i.transform(n)+", "+Cn(Mn.transform(i))+")"};function _u(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const as={test:qs("#"),parse:_u,transform:Lt.transform},Bn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gt=Bn("deg"),st=Bn("%"),N=Bn("px"),Fu=Bn("vh"),zu=Bn("vw"),Ur={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},Yt={test:qs("hsl","hue"),parse:Ba("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+st.transform(Cn(t))+", "+st.transform(Cn(n))+", "+Cn(Mn.transform(i))+")"},fe={test:e=>Lt.test(e)||as.test(e)||Yt.test(e),parse:e=>Lt.test(e)?Lt.parse(e):Yt.test(e)?Yt.parse(e):as.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Lt.transform(e):Yt.transform(e),getAnimatableNone:e=>{const t=fe.parse(e);return t.alpha=0,fe.transform(t)}},$u=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Uu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Gs))==null?void 0:t.length)||0)+(((n=e.match($u))==null?void 0:n.length)||0)>0}const _a="number",Fa="color",Hu="var",Wu="var(",Hr="${}",Gu=/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 Dn(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Gu,l=>(fe.test(l)?(i.color.push(o),s.push(Fa),n.push(fe.parse(l))):l.startsWith(Wu)?(i.var.push(o),s.push(Hu),n.push(l)):(i.number.push(o),s.push(_a),n.push(parseFloat(l))),++o,Hr)).split(Hr);return{values:n,split:a,indexes:i,types:s}}function za(e){return Dn(e).values}function $a(e){const{split:t,types:n}=Dn(e),i=t.length;return s=>{let o="";for(let r=0;r<i;r++)if(o+=t[r],s[r]!==void 0){const a=n[r];a===_a?o+=Cn(s[r]):a===Fa?o+=fe.transform(s[r]):o+=s[r]}return o}}const qu=e=>typeof e=="number"?0:fe.test(e)?fe.getAnimatableNone(e):e;function Yu(e){const t=za(e);return $a(e)(t.map(qu))}const Ge={test:Uu,parse:za,createTransformer:$a,getAnimatableNone:Yu};function Fi(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 Ku({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,o=0,r=0;if(!t)s=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Fi(l,a,e+1/3),o=Fi(l,a,e),r=Fi(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}function pi(e,t){return n=>n>0?t:e}const ie=(e,t,n)=>e+(t-e)*n,zi=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Xu=[as,Lt,Yt],Zu=e=>Xu.find(t=>t.test(e));function Wr(e){const t=Zu(e);if(an(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Yt&&(n=Ku(n)),n}const Gr=(e,t)=>{const n=Wr(e),i=Wr(t);if(!n||!i)return pi(e,t);const s={...n};return o=>(s.red=zi(n.red,i.red,o),s.green=zi(n.green,i.green,o),s.blue=zi(n.blue,i.blue,o),s.alpha=ie(n.alpha,i.alpha,o),Lt.transform(s))},ls=new Set(["none","hidden"]);function Ju(e,t){return ls.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Qu(e,t){return n=>ie(e,t,n)}function Ys(e){return typeof e=="number"?Qu:typeof e=="string"?Ws(e)?pi:fe.test(e)?Gr:nd:Array.isArray(e)?Ua:typeof e=="object"?fe.test(e)?Gr:ed:pi}function Ua(e,t){const n=[...e],i=n.length,s=e.map((o,r)=>Ys(o)(o,t[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}}function ed(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=Ys(e[s])(e[s],t[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}}function td(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],r=e.indexes[o][i[o]],a=e.values[r]??0;n[s]=a,i[o]++}return n}const nd=(e,t)=>{const n=Ge.createTransformer(t),i=Dn(e),s=Dn(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?ls.has(e)&&!s.values.length||ls.has(t)&&!i.values.length?Ju(e,t):In(Ua(td(i,s),s.values),n):(an(!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.`,"complex-values-different"),pi(e,t))};function Ha(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ie(e,t,n):Ys(e)(e,t)}const id=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Z.update(t,n),stop:()=>wt(t),now:()=>xe.isProcessing?xe.timestamp:Ee.now()}},Wa=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)i+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},mi=2e4;function Ks(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<mi;)t+=n,i=e.next(t);return t>=mi?1/0:t}function sd(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(Ks(i),mi);return{type:"keyframes",ease:o=>i.next(s*o).value/t,duration:Ie(s)}}const rd=5;function Ga(e,t,n){const i=Math.max(t-rd,0);return Ea(n-e(i),t-i)}const ne={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},qr=.001;function od({duration:e=ne.duration,bounce:t=ne.bounce,velocity:n=ne.velocity,mass:i=ne.mass}){let s,o;an(e<=Be(ne.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=rt(ne.minDamping,ne.maxDamping,r),e=rt(ne.minDuration,ne.maxDuration,Ie(e)),r<1?(s=c=>{const u=c*r,d=u*e,f=u-n,m=cs(c,r),y=Math.exp(-d);return qr-f/m*y},o=c=>{const d=c*r*e,f=d*n+n,m=Math.pow(r,2)*Math.pow(c,2)*e,y=Math.exp(-d),T=cs(Math.pow(c,2),r);return(-s(c)+qr>0?-1:1)*((f-m)*y)/T}):(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=ld(s,o,a);if(e=Be(e),isNaN(l))return{stiffness:ne.stiffness,damping:ne.damping,duration:e};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:r*2*Math.sqrt(i*c),duration:e}}}const ad=12;function ld(e,t,n){let i=n;for(let s=1;s<ad;s++)i=i-e(i)/t(i);return i}function cs(e,t){return e*Math.sqrt(1-t*t)}const cd=["duration","bounce"],ud=["stiffness","damping","mass"];function Yr(e,t){return t.some(n=>e[n]!==void 0)}function dd(e){let t={velocity:ne.velocity,stiffness:ne.stiffness,damping:ne.damping,mass:ne.mass,isResolvedFromDuration:!1,...e};if(!Yr(e,ud)&&Yr(e,cd))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,o=2*rt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ne.mass,stiffness:s,damping:o}}else{const n=od(e);t={...t,...n,mass:ne.mass},t.isResolvedFromDuration=!0}return t}function gi(e=ne.visualDuration,t=ne.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:m}=dd({...n,velocity:-Ie(n.velocity||0)}),y=f||0,T=c/(2*Math.sqrt(l*u)),x=r-o,v=Ie(Math.sqrt(l/u)),b=Math.abs(x)<5;i||(i=b?ne.restSpeed.granular:ne.restSpeed.default),s||(s=b?ne.restDelta.granular:ne.restDelta.default);let S;if(T<1){const w=cs(v,T);S=R=>{const L=Math.exp(-T*v*R);return r-L*((y+T*v*x)/w*Math.sin(w*R)+x*Math.cos(w*R))}}else if(T===1)S=w=>r-Math.exp(-v*w)*(x+(y+v*x)*w);else{const w=v*Math.sqrt(T*T-1);S=R=>{const L=Math.exp(-T*v*R),M=Math.min(w*R,300);return r-L*((y+T*v*x)*Math.sinh(M)+w*x*Math.cosh(M))/w}}const j={calculatedDuration:m&&d||null,next:w=>{const R=S(w);if(m)a.done=w>=d;else{let L=w===0?y:0;T<1&&(L=w===0?Be(y):Ga(S,w,R));const M=Math.abs(L)<=i,I=Math.abs(r-R)<=s;a.done=M&&I}return a.value=a.done?r:R,a},toString:()=>{const w=Math.min(Ks(j),mi),R=Wa(L=>j.next(w*L).value,w,30);return w+"ms "+R},toTransition:()=>{}};return j}gi.applyToOptions=e=>{const t=sd(e,100,gi);return e.ease=t.ease,e.duration=Be(t.duration),e.type="keyframes",e};function us({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=M=>a!==void 0&&M<a||l!==void 0&&M>l,y=M=>a===void 0?l:l===void 0||Math.abs(a-M)<Math.abs(l-M)?a:l;let T=n*t;const x=d+T,v=r===void 0?x:r(x);v!==x&&(T=v-d);const b=M=>-T*Math.exp(-M/i),S=M=>v+b(M),j=M=>{const I=b(M),B=S(M);f.done=Math.abs(I)<=c,f.value=f.done?v:B};let w,R;const L=M=>{m(f.value)&&(w=M,R=gi({keyframes:[f.value,y(f.value)],velocity:Ga(S,M,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return L(0),{calculatedDuration:null,next:M=>{let I=!1;return!R&&w===void 0&&(I=!0,j(M),L(M)),w!==void 0&&M>=w?R.next(M-w):(!I&&j(M),f)}}}function fd(e,t,n){const i=[],s=n||ut.mix||Ha,o=e.length-1;for(let r=0;r<o;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||Ne:t;a=In(l,a)}i.push(a)}return i}function hd(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const o=e.length;if(ct(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=fd(t,i,s),l=a.length,c=u=>{if(r&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Rn(e[d],e[d+1],u);return a[d](f)};return n?u=>c(rt(e[0],e[o-1],u)):c}function pd(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=Rn(0,t,i);e.push(ie(n,1,s))}}function md(e){const t=[0];return pd(t,e.length-1),t}function gd(e,t){return e.map(n=>n*t)}function yd(e,t){return e.map(()=>t||La).splice(0,e.length-1)}function Kt({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=ju(i)?i.map(zr):zr(i),o={done:!1,value:t[0]},r=gd(n&&n.length===t.length?n:md(t),e),a=hd(r,t,{ease:Array.isArray(s)?s:yd(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const vd=e=>e!==null;function Xs(e,{repeat:t,repeatType:n="loop"},i,s=1){const o=e.filter(vd),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const bd={decay:us,inertia:us,tween:Kt,keyframes:Kt,spring:gi};function qa(e){typeof e.type=="string"&&(e.type=bd[e.type])}class Zs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const xd=e=>e/100;class Js extends Zs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var i,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Ee.now()&&this.tick(Ee.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(i=this.options).onStop)==null||s.call(i))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;qa(t);const{type:n=Kt,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Kt;process.env.NODE_ENV!=="production"&&l!==Kt&&ct(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Kt&&typeof a[0]!="number"&&(this.mixKeyframes=In(xd,Ha(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Ks(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:m,type:y,onUpdate:T,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>s;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,j=i;if(d){const M=Math.min(this.currentTime,s)/a;let I=Math.floor(M),B=M%1;!B&&M>=1&&(B=1),B===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(B=1-B,m&&(B-=m/a)):f==="mirror"&&(j=r)),S=rt(0,1,B)*a}const w=b?{done:!1,value:u[0]}:j.next(S);o&&(w.value=o(w.value));let{done:R}=w;!b&&l!==null&&(R=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return L&&y!==us&&(w.value=Xs(u,this.options,x,this.speed)),T&&T(w.value),L&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return Ie(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ie(t)}get time(){return Ie(this.currentTime)}set time(t){var n;t=Be(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ee.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ie(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=id,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),(o=(s=this.options).onPlay)==null||o.call(s);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ee.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function wd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Vt=e=>e*180/Math.PI,ds=e=>{const t=Vt(Math.atan2(e[1],e[0]));return fs(t)},Sd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ds,rotateZ:ds,skewX:e=>Vt(Math.atan(e[1])),skewY:e=>Vt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},fs=e=>(e=e%360,e<0&&(e+=360),e),Kr=ds,Xr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Zr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Td={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xr,scaleY:Zr,scale:e=>(Xr(e)+Zr(e))/2,rotateX:e=>fs(Vt(Math.atan2(e[6],e[5]))),rotateY:e=>fs(Vt(Math.atan2(-e[2],e[0]))),rotateZ:Kr,rotate:Kr,skewX:e=>Vt(Math.atan(e[4])),skewY:e=>Vt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function hs(e){return e.includes("scale")?1:0}function ps(e,t){if(!e||e==="none")return hs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Td,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Sd,s=a}if(!s)return hs(t);const o=i[t],r=s[1].split(",").map(Pd);return typeof o=="function"?o(r):r[o]}const Ed=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ps(n,t)};function Pd(e){return parseFloat(e.trim())}const cn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],un=new Set(cn),Jr=e=>e===ln||e===N,Cd=new Set(["x","y","z"]),Ad=cn.filter(e=>!Cd.has(e));function kd(e){const t=[];return Ad.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const bt={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})=>ps(t,"x"),y:(e,{transform:t})=>ps(t,"y")};bt.translateX=bt.x;bt.translateY=bt.y;const Ot=new Set;let ms=!1,gs=!1,ys=!1;function Ya(){if(gs){const e=Array.from(Ot).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=kd(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([o,r])=>{var a;(a=i.getValue(o))==null||a.set(r)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}gs=!1,ms=!1,Ot.forEach(e=>e.complete(ys)),Ot.clear()}function Ka(){Ot.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gs=!0)})}function jd(){ys=!0,Ka(),Ya(),ys=!1}class Qs{constructor(t,n,i,s,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ot.add(this),ms||(ms=!0,Z.read(Ka),Z.resolveKeyframes(Ya))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&o===void 0&&s.set(t[0])}wd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ot.delete(this)}cancel(){this.state==="scheduled"&&(Ot.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Rd=e=>e.startsWith("--");function Md(e,t,n){Rd(t)?e.style.setProperty(t,n):e.style[t]=n}const Dd={};function Xa(e,t){const n=Ta(e);return()=>Dd[t]??n()}const Ld=Xa(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Za=Xa(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),En=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Qr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:En([0,.65,.55,1]),circOut:En([.55,0,1,.45]),backIn:En([.31,.01,.66,-.59]),backOut:En([.33,1.53,.69,.99])};function Ja(e,t){if(e)return typeof e=="function"?Za()?Wa(e,t):"ease-out":Va(e)?En(e):Array.isArray(e)?e.map(n=>Ja(n,t)||Qr.easeOut):Qr[e]}function Vd(e,t,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Ja(a,s);Array.isArray(d)&&(u.easing=d);const f={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function Qa(e){return typeof e=="function"&&"applyToOptions"in e}function Od({type:e,...t}){return Qa(e)&&Za()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class el extends Zs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,ct(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Od(t);this.animation=Vd(n,i,s,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Xs(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Md(n,i,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,i,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(i=this.animation).commitStyles)==null||s.call(i))}get duration(){var n,i;const t=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.call(n).duration)||0;return Ie(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ie(t)}get time(){return Ie(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Be(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ld()?(this.animation.timeline=t,Ne):n(this)}}const tl={anticipate:Ra,backInOut:ja,circInOut:Da};function Id(e){return e in tl}function Nd(e){typeof e.ease=="string"&&Id(e.ease)&&(e.ease=tl[e.ease])}const $i=10;class Bd extends el{constructor(t){Nd(t),qa(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Js({...r,autoplay:!1}),l=Math.max($i,Ee.now()-this.startTime),c=rt(0,$i,l-$i);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const eo=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ge.test(e)||e==="0")&&!e.startsWith("url("));function _d(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 Fd(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=eo(s,t),a=eo(o,t);return an(r===a,`You are trying to animate ${t} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:_d(e)||(n==="spring"||Qa(n))&&i}function vs(e){e.duration=0,e.type="keyframes"}const zd=new Set(["opacity","clipPath","filter","transform"]),$d=Ta(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ud(e){var u;const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return $d()&&n&&zd.has(n)&&(n!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&r!=="inertia"}const Hd=40;class Wd extends Zs{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var y;super(),this.stop=()=>{var T,x;this._animation&&(this._animation.stop(),(T=this.stopTimeline)==null||T.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Ee.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...d},m=(u==null?void 0:u.KeyframeResolver)||Qs;this.keyframeResolver=new m(a,(T,x,v)=>this.onKeyframesResolved(T,x,f,!v),l,c,u),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,i,s){var x,v;this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=Ee.now(),Fd(t,o,r,a)||((ut.instantAnimations||!l)&&(u==null||u(Xs(t,i,n))),t[0]=t[t.length-1],vs(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Hd?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},m=!c&&Ud(f),y=(v=(x=f.motionValue)==null?void 0:x.owner)==null?void 0:v.current,T=m?new Bd({...f,element:y}):new Js(f);T.finished.then(()=>{this.notifyFinished()}).catch(Ne),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),jd()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function nl(e,t,n,i=0,s=1){const o=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*i;return typeof n=="function"?n(o,r):s===1?o*i:a-o*i}const Gd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qd(e){const t=Gd.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const Yd=4;function il(e,t,n=1){ct(n<=Yd,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=qd(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const r=o.trim();return xa(r)?parseFloat(r):r}return Ws(s)?il(s,t,n+1):s}const Kd={type:"spring",stiffness:500,damping:25,restSpeed:10},Xd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Zd={type:"keyframes",duration:.8},Jd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qd=(e,{keyframes:t})=>t.length>2?Zd:un.has(e)?e.startsWith("scale")?Xd(t[1]):Kd:Jd,ef=e=>e!==null;function tf(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(ef),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}function sl(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function er(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?sl(n,e):n}function nf({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const tr=(e,t,n,i={},s,o)=>r=>{const a=er(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-Be(l);const 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:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};nf(a)||Object.assign(u,Qd(e,u)),u.duration&&(u.duration=Be(u.duration)),u.repeatDelay&&(u.repeatDelay=Be(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(vs(u),u.delay===0&&(d=!0)),(ut.instantAnimations||ut.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,vs(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=tf(u.keyframes,a);if(f!==void 0){Z.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new Js(u):new Wd(u)};function to(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function nr(e,t,n,i){if(typeof t=="function"){const[s,o]=to(i);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=to(i);t=t(n!==void 0?n:e.custom,s,o)}return t}function en(e,t,n){const i=e.getProps();return nr(i,t,n!==void 0?n:i.custom,e)}const rl=new Set(["width","height","top","left","right","bottom",...cn]),no=30,sf=e=>!isNaN(parseFloat(e));class rf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var o;const s=Ee.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ee.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=sf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&$s(!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 zs);const i=this.events[t].add(n);return t==="change"?()=>{i(),Z.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ee.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>no)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,no);return Ea(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function on(e,t){return new rf(e,t)}const bs=e=>Array.isArray(e);function of(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,on(n))}function af(e){return bs(e)?e[e.length-1]||0:e}function lf(e,t){const n=en(e,t);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const r in o){const a=af(o[r]);of(e,r,a)}}const Se=e=>!!(e&&e.getVelocity);function cf(e){return!!(Se(e)&&e.add)}function xs(e,t){const n=e.getValue("willChange");if(cf(n))return n.add(t);if(!n&&ut.WillChange){const i=new ut.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function ir(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const uf="framerAppearId",ol="data-"+ir(uf);function al(e){return e.props[ol]}function df({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function ll(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=t;const l=e.getDefaultTransition();o=o?sl(o,l):l;const c=o==null?void 0:o.reduceMotion;i&&(o=i);const u=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const m=e.getValue(f,e.latestValues[f]??null),y=a[f];if(y===void 0||d&&df(d,f))continue;const T={delay:n,...er(o||{},f)},x=m.get();if(x!==void 0&&!m.isAnimating&&!Array.isArray(y)&&y===x&&!T.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const j=al(e);if(j){const w=window.MotionHandoffAnimation(j,f,Z);w!==null&&(T.startTime=w,v=!0)}}xs(e,f);const b=c??e.shouldReduceMotion;m.start(tr(f,m,y,b&&rl.has(f)?{type:!1}:T,e,v));const S=m.animation;S&&u.push(S)}if(r){const f=()=>Z.update(()=>{r&&lf(e,r)});u.length?Promise.all(u).then(f):f()}return u}function ws(e,t,n={}){var l;const i=en(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(ll(e,i,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return ff(e,t,c,u,d,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function ff(e,t,n=0,i=0,s=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(ws(l,t,{...r,delay:n+(typeof i=="function"?0:i)+nl(e.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function hf(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(o=>ws(e,o,n));i=Promise.all(s)}else if(typeof t=="string")i=ws(e,t,n);else{const s=typeof t=="function"?en(e,t,n.custom):t;i=Promise.all(ll(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const pf={test:e=>e==="auto",parse:e=>e},cl=e=>t=>t.test(e),ul=[ln,N,st,gt,zu,Fu,pf],io=e=>ul.find(cl(e));function mf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Sa(e):!0}const gf=new Set(["brightness","contrast","saturate","opacity"]);function yf(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Gs)||[];if(!i)return e;const s=n.replace(i,"");let o=gf.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+s+")"}const vf=/\b([a-z-]*)\(.*?\)/gu,Ss={...Ge,getAnimatableNone:e=>{const t=e.match(vf);return t?t.map(yf).join(" "):e}},Ts={...Ge,getAnimatableNone:e=>{const t=Ge.parse(e);return Ge.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},so={...ln,transform:Math.round},bf={rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:Jn,scaleX:Jn,scaleY:Jn,scaleZ:Jn,skew:gt,skewX:gt,skewY:gt,distance:N,translateX:N,translateY:N,translateZ:N,x:N,y:N,z:N,perspective:N,transformPerspective:N,opacity:Mn,originX:Ur,originY:Ur,originZ:N},sr={borderWidth:N,borderTopWidth:N,borderRightWidth:N,borderBottomWidth:N,borderLeftWidth:N,borderRadius:N,borderTopLeftRadius:N,borderTopRightRadius:N,borderBottomRightRadius:N,borderBottomLeftRadius:N,width:N,maxWidth:N,height:N,maxHeight:N,top:N,right:N,bottom:N,left:N,inset:N,insetBlock:N,insetBlockStart:N,insetBlockEnd:N,insetInline:N,insetInlineStart:N,insetInlineEnd:N,padding:N,paddingTop:N,paddingRight:N,paddingBottom:N,paddingLeft:N,paddingBlock:N,paddingBlockStart:N,paddingBlockEnd:N,paddingInline:N,paddingInlineStart:N,paddingInlineEnd:N,margin:N,marginTop:N,marginRight:N,marginBottom:N,marginLeft:N,marginBlock:N,marginBlockStart:N,marginBlockEnd:N,marginInline:N,marginInlineStart:N,marginInlineEnd:N,fontSize:N,backgroundPositionX:N,backgroundPositionY:N,...bf,zIndex:so,fillOpacity:Mn,strokeOpacity:Mn,numOctaves:so},xf={...sr,color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:Ss,WebkitFilter:Ss,mask:Ts,WebkitMask:Ts},dl=e=>xf[e],wf=new Set([Ss,Ts]);function fl(e,t){let n=dl(e);return wf.has(n)||(n=Ge),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Sf=new Set(["auto","none","0"]);function Tf(e,t,n){let i=0,s;for(;i<e.length&&!s;){const o=e[i];typeof o=="string"&&!Sf.has(o)&&Dn(o).values.length&&(s=e[i]),i++}if(s&&n)for(const o of t)e[o]=fl(n,s)}class Ef extends Qs{constructor(t,n,i,s,o){super(t,n,i,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Ws(d))){const f=il(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!rl.has(i)||t.length!==2)return;const[s,o]=t,r=io(s),a=io(o),l=$r(s),c=$r(o);if(l!==c&&bt[i]){this.needsMeasurement=!0;return}if(r!==a)if(Jr(r)&&Jr(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else bt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||mf(t[s]))&&i.push(s);i.length&&Tf(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=bt[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=bt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Pf=new Set(["opacity","clipPath","filter","transform"]);function hl(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const pl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Cf(e){return wa(e)&&"offsetHeight"in e}const{schedule:rr,cancel:h0}=Oa(queueMicrotask,!1),Ue={x:!1,y:!1};function ml(){return Ue.x||Ue.y}function Af(e){return e==="x"||e==="y"?Ue[e]?null:(Ue[e]=!0,()=>{Ue[e]=!1}):Ue.x||Ue.y?null:(Ue.x=Ue.y=!0,()=>{Ue.x=Ue.y=!1})}function gl(e,t){const n=hl(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function kf(e){return!(e.pointerType==="touch"||ml())}function jf(e,t,n={}){const[i,s,o]=gl(e,n);return i.forEach(r=>{let a=!1,l=!1,c;const u=()=>{r.removeEventListener("pointerleave",y)},d=x=>{c&&(c(x),c=void 0),u()},f=x=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(x))},m=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},y=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},T=x=>{if(!kf(x))return;l=!1;const v=t(r,x);typeof v=="function"&&(c=v,r.addEventListener("pointerleave",y,s))};r.addEventListener("pointerenter",T,s),r.addEventListener("pointerdown",m,s)}),o}const yl=(e,t)=>t?e===t?!0:yl(e,t.parentElement):!1,or=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Rf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Mf(e){return Rf.has(e.tagName)||e.isContentEditable===!0}const Df=new Set(["INPUT","SELECT","TEXTAREA"]);function Lf(e){return Df.has(e.tagName)||e.isContentEditable===!0}const si=new WeakSet;function ro(e){return t=>{t.key==="Enter"&&e(t)}}function Ui(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Vf=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=ro(()=>{if(si.has(n))return;Ui(n,"down");const s=ro(()=>{Ui(n,"up")}),o=()=>Ui(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function oo(e){return or(e)&&!ml()}const ao=new WeakSet;function Of(e,t,n={}){const[i,s,o]=gl(e,n),r=a=>{const l=a.currentTarget;if(!oo(a)||ao.has(a))return;si.add(l),n.stopPropagation&&ao.add(a);const c=t(l,a),u=(m,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),si.has(l)&&si.delete(l),oo(m)&&typeof c=="function"&&c(m,{success:y})},d=m=>{u(m,l===window||l===document||n.useGlobalTarget||yl(l,m.target))},f=m=>{u(m,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),Cf(a)&&(a.addEventListener("focus",c=>Vf(c,s)),!Mf(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function ar(e){return wa(e)&&"ownerSVGElement"in e}const ri=new WeakMap;let yt;const vl=(e,t,n)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:ar(i)&&"getBBox"in i?i.getBBox()[t]:i[n],If=vl("inline","width","offsetWidth"),Nf=vl("block","height","offsetHeight");function Bf({target:e,borderBoxSize:t}){var n;(n=ri.get(e))==null||n.forEach(i=>{i(e,{get width(){return If(e,t)},get height(){return Nf(e,t)}})})}function _f(e){e.forEach(Bf)}function Ff(){typeof ResizeObserver>"u"||(yt=new ResizeObserver(_f))}function zf(e,t){yt||Ff();const n=hl(e);return n.forEach(i=>{let s=ri.get(i);s||(s=new Set,ri.set(i,s)),s.add(t),yt==null||yt.observe(i)}),()=>{n.forEach(i=>{const s=ri.get(i);s==null||s.delete(t),s!=null&&s.size||yt==null||yt.unobserve(i)})}}const oi=new Set;let Xt;function $f(){Xt=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};oi.forEach(t=>t(e))},window.addEventListener("resize",Xt)}function Uf(e){return oi.add(e),Xt||$f(),()=>{oi.delete(e),!oi.size&&typeof Xt=="function"&&(window.removeEventListener("resize",Xt),Xt=void 0)}}function lo(e,t){return typeof e=="function"?Uf(e):zf(e,t)}function Hf(e){return ar(e)&&e.tagName==="svg"}const Wf=[...ul,fe,Ge],Gf=e=>Wf.find(cl(e)),co=()=>({translate:0,scale:1,origin:0,originPoint:0}),Zt=()=>({x:co(),y:co()}),uo=()=>({min:0,max:0}),ge=()=>({x:uo(),y:uo()}),qf=new WeakMap;function Pi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ln(e){return typeof e=="string"||Array.isArray(e)}const lr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cr=["initial",...lr];function Ci(e){return Pi(e.animate)||cr.some(t=>Ln(e[t]))}function bl(e){return!!(Ci(e)||e.variants)}function Yf(e,t,n){for(const i in t){const s=t[i],o=n[i];if(Se(s))e.addValue(i,s);else if(Se(o))e.addValue(i,on(s,{owner:e}));else if(o!==s)if(e.hasValue(i)){const r=e.getValue(i);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(i);e.addValue(i,on(r!==void 0?r:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Es={current:null},xl={current:!1},Kf=typeof window<"u";function Xf(){if(xl.current=!0,!!Kf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Es.current=e.matches;e.addEventListener("change",t),t()}else Es.current=!1}const fo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yi={};function wl(e){yi=e}function Zf(){return yi}class Jf{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:r,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Qs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Ee.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Z.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!r,this.isControllingVariants=Ci(n),this.isVariantNode=bl(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const y=f[m];c[m]!==void 0&&Se(y)&&y.set(c[m])}}mount(t){var n,i;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,qf.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((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(xl.current||Xf(),this.shouldReduceMotion=Es.current),process.env.NODE_ENV!=="production"&&$s(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),wt(this.notifyUpdate),wt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const i=this.features[n];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Pf.has(t)&&this.current instanceof HTMLElement){const{factory:r,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new el({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:Be(u)}),f=r(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const i=un.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&Z.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in yi){const n=yi[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(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):ge()}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 i=0;i<fo.length;i++){const s=fo[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,r=t[o];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=Yf(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&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 i=this.values.get(t);return i===void 0&&n!==void 0&&(i=on(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(xa(i)||Sa(i))?i=parseFloat(i):!Gf(i)&&Ge.test(n)&&(i=fl(t,n)),this.setBaseTarget(t,Se(i)?i.get():i)),Se(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const r=nr(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);r&&(i=r[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Se(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new zs),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){rr.render(this.render)}}class Sl extends Jf{constructor(){super(...arguments),this.KeyframeResolver=Ef}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Se(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Et{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Tl({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Qf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function eh(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Hi(e){return e===void 0||e===1}function Ps({scale:e,scaleX:t,scaleY:n}){return!Hi(e)||!Hi(t)||!Hi(n)}function Rt(e){return Ps(e)||El(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function El(e){return ho(e.x)||ho(e.y)}function ho(e){return e&&e!=="0%"}function vi(e,t,n){const i=e-n,s=t*i;return n+s}function po(e,t,n,i,s){return s!==void 0&&(e=vi(e,s,i)),vi(e,n,i)+t}function Cs(e,t=0,n=1,i,s){e.min=po(e.min,t,n,i,s),e.max=po(e.max,t,n,i,s)}function Pl(e,{x:t,y:n}){Cs(e.x,t.translate,t.scale,t.originPoint),Cs(e.y,n.translate,n.scale,n.originPoint)}const mo=.999999999999,go=1.0000000000001;function th(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,r;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Qt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,Pl(e,r)),i&&Rt(o.latestValues)&&Qt(e,o.latestValues))}t.x<go&&t.x>mo&&(t.x=1),t.y<go&&t.y>mo&&(t.y=1)}function Jt(e,t){e.min=e.min+t,e.max=e.max+t}function yo(e,t,n,i,s=.5){const o=ie(e.min,e.max,s);Cs(e,t,n,o,i)}function Qt(e,t){yo(e.x,t.x,t.scaleX,t.scale,t.originX),yo(e.y,t.y,t.scaleY,t.scale,t.originY)}function Cl(e,t){return Tl(eh(e.getBoundingClientRect(),t))}function nh(e,t,n){const i=Cl(e,n),{scroll:s}=t;return s&&(Jt(i.x,s.offset.x),Jt(i.y,s.offset.y)),i}const ih={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sh=cn.length;function rh(e,t,n){let i="",s=!0;for(let o=0;o<sh;o++){const r=cn[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(r.startsWith("scale")?1:0);else{const c=parseFloat(a);l=r.startsWith("scale")?c===1:c===0}if(!l||n){const c=pl(a,sr[r]);if(!l){s=!1;const u=ih[r]||r;i+=`${u}(${c}) `}n&&(t[r]=c)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function ur(e,t,n){const{style:i,vars:s,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(un.has(l)){r=!0;continue}else if(Na(l)){s[l]=c;continue}else{const u=pl(c,sr[l]);l.startsWith("origin")?(a=!0,o[l]=u):i[l]=u}}if(t.transform||(r||n?i.transform=rh(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;i.transformOrigin=`${l} ${c} ${u}`}}function Al(e,{style:t,vars:n},i,s){const o=e.style;let r;for(r in t)o[r]=t[r];s==null||s.applyProjectionStyles(o,i);for(r in n)o.setProperty(r,n[r])}function vo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(N.test(e))e=parseFloat(e);else return e;const n=vo(e,t.target.x),i=vo(e,t.target.y);return`${n}% ${i}%`}},oh={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Ge.parse(e);if(s.length>5)return i;const o=Ge.createTransformer(e),r=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+r]/=a,s[1+r]/=l;const c=ie(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),o(s)}},As={borderRadius:{...xn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xn,borderTopRightRadius:xn,borderBottomLeftRadius:xn,borderBottomRightRadius:xn,boxShadow:oh};function kl(e,{layout:t,layoutId:n}){return un.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!As[e]||e==="opacity")}function dr(e,t,n){var r;const i=e.style,s=t==null?void 0:t.style,o={};if(!i)return o;for(const a in i)(Se(i[a])||s&&Se(s[a])||kl(a,e)||((r=n==null?void 0:n.getValue(a))==null?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return o}function ah(e){return window.getComputedStyle(e)}class lh extends Sl{constructor(){super(...arguments),this.type="html",this.renderInstance=Al}readValueFromInstance(t,n){var i;if(un.has(n))return(i=this.projection)!=null&&i.isProjecting?hs(n):Ed(t,n);{const s=ah(t),o=(Na(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Cl(t,n)}build(t,n,i){ur(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return dr(t,n,i)}}const ch={offset:"stroke-dashoffset",array:"stroke-dasharray"},uh={offset:"strokeDashoffset",array:"strokeDasharray"};function dh(e,t,n=1,i=0,s=!0){e.pathLength=1;const o=s?ch:uh;e[o.offset]=`${-i}`,e[o.array]=`${t} ${n}`}const fh=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function jl(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(ur(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const m of fh)d[m]!==void 0&&(f[m]=d[m],delete d[m]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),i!==void 0&&(d.scale=i),s!==void 0&&dh(d,s,o,r,!1)}const Rl=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"]),Ml=e=>typeof e=="string"&&e.toLowerCase()==="svg";function hh(e,t,n,i){Al(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(Rl.has(s)?s:ir(s),t.attrs[s])}function Dl(e,t,n){const i=dr(e,t,n);for(const s in e)if(Se(e[s])||Se(t[s])){const o=cn.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[o]=e[s]}return i}class ph extends Sl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ge}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(un.has(n)){const i=dl(n);return i&&i.default||0}return n=Rl.has(n)?n:ir(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return Dl(t,n,i)}build(t,n,i){jl(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){hh(t,n,i,s)}mount(t){this.isSVGTag=Ml(t.tagName),super.mount(t)}}const mh=cr.length;function Ll(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ll(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<mh;n++){const i=cr[n],s=e.props[i];(Ln(s)||s===!1)&&(t[i]=s)}return t}function Vl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const gh=[...lr].reverse(),yh=lr.length;function vh(e){return t=>Promise.all(t.map(({animation:n,options:i})=>hf(e,n,i)))}function bh(e){let t=vh(e),n=bo(),i=!0;const s=l=>(c,u)=>{var f;const d=en(e,u,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:m,transitionEnd:y,...T}=d;c={...c,...T,...y}}return c};function o(l){t=l(e)}function r(l){const{props:c}=e,u=Ll(e.parent)||{},d=[],f=new Set;let m={},y=1/0;for(let x=0;x<yh;x++){const v=gh[x],b=n[v],S=c[v]!==void 0?c[v]:u[v],j=Ln(S),w=v===l?b.isActive:null;w===!1&&(y=x);let R=S===u[v]&&S!==c[v]&&j;if(R&&i&&e.manuallyAnimateOnMount&&(R=!1),b.protectedKeys={...m},!b.isActive&&w===null||!S&&!b.prevProp||Pi(S)||typeof S=="boolean")continue;if(v==="exit"&&b.isActive&&w!==!0){b.prevResolvedValues&&(m={...m,...b.prevResolvedValues});continue}const L=xh(b.prevProp,S);let M=L||v===l&&b.isActive&&!R&&j||x>y&&j,I=!1;const B=Array.isArray(S)?S:[S];let J=B.reduce(s(v),{});w===!1&&(J={});const{prevResolvedValues:ye={}}=b,ve={...ye,...J},Q=q=>{M=!0,f.has(q)&&(I=!0,f.delete(q)),b.needsAnimating[q]=!0;const G=e.getValue(q);G&&(G.liveStyle=!1)};for(const q in ve){const G=J[q],re=ye[q];if(m.hasOwnProperty(q))continue;let te=!1;bs(G)&&bs(re)?te=!Vl(G,re):te=G!==re,te?G!=null?Q(q):f.add(q):G!==void 0&&f.has(q)?Q(q):b.protectedKeys[q]=!0}b.prevProp=S,b.prevResolvedValues=J,b.isActive&&(m={...m,...J}),i&&e.blockInitialAnimation&&(M=!1);const $=R&&L;M&&(!$||I)&&d.push(...B.map(q=>{const G={type:v};if(typeof q=="string"&&i&&!$&&e.manuallyAnimateOnMount&&e.parent){const{parent:re}=e,te=en(re,q);if(re.enteringChildren&&te){const{delayChildren:pe}=te.transition||{};G.delay=nl(re.enteringChildren,e,pe)}}return{animation:q,options:G}}))}if(f.size){const x={};if(typeof c.initial!="boolean"){const v=en(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(x.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),S=e.getValue(v);S&&(S.liveStyle=!0),x[v]=b??null}),d.push({animation:x})}let T=!!d.length;return i&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(T=!1),i=!1,T?t(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(l,c)}),n[l].isActive=c;const u=r(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=bo()}}}function xh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Vl(t,e):!1}function kt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bo(){return{animate:kt(!0),whileInView:kt(),whileHover:kt(),whileTap:kt(),whileDrag:kt(),whileFocus:kt(),exit:kt()}}function xo(e,t){e.min=t.min,e.max=t.max}function $e(e,t){xo(e.x,t.x),xo(e.y,t.y)}function wo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Ol=1e-4,wh=1-Ol,Sh=1+Ol,Il=.01,Th=0-Il,Eh=0+Il;function Pe(e){return e.max-e.min}function Ph(e,t,n){return Math.abs(e-t)<=n}function So(e,t,n,i=.5){e.origin=i,e.originPoint=ie(t.min,t.max,e.origin),e.scale=Pe(n)/Pe(t),e.translate=ie(n.min,n.max,e.origin)-e.originPoint,(e.scale>=wh&&e.scale<=Sh||isNaN(e.scale))&&(e.scale=1),(e.translate>=Th&&e.translate<=Eh||isNaN(e.translate))&&(e.translate=0)}function An(e,t,n,i){So(e.x,t.x,n.x,i?i.originX:void 0),So(e.y,t.y,n.y,i?i.originY:void 0)}function To(e,t,n){e.min=n.min+t.min,e.max=e.min+Pe(t)}function Ch(e,t,n){To(e.x,t.x,n.x),To(e.y,t.y,n.y)}function Eo(e,t,n){e.min=t.min-n.min,e.max=e.min+Pe(t)}function bi(e,t,n){Eo(e.x,t.x,n.x),Eo(e.y,t.y,n.y)}function Po(e,t,n,i,s){return e-=t,e=vi(e,1/n,i),s!==void 0&&(e=vi(e,1/s,i)),e}function Ah(e,t=0,n=1,i=.5,s,o=e,r=e){if(st.test(t)&&(t=parseFloat(t),t=ie(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=ie(o.min,o.max,i);e===o&&(a-=t),e.min=Po(e.min,t,n,a,s),e.max=Po(e.max,t,n,a,s)}function Co(e,t,[n,i,s],o,r){Ah(e,t[n],t[i],t[s],t.scale,o,r)}const kh=["x","scaleX","originX"],jh=["y","scaleY","originY"];function Ao(e,t,n,i){Co(e.x,t,kh,n?n.x:void 0,i?i.x:void 0),Co(e.y,t,jh,n?n.y:void 0,i?i.y:void 0)}function ko(e){return e.translate===0&&e.scale===1}function Nl(e){return ko(e.x)&&ko(e.y)}function jo(e,t){return e.min===t.min&&e.max===t.max}function Rh(e,t){return jo(e.x,t.x)&&jo(e.y,t.y)}function Ro(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Bl(e,t){return Ro(e.x,t.x)&&Ro(e.y,t.y)}function Mo(e){return Pe(e.x)/Pe(e.y)}function Do(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function nt(e){return[e("x"),e("y")]}function Mh(e,t,n){let i="";const s=e.x.translate/t.x,o=e.y.translate/t.y,r=(n==null?void 0:n.z)||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:m,skewY:y}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),m&&(i+=`skewX(${m}deg) `),y&&(i+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const _l=["TopLeft","TopRight","BottomLeft","BottomRight"],Dh=_l.length,Lo=e=>typeof e=="string"?parseFloat(e):e,Vo=e=>typeof e=="number"||N.test(e);function Lh(e,t,n,i,s,o){s?(e.opacity=ie(0,n.opacity??1,Vh(i)),e.opacityExit=ie(t.opacity??1,0,Oh(i))):o&&(e.opacity=ie(t.opacity??1,n.opacity??1,i));for(let r=0;r<Dh;r++){const a=`border${_l[r]}Radius`;let l=Oo(t,a),c=Oo(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Vo(l)===Vo(c)?(e[a]=Math.max(ie(Lo(l),Lo(c),i),0),(st.test(c)||st.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ie(t.rotate||0,n.rotate||0,i))}function Oo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Vh=Fl(0,.5,Ma),Oh=Fl(.5,.95,Ne);function Fl(e,t,n){return i=>i<e?0:i>t?1:n(Rn(e,t,i))}function Ih(e,t,n){const i=Se(e)?e:on(e);return i.start(tr("",i,t,n)),i.animation}function Vn(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const Nh=(e,t)=>e.depth-t.depth;class Bh{constructor(){this.children=[],this.isDirty=!1}add(t){Fs(this.children,t),this.isDirty=!0}remove(t){hi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Nh),this.isDirty=!1,this.children.forEach(t)}}function _h(e,t){const n=Ee.now(),i=({timestamp:s})=>{const o=s-n;o>=t&&(wt(i),e(o-t))};return Z.setup(i,!0),()=>wt(i)}function ai(e){return Se(e)?e.get():e}class Fh{constructor(){this.members=[]}add(t){Fs(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&s.isConnected===!1&&i.isPresent!==!1&&!i.snapshot&&hi(this.members,i)}t.scheduleRender()}remove(t){if(hi(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 i;for(let s=n;s>=0;s--){const o=this.members[s],r=o.instance;if(o.isPresent!==!1&&(!r||r.isConnected!==!1)){i=o;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender();const s=i.options.layoutDependency,o=t.options.layoutDependency;if(!(s!==void 0&&o!==void 0&&s===o)){const l=i.instance;l&&l.isConnected===!1&&!i.snapshot||(t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const li={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Wi=["","X","Y","Z"],zh=1e3;let $h=0;function Gi(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function zl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=al(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Z,!(s||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&zl(i)}function $l({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(r={},a=t==null?void 0:t()){this.id=$h++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,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(Wh),this.nodes.forEach(Kh),this.nodes.forEach(Xh),this.nodes.forEach(Gh)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,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 Bh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new zs),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=ar(r)&&!Hf(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;Z.read(()=>{d=window.innerWidth}),e(r,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,u&&u(),u=_h(f,250),li.hasAnimatedSinceResize&&(li.hasAnimatedSinceResize=!1,this.nodes.forEach(Bo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||tp,{onLayoutAnimationStart:T,onLayoutAnimationComplete:x}=c.getProps(),v=!this.targetLayout||!Bl(this.targetLayout,m),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...er(y,"layout"),onPlay:T,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(u,b)}else d||Bo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),wt(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(Zh),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&zl(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(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Io);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(No);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Yh),this.nodes.forEach(Uh),this.nodes.forEach(Hh)):this.nodes.forEach(No),this.clearAllSnapshots();const a=Ee.now();xe.delta=rt(0,1e3/60,a-xe.timestamp),xe.timestamp=a,xe.isProcessing=!0,Bi.update.process(xe),Bi.preRender.process(xe),Bi.render.process(xe),xe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qh),this.sharedNodes.forEach(Jh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Z.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Z.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Pe(this.snapshot.measuredBox.x)&&!Pe(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 r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=ge(),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,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Nl(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||Rt(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),np(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:r}=this.options;if(!r)return ge();const a=r.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(ip))){const{scroll:u}=this.root;u&&(Jt(a.x,u.offset.x),Jt(a.y,u.offset.y))}return a}removeElementScroll(r){var l;const a=ge();if($e(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;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&&$e(a,r),Jt(a.x,d.offset.x),Jt(a.y,d.offset.y))}return a}applyTransform(r,a=!1){const l=ge();$e(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Qt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Rt(u.latestValues)&&Qt(l,u.latestValues)}return Rt(this.latestValues)&&Qt(l,this.latestValues),l}removeTransform(r){const a=ge();$e(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Rt(c.latestValues))continue;Ps(c.latestValues)&&c.updateSnapshot();const u=ge(),d=c.measurePageBox();$e(u,d),Ao(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Rt(this.latestValues)&&Ao(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==xe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=xe.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ge(),this.targetWithTransforms=ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ch(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$e(this.target,this.layout.layoutBox),Pl(this.target,this.targetDelta)):$e(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ps(this.parent.latestValues)||El(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ge(),this.relativeTargetOrigin=ge(),bi(this.relativeTargetOrigin,a,l),$e(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var y;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===xe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;$e(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;th(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=ge());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wo(this.prevProjectionDelta.x,this.projectionDelta.x),wo(this.prevProjectionDelta.y,this.projectionDelta.y)),An(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Do(this.projectionDelta.x,this.prevProjectionDelta.x)||!Do(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Zt(),this.projectionDelta=Zt(),this.projectionDeltaWithTransform=Zt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Zt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=ge(),m=l?l.source:void 0,y=this.layout?this.layout.source:void 0,T=m!==y,x=this.getStack(),v=!x||x.members.length<=1,b=!!(T&&!v&&this.options.crossfade===!0&&!this.path.some(ep));this.animationProgress=0;let S;this.mixTargetDelta=j=>{const w=j/1e3;_o(d.x,r.x,w),_o(d.y,r.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Qh(this.relativeTarget,this.relativeTargetOrigin,f,w),S&&Rh(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=ge()),$e(S,this.relativeTarget)),T&&(this.animationValues=u,Lh(u,c,this.latestValues,w,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(wt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Z.update(()=>{li.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=on(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ih(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(zh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Ul(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ge();const d=Pe(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=Pe(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}$e(a,l),Qt(a,u),An(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Fh),this.sharedNodes.get(r).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 r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Gi("z",r,c,this.animationValues);for(let u=0;u<Wi.length;u++)Gi(`rotate${Wi[u]}`,r,c,this.animationValues),Gi(`skew${Wi[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=ai(a==null?void 0:a.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=ai(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Rt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=Mh(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:m}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in As){if(u[y]===void 0)continue;const{correct:T,applyTo:x,isCSSVariable:v}=As[y],b=d==="none"?u[y]:T(u[y],c);if(x){const S=x.length;for(let j=0;j<S;j++)r[x[j]]=b}else v?this.options.visualElement.renderState.vars[y]=b:r[y]=b}this.options.layoutId&&(r.pointerEvents=c===this?ai(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Io),this.root.sharedNodes.clear()}}}function Uh(e){e.updateLayout()}function Hh(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=e.layout,{animationType:o}=e.options,r=t.source!==e.layout.source;o==="size"?nt(d=>{const f=r?t.measuredBox[d]:t.layoutBox[d],m=Pe(f);f.min=i[d].min,f.max=f.min+m}):Ul(o,t.layoutBox,i)&&nt(d=>{const f=r?t.measuredBox[d]:t.layoutBox[d],m=Pe(i[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=Zt();An(a,i,t.layoutBox);const l=Zt();r?An(l,e.applyTransform(s,!0),t.measuredBox):An(l,i,t.layoutBox);const c=!Nl(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const y=ge();bi(y,t.layoutBox,f.layoutBox);const T=ge();bi(T,i,m.layoutBox),Bl(y,T)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=T,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function Wh(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 Gh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qh(e){e.clearSnapshot()}function Io(e){e.clearMeasurements()}function No(e){e.isLayoutDirty=!1}function Yh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Bo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Kh(e){e.resolveTargetDelta()}function Xh(e){e.calcProjection()}function Zh(e){e.resetSkewAndRotation()}function Jh(e){e.removeLeadSnapshot()}function _o(e,t,n){e.translate=ie(t.translate,0,n),e.scale=ie(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fo(e,t,n,i){e.min=ie(t.min,n.min,i),e.max=ie(t.max,n.max,i)}function Qh(e,t,n,i){Fo(e.x,t.x,n.x,i),Fo(e.y,t.y,n.y,i)}function ep(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const tp={duration:.45,ease:[.4,0,.1,1]},zo=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$o=zo("applewebkit/")&&!zo("chrome/")?Math.round:Ne;function Uo(e){e.min=$o(e.min),e.max=$o(e.max)}function np(e){Uo(e.x),Uo(e.y)}function Ul(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ph(Mo(t),Mo(n),.2)}function ip(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const sp=$l({attachResizeListener:(e,t)=>Vn(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),qi={current:void 0},Hl=$l({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qi.current){const e=new sp({});e.mount(window),e.setOptions({layoutScroll:!0}),qi.current=e}return qi.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Wl=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function rp(e=!0){const t=p.useContext(_s);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=p.useId();p.useEffect(()=>{if(e)return s(o)},[e]);const r=p.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,r]:[!0]}const Gl=p.createContext({strict:!1}),Ho={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"]};let Wo=!1;function op(){if(Wo)return;const e={};for(const t in Ho)e[t]={isEnabled:n=>Ho[t].some(i=>!!n[i])};wl(e),Wo=!0}function ql(){return op(),Zf()}function ap(e){const t=ql();for(const n in e)t[n]={...t[n],...e[n]};wl(t)}const lp=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","propagate","ignoreStrict","viewport"]);function xi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lp.has(e)}let Yl=e=>!xi(e);function cp(e){typeof e=="function"&&(Yl=t=>t.startsWith("on")?!xi(t):e(t))}try{cp(require("@emotion/is-prop-valid").default)}catch{}function up(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(Yl(s)||n===!0&&xi(s)||!t&&!xi(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Ai=p.createContext({});function dp(e,t){if(Ci(e)){const{initial:n,animate:i}=e;return{initial:n===!1||Ln(n)?n:void 0,animate:Ln(i)?i:void 0}}return e.inherit!==!1?t:{}}function fp(e){const{initial:t,animate:n}=dp(e,p.useContext(Ai));return p.useMemo(()=>({initial:t,animate:n}),[Go(t),Go(n)])}function Go(e){return Array.isArray(e)?e.join(" "):e}const fr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Kl(e,t,n){for(const i in t)!Se(t[i])&&!kl(i,n)&&(e[i]=t[i])}function hp({transformTemplate:e},t){return p.useMemo(()=>{const n=fr();return ur(n,t,e),Object.assign({},n.vars,n.style)},[t])}function pp(e,t){const n=e.style||{},i={};return Kl(i,n,e),Object.assign(i,hp(e,t)),i}function mp(e,t){const n={},i=pp(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const Xl=()=>({...fr(),attrs:{}});function gp(e,t,n,i){const s=p.useMemo(()=>{const o=Xl();return jl(o,t,Ml(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Kl(o,e.style,e),s.style={...o,...s.style}}return s}const yp=["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 hr(e){return typeof e!="string"||e.includes("-")?!1:!!(yp.indexOf(e)>-1||/[A-Z]/u.test(e))}function vp(e,t,n,{latestValues:i},s,o=!1,r){const l=(r??hr(e)?gp:mp)(t,i,s,e),c=up(t,typeof e=="string",o),u=e!==p.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=p.useMemo(()=>Se(d)?d.get():d,[d]);return p.createElement(e,{...u,children:f})}function bp({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:xp(n,i,s,e),renderState:t()}}function xp(e,t,n,i){const s={},o=i(e,{});for(const f in o)s[f]=ai(o[f]);let{initial:r,animate:a}=e;const l=Ci(e),c=bl(e);t&&c&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!Pi(d)){const f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){const y=nr(e,f[m]);if(y){const{transitionEnd:T,transition:x,...v}=y;for(const b in v){let S=v[b];if(Array.isArray(S)){const j=u?S.length-1:0;S=S[j]}S!==null&&(s[b]=S)}for(const b in T)s[b]=T[b]}}}return s}const Zl=e=>(t,n)=>{const i=p.useContext(Ai),s=p.useContext(_s),o=()=>bp(e,t,i,s);return n?o():wu(o)},wp=Zl({scrapeMotionValuesFromProps:dr,createRenderState:fr}),Sp=Zl({scrapeMotionValuesFromProps:Dl,createRenderState:Xl}),Tp=Symbol.for("motionComponentSymbol");function Ep(e,t,n){const i=p.useRef(n);p.useInsertionEffect(()=>{i.current=n});const s=p.useRef(null);return p.useCallback(o=>{var a;o&&((a=e.onMount)==null||a.call(e,o)),t&&(o?t.mount(o):t.unmount());const r=i.current;if(typeof r=="function")if(o){const l=r(o);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):r(o);else r&&(r.current=o)},[t])}const Jl=p.createContext({});function qt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pp(e,t,n,i,s,o){var S,j;const{visualElement:r}=p.useContext(Ai),a=p.useContext(Gl),l=p.useContext(_s),c=p.useContext(Wl),u=c.reducedMotion,d=c.skipAnimations,f=p.useRef(null),m=p.useRef(!1);i=i||a.renderer,!f.current&&i&&(f.current=i(e,{visualState:t,parent:r,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:o}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const y=f.current,T=p.useContext(Jl);y&&!y.projection&&s&&(y.type==="html"||y.type==="svg")&&Cp(f.current,n,s,T);const x=p.useRef(!1);p.useInsertionEffect(()=>{y&&x.current&&y.update(n,l)});const v=n[ol],b=p.useRef(!!v&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,v))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,v)));return Su(()=>{m.current=!0,y&&(x.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),b.current&&y.animationState&&y.animationState.animateChanges())}),p.useEffect(()=>{y&&(!b.current&&y.animationState&&y.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,v)}),b.current=!1),y.enteringChildren=void 0)}),y}function Cp(e,t,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ql(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!r||a&&qt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}function Ql(e){if(e)return e.options.allowProjection!==!1?e.projection:Ql(e.parent)}function Yi(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&&ap(i);const o=n?n==="svg":hr(e),r=o?Sp:wp;function a(c,u){let d;const f={...p.useContext(Wl),...c,layoutId:Ap(c)},{isStatic:m}=f,y=fp(c),T=r(c,m);if(!m&&ba){kp(f,i);const x=jp(f);d=x.MeasureLayout,y.visualElement=Pp(e,T,f,s,x.ProjectionNode,o)}return h.jsxs(Ai.Provider,{value:y,children:[d&&y.visualElement?h.jsx(d,{visualElement:y.visualElement,...f}):null,vp(e,c,Ep(T,y.visualElement,u),T,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=p.forwardRef(a);return l[Tp]=e,l}function Ap({layoutId:e}){const t=p.useContext(va).id;return t&&e!==void 0?t+"-"+e:e}function kp(e,t){const n=p.useContext(Gl).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?an(!1,i,"lazy-strict-mode"):ct(!1,i,"lazy-strict-mode")}}function jp(e){const t=ql(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(e)||i!=null&&i.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Rp(e,t){if(typeof Proxy>"u")return Yi;const n=new Map,i=(o,r)=>Yi(o,r,e,t),s=(o,r)=>(process.env.NODE_ENV!=="production"&&$s(!1,"motion() is deprecated. Use motion.create() instead."),i(o,r));return new Proxy(s,{get:(o,r)=>r==="create"?i:(n.has(r)||n.set(r,Yi(r,void 0,e,t)),n.get(r))})}const Mp=(e,t)=>t.isSVG??hr(e)?new ph(t):new lh(t,{allowProjection:e!==p.Fragment});class Dp extends Et{constructor(t){super(t),t.animationState||(t.animationState=bh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Pi(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.call(this)}}let Lp=0;class Vp extends Et{constructor(){super(...arguments),this.id=Lp++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)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 Op={animation:{Feature:Dp},exit:{Feature:Vp}};function _n(e){return{point:{x:e.pageX,y:e.pageY}}}const Ip=e=>t=>or(t)&&e(t,_n(t));function kn(e,t,n,i){return Vn(e,t,Ip(n),i)}const ec=({current:e})=>e?e.ownerDocument.defaultView:null,qo=(e,t)=>Math.abs(e-t);function Np(e,t){const n=qo(e.x,t.x),i=qo(e.y,t.y);return Math.sqrt(n**2+i**2)}const Yo=new Set(["auto","scroll"]);class tc{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Xi(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,T=Np(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!T)return;const{point:x}=m,{timestamp:v}=xe;this.history.push({...x,timestamp:v});const{onStart:b,onMove:S}=this.handlers;y||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,y)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Ki(y,this.transformPagePoint),Z.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:T,onSessionEnd:x,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Xi(m.type==="pointercancel"?this.lastMoveEventInfo:Ki(y,this.transformPagePoint),this.history);this.startEvent&&T&&T(m,b),x&&x(m,b)},!or(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=s||window;const l=_n(t),c=Ki(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=xe;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Xi(c,this.history)),this.removeListeners=In(kn(this.contextWindow,"pointermove",this.handlePointerMove),kn(this.contextWindow,"pointerup",this.handlePointerUp),kn(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(Yo.has(i.overflowX)||Yo.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),Z.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),wt(this.updatePoint)}}function Ki(e,t){return t?{point:t(e.point)}:e}function Ko(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xi({point:e},t){return{point:e,delta:Ko(e,nc(t)),offset:Ko(e,Bp(t)),velocity:_p(t,.1)}}function Bp(e){return e[0]}function nc(e){return e[e.length-1]}function _p(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=nc(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>Be(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>Be(t)*2&&(i=e[1]);const o=Ie(s.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Fp(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?ie(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?ie(n,e,i.max):Math.min(e,n)),e}function Xo(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 zp(e,{top:t,left:n,bottom:i,right:s}){return{x:Xo(e.x,n,s),y:Xo(e.y,t,i)}}function Zo(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function $p(e,t){return{x:Zo(e.x,t.x),y:Zo(e.y,t.y)}}function Up(e,t){let n=.5;const i=Pe(e),s=Pe(t);return s>i?n=Rn(t.min,t.max-i,e.min):i>s&&(n=Rn(e.min,e.max-s,t.min)),rt(0,1,n)}function Hp(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 ks=.35;function Wp(e=ks){return e===!1?e=0:e===!0&&(e=ks),{x:Jo(e,"left","right"),y:Jo(e,"top","bottom")}}function Jo(e,t,n){return{min:Qo(e,t),max:Qo(e,n)}}function Qo(e,t){return typeof e=="number"?e:e[t]||0}const Gp=new WeakMap;class qp{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=ge(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=d=>{n&&this.snapToCursor(_n(d).point),this.stopAnimation()},r=(d,f)=>{const{drag:m,dragPropagation:y,onDragStart:T}=this.getProps();if(m&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Af(m),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nt(v=>{let b=this.getAxisMotionValue(v).get()||0;if(st.test(b)){const{projection:S}=this.visualElement;if(S&&S.layout){const j=S.layout.layoutBox[v];j&&(b=Pe(j)*(parseFloat(b)/100))}}this.originPoint[v]=b}),T&&Z.update(()=>T(d,f),!1,!0),xs(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:y,onDirectionLock:T,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=f;if(y&&this.currentDirection===null){this.currentDirection=Kp(v),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),x&&Z.update(()=>x(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new tc(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:ec(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&Z.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!Qn(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=Fp(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&qt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=zp(i.layoutBox,t):this.constraints=!1,this.elastic=Wp(n),s!==this.constraints&&!qt(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&nt(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Hp(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!qt(t))return!1;const i=t.current;ct(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=nh(i,s.root,this.visualElement.getTransformPagePoint());let r=$p(s.layout.layoutBox,o);if(n){const a=n(Qf(r));this.hasMutatedConstraints=!!a,a&&(r=Tl(a))}return r}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=nt(u=>{if(!Qn(u,n,this.currentDirection))return;let d=l[u]||{};r&&(d={min:0,max:0});const f=s?200:1e6,m=s?40:1e7,y={type:"inertia",velocity:i?t[u]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return xs(this.visualElement,t),i.start(tr(t,i,0,n,this.visualElement,!1))}stopAnimation(){nt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){nt(n=>{const{drag:i}=this.getProps();if(!Qn(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n],l=o.get()||0;o.set(t[n]-ie(r,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!qt(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};nt(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=Up({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),nt(r=>{if(!Qn(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(ie(l,c,s[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Gp.set(this.visualElement,this);const t=this.visualElement.current,n=kn(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,m=f!==t&&Lf(f);u&&d&&!m&&this.start(c)});let i;const s=()=>{const{dragConstraints:c}=this.getProps();qt(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),i||(i=Yp(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,r=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Z.read(s);const a=Vn(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(nt(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),r(),l&&l(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:r=ks,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ea(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Yp(e,t,n){const i=lo(e,ea(n)),s=lo(t,ea(n));return()=>{i(),s()}}function Qn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Kp(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Xp extends Et{constructor(t){super(t),this.removeGroupControls=Ne,this.removeListeners=Ne,this.controls=new qp(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ne}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Zi=e=>(t,n)=>{e&&Z.update(()=>e(t,n),!1,!0)};class Zp extends Et{constructor(){super(...arguments),this.removePointerDownListener=Ne}onPointerDown(t){this.session=new tc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ec(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Zi(t),onStart:Zi(n),onMove:Zi(i),onEnd:(o,r)=>{delete this.session,s&&Z.postRender(()=>s(o,r))}}}mount(){this.removePointerDownListener=kn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ji=!1;class Jp extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),i&&i.register&&s&&i.register(o),Ji&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),li.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:o}=this.props,{projection:r}=i;return r&&(r.isPresent=o,t.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),Ji=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||Z.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),rr.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;Ji=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ic(e){const[t,n]=rp(),i=p.useContext(va);return h.jsx(Jp,{...e,layoutGroup:i,switchLayoutGroup:p.useContext(Jl),isPresent:t,safeToRemove:n})}const Qp={pan:{Feature:Zp},drag:{Feature:Xp,ProjectionNode:Hl,MeasureLayout:ic}};function ta(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=i[s];o&&Z.postRender(()=>o(t,_n(t)))}class em extends Et{mount(){const{current:t}=this.node;t&&(this.unmount=jf(t,(n,i)=>(ta(this.node,i,"Start"),s=>ta(this.node,s,"End"))))}unmount(){}}class tm extends Et{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=In(Vn(this.node.current,"focus",()=>this.onFocus()),Vn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function na(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=i[s];o&&Z.postRender(()=>o(t,_n(t)))}class nm extends Et{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=Of(t,(s,o)=>(na(this.node,o,"Start"),(r,{success:a})=>na(this.node,r,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const js=new WeakMap,Qi=new WeakMap,im=e=>{const t=js.get(e.target);t&&t(e)},sm=e=>{e.forEach(im)};function rm({root:e,...t}){const n=e||document;Qi.has(n)||Qi.set(n,{});const i=Qi.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(sm,{root:e,...t})),i[s]}function om(e,t,n){const i=rm(t);return js.set(e,n),i.observe(e),()=>{js.delete(e),i.unobserve(e)}}const am={some:0,all:1};class lm extends Et{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:am[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 om(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(cm(t,n))&&this.startObserver()}unmount(){}}function cm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const um={inView:{Feature:lm},tap:{Feature:nm},focus:{Feature:tm},hover:{Feature:em}},dm={layout:{ProjectionNode:Hl,MeasureLayout:ic}},fm={...Op,...um,...Qp,...dm},ia=Rp(fm,Mp);function hm(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}hm(`:root{--sileo-spring-easing:linear(
|
|
58
|
+
}`,l=(x,v)=>{if(!x)return null;let b=sessionStorage.getItem("sessionKey");return b||(b=`${v?v+"-":""}${crypto.randomUUID()}`,sessionStorage.setItem("sessionKey",b)),b},c=()=>{const x=new Date,v=String(x.getDate()).padStart(2,"0"),b=String(x.getMonth()+1).padStart(2,"0"),S=x.getFullYear(),j=String(x.getHours()).padStart(2,"0"),w=String(x.getMinutes()).padStart(2,"0"),R=String(x.getSeconds()).padStart(2,"0");return`${v}/${b}/${S} ${j}:${w}:${R}`},u=(x,v)=>new Promise((b,S)=>{const j=indexedDB.open(x,1);j.onupgradeneeded=w=>{const R=w.target.result;R.objectStoreNames.contains(v)||R.createObjectStore(v,{keyPath:"id"})},j.onsuccess=w=>b(w.target.result),j.onerror=w=>S(w.target.error)}),d=async(x,v,b)=>{const S=await u(x,v);return new Promise((j,w)=>{if(!S){w("Errore: DB non disponibile");return}const R=S==null?void 0:S.transaction(v,"readonly"),L=R==null?void 0:R.objectStore(v),M=L==null?void 0:L.get(b);M.onsuccess=()=>j(M.result),M.onerror=I=>w(I.target.error)})},f=async(x,v,b)=>{const S=await u(x,v);return new Promise((j,w)=>{if(!S){w("Errore: DB non disponibile");return}const R=S==null?void 0:S.transaction(v,"readwrite"),L=R==null?void 0:R.objectStore(v),M=L==null?void 0:L.put(b);M.onsuccess=()=>j(M.result),M.onerror=I=>w(I.target.error)})},m=async(x,v)=>{let b=Date.now(),S;do S=await d(x,v,b),S&&b++;while(S);return b},y=async(x,v,b)=>{b.id||(b.id=await m(x,v)),await f(x,v,b)},T=async()=>{try{const v=await(await fetch("/config.json")).json();let b;v.isDevelopment?b=Wc:b=(await(await fetch("/package.json")).json()).version;const S=l(v.hasSessionKey,v.appKey),j={...v,version:b,openIndexedDB:u,getDataIndexedDB:d,setDataIndexedDB:f,generateUniqueId:m,setDataWithAutoId:y,setCurrentDate:c,activity:t};v.hasSessionKey&&(j.sessionKey=S),i(j)}catch(x){console.error(x),o(!0)}};return p.useEffect(()=>{r.current||(r.current=!0,T())},[]),Object.keys(n).length===0?h.jsx(ca,{errorShow:s,errorMessage:a}):h.jsx(ua.Provider,{value:n,children:e})},Le=()=>{const e=p.useContext(ua);if(e===void 0)throw new Error("Non puoi leggere i config");return e},Yc=e=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:500,height:500,viewBox:"0 0 375 375",...e},V.createElement("defs",null,V.createElement("clipPath",{id:"6ca7e2bf04"},V.createElement("path",{d:"M265.137 0 375 109.863v155.274L265.137 375H109.863L0 265.137V109.863L109.863 0Zm0 0"})),V.createElement("clipPath",{id:"2c77c820c6"},V.createElement("path",{d:"M12.879 12.879H362.12V362.12H12.88Zm0 0"})),V.createElement("clipPath",{id:"3d94df7d66"},V.createElement("path",{d:"M259.805 12.879 362.12 115.195v144.61L259.805 362.12h-144.61L12.88 259.805v-144.61L115.195 12.88Zm0 0"})),V.createElement("clipPath",{id:"8793709a64"},V.createElement("path",{d:"M12.879 12.879h349.23v349.23H12.88Zm0 0"})),V.createElement("clipPath",{id:"fdb3fe29d8"},V.createElement("path",{d:"M259.797 12.879 362.109 115.19v144.606L259.797 362.109H115.19L12.88 259.797V115.19L115.19 12.88Zm0 0"}))),V.createElement("g",{clipPath:"url(#6ca7e2bf04)"},V.createElement("path",{fill:"#b91c1c",d:"M-37.5-37.5h450v450h-450z"})),V.createElement("g",{clipPath:"url(#2c77c820c6)"},V.createElement("g",{clipPath:"url(#3d94df7d66)"},V.createElement("path",{fill:"#b91c1c",d:"M12.879 12.879H362.12V362.12H12.88Zm0 0"}))),V.createElement("g",{clipPath:"url(#8793709a64)"},V.createElement("g",{clipPath:"url(#fdb3fe29d8)"},V.createElement("path",{fill:"none",stroke:"#fff",strokeWidth:25.5,d:"M259.797 12.879 362.109 115.19v144.606L259.797 362.109H115.19L12.88 259.797V115.19L115.19 12.88Zm0 0"}))),V.createElement("path",{fill:"#fff",d:"m114.477 267.442 53.421-79.859-53.203-79.75h34.235l38.625 61.563 38.625-61.563h34.234l-53.203 79.75 53.422 79.86h-34.219l-39.094-60.657-38.625 60.656Zm0 0"})),Kc=e=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:500,height:500,viewBox:"0 0 375 375",...e},V.createElement("defs",null,V.createElement("clipPath",{id:"30562604dd"},V.createElement("path",{d:"M187.5 0C83.945 0 0 83.945 0 187.5S83.945 375 187.5 375 375 291.055 375 187.5 291.055 0 187.5 0m0 0"})),V.createElement("clipPath",{id:"971fcd5f72"},V.createElement("path",{d:"M18.57 18.57h337.86v337.86H18.57Zm0 0"})),V.createElement("clipPath",{id:"e891a7f57e"},V.createElement("path",{d:"M187.5 18.57c-93.297 0-168.93 75.633-168.93 168.93S94.203 356.43 187.5 356.43s168.93-75.633 168.93-168.93S280.797 18.57 187.5 18.57m0 0"})),V.createElement("clipPath",{id:"19a9ddc130"},V.createElement("path",{d:"M18.57 18.57h337.5v337.5H18.57Zm0 0"})),V.createElement("clipPath",{id:"5e650d5bd0"},V.createElement("path",{d:"M187.496 18.57C94.2 18.57 18.57 94.2 18.57 187.496c0 93.297 75.63 168.926 168.926 168.926 93.297 0 168.926-75.629 168.926-168.926S280.793 18.57 187.496 18.57m0 0"}))),V.createElement("g",{clipPath:"url(#30562604dd)"},V.createElement("path",{fill:"#1d4ed8",d:"M-37.5-37.5h450v450h-450z"})),V.createElement("g",{clipPath:"url(#971fcd5f72)"},V.createElement("g",{clipPath:"url(#e891a7f57e)"},V.createElement("path",{fill:"#1d4ed8",d:"M18.57 18.57h337.86v337.86H18.57Zm0 0"}))),V.createElement("g",{clipPath:"url(#19a9ddc130)"},V.createElement("g",{clipPath:"url(#5e650d5bd0)"},V.createElement("path",{fill:"none",stroke:"#fff",strokeWidth:25.5,d:"M187.496 18.57C94.2 18.57 18.57 94.2 18.57 187.496c0 93.297 75.63 168.926 168.926 168.926 93.297 0 168.926-75.629 168.926-168.926S280.793 18.57 187.496 18.57Zm0 0"}))),V.createElement("path",{fill:"#fff",d:"M196.122 107.056q-7.938 0-13.797-5.86c-3.906-3.913-5.86-8.515-5.86-13.796q0-7.936 5.86-13.797 5.858-5.86 13.797-5.86 7.922 0 13.781 5.86c3.914 3.906 5.875 8.508 5.875 13.797 0 5.281-1.96 9.883-5.875 13.797q-5.86 5.86-13.781 5.86m-14.828 198.61c-5.98 0-9.891-2.415-11.735-7.235-1.836-4.832-2.75-11.27-2.75-19.312q-.002-19.313 3.266-37.922a2076 2076 0 0 1 6.562-35.516q3.282-16.906 3.282-31.39 0-3.797-.36-8.266-.346-4.482-1.718-6.906-5.52 3.456-14.313 11.39-8.784 7.922-13.953 17.578-2.424-2.42-2.422-6.562-.001-5.859 4.656-12.75 4.654-6.891 12.407-13.266 7.763-6.389 16.734-10.53 8.964-4.14 17.578-4.142 7.934 0 10.172 3.797 2.25 3.797 2.25 9.657 0 8.626-2.25 22.25a1236 1236 0 0 1-5.172 29.125 745 745 0 0 0-5.172 31.03q-2.236 15.519-2.234 28.282c0 4.367.226 8.445.687 12.234q.687 5.689 1.719 9.485 8.624-3.797 16.375-11.203 7.764-7.406 11.563-13.97 2.062 3.113 2.062 6.563 0 5.52-4.828 12.063-4.83 6.55-12.078 12.422-7.236 5.859-15.344 9.469c-5.398 2.414-10.39 3.625-14.984 3.625m0 0"})),Xc=e=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:500,height:500,viewBox:"0 0 375 375",...e},V.createElement("defs",null,V.createElement("clipPath",{id:"59a10ac27a"},V.createElement("path",{d:"M17.18 32.695H360V337.5H17.18Zm0 0"})),V.createElement("clipPath",{id:"664b27481e"},V.createElement("path",{d:"m207.043 43.574 149.352 261.367a21.77 21.77 0 0 1-.07 21.72A21.76 21.76 0 0 1 337.5 337.5H39.375a21.75 21.75 0 0 1-18.82-10.84 21.76 21.76 0 0 1-.075-21.719L169.832 43.574a21.43 21.43 0 0 1 37.211 0m0 0"}))),V.createElement("g",{clipPath:"url(#59a10ac27a)"},V.createElement("g",{clipPath:"url(#664b27481e)"},V.createElement("path",{fill:"#d97706",d:"M1.875 11.016h373.672V337.5H1.875Zm0 0"}))),V.createElement("path",{fill:"#fff",d:"M205.301 232.437v-113.25q0-3.686-2.11-5.797t-5.796-2.11h-17.906q-3.69 0-5.797 2.11-2.11 2.11-2.11 5.797v109.562c0 2.461.703 4.39 2.11 5.797q2.107 2.11 5.797 2.11h17.906q3.686 0 5.797-2.11zm0 59v-21.328q0-3.687-2.11-5.797t-5.796-2.11h-17.906q-3.69 0-5.797 2.11-2.11 2.11-2.11 5.797v17.64c0 2.461.703 4.39 2.11 5.797q2.107 2.11 5.797 2.11h17.906q3.686 0 5.797-2.11zm0 0"}));var da={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wr=p.createContext&&p.createContext(da),Zc=["attr","size","title"];function Jc(e,t){if(e==null)return{};var n=Qc(e,t),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Qc(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function ci(){return ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ci.apply(this,arguments)}function Sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function ui(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sr(Object(n),!0).forEach(function(i){eu(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sr(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function eu(e,t,n){return t=tu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tu(e){var t=nu(e,"string");return typeof t=="symbol"?t:t+""}function nu(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fa(e){return e&&e.map((t,n)=>p.createElement(t.tag,ui({key:n},t.attr),fa(t.child)))}function St(e){return t=>p.createElement(iu,ci({attr:ui({},e.attr)},t),fa(e.child))}function iu(e){var t=n=>{var{attr:i,size:s,title:o}=e,r=Jc(e,Zc),a=s||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),p.createElement("svg",ci({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,r,{className:l,style:ui(ui({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&p.createElement("title",null,o),e.children)};return wr!==void 0?p.createElement(wr.Consumer,null,n=>t(n)):t(da)}function su(e){return St({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M17.47 250.9C88.82 328.1 158 397.6 224.5 485.5c72.3-143.8 146.3-288.1 268.4-444.37L460 26.06C356.9 135.4 276.8 238.9 207.2 361.9c-48.4-43.6-126.62-105.3-174.38-137z"},child:[]}]})(e)}var ru="2.0.9",ou=500,Tr="user-agent",tn="",Er="?",le={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},je="browser",at="cpu",it="device",We="engine",De="os",nn="result",P="name",E="type",k="vendor",A="version",Te="architecture",jn="major",C="model",ti="console",$="mobile",X="tablet",de="smarttv",tt="wearable",Gn="xr",Tn="embedded",au="fetcher",$t="inapp",Os="brands",Mt="formFactors",Is="fullVersionList",sn="platform",Ns="platformVersion",Ti="bitness",Tt="sec-ch-ua",lu=Tt+"-full-version-list",cu=Tt+"-arch",uu=Tt+"-"+Ti,du=Tt+"-form-factors",fu=Tt+"-"+$,hu=Tt+"-"+C,ha=Tt+"-"+sn,pu=ha+"-version",pa=[Os,Is,$,C,sn,Ns,Te,Mt,Ti],qn="Amazon",zt="Apple",Cr="ASUS",Pr="BlackBerry",At="Google",Ar="Huawei",Ri="Lenovo",kr="Honor",Yn="LG",Mi="Microsoft",Di="Motorola",jr="Nvidia",Rr="OnePlus",Li="OPPO",gn="Samsung",Mr="Sharp",yn="Sony",Vi="Xiaomi",Oi="Zebra",Dr="Chrome",Lr="Chromium",mt="Chromecast",ni="Edge",vn="Firefox",Ut="Opera",Ii="Facebook",Vr="Sogou",Ht="Mobile ",Wt=" Browser",ns="Windows",mu=typeof window!==le.UNDEFINED,ke=mu&&window.navigator?window.navigator:void 0,Dt=ke&&ke.userAgentData?ke.userAgentData:void 0,gu=function(e,t){var n={},i=t;if(!di(t)){i={};for(var s in t)for(var o in t[s])i[o]=t[s][o].concat(i[o]?i[o]:[])}for(var r in e)n[r]=i[r]&&i[r].length%2===0?i[r].concat(e[r]):e[r];return n},Ei=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},is=function(e,t){if(typeof e===le.OBJECT&&e.length>0){for(var n in e)if(vt(t)==vt(e[n]))return!0;return!1}return On(e)?vt(t)==vt(e):!1},di=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||(t?di(e[n]):!1)},On=function(e){return typeof e===le.STRING},Ni=function(e){if(e){for(var t=[],n=rn(/\\?\"/g,e).split(","),i=0;i<n.length;i++)if(n[i].indexOf(";")>-1){var s=fi(n[i]).split(";v=");t[i]={brand:s[0],version:s[1]}}else t[i]=fi(n[i]);return t}},vt=function(e){return On(e)?e.toLowerCase():e},ss=function(e){return On(e)?rn(/[^\d\.]/g,e).split(".")[0]:void 0},ot=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==le.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},rn=function(e,t){return On(t)?t.replace(e,tn):t},bn=function(e){return rn(/\\?\"/g,e)},fi=function(e,t){return e=rn(/^\s\s*/,String(e)),typeof t===le.UNDEFINED?e:e.substring(0,t)},rs=function(e,t){if(!(!e||!t))for(var n=0,i,s,o,r,a,l;n<t.length&&!a;){var c=t[n],u=t[n+1];for(i=s=0;i<c.length&&!a&&c[i];)if(a=c[i++].exec(e),a)for(o=0;o<u.length;o++)l=a[++s],r=u[o],typeof r===le.OBJECT&&r.length>0?r.length===2?typeof r[1]==le.FUNCTION?this[r[0]]=r[1].call(this,l):this[r[0]]=r[1]:r.length>=3&&(typeof r[1]===le.FUNCTION&&!(r[1].exec&&r[1].test)?r.length>3?this[r[0]]=l?r[1].apply(this,r.slice(2)):void 0:this[r[0]]=l?r[1].call(this,l,r[2]):void 0:r.length==3?this[r[0]]=l?l.replace(r[1],r[2]):void 0:r.length==4?this[r[0]]=l?r[3].call(this,l.replace(r[1],r[2])):void 0:r.length>4&&(this[r[0]]=l?r[3].apply(this,[l.replace(r[1],r[2])].concat(r.slice(4))):void 0)):this[r]=l||void 0;n+=2}},He=function(e,t){for(var n in t)if(typeof t[n]===le.OBJECT&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(is(t[n][i],e))return n===Er?void 0:n}else if(is(t[n],e))return n===Er?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},Or={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},Ir={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},yu={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Nr={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[A,[P,Ht+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[A,[P,ni+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[A,[P,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[P,A],[/opios[\/ ]+([\w\.]+)/i],[A,[P,Ut+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[A,[P,Ut+" GX"]],[/\bopr\/([\w\.]+)/i],[A,[P,Ut]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[A,[P,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[A,[P,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[P,A],[/quark(?:pc)?\/([-\w\.]+)/i],[A,[P,"Quark"]],[/\bddg\/([\w\.]+)/i],[A,[P,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[A,[P,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[A,[P,"WeChat"]],[/konqueror\/([\w\.]+)/i],[A,[P,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[A,[P,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[A,[P,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[A,[P,"Smart "+Ri+Wt]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[P,/(.+)/,"$1 Secure"+Wt],A],[/norton\/([\w\.]+)/i],[A,[P,"Norton Private"+Wt]],[/\bfocus\/([\w\.]+)/i],[A,[P,vn+" Focus"]],[/ mms\/([\w\.]+)$/i],[A,[P,Ut+" Neon"]],[/ opt\/([\w\.]+)$/i],[A,[P,Ut+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[A,[P,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[A,[P,"Dolphin"]],[/coast\/([\w\.]+)/i],[A,[P,Ut+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[A,[P,"MIUI"+Wt]],[/fxios\/([\w\.-]+)/i],[A,[P,Ht+vn]],[/\bqihoobrowser\/?([\w\.]*)/i],[A,[P,"360"]],[/\b(qq)\/([\w\.]+)/i],[[P,/(.+)/,"$1Browser"],A],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[P,/(.+)/,"$1"+Wt],A],[/samsungbrowser\/([\w\.]+)/i],[A,[P,gn+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[A,[P,Vr+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[P,Vr+" Mobile"],A],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[P,A],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[P],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[A,P],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[P,Ii],A,[E,$t]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[P,A,[E,$t]],[/\bgsa\/([\w\.]+) .*safari\//i],[A,[P,"GSA"],[E,$t]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[A,[P,"TikTok"],[E,$t]],[/\[(linkedin)app\]/i],[P,[E,$t]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[P,/(.+)/,"Zalo"],A,[E,$t]],[/(chromium)[\/ ]([-\w\.]+)/i],[P,A],[/ome-(lighthouse)$/i],[P,[E,au]],[/headlesschrome(?:\/([\w\.]+)| )/i],[A,[P,Dr+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[A,[P,ni+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[P,Dr+" WebView"],A],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[A,[P,"Android"+Wt]],[/chrome\/([\w\.]+) mobile/i],[A,[P,Ht+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[P,A],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[A,[P,Ht+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[P,Ht+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[A,P],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[P,[A,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[P,A],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[P,Ht+vn],A],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[P,"Netscape"],A],[/(wolvic|librewolf)\/([\w\.]+)/i],[P,A],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[A,[P,vn+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[P,[A,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[P,[A,/[^\d\.]+./,tn]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Te,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Te,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Te,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Te,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Te,"arm"]],[/ sun4\w[;\)]/i],[[Te,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[Te,/ower/,tn,vt]],[/mc680.0/i],[[Te,"68k"]],[/winnt.+\[axp/i],[[Te,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[C,[k,gn],[E,X]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[C,[k,gn],[E,$]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[C,[k,zt],[E,$]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[C,[k,zt],[E,X]],[/(macintosh);/i],[C,[k,zt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[C,[k,Mr],[E,$]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[C,[k,kr],[E,X]],[/honor([-\w ]+)[;\)]/i],[C,[k,kr],[E,$]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[C,[k,Ar],[E,X]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[C,[k,Ar],[E,$]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[C,/_/g," "],[k,Vi],[E,X]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[C,/_/g," "],[k,Vi],[E,$]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[C,[k,Rr],[E,$]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[C,[k,Li],[E,$]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[C,[k,He,{OnePlus:["203","304","403","404","413","415"],"*":Li}],[E,X]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[C,[k,"BLU"],[E,$]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[C,[k,"Vivo"],[E,$]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[C,[k,"Realme"],[E,$]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[C,[k,Ri],[E,X]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[C,[k,Ri],[E,$]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[C,[k,Di],[E,$]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[C,[k,Di],[E,X]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[C,[k,Yn],[E,X]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[C,[k,Yn],[E,$]],[/(nokia) (t[12][01])/i],[k,C,[E,X]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[C,/_/g," "],[E,$],[k,"Nokia"]],[/(pixel (c|tablet))\b/i],[C,[k,At],[E,X]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[C,[k,At],[E,$]],[/(google) (pixelbook( go)?)/i],[k,C],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[C,[k,yn],[E,$]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[C,"Xperia Tablet"],[k,yn],[E,X]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[C,[k,qn],[E,X]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[C,/(.+)/g,"Fire Phone $1"],[k,qn],[E,$]],[/(playbook);[-\w\),; ]+(rim)/i],[C,k,[E,X]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[C,[k,Pr],[E,$]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[C,[k,Cr],[E,X]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[C,[k,Cr],[E,$]],[/(nexus 9)/i],[C,[k,"HTC"],[E,X]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[k,[C,/_/g," "],[E,$]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[C,[k,"TCL"],[E,X]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[C,[k,"TCL"],[E,$]],[/(itel) ((\w+))/i],[[k,vt],C,[E,He,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[C,[k,"Acer"],[E,X]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[C,[k,"Meizu"],[E,$]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[C,[k,"Ulefone"],[E,$]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[C,[k,"Energizer"],[E,$]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[C,[k,"Cat"],[E,$]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[C,[k,"Smartfren"],[E,$]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[C,[k,"Nothing"],[E,$]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[C,[k,"Archos"],[E,X]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[C,[k,"Archos"],[E,$]],[/; (n159v)/i],[C,[k,"HMD"],[E,$]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[k,C,[E,X]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[k,C,[E,$]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[k,C,[E,X]],[/(surface duo)/i],[C,[k,Mi],[E,X]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[C,[k,"Fairphone"],[E,$]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[C,[k,jr],[E,X]],[/(sprint) (\w+)/i],[k,C,[E,$]],[/(kin\.[onetw]{3})/i],[[C,/\./g," "],[k,Mi],[E,$]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[C,[k,Oi],[E,X]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[C,[k,Oi],[E,$]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[k,[E,de]],[/hbbtv.+maple;(\d+)/i],[[C,/^/,"SmartTV"],[k,gn],[E,de]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[k,C,[E,de]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[k,Yn],[E,de]],[/(apple) ?tv/i],[k,[C,zt+" TV"],[E,de]],[/crkey.*devicetype\/chromecast/i],[[C,mt+" Third Generation"],[k,At],[E,de]],[/crkey.*devicetype\/([^/]*)/i],[[C,/^/,"Chromecast "],[k,At],[E,de]],[/fuchsia.*crkey/i],[[C,mt+" Nest Hub"],[k,At],[E,de]],[/crkey/i],[[C,mt],[k,At],[E,de]],[/(portaltv)/i],[C,[k,Ii],[E,de]],[/droid.+aft(\w+)( bui|\))/i],[C,[k,qn],[E,de]],[/(shield \w+ tv)/i],[C,[k,jr],[E,de]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[C,[k,Mr],[E,de]],[/(bravia[\w ]+)( bui|\))/i],[C,[k,yn],[E,de]],[/(mi(tv|box)-?\w+) bui/i],[C,[k,Vi],[E,de]],[/Hbbtv.*(technisat) (.*);/i],[k,C,[E,de]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[k,/.+\/(\w+)/,"$1",He,{LG:"lge"}],[C,fi],[E,de]],[/(playstation \w+)/i],[C,[k,yn],[E,ti]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[C,[k,Mi],[E,ti]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[k,He,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],C,[E,ti]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[C,[k,gn],[E,tt]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[k,C,[E,tt]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[C,[k,Li],[E,tt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[C,[k,zt],[E,tt]],[/(opwwe\d{3})/i],[C,[k,Rr],[E,tt]],[/(moto 360)/i],[C,[k,Di],[E,tt]],[/(smartwatch 3)/i],[C,[k,yn],[E,tt]],[/(g watch r)/i],[C,[k,Yn],[E,tt]],[/droid.+; (wt63?0{2,3})\)/i],[C,[k,Oi],[E,tt]],[/droid.+; (glass) \d/i],[C,[k,At],[E,Gn]],[/(pico) ([\w ]+) os\d/i],[k,C,[E,Gn]],[/(quest( \d| pro)?s?).+vr/i],[C,[k,Ii],[E,Gn]],[/mobile vr; rv.+firefox/i],[[E,Gn]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[k,[E,Tn]],[/(aeobc)\b/i],[C,[k,qn],[E,Tn]],[/(homepod).+mac os/i],[C,[k,zt],[E,Tn]],[/windows iot/i],[[E,Tn]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[C,[E,de]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[E,de]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[C,[E,He,{mobile:"Mobile",xr:"VR","*":X}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[E,X]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[E,$]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[C,[k,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[A,[P,ni+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[P,A],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[A,[P,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[P,A],[/ladybird\//i],[[P,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[A,P]],os:[[/(windows nt) (6\.[23]); arm/i],[[P,/N/,"R"],[A,He,Or]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[P,A],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[A,/(;|\))/g,"",He,Or],[P,ns]],[/(windows ce)\/?([\d\.]*)/i],[P,A],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[A,/_/g,"."],[P,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[P,"macOS"],[A,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[A,[P,mt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[A,[P,mt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[A,[P,mt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[A,[P,mt+" Linux"]],[/crkey\/([\d\.]+)/i],[A,[P,mt]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[A,P],[/(ubuntu) ([\w\.]+) like android/i],[[P,/(.+)/,"$1 Touch"],A],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[P,A],[/\(bb(10);/i],[A,[P,Pr]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[A,[P,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[A,[P,vn+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[A,[P,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[A,He,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[P,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[A,[P,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[A,[P,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[A,[P,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[P,A],[/(sunos) ?([\d\.]*)/i],[[P,"Solaris"],A],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[P,A]]},Kn=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return ot.call(e.init,[[je,[P,A,jn,E]],[at,[Te]],[it,[E,C,k]],[We,[P,A]],[De,[P,A]]]),ot.call(e.isIgnore,[[je,[A,jn]],[We,[A]],[De,[A]]]),ot.call(e.isIgnoreRgx,[[je,/ ?browser$/i],[De,/ ?os$/i]]),ot.call(e.toString,[[je,[P,A]],[at,[Te]],[it,[k,C]],[We,[P,A]],[De,[P,A]]]),e}(),vu=function(e,t){var n=Kn.init[t],i=Kn.isIgnore[t]||0,s=Kn.isIgnoreRgx[t]||0,o=Kn.toString[t]||0;function r(){ot.call(this,n)}return r.prototype.getItem=function(){return e},r.prototype.withClientHints=function(){return Dt?Dt.getHighEntropyValues(pa).then(function(a){return e.setCH(new ma(a,!1)).parseCH().get()}):e.parseCH().get()},r.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=nn&&(r.prototype.is=function(a){var l=!1;for(var c in this)if(this.hasOwnProperty(c)&&!is(i,c)&&vt(s?rn(s,this[c]):this[c])==vt(s?rn(s,a):a)){if(l=!0,a!=le.UNDEFINED)break}else if(a==le.UNDEFINED&&l){l=!l;break}return l},r.prototype.toString=function(){var a=tn;for(var l in o)typeof this[o[l]]!==le.UNDEFINED&&(a+=(a?" ":tn)+this[o[l]]);return a||le.UNDEFINED}),r.prototype.then=function(a){var l=this,c=function(){for(var d in l)l.hasOwnProperty(d)&&(this[d]=l[d])};c.prototype={is:r.prototype.is,toString:r.prototype.toString,withClientHints:r.prototype.withClientHints,withFeatureCheck:r.prototype.withFeatureCheck};var u=new c;return a(u),u},new r};function ma(e,t){if(e=e||{},ot.call(this,pa),t)ot.call(this,[[Os,Ni(e[Tt])],[Is,Ni(e[lu])],[$,/\?1/.test(e[fu])],[C,bn(e[hu])],[sn,bn(e[ha])],[Ns,bn(e[pu])],[Te,bn(e[cu])],[Mt,Ni(e[du])],[Ti,bn(e[uu])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==le.UNDEFINED&&(this[n]=e[n])}function xt(e,t,n,i){return ot.call(this,[["itemType",e],["ua",t],["uaCH",i],["rgxMap",n],["data",vu(this,e)]]),this}xt.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data};xt.prototype.set=function(e,t){return this.data[e]=t,this};xt.prototype.setCH=function(e){return this.uaCH=e,this};xt.prototype.detectFeature=function(){if(ke&&ke.userAgent==this.ua)switch(this.itemType){case je:ke.brave&&typeof ke.brave.isBrave==le.FUNCTION&&this.set(P,"Brave");break;case it:!this.get(E)&&Dt&&Dt[$]&&this.set(E,$),this.get(C)=="Macintosh"&&ke&&typeof ke.standalone!==le.UNDEFINED&&ke.maxTouchPoints&&ke.maxTouchPoints>2&&this.set(C,"iPad").set(E,X);break;case De:!this.get(P)&&Dt&&Dt[sn]&&this.set(P,Dt[sn]);break;case nn:var e=this.data,t=function(n){return e[n].getItem().detectFeature().get()};this.set(je,t(je)).set(at,t(at)).set(it,t(it)).set(We,t(We)).set(De,t(De))}return this};xt.prototype.parseUA=function(){switch(this.itemType!=nn&&rs.call(this.data,this.ua,this.rgxMap),this.itemType){case je:this.set(jn,ss(this.get(A)));break;case De:if(this.get(P)=="iOS"&&this.get(A)=="18.6"){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(A,e[1])}break}return this};xt.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case je:case We:var n=e[Is]||e[Os],i;if(n)for(var s=0;s<n.length;s++){var o=n[s].brand||n[s],r=n[s].version;this.itemType==je&&!/not.a.brand/i.test(o)&&(!i||/Chrom/.test(i)&&o!=Lr||i==ni&&/WebView2/.test(o))&&(o=He(o,yu),i=this.get(P),i&&!/Chrom/.test(i)&&/Chrom/.test(o)||this.set(P,o).set(A,r).set(jn,ss(r)),i=o),this.itemType==We&&o==Lr&&this.set(A,r)}break;case at:var a=e[Te];a&&(a&&e[Ti]=="64"&&(a+="64"),rs.call(this.data,a+";",t));break;case it:if(e[$]&&this.set(E,$),e[C]&&(this.set(C,e[C]),!this.get(E)||!this.get(k))){var l={};rs.call(l,"droid 9; "+e[C]+")",t),!this.get(E)&&l.type&&this.set(E,l.type),!this.get(k)&&l.vendor&&this.set(k,l.vendor)}if(e[Mt]){var c;if(typeof e[Mt]!="string")for(var u=0;!c&&u<e[Mt].length;)c=He(e[Mt][u++],Ir);else c=He(e[Mt],Ir);this.set(E,c)}break;case De:var d=e[sn];if(d){var f=e[Ns];d==ns&&(f=parseInt(ss(f),10)>=13?"11":"10"),this.set(P,d).set(A,f)}this.get(P)==ns&&e[C]=="Xbox"&&this.set(P,"Xbox").set(A,void 0);break;case nn:var m=this.data,y=function(T){return m[T].getItem().setCH(e).parseCH().get()};this.set(je,y(je)).set(at,y(at)).set(it,y(it)).set(We,y(We)).set(De,y(De))}return this};function lt(e,t,n){if(typeof e===le.OBJECT?(di(e,!0)?(typeof t===le.OBJECT&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e===le.STRING&&!di(t,!0)&&(n=t,t=void 0),n)if(typeof n.append===le.FUNCTION){var i={};n.forEach(function(u,d){i[String(d).toLowerCase()]=u}),n=i}else{var s={};for(var o in n)n.hasOwnProperty(o)&&(s[String(o).toLowerCase()]=n[o]);n=s}if(!(this instanceof lt))return new lt(e,t,n).getResult();var r=typeof e===le.STRING?e:n&&n[Tr]?n[Tr]:ke&&ke.userAgent?ke.userAgent:tn,a=new ma(n,!0),l=t?gu(Nr,t):Nr,c=function(u){return u==nn?function(){return new xt(u,r,l,a).set("ua",r).set(je,this.getBrowser()).set(at,this.getCPU()).set(it,this.getDevice()).set(We,this.getEngine()).set(De,this.getOS()).get()}:function(){return new xt(u,r,l[u],a).parseUA().get()}};return ot.call(this,[["getBrowser",c(je)],["getCPU",c(at)],["getDevice",c(it)],["getEngine",c(We)],["getOS",c(De)],["getResult",c(nn)],["getUA",function(){return r}],["setUA",function(u){return On(u)&&(r=fi(u,ou)),this}]]).setUA(r),this}lt.VERSION=ru;lt.BROWSER=Ei([P,A,jn,E]);lt.CPU=Ei([Te]);lt.DEVICE=Ei([C,k,E,ti,$,de,X,tt,Tn]);lt.ENGINE=lt.OS=Ei([P,A]);let Xn=null;const bu=()=>{if(Xn)return Xn;const t=new lt().getResult(),{device:n,os:i,browser:s}=t,o=n.model==="iPad"||/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&"ontouchend"in document;return Xn={type:n.type||(o?"tablet":"desktop"),os:i.name,browser:s.name,vendor:n.vendor||null,model:n.model||(o?"iPad":null),isMobile:n.type==="mobile",isTablet:n.type==="tablet"||o,isDesktop:!n.type&&!o,isIPhone:n.model==="iPhone",isIPad:o,isAndroid:i.name==="Android"},Xn},ga=()=>p.useMemo(()=>bu(),[]);function he(){return he=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},he.apply(this,arguments)}function xu(e,t){if(e==null)return{};var n={},i=Object.getOwnPropertyNames(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s]);return n}const ya=p.createContext({});function wu(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const va=typeof window<"u",Su=va?p.useLayoutEffect:p.useEffect,Bs=p.createContext(null);function _s(e,t){e.indexOf(t)===-1&&e.push(t)}function hi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const rt=(e,t,n)=>n>t?t:n<e?e:n;function os(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let an=()=>{},ct=()=>{};var ra;typeof process<"u"&&((ra=process.env)==null?void 0:ra.NODE_ENV)!=="production"&&(an=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(os(t,n))},ct=(e,t,n)=>{if(!e)throw new Error(os(t,n))});const ut={},ba=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function xa(e){return typeof e=="object"&&e!==null}const wa=e=>/^0[^.\s]+$/u.test(e);function Sa(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ne=e=>e,Tu=(e,t)=>n=>t(e(n)),In=(...e)=>e.reduce(Tu),Rn=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class Fs{constructor(){this.subscriptions=[]}add(t){return _s(this.subscriptions,t),()=>hi(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Be=e=>e*1e3,Ie=e=>e/1e3;function Ta(e,t){return t?e*(1e3/t):0}const Br=new Set;function $s(e,t,n){e||Br.has(t)||(console.warn(os(t,n)),Br.add(t))}const Ea=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Eu=1e-7,Cu=12;function Pu(e,t,n,i,s){let o,r,a=0;do r=t+(n-t)/2,o=Ea(r,i,s)-e,o>0?n=r:t=r;while(Math.abs(o)>Eu&&++a<Cu);return r}function Nn(e,t,n,i){if(e===t&&n===i)return Ne;const s=o=>Pu(o,0,1,e,n);return o=>o===0||o===1?o:Ea(s(o),t,i)}const Ca=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Pa=e=>t=>1-e(1-t),Aa=Nn(.33,1.53,.69,.99),zs=Pa(Aa),ka=Ca(zs),ja=e=>(e*=2)<1?.5*zs(e):.5*(2-Math.pow(2,-10*(e-1))),Us=e=>1-Math.sin(Math.acos(e)),Ra=Pa(Us),Ma=Ca(Us),Au=Nn(.42,0,1,1),ku=Nn(0,0,.58,1),Da=Nn(.42,0,.58,1),ju=e=>Array.isArray(e)&&typeof e[0]!="number",La=e=>Array.isArray(e)&&typeof e[0]=="number",_r={linear:Ne,easeIn:Au,easeInOut:Da,easeOut:ku,circIn:Us,circInOut:Ma,circOut:Ra,backIn:zs,backInOut:ka,backOut:Aa,anticipate:ja},Ru=e=>typeof e=="string",Fr=e=>{if(La(e)){ct(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Nn(t,n,i,s)}else if(Ru(e))return ct(_r[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),_r[e];return e},Zn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Mu(e,t){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const y=f&&s?n:i;return d&&r.add(u),y.has(u)||y.add(u),u},cancel:u=>{i.delete(u),r.delete(u)},process:u=>{if(a=u,s){o=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,c.process(u))}};return c}const Du=40;function Va(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Zn.reduce((S,j)=>(S[j]=Mu(o),S),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:m,postRender:y}=r,T=()=>{const S=ut.useManualTiming?s.timestamp:performance.now();n=!1,ut.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(S-s.timestamp,Du),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),m.process(s),y.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(T))},x=()=>{n=!0,i=!0,s.isProcessing||e(T)};return{schedule:Zn.reduce((S,j)=>{const w=r[j];return S[j]=(R,L=!1,M=!1)=>(n||x(),w.schedule(R,L,M)),S},{}),cancel:S=>{for(let j=0;j<Zn.length;j++)r[Zn[j]].cancel(S)},state:s,steps:r}}const{schedule:Z,cancel:wt,state:xe,steps:Bi}=Va(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ne,!0);let ii;function Lu(){ii=void 0}const Ee={now:()=>(ii===void 0&&Ee.set(xe.isProcessing||ut.useManualTiming?xe.timestamp:performance.now()),ii),set:e=>{ii=e,queueMicrotask(Lu)}},Oa=e=>t=>typeof t=="string"&&t.startsWith(e),Ia=Oa("--"),Vu=Oa("var(--"),Hs=e=>Vu(e)?Ou.test(e.split("/*")[0].trim()):!1,Ou=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $r(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ln={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Mn={...ln,transform:e=>rt(0,1,e)},Jn={...ln,default:1},Pn=e=>Math.round(e*1e5)/1e5,Ws=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Iu(e){return e==null}const Nu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gs=(e,t)=>n=>!!(typeof n=="string"&&Nu.test(n)&&n.startsWith(e)||t&&!Iu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Na=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,o,r,a]=i.match(Ws);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Bu=e=>rt(0,255,e),_i={...ln,transform:e=>Math.round(Bu(e))},Lt={test:Gs("rgb","red"),parse:Na("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+_i.transform(e)+", "+_i.transform(t)+", "+_i.transform(n)+", "+Pn(Mn.transform(i))+")"};function _u(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const as={test:Gs("#"),parse:_u,transform:Lt.transform},Bn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),gt=Bn("deg"),st=Bn("%"),N=Bn("px"),Fu=Bn("vh"),$u=Bn("vw"),zr={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},Yt={test:Gs("hsl","hue"),parse:Na("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+st.transform(Pn(t))+", "+st.transform(Pn(n))+", "+Pn(Mn.transform(i))+")"},fe={test:e=>Lt.test(e)||as.test(e)||Yt.test(e),parse:e=>Lt.test(e)?Lt.parse(e):Yt.test(e)?Yt.parse(e):as.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Lt.transform(e):Yt.transform(e),getAnimatableNone:e=>{const t=fe.parse(e);return t.alpha=0,fe.transform(t)}},zu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Uu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ws))==null?void 0:t.length)||0)+(((n=e.match(zu))==null?void 0:n.length)||0)>0}const Ba="number",_a="color",Hu="var",Wu="var(",Ur="${}",Gu=/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 Dn(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Gu,l=>(fe.test(l)?(i.color.push(o),s.push(_a),n.push(fe.parse(l))):l.startsWith(Wu)?(i.var.push(o),s.push(Hu),n.push(l)):(i.number.push(o),s.push(Ba),n.push(parseFloat(l))),++o,Ur)).split(Ur);return{values:n,split:a,indexes:i,types:s}}function Fa(e){return Dn(e).values}function $a(e){const{split:t,types:n}=Dn(e),i=t.length;return s=>{let o="";for(let r=0;r<i;r++)if(o+=t[r],s[r]!==void 0){const a=n[r];a===Ba?o+=Pn(s[r]):a===_a?o+=fe.transform(s[r]):o+=s[r]}return o}}const qu=e=>typeof e=="number"?0:fe.test(e)?fe.getAnimatableNone(e):e;function Yu(e){const t=Fa(e);return $a(e)(t.map(qu))}const Ge={test:Uu,parse:Fa,createTransformer:$a,getAnimatableNone:Yu};function Fi(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 Ku({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,o=0,r=0;if(!t)s=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Fi(l,a,e+1/3),o=Fi(l,a,e),r=Fi(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}function pi(e,t){return n=>n>0?t:e}const ie=(e,t,n)=>e+(t-e)*n,$i=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Xu=[as,Lt,Yt],Zu=e=>Xu.find(t=>t.test(e));function Hr(e){const t=Zu(e);if(an(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Yt&&(n=Ku(n)),n}const Wr=(e,t)=>{const n=Hr(e),i=Hr(t);if(!n||!i)return pi(e,t);const s={...n};return o=>(s.red=$i(n.red,i.red,o),s.green=$i(n.green,i.green,o),s.blue=$i(n.blue,i.blue,o),s.alpha=ie(n.alpha,i.alpha,o),Lt.transform(s))},ls=new Set(["none","hidden"]);function Ju(e,t){return ls.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Qu(e,t){return n=>ie(e,t,n)}function qs(e){return typeof e=="number"?Qu:typeof e=="string"?Hs(e)?pi:fe.test(e)?Wr:nd:Array.isArray(e)?za:typeof e=="object"?fe.test(e)?Wr:ed:pi}function za(e,t){const n=[...e],i=n.length,s=e.map((o,r)=>qs(o)(o,t[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}}function ed(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=qs(e[s])(e[s],t[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}}function td(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],r=e.indexes[o][i[o]],a=e.values[r]??0;n[s]=a,i[o]++}return n}const nd=(e,t)=>{const n=Ge.createTransformer(t),i=Dn(e),s=Dn(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?ls.has(e)&&!s.values.length||ls.has(t)&&!i.values.length?Ju(e,t):In(za(td(i,s),s.values),n):(an(!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.`,"complex-values-different"),pi(e,t))};function Ua(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ie(e,t,n):qs(e)(e,t)}const id=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Z.update(t,n),stop:()=>wt(t),now:()=>xe.isProcessing?xe.timestamp:Ee.now()}},Ha=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)i+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},mi=2e4;function Ys(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<mi;)t+=n,i=e.next(t);return t>=mi?1/0:t}function sd(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(Ys(i),mi);return{type:"keyframes",ease:o=>i.next(s*o).value/t,duration:Ie(s)}}const rd=5;function Wa(e,t,n){const i=Math.max(t-rd,0);return Ta(n-e(i),t-i)}const ne={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},Gr=.001;function od({duration:e=ne.duration,bounce:t=ne.bounce,velocity:n=ne.velocity,mass:i=ne.mass}){let s,o;an(e<=Be(ne.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=rt(ne.minDamping,ne.maxDamping,r),e=rt(ne.minDuration,ne.maxDuration,Ie(e)),r<1?(s=c=>{const u=c*r,d=u*e,f=u-n,m=cs(c,r),y=Math.exp(-d);return Gr-f/m*y},o=c=>{const d=c*r*e,f=d*n+n,m=Math.pow(r,2)*Math.pow(c,2)*e,y=Math.exp(-d),T=cs(Math.pow(c,2),r);return(-s(c)+Gr>0?-1:1)*((f-m)*y)/T}):(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=ld(s,o,a);if(e=Be(e),isNaN(l))return{stiffness:ne.stiffness,damping:ne.damping,duration:e};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:r*2*Math.sqrt(i*c),duration:e}}}const ad=12;function ld(e,t,n){let i=n;for(let s=1;s<ad;s++)i=i-e(i)/t(i);return i}function cs(e,t){return e*Math.sqrt(1-t*t)}const cd=["duration","bounce"],ud=["stiffness","damping","mass"];function qr(e,t){return t.some(n=>e[n]!==void 0)}function dd(e){let t={velocity:ne.velocity,stiffness:ne.stiffness,damping:ne.damping,mass:ne.mass,isResolvedFromDuration:!1,...e};if(!qr(e,ud)&&qr(e,cd))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,o=2*rt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ne.mass,stiffness:s,damping:o}}else{const n=od(e);t={...t,...n,mass:ne.mass},t.isResolvedFromDuration=!0}return t}function gi(e=ne.visualDuration,t=ne.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:m}=dd({...n,velocity:-Ie(n.velocity||0)}),y=f||0,T=c/(2*Math.sqrt(l*u)),x=r-o,v=Ie(Math.sqrt(l/u)),b=Math.abs(x)<5;i||(i=b?ne.restSpeed.granular:ne.restSpeed.default),s||(s=b?ne.restDelta.granular:ne.restDelta.default);let S;if(T<1){const w=cs(v,T);S=R=>{const L=Math.exp(-T*v*R);return r-L*((y+T*v*x)/w*Math.sin(w*R)+x*Math.cos(w*R))}}else if(T===1)S=w=>r-Math.exp(-v*w)*(x+(y+v*x)*w);else{const w=v*Math.sqrt(T*T-1);S=R=>{const L=Math.exp(-T*v*R),M=Math.min(w*R,300);return r-L*((y+T*v*x)*Math.sinh(M)+w*x*Math.cosh(M))/w}}const j={calculatedDuration:m&&d||null,next:w=>{const R=S(w);if(m)a.done=w>=d;else{let L=w===0?y:0;T<1&&(L=w===0?Be(y):Wa(S,w,R));const M=Math.abs(L)<=i,I=Math.abs(r-R)<=s;a.done=M&&I}return a.value=a.done?r:R,a},toString:()=>{const w=Math.min(Ys(j),mi),R=Ha(L=>j.next(w*L).value,w,30);return w+"ms "+R},toTransition:()=>{}};return j}gi.applyToOptions=e=>{const t=sd(e,100,gi);return e.ease=t.ease,e.duration=Be(t.duration),e.type="keyframes",e};function us({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=M=>a!==void 0&&M<a||l!==void 0&&M>l,y=M=>a===void 0?l:l===void 0||Math.abs(a-M)<Math.abs(l-M)?a:l;let T=n*t;const x=d+T,v=r===void 0?x:r(x);v!==x&&(T=v-d);const b=M=>-T*Math.exp(-M/i),S=M=>v+b(M),j=M=>{const I=b(M),B=S(M);f.done=Math.abs(I)<=c,f.value=f.done?v:B};let w,R;const L=M=>{m(f.value)&&(w=M,R=gi({keyframes:[f.value,y(f.value)],velocity:Wa(S,M,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return L(0),{calculatedDuration:null,next:M=>{let I=!1;return!R&&w===void 0&&(I=!0,j(M),L(M)),w!==void 0&&M>=w?R.next(M-w):(!I&&j(M),f)}}}function fd(e,t,n){const i=[],s=n||ut.mix||Ua,o=e.length-1;for(let r=0;r<o;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||Ne:t;a=In(l,a)}i.push(a)}return i}function hd(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const o=e.length;if(ct(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=fd(t,i,s),l=a.length,c=u=>{if(r&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Rn(e[d],e[d+1],u);return a[d](f)};return n?u=>c(rt(e[0],e[o-1],u)):c}function pd(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=Rn(0,t,i);e.push(ie(n,1,s))}}function md(e){const t=[0];return pd(t,e.length-1),t}function gd(e,t){return e.map(n=>n*t)}function yd(e,t){return e.map(()=>t||Da).splice(0,e.length-1)}function Kt({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=ju(i)?i.map(Fr):Fr(i),o={done:!1,value:t[0]},r=gd(n&&n.length===t.length?n:md(t),e),a=hd(r,t,{ease:Array.isArray(s)?s:yd(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const vd=e=>e!==null;function Ks(e,{repeat:t,repeatType:n="loop"},i,s=1){const o=e.filter(vd),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const bd={decay:us,inertia:us,tween:Kt,keyframes:Kt,spring:gi};function Ga(e){typeof e.type=="string"&&(e.type=bd[e.type])}class Xs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const xd=e=>e/100;class Zs extends Xs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var i,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Ee.now()&&this.tick(Ee.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(i=this.options).onStop)==null||s.call(i))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ga(t);const{type:n=Kt,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Kt;process.env.NODE_ENV!=="production"&&l!==Kt&&ct(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Kt&&typeof a[0]!="number"&&(this.mixKeyframes=In(xd,Ua(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Ys(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:m,type:y,onUpdate:T,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>s;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,j=i;if(d){const M=Math.min(this.currentTime,s)/a;let I=Math.floor(M),B=M%1;!B&&M>=1&&(B=1),B===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(B=1-B,m&&(B-=m/a)):f==="mirror"&&(j=r)),S=rt(0,1,B)*a}const w=b?{done:!1,value:u[0]}:j.next(S);o&&(w.value=o(w.value));let{done:R}=w;!b&&l!==null&&(R=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return L&&y!==us&&(w.value=Ks(u,this.options,x,this.speed)),T&&T(w.value),L&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return Ie(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ie(t)}get time(){return Ie(this.currentTime)}set time(t){var n;t=Be(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ee.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ie(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=id,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),(o=(s=this.options).onPlay)==null||o.call(s);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ee.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function wd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Vt=e=>e*180/Math.PI,ds=e=>{const t=Vt(Math.atan2(e[1],e[0]));return fs(t)},Sd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ds,rotateZ:ds,skewX:e=>Vt(Math.atan(e[1])),skewY:e=>Vt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},fs=e=>(e=e%360,e<0&&(e+=360),e),Yr=ds,Kr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Td={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Kr,scaleY:Xr,scale:e=>(Kr(e)+Xr(e))/2,rotateX:e=>fs(Vt(Math.atan2(e[6],e[5]))),rotateY:e=>fs(Vt(Math.atan2(-e[2],e[0]))),rotateZ:Yr,rotate:Yr,skewX:e=>Vt(Math.atan(e[4])),skewY:e=>Vt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function hs(e){return e.includes("scale")?1:0}function ps(e,t){if(!e||e==="none")return hs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Td,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Sd,s=a}if(!s)return hs(t);const o=i[t],r=s[1].split(",").map(Cd);return typeof o=="function"?o(r):r[o]}const Ed=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ps(n,t)};function Cd(e){return parseFloat(e.trim())}const cn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],un=new Set(cn),Zr=e=>e===ln||e===N,Pd=new Set(["x","y","z"]),Ad=cn.filter(e=>!Pd.has(e));function kd(e){const t=[];return Ad.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const bt={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})=>ps(t,"x"),y:(e,{transform:t})=>ps(t,"y")};bt.translateX=bt.x;bt.translateY=bt.y;const Ot=new Set;let ms=!1,gs=!1,ys=!1;function qa(){if(gs){const e=Array.from(Ot).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=kd(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([o,r])=>{var a;(a=i.getValue(o))==null||a.set(r)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}gs=!1,ms=!1,Ot.forEach(e=>e.complete(ys)),Ot.clear()}function Ya(){Ot.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gs=!0)})}function jd(){ys=!0,Ya(),qa(),ys=!1}class Js{constructor(t,n,i,s,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ot.add(this),ms||(ms=!0,Z.read(Ya),Z.resolveKeyframes(qa))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&o===void 0&&s.set(t[0])}wd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ot.delete(this)}cancel(){this.state==="scheduled"&&(Ot.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Rd=e=>e.startsWith("--");function Md(e,t,n){Rd(t)?e.style.setProperty(t,n):e.style[t]=n}const Dd={};function Ka(e,t){const n=Sa(e);return()=>Dd[t]??n()}const Ld=Ka(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Xa=Ka(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),En=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Jr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:En([0,.65,.55,1]),circOut:En([.55,0,1,.45]),backIn:En([.31,.01,.66,-.59]),backOut:En([.33,1.53,.69,.99])};function Za(e,t){if(e)return typeof e=="function"?Xa()?Ha(e,t):"ease-out":La(e)?En(e):Array.isArray(e)?e.map(n=>Za(n,t)||Jr.easeOut):Jr[e]}function Vd(e,t,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Za(a,s);Array.isArray(d)&&(u.easing=d);const f={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function Ja(e){return typeof e=="function"&&"applyToOptions"in e}function Od({type:e,...t}){return Ja(e)&&Xa()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Qa extends Xs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,ct(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Od(t);this.animation=Vd(n,i,s,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Ks(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Md(n,i,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,i,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(i=this.animation).commitStyles)==null||s.call(i))}get duration(){var n,i;const t=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.call(n).duration)||0;return Ie(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ie(t)}get time(){return Ie(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Be(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ld()?(this.animation.timeline=t,Ne):n(this)}}const el={anticipate:ja,backInOut:ka,circInOut:Ma};function Id(e){return e in el}function Nd(e){typeof e.ease=="string"&&Id(e.ease)&&(e.ease=el[e.ease])}const zi=10;class Bd extends Qa{constructor(t){Nd(t),Ga(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Zs({...r,autoplay:!1}),l=Math.max(zi,Ee.now()-this.startTime),c=rt(0,zi,l-zi);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const Qr=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ge.test(e)||e==="0")&&!e.startsWith("url("));function _d(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 Fd(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=Qr(s,t),a=Qr(o,t);return an(r===a,`You are trying to animate ${t} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:_d(e)||(n==="spring"||Ja(n))&&i}function vs(e){e.duration=0,e.type="keyframes"}const $d=new Set(["opacity","clipPath","filter","transform"]),zd=Sa(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ud(e){var u;const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return zd()&&n&&$d.has(n)&&(n!=="transform"||!c)&&!l&&!i&&s!=="mirror"&&o!==0&&r!=="inertia"}const Hd=40;class Wd extends Xs{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var y;super(),this.stop=()=>{var T,x;this._animation&&(this._animation.stop(),(T=this.stopTimeline)==null||T.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Ee.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...d},m=(u==null?void 0:u.KeyframeResolver)||Js;this.keyframeResolver=new m(a,(T,x,v)=>this.onKeyframesResolved(T,x,f,!v),l,c,u),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,i,s){var x,v;this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=Ee.now(),Fd(t,o,r,a)||((ut.instantAnimations||!l)&&(u==null||u(Ks(t,i,n))),t[0]=t[t.length-1],vs(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Hd?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},m=!c&&Ud(f),y=(v=(x=f.motionValue)==null?void 0:x.owner)==null?void 0:v.current,T=m?new Bd({...f,element:y}):new Zs(f);T.finished.then(()=>{this.notifyFinished()}).catch(Ne),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),jd()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function tl(e,t,n,i=0,s=1){const o=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*i;return typeof n=="function"?n(o,r):s===1?o*i:a-o*i}const Gd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qd(e){const t=Gd.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const Yd=4;function nl(e,t,n=1){ct(n<=Yd,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=qd(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const r=o.trim();return ba(r)?parseFloat(r):r}return Hs(s)?nl(s,t,n+1):s}const Kd={type:"spring",stiffness:500,damping:25,restSpeed:10},Xd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Zd={type:"keyframes",duration:.8},Jd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qd=(e,{keyframes:t})=>t.length>2?Zd:un.has(e)?e.startsWith("scale")?Xd(t[1]):Kd:Jd,ef=e=>e!==null;function tf(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(ef),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}function il(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function Qs(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?il(n,e):n}function nf({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const er=(e,t,n,i={},s,o)=>r=>{const a=Qs(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-Be(l);const 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:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};nf(a)||Object.assign(u,Qd(e,u)),u.duration&&(u.duration=Be(u.duration)),u.repeatDelay&&(u.repeatDelay=Be(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(vs(u),u.delay===0&&(d=!0)),(ut.instantAnimations||ut.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,vs(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=tf(u.keyframes,a);if(f!==void 0){Z.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new Zs(u):new Wd(u)};function eo(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function tr(e,t,n,i){if(typeof t=="function"){const[s,o]=eo(i);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=eo(i);t=t(n!==void 0?n:e.custom,s,o)}return t}function en(e,t,n){const i=e.getProps();return tr(i,t,n!==void 0?n:i.custom,e)}const sl=new Set(["width","height","top","left","right","bottom",...cn]),to=30,sf=e=>!isNaN(parseFloat(e));class rf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var o;const s=Ee.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ee.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=sf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&$s(!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 Fs);const i=this.events[t].add(n);return t==="change"?()=>{i(),Z.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ee.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>to)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,to);return Ta(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function on(e,t){return new rf(e,t)}const bs=e=>Array.isArray(e);function of(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,on(n))}function af(e){return bs(e)?e[e.length-1]||0:e}function lf(e,t){const n=en(e,t);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const r in o){const a=af(o[r]);of(e,r,a)}}const Se=e=>!!(e&&e.getVelocity);function cf(e){return!!(Se(e)&&e.add)}function xs(e,t){const n=e.getValue("willChange");if(cf(n))return n.add(t);if(!n&&ut.WillChange){const i=new ut.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function nr(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const uf="framerAppearId",rl="data-"+nr(uf);function ol(e){return e.props[rl]}function df({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function al(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=t;const l=e.getDefaultTransition();o=o?il(o,l):l;const c=o==null?void 0:o.reduceMotion;i&&(o=i);const u=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const m=e.getValue(f,e.latestValues[f]??null),y=a[f];if(y===void 0||d&&df(d,f))continue;const T={delay:n,...Qs(o||{},f)},x=m.get();if(x!==void 0&&!m.isAnimating&&!Array.isArray(y)&&y===x&&!T.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const j=ol(e);if(j){const w=window.MotionHandoffAnimation(j,f,Z);w!==null&&(T.startTime=w,v=!0)}}xs(e,f);const b=c??e.shouldReduceMotion;m.start(er(f,m,y,b&&sl.has(f)?{type:!1}:T,e,v));const S=m.animation;S&&u.push(S)}if(r){const f=()=>Z.update(()=>{r&&lf(e,r)});u.length?Promise.all(u).then(f):f()}return u}function ws(e,t,n={}){var l;const i=en(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(al(e,i,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return ff(e,t,c,u,d,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function ff(e,t,n=0,i=0,s=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(ws(l,t,{...r,delay:n+(typeof i=="function"?0:i)+tl(e.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function hf(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(o=>ws(e,o,n));i=Promise.all(s)}else if(typeof t=="string")i=ws(e,t,n);else{const s=typeof t=="function"?en(e,t,n.custom):t;i=Promise.all(al(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const pf={test:e=>e==="auto",parse:e=>e},ll=e=>t=>t.test(e),cl=[ln,N,st,gt,$u,Fu,pf],no=e=>cl.find(ll(e));function mf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wa(e):!0}const gf=new Set(["brightness","contrast","saturate","opacity"]);function yf(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Ws)||[];if(!i)return e;const s=n.replace(i,"");let o=gf.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+s+")"}const vf=/\b([a-z-]*)\(.*?\)/gu,Ss={...Ge,getAnimatableNone:e=>{const t=e.match(vf);return t?t.map(yf).join(" "):e}},Ts={...Ge,getAnimatableNone:e=>{const t=Ge.parse(e);return Ge.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},io={...ln,transform:Math.round},bf={rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:Jn,scaleX:Jn,scaleY:Jn,scaleZ:Jn,skew:gt,skewX:gt,skewY:gt,distance:N,translateX:N,translateY:N,translateZ:N,x:N,y:N,z:N,perspective:N,transformPerspective:N,opacity:Mn,originX:zr,originY:zr,originZ:N},ir={borderWidth:N,borderTopWidth:N,borderRightWidth:N,borderBottomWidth:N,borderLeftWidth:N,borderRadius:N,borderTopLeftRadius:N,borderTopRightRadius:N,borderBottomRightRadius:N,borderBottomLeftRadius:N,width:N,maxWidth:N,height:N,maxHeight:N,top:N,right:N,bottom:N,left:N,inset:N,insetBlock:N,insetBlockStart:N,insetBlockEnd:N,insetInline:N,insetInlineStart:N,insetInlineEnd:N,padding:N,paddingTop:N,paddingRight:N,paddingBottom:N,paddingLeft:N,paddingBlock:N,paddingBlockStart:N,paddingBlockEnd:N,paddingInline:N,paddingInlineStart:N,paddingInlineEnd:N,margin:N,marginTop:N,marginRight:N,marginBottom:N,marginLeft:N,marginBlock:N,marginBlockStart:N,marginBlockEnd:N,marginInline:N,marginInlineStart:N,marginInlineEnd:N,fontSize:N,backgroundPositionX:N,backgroundPositionY:N,...bf,zIndex:io,fillOpacity:Mn,strokeOpacity:Mn,numOctaves:io},xf={...ir,color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:Ss,WebkitFilter:Ss,mask:Ts,WebkitMask:Ts},ul=e=>xf[e],wf=new Set([Ss,Ts]);function dl(e,t){let n=ul(e);return wf.has(n)||(n=Ge),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Sf=new Set(["auto","none","0"]);function Tf(e,t,n){let i=0,s;for(;i<e.length&&!s;){const o=e[i];typeof o=="string"&&!Sf.has(o)&&Dn(o).values.length&&(s=e[i]),i++}if(s&&n)for(const o of t)e[o]=dl(n,s)}class Ef extends Js{constructor(t,n,i,s,o){super(t,n,i,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Hs(d))){const f=nl(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!sl.has(i)||t.length!==2)return;const[s,o]=t,r=no(s),a=no(o),l=$r(s),c=$r(o);if(l!==c&&bt[i]){this.needsMeasurement=!0;return}if(r!==a)if(Zr(r)&&Zr(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else bt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||mf(t[s]))&&i.push(s);i.length&&Tf(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=bt[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=bt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Cf=new Set(["opacity","clipPath","filter","transform"]);function fl(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const hl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Pf(e){return xa(e)&&"offsetHeight"in e}const{schedule:sr,cancel:p0}=Va(queueMicrotask,!1),Ue={x:!1,y:!1};function pl(){return Ue.x||Ue.y}function Af(e){return e==="x"||e==="y"?Ue[e]?null:(Ue[e]=!0,()=>{Ue[e]=!1}):Ue.x||Ue.y?null:(Ue.x=Ue.y=!0,()=>{Ue.x=Ue.y=!1})}function ml(e,t){const n=fl(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function kf(e){return!(e.pointerType==="touch"||pl())}function jf(e,t,n={}){const[i,s,o]=ml(e,n);return i.forEach(r=>{let a=!1,l=!1,c;const u=()=>{r.removeEventListener("pointerleave",y)},d=x=>{c&&(c(x),c=void 0),u()},f=x=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(x))},m=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},y=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},T=x=>{if(!kf(x))return;l=!1;const v=t(r,x);typeof v=="function"&&(c=v,r.addEventListener("pointerleave",y,s))};r.addEventListener("pointerenter",T,s),r.addEventListener("pointerdown",m,s)}),o}const gl=(e,t)=>t?e===t?!0:gl(e,t.parentElement):!1,rr=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Rf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Mf(e){return Rf.has(e.tagName)||e.isContentEditable===!0}const Df=new Set(["INPUT","SELECT","TEXTAREA"]);function Lf(e){return Df.has(e.tagName)||e.isContentEditable===!0}const si=new WeakSet;function so(e){return t=>{t.key==="Enter"&&e(t)}}function Ui(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Vf=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=so(()=>{if(si.has(n))return;Ui(n,"down");const s=so(()=>{Ui(n,"up")}),o=()=>Ui(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function ro(e){return rr(e)&&!pl()}const oo=new WeakSet;function Of(e,t,n={}){const[i,s,o]=ml(e,n),r=a=>{const l=a.currentTarget;if(!ro(a)||oo.has(a))return;si.add(l),n.stopPropagation&&oo.add(a);const c=t(l,a),u=(m,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),si.has(l)&&si.delete(l),ro(m)&&typeof c=="function"&&c(m,{success:y})},d=m=>{u(m,l===window||l===document||n.useGlobalTarget||gl(l,m.target))},f=m=>{u(m,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),Pf(a)&&(a.addEventListener("focus",c=>Vf(c,s)),!Mf(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function or(e){return xa(e)&&"ownerSVGElement"in e}const ri=new WeakMap;let yt;const yl=(e,t,n)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:or(i)&&"getBBox"in i?i.getBBox()[t]:i[n],If=yl("inline","width","offsetWidth"),Nf=yl("block","height","offsetHeight");function Bf({target:e,borderBoxSize:t}){var n;(n=ri.get(e))==null||n.forEach(i=>{i(e,{get width(){return If(e,t)},get height(){return Nf(e,t)}})})}function _f(e){e.forEach(Bf)}function Ff(){typeof ResizeObserver>"u"||(yt=new ResizeObserver(_f))}function $f(e,t){yt||Ff();const n=fl(e);return n.forEach(i=>{let s=ri.get(i);s||(s=new Set,ri.set(i,s)),s.add(t),yt==null||yt.observe(i)}),()=>{n.forEach(i=>{const s=ri.get(i);s==null||s.delete(t),s!=null&&s.size||yt==null||yt.unobserve(i)})}}const oi=new Set;let Xt;function zf(){Xt=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};oi.forEach(t=>t(e))},window.addEventListener("resize",Xt)}function Uf(e){return oi.add(e),Xt||zf(),()=>{oi.delete(e),!oi.size&&typeof Xt=="function"&&(window.removeEventListener("resize",Xt),Xt=void 0)}}function ao(e,t){return typeof e=="function"?Uf(e):$f(e,t)}function Hf(e){return or(e)&&e.tagName==="svg"}const Wf=[...cl,fe,Ge],Gf=e=>Wf.find(ll(e)),lo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Zt=()=>({x:lo(),y:lo()}),co=()=>({min:0,max:0}),ge=()=>({x:co(),y:co()}),qf=new WeakMap;function Ci(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ln(e){return typeof e=="string"||Array.isArray(e)}const ar=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lr=["initial",...ar];function Pi(e){return Ci(e.animate)||lr.some(t=>Ln(e[t]))}function vl(e){return!!(Pi(e)||e.variants)}function Yf(e,t,n){for(const i in t){const s=t[i],o=n[i];if(Se(s))e.addValue(i,s);else if(Se(o))e.addValue(i,on(s,{owner:e}));else if(o!==s)if(e.hasValue(i)){const r=e.getValue(i);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(i);e.addValue(i,on(r!==void 0?r:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Es={current:null},bl={current:!1},Kf=typeof window<"u";function Xf(){if(bl.current=!0,!!Kf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Es.current=e.matches;e.addEventListener("change",t),t()}else Es.current=!1}const uo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yi={};function xl(e){yi=e}function Zf(){return yi}class Jf{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:r,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Js,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Ee.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Z.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!r,this.isControllingVariants=Pi(n),this.isVariantNode=vl(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const y=f[m];c[m]!==void 0&&Se(y)&&y.set(c[m])}}mount(t){var n,i;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,qf.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((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(bl.current||Xf(),this.shouldReduceMotion=Es.current),process.env.NODE_ENV!=="production"&&$s(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),wt(this.notifyUpdate),wt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const i=this.features[n];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Cf.has(t)&&this.current instanceof HTMLElement){const{factory:r,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new Qa({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:Be(u)}),f=r(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const i=un.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&Z.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in yi){const n=yi[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(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):ge()}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 i=0;i<uo.length;i++){const s=uo[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,r=t[o];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=Yf(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&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 i=this.values.get(t);return i===void 0&&n!==void 0&&(i=on(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(ba(i)||wa(i))?i=parseFloat(i):!Gf(i)&&Ge.test(n)&&(i=dl(t,n)),this.setBaseTarget(t,Se(i)?i.get():i)),Se(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const r=tr(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);r&&(i=r[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Se(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fs),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){sr.render(this.render)}}class wl extends Jf{constructor(){super(...arguments),this.KeyframeResolver=Ef}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Se(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Et{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Sl({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Qf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function eh(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Hi(e){return e===void 0||e===1}function Cs({scale:e,scaleX:t,scaleY:n}){return!Hi(e)||!Hi(t)||!Hi(n)}function Rt(e){return Cs(e)||Tl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Tl(e){return fo(e.x)||fo(e.y)}function fo(e){return e&&e!=="0%"}function vi(e,t,n){const i=e-n,s=t*i;return n+s}function ho(e,t,n,i,s){return s!==void 0&&(e=vi(e,s,i)),vi(e,n,i)+t}function Ps(e,t=0,n=1,i,s){e.min=ho(e.min,t,n,i,s),e.max=ho(e.max,t,n,i,s)}function El(e,{x:t,y:n}){Ps(e.x,t.translate,t.scale,t.originPoint),Ps(e.y,n.translate,n.scale,n.originPoint)}const po=.999999999999,mo=1.0000000000001;function th(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,r;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Qt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,El(e,r)),i&&Rt(o.latestValues)&&Qt(e,o.latestValues))}t.x<mo&&t.x>po&&(t.x=1),t.y<mo&&t.y>po&&(t.y=1)}function Jt(e,t){e.min=e.min+t,e.max=e.max+t}function go(e,t,n,i,s=.5){const o=ie(e.min,e.max,s);Ps(e,t,n,o,i)}function Qt(e,t){go(e.x,t.x,t.scaleX,t.scale,t.originX),go(e.y,t.y,t.scaleY,t.scale,t.originY)}function Cl(e,t){return Sl(eh(e.getBoundingClientRect(),t))}function nh(e,t,n){const i=Cl(e,n),{scroll:s}=t;return s&&(Jt(i.x,s.offset.x),Jt(i.y,s.offset.y)),i}const ih={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sh=cn.length;function rh(e,t,n){let i="",s=!0;for(let o=0;o<sh;o++){const r=cn[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(r.startsWith("scale")?1:0);else{const c=parseFloat(a);l=r.startsWith("scale")?c===1:c===0}if(!l||n){const c=hl(a,ir[r]);if(!l){s=!1;const u=ih[r]||r;i+=`${u}(${c}) `}n&&(t[r]=c)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function cr(e,t,n){const{style:i,vars:s,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(un.has(l)){r=!0;continue}else if(Ia(l)){s[l]=c;continue}else{const u=hl(c,ir[l]);l.startsWith("origin")?(a=!0,o[l]=u):i[l]=u}}if(t.transform||(r||n?i.transform=rh(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;i.transformOrigin=`${l} ${c} ${u}`}}function Pl(e,{style:t,vars:n},i,s){const o=e.style;let r;for(r in t)o[r]=t[r];s==null||s.applyProjectionStyles(o,i);for(r in n)o.setProperty(r,n[r])}function yo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(N.test(e))e=parseFloat(e);else return e;const n=yo(e,t.target.x),i=yo(e,t.target.y);return`${n}% ${i}%`}},oh={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Ge.parse(e);if(s.length>5)return i;const o=Ge.createTransformer(e),r=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+r]/=a,s[1+r]/=l;const c=ie(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),o(s)}},As={borderRadius:{...xn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xn,borderTopRightRadius:xn,borderBottomLeftRadius:xn,borderBottomRightRadius:xn,boxShadow:oh};function Al(e,{layout:t,layoutId:n}){return un.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!As[e]||e==="opacity")}function ur(e,t,n){var r;const i=e.style,s=t==null?void 0:t.style,o={};if(!i)return o;for(const a in i)(Se(i[a])||s&&Se(s[a])||Al(a,e)||((r=n==null?void 0:n.getValue(a))==null?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return o}function ah(e){return window.getComputedStyle(e)}class lh extends wl{constructor(){super(...arguments),this.type="html",this.renderInstance=Pl}readValueFromInstance(t,n){var i;if(un.has(n))return(i=this.projection)!=null&&i.isProjecting?hs(n):Ed(t,n);{const s=ah(t),o=(Ia(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Cl(t,n)}build(t,n,i){cr(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return ur(t,n,i)}}const ch={offset:"stroke-dashoffset",array:"stroke-dasharray"},uh={offset:"strokeDashoffset",array:"strokeDasharray"};function dh(e,t,n=1,i=0,s=!0){e.pathLength=1;const o=s?ch:uh;e[o.offset]=`${-i}`,e[o.array]=`${t} ${n}`}const fh=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function kl(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(cr(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const m of fh)d[m]!==void 0&&(f[m]=d[m],delete d[m]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),i!==void 0&&(d.scale=i),s!==void 0&&dh(d,s,o,r,!1)}const jl=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"]),Rl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function hh(e,t,n,i){Pl(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(jl.has(s)?s:nr(s),t.attrs[s])}function Ml(e,t,n){const i=ur(e,t,n);for(const s in e)if(Se(e[s])||Se(t[s])){const o=cn.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[o]=e[s]}return i}class ph extends wl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ge}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(un.has(n)){const i=ul(n);return i&&i.default||0}return n=jl.has(n)?n:nr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return Ml(t,n,i)}build(t,n,i){kl(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){hh(t,n,i,s)}mount(t){this.isSVGTag=Rl(t.tagName),super.mount(t)}}const mh=lr.length;function Dl(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Dl(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<mh;n++){const i=lr[n],s=e.props[i];(Ln(s)||s===!1)&&(t[i]=s)}return t}function Ll(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const gh=[...ar].reverse(),yh=ar.length;function vh(e){return t=>Promise.all(t.map(({animation:n,options:i})=>hf(e,n,i)))}function bh(e){let t=vh(e),n=vo(),i=!0;const s=l=>(c,u)=>{var f;const d=en(e,u,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:m,transitionEnd:y,...T}=d;c={...c,...T,...y}}return c};function o(l){t=l(e)}function r(l){const{props:c}=e,u=Dl(e.parent)||{},d=[],f=new Set;let m={},y=1/0;for(let x=0;x<yh;x++){const v=gh[x],b=n[v],S=c[v]!==void 0?c[v]:u[v],j=Ln(S),w=v===l?b.isActive:null;w===!1&&(y=x);let R=S===u[v]&&S!==c[v]&&j;if(R&&i&&e.manuallyAnimateOnMount&&(R=!1),b.protectedKeys={...m},!b.isActive&&w===null||!S&&!b.prevProp||Ci(S)||typeof S=="boolean")continue;if(v==="exit"&&b.isActive&&w!==!0){b.prevResolvedValues&&(m={...m,...b.prevResolvedValues});continue}const L=xh(b.prevProp,S);let M=L||v===l&&b.isActive&&!R&&j||x>y&&j,I=!1;const B=Array.isArray(S)?S:[S];let J=B.reduce(s(v),{});w===!1&&(J={});const{prevResolvedValues:ye={}}=b,ve={...ye,...J},Q=q=>{M=!0,f.has(q)&&(I=!0,f.delete(q)),b.needsAnimating[q]=!0;const G=e.getValue(q);G&&(G.liveStyle=!1)};for(const q in ve){const G=J[q],re=ye[q];if(m.hasOwnProperty(q))continue;let te=!1;bs(G)&&bs(re)?te=!Ll(G,re):te=G!==re,te?G!=null?Q(q):f.add(q):G!==void 0&&f.has(q)?Q(q):b.protectedKeys[q]=!0}b.prevProp=S,b.prevResolvedValues=J,b.isActive&&(m={...m,...J}),i&&e.blockInitialAnimation&&(M=!1);const z=R&&L;M&&(!z||I)&&d.push(...B.map(q=>{const G={type:v};if(typeof q=="string"&&i&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:re}=e,te=en(re,q);if(re.enteringChildren&&te){const{delayChildren:pe}=te.transition||{};G.delay=tl(re.enteringChildren,e,pe)}}return{animation:q,options:G}}))}if(f.size){const x={};if(typeof c.initial!="boolean"){const v=en(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(x.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),S=e.getValue(v);S&&(S.liveStyle=!0),x[v]=b??null}),d.push({animation:x})}let T=!!d.length;return i&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(T=!1),i=!1,T?t(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(l,c)}),n[l].isActive=c;const u=r(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=vo()}}}function xh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ll(t,e):!1}function kt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vo(){return{animate:kt(!0),whileInView:kt(),whileHover:kt(),whileTap:kt(),whileDrag:kt(),whileFocus:kt(),exit:kt()}}function bo(e,t){e.min=t.min,e.max=t.max}function ze(e,t){bo(e.x,t.x),bo(e.y,t.y)}function xo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Vl=1e-4,wh=1-Vl,Sh=1+Vl,Ol=.01,Th=0-Ol,Eh=0+Ol;function Ce(e){return e.max-e.min}function Ch(e,t,n){return Math.abs(e-t)<=n}function wo(e,t,n,i=.5){e.origin=i,e.originPoint=ie(t.min,t.max,e.origin),e.scale=Ce(n)/Ce(t),e.translate=ie(n.min,n.max,e.origin)-e.originPoint,(e.scale>=wh&&e.scale<=Sh||isNaN(e.scale))&&(e.scale=1),(e.translate>=Th&&e.translate<=Eh||isNaN(e.translate))&&(e.translate=0)}function An(e,t,n,i){wo(e.x,t.x,n.x,i?i.originX:void 0),wo(e.y,t.y,n.y,i?i.originY:void 0)}function So(e,t,n){e.min=n.min+t.min,e.max=e.min+Ce(t)}function Ph(e,t,n){So(e.x,t.x,n.x),So(e.y,t.y,n.y)}function To(e,t,n){e.min=t.min-n.min,e.max=e.min+Ce(t)}function bi(e,t,n){To(e.x,t.x,n.x),To(e.y,t.y,n.y)}function Eo(e,t,n,i,s){return e-=t,e=vi(e,1/n,i),s!==void 0&&(e=vi(e,1/s,i)),e}function Ah(e,t=0,n=1,i=.5,s,o=e,r=e){if(st.test(t)&&(t=parseFloat(t),t=ie(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=ie(o.min,o.max,i);e===o&&(a-=t),e.min=Eo(e.min,t,n,a,s),e.max=Eo(e.max,t,n,a,s)}function Co(e,t,[n,i,s],o,r){Ah(e,t[n],t[i],t[s],t.scale,o,r)}const kh=["x","scaleX","originX"],jh=["y","scaleY","originY"];function Po(e,t,n,i){Co(e.x,t,kh,n?n.x:void 0,i?i.x:void 0),Co(e.y,t,jh,n?n.y:void 0,i?i.y:void 0)}function Ao(e){return e.translate===0&&e.scale===1}function Il(e){return Ao(e.x)&&Ao(e.y)}function ko(e,t){return e.min===t.min&&e.max===t.max}function Rh(e,t){return ko(e.x,t.x)&&ko(e.y,t.y)}function jo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Nl(e,t){return jo(e.x,t.x)&&jo(e.y,t.y)}function Ro(e){return Ce(e.x)/Ce(e.y)}function Mo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function nt(e){return[e("x"),e("y")]}function Mh(e,t,n){let i="";const s=e.x.translate/t.x,o=e.y.translate/t.y,r=(n==null?void 0:n.z)||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:m,skewY:y}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),m&&(i+=`skewX(${m}deg) `),y&&(i+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const Bl=["TopLeft","TopRight","BottomLeft","BottomRight"],Dh=Bl.length,Do=e=>typeof e=="string"?parseFloat(e):e,Lo=e=>typeof e=="number"||N.test(e);function Lh(e,t,n,i,s,o){s?(e.opacity=ie(0,n.opacity??1,Vh(i)),e.opacityExit=ie(t.opacity??1,0,Oh(i))):o&&(e.opacity=ie(t.opacity??1,n.opacity??1,i));for(let r=0;r<Dh;r++){const a=`border${Bl[r]}Radius`;let l=Vo(t,a),c=Vo(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Lo(l)===Lo(c)?(e[a]=Math.max(ie(Do(l),Do(c),i),0),(st.test(c)||st.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ie(t.rotate||0,n.rotate||0,i))}function Vo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Vh=_l(0,.5,Ra),Oh=_l(.5,.95,Ne);function _l(e,t,n){return i=>i<e?0:i>t?1:n(Rn(e,t,i))}function Ih(e,t,n){const i=Se(e)?e:on(e);return i.start(er("",i,t,n)),i.animation}function Vn(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const Nh=(e,t)=>e.depth-t.depth;class Bh{constructor(){this.children=[],this.isDirty=!1}add(t){_s(this.children,t),this.isDirty=!0}remove(t){hi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Nh),this.isDirty=!1,this.children.forEach(t)}}function _h(e,t){const n=Ee.now(),i=({timestamp:s})=>{const o=s-n;o>=t&&(wt(i),e(o-t))};return Z.setup(i,!0),()=>wt(i)}function ai(e){return Se(e)?e.get():e}class Fh{constructor(){this.members=[]}add(t){_s(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&s.isConnected===!1&&i.isPresent!==!1&&!i.snapshot&&hi(this.members,i)}t.scheduleRender()}remove(t){if(hi(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 i;for(let s=n;s>=0;s--){const o=this.members[s],r=o.instance;if(o.isPresent!==!1&&(!r||r.isConnected!==!1)){i=o;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender();const s=i.options.layoutDependency,o=t.options.layoutDependency;if(!(s!==void 0&&o!==void 0&&s===o)){const l=i.instance;l&&l.isConnected===!1&&!i.snapshot||(t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const li={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Wi=["","X","Y","Z"],$h=1e3;let zh=0;function Gi(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Fl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ol(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Z,!(s||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Fl(i)}function $l({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(r={},a=t==null?void 0:t()){this.id=zh++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,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(Wh),this.nodes.forEach(Kh),this.nodes.forEach(Xh),this.nodes.forEach(Gh)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,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 Bh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Fs),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=or(r)&&!Hf(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;Z.read(()=>{d=window.innerWidth}),e(r,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,u&&u(),u=_h(f,250),li.hasAnimatedSinceResize&&(li.hasAnimatedSinceResize=!1,this.nodes.forEach(No)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||tp,{onLayoutAnimationStart:T,onLayoutAnimationComplete:x}=c.getProps(),v=!this.targetLayout||!Nl(this.targetLayout,m),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Qs(y,"layout"),onPlay:T,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(u,b)}else d||No(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),wt(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(Zh),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fl(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(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Oo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Io);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Yh),this.nodes.forEach(Uh),this.nodes.forEach(Hh)):this.nodes.forEach(Io),this.clearAllSnapshots();const a=Ee.now();xe.delta=rt(0,1e3/60,a-xe.timestamp),xe.timestamp=a,xe.isProcessing=!0,Bi.update.process(xe),Bi.preRender.process(xe),Bi.render.process(xe),xe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qh),this.sharedNodes.forEach(Jh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Z.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Z.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ce(this.snapshot.measuredBox.x)&&!Ce(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 r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=ge(),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,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Il(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||Rt(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),np(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:r}=this.options;if(!r)return ge();const a=r.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(ip))){const{scroll:u}=this.root;u&&(Jt(a.x,u.offset.x),Jt(a.y,u.offset.y))}return a}removeElementScroll(r){var l;const a=ge();if(ze(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;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&&ze(a,r),Jt(a.x,d.offset.x),Jt(a.y,d.offset.y))}return a}applyTransform(r,a=!1){const l=ge();ze(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Qt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Rt(u.latestValues)&&Qt(l,u.latestValues)}return Rt(this.latestValues)&&Qt(l,this.latestValues),l}removeTransform(r){const a=ge();ze(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Rt(c.latestValues))continue;Cs(c.latestValues)&&c.updateSnapshot();const u=ge(),d=c.measurePageBox();ze(u,d),Po(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Rt(this.latestValues)&&Po(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==xe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=xe.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ge(),this.targetWithTransforms=ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ph(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ze(this.target,this.layout.layoutBox),El(this.target,this.targetDelta)):ze(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Cs(this.parent.latestValues)||Tl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ge(),this.relativeTargetOrigin=ge(),bi(this.relativeTargetOrigin,a,l),ze(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var y;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===xe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;ze(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;th(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=ge());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xo(this.prevProjectionDelta.x,this.projectionDelta.x),xo(this.prevProjectionDelta.y,this.projectionDelta.y)),An(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Mo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Zt(),this.projectionDelta=Zt(),this.projectionDeltaWithTransform=Zt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Zt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=ge(),m=l?l.source:void 0,y=this.layout?this.layout.source:void 0,T=m!==y,x=this.getStack(),v=!x||x.members.length<=1,b=!!(T&&!v&&this.options.crossfade===!0&&!this.path.some(ep));this.animationProgress=0;let S;this.mixTargetDelta=j=>{const w=j/1e3;Bo(d.x,r.x,w),Bo(d.y,r.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Qh(this.relativeTarget,this.relativeTargetOrigin,f,w),S&&Rh(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=ge()),ze(S,this.relativeTarget)),T&&(this.animationValues=u,Lh(u,c,this.latestValues,w,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(wt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Z.update(()=>{li.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=on(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ih(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($h),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&zl(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ge();const d=Ce(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=Ce(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}ze(a,l),Qt(a,u),An(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Fh),this.sharedNodes.get(r).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 r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Gi("z",r,c,this.animationValues);for(let u=0;u<Wi.length;u++)Gi(`rotate${Wi[u]}`,r,c,this.animationValues),Gi(`skew${Wi[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=ai(a==null?void 0:a.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=ai(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Rt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=Mh(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:m}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const y in As){if(u[y]===void 0)continue;const{correct:T,applyTo:x,isCSSVariable:v}=As[y],b=d==="none"?u[y]:T(u[y],c);if(x){const S=x.length;for(let j=0;j<S;j++)r[x[j]]=b}else v?this.options.visualElement.renderState.vars[y]=b:r[y]=b}this.options.layoutId&&(r.pointerEvents=c===this?ai(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Oo),this.root.sharedNodes.clear()}}}function Uh(e){e.updateLayout()}function Hh(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=e.layout,{animationType:o}=e.options,r=t.source!==e.layout.source;o==="size"?nt(d=>{const f=r?t.measuredBox[d]:t.layoutBox[d],m=Ce(f);f.min=i[d].min,f.max=f.min+m}):zl(o,t.layoutBox,i)&&nt(d=>{const f=r?t.measuredBox[d]:t.layoutBox[d],m=Ce(i[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=Zt();An(a,i,t.layoutBox);const l=Zt();r?An(l,e.applyTransform(s,!0),t.measuredBox):An(l,i,t.layoutBox);const c=!Il(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const y=ge();bi(y,t.layoutBox,f.layoutBox);const T=ge();bi(T,i,m.layoutBox),Nl(y,T)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=T,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function Wh(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 Gh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qh(e){e.clearSnapshot()}function Oo(e){e.clearMeasurements()}function Io(e){e.isLayoutDirty=!1}function Yh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function No(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Kh(e){e.resolveTargetDelta()}function Xh(e){e.calcProjection()}function Zh(e){e.resetSkewAndRotation()}function Jh(e){e.removeLeadSnapshot()}function Bo(e,t,n){e.translate=ie(t.translate,0,n),e.scale=ie(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _o(e,t,n,i){e.min=ie(t.min,n.min,i),e.max=ie(t.max,n.max,i)}function Qh(e,t,n,i){_o(e.x,t.x,n.x,i),_o(e.y,t.y,n.y,i)}function ep(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const tp={duration:.45,ease:[.4,0,.1,1]},Fo=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$o=Fo("applewebkit/")&&!Fo("chrome/")?Math.round:Ne;function zo(e){e.min=$o(e.min),e.max=$o(e.max)}function np(e){zo(e.x),zo(e.y)}function zl(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ch(Ro(t),Ro(n),.2)}function ip(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const sp=$l({attachResizeListener:(e,t)=>Vn(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),qi={current:void 0},Ul=$l({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qi.current){const e=new sp({});e.mount(window),e.setOptions({layoutScroll:!0}),qi.current=e}return qi.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Hl=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function rp(e=!0){const t=p.useContext(Bs);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=p.useId();p.useEffect(()=>{if(e)return s(o)},[e]);const r=p.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,r]:[!0]}const Wl=p.createContext({strict:!1}),Uo={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"]};let Ho=!1;function op(){if(Ho)return;const e={};for(const t in Uo)e[t]={isEnabled:n=>Uo[t].some(i=>!!n[i])};xl(e),Ho=!0}function Gl(){return op(),Zf()}function ap(e){const t=Gl();for(const n in e)t[n]={...t[n],...e[n]};xl(t)}const lp=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","propagate","ignoreStrict","viewport"]);function xi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lp.has(e)}let ql=e=>!xi(e);function cp(e){typeof e=="function"&&(ql=t=>t.startsWith("on")?!xi(t):e(t))}try{cp(require("@emotion/is-prop-valid").default)}catch{}function up(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(ql(s)||n===!0&&xi(s)||!t&&!xi(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Ai=p.createContext({});function dp(e,t){if(Pi(e)){const{initial:n,animate:i}=e;return{initial:n===!1||Ln(n)?n:void 0,animate:Ln(i)?i:void 0}}return e.inherit!==!1?t:{}}function fp(e){const{initial:t,animate:n}=dp(e,p.useContext(Ai));return p.useMemo(()=>({initial:t,animate:n}),[Wo(t),Wo(n)])}function Wo(e){return Array.isArray(e)?e.join(" "):e}const dr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Yl(e,t,n){for(const i in t)!Se(t[i])&&!Al(i,n)&&(e[i]=t[i])}function hp({transformTemplate:e},t){return p.useMemo(()=>{const n=dr();return cr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function pp(e,t){const n=e.style||{},i={};return Yl(i,n,e),Object.assign(i,hp(e,t)),i}function mp(e,t){const n={},i=pp(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const Kl=()=>({...dr(),attrs:{}});function gp(e,t,n,i){const s=p.useMemo(()=>{const o=Kl();return kl(o,t,Rl(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Yl(o,e.style,e),s.style={...o,...s.style}}return s}const yp=["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 fr(e){return typeof e!="string"||e.includes("-")?!1:!!(yp.indexOf(e)>-1||/[A-Z]/u.test(e))}function vp(e,t,n,{latestValues:i},s,o=!1,r){const l=(r??fr(e)?gp:mp)(t,i,s,e),c=up(t,typeof e=="string",o),u=e!==p.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=p.useMemo(()=>Se(d)?d.get():d,[d]);return p.createElement(e,{...u,children:f})}function bp({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:xp(n,i,s,e),renderState:t()}}function xp(e,t,n,i){const s={},o=i(e,{});for(const f in o)s[f]=ai(o[f]);let{initial:r,animate:a}=e;const l=Pi(e),c=vl(e);t&&c&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!Ci(d)){const f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){const y=tr(e,f[m]);if(y){const{transitionEnd:T,transition:x,...v}=y;for(const b in v){let S=v[b];if(Array.isArray(S)){const j=u?S.length-1:0;S=S[j]}S!==null&&(s[b]=S)}for(const b in T)s[b]=T[b]}}}return s}const Xl=e=>(t,n)=>{const i=p.useContext(Ai),s=p.useContext(Bs),o=()=>bp(e,t,i,s);return n?o():wu(o)},wp=Xl({scrapeMotionValuesFromProps:ur,createRenderState:dr}),Sp=Xl({scrapeMotionValuesFromProps:Ml,createRenderState:Kl}),Tp=Symbol.for("motionComponentSymbol");function Ep(e,t,n){const i=p.useRef(n);p.useInsertionEffect(()=>{i.current=n});const s=p.useRef(null);return p.useCallback(o=>{var a;o&&((a=e.onMount)==null||a.call(e,o)),t&&(o?t.mount(o):t.unmount());const r=i.current;if(typeof r=="function")if(o){const l=r(o);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):r(o);else r&&(r.current=o)},[t])}const Zl=p.createContext({});function qt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Cp(e,t,n,i,s,o){var S,j;const{visualElement:r}=p.useContext(Ai),a=p.useContext(Wl),l=p.useContext(Bs),c=p.useContext(Hl),u=c.reducedMotion,d=c.skipAnimations,f=p.useRef(null),m=p.useRef(!1);i=i||a.renderer,!f.current&&i&&(f.current=i(e,{visualState:t,parent:r,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:o}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const y=f.current,T=p.useContext(Zl);y&&!y.projection&&s&&(y.type==="html"||y.type==="svg")&&Pp(f.current,n,s,T);const x=p.useRef(!1);p.useInsertionEffect(()=>{y&&x.current&&y.update(n,l)});const v=n[rl],b=p.useRef(!!v&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,v))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,v)));return Su(()=>{m.current=!0,y&&(x.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),b.current&&y.animationState&&y.animationState.animateChanges())}),p.useEffect(()=>{y&&(!b.current&&y.animationState&&y.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,v)}),b.current=!1),y.enteringChildren=void 0)}),y}function Pp(e,t,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Jl(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!r||a&&qt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}function Jl(e){if(e)return e.options.allowProjection!==!1?e.projection:Jl(e.parent)}function Yi(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&&ap(i);const o=n?n==="svg":fr(e),r=o?Sp:wp;function a(c,u){let d;const f={...p.useContext(Hl),...c,layoutId:Ap(c)},{isStatic:m}=f,y=fp(c),T=r(c,m);if(!m&&va){kp(f,i);const x=jp(f);d=x.MeasureLayout,y.visualElement=Cp(e,T,f,s,x.ProjectionNode,o)}return h.jsxs(Ai.Provider,{value:y,children:[d&&y.visualElement?h.jsx(d,{visualElement:y.visualElement,...f}):null,vp(e,c,Ep(T,y.visualElement,u),T,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=p.forwardRef(a);return l[Tp]=e,l}function Ap({layoutId:e}){const t=p.useContext(ya).id;return t&&e!==void 0?t+"-"+e:e}function kp(e,t){const n=p.useContext(Wl).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?an(!1,i,"lazy-strict-mode"):ct(!1,i,"lazy-strict-mode")}}function jp(e){const t=Gl(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(e)||i!=null&&i.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Rp(e,t){if(typeof Proxy>"u")return Yi;const n=new Map,i=(o,r)=>Yi(o,r,e,t),s=(o,r)=>(process.env.NODE_ENV!=="production"&&$s(!1,"motion() is deprecated. Use motion.create() instead."),i(o,r));return new Proxy(s,{get:(o,r)=>r==="create"?i:(n.has(r)||n.set(r,Yi(r,void 0,e,t)),n.get(r))})}const Mp=(e,t)=>t.isSVG??fr(e)?new ph(t):new lh(t,{allowProjection:e!==p.Fragment});class Dp extends Et{constructor(t){super(t),t.animationState||(t.animationState=bh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ci(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.call(this)}}let Lp=0;class Vp extends Et{constructor(){super(...arguments),this.id=Lp++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)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 Op={animation:{Feature:Dp},exit:{Feature:Vp}};function _n(e){return{point:{x:e.pageX,y:e.pageY}}}const Ip=e=>t=>rr(t)&&e(t,_n(t));function kn(e,t,n,i){return Vn(e,t,Ip(n),i)}const Ql=({current:e})=>e?e.ownerDocument.defaultView:null,Go=(e,t)=>Math.abs(e-t);function Np(e,t){const n=Go(e.x,t.x),i=Go(e.y,t.y);return Math.sqrt(n**2+i**2)}const qo=new Set(["auto","scroll"]);class ec{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Xi(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,T=Np(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!T)return;const{point:x}=m,{timestamp:v}=xe;this.history.push({...x,timestamp:v});const{onStart:b,onMove:S}=this.handlers;y||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,y)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Ki(y,this.transformPagePoint),Z.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:T,onSessionEnd:x,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Xi(m.type==="pointercancel"?this.lastMoveEventInfo:Ki(y,this.transformPagePoint),this.history);this.startEvent&&T&&T(m,b),x&&x(m,b)},!rr(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=s||window;const l=_n(t),c=Ki(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=xe;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Xi(c,this.history)),this.removeListeners=In(kn(this.contextWindow,"pointermove",this.handlePointerMove),kn(this.contextWindow,"pointerup",this.handlePointerUp),kn(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(qo.has(i.overflowX)||qo.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),Z.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),wt(this.updatePoint)}}function Ki(e,t){return t?{point:t(e.point)}:e}function Yo(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xi({point:e},t){return{point:e,delta:Yo(e,tc(t)),offset:Yo(e,Bp(t)),velocity:_p(t,.1)}}function Bp(e){return e[0]}function tc(e){return e[e.length-1]}function _p(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=tc(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>Be(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>Be(t)*2&&(i=e[1]);const o=Ie(s.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Fp(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?ie(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?ie(n,e,i.max):Math.min(e,n)),e}function Ko(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 $p(e,{top:t,left:n,bottom:i,right:s}){return{x:Ko(e.x,n,s),y:Ko(e.y,t,i)}}function Xo(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function zp(e,t){return{x:Xo(e.x,t.x),y:Xo(e.y,t.y)}}function Up(e,t){let n=.5;const i=Ce(e),s=Ce(t);return s>i?n=Rn(t.min,t.max-i,e.min):i>s&&(n=Rn(e.min,e.max-s,t.min)),rt(0,1,n)}function Hp(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 ks=.35;function Wp(e=ks){return e===!1?e=0:e===!0&&(e=ks),{x:Zo(e,"left","right"),y:Zo(e,"top","bottom")}}function Zo(e,t,n){return{min:Jo(e,t),max:Jo(e,n)}}function Jo(e,t){return typeof e=="number"?e:e[t]||0}const Gp=new WeakMap;class qp{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=ge(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=d=>{n&&this.snapToCursor(_n(d).point),this.stopAnimation()},r=(d,f)=>{const{drag:m,dragPropagation:y,onDragStart:T}=this.getProps();if(m&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Af(m),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nt(v=>{let b=this.getAxisMotionValue(v).get()||0;if(st.test(b)){const{projection:S}=this.visualElement;if(S&&S.layout){const j=S.layout.layoutBox[v];j&&(b=Ce(j)*(parseFloat(b)/100))}}this.originPoint[v]=b}),T&&Z.update(()=>T(d,f),!1,!0),xs(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:y,onDirectionLock:T,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=f;if(y&&this.currentDirection===null){this.currentDirection=Kp(v),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),x&&Z.update(()=>x(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new ec(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:Ql(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&Z.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!Qn(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=Fp(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&qt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=$p(i.layoutBox,t):this.constraints=!1,this.elastic=Wp(n),s!==this.constraints&&!qt(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&nt(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Hp(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!qt(t))return!1;const i=t.current;ct(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=nh(i,s.root,this.visualElement.getTransformPagePoint());let r=zp(s.layout.layoutBox,o);if(n){const a=n(Qf(r));this.hasMutatedConstraints=!!a,a&&(r=Sl(a))}return r}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=nt(u=>{if(!Qn(u,n,this.currentDirection))return;let d=l[u]||{};r&&(d={min:0,max:0});const f=s?200:1e6,m=s?40:1e7,y={type:"inertia",velocity:i?t[u]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return xs(this.visualElement,t),i.start(er(t,i,0,n,this.visualElement,!1))}stopAnimation(){nt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){nt(n=>{const{drag:i}=this.getProps();if(!Qn(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n],l=o.get()||0;o.set(t[n]-ie(r,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!qt(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};nt(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=Up({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),nt(r=>{if(!Qn(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(ie(l,c,s[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Gp.set(this.visualElement,this);const t=this.visualElement.current,n=kn(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,m=f!==t&&Lf(f);u&&d&&!m&&this.start(c)});let i;const s=()=>{const{dragConstraints:c}=this.getProps();qt(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),i||(i=Yp(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,r=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Z.read(s);const a=Vn(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(nt(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),r(),l&&l(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:r=ks,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Qo(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Yp(e,t,n){const i=ao(e,Qo(n)),s=ao(t,Qo(n));return()=>{i(),s()}}function Qn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Kp(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Xp extends Et{constructor(t){super(t),this.removeGroupControls=Ne,this.removeListeners=Ne,this.controls=new qp(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ne}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Zi=e=>(t,n)=>{e&&Z.update(()=>e(t,n),!1,!0)};class Zp extends Et{constructor(){super(...arguments),this.removePointerDownListener=Ne}onPointerDown(t){this.session=new ec(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ql(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Zi(t),onStart:Zi(n),onMove:Zi(i),onEnd:(o,r)=>{delete this.session,s&&Z.postRender(()=>s(o,r))}}}mount(){this.removePointerDownListener=kn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ji=!1;class Jp extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),i&&i.register&&s&&i.register(o),Ji&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),li.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:o}=this.props,{projection:r}=i;return r&&(r.isPresent=o,t.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),Ji=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||Z.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),sr.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;Ji=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nc(e){const[t,n]=rp(),i=p.useContext(ya);return h.jsx(Jp,{...e,layoutGroup:i,switchLayoutGroup:p.useContext(Zl),isPresent:t,safeToRemove:n})}const Qp={pan:{Feature:Zp},drag:{Feature:Xp,ProjectionNode:Ul,MeasureLayout:nc}};function ea(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=i[s];o&&Z.postRender(()=>o(t,_n(t)))}class em extends Et{mount(){const{current:t}=this.node;t&&(this.unmount=jf(t,(n,i)=>(ea(this.node,i,"Start"),s=>ea(this.node,s,"End"))))}unmount(){}}class tm extends Et{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=In(Vn(this.node.current,"focus",()=>this.onFocus()),Vn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ta(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=i[s];o&&Z.postRender(()=>o(t,_n(t)))}class nm extends Et{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=Of(t,(s,o)=>(ta(this.node,o,"Start"),(r,{success:a})=>ta(this.node,r,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const js=new WeakMap,Qi=new WeakMap,im=e=>{const t=js.get(e.target);t&&t(e)},sm=e=>{e.forEach(im)};function rm({root:e,...t}){const n=e||document;Qi.has(n)||Qi.set(n,{});const i=Qi.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(sm,{root:e,...t})),i[s]}function om(e,t,n){const i=rm(t);return js.set(e,n),i.observe(e),()=>{js.delete(e),i.unobserve(e)}}const am={some:0,all:1};class lm extends Et{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:am[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 om(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(cm(t,n))&&this.startObserver()}unmount(){}}function cm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const um={inView:{Feature:lm},tap:{Feature:nm},focus:{Feature:tm},hover:{Feature:em}},dm={layout:{ProjectionNode:Ul,MeasureLayout:nc}},fm={...Op,...um,...Qp,...dm},na=Rp(fm,Mp);function hm(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}hm(`:root{--sileo-spring-easing:linear(
|
|
59
59
|
0,
|
|
60
60
|
0.002 0.6%,
|
|
61
61
|
0.007 1.2%,
|
|
@@ -99,7 +99,7 @@ Esempio di config.json:
|
|
|
99
99
|
[data-sileo-badge],[data-sileo-title],[data-sileo-button]
|
|
100
100
|
)[data-state=info]{--_c:var(--sileo-state-info)}:is(
|
|
101
101
|
[data-sileo-badge],[data-sileo-title],[data-sileo-button]
|
|
102
|
-
)[data-state=action]{--_c:var(--sileo-state-action)}:is([data-sileo-badge],[data-sileo-title])[data-state]{--sileo-tone:var(--_c);--sileo-tone-bg:color-mix(in oklch, var(--_c) 20%, transparent)}[data-sileo-content]{position:absolute;left:0;z-index:10;width:100%;pointer-events:none;opacity:var(--_co, 0)}[data-sileo-content]:not([data-visible=true]){content-visibility:hidden}[data-sileo-toast][data-ready=true] [data-sileo-content]{transition:opacity calc(var(--sileo-duration) * .08) ease calc(var(--sileo-duration) * .04)}[data-sileo-content][data-edge=top]{top:0}[data-sileo-content][data-edge=bottom]{top:var(--sileo-height)}[data-sileo-content][data-visible=true]{pointer-events:auto}[data-sileo-toast][data-ready=true] [data-sileo-content][data-visible=true]{transition:opacity calc(var(--sileo-duration) * .6) ease calc(var(--sileo-duration) * .3)}[data-sileo-description]{width:100%;text-align:left;padding:1rem;font-size:.875rem;line-height:1.25rem;contain:layout style paint;content-visibility:auto}[data-sileo-button]{display:flex;align-items:center;justify-content:center;height:1.75rem;padding:0 .625rem;margin-top:.75rem;border-radius:9999px;border:0;font-size:.75rem;font-weight:500;cursor:pointer;color:var(--sileo-btn-color,currentColor);background-color:var(--sileo-btn-bg,transparent);transition:background-color 150ms ease}[data-sileo-button]:hover{background-color:var(--sileo-btn-bg-hover,transparent)}[data-sileo-button][data-state]{--sileo-btn-color:var(--_c);--sileo-btn-bg:color-mix(in oklch, var(--_c) 15%, transparent);--sileo-btn-bg-hover:color-mix(in oklch, var(--_c) 25%, transparent)}[data-sileo-icon=spin]{animation:sileo-spin 1s linear infinite}@keyframes sileo-spin{to{transform:rotate(360deg)}}@keyframes sileo-header-enter{from{opacity:0;filter:blur(6px)}to{opacity:1;filter:blur(0px)}}@keyframes sileo-header-exit{from{opacity:1;filter:blur(0px)}to{opacity:0;filter:blur(6px)}}[data-sileo-viewport]{position:fixed;z-index:50;display:flex;gap:.75rem;padding:.75rem;pointer-events:none;max-width:calc(100vw - 1.5rem);contain:layout style}[data-sileo-viewport][data-position^=top] [data-sileo-toast]:not([data-ready=true]){margin-bottom:calc(-1 * (var(--sileo-height) + .75rem))}[data-sileo-viewport][data-position^=bottom] [data-sileo-toast]:not([data-ready=true]){margin-top:calc(-1 * (var(--sileo-height) + .75rem))}[data-sileo-viewport][data-position^=top]{top:0;flex-direction:column-reverse}[data-sileo-viewport][data-position^=bottom]{bottom:0;flex-direction:column}[data-sileo-viewport][data-position$=left]{left:0;align-items:flex-start}[data-sileo-viewport][data-position$=right]{right:0;align-items:flex-end}[data-sileo-viewport][data-position$=center]{left:50%;transform:translateX(-50%);align-items:center}@media (prefers-reduced-motion:no-preference){[data-sileo-toast][data-ready=true]:hover,[data-sileo-toast][data-ready=true][data-exiting=true]{will-change:transform,opacity,height}}@media (prefers-reduced-motion:reduce){*,::after,::before{animation-duration:0s;animation-iteration-count:1;transition-duration:0s}}`);const et=40,wn=350,pm=16,sc=600,mm=sc/1e3,dn=6e3,gm=dn*.1,ym=dn*.025,vm=dn-2e3,es={type:"spring",bounce:.25,duration:mm},bm=.5,ei=10,xm=2.25,wm=200,Sm=sc*.7,fn=e=>{let{title:t,children:n}=e,i=xu(e,["title","children"]);return h.jsxs("svg",he({},i,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("title",{children:t}),n]}))},Tm=()=>h.jsxs(fn,{title:"Arrow Right",children:[h.jsx("path",{d:"M5 12h14"}),h.jsx("path",{d:"m12 5 7 7-7 7"})]}),Em=()=>h.jsxs(fn,{title:"Life Buoy",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10"}),h.jsx("path",{d:"m4.93 4.93 4.24 4.24"}),h.jsx("path",{d:"m14.83 9.17 4.24-4.24"}),h.jsx("path",{d:"m14.83 14.83 4.24 4.24"}),h.jsx("path",{d:"m9.17 14.83-4.24 4.24"}),h.jsx("circle",{cx:"12",cy:"12",r:"4"})]}),Pm=e=>h.jsx(fn,he({title:"Loader Circle"},e,{children:h.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})),Cm=()=>h.jsxs(fn,{title:"X",children:[h.jsx("path",{d:"M18 6 6 18"}),h.jsx("path",{d:"m6 6 12 12"})]}),Am=()=>h.jsxs(fn,{title:"Circle Alert",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10"}),h.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),h.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]}),km=()=>h.jsx(fn,{title:"Check",children:h.jsx("path",{d:"M20 6 9 17l-5-5"})}),sa={success:h.jsx(km,{}),loading:h.jsx(Pm,{"data-sileo-icon":"spin","aria-hidden":"true"}),error:h.jsx(Cm,{}),warning:h.jsx(Am,{}),info:h.jsx(Em,{}),action:h.jsx(Tm,{})},jm=p.memo(function({filterId:t,blur:n}){return h.jsx("defs",{children:h.jsxs("filter",{id:t,x:"-20%",y:"-20%",width:"140%",height:"140%",colorInterpolationFilters:"sRGB",children:[h.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:n,result:"blur"}),h.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10",result:"goo"}),h.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})}),Rm=p.memo(function({id:t,fill:n="#FFFFFF",state:i="success",title:s=i,description:o,position:r="left",expand:a="bottom",className:l,icon:c,styles:u,button:d,roundness:f,exiting:m=!1,autoExpandDelayMs:y,autoCollapseDelayMs:T,canExpand:x,interruptKey:v,refreshKey:b,onMouseEnter:S,onMouseLeave:j,onDismiss:w}){var R,L,M,I,B,J,ye,ve;const Q=p.useMemo(()=>({title:s,description:o,state:i,icon:c,styles:u,button:d,fill:n}),[s,o,i,c,u,d,n]),[$,se]=p.useState(Q),[q,G]=p.useState(b),[re,te]=p.useState(!1),[pe,Nt]=p.useState(!1),[qe,Ye]=p.useState(0),[oe,ee]=p.useState(0),W=!!$.description||!!$.button,ae=$.state==="loading",Y=W&&re&&!ae,Ce=ae?!1:x??(!v||v===t),Ke=`${$.state}-${$.title}`,Xe=`sileo-gooey-${t}`,Ze=Math.max(0,f??pm),dt=Ze*bm,Bt=p.useRef(null),zn=p.useRef(null),Je=p.useRef(null),ft=p.useRef(null),ht=p.useRef(null),_e=p.useRef(null),g=p.useRef(b),O=p.useRef(null),[D,H]=p.useState({current:{key:Ke,view:$},prev:null}),ce=p.useRef(null),K=p.useRef(null),F=p.useRef(null),Re=p.useRef(0),Fe=p.useRef(null);p.useLayoutEffect(()=>{const _=ce.current,ue=Bt.current;if(!_||!ue)return;if(K.current===null){const Ae=getComputedStyle(ue);K.current=parseFloat(Ae.paddingLeft)+parseFloat(Ae.paddingRight)}const be=K.current;(()=>{const Ae=_.scrollWidth+be+ei;Ae>ei&&Ye(Qe=>Qe===Ae?Qe:Ae)})(),F.current||(F.current=new ResizeObserver(()=>{cancelAnimationFrame(Re.current),Re.current=requestAnimationFrame(()=>{var Ae;const Qe=ce.current,_c=(Ae=K.current)!=null?Ae:0;if(!Qe)return;const ji=Qe.scrollWidth+_c+ei;ji>ei&&Ye(yr=>yr===ji?yr:ji)})})),Fe.current!==_&&(Fe.current&&F.current.unobserve(Fe.current),F.current.observe(_),Fe.current=_)},[D.current.key]),p.useEffect(()=>()=>{var _;cancelAnimationFrame(Re.current),(_=F.current)==null||_.disconnect()},[]),p.useLayoutEffect(()=>{if(!W){ee(0);return}const _=zn.current;if(!_)return;const ue=()=>{const Ae=_.scrollHeight;ee(Qe=>Qe===Ae?Qe:Ae)};ue();let be=0;const Oe=new ResizeObserver(()=>{cancelAnimationFrame(be),be=requestAnimationFrame(ue)});return Oe.observe(_),()=>{cancelAnimationFrame(be),Oe.disconnect()}},[W]),p.useEffect(()=>{const _=requestAnimationFrame(()=>Nt(!0));return()=>cancelAnimationFrame(_)},[]),p.useLayoutEffect(()=>{H(_=>_.current.key===Ke?_.current.view===$?_:he({},_,{current:{key:Ke,view:$}}):{prev:_.current,current:{key:Ke,view:$}})},[Ke,$]),p.useEffect(()=>{if(D.prev)return Je.current&&clearTimeout(Je.current),Je.current=window.setTimeout(()=>{Je.current=null,H(_=>he({},_,{prev:null}))},Sm),()=>{Je.current&&(clearTimeout(Je.current),Je.current=null)}},[D.prev]),p.useEffect(()=>{if(b===void 0){se(Q),G(void 0),O.current=null,g.current=b;return}g.current!==b&&(g.current=b,_e.current&&(clearTimeout(_e.current),_e.current=null),Y?(O.current={key:b,payload:Q},te(!1),_e.current=window.setTimeout(()=>{_e.current=null;const _=O.current;_&&(se(_.payload),G(_.key),O.current=null)},wm)):(O.current=null,se(Q),G(b)))},[Y,b,Q]),p.useEffect(()=>{if(!W)return;if(ft.current&&clearTimeout(ft.current),ht.current&&clearTimeout(ht.current),m||!Ce){te(!1);return}if(y==null&&T==null)return;const _=y??0,ue=T??0;return _>0?ft.current=window.setTimeout(()=>te(!0),_):te(!0),ue>0&&(ht.current=window.setTimeout(()=>te(!1),ue)),()=>{ft.current&&clearTimeout(ft.current),ht.current&&clearTimeout(ht.current)}},[T,y,W,Ce,m,q]);const me=et*xm,ze=W?Math.max(me,et+oe):me,pt=p.useRef(ze);Y&&(pt.current=ze);const Me=Y?ze:pt.current,Ct=W?Math.max(Me,me):et,Ve=Math.max(0,Me-et),_t=Math.max(qe||et,et),gr=et+dt*3,$n=r==="right"?wn-_t:r==="center"?(wn-_t)/2:0,Pc=p.useMemo(()=>({x:$n,width:_t,height:Y?gr:et}),[$n,_t,Y,gr]),Cc=p.useMemo(()=>({height:Y?Ve:0,opacity:Y?1:0}),[Y,Ve]),Ac=p.useMemo(()=>Y?es:he({},es,{bounce:0}),[Y]),kc=p.useMemo(()=>pe?es:{duration:0},[pe]),jc=`0 0 ${wn} ${Ct}`,Rc=p.useMemo(()=>({filter:`url(#${Xe})`}),[Xe]),Mc=p.useMemo(()=>({"--_h":`${Y?Me:et}px`,"--_pw":`${_t}px`,"--_px":`${$n}px`,"--_ht":`translateY(${Y?a==="bottom"?3:-3:0}px) scale(${Y?.9:1})`,"--_co":`${Y?1:0}`}),[Y,Me,_t,$n,a]),Dc=p.useCallback(_=>{S==null||S(_),W&&te(!0)},[W,S]),Lc=p.useCallback(_=>{j==null||j(_),te(!1)},[j]),Vc=p.useCallback(_=>{if(_.propertyName!=="height"&&_.propertyName!=="transform"||Y)return;const ue=O.current;ue&&(_e.current&&(clearTimeout(_e.current),_e.current=null),se(ue.payload),G(ue.key),O.current=null)},[Y]),Oc=30,Ic=20,Un=p.useRef(null),Ft=p.useRef(null),Hn=p.useRef(w);Hn.current=w;const ki=p.useRef(null);if(!ki.current){const _={onMove:ue=>{const be=Un.current;if(Ft.current===null||!be)return;const Oe=ue.clientY-Ft.current,Ae=Oe>0?1:-1,Qe=Math.min(Math.abs(Oe),Ic)*Ae;be.style.transform=`translateY(${Qe}px)`},onUp:ue=>{const be=Un.current;if(Ft.current===null||!be)return;const Oe=ue.clientY-Ft.current;Ft.current=null,be.style.transform="",be.removeEventListener("pointermove",_.onMove),be.removeEventListener("pointerup",_.onUp),Math.abs(Oe)>Oc&&(Hn.current==null||Hn.current.call(Hn))}};ki.current=_}const Nc=p.useCallback(_=>{var ue;_.preventDefault(),_.stopPropagation(),(ue=$.button)==null||ue.onClick()},[$.button]),Bc=p.useCallback(_=>{if(m||!w||_.target.closest("[data-sileo-button]"))return;Ft.current=_.clientY,_.currentTarget.setPointerCapture(_.pointerId);const be=Un.current,Oe=ki.current;be&&Oe&&(be.addEventListener("pointermove",Oe.onMove,{passive:!0}),be.addEventListener("pointerup",Oe.onUp,{passive:!0}))},[m,w]);return h.jsxs("button",{ref:Un,type:"button","data-sileo-toast":!0,"data-ready":pe,"data-expanded":Y,"data-exiting":m,"data-edge":a,"data-position":r,"data-state":$.state,className:l,style:Mc,onMouseEnter:Dc,onMouseLeave:Lc,onTransitionEnd:Vc,onPointerDown:Bc,children:[h.jsx("div",{"data-sileo-canvas":!0,"data-edge":a,style:Rc,children:h.jsxs("svg",{"data-sileo-svg":!0,width:wn,height:Ct,viewBox:jc,children:[h.jsx("title",{children:"Sileo Notification"}),h.jsx(jm,{filterId:Xe,blur:dt}),h.jsx(ia.rect,{"data-sileo-pill":!0,rx:Ze,ry:Ze,fill:$.fill,initial:!1,animate:Pc,transition:kc}),h.jsx(ia.rect,{"data-sileo-body":!0,y:et,width:wn,rx:Ze,ry:Ze,fill:$.fill,initial:!1,animate:Cc,transition:Ac})]})}),h.jsx("div",{ref:Bt,"data-sileo-header":!0,"data-edge":a,children:h.jsxs("div",{"data-sileo-header-stack":!0,children:[h.jsxs("div",{ref:ce,"data-sileo-header-inner":!0,"data-layer":"current",children:[h.jsx("div",{"data-sileo-badge":!0,"data-state":D.current.view.state,className:(M=D.current.view.styles)==null?void 0:M.badge,children:(R=D.current.view.icon)!=null?R:sa[D.current.view.state]}),h.jsx("span",{"data-sileo-title":!0,"data-state":D.current.view.state,className:(I=D.current.view.styles)==null?void 0:I.title,children:D.current.view.title})]},D.current.key),D.prev&&h.jsxs("div",{"data-sileo-header-inner":!0,"data-layer":"prev","data-exiting":"true",children:[h.jsx("div",{"data-sileo-badge":!0,"data-state":D.prev.view.state,className:(B=D.prev.view.styles)==null?void 0:B.badge,children:(L=D.prev.view.icon)!=null?L:sa[D.prev.view.state]}),h.jsx("span",{"data-sileo-title":!0,"data-state":D.prev.view.state,className:(J=D.prev.view.styles)==null?void 0:J.title,children:D.prev.view.title})]},D.prev.key)]})}),W&&h.jsx("div",{"data-sileo-content":!0,"data-edge":a,"data-visible":Y,children:h.jsxs("div",{ref:zn,"data-sileo-description":!0,className:(ye=$.styles)==null?void 0:ye.description,children:[$.description,$.button&&h.jsx("a",{href:"#",type:"button","data-sileo-button":!0,"data-state":$.state,className:(ve=$.styles)==null?void 0:ve.button,onClick:Nc,children:$.button.title})]})})]})}),Mm=e=>e.includes("right")?"right":e.includes("center")?"center":"left",Dm=e=>e.startsWith("top")?"bottom":"top",we={toasts:[],listeners:new Set,position:"top-right",options:void 0,emit(){for(const e of this.listeners)e(this.toasts)},update(e){this.toasts=e(this.toasts),this.emit()}};let Lm=0;const Vm=()=>`${++Lm}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,ra=e=>`${e.id}:${e.instanceId}`,Rs=e=>{const t=we.toasts.find(n=>n.id===e);!t||t.exiting||(we.update(n=>n.map(i=>i.id===e?he({},i,{exiting:!0}):i)),setTimeout(()=>we.update(n=>n.filter(i=>i.id!==e)),gm))},Om=(e,t)=>{var n,i;if(e.autopilot===!1||!t||t<=0)return{};const s=typeof e.autopilot=="object"?e.autopilot:void 0,o=r=>Math.min(t,Math.max(0,r));return{expandDelayMs:o((n=s==null?void 0:s.expand)!=null?n:ym),collapseDelayMs:o((i=s==null?void 0:s.collapse)!=null?i:vm)}},rc=e=>{var t;return he({},we.options,e,{styles:he({},(t=we.options)==null?void 0:t.styles,e.styles)})},oc=(e,t,n)=>{var i,s,o;const r=(i=e.duration)!=null?i:dn,a=Om(e,r);return he({},e,{id:t,instanceId:Vm(),position:(s=(o=e.position)!=null?o:n)!=null?s:we.position,autoExpandDelayMs:a.expandDelayMs,autoCollapseDelayMs:a.collapseDelayMs})},jt=e=>{var t,n;const i=we.toasts.filter(l=>!l.exiting),s=rc(e),o=(t=s.id)!=null?t:"sileo-default",r=i.find(l=>l.id===o),a=oc(s,o,r==null?void 0:r.position);return r?we.update(l=>l.map(c=>c.id===o?a:c)):we.update(l=>[...l.filter(c=>c.id!==o),a]),{id:o,duration:(n=s.duration)!=null?n:dn}},ts=(e,t)=>{const n=we.toasts.find(s=>s.id===e);if(!n)return;const i=oc(rc(t),e,n.position);we.update(s=>s.map(o=>o.id===e?i:o))},Sn={show:e=>jt(e).id,success:e=>jt(he({},e,{state:"success"})).id,error:e=>jt(he({},e,{state:"error"})).id,warning:e=>jt(he({},e,{state:"warning"})).id,info:e=>jt(he({},e,{state:"info"})).id,action:e=>jt(he({},e,{state:"action"})).id,promise:(e,t)=>{const{id:n}=jt(he({},t.loading,{state:"loading",duration:null,position:t.position})),i=typeof e=="function"?e():e;return i.then(s=>{if(t.action){const o=typeof t.action=="function"?t.action(s):t.action;ts(n,he({},o,{state:"action",id:n}))}else{const o=typeof t.success=="function"?t.success(s):t.success;ts(n,he({},o,{state:"success",id:n}))}}).catch(s=>{const o=typeof t.error=="function"?t.error(s):t.error;ts(n,he({},o,{state:"error",id:n}))}),i},dismiss:Rs,clear:e=>we.update(t=>e?t.filter(n=>n.position!==e):[])};function Im({children:e,position:t="top-right",offset:n,options:i}){const[s,o]=p.useState(we.toasts),[r,a]=p.useState(),l=p.useRef(!1),c=p.useRef(new Map),u=p.useRef(s),d=p.useRef(void 0),f=p.useRef(new Map);p.useEffect(()=>{we.position=t,we.options=i},[t,i]);const m=p.useCallback(()=>{for(const w of c.current.values())clearTimeout(w);c.current.clear()},[]),y=p.useCallback(w=>{if(!l.current)for(const L of w){var R;if(L.exiting)continue;const M=ra(L);if(c.current.has(M))continue;const I=(R=L.duration)!=null?R:dn;I===null||I<=0||c.current.set(M,window.setTimeout(()=>Rs(L.id),I))}},[]);p.useEffect(()=>{const w=R=>o(R);return we.listeners.add(w),()=>{we.listeners.delete(w),m()}},[m]),p.useEffect(()=>{u.current=s;const w=new Set(s.map(ra)),R=new Set(s.map(L=>L.id));for(const[L,M]of c.current)w.has(L)||(clearTimeout(M),c.current.delete(L));for(const L of f.current.keys())R.has(L)||f.current.delete(L);y(s)},[s,y]);const T=p.useRef(null),x=p.useRef(null);T.current=p.useCallback(()=>{l.current||(l.current=!0,m())},[m]),x.current=p.useCallback(()=>{l.current&&(l.current=!1,y(u.current))},[y]);const v=p.useMemo(()=>{for(let w=s.length-1;w>=0;w--)if(!s[w].exiting)return s[w].id},[s]);p.useEffect(()=>{d.current=v,a(v)},[v]);const b=p.useCallback(w=>{let R=f.current.get(w);return R||(R={enter:L=>{a(M=>M===w?M:w),T.current==null||T.current.call(T,L)},leave:L=>{a(M=>M===d.current?M:d.current),x.current==null||x.current.call(x,L)},dismiss:()=>Rs(w)},f.current.set(w,R),R)},[]),S=p.useCallback(w=>{if(n===void 0)return;const R=typeof n=="object"?n:{top:n,right:n,bottom:n,left:n},L={},M=I=>typeof I=="number"?`${I}px`:I;return w.startsWith("top")&&R.top&&(L.top=M(R.top)),w.startsWith("bottom")&&R.bottom&&(L.bottom=M(R.bottom)),w.endsWith("left")&&R.left&&(L.left=M(R.left)),w.endsWith("right")&&R.right&&(L.right=M(R.right)),L},[n]),j=p.useMemo(()=>{const w=new Map;for(const L of s){var R;const M=(R=L.position)!=null?R:t,I=w.get(M);I?I.push(L):w.set(M,[L])}return w},[s,t]);return h.jsxs(h.Fragment,{children:[e,Array.from(j,([w,R])=>{const L=Mm(w),M=Dm(w);return h.jsx("section",{"data-sileo-viewport":!0,"data-position":w,"aria-live":"polite",style:S(w),children:R.map(I=>{const B=b(I.id);return h.jsx(Rm,{id:I.id,state:I.state,title:I.title,description:I.description,position:L,expand:M,icon:I.icon,fill:I.fill,styles:I.styles,button:I.button,roundness:I.roundness,exiting:I.exiting,autoExpandDelayMs:I.autoExpandDelayMs,autoCollapseDelayMs:I.autoCollapseDelayMs,refreshKey:I.instanceId,canExpand:r===void 0||r===I.id,onMouseEnter:B.enter,onMouseLeave:B.leave,onDismiss:B.dismiss},I.id)})},w)})]})}const pr=()=>({success:(o,r)=>Sn.success({title:o,description:r}),error:(o,r)=>Sn.error({title:o,description:r}),info:(o,r)=>Sn.info({title:o,description:r}),warning:(o,r)=>Sn.warning({title:o,description:r}),promise:(o,r)=>Sn.promise(o,r)}),ac=p.createContext(),Nm=({children:e})=>{const{sileoToastEnabled:t,customDeviceType:n}=Le(),{success:i,error:s,info:o,warning:r}=pr(),a=ya(),[l,c]=p.useState(!1),[u,d]=p.useState(),[f,m]=p.useState(),y=n||a.type,S={showAlert:l,setShowAlert:c,typeAlert:u,setTypeAlert:d,messageAlert:f,setMessageAlert:m,alertConfig:{danger:{bgColor:"bg-danger",textColor:"text-danger-text",buttonBg:"bg-danger",hoverBg:"hover:bg-danger-hover",focusRing:"focus:ring-danger-progress",progressColor:"bg-danger-progress"},info:{bgColor:"bg-info",textColor:"text-info-text",buttonBg:"bg-info",hoverBg:"hover:bg-info-hover",focusRing:"focus:ring-info-progress",progressColor:"bg-info-progress"},success:{bgColor:"bg-success",textColor:"text-success-text",buttonBg:"bg-success",hoverBg:"hover:bg-success-hover",focusRing:"focus:ring-success-progress",progressColor:"bg-success-progress"},warning:{bgColor:"bg-warning",textColor:"text-warning-text",buttonBg:"bg-warning",hoverBg:"hover:bg-warning-hover",focusRing:"focus:ring-warning-progress",progressColor:"bg-warning-progress"}},getIcon:j=>{switch(j){case"danger":return h.jsx(Yc,{className:"w-[20px] h-[20px]"});case"info":return h.jsx(Kc,{className:"w-[20px] h-[20px]"});case"success":return h.jsx(su,{className:"text-xl"});case"warning":return h.jsx(Xc,{className:"w-[20px] h-[20px]"})}},closeAlert:()=>{c(!l)},activeAlert:(j,w,R=null)=>{if(c(!1),t&&!R&&["mobile","tablet"].includes(y)){switch(j){case"danger":s("Errore",w);break;case"info":o("Info",w);break;case"success":i("Successo",w);break;case"warning":r("Attenzione",w);break;default:o("Info",w)}return}setTimeout(()=>{d(j),m(w),c(!0)},50)}};return h.jsx(ac.Provider,{value:S,children:e})},Pt=()=>{const e=p.useContext(ac);if(e===void 0)throw new Error("Non puoi modificare l'alert");return e};let Gt;const lc=async(e,t,n,i)=>{if(Gt)return Gt;try{const o=await(await fetch("/config.json")).json(),r=o.baseUri,{unauthorized:a,notFound:l,defaultMessage:c}=o.axiosErrors;return Gt=aa.create({baseURL:r}),Gt.interceptors.request.use(u=>{const d=JSON.parse(localStorage.getItem("accessToken"));return d?u.headers.Authorization=`Bearer ${d}`:delete u.headers.Authorization,u}),Gt.interceptors.response.use(u=>u,u=>{if(u.response)switch(u.response.status){case 401:localStorage.removeItem("accessToken"),e==null||e("danger",a),t==null||t();break;case 404:e==null||e("danger",l),n==null||n(u);break;default:e==null||e("danger",`${c} ${u.response.status||""} ${u.response.data.error||""}`),i==null||i(u)}return Promise.reject(u)}),Gt}catch(s){console.error(s)}},Ms=(e,t)=>{const[n,i]=p.useState(()=>{try{const r=localStorage.getItem(t);return r===null?(localStorage.setItem(t,JSON.stringify(e)),e):JSON.parse(r)}catch(r){return console.error("Errore nel recupero dal localStorage:",r),e}});return[n,r=>{i(a=>{const l=typeof r=="function"?r(a):r;return localStorage.setItem(t,JSON.stringify(l)),l})},(r=!1)=>{r?localStorage.clear():localStorage.removeItem(t),i(e)}]},hn=()=>{const[e,t,n]=Ms(null,"accessToken"),[i,s,o]=Ms(null,"user");return{token:e,user:i,setToken:t,setUser:s,storageLogout:()=>{n(),o()}}},cc=p.createContext(),Bm=({children:e})=>{const{heartbeatEndpoint:t,firstPrivatePath:n,infiniteSession:i,timeDeducted:s,authenticatedEndpoint:o,autoLogin:r,setCurrentDate:a,isDebug:l,backendToken:c,useCustomLoginTimeout:u,stopLoaderOnFinish:d,customLoginTimeout:f,tokenLog:m,timerInfiniteSession:y}=Le(),{setIsLoading:T,showLoadingFor:x}=It(),{setShowAlert:v,activeAlert:b}=Pt(),{token:S,setToken:j,setUser:w,storageLogout:R}=hn(),L=U.useNavigate(),[M,I]=p.useState(null),[B,J]=p.useState(),[ye,ve]=p.useState(),[Q,$]=p.useState(!1),se=async(oe=G,ee,W)=>await lc(b,oe,ee,W),q=async(oe=null,ee)=>{oe&&oe.preventDefault(),$(!0);try{u?x(f):T(!0),v(!1);const ae=await(await se()).post(o,{auth:ee}),Y=ae.headers.token,Ce=ae.data;Y&&(w(Ce),j(Y),I(!0),L(`${n}${Ce.id}`))}catch(W){console.error(W),T(!1)}finally{$(!1),!u&&d&&T(!1)}},G=()=>{R(),I(!1)},re=async()=>{try{const W=(await(await se()).get(`${t}`)).headers.token;j(W),l&&console.log("[Auth]: Nuovo token: ",W,"Data:",a())}catch(oe){console.error(oe),G()}},te=oe=>{const ee=oe||S;if(!ee)return;const W="Token non valido";try{const ae=vr(ee);if(!ae.exp){m&&console.warn("[Auth]: Token senza data di scadenza, eseguo logout."),G(),b("danger",W);return}const Y=Math.floor(Date.now()/1e3),Ce=(ae.exp-Y)*1e3;if(Ce<=0){m&&console.warn("[Auth]: Token scaduto, eseguo logout."),G(),b("danger",W);return}ve(Ce),J(Ce-s);const Ke=Ce-s;if(m){const Xe=Math.floor(Ce/1e3),Ze=Math.floor(Xe/60),dt=Xe%60;console.log(`[Auth]: Token valido per ancora: ${Ze} minuti e ${dt} secondi`),console.log("[Auth]: Token:",S)}return Ke}catch(ae){m&&console.error("[Auth]: Errore nella decodifica del token:",ae),G(),b("danger",W)}},pe=oe=>{if(!oe)return!1;try{const ee=vr(oe),W=Math.floor(Date.now()/1e3);return!ee.exp||ee.exp<W?(console.warn("[Auth]: Token scaduto o non valido"),!1):!0}catch(ee){return console.error("[Auth]: Token non valido o corrotto",ee),!1}},Nt=async oe=>{try{const ae=(await(await se()).get(t)).data;ae&&(w(ae),j(oe),I(!0),L(`${n}${ae.id}`))}catch(ee){console.error(ee)}},qe=()=>{pe(S)?(m&&console.log("[Auth]: Ricarico pagina → controllo scadenza token"),te(S)):(m&&console.warn("[Auth]: Token non valido al reload, eseguo logout"),G())};p.useEffect(()=>{if(!pe(S)){G();return}I(!0)},[]),p.useEffect(()=>{r&&!M&&!Q&&(m&&console.log("[Auth]: Tentativo di autologin con backendToken"),Nt(c))},[r,M,Q]),p.useEffect(()=>{if(document.readyState==="complete")qe();else return window.addEventListener("load",qe),()=>window.removeEventListener("load",qe)},[]),p.useEffect(()=>{if(r)return;const oe=te(S),ee=y||oe;m&&console.log("[Auth]: intervallo per il prossimo token:",ee);let W;i&&S&&oe&&(m&&console.log("[Auth]: Entrato dentro il timer della sessione infinita"),W=setInterval(()=>{re()},ee));let ae;return!i&&S&&(m&&console.log("[Auth]: Entrato dentro il timer della sessione con scadenza del token"),ae=setTimeout(()=>{G(),b("danger","Sessione scaduta")},ye)),()=>{W&&clearInterval(W),ae&&clearTimeout(ae)}},[S,B]);const Ye={isAuthenticated:M,setIsAuthenticated:I,login:q,logout:G,createAxiosInstances:se,fetchHeartbeat:re,getTokenExpiry:te,checkTokenValidity:pe,fetchUser:Nt,handleLoad:qe};return h.jsx(cc.Provider,{value:Ye,children:e})},Fn=()=>{const e=p.useContext(cc);if(e===void 0)throw new Error("Non sei dentro al Auth Provider");return e},uc=p.createContext(),_m=({children:e,publicRoutes:t=[],privateRoutes:n=[]})=>h.jsx(uc.Provider,{value:{publicRoutes:t,privateRoutes:n},children:e}),dc=()=>{const e=p.useContext(uc);if(e===void 0)throw new Error(`Errore: Le rotte non sono state inizializzate correttamente.
|
|
102
|
+
)[data-state=action]{--_c:var(--sileo-state-action)}:is([data-sileo-badge],[data-sileo-title])[data-state]{--sileo-tone:var(--_c);--sileo-tone-bg:color-mix(in oklch, var(--_c) 20%, transparent)}[data-sileo-content]{position:absolute;left:0;z-index:10;width:100%;pointer-events:none;opacity:var(--_co, 0)}[data-sileo-content]:not([data-visible=true]){content-visibility:hidden}[data-sileo-toast][data-ready=true] [data-sileo-content]{transition:opacity calc(var(--sileo-duration) * .08) ease calc(var(--sileo-duration) * .04)}[data-sileo-content][data-edge=top]{top:0}[data-sileo-content][data-edge=bottom]{top:var(--sileo-height)}[data-sileo-content][data-visible=true]{pointer-events:auto}[data-sileo-toast][data-ready=true] [data-sileo-content][data-visible=true]{transition:opacity calc(var(--sileo-duration) * .6) ease calc(var(--sileo-duration) * .3)}[data-sileo-description]{width:100%;text-align:left;padding:1rem;font-size:.875rem;line-height:1.25rem;contain:layout style paint;content-visibility:auto}[data-sileo-button]{display:flex;align-items:center;justify-content:center;height:1.75rem;padding:0 .625rem;margin-top:.75rem;border-radius:9999px;border:0;font-size:.75rem;font-weight:500;cursor:pointer;color:var(--sileo-btn-color,currentColor);background-color:var(--sileo-btn-bg,transparent);transition:background-color 150ms ease}[data-sileo-button]:hover{background-color:var(--sileo-btn-bg-hover,transparent)}[data-sileo-button][data-state]{--sileo-btn-color:var(--_c);--sileo-btn-bg:color-mix(in oklch, var(--_c) 15%, transparent);--sileo-btn-bg-hover:color-mix(in oklch, var(--_c) 25%, transparent)}[data-sileo-icon=spin]{animation:sileo-spin 1s linear infinite}@keyframes sileo-spin{to{transform:rotate(360deg)}}@keyframes sileo-header-enter{from{opacity:0;filter:blur(6px)}to{opacity:1;filter:blur(0px)}}@keyframes sileo-header-exit{from{opacity:1;filter:blur(0px)}to{opacity:0;filter:blur(6px)}}[data-sileo-viewport]{position:fixed;z-index:50;display:flex;gap:.75rem;padding:.75rem;pointer-events:none;max-width:calc(100vw - 1.5rem);contain:layout style}[data-sileo-viewport][data-position^=top] [data-sileo-toast]:not([data-ready=true]){margin-bottom:calc(-1 * (var(--sileo-height) + .75rem))}[data-sileo-viewport][data-position^=bottom] [data-sileo-toast]:not([data-ready=true]){margin-top:calc(-1 * (var(--sileo-height) + .75rem))}[data-sileo-viewport][data-position^=top]{top:0;flex-direction:column-reverse}[data-sileo-viewport][data-position^=bottom]{bottom:0;flex-direction:column}[data-sileo-viewport][data-position$=left]{left:0;align-items:flex-start}[data-sileo-viewport][data-position$=right]{right:0;align-items:flex-end}[data-sileo-viewport][data-position$=center]{left:50%;transform:translateX(-50%);align-items:center}@media (prefers-reduced-motion:no-preference){[data-sileo-toast][data-ready=true]:hover,[data-sileo-toast][data-ready=true][data-exiting=true]{will-change:transform,opacity,height}}@media (prefers-reduced-motion:reduce){*,::after,::before{animation-duration:0s;animation-iteration-count:1;transition-duration:0s}}`);const et=40,wn=350,pm=16,ic=600,mm=ic/1e3,dn=6e3,gm=dn*.1,ym=dn*.025,vm=dn-2e3,es={type:"spring",bounce:.25,duration:mm},bm=.5,ei=10,xm=2.25,wm=200,Sm=ic*.7,fn=e=>{let{title:t,children:n}=e,i=xu(e,["title","children"]);return h.jsxs("svg",he({},i,{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("title",{children:t}),n]}))},Tm=()=>h.jsxs(fn,{title:"Arrow Right",children:[h.jsx("path",{d:"M5 12h14"}),h.jsx("path",{d:"m12 5 7 7-7 7"})]}),Em=()=>h.jsxs(fn,{title:"Life Buoy",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10"}),h.jsx("path",{d:"m4.93 4.93 4.24 4.24"}),h.jsx("path",{d:"m14.83 9.17 4.24-4.24"}),h.jsx("path",{d:"m14.83 14.83 4.24 4.24"}),h.jsx("path",{d:"m9.17 14.83-4.24 4.24"}),h.jsx("circle",{cx:"12",cy:"12",r:"4"})]}),Cm=e=>h.jsx(fn,he({title:"Loader Circle"},e,{children:h.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})),Pm=()=>h.jsxs(fn,{title:"X",children:[h.jsx("path",{d:"M18 6 6 18"}),h.jsx("path",{d:"m6 6 12 12"})]}),Am=()=>h.jsxs(fn,{title:"Circle Alert",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10"}),h.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),h.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]}),km=()=>h.jsx(fn,{title:"Check",children:h.jsx("path",{d:"M20 6 9 17l-5-5"})}),ia={success:h.jsx(km,{}),loading:h.jsx(Cm,{"data-sileo-icon":"spin","aria-hidden":"true"}),error:h.jsx(Pm,{}),warning:h.jsx(Am,{}),info:h.jsx(Em,{}),action:h.jsx(Tm,{})},jm=p.memo(function({filterId:t,blur:n}){return h.jsx("defs",{children:h.jsxs("filter",{id:t,x:"-20%",y:"-20%",width:"140%",height:"140%",colorInterpolationFilters:"sRGB",children:[h.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:n,result:"blur"}),h.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -10",result:"goo"}),h.jsx("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})]})})}),Rm=p.memo(function({id:t,fill:n="#FFFFFF",state:i="success",title:s=i,description:o,position:r="left",expand:a="bottom",className:l,icon:c,styles:u,button:d,roundness:f,exiting:m=!1,autoExpandDelayMs:y,autoCollapseDelayMs:T,canExpand:x,interruptKey:v,refreshKey:b,onMouseEnter:S,onMouseLeave:j,onDismiss:w}){var R,L,M,I,B,J,ye,ve;const Q=p.useMemo(()=>({title:s,description:o,state:i,icon:c,styles:u,button:d,fill:n}),[s,o,i,c,u,d,n]),[z,se]=p.useState(Q),[q,G]=p.useState(b),[re,te]=p.useState(!1),[pe,Nt]=p.useState(!1),[qe,Ye]=p.useState(0),[oe,ee]=p.useState(0),W=!!z.description||!!z.button,ae=z.state==="loading",Y=W&&re&&!ae,Pe=ae?!1:x??(!v||v===t),Ke=`${z.state}-${z.title}`,Xe=`sileo-gooey-${t}`,Ze=Math.max(0,f??pm),dt=Ze*bm,Bt=p.useRef(null),$n=p.useRef(null),Je=p.useRef(null),ft=p.useRef(null),ht=p.useRef(null),_e=p.useRef(null),g=p.useRef(b),O=p.useRef(null),[D,H]=p.useState({current:{key:Ke,view:z},prev:null}),ce=p.useRef(null),K=p.useRef(null),F=p.useRef(null),Re=p.useRef(0),Fe=p.useRef(null);p.useLayoutEffect(()=>{const _=ce.current,ue=Bt.current;if(!_||!ue)return;if(K.current===null){const Ae=getComputedStyle(ue);K.current=parseFloat(Ae.paddingLeft)+parseFloat(Ae.paddingRight)}const be=K.current;(()=>{const Ae=_.scrollWidth+be+ei;Ae>ei&&Ye(Qe=>Qe===Ae?Qe:Ae)})(),F.current||(F.current=new ResizeObserver(()=>{cancelAnimationFrame(Re.current),Re.current=requestAnimationFrame(()=>{var Ae;const Qe=ce.current,Bc=(Ae=K.current)!=null?Ae:0;if(!Qe)return;const ji=Qe.scrollWidth+Bc+ei;ji>ei&&Ye(gr=>gr===ji?gr:ji)})})),Fe.current!==_&&(Fe.current&&F.current.unobserve(Fe.current),F.current.observe(_),Fe.current=_)},[D.current.key]),p.useEffect(()=>()=>{var _;cancelAnimationFrame(Re.current),(_=F.current)==null||_.disconnect()},[]),p.useLayoutEffect(()=>{if(!W){ee(0);return}const _=$n.current;if(!_)return;const ue=()=>{const Ae=_.scrollHeight;ee(Qe=>Qe===Ae?Qe:Ae)};ue();let be=0;const Oe=new ResizeObserver(()=>{cancelAnimationFrame(be),be=requestAnimationFrame(ue)});return Oe.observe(_),()=>{cancelAnimationFrame(be),Oe.disconnect()}},[W]),p.useEffect(()=>{const _=requestAnimationFrame(()=>Nt(!0));return()=>cancelAnimationFrame(_)},[]),p.useLayoutEffect(()=>{H(_=>_.current.key===Ke?_.current.view===z?_:he({},_,{current:{key:Ke,view:z}}):{prev:_.current,current:{key:Ke,view:z}})},[Ke,z]),p.useEffect(()=>{if(D.prev)return Je.current&&clearTimeout(Je.current),Je.current=window.setTimeout(()=>{Je.current=null,H(_=>he({},_,{prev:null}))},Sm),()=>{Je.current&&(clearTimeout(Je.current),Je.current=null)}},[D.prev]),p.useEffect(()=>{if(b===void 0){se(Q),G(void 0),O.current=null,g.current=b;return}g.current!==b&&(g.current=b,_e.current&&(clearTimeout(_e.current),_e.current=null),Y?(O.current={key:b,payload:Q},te(!1),_e.current=window.setTimeout(()=>{_e.current=null;const _=O.current;_&&(se(_.payload),G(_.key),O.current=null)},wm)):(O.current=null,se(Q),G(b)))},[Y,b,Q]),p.useEffect(()=>{if(!W)return;if(ft.current&&clearTimeout(ft.current),ht.current&&clearTimeout(ht.current),m||!Pe){te(!1);return}if(y==null&&T==null)return;const _=y??0,ue=T??0;return _>0?ft.current=window.setTimeout(()=>te(!0),_):te(!0),ue>0&&(ht.current=window.setTimeout(()=>te(!1),ue)),()=>{ft.current&&clearTimeout(ft.current),ht.current&&clearTimeout(ht.current)}},[T,y,W,Pe,m,q]);const me=et*xm,$e=W?Math.max(me,et+oe):me,pt=p.useRef($e);Y&&(pt.current=$e);const Me=Y?$e:pt.current,Pt=W?Math.max(Me,me):et,Ve=Math.max(0,Me-et),_t=Math.max(qe||et,et),mr=et+dt*3,zn=r==="right"?wn-_t:r==="center"?(wn-_t)/2:0,Ec=p.useMemo(()=>({x:zn,width:_t,height:Y?mr:et}),[zn,_t,Y,mr]),Cc=p.useMemo(()=>({height:Y?Ve:0,opacity:Y?1:0}),[Y,Ve]),Pc=p.useMemo(()=>Y?es:he({},es,{bounce:0}),[Y]),Ac=p.useMemo(()=>pe?es:{duration:0},[pe]),kc=`0 0 ${wn} ${Pt}`,jc=p.useMemo(()=>({filter:`url(#${Xe})`}),[Xe]),Rc=p.useMemo(()=>({"--_h":`${Y?Me:et}px`,"--_pw":`${_t}px`,"--_px":`${zn}px`,"--_ht":`translateY(${Y?a==="bottom"?3:-3:0}px) scale(${Y?.9:1})`,"--_co":`${Y?1:0}`}),[Y,Me,_t,zn,a]),Mc=p.useCallback(_=>{S==null||S(_),W&&te(!0)},[W,S]),Dc=p.useCallback(_=>{j==null||j(_),te(!1)},[j]),Lc=p.useCallback(_=>{if(_.propertyName!=="height"&&_.propertyName!=="transform"||Y)return;const ue=O.current;ue&&(_e.current&&(clearTimeout(_e.current),_e.current=null),se(ue.payload),G(ue.key),O.current=null)},[Y]),Vc=30,Oc=20,Un=p.useRef(null),Ft=p.useRef(null),Hn=p.useRef(w);Hn.current=w;const ki=p.useRef(null);if(!ki.current){const _={onMove:ue=>{const be=Un.current;if(Ft.current===null||!be)return;const Oe=ue.clientY-Ft.current,Ae=Oe>0?1:-1,Qe=Math.min(Math.abs(Oe),Oc)*Ae;be.style.transform=`translateY(${Qe}px)`},onUp:ue=>{const be=Un.current;if(Ft.current===null||!be)return;const Oe=ue.clientY-Ft.current;Ft.current=null,be.style.transform="",be.removeEventListener("pointermove",_.onMove),be.removeEventListener("pointerup",_.onUp),Math.abs(Oe)>Vc&&(Hn.current==null||Hn.current.call(Hn))}};ki.current=_}const Ic=p.useCallback(_=>{var ue;_.preventDefault(),_.stopPropagation(),(ue=z.button)==null||ue.onClick()},[z.button]),Nc=p.useCallback(_=>{if(m||!w||_.target.closest("[data-sileo-button]"))return;Ft.current=_.clientY,_.currentTarget.setPointerCapture(_.pointerId);const be=Un.current,Oe=ki.current;be&&Oe&&(be.addEventListener("pointermove",Oe.onMove,{passive:!0}),be.addEventListener("pointerup",Oe.onUp,{passive:!0}))},[m,w]);return h.jsxs("button",{ref:Un,type:"button","data-sileo-toast":!0,"data-ready":pe,"data-expanded":Y,"data-exiting":m,"data-edge":a,"data-position":r,"data-state":z.state,className:l,style:Rc,onMouseEnter:Mc,onMouseLeave:Dc,onTransitionEnd:Lc,onPointerDown:Nc,children:[h.jsx("div",{"data-sileo-canvas":!0,"data-edge":a,style:jc,children:h.jsxs("svg",{"data-sileo-svg":!0,width:wn,height:Pt,viewBox:kc,children:[h.jsx("title",{children:"Sileo Notification"}),h.jsx(jm,{filterId:Xe,blur:dt}),h.jsx(na.rect,{"data-sileo-pill":!0,rx:Ze,ry:Ze,fill:z.fill,initial:!1,animate:Ec,transition:Ac}),h.jsx(na.rect,{"data-sileo-body":!0,y:et,width:wn,rx:Ze,ry:Ze,fill:z.fill,initial:!1,animate:Cc,transition:Pc})]})}),h.jsx("div",{ref:Bt,"data-sileo-header":!0,"data-edge":a,children:h.jsxs("div",{"data-sileo-header-stack":!0,children:[h.jsxs("div",{ref:ce,"data-sileo-header-inner":!0,"data-layer":"current",children:[h.jsx("div",{"data-sileo-badge":!0,"data-state":D.current.view.state,className:(M=D.current.view.styles)==null?void 0:M.badge,children:(R=D.current.view.icon)!=null?R:ia[D.current.view.state]}),h.jsx("span",{"data-sileo-title":!0,"data-state":D.current.view.state,className:(I=D.current.view.styles)==null?void 0:I.title,children:D.current.view.title})]},D.current.key),D.prev&&h.jsxs("div",{"data-sileo-header-inner":!0,"data-layer":"prev","data-exiting":"true",children:[h.jsx("div",{"data-sileo-badge":!0,"data-state":D.prev.view.state,className:(B=D.prev.view.styles)==null?void 0:B.badge,children:(L=D.prev.view.icon)!=null?L:ia[D.prev.view.state]}),h.jsx("span",{"data-sileo-title":!0,"data-state":D.prev.view.state,className:(J=D.prev.view.styles)==null?void 0:J.title,children:D.prev.view.title})]},D.prev.key)]})}),W&&h.jsx("div",{"data-sileo-content":!0,"data-edge":a,"data-visible":Y,children:h.jsxs("div",{ref:$n,"data-sileo-description":!0,className:(ye=z.styles)==null?void 0:ye.description,children:[z.description,z.button&&h.jsx("a",{href:"#",type:"button","data-sileo-button":!0,"data-state":z.state,className:(ve=z.styles)==null?void 0:ve.button,onClick:Ic,children:z.button.title})]})})]})}),Mm=e=>e.includes("right")?"right":e.includes("center")?"center":"left",Dm=e=>e.startsWith("top")?"bottom":"top",we={toasts:[],listeners:new Set,position:"top-right",options:void 0,emit(){for(const e of this.listeners)e(this.toasts)},update(e){this.toasts=e(this.toasts),this.emit()}};let Lm=0;const Vm=()=>`${++Lm}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,sa=e=>`${e.id}:${e.instanceId}`,Rs=e=>{const t=we.toasts.find(n=>n.id===e);!t||t.exiting||(we.update(n=>n.map(i=>i.id===e?he({},i,{exiting:!0}):i)),setTimeout(()=>we.update(n=>n.filter(i=>i.id!==e)),gm))},Om=(e,t)=>{var n,i;if(e.autopilot===!1||!t||t<=0)return{};const s=typeof e.autopilot=="object"?e.autopilot:void 0,o=r=>Math.min(t,Math.max(0,r));return{expandDelayMs:o((n=s==null?void 0:s.expand)!=null?n:ym),collapseDelayMs:o((i=s==null?void 0:s.collapse)!=null?i:vm)}},sc=e=>{var t;return he({},we.options,e,{styles:he({},(t=we.options)==null?void 0:t.styles,e.styles)})},rc=(e,t,n)=>{var i,s,o;const r=(i=e.duration)!=null?i:dn,a=Om(e,r);return he({},e,{id:t,instanceId:Vm(),position:(s=(o=e.position)!=null?o:n)!=null?s:we.position,autoExpandDelayMs:a.expandDelayMs,autoCollapseDelayMs:a.collapseDelayMs})},jt=e=>{var t,n;const i=we.toasts.filter(l=>!l.exiting),s=sc(e),o=(t=s.id)!=null?t:"sileo-default",r=i.find(l=>l.id===o),a=rc(s,o,r==null?void 0:r.position);return r?we.update(l=>l.map(c=>c.id===o?a:c)):we.update(l=>[...l.filter(c=>c.id!==o),a]),{id:o,duration:(n=s.duration)!=null?n:dn}},ts=(e,t)=>{const n=we.toasts.find(s=>s.id===e);if(!n)return;const i=rc(sc(t),e,n.position);we.update(s=>s.map(o=>o.id===e?i:o))},Sn={show:e=>jt(e).id,success:e=>jt(he({},e,{state:"success"})).id,error:e=>jt(he({},e,{state:"error"})).id,warning:e=>jt(he({},e,{state:"warning"})).id,info:e=>jt(he({},e,{state:"info"})).id,action:e=>jt(he({},e,{state:"action"})).id,promise:(e,t)=>{const{id:n}=jt(he({},t.loading,{state:"loading",duration:null,position:t.position})),i=typeof e=="function"?e():e;return i.then(s=>{if(t.action){const o=typeof t.action=="function"?t.action(s):t.action;ts(n,he({},o,{state:"action",id:n}))}else{const o=typeof t.success=="function"?t.success(s):t.success;ts(n,he({},o,{state:"success",id:n}))}}).catch(s=>{const o=typeof t.error=="function"?t.error(s):t.error;ts(n,he({},o,{state:"error",id:n}))}),i},dismiss:Rs,clear:e=>we.update(t=>e?t.filter(n=>n.position!==e):[])};function Im({children:e,position:t="top-right",offset:n,options:i}){const[s,o]=p.useState(we.toasts),[r,a]=p.useState(),l=p.useRef(!1),c=p.useRef(new Map),u=p.useRef(s),d=p.useRef(void 0),f=p.useRef(new Map);p.useEffect(()=>{we.position=t,we.options=i},[t,i]);const m=p.useCallback(()=>{for(const w of c.current.values())clearTimeout(w);c.current.clear()},[]),y=p.useCallback(w=>{if(!l.current)for(const L of w){var R;if(L.exiting)continue;const M=sa(L);if(c.current.has(M))continue;const I=(R=L.duration)!=null?R:dn;I===null||I<=0||c.current.set(M,window.setTimeout(()=>Rs(L.id),I))}},[]);p.useEffect(()=>{const w=R=>o(R);return we.listeners.add(w),()=>{we.listeners.delete(w),m()}},[m]),p.useEffect(()=>{u.current=s;const w=new Set(s.map(sa)),R=new Set(s.map(L=>L.id));for(const[L,M]of c.current)w.has(L)||(clearTimeout(M),c.current.delete(L));for(const L of f.current.keys())R.has(L)||f.current.delete(L);y(s)},[s,y]);const T=p.useRef(null),x=p.useRef(null);T.current=p.useCallback(()=>{l.current||(l.current=!0,m())},[m]),x.current=p.useCallback(()=>{l.current&&(l.current=!1,y(u.current))},[y]);const v=p.useMemo(()=>{for(let w=s.length-1;w>=0;w--)if(!s[w].exiting)return s[w].id},[s]);p.useEffect(()=>{d.current=v,a(v)},[v]);const b=p.useCallback(w=>{let R=f.current.get(w);return R||(R={enter:L=>{a(M=>M===w?M:w),T.current==null||T.current.call(T,L)},leave:L=>{a(M=>M===d.current?M:d.current),x.current==null||x.current.call(x,L)},dismiss:()=>Rs(w)},f.current.set(w,R),R)},[]),S=p.useCallback(w=>{if(n===void 0)return;const R=typeof n=="object"?n:{top:n,right:n,bottom:n,left:n},L={},M=I=>typeof I=="number"?`${I}px`:I;return w.startsWith("top")&&R.top&&(L.top=M(R.top)),w.startsWith("bottom")&&R.bottom&&(L.bottom=M(R.bottom)),w.endsWith("left")&&R.left&&(L.left=M(R.left)),w.endsWith("right")&&R.right&&(L.right=M(R.right)),L},[n]),j=p.useMemo(()=>{const w=new Map;for(const L of s){var R;const M=(R=L.position)!=null?R:t,I=w.get(M);I?I.push(L):w.set(M,[L])}return w},[s,t]);return h.jsxs(h.Fragment,{children:[e,Array.from(j,([w,R])=>{const L=Mm(w),M=Dm(w);return h.jsx("section",{"data-sileo-viewport":!0,"data-position":w,"aria-live":"polite",style:S(w),children:R.map(I=>{const B=b(I.id);return h.jsx(Rm,{id:I.id,state:I.state,title:I.title,description:I.description,position:L,expand:M,icon:I.icon,fill:I.fill,styles:I.styles,button:I.button,roundness:I.roundness,exiting:I.exiting,autoExpandDelayMs:I.autoExpandDelayMs,autoCollapseDelayMs:I.autoCollapseDelayMs,refreshKey:I.instanceId,canExpand:r===void 0||r===I.id,onMouseEnter:B.enter,onMouseLeave:B.leave,onDismiss:B.dismiss},I.id)})},w)})]})}const hr=()=>({success:(o,r)=>Sn.success({title:o,description:r}),error:(o,r)=>Sn.error({title:o,description:r}),info:(o,r)=>Sn.info({title:o,description:r}),warning:(o,r)=>Sn.warning({title:o,description:r}),promise:(o,r)=>Sn.promise(o,r)}),oc=p.createContext(),Nm=({children:e})=>{const{sileoToastEnabled:t,customDeviceType:n}=Le(),{success:i,error:s,info:o,warning:r}=hr(),a=ga(),[l,c]=p.useState(!1),[u,d]=p.useState(),[f,m]=p.useState(),y=n||a.type,S={showAlert:l,setShowAlert:c,typeAlert:u,setTypeAlert:d,messageAlert:f,setMessageAlert:m,alertConfig:{danger:{bgColor:"bg-danger",textColor:"text-danger-text",buttonBg:"bg-danger",hoverBg:"hover:bg-danger-hover",focusRing:"focus:ring-danger-progress",progressColor:"bg-danger-progress"},info:{bgColor:"bg-info",textColor:"text-info-text",buttonBg:"bg-info",hoverBg:"hover:bg-info-hover",focusRing:"focus:ring-info-progress",progressColor:"bg-info-progress"},success:{bgColor:"bg-success",textColor:"text-success-text",buttonBg:"bg-success",hoverBg:"hover:bg-success-hover",focusRing:"focus:ring-success-progress",progressColor:"bg-success-progress"},warning:{bgColor:"bg-warning",textColor:"text-warning-text",buttonBg:"bg-warning",hoverBg:"hover:bg-warning-hover",focusRing:"focus:ring-warning-progress",progressColor:"bg-warning-progress"}},getIcon:j=>{switch(j){case"danger":return h.jsx(Yc,{className:"w-[20px] h-[20px]"});case"info":return h.jsx(Kc,{className:"w-[20px] h-[20px]"});case"success":return h.jsx(su,{className:"text-xl"});case"warning":return h.jsx(Xc,{className:"w-[20px] h-[20px]"})}},closeAlert:()=>{c(!l)},activeAlert:(j,w,R=null)=>{if(c(!1),t&&!R&&["mobile","tablet"].includes(y)){switch(j){case"danger":s("Errore",w);break;case"info":o("Info",w);break;case"success":i("Successo",w);break;case"warning":r("Attenzione",w);break;default:o("Info",w)}return}setTimeout(()=>{d(j),m(w),c(!0)},50)}};return h.jsx(oc.Provider,{value:S,children:e})},Ct=()=>{const e=p.useContext(oc);if(e===void 0)throw new Error("Non puoi modificare l'alert");return e};let Gt;const ac=async(e,t,n,i)=>{if(Gt)return Gt;try{const o=await(await fetch("/config.json")).json(),r=o.baseUri,{unauthorized:a,notFound:l,defaultMessage:c}=o.axiosErrors;return Gt=oa.create({baseURL:r}),Gt.interceptors.request.use(u=>{const d=JSON.parse(localStorage.getItem("accessToken"));return d?u.headers.Authorization=`Bearer ${d}`:delete u.headers.Authorization,u}),Gt.interceptors.response.use(u=>u,u=>{if(u.response)switch(u.response.status){case 401:localStorage.removeItem("accessToken"),e==null||e("danger",a),t==null||t();break;case 404:e==null||e("danger",l),n==null||n(u);break;default:e==null||e("danger",`${c} ${u.response.status||""} ${u.response.data.error||""}`),i==null||i(u)}return Promise.reject(u)}),Gt}catch(s){console.error(s)}},Ms=(e,t)=>{const[n,i]=p.useState(()=>{try{const r=localStorage.getItem(t);return r===null?(localStorage.setItem(t,JSON.stringify(e)),e):JSON.parse(r)}catch(r){return console.error("Errore nel recupero dal localStorage:",r),e}});return[n,r=>{i(a=>{const l=typeof r=="function"?r(a):r;return localStorage.setItem(t,JSON.stringify(l)),l})},(r=!1)=>{r?localStorage.clear():localStorage.removeItem(t),i(e)}]},hn=()=>{const[e,t,n]=Ms(null,"accessToken"),[i,s,o]=Ms(null,"user");return{token:e,user:i,setToken:t,setUser:s,storageLogout:()=>{n(),o()}}},lc=p.createContext(),Bm=({children:e})=>{const{heartbeatEndpoint:t,firstPrivatePath:n,infiniteSession:i,timeDeducted:s,authenticatedEndpoint:o,autoLogin:r,setCurrentDate:a,isDebug:l,backendToken:c,useCustomLoginTimeout:u,stopLoaderOnFinish:d,customLoginTimeout:f,tokenLog:m,timerInfiniteSession:y}=Le(),{setIsLoading:T,showLoadingFor:x}=It(),{setShowAlert:v,activeAlert:b}=Ct(),{token:S,setToken:j,setUser:w,storageLogout:R}=hn(),L=U.useNavigate(),[M,I]=p.useState(null),[B,J]=p.useState(),[ye,ve]=p.useState(),[Q,z]=p.useState(!1),se=async(oe=G,ee,W)=>await ac(b,oe,ee,W),q=async(oe=null,ee)=>{oe&&oe.preventDefault(),z(!0);try{u?x(f):T(!0),v(!1);const ae=await(await se()).post(o,{auth:ee}),Y=ae.headers.token,Pe=ae.data;Y&&(w(Pe),j(Y),I(!0),L(`${n}${Pe.id}`))}catch(W){console.error(W),T(!1)}finally{z(!1),!u&&d&&T(!1)}},G=()=>{R(),I(!1)},re=async()=>{try{const W=(await(await se()).get(`${t}`)).headers.token;j(W),l&&console.log("[Auth]: Nuovo token: ",W,"Data:",a())}catch(oe){console.error(oe),G()}},te=oe=>{const ee=oe||S;if(!ee)return;const W="Token non valido";try{const ae=yr(ee);if(!ae.exp){m&&console.warn("[Auth]: Token senza data di scadenza, eseguo logout."),G(),b("danger",W);return}const Y=Math.floor(Date.now()/1e3),Pe=(ae.exp-Y)*1e3;if(Pe<=0){m&&console.warn("[Auth]: Token scaduto, eseguo logout."),G(),b("danger",W);return}ve(Pe),J(Pe-s);const Ke=Pe-s;if(m){const Xe=Math.floor(Pe/1e3),Ze=Math.floor(Xe/60),dt=Xe%60;console.log(`[Auth]: Token valido per ancora: ${Ze} minuti e ${dt} secondi`),console.log("[Auth]: Token:",S)}return Ke}catch(ae){m&&console.error("[Auth]: Errore nella decodifica del token:",ae),G(),b("danger",W)}},pe=oe=>{if(!oe)return!1;try{const ee=yr(oe),W=Math.floor(Date.now()/1e3);return!ee.exp||ee.exp<W?(console.warn("[Auth]: Token scaduto o non valido"),!1):!0}catch(ee){return console.error("[Auth]: Token non valido o corrotto",ee),!1}},Nt=async oe=>{try{const ae=(await(await se()).get(t)).data;ae&&(w(ae),j(oe),I(!0),L(`${n}${ae.id}`))}catch(ee){console.error(ee)}},qe=()=>{pe(S)?(m&&console.log("[Auth]: Ricarico pagina → controllo scadenza token"),te(S)):(m&&console.warn("[Auth]: Token non valido al reload, eseguo logout"),G())};p.useEffect(()=>{if(!pe(S)){G();return}I(!0)},[]),p.useEffect(()=>{r&&!M&&!Q&&(m&&console.log("[Auth]: Tentativo di autologin con backendToken"),Nt(c))},[r,M,Q]),p.useEffect(()=>{if(document.readyState==="complete")qe();else return window.addEventListener("load",qe),()=>window.removeEventListener("load",qe)},[]),p.useEffect(()=>{if(r)return;const oe=te(S),ee=y||oe;m&&console.log("[Auth]: intervallo per il prossimo token:",ee);let W;i&&S&&oe&&(m&&console.log("[Auth]: Entrato dentro il timer della sessione infinita"),W=setInterval(()=>{re()},ee));let ae;return!i&&S&&(m&&console.log("[Auth]: Entrato dentro il timer della sessione con scadenza del token"),ae=setTimeout(()=>{G(),b("danger","Sessione scaduta")},ye)),()=>{W&&clearInterval(W),ae&&clearTimeout(ae)}},[S,B]);const Ye={isAuthenticated:M,setIsAuthenticated:I,login:q,logout:G,createAxiosInstances:se,fetchHeartbeat:re,getTokenExpiry:te,checkTokenValidity:pe,fetchUser:Nt,handleLoad:qe};return h.jsx(lc.Provider,{value:Ye,children:e})},Fn=()=>{const e=p.useContext(lc);if(e===void 0)throw new Error("Non sei dentro al Auth Provider");return e},cc=p.createContext(),_m=({children:e,publicRoutes:t=[],privateRoutes:n=[]})=>h.jsx(cc.Provider,{value:{publicRoutes:t,privateRoutes:n},children:e}),uc=()=>{const e=p.useContext(cc);if(e===void 0)throw new Error(`Errore: Le rotte non sono state inizializzate correttamente.
|
|
103
103
|
|
|
104
104
|
Soluzione: Assicurati di avvolgere il tuo componente con <RouteProvider>.
|
|
105
105
|
|
|
@@ -107,4 +107,4 @@ Esempio:
|
|
|
107
107
|
|
|
108
108
|
<RouteProvider publicRoutes={[]} privateRoutes={[]}>
|
|
109
109
|
<MyPackageRoutes />
|
|
110
|
-
</RouteProvider>`);return e},fc=p.createContext(),Fm=({children:e})=>{const{login:t}=Fn(),{clearLoginFormOnError:n}=Le(),i={email:"",password:""},[s,o]=p.useState("Accedi"),[r,a]=p.useState("Email"),[l,c]=p.useState("email"),[u,d]=p.useState("example@example.it"),[f,m]=p.useState("Accedi"),[y,T]=p.useState(i),[x,v]=p.useState(),[b,S]=p.useState(),[j,w]=p.useState(),[R,L]=p.useState(),[M,I]=p.useState({}),[B,J]=p.useState(null),Q={overrideStyle:M,setOverrideStyle:I,title:s,setTitle:o,label:r,setLabel:a,type:l,setType:c,placeholder:u,setPlaceholder:d,buttonText:f,setButtonText:m,formData:y,setFormData:T,LogoImg:x,setLogoImg:v,styleCardForm:b,setStyleCardForm:S,styleContainerLogo:j,setStyleContainerLogo:w,styleLogo:R,setStyleLogo:L,changeData:($,se)=>{T(q=>({...q,[$]:se}))},handleLogin:$=>{t($,y),n&&T(i)},customVersion:B,setCustomVersion:J};return h.jsx(fc.Provider,{value:Q,children:e})},mr=()=>{const e=p.useContext(fc);if(e===void 0)throw new Error("Non puoi modificare La login");return e},hc=p.createContext(),zm=({children:e})=>{const[t,n]=p.useState(!1),[i,s]=p.useState(null),[o,r]=p.useState(""),[a,l]=p.useState(null),[c,u]=p.useState(null),[d,f]=p.useState(null),[m,y]=p.useState("modal-form"),[T,x]=p.useState("submit"),[v,b]=p.useState({}),[S,j]=p.useState(null),[w,R]=p.useState(null),[L,M]=p.useState(null),I=({modalData:Q,component:$,title:se="",onConfirm:q=null,type:G="submit",formId:re="modal-form",item:te=null,style:pe})=>{j(Q),s(()=>$),r(se),l(()=>q),x(G),y(re),f(te),b(pe),n(!0)},B=()=>{s(null),r(""),l(null),x("submit"),y("modal-form"),f(null),b({}),n(!1),j(null)},ve={isOpen:t,openModal:I,closeModal:B,content:i,title:o,onConfirm:a,type:T,item:d,formId:m,style:v,modalData:S,setModalData:j,handleChange:Q=>{const{name:$,value:se}=Q.target;j(q=>({...q,[$]:se}))},handleSubmit:Q=>{Q.preventDefault(),a&&(a(S),B())},headerContent:w,setHeaderContent:R,footerContent:L,setFooterContent:M,onCancel:c,setOnCancel:u};return h.jsx(hc.Provider,{value:ve,children:e})},pc=()=>{const e=p.useContext(hc);if(e===void 0)throw new Error("Non sei all'interno del ModalProvider");return e},mc=(e=[],t="SPOT")=>{const n=U.useLocation();p.useLayoutEffect(()=>{let i=t;for(const s of e)if(U.matchPath({path:s.path,end:!0},n.pathname)){i=s.title;break}document.title=i},[n,e,t])},$m=(e,t,n=1)=>{const i=p.useRef(null),[s,o]=p.useState(!1),r=p.useCallback(m=>new Promise((y,T)=>{if(!i.current){T("DB non pronto");return}const b=i.current.transaction(t,"readonly").objectStore(t).get(m);b.onsuccess=()=>y(b.result),b.onerror=S=>T(S.target.error)}),[t]),a=p.useCallback(()=>new Promise((m,y)=>{if(!i.current)return y("DB non pronto");const v=i.current.transaction(t,"readonly").objectStore(t).getAll();v.onsuccess=()=>m(v.result),v.onerror=b=>y(b.target.error)}),[t]),l=p.useCallback(m=>new Promise((y,T)=>{if(!i.current){T("DB non pronto");return}const b=i.current.transaction(t,"readwrite").objectStore(t).put(m);b.onsuccess=()=>y(b.result),b.onerror=S=>T(S.target.error)}),[t]),c=p.useCallback(async()=>{let m=Date.now();for(;await r(m);)m++;return m},[r]),u=p.useCallback(async m=>(m.id||(m.id=await c()),l(m)),[c,l]),d=p.useCallback(m=>new Promise((y,T)=>{if(!i.current){T("DB non pronto");return}const b=i.current.transaction(t,"readwrite").objectStore(t).delete(m);b.onsuccess=()=>y(!0),b.onerror=S=>T(S.target.error)}),[t]),f=p.useCallback(()=>new Promise((m,y)=>{if(!i.current){y("DB non pronto");return}const v=i.current.transaction(t,"readwrite").objectStore(t).clear();v.onsuccess=()=>m(!0),v.onerror=b=>y(b.target.error)}),[t]);return p.useEffect(()=>{const m=indexedDB.open(e,n);return m.onupgradeneeded=y=>{const T=y.target.result;T.objectStoreNames.contains(t)||T.createObjectStore(t,{keyPath:"id"})},m.onsuccess=y=>{i.current=y.target.result,o(!0)},m.onerror=y=>{console.error("IndexedDB error",y.target.error)},()=>{var y;(y=i.current)==null||y.close()}},[e,t,n]),{get:r,getAll:a,set:l,setWithAutoId:u,remove:d,clear:f,isReady:s}},Um=()=>{const[e,t]=p.useState(window.innerWidth>window.innerHeight?"landscape":"portrait");return p.useEffect(()=>{const n=()=>{t(window.innerWidth>window.innerHeight?"landscape":"portrait")};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e},gc=(e={getValues:!1})=>{const{getValues:t}=e,[n,i]=p.useState(0),s=()=>{const o=window.visualViewport?window.visualViewport.height:window.innerHeight,r=o*.01;document.documentElement.style.setProperty("--vh",`${r}px`),t&&i(o)};return p.useEffect(()=>(s(),window.addEventListener("resize",s),window.addEventListener("orientationchange",s),()=>{window.removeEventListener("resize",s),window.removeEventListener("orientationchange",s)}),[t]),t?{height:n,vh:n*.01}:null};function yc(e){return St({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0c-4.355 0-7.898 3.481-7.998 7.812 0.092-3.779 2.966-6.812 6.498-6.812 3.59 0 6.5 3.134 6.5 7 0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-4.418-3.582-8-8-8zM8 16c4.355 0 7.898-3.481 7.998-7.812-0.092 3.779-2.966 6.812-6.498 6.812-3.59 0-6.5-3.134-6.5-7 0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5c0 4.418 3.582 8 8 8z"},child:[]}]})(e)}const vc=()=>{const{loadingProps:e,loadingComponent:t}=It(),{spinner:n=!0,spinnerStyle:i,text:s,textStyle:o,children:r,containerStyle:a,overrideStyle:l={}}=e;return t||h.jsxs("div",{className:l.container||`fixed top-0 bottom-0 left-0 right-0 flex items-center justify-center bg-loading-bg z-[999] ${a}`,children:[n&&h.jsx(yc,{className:l.spinner||`text-[20rem] relative animate-spin text-spinner ${i}`}),r||h.jsx("p",{className:l.text||`text-white text-2xl select-none absolute ${o}`,children:s||"Loading..."})]})};function Hm(e){return St({tag:"svg",attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(e)}const Ds=()=>{const{messageAlert:e,typeAlert:t,alertConfig:n,getIcon:i,closeAlert:s}=Pt(),{alertTimeout:o}=Le(),[r,a]=p.useState(0),{bgColor:l,textColor:c,buttonBg:u,hoverBg:d,focusRing:f,progressColor:m}=n[t];return p.useEffect(()=>{let y;const x=100/(o/100);y=setInterval(()=>{a(b=>b>=100?(clearInterval(y),100):b+x)},100);const v=setTimeout(()=>{s()},o);return()=>{clearTimeout(v),clearInterval(y)}},[]),h.jsxs("div",{className:` ${l} ${c} flex items-center min-h-[65px] max-h-[100px] p-4 pt-6 rounded-lg mx-auto max-sm:min-w-[240px] sm:max-w-1/3 fixed sm:top-[calc(100vh-100px)] top-[calc(100vh-115px)] sm:right-10 right-1/2 translate-x-1/2 sm:translate-0 z-100`,role:"alert",children:[h.jsx("div",{className:"w-full bg-gray-200 rounded-t-lg overflow-hidden h-2.5 absolute top-0 left-0 right-0",children:h.jsx("div",{className:`${m} h-2.5 rounded-t-lg`,style:{width:`${r}%`}})}),i(t),h.jsx("div",{className:"px-4 text-sm font-medium",children:e}),h.jsx("button",{type:"button",className:`ms-auto ${u} rounded-lg focus:ring-2 ${f} p-1.5 ${d} inline-flex items-center justify-center h-8 w-8 cursor-pointer`,title:"Close",onClick:s,children:h.jsx(Hm,{className:"text-xl"})})]})},Wm=({onClose:e,onConfirm:t,onCancel:n,type:i,formId:s,style:o})=>{const r=o.resetButton??!0,a=o.confirmButtonText??(i==="delete"?"Elimina":"Salva"),l=o.cancelButtonText??"Annulla",c=o.bgSaveButton??"bg-indigo-600 rounded-lg shadow-md hover:bg-indigo-700 hover:shadow-lg active:bg-indigo-800 text-white",u=o.bgDeleteButton??"bg-rose-500 rounded-lg shadow-md hover:bg-rose-600 hover:shadow-lg active:bg-rose-700 text-white",d=o.bgResetButton??"bg-rose-500 rounded-lg shadow-md hover:bg-rose-600 hover:shadow-lg active:bg-rose-700 text-white",f=o.bgCancelButton??"text-gray-800 bg-gray-300 rounded-lg shadow-md hover:bg-gray-400 hover:shadow-lg active:bg-gray-500",m=i==="custom"?o.customButtonStyle:null,y={delete:()=>{t==null||t(),e==null||e()},custom:()=>{t==null||t()}};return h.jsxs("footer",{className:"flex items-center justify-between mt-4",children:[h.jsx("button",{onClick:n||e,className:`${f} px-4 py-2 cursor-pointer text-sm font-medium active:shadow-sm transition-all duration-150 ease-in-out hover:opacity-90 active:scale-95 active:opacity-70`,children:l}),h.jsxs("div",{className:"flex items-center gap-4",children:[i!=="delete"&&r&&h.jsx("button",{type:"reset",form:s,className:`px-4 py-2 cursor-pointer text-sm font-medium ${d} active:shadow-sm transition-all duration-150 ease-in-out hover:opacity-90 active:scale-95 active:opacity-70`,children:"Reset"}),h.jsx("button",{type:i==="submit"?"submit":"button",form:i==="submit"?s:void 0,onClick:()=>{var T;return(T=y[i])==null?void 0:T.call(y)},className:m||`${i==="delete"?u:c} px-4 py-2 cursor-pointer text-sm font-medium active:shadow-sm transition-all duration-150 ease-in-out hover:opacity-90 active:scale-95 active:opacity-70`,children:a})]})]})};function Gm(e){return St({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}const qm=({onClose:e,type:t,title:n,name:i,onCancel:s})=>h.jsxs("header",{className:`flex items-center justify-between mb-4 ${t==="delete"?"gap-8":""}`,children:[t==="delete"&&i?h.jsxs("h2",{className:"text-2xl",children:["Sei sicuro di volere eliminare: ",h.jsx("strong",{children:i}),"?"]}):h.jsx("h2",{className:"text-2xl",children:n||"Conferma operazione"}),h.jsx("button",{onClick:s||e,className:"text-gray-500 hover:text-gray-700 cursor-pointer transition-transform duration-150 ease-in-out hover:scale-110 hover:opacity-80 active:scale-95 active:opacity-60","aria-label":"Chiudi modale",children:h.jsx(Gm,{className:"text-2xl"})})]}),Ym=({type:e,children:t,item:n,overrideStyle:i})=>h.jsx(h.Fragment,{children:e!=="delete"&&h.jsx("main",{className:i||"my-8 max-h-[600px] overflow-y-auto overflow-x-hidden",children:e==="delete"&&!n?h.jsx("div",{className:"text-red-600 font-semibold",children:"Errore: nessun item selezionato per l'operazione."}):t})}),Km=({isOpen:e,onClose:t,onCancel:n,title:i,formId:s,children:o,item:r,onConfirm:a,type:l="submit",style:c={},headerContent:u,footerContent:d})=>{const f=p.useRef(null),[m,y]=p.useState(e),T=()=>{e||y(!1)},x=c.width??(l==="delete"?"max-w-md w-auto":"w-full max-w-4xl"),v=c.bgModal??"bg-white",b=c.bgOverlay??"bg-black/50",S=c.zIndex??"z-50";return p.useEffect(()=>{e&&y(!0)},[e]),p.useEffect(()=>{const j=w=>{w.key==="Escape"&&(n?n():t())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[t,n]),p.useEffect(()=>{var j;if(e){const w=document.activeElement;return(j=f.current)==null||j.focus(),()=>w==null?void 0:w.focus()}},[e]),m?la.createPortal(h.jsx("div",{className:`fixed inset-0 ${S} flex items-center justify-center transition-opacity duration-200 ${e?`${b} opacity-100`:"opacity-0"}`,onClick:n||t,onKeyDown:j=>{var w;j.key==="Escape"&&((w=n||t)==null||w())},onTransitionEnd:T,role:"button",tabIndex:0,"aria-label":"Chiudi modale",children:h.jsxs("div",{ref:f,className:`relative ${v} rounded-lg p-6 shadow-xl ${x} transform transition-transform duration-200 ${e?"scale-100 opacity-100":"scale-95 opacity-0"}`,onClick:j=>j.stopPropagation(),onKeyDown:j=>{j.key==="Escape"&&t()},role:"dialog","aria-modal":"true",tabIndex:-1,children:[u||h.jsx(qm,{onClose:t,onCancel:n,type:l,title:i,name:r==null?void 0:r.name}),h.jsx(Ym,{type:l,item:r,overrideStyle:c.overrideStyle,children:o}),d||h.jsx(Wm,{onClose:t,onCancel:n,onConfirm:a,type:l,formId:s,style:c})]})}),document.body):null};let Ls;try{Ls=require("virtual:pwa-register/react").useRegisterSW}catch{console.warn("[Prompt] vite-plugin-pwa non trovato: il Prompt PWA non funzionerà. Assicurati di avere vite-plugin-pwa installato nel progetto host se vuoi usare questo componente.Per installarlo, esegui: npm install vite-plugin-pwa --save-dev"),Ls=()=>({needRefresh:[!1],updateServiceWorker:()=>{}})}const Xm=()=>{const{isDebug:e}=Le(),[t,n]=p.useState(!1),[i,s]=p.useState(!1),{needRefresh:o,updateServiceWorker:r}=Ls({onRegisteredSW(a,l){e&&console.log("Service Worker registrato:",a),l&&l.waiting&&(e&&console.log("Un nuovo Service Worker è disponibile:",l.waiting),i||n(!0))},onRegisterError(a){console.error("Errore nella registrazione del Service Worker:",a)}});return p.useEffect(()=>{o[0]&&!i&&n(!0)},[o,i]),t?h.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-black/50 z-50 px-4",children:h.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center w-80",children:[h.jsx("h2",{className:"text-xl font-bold mb-2",children:"Aggiornamento disponibile"}),h.jsx("p",{className:"text-gray-600 mb-4",children:"È disponibile una nuova versione dell'app. Vuoi aggiornare?"}),h.jsxs("div",{className:"flex gap-4 justify-center",children:[h.jsx("button",{onClick:()=>{r(!0),window.location.reload()},className:"bg-blue-500 text-white px-4 py-2 rounded-lg shadow-md transition duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer",children:"Aggiorna"}),h.jsx("button",{onClick:()=>{n(!1),s(!0)},className:"bg-gray-300 px-4 py-2 rounded-lg shadow-md transition duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer",children:"Annulla"})]})]})}):null},bc=e=>{const{isLoading:t}=It(),{showAlert:n}=Pt(),{sileoToastConfig:i,pwa:s}=Le(),{isOpen:o,closeModal:r,onCancel:a,content:l,title:c,onConfirm:u,item:d,type:f,formId:m,style:y,headerContent:T,footerContent:x}=pc(),v=U.useLocation(),{isMain:b=!0,headerComponent:S=null,showHeaderOnLogin:j=!1,headerExcludedRoutes:w=[],footerComponent:R=null,showFooterOnLogin:L=!1,footerExcludedRoutes:M=[]}=e,I={fill:"#000000",duration:2e3,styles:{title:"text-white font-semibold",description:"text-white/75",badge:"bg-white/20"}},B=i==null?void 0:i.position,J=(i==null?void 0:i.options)||I,ye=w.some(se=>U.matchPath(se,v.pathname));let ve;v.pathname==="/"?ve=S&&j:ve=S&&!ye;const Q=M.some(se=>U.matchPath(se,v.pathname));let $;return v.pathname==="/"?$=R&&L:$=R&&!Q,h.jsxs(h.Fragment,{children:[s&&s.customPrompt&&h.jsx(Xm,{}),t&&h.jsx(vc,{}),n&&h.jsx(Ds,{}),h.jsx(Im,{position:B||"bottom-right",options:J}),h.jsx(Km,{isOpen:o,onClose:r,onCancel:a,title:c,formId:m,onConfirm:u,type:f,item:d,style:y,headerContent:T,footerContent:x,children:l}),ve&&S,b?h.jsxs("main",{className:t?"hidden":"",children:[n&&h.jsx(Ds,{}),h.jsx(U.Outlet,{})]}):h.jsx(U.Outlet,{}),$&&R]})},wi=e=>{const{inputType:t,inputId:n,inputPlaceholder:i,inputRequired:s,inputValue:o,inputChange:r,inputName:a,autoFocus:l,inputStyle:c,overrideStyle:u,disabled:d}=e,m=["text","email","password","search","tel","url"].includes(t)?t:"text";return h.jsx("input",{type:m,autoFocus:l,id:n,className:u||`bg-input-bg border border-input-border text-input-text text-input-placeholder input-rounded focus:ring focus:ring-primary focus:border-primary focus:outline-none focus:shadow-(--shadow-primary-input) block w-full p-input ${c}`,placeholder:i,required:s??!0,value:o,onChange:r,disabled:d,name:a})},Si=({label:e,labelId:t,labelStyle:n,overrideStyle:i})=>h.jsx("label",{htmlFor:t,className:i||`show-label mb-1 sm:mb-2 text-input-label font-medium text-color-label ${n}`,children:e}),xc=()=>{const{title:e,label:t,type:n,placeholder:i,buttonText:s,formData:o,changeData:r,handleLogin:a,overrideStyle:l}=mr();return h.jsxs("form",{onSubmit:a,className:l.form||"form-size",children:[h.jsx("h1",{className:l.title||"text-form-title-size show-title title-position m-form-title",children:e}),h.jsxs("div",{className:l.containerEmail||"flex justify-center flex-col gap-1 m-input-form input-size mx-auto",children:[h.jsx(Si,{labelId:"user-email",label:t}),h.jsx(wi,{inputType:n,inputId:"user-email",inputPlaceholder:i,inputValue:o.email,inputChange:c=>{r("email",c.target.value)},autoFocus:!0})]}),h.jsxs("div",{className:l.containerPassword||"flex justify-center flex-col gap-1 my-4 input-size mx-auto",children:[h.jsx(Si,{labelId:"password",label:"Password"}),h.jsx(wi,{inputType:"password",inputId:"password",inputPlaceholder:"Password",inputValue:o.password,inputChange:c=>{r("password",c.target.value)}})]}),h.jsx("div",{className:l.containerButton||"flex button-position items-center m-primary-button",children:h.jsx("button",{className:l.button||"font-bold cursor-pointer shadow-(--shadow-primary) transition-all duration-200 hover:shadow-(--shadow-primary-hover) active:shadow-(--shadow-primary-active) active:translate-y-[2px] p-primary-button rounded-primary-button bg-primary hover:bg-primary-hover text-primary-text",children:s})})]})},wc=({Logo:e})=>{const{styleCardForm:t,styleContainerLogo:n,styleLogo:i,overrideStyle:s,customVersion:o}=mr(),{firstPrivatePath:r,version:a}=Le(),{token:l,user:c}=hn();gc();const u=U.useNavigate();return p.useEffect(()=>{l&&(c!=null&&c.id)&&u(`${r}${c.id}`)},[]),h.jsxs("section",{id:"login-page",children:[(a||o)&&h.jsx("div",{style:{top:"calc(1rem + env(safe-area-inset-top))",left:"calc(1rem + env(safe-area-inset-left))"},className:"text-md text-primary absolute",children:o||a}),h.jsx("div",{className:s.container||"container mx-auto flex items-center justify-center min-h-screen",children:h.jsxs("div",{className:s.cardForm||`bg-form card-style card-size flex flex-col sm:flex-row sm:items-center justify-center ${t}`,children:[h.jsx("div",{className:s.containerLogo||`basis-1/2 flex items-center justify-center ${n}`,children:e&&h.jsx(e,{className:s.logo||`login-logo h-full sm:h-auto ${i}`})}),h.jsx(xc,{})]})})]})},Pn=()=>{const{isAuthenticated:e}=Fn(),{activeAlert:t}=Pt(),{autoLogin:n}=Le(),{token:i}=hn();return p.useEffect(()=>{!e&&!i&&!n&&t("danger","Non sei autorizzato")},[]),e===null?null:e?h.jsx(U.Outlet,{}):h.jsx(U.Navigate,{to:"/",replace:!0})},Sc=({value:e,defaultValue:t=!1,onChange:n})=>{const i=e!==void 0,[s,o]=p.useState(t),r=i?e:s,a=()=>{const l=!r;i||o(l),n&&n(l)};return p.useEffect(()=>{i||o(t)},[t,i]),h.jsx("button",{type:"button",onClick:a,className:`w-14 h-6 flex items-center rounded-full p-1 transition-colors cursor-pointer ${r?"bg-blue-500":"bg-gray-300"}`,"aria-pressed":r,children:h.jsx("div",{className:`bg-white w-4 h-4 rounded-full shadow-md transform transition-transform ${r?"translate-x-8":"translate-x-0"}`})})},Tc=()=>{const{logout:e,createAxiosInstances:t}=Fn(),{usersEndpoint:n}=Le(),{setIsLoading:i}=It(),{activeAlert:s}=Pt(),{token:o,user:r}=hn(),{success:a,error:l,info:c,warning:u,promise:d}=pr(),[f,m]=p.useState(null),[y,T]=p.useState(!1),[x,v]=p.useState(!1),b=(B,J)=>d(B,{loading:{title:J.loading||"Caricamento..."},success:{title:J.success||"Fatto!"},error:{title:J.error||"Errore!"}}),S=async()=>{try{if(T(!0),!o){e(),s("danger","Sessione Scaduta");return}const B=await t(),ye=(await b(B.get(`${n}`),{loading:"Caricamento utenti...",success:"Utenti caricati!"})).data;m(ye)}catch(B){console.error(B),i(!1)}finally{T(!1)}},j=B=>{v(B),s("info",`Alert impostato su ${B?"Mobile":"Desktop"} `)},w=(B="Operazione riuscita!")=>{x?a("Successo",B):s("success",B,!0)},R=(B="Si è verificato un errore!")=>{x?l("Errore",B):s("danger",B,!0)},L=(B="Informazione generica")=>{x?c("Info",B):s("info",B,!0)},M=(B="Attenzione!")=>{x?u("Attenzione",B):s("warning",B,!0)},I=()=>{e(),s("info","Hai effettuato il logout")};return h.jsx("section",{children:h.jsxs("div",{className:"container mx-auto py-8",children:[h.jsxs("div",{className:"flex items-center justify-center gap-8 h-20",children:[h.jsxs("h1",{className:"text-4xl text-center text-slate-800",children:["Email: ",r.email]}),h.jsx("button",{onClick:I,className:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded-full cursor-pointer shadow-[0_4px_10px_rgba(239,68,68,0.3),0_2px_4px_rgba(239,68,68,0.2)] hover:shadow-[0_6px_14px_rgba(185,28,28,0.4),0_3px_6px_rgba(185,28,28,0.3)] active:shadow-[0_2px_5px_rgba(239,68,68,0.3)] transition-all duration-200 active:translate-y-[2px]",children:"Logout"})]}),h.jsxs("div",{className:"flex justify-center items-center gap-4 my-8 flex-wrap",children:[h.jsx("button",{onClick:()=>w("Questo è un toast di successo!"),className:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-full shadow-md transition-all",children:"Success"}),h.jsx("button",{onClick:()=>R("Questo è un toast di errore!"),className:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded-full shadow-md transition-all",children:"Error"}),h.jsx("button",{onClick:()=>L("Questo è un toast informativo!"),className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full shadow-md transition-all",children:"Info"}),h.jsx("button",{onClick:()=>M("Questo è un toast di avviso!"),className:"bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded-full shadow-md transition-all",children:"Warning"}),h.jsxs("div",{className:"flex items-center gap-4 my-4",children:[h.jsx("span",{children:"Desktop"}),h.jsx(Sc,{value:x,onChange:j}),h.jsx("span",{children:"Mobile"})]})]}),h.jsx("div",{className:"flex justify-center items-center my-12 gap-8",children:h.jsx("button",{onClick:S,className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full disabled:bg-blue-300 disabled:text-gray-500 disabled:cursor-not-allowed cursor-pointer transition-all duration-200 active:translate-y-[2px] shadow-[0_4px_10px_rgba(59,130,246,0.3),0_2px_4px_rgba(59,130,246,0.2)] hover:shadow-[0_6px_14px_rgba(29,78,216,0.4),0_3px_6px_rgba(29,78,216,0.3)] active:shadow-[0_2px_5px_rgba(59,130,246,0.3)]",disabled:y,children:"Lista degli utenti"})}),h.jsx("div",{className:"flex justify-center items-center",children:f&&h.jsx("ul",{children:f.map(B=>h.jsxs("li",{className:"text-xl my-4",children:[B.id," - ",B.email]},`user-${B.id}`))})})]})})},Zm=e=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",xmlSpace:"preserve",id:"svg1",width:409.748,height:409.748,viewBox:"0 0 108.413 108.413",...e},V.createElement("defs",{id:"defs1"},V.createElement("linearGradient",{id:"linearGradient27"},V.createElement("stop",{id:"stop27",offset:0,style:{stopColor:"red",stopOpacity:1}}),V.createElement("stop",{id:"stop28",offset:1,style:{stopColor:"#ffca00",stopOpacity:.96862745}})),V.createElement("linearGradient",{xlinkHref:"#linearGradient27",id:"linearGradient28",x1:35.002,x2:143.414,y1:192.355,y2:83.942,gradientUnits:"userSpaceOnUse"})),V.createElement("g",{id:"layer1",transform:"translate(-35.002 -83.942)"},V.createElement("rect",{id:"rect26",width:108.413,height:108.413,x:35.002,y:83.942,rx:30,ry:30,style:{fill:"url(#linearGradient28)",fillOpacity:1,fillRule:"evenodd",stroke:"#ff9b01",strokeWidth:0,strokeOpacity:1,paintOrder:"stroke markers fill"}}),V.createElement("g",{id:"g1",style:{strokeWidth:1.10252},transform:"translate(9.37 14.003)scale(.90701)"},V.createElement("path",{id:"path272",d:"M103.624 105.014c-.27.002-.79.209-1.004.4a2.5 2.5 0 0 0-.313.395l-.181.277-.018 18.064-.018 18.064h-3.047v-9.75c0-10.412-.004-10.52-.345-11.948-1.398-5.861-6.243-10.128-12.213-10.755-1.515-.16-19.836-.16-20.462-.003l-.002-.004-19.984 3.575 18.852 2.16v6.078l-17.36 3.103 17.36 1.99v6.523l-17.36 3.103 14.275 1.636-.016 4.905-.019 5.726-.63.126c-1.587.315-3.197 1.068-4.528 2.117-2.206 1.737-3.742 4.446-4.053 7.144-.37 3.213.552 6.199 2.657 8.602 1.688 1.926 4.174 3.26 6.696 3.592.824.108 2.933.031 3.671-.134.932-.21 1.79-.515 2.637-.939 2.065-1.033 3.824-2.775 4.827-4.784.504-1.01.91-2.207 1.026-3.029l.047-.329h18.828v.214c0 .117.064.468.142.78.904 3.589 3.509 6.46 6.975 7.686 1.343.475 1.946.568 3.655.564 1.32-.003 1.612-.025 2.182-.158 3.368-.785 6.026-2.86 7.515-5.865.44-.89.882-2.203.972-2.892l.043-.329 7.183-.002c7.08-.002 7.188-.003 7.495-.143.647-.293.9-.703.9-1.457 0-.569-.168-.945-.55-1.225-.505-.373-.225-.36-7.9-.36h-7.115l-.117-.597c-.261-1.329-.848-2.71-1.682-3.957-.57-.854-2.02-2.296-2.864-2.852-1.214-.798-2.805-1.463-4-1.673l-.502-.088-.018-21.17-.018-21.17-.154-.312c-.258-.521-.88-.903-1.465-.9zm9.34.76c-1.961 0-3.686 1.068-4.532 2.806-.536 1.103-.53 1.026-.507 6.443l.02 4.78.189.556c.62 1.83 2.225 3.176 4.083 3.424.241.032 2.715.053 5.496.046 5.705-.015 5.342.017 6.547-.574.548-.269.757-.422 1.25-.918.49-.49.649-.709.917-1.252.538-1.096.535-1.045.535-6.262 0-4.846-.013-5.061-.328-5.862-.764-1.94-2.613-3.187-4.727-3.187h-.557l-.003 4.14-.003 4.139-1.878 1.49a123 123 0 0 1-1.964 1.54c-.056.033-.792-.513-2.034-1.507l-1.947-1.56v-8.242zm2.29.553v6.927l1.084.87c.596.478 1.106.86 1.132.85s.535-.41 1.132-.886l1.085-.866-.017-3.43-.017-3.429-2.2-.018zm-47.247 6.508 9.197.025c9.138.025 9.2.026 9.889.175 2.276.495 4.009 1.425 5.576 2.993 1.563 1.563 2.494 3.26 3.002 5.472.15.658.15.664.17 10.686l.018 10.028h-2.393l-2.91-2.91c-2.148-2.147-2.999-2.954-3.252-3.082l-.342-.174H68.007v-11.606zm44.87 16.355c-.846 0-1.356.1-1.977.386-1.351.623-2.296 1.666-2.771 3.059l-.184.539-.02 4.745c-.023 5.4-.023 5.392.503 6.478.506 1.043 1.244 1.779 2.297 2.294.347.17.83.351 1.073.404.354.077 1.48.097 5.603.1 5.817.004 5.683.015 6.749-.507 1.377-.674 2.299-1.8 2.674-3.27.13-.505.137-.783.137-5.222 0-4.448-.007-4.717-.137-5.237-.233-.926-.636-1.636-1.32-2.324-.515-.519-.69-.645-1.318-.948-.817-.396-1.263-.497-2.19-.497h-.646v8.223l-1.91 1.518c-1.049.834-1.938 1.527-1.974 1.54s-.938-.673-2.004-1.524l-1.939-1.548v-8.209zm2.377.554.004 3.447.004 3.446 1.052.845c.58.464 1.08.845 1.112.848s.555-.39 1.16-.874l1.101-.878v-6.834h-2.217zm-50.295 9.491H85.98l3.015 3.002c2.568 2.557 3.058 3.014 3.3 3.083.206.058 1.624.08 5.04.08h4.755v3.16l-.537.094c-1.12.195-2.648.81-3.729 1.498-1.69 1.076-3.119 2.7-3.994 4.536-.443.931-.884 2.341-.884 2.83v.214H74.119l-.046-.329c-.174-1.222-.844-2.861-1.707-4.174-.532-.809-1.996-2.292-2.8-2.836-1.322-.897-2.958-1.574-4.282-1.772l-.325-.05v-4.668z",style:{fill:"#000",strokeWidth:1.10252}}),V.createElement("path",{id:"path268",d:"M103.624 103.562c-.27.002-.79.209-1.004.4a2.5 2.5 0 0 0-.313.395l-.181.277-.018 18.064-.018 18.064h-3.047v-9.75c0-10.412-.004-10.52-.345-11.948-1.398-5.861-6.243-10.129-12.213-10.755-1.515-.16-19.836-.16-20.462-.003l-.002-.004-19.984 3.575 18.852 2.16v6.078l-17.36 3.103 17.36 1.99v6.523l-17.36 3.103 14.275 1.635-.016 4.906-.019 5.726-.63.125c-1.587.316-3.197 1.069-4.528 2.118-2.206 1.737-3.742 4.445-4.053 7.144-.37 3.213.552 6.199 2.657 8.602 1.688 1.926 4.174 3.26 6.696 3.592.824.108 2.933.031 3.671-.134.932-.21 1.79-.515 2.637-.939 2.066-1.033 3.824-2.775 4.827-4.784.504-1.01.91-2.207 1.027-3.029l.046-.33h18.828v.215c0 .117.064.468.142.779a10.96 10.96 0 0 0 6.975 7.687c1.343.475 1.946.568 3.655.564 1.32-.003 1.613-.025 2.182-.158 3.368-.785 6.027-2.86 7.515-5.865.44-.89.882-2.204.972-2.892l.043-.33 7.183-.001c7.08-.002 7.188-.003 7.495-.143.647-.293.9-.703.9-1.457 0-.569-.168-.945-.55-1.225-.505-.373-.225-.36-7.899-.36h-7.116l-.117-.597c-.261-1.329-.848-2.71-1.682-3.958-.57-.853-2.02-2.295-2.864-2.85-1.214-.799-2.805-1.465-4-1.674l-.502-.088-.018-21.17-.018-21.17-.154-.312c-.258-.521-.88-.903-1.465-.9zm9.34.76c-1.961 0-3.686 1.068-4.532 2.806-.536 1.103-.53 1.026-.507 6.443l.02 4.78.189.556c.62 1.83 2.225 3.176 4.083 3.424.241.032 2.715.053 5.496.046 5.705-.015 5.343.017 6.547-.574.548-.269.757-.422 1.25-.918.49-.49.65-.709.917-1.252.539-1.096.535-1.045.535-6.262 0-4.846-.012-5.061-.328-5.862-.764-1.94-2.613-3.187-4.727-3.187h-.557l-.003 4.14-.003 4.139-1.878 1.49a116 116 0 0 1-1.964 1.54c-.056.033-.792-.513-2.034-1.507l-1.947-1.56v-8.242zm2.29.553v6.927l1.084.87c.597.478 1.106.86 1.132.85s.535-.41 1.132-.886l1.085-.866-.017-3.43-.017-3.429-2.2-.018zm-47.247 6.508 9.197.025c9.138.025 9.2.026 9.889.175 2.276.495 4.009 1.425 5.576 2.993 1.563 1.563 2.494 3.26 3.002 5.472.15.658.15.664.17 10.686l.018 10.028h-2.393l-2.91-2.91c-2.148-2.147-2.999-2.954-3.252-3.082l-.342-.174H68.007V122.99zm44.87 16.355c-.846 0-1.356.1-1.976.386-1.352.623-2.297 1.666-2.772 3.059l-.184.539-.02 4.745c-.023 5.4-.023 5.392.503 6.477.507 1.044 1.244 1.78 2.297 2.295.347.17.83.351 1.073.404.354.077 1.48.097 5.603.1 5.817.005 5.683.015 6.749-.507 1.377-.674 2.299-1.8 2.674-3.27.13-.505.137-.783.137-5.222 0-4.448-.007-4.717-.137-5.237-.233-.926-.636-1.636-1.32-2.324-.515-.519-.69-.645-1.318-.948-.817-.396-1.263-.497-2.19-.497h-.646v8.223l-1.91 1.518c-1.049.834-1.938 1.527-1.974 1.54s-.938-.673-2.004-1.524l-1.939-1.548v-8.209zm2.377.554.004 3.447.004 3.446 1.052.844c.58.465 1.08.846 1.112.849s.555-.39 1.16-.874l1.101-.878v-6.834h-2.217zm-50.295 9.491H85.98l3.015 3.002c2.568 2.557 3.058 3.014 3.3 3.083.206.058 1.624.08 5.04.08h4.755v3.16l-.537.094c-1.12.195-2.648.809-3.729 1.498-1.69 1.076-3.118 2.7-3.994 4.536-.443.931-.884 2.341-.884 2.83v.214H74.119l-.046-.329c-.174-1.222-.844-2.861-1.707-4.174-.532-.809-1.996-2.292-2.8-2.836-1.322-.897-2.958-1.574-4.282-1.773l-.325-.048v-4.669z",style:{fill:"#fff",strokeWidth:1.10252}})))),Jm=e=>{const{publicRoutes:t,privateRoutes:n}=dc(),{firstPrivatePath:i,routes:s,defaultTitle:o}=Le();mc(s,o);const{logoImg:r=Zm,pathImg:a="./src/assets/MyWarehouse.svg",firstPrivateElement:l=h.jsx(Tc,{}),globalLayout:c,isMain:u,headerComponent:d,showHeaderOnLogin:f,headerExcludedRoutes:m,footerComponent:y,showFooterOnLogin:T,footerExcludedRoutes:x,privateProvider:v,customProvider:b}=e;let S;c==="none"?S=null:p.isValidElement(c)?S=c:S=h.jsx(bc,{isMain:u,headerComponent:d,showHeaderOnLogin:f,headerExcludedRoutes:m,footerComponent:y,showFooterOnLogin:T,footerExcludedRoutes:x});const j=p.useMemo(()=>v?p.cloneElement(v,{},b?p.cloneElement(b,{},h.jsx(Pn,{children:h.jsx(U.Outlet,{})})):h.jsx(Pn,{children:h.jsx(U.Outlet,{})})):b?p.cloneElement(b,{},h.jsx(Pn,{children:h.jsx(U.Outlet,{})})):h.jsx(Pn,{children:h.jsx(U.Outlet,{})}),[v,b]),w=()=>{const R=document.querySelector("link[rel='icon']");a&&(R.href=a)};return p.useEffect(()=>{w()},[]),h.jsx(U.Routes,{children:h.jsxs(U.Route,{element:S,children:[h.jsxs(U.Route,{path:"/",children:[h.jsx(U.Route,{index:!0,element:h.jsx(wc,{Logo:r})}),t.map((R,L)=>h.jsx(U.Route,{path:R.path,element:R.element},`public-${L}`))]}),h.jsxs(U.Route,{element:j,children:[h.jsx(U.Route,{path:`${i??"/dashboard/"}:id`,element:l}),n.map((R,L)=>h.jsx(U.Route,{path:R.path,element:R.element},`private-${L}`))]})]})})},Qm=({children:e})=>{var s;const{user:t}=hn(),n=U.useLocation(),{activeAlert:i}=Pt();return p.useEffect(()=>{(!t||!t.admin)&&i("warning","Non puoi accedere a questa pagina")},[t]),!t||!t.admin?h.jsx(U.Navigate,{to:((s=n.state)==null?void 0:s.from)||"/",replace:!0}):e},e0=({spinner:e=!0,spinnerStyle:t,text:n,textStyle:i,children:s,containerStyle:o,overrideStyle:r={}})=>h.jsxs("div",{className:r.container||`w-full h-full relative flex items-center justify-center ${o}`,children:[e&&h.jsx(yc,{className:r.spinner||`text-[20rem] animate-spin text-black ${t}`}),s||h.jsx("p",{className:r.text||`text-black text-2xl select-none absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${i}`,children:n||"Loading..."})]}),Vs=({isTag:e=!1,value:t,label:n,placeholder:i,id:s,onChange:o,error:r=null})=>h.jsxs("div",{className:`flex items-center justify-center relative ${e?"gap-4 mb-2":"gap-1 m-4"}`,children:[h.jsx(Si,{labelId:s,label:n,overrideStyle:`text-xl font-bold text-color-label ${e?"":"basis-1/3"}`}),h.jsx(wi,{type:"text",inputId:s,inputPlaceholder:i,inputValue:t||"",disabled:e,inputChange:o,overrideStyle:`${e?"w-full":"basis-2/3"} ${r?"border-red-600 focus:ring focus:ring-red-600 focus:border-red-600 focus:shadow-[0_0_0_4px_rgba(255,0,0,0.5)]":""} bg-input-bg border border-input-border text-input-text text-input-placeholder input-rounded focus:ring focus:ring-focus-ring focus:border-spot-rfid-input-border focus:outline-none focus:shadow-spot-rfid-input block w-full p-input`}),r&&h.jsx("p",{className:"text-red-600 text-[13px] absolute bottom-0 left-26 translate-y-[20px]",children:r})]}),t0=({title:e,showTag:t,value:n,tag:i,showButton:s,handleClick:o})=>h.jsxs("div",{className:`border border-slate-300 rounded-xl p-2 m-2 shadow-xl transition-all duration-700 transform ${e==="TAG B"?"delay-200":"mb-4"} ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-10"}`,children:[h.jsx("h2",{className:"text-center mb-2 text-2xl",children:e}),h.jsx(Vs,{label:"TID",placeholder:`Leggi ${e}`,id:i?`tid-${i}`:"tid",isTag:!0,value:(n==null?void 0:n.valueTID)||""}),h.jsx(Vs,{label:"EPC",placeholder:`Leggi ${e}`,id:i?`epc-${i}`:"epc",isTag:!0,value:(n==null?void 0:n.valueEPC)||""}),!s&&h.jsx("div",{className:"flex items-center justify-center",children:h.jsx("button",{onClick:o,disabled:!(n!=null&&n.valueTID)&&!(n!=null&&n.valueEPC),className:"my-1 bg-write-button disabled:bg-write-button/40 text-white px-4 py-2 rounded-lg shadow-md disabled:transition-none disabled:active:translate-y-0 transition-all duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer uppercase",children:"Scrivi tag"})})]});function n0(e){return St({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.04 1.33L12.71 3l.29.71v.33h-.5l-.5.5v-.83l-1.67-1.67H10v4H4v-4H2v10h3l-.5 1H2l-1-1v-10l1-1h8.33l.71.29zM7 5h2V2H7v3zm6.5 0L15 6.5l-.02.69-5.5 5.5-.13.12-.37.37-.1.09-3 1.5-.67-.67 1.5-3 .09-.1.37-.37.12-.13 5.5-5.5h.71zm-6.22 7.24l-.52 1 1.04-.48-.52-.52zm.69-1.03l.79.79 5.15-5.15-.79-.79-5.15 5.15z"},child:[]}]})(e)}const i0=({minReadingPower:e,maxReadingPower:t,stepRangePower:n,rangeValue:i,setRangeValue:s,show:o,handleClick:r})=>{const a=(i-e)/(t-e)*100;return h.jsxs("div",{className:`border border-slate-300 rounded-xl p-2 m-2 shadow-xl transition-all duration-700 transform ${o?"opacity-100 translate-y-0":"opacity-0 translate-y-10"}`,children:[h.jsx("h2",{className:"text-center my-4 text-2xl",children:"Configurazione Potenza"}),h.jsxs("div",{className:"relative my-12 w-[90%] mx-auto",children:[h.jsx("input",{id:"power",type:"range",min:e,max:t,step:n,value:i,onChange:l=>s(Number(l.target.value)),className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-primary-accent"}),h.jsx("div",{className:"absolute bottom-8 transform -translate-x-1/2 bg-white border border-gray-200 text-sm text-gray-800 py-1 px-2 rounded-lg shadow-md transition-opacity",style:{left:`${a}%`},children:i})]}),h.jsx("div",{className:"flex items-center justify-center my-4",children:h.jsxs("button",{onClick:()=>r(i),className:"py-2 px-4 flex items-center justify-center gap-1 bg-save-button text-white rounded-lg shadow-md transition duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer",children:["Salva",h.jsx(n0,{})]})})]})},s0=({show:e,isConfigPage:t,handleSelectFile:n})=>h.jsxs("div",{className:`${t?`${e?"opacity-100 translate-y-0 delay-200":"opacity-0 translate-y-10"}`:""} p-4 text-center transition-all duration-700 transform`,children:[h.jsxs("h2",{className:"text-xl my-4",children:["Seleziona il file ",h.jsx("strong",{children:"config.json"})," per recuperare le chiavi univoche del dispositivo"]}),h.jsx("button",{onClick:n,className:"my-4 bg-blue-500 text-white px-4 py-2 rounded-lg",children:"Seleziona file"})]});function r0(e){return St({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M312 372c-7.7 0-14 6.3-14 14 0 9.9-8.1 18-18 18H94c-9.9 0-18-8.1-18-18V126c0-9.9 8.1-18 18-18h186c9.9 0 18 8.1 18 18 0 7.7 6.3 14 14 14s14-6.3 14-14c0-25.4-20.6-46-46-46H94c-25.4 0-46 20.6-46 46v260c0 25.4 20.6 46 46 46h186c25.4 0 46-20.6 46-46 0-7.7-6.3-14-14-14z"},child:[]},{tag:"path",attr:{d:"M372.9 158.1c-2.6-2.6-6.1-4.1-9.9-4.1-3.7 0-7.3 1.4-9.9 4.1-5.5 5.5-5.5 14.3 0 19.8l65.2 64.2H162c-7.7 0-14 6.3-14 14s6.3 14 14 14h256.6L355 334.2c-5.4 5.4-5.4 14.3 0 19.8l.1.1c2.7 2.5 6.2 3.9 9.8 3.9 3.8 0 7.3-1.4 9.9-4.1l82.6-82.4c4.3-4.3 6.5-9.3 6.5-14.7 0-5.3-2.3-10.3-6.5-14.5l-84.5-84.2z"},child:[]}]})(e)}function o0(e){return St({tag:"svg",attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 9.059v-2.559c0-.256-.098-.512-.293-.708-.195-.195-.451-.292-.707-.292s-.512.097-.707.292l-6.293 6.208 6.293 6.207c.195.195.451.293.707.293s.512-.098.707-.293.293-.452.293-.707v-2.489c2.75.068 5.755.566 8 3.989v-1c0-4.633-3.5-8.443-8-8.941z"},child:[]}]})(e)}const a0=e=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",xmlSpace:"preserve",id:"svg1",width:409.748,height:409.748,viewBox:"0 0 108.413 108.413",...e},V.createElement("defs",{id:"defs1"},V.createElement("linearGradient",{id:"linearGradient27"},V.createElement("stop",{id:"stop27",offset:0,style:{stopColor:"red",stopOpacity:1}}),V.createElement("stop",{id:"stop28",offset:1,style:{stopColor:"#ffca00",stopOpacity:.96862745}})),V.createElement("linearGradient",{xlinkHref:"#linearGradient27",id:"linearGradient28",x1:35.002,x2:143.414,y1:192.355,y2:83.942,gradientUnits:"userSpaceOnUse"})),V.createElement("g",{id:"layer1",transform:"translate(-35.002 -83.942)"},V.createElement("rect",{id:"rect26",width:108.413,height:108.413,x:35.002,y:83.942,rx:30,ry:30,style:{fill:"url(#linearGradient28)",fillOpacity:1,fillRule:"evenodd",stroke:"#ff9b01",strokeWidth:0,strokeOpacity:1,paintOrder:"stroke markers fill"}}),V.createElement("g",{id:"g1",style:{strokeWidth:.892424},transform:"matrix(1.08335 0 0 1.15901 -13.02 -26.51)"},V.createElement("path",{id:"path1",d:"M93.826 176.603c-.169-.034-1.837-.443-3.708-.909s-6.894-1.707-11.162-2.759a2463 2463 0 0 1-8.036-1.986 1.26 1.26 0 0 1-.84-.72c-.135-.297-.142-.67-.144-7.586l-.002-7.275-1.586-.388c-.873-.214-2.732-.663-4.131-.998-1.664-.399-2.62-.664-2.765-.767-.451-.321-.673-1.178-.44-1.7.05-.114 1.348-1.542 2.882-3.173l4.473-4.751c.925-.983 1.682-1.813 1.682-1.846 0-.032-2.013-2.197-4.473-4.811s-4.513-4.845-4.564-4.96c-.124-.278-.122-.806.005-1.108.137-.329.59-.717.947-.812a377 377 0 0 1 3.04-.735 4957 4957 0 0 0 16.208-3.91c3.114-.76 3.63-.84 4.028-.63.113.059 1.108 1.071 2.211 2.249a1906 1906 0 0 0 4.454 4.731l2.447 2.591.578-.603c.73-.762 7.41-7.89 7.899-8.429.533-.588 1.164-.826 1.676-.632.098.037 1.949.488 4.115 1.003 2.165.515 5.554 1.325 7.53 1.802l7.11 1.713c1.934.466 3.612.885 3.727.931.44.176.82.811.821 1.372 0 .11-.077.339-.171.51-.146.264-2.64 2.954-7.92 8.542-.595.63-1.074 1.174-1.062 1.207.011.034 2.015 2.18 4.453 4.768s4.493 4.832 4.565 4.985c.232.491.124 1.107-.27 1.528-.244.262-.464.356-1.276.544-.4.093-2.137.51-3.86.927l-3.307.798-.172.04v7.212c0 5.18-.025 7.285-.087 7.472a1.6 1.6 0 0 1-.287.477c-.211.23-.693.509-.877.509-.06 0-4.2 1.011-9.197 2.248-12.941 3.202-13.804 3.411-14.017 3.4a4 4 0 0 1-.497-.071m-.115-14.064c0-6.938-.027-12.614-.059-12.614s-1.13 1.144-2.44 2.542c-5.288 5.648-5.758 6.135-6.045 6.267-.478.22.5.423-8.925-1.857-2.27-.549-4.327-1.045-4.568-1.102l-.44-.103v13.955l.975.24c6.052 1.49 19.206 4.741 20.126 4.974a30 30 0 0 0 1.28.306c.076.005.096-2.563.096-12.608m12.576 9.853c5.93-1.467 10.857-2.684 10.951-2.706l.171-.04.02-6.992c.018-6.187.006-6.99-.094-6.958-.063.019-1.698.416-3.632.883-1.934.466-4.72 1.14-6.192 1.497-3.653.887-3.407.84-3.789.725-.186-.056-.463-.233-.65-.416-.18-.175-2.039-2.141-4.13-4.37-2.092-2.229-3.833-4.063-3.868-4.077s-.063 5.656-.063 12.601v12.627l.248-.054c.137-.03 5.1-1.253 11.028-2.72m-20.964-15.644c.885-.919 7.626-8.102 8.034-8.56.163-.184.284-.345.268-.36-.03-.026-1.291-.333-7.062-1.721l-9.387-2.26-5.87-1.413-.512.554a2343 2343 0 0 0-8.041 8.564c-.267.285-.47.533-.45.552s1.89.48 4.158 1.025c9.94 2.387 16.933 4.072 17.464 4.209.316.08.598.149.627.151s.376-.33.771-.74m20.235.401c.78-.189 3.86-.93 6.845-1.648 12.242-2.942 13.984-3.364 14.015-3.396.019-.018-.237-.321-.568-.673l-4.112-4.38-3.921-4.178-.413-.437-6.82 1.638c-3.75.9-8.299 1.997-10.107 2.437s-3.76.91-4.339 1.047c-.578.137-1.05.278-1.05.313 0 .06 1.972 2.177 6.918 7.426 1.135 1.204 2.08 2.191 2.1 2.193.019.002.672-.152 1.452-.342m-9.338-11.001c.954-.227 3.678-.885 6.054-1.461a4296 4296 0 0 1 11.257-2.72c.41-.097.746-.196.746-.22 0-.042-2.28-.6-11.889-2.913a3300 3300 0 0 1-5.734-1.386c-1.219-.297-2.268-.538-2.331-.536s-1.388.313-2.944.691-4.05.982-5.543 1.34c-1.492.36-4.434 1.07-6.536 1.58-2.103.508-4.072.982-4.377 1.054-.305.07-.554.148-.554.17s.61.186 1.357.362c.746.177 4.831 1.16 9.078 2.188l8.525 2.06c.441.106.882.196.98.199s.958-.18 1.911-.408m-23.175-5.507c1.616-.385 15.137-3.644 18.927-4.562.914-.222 1.663-.423 1.663-.447 0-.043-2.176-2.373-6.494-6.955a220 220 0 0 1-2.417-2.588c-.068-.09-.257-.065-1.223.168-2.153.52-10.698 2.575-15.93 3.832-2.876.692-5.247 1.274-5.267 1.295-.046.045-.21-.132 4.76 5.153 2.23 2.371 4.083 4.358 4.117 4.415s.074.105.09.105.815-.187 1.774-.416m44.726.017c.668-.727 2.633-2.823 4.61-4.915 3.59-3.802 4.074-4.323 4.04-4.356-.019-.019-.892-.24-1.942-.491a14930 14930 0 0 1-17.845-4.296l-2.558-.62-.225.256c-.123.141-.763.824-1.42 1.518-.66.694-2.26 2.397-3.559 3.784a573 573 0 0 1-3.073 3.264c-.392.408-.712.773-.712.812 0 .081 1.221.382 13.259 3.264 4.832 1.157 8.803 2.12 8.824 2.141.102.102.267.003.601-.361",style:{fill:"#fff",fillOpacity:1,strokeWidth:0,strokeDasharray:"none"}}),V.createElement("path",{id:"path2",d:"M94.237 147.397c-.19-.076-.536-.44-.83-.87-.138-.202-.98-1.552-1.87-3.001-6.428-10.455-9.515-15.547-9.95-16.413-.459-.916-.982-2.465-1.178-3.493-.478-2.499-.335-4.879.435-7.235 1.186-3.633 3.713-6.577 7.144-8.326a14.6 14.6 0 0 1 4.316-1.388c1.018-.165 3.183-.165 4.201 0a14.6 14.6 0 0 1 5.902 2.32c3.031 2.03 5.227 5.32 5.959 8.928.623 3.072.293 6.038-.986 8.869-.359.792-3.667 6.345-7.571 12.703l-3.23 5.263c-.787 1.285-1.265 1.992-1.542 2.284-.398.42-.519.473-.8.36m1.266-20.98a6.44 6.44 0 0 0 4.949-4.23c.294-.862.38-1.48.33-2.368-.098-1.758-.749-3.161-2.028-4.375-1.216-1.153-2.656-1.723-4.35-1.723-1.69 0-3.132.57-4.345 1.72-.963.913-1.534 1.855-1.868 3.078-.13.48-.154.72-.151 1.567.003.873.026 1.084.183 1.657a6.43 6.43 0 0 0 3.963 4.37 6.3 6.3 0 0 0 3.317.303",style:{fill:"#d30000",fillOpacity:1,strokeWidth:.892424}}),V.createElement("path",{id:"rect2",d:"M158.632 137.745h3.539v1.387h-3.539z",style:{fill:"#fff",fillOpacity:1,fillRule:"evenodd",stroke:"#ff9b01",strokeWidth:0,strokeDasharray:"none",paintOrder:"stroke markers fill"},transform:"matrix(.98806 .15405 -.46962 .88287 0 0)"}),V.createElement("path",{id:"rect3",d:"M120.628 170.946h3.167v1.222h-3.167z",style:{fill:"#fff",fillOpacity:1,fillRule:"evenodd",stroke:"#ff9b01",strokeWidth:0,strokeDasharray:"none",paintOrder:"stroke markers fill"},transform:"rotate(8.335)scale(.9449 1)skewY(-18.126)"})))),l0=({Logo:e,logo:t})=>{const{logout:n}=Fn(),{activeAlert:i}=Pt(),{autoLogin:s,configRoutes:o,firstPrivateTitle:r,showHeaderButton:a}=Le(),{isLoading:l}=It(),c=U.useLocation(),u=U.useNavigate(),d=()=>{n(),i("info","Hai effettuato il logout")},f=o.find(y=>y.path===c.pathname),m=U.useMatch("home/:id");return h.jsx("header",{className:l?"hidden":"",children:h.jsxs("nav",{className:"header-size flex items-center justify-between px-2 shadow-lg border-b gap-2 border-b-gray-300",children:[h.jsx("figure",{children:e&&typeof e=="function"?h.jsx(e,{className:"header-logo-size"}):t?h.jsx("img",{src:t,alt:"Logo",className:"header-logo-size"}):h.jsx(a0,{className:"header-logo-size"})}),h.jsx("div",{children:h.jsx("p",{children:(f==null?void 0:f.title)||r})}),h.jsxs("div",{children:[!s&&m&&h.jsx("button",{className:"h-[48px] w-[48px] flex items-center justify-center bg-red-600 text-white rounded-lg shadow-md transition duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer",type:"button",onClick:d,children:h.jsx(r0,{className:"text-4xl w-full"})}),!m&&a&&h.jsx("button",{className:"h-[48px] w-[48px] flex items-center justify-center bg-sky-600 text-white rounded-lg shadow-md transition duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer",type:"button",onClick:()=>u(-1),children:h.jsx(o0,{className:"text-4xl w-full"})})]})]})})};function c0(e){return St({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M763.024 259.968C718.4 141.536 622.465 66.527 477.553 66.527c-184.384 0-313.392 136.912-324.479 315.536C64.177 410.495.002 501.183.002 603.903c0 125.744 98.848 231.968 215.823 231.968h92.448c17.664 0 32-14.336 32-32 0-17.68-14.336-32-32-32h-92.448c-82.304 0-152.832-76.912-152.832-167.968 0-80.464 56.416-153.056 127.184-165.216l29.04-5.008-2.576-29.328-.24-.368c0-155.872 102.576-273.44 261.152-273.44 127.104 0 198.513 62.624 231.537 169.44l6.847 22.032 23.056.496c118.88 2.496 223.104 98.945 223.104 218.77 0 109.055-72.273 230.591-181.696 230.591h-73.12c-17.664 0-32 14.336-32 32 0 17.68 14.336 32 32 32l72.88-.095c160-4.224 243.344-157.071 243.344-294.495 0-147.712-115.76-265.744-260.48-281.312zM535.985 514.941c-.176-.192-.241-.352-.354-.512l-8.095-8.464c-4.432-4.688-10.336-7.008-16.24-6.976-5.905-.048-11.777 2.288-16.289 6.975l-8.095 8.464c-.16.16-.193.353-.336.513L371.072 642.685c-8.944 9.344-8.944 24.464 0 33.84l8.064 5.471c8.945 9.344 23.44 6.32 32.368-3.024l68.113-75.935v322.432c0 17.664 14.336 32 32 32s32-14.336 32-32V603.34l70.368 77.631c8.944 9.344 23.408 12.369 32.336 3.025l8.064-5.472c8.945-9.376 8.945-24.496 0-33.84z"},child:[]}]})(e)}const u0=e=>{const[t,n]=p.useState(!1),{onFilesSelect:i,id:s="dropzone-file",containerStyle:o="flex items-center justify-center w-full relative h-full",dropzoneStyle:r="flex flex-col items-center justify-center text-body px-6 text-center pt-5 pb-6 pointer-events-none",labelStyle:a=`flex flex-col items-center justify-center w-full h-full rounded-2xl transition-all duration-300 bg-slate-100/80 shadow-lg border border-slate-300 rounded-base cursor-pointer hover:bg-slate-200/80 hover:border-slate-500 hover:shadow-xl ${t?"bg-slate-200/80 border-slate-600 shadow-xl shadow-primary-strong":"border-default-strong"}`,dragActiveStyle:l="absolute w-full h-full top-0 left-0 rounded-2xl border-2 border-primary-strong/70 animate-pulse"}=e,c=p.useCallback(f=>{f.preventDefault(),f.stopPropagation(),f.type==="dragenter"||f.type==="dragover"?n(!0):f.type==="dragleave"&&n(!1)},[]),u=p.useCallback(f=>{f.preventDefault(),f.stopPropagation(),n(!1),f.dataTransfer.files&&f.dataTransfer.files.length>0&&(i==null||i(Array.from(f.dataTransfer.files)))},[i]),d=f=>{f.target.files&&f.target.files.length>0&&(i==null||i(Array.from(f.target.files)))};return h.jsxs("div",{className:o,onDragEnter:c,children:[h.jsxs("label",{htmlFor:s,className:a,children:[h.jsxs("div",{className:r,children:[h.jsx(c0,{className:"text-8xl"}),h.jsxs("p",{className:"mb-2",children:[h.jsx("span",{className:"font-semibold",children:"Clicca per caricare"})," o trascina qui i file"]}),h.jsx("p",{className:"text-sm opacity-70",children:"Puoi selezionare più file"})]}),h.jsx("input",{id:s,type:"file",multiple:!0,className:"hidden",onChange:d})]}),t&&h.jsx("div",{className:l,onDragEnter:c,onDragLeave:c,onDragOver:c,onDrop:u})]})},Os=e=>{const{id:t,name:n,value:i,onChange:s,disabled:o,required:r,labelStyle:a,containerStyle:l,inputStyle:c,title:u,children:d}=e;return h.jsxs("div",{className:l||"flex flex-col gap-1 mx-auto w-full",children:[h.jsx("label",{htmlFor:t,className:a||"mb-1 text-input-label font-medium text-color-label",children:u}),h.jsx("input",{type:"date",id:t,name:n,value:i||"",onChange:s,disabled:o,required:r,className:c||"bg-input-bg border border-input-border rounded-lg text-input-text placeholder:text-input-placeholder rounded-input focus:ring focus:ring-primary focus:border-primary focus:outline-none focus:shadow-[var(--shadow-primary-input)] block w-full h-[43px] p-input disabled:bg-gray-100 disabled:text-gray-400 disabled:cursor-not-allowed disabled:opacity-60"}),d]})},d0=e=>{const{startId:t,endId:n,startName:i,endName:s,startValue:o,endValue:r,onChange:a,disabled:l,required:c,dateError:u,startTitle:d,endTitle:f,startStyle:m,endStyle:y,labelStyle:T,containerStyle:x,startContainerStyle:v,endContainerStyle:b,endDateShow:S=!0,children:j}=e;return h.jsxs("div",{className:x||"flex gap-4 mx-auto w-full mb-4",children:[h.jsx(Os,{id:t,name:i,value:o,onChange:a,disabled:l,required:c,title:d,labelStyle:T,containerStyle:v,inputStyle:m}),S&&h.jsx(Os,{id:n,name:s,value:r,onChange:a,disabled:l,required:c,title:f,labelStyle:T,containerStyle:b,inputStyle:y,children:u&&h.jsx("p",{className:"text-red-500 text-[13px] mt-1",children:u})}),j]})},Ec=({sizeContainer:e,Logo:t,spinnerColor:n})=>h.jsxs("div",{className:`relative ${e||"h-60 w-60"}`,children:[h.jsx("svg",{className:"absolute inset-0 w-full h-full animate-spin-slow z-10",viewBox:"0 0 100 100",children:h.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:n||"#60A5FA",strokeWidth:"6",strokeLinecap:"round",strokeDasharray:"280",strokeDashoffset:"210"})}),h.jsx("figure",{className:"h-full w-full rounded-full overflow-hidden relative",children:h.jsx(t,{className:"h-full w-full"})})]}),f0=({gradients:e,moreGradients:t,containerSize:n,overlayStyle:i,NewLogoLoader:s,Logo:o,spinnerColor:r})=>{const{customLoginTimeout:a}=Le(),{isLoading:l}=It(),[c,u]=p.useState(l),[d,f]=p.useState(!1),m=["bg-gradient-to-br from-blue-500 via-blue-400 to-blue-200","bg-gradient-to-br from-blue-200 via-blue-400 to-purple-300","bg-gradient-to-br from-blue-400 via-cyan-300 to-blue-200","bg-gradient-to-br from-blue-100 via-purple-200 to-pink-100","bg-gradient-to-br from-blue-400 via-blue-500 to-blue-600","bg-gradient-to-br from-blue-300 via-cyan-400 to-indigo-400","bg-gradient-to-br from-cyan-200 via-blue-300 to-blue-500","bg-gradient-to-br from-indigo-300 via-blue-400 to-purple-400",...t||[]],y=e??[...m,...t??[]],T=y[Math.floor(Math.random()*y.length)],x=n||"h-[420px] w-[420px]";return p.useEffect(()=>{if(l){u(!0);const v=setTimeout(()=>f(!0),10);return()=>clearTimeout(v)}else{f(!1);const v=setTimeout(()=>u(!1),300);return()=>clearTimeout(v)}},[l,a]),h.jsx("div",{className:`${i||"fixed top-0 bottom-0 left-0 right-0 flex items-center justify-center z-999 transition-opacity duration-300"} ${T} ${d?"opacity-100":"opacity-0"}`,children:s?h.jsx(s,{}):h.jsx(Ec,{sizeContainer:x,Logo:o,spinnerColor:r})})};Object.defineProperty(exports,"BrowserRouter",{enumerable:!0,get:()=>U.BrowserRouter});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>U.Link});Object.defineProperty(exports,"NavLink",{enumerable:!0,get:()=>U.NavLink});Object.defineProperty(exports,"Outlet",{enumerable:!0,get:()=>U.Outlet});Object.defineProperty(exports,"Route",{enumerable:!0,get:()=>U.Route});Object.defineProperty(exports,"Routes",{enumerable:!0,get:()=>U.Routes});Object.defineProperty(exports,"useLocation",{enumerable:!0,get:()=>U.useLocation});Object.defineProperty(exports,"useMatch",{enumerable:!0,get:()=>U.useMatch});Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:()=>U.useNavigate});Object.defineProperty(exports,"useParams",{enumerable:!0,get:()=>U.useParams});exports.axios=aa;exports.ReactDOM=la;exports.Alert=Ds;exports.AlertProvider=Nm;exports.AuthAdmin=Qm;exports.AuthPage=Pn;exports.AuthProvider=Bm;exports.CardInputRange=i0;exports.CardInputTag=t0;exports.ConfigFileReader=s0;exports.ConfigProvider=qc;exports.Dashboard=Tc;exports.DefaultLayout=bc;exports.ErrorPage=ua;exports.FileDropzone=u0;exports.Header=l0;exports.Input=wi;exports.InputDate=Os;exports.InputGroup=Vs;exports.InputLabel=Si;exports.InputStartEndDate=d0;exports.Loader=f0;exports.Loading=vc;exports.LoadingComponent=e0;exports.LoadingProvider=Hc;exports.Login=wc;exports.LoginForm=xc;exports.LoginFormProvider=Fm;exports.LogoLoader=Ec;exports.ModalProvider=zm;exports.PackageRoutes=Jm;exports.RouteProvider=_m;exports.SwitchRadio=Sc;exports.UsePageTitle=mc;exports.fetchAxiosConfig=lc;exports.useAlert=Pt;exports.useAuth=Fn;exports.useAuthStorage=hn;exports.useConfig=Le;exports.useDevice=ya;exports.useIndexedDB=$m;exports.useLoading=It;exports.useLoginForm=mr;exports.useModal=pc;exports.useOrientation=Um;exports.useRoutesInjection=dc;exports.useStorage=Ms;exports.useToast=pr;exports.useViewportHeight=gc;
|
|
110
|
+
</RouteProvider>`);return e},dc=p.createContext(),Fm=({children:e})=>{const{login:t}=Fn(),{clearLoginFormOnError:n}=Le(),i={email:"",password:""},[s,o]=p.useState("Accedi"),[r,a]=p.useState("Email"),[l,c]=p.useState("email"),[u,d]=p.useState("example@example.it"),[f,m]=p.useState("Accedi"),[y,T]=p.useState(i),[x,v]=p.useState(),[b,S]=p.useState(),[j,w]=p.useState(),[R,L]=p.useState(),[M,I]=p.useState({}),[B,J]=p.useState(null),Q={overrideStyle:M,setOverrideStyle:I,title:s,setTitle:o,label:r,setLabel:a,type:l,setType:c,placeholder:u,setPlaceholder:d,buttonText:f,setButtonText:m,formData:y,setFormData:T,LogoImg:x,setLogoImg:v,styleCardForm:b,setStyleCardForm:S,styleContainerLogo:j,setStyleContainerLogo:w,styleLogo:R,setStyleLogo:L,changeData:(z,se)=>{T(q=>({...q,[z]:se}))},handleLogin:z=>{t(z,y),n&&T(i)},customVersion:B,setCustomVersion:J};return h.jsx(dc.Provider,{value:Q,children:e})},pr=()=>{const e=p.useContext(dc);if(e===void 0)throw new Error("Non puoi modificare La login");return e},fc=p.createContext(),$m=({children:e})=>{const[t,n]=p.useState(!1),[i,s]=p.useState(null),[o,r]=p.useState(""),[a,l]=p.useState(null),[c,u]=p.useState(null),[d,f]=p.useState(null),[m,y]=p.useState("modal-form"),[T,x]=p.useState("submit"),[v,b]=p.useState({}),[S,j]=p.useState(null),[w,R]=p.useState(null),[L,M]=p.useState(null),I=({modalData:Q,component:z,title:se="",onConfirm:q=null,type:G="submit",formId:re="modal-form",item:te=null,style:pe})=>{j(Q),s(()=>z),r(se),l(()=>q),x(G),y(re),f(te),b(pe),n(!0)},B=()=>{s(null),r(""),l(null),x("submit"),y("modal-form"),f(null),b({}),n(!1),j(null)},ve={isOpen:t,openModal:I,closeModal:B,content:i,title:o,onConfirm:a,type:T,item:d,formId:m,style:v,modalData:S,setModalData:j,handleChange:Q=>{const{name:z,value:se}=Q.target;j(q=>({...q,[z]:se}))},handleSubmit:Q=>{Q.preventDefault(),a&&(a(S),B())},headerContent:w,setHeaderContent:R,footerContent:L,setFooterContent:M,onCancel:c,setOnCancel:u};return h.jsx(fc.Provider,{value:ve,children:e})},hc=()=>{const e=p.useContext(fc);if(e===void 0)throw new Error("Non sei all'interno del ModalProvider");return e},pc=(e=[],t="SPOT")=>{const n=U.useLocation();p.useLayoutEffect(()=>{let i=t;for(const s of e)if(U.matchPath({path:s.path,end:!0},n.pathname)){i=s.title;break}document.title=i},[n,e,t])},zm=(e,t,n=1)=>{const i=p.useRef(null),[s,o]=p.useState(!1),r=p.useCallback(m=>new Promise((y,T)=>{if(!i.current){T("DB non pronto");return}const b=i.current.transaction(t,"readonly").objectStore(t).get(m);b.onsuccess=()=>y(b.result),b.onerror=S=>T(S.target.error)}),[t]),a=p.useCallback(()=>new Promise((m,y)=>{if(!i.current)return y("DB non pronto");const v=i.current.transaction(t,"readonly").objectStore(t).getAll();v.onsuccess=()=>m(v.result),v.onerror=b=>y(b.target.error)}),[t]),l=p.useCallback(m=>new Promise((y,T)=>{if(!i.current){T("DB non pronto");return}const b=i.current.transaction(t,"readwrite").objectStore(t).put(m);b.onsuccess=()=>y(b.result),b.onerror=S=>T(S.target.error)}),[t]),c=p.useCallback(async()=>{let m=Date.now();for(;await r(m);)m++;return m},[r]),u=p.useCallback(async m=>(m.id||(m.id=await c()),l(m)),[c,l]),d=p.useCallback(m=>new Promise((y,T)=>{if(!i.current){T("DB non pronto");return}const b=i.current.transaction(t,"readwrite").objectStore(t).delete(m);b.onsuccess=()=>y(!0),b.onerror=S=>T(S.target.error)}),[t]),f=p.useCallback(()=>new Promise((m,y)=>{if(!i.current){y("DB non pronto");return}const v=i.current.transaction(t,"readwrite").objectStore(t).clear();v.onsuccess=()=>m(!0),v.onerror=b=>y(b.target.error)}),[t]);return p.useEffect(()=>{const m=indexedDB.open(e,n);return m.onupgradeneeded=y=>{const T=y.target.result;T.objectStoreNames.contains(t)||T.createObjectStore(t,{keyPath:"id"})},m.onsuccess=y=>{i.current=y.target.result,o(!0)},m.onerror=y=>{console.error("IndexedDB error",y.target.error)},()=>{var y;(y=i.current)==null||y.close()}},[e,t,n]),{get:r,getAll:a,set:l,setWithAutoId:u,remove:d,clear:f,isReady:s}},Um=()=>{const[e,t]=p.useState(window.innerWidth>window.innerHeight?"landscape":"portrait");return p.useEffect(()=>{const n=()=>{t(window.innerWidth>window.innerHeight?"landscape":"portrait")};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e},mc=(e={getValues:!1})=>{const{getValues:t}=e,[n,i]=p.useState(0),s=()=>{const o=window.visualViewport?window.visualViewport.height:window.innerHeight,r=o*.01;document.documentElement.style.setProperty("--vh",`${r}px`),t&&i(o)};return p.useEffect(()=>(s(),window.addEventListener("resize",s),window.addEventListener("orientationchange",s),()=>{window.removeEventListener("resize",s),window.removeEventListener("orientationchange",s)}),[t]),t?{height:n,vh:n*.01}:null},Hm=(e=["/"])=>{const t=U.useLocation();p.useEffect(()=>(e.includes(t.pathname)?document.body.classList.remove("with-safe-area"):document.body.classList.add("with-safe-area"),()=>{document.body.classList.remove("with-safe-area")}),[t.pathname,e])};function gc(e){return St({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0c-4.355 0-7.898 3.481-7.998 7.812 0.092-3.779 2.966-6.812 6.498-6.812 3.59 0 6.5 3.134 6.5 7 0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-4.418-3.582-8-8-8zM8 16c4.355 0 7.898-3.481 7.998-7.812-0.092 3.779-2.966 6.812-6.498 6.812-3.59 0-6.5-3.134-6.5-7 0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5c0 4.418 3.582 8 8 8z"},child:[]}]})(e)}const yc=()=>{const{loadingProps:e,loadingComponent:t}=It(),{spinner:n=!0,spinnerStyle:i,text:s,textStyle:o,children:r,containerStyle:a,overrideStyle:l={}}=e;return t||h.jsxs("div",{className:l.container||`fixed top-0 bottom-0 left-0 right-0 flex items-center justify-center bg-loading-bg z-[999] ${a}`,children:[n&&h.jsx(gc,{className:l.spinner||`text-[20rem] relative animate-spin text-spinner ${i}`}),r||h.jsx("p",{className:l.text||`text-white text-2xl select-none absolute ${o}`,children:s||"Loading..."})]})};function Wm(e){return St({tag:"svg",attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(e)}const Ds=()=>{const{messageAlert:e,typeAlert:t,alertConfig:n,getIcon:i,closeAlert:s}=Ct(),{alertTimeout:o}=Le(),[r,a]=p.useState(0),{bgColor:l,textColor:c,buttonBg:u,hoverBg:d,focusRing:f,progressColor:m}=n[t];return p.useEffect(()=>{let y;const x=100/(o/100);y=setInterval(()=>{a(b=>b>=100?(clearInterval(y),100):b+x)},100);const v=setTimeout(()=>{s()},o);return()=>{clearTimeout(v),clearInterval(y)}},[]),h.jsxs("div",{className:` ${l} ${c} flex items-center min-h-[65px] max-h-[100px] p-4 pt-6 rounded-lg mx-auto max-sm:min-w-[240px] sm:max-w-1/3 fixed sm:top-[calc(100vh-100px)] top-[calc(100vh-115px)] sm:right-10 right-1/2 translate-x-1/2 sm:translate-0 z-100`,role:"alert",children:[h.jsx("div",{className:"w-full bg-gray-200 rounded-t-lg overflow-hidden h-2.5 absolute top-0 left-0 right-0",children:h.jsx("div",{className:`${m} h-2.5 rounded-t-lg`,style:{width:`${r}%`}})}),i(t),h.jsx("div",{className:"px-4 text-sm font-medium",children:e}),h.jsx("button",{type:"button",className:`ms-auto ${u} rounded-lg focus:ring-2 ${f} p-1.5 ${d} inline-flex items-center justify-center h-8 w-8 cursor-pointer`,title:"Close",onClick:s,children:h.jsx(Wm,{className:"text-xl"})})]})},Gm=({onClose:e,onConfirm:t,onCancel:n,type:i,formId:s,style:o})=>{const r=o.resetButton??!0,a=o.confirmButtonText??(i==="delete"?"Elimina":"Salva"),l=o.cancelButtonText??"Annulla",c=o.bgSaveButton??"bg-indigo-600 rounded-lg shadow-md hover:bg-indigo-700 hover:shadow-lg active:bg-indigo-800 text-white",u=o.bgDeleteButton??"bg-rose-500 rounded-lg shadow-md hover:bg-rose-600 hover:shadow-lg active:bg-rose-700 text-white",d=o.bgResetButton??"bg-rose-500 rounded-lg shadow-md hover:bg-rose-600 hover:shadow-lg active:bg-rose-700 text-white",f=o.bgCancelButton??"text-gray-800 bg-gray-300 rounded-lg shadow-md hover:bg-gray-400 hover:shadow-lg active:bg-gray-500",m=i==="custom"?o.customButtonStyle:null,y={delete:()=>{t==null||t(),e==null||e()},custom:()=>{t==null||t()}};return h.jsxs("footer",{className:"flex items-center justify-between mt-4",children:[h.jsx("button",{onClick:n||e,className:`${f} px-4 py-2 cursor-pointer text-sm font-medium active:shadow-sm transition-all duration-150 ease-in-out hover:opacity-90 active:scale-95 active:opacity-70`,children:l}),h.jsxs("div",{className:"flex items-center gap-4",children:[i!=="delete"&&r&&h.jsx("button",{type:"reset",form:s,className:`px-4 py-2 cursor-pointer text-sm font-medium ${d} active:shadow-sm transition-all duration-150 ease-in-out hover:opacity-90 active:scale-95 active:opacity-70`,children:"Reset"}),h.jsx("button",{type:i==="submit"?"submit":"button",form:i==="submit"?s:void 0,onClick:()=>{var T;return(T=y[i])==null?void 0:T.call(y)},className:m||`${i==="delete"?u:c} px-4 py-2 cursor-pointer text-sm font-medium active:shadow-sm transition-all duration-150 ease-in-out hover:opacity-90 active:scale-95 active:opacity-70`,children:a})]})]})};function qm(e){return St({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}const Ym=({onClose:e,type:t,title:n,name:i,onCancel:s})=>h.jsxs("header",{className:`flex items-center justify-between mb-4 ${t==="delete"?"gap-8":""}`,children:[t==="delete"&&i?h.jsxs("h2",{className:"text-2xl",children:["Sei sicuro di volere eliminare: ",h.jsx("strong",{children:i}),"?"]}):h.jsx("h2",{className:"text-2xl",children:n||"Conferma operazione"}),h.jsx("button",{onClick:s||e,className:"text-gray-500 hover:text-gray-700 cursor-pointer transition-transform duration-150 ease-in-out hover:scale-110 hover:opacity-80 active:scale-95 active:opacity-60","aria-label":"Chiudi modale",children:h.jsx(qm,{className:"text-2xl"})})]}),Km=({type:e,children:t,item:n,overrideStyle:i})=>h.jsx(h.Fragment,{children:e!=="delete"&&h.jsx("main",{className:i||"my-8 max-h-[600px] overflow-y-auto overflow-x-hidden",children:e==="delete"&&!n?h.jsx("div",{className:"text-red-600 font-semibold",children:"Errore: nessun item selezionato per l'operazione."}):t})}),Xm=({isOpen:e,onClose:t,onCancel:n,title:i,formId:s,children:o,item:r,onConfirm:a,type:l="submit",style:c={},headerContent:u,footerContent:d})=>{const f=p.useRef(null),[m,y]=p.useState(e),T=()=>{e||y(!1)},x=c.width??(l==="delete"?"max-w-md w-auto":"w-full max-w-4xl"),v=c.bgModal??"bg-white",b=c.bgOverlay??"bg-black/50",S=c.zIndex??"z-50";return p.useEffect(()=>{e&&y(!0)},[e]),p.useEffect(()=>{const j=w=>{w.key==="Escape"&&(n?n():t())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[t,n]),p.useEffect(()=>{var j;if(e){const w=document.activeElement;return(j=f.current)==null||j.focus(),()=>w==null?void 0:w.focus()}},[e]),m?aa.createPortal(h.jsx("div",{className:`fixed inset-0 ${S} flex items-center justify-center transition-opacity duration-200 ${e?`${b} opacity-100`:"opacity-0"}`,onClick:n||t,onKeyDown:j=>{var w;j.key==="Escape"&&((w=n||t)==null||w())},onTransitionEnd:T,role:"button",tabIndex:0,"aria-label":"Chiudi modale",children:h.jsxs("div",{ref:f,className:`relative ${v} rounded-lg p-6 shadow-xl ${x} transform transition-transform duration-200 ${e?"scale-100 opacity-100":"scale-95 opacity-0"}`,onClick:j=>j.stopPropagation(),onKeyDown:j=>{j.key==="Escape"&&t()},role:"dialog","aria-modal":"true",tabIndex:-1,children:[u||h.jsx(Ym,{onClose:t,onCancel:n,type:l,title:i,name:r==null?void 0:r.name}),h.jsx(Km,{type:l,item:r,overrideStyle:c.overrideStyle,children:o}),d||h.jsx(Gm,{onClose:t,onCancel:n,onConfirm:a,type:l,formId:s,style:c})]})}),document.body):null},Zm=()=>{const{isDebug:e}=Le(),[t,n]=p.useState(!1),[i,s]=p.useState(!1),{needRefresh:o,updateServiceWorker:r}=_c.useRegisterSW({onRegisteredSW(a,l){e&&console.log("Service Worker registrato:",a),l&&l.waiting&&(e&&console.log("Un nuovo Service Worker è disponibile:",l.waiting),i||n(!0))},onRegisterError(a){console.error("Errore nella registrazione del Service Worker:",a)}});return p.useEffect(()=>{o[0]&&!i&&n(!0)},[o,i]),t?h.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-black/50 z-50 px-4",children:h.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center w-80",children:[h.jsx("h2",{className:"text-xl font-bold mb-2",children:"Aggiornamento disponibile"}),h.jsx("p",{className:"text-gray-600 mb-4",children:"È disponibile una nuova versione dell'app. Vuoi aggiornare?"}),h.jsxs("div",{className:"flex gap-4 justify-center",children:[h.jsx("button",{onClick:()=>{r(!0),window.location.reload()},className:"bg-blue-500 text-white px-4 py-2 rounded-lg shadow-md transition duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer",children:"Aggiorna"}),h.jsx("button",{onClick:()=>{n(!1),s(!0)},className:"bg-gray-300 px-4 py-2 rounded-lg shadow-md transition duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer",children:"Annulla"})]})]})}):null},vc=e=>{const{isLoading:t}=It(),{showAlert:n}=Ct(),{sileoToastConfig:i,pwa:s}=Le(),{isOpen:o,closeModal:r,onCancel:a,content:l,title:c,onConfirm:u,item:d,type:f,formId:m,style:y,headerContent:T,footerContent:x}=hc(),v=U.useLocation(),{isMain:b=!0,headerComponent:S=null,showHeaderOnLogin:j=!1,headerExcludedRoutes:w=[],footerComponent:R=null,showFooterOnLogin:L=!1,footerExcludedRoutes:M=[]}=e,I={fill:"#000000",duration:2e3,styles:{title:"text-white font-semibold",description:"text-white/75",badge:"bg-white/20"}},B=i==null?void 0:i.position,J=(i==null?void 0:i.options)||I,ye=w.some(se=>U.matchPath(se,v.pathname));let ve;v.pathname==="/"?ve=S&&j:ve=S&&!ye;const Q=M.some(se=>U.matchPath(se,v.pathname));let z;return v.pathname==="/"?z=R&&L:z=R&&!Q,h.jsxs(h.Fragment,{children:[s&&s.customPrompt&&h.jsx(Zm,{}),t&&h.jsx(yc,{}),n&&h.jsx(Ds,{}),h.jsx(Im,{position:B||"bottom-right",options:J}),h.jsx(Xm,{isOpen:o,onClose:r,onCancel:a,title:c,formId:m,onConfirm:u,type:f,item:d,style:y,headerContent:T,footerContent:x,children:l}),ve&&S,b?h.jsxs("main",{className:t?"hidden":"",children:[n&&h.jsx(Ds,{}),h.jsx(U.Outlet,{})]}):h.jsx(U.Outlet,{}),z&&R]})},wi=e=>{const{inputType:t,inputId:n,inputPlaceholder:i,inputRequired:s,inputValue:o,inputChange:r,inputName:a,autoFocus:l,inputStyle:c,overrideStyle:u,disabled:d}=e,m=["text","email","password","search","tel","url"].includes(t)?t:"text";return h.jsx("input",{type:m,autoFocus:l,id:n,className:u||`bg-input-bg border border-input-border text-input-text text-input-placeholder input-rounded focus:ring focus:ring-primary focus:border-primary focus:outline-none focus:shadow-(--shadow-primary-input) block w-full p-input ${c}`,placeholder:i,required:s??!0,value:o,onChange:r,disabled:d,name:a})},Si=({label:e,labelId:t,labelStyle:n,overrideStyle:i})=>h.jsx("label",{htmlFor:t,className:i||`show-label mb-1 sm:mb-2 text-input-label font-medium text-color-label ${n}`,children:e}),bc=()=>{const{title:e,label:t,type:n,placeholder:i,buttonText:s,formData:o,changeData:r,handleLogin:a,overrideStyle:l}=pr();return h.jsxs("form",{onSubmit:a,className:l.form||"form-size",children:[h.jsx("h1",{className:l.title||"text-form-title-size show-title title-position m-form-title",children:e}),h.jsxs("div",{className:l.containerEmail||"flex justify-center flex-col gap-1 m-input-form input-size mx-auto",children:[h.jsx(Si,{labelId:"user-email",label:t}),h.jsx(wi,{inputType:n,inputId:"user-email",inputPlaceholder:i,inputValue:o.email,inputChange:c=>{r("email",c.target.value)},autoFocus:!0})]}),h.jsxs("div",{className:l.containerPassword||"flex justify-center flex-col gap-1 my-4 input-size mx-auto",children:[h.jsx(Si,{labelId:"password",label:"Password"}),h.jsx(wi,{inputType:"password",inputId:"password",inputPlaceholder:"Password",inputValue:o.password,inputChange:c=>{r("password",c.target.value)}})]}),h.jsx("div",{className:l.containerButton||"flex button-position items-center m-primary-button",children:h.jsx("button",{className:l.button||"font-bold cursor-pointer shadow-(--shadow-primary) transition-all duration-200 hover:shadow-(--shadow-primary-hover) active:shadow-(--shadow-primary-active) active:translate-y-[2px] p-primary-button rounded-primary-button bg-primary hover:bg-primary-hover text-primary-text",children:s})})]})},xc=({Logo:e})=>{const{styleCardForm:t,styleContainerLogo:n,styleLogo:i,overrideStyle:s,customVersion:o}=pr(),{firstPrivatePath:r,version:a}=Le(),{token:l,user:c}=hn();mc();const u=U.useNavigate();return p.useEffect(()=>{l&&(c!=null&&c.id)&&u(`${r}${c.id}`)},[]),h.jsxs("section",{id:"login-page",children:[(a||o)&&h.jsx("div",{style:{top:"calc(1rem + env(safe-area-inset-top))",left:"calc(1rem + env(safe-area-inset-left))"},className:"text-md text-primary absolute",children:o||a}),h.jsx("div",{className:s.container||"container mx-auto flex items-center justify-center min-h-screen",children:h.jsxs("div",{className:s.cardForm||`bg-form card-style card-size flex flex-col sm:flex-row sm:items-center justify-center ${t}`,children:[h.jsx("div",{className:s.containerLogo||`basis-1/2 flex items-center justify-center ${n}`,children:e&&h.jsx(e,{className:s.logo||`login-logo h-full sm:h-auto ${i}`})}),h.jsx(bc,{})]})})]})},Cn=()=>{const{isAuthenticated:e}=Fn(),{activeAlert:t}=Ct(),{autoLogin:n}=Le(),{token:i}=hn();return p.useEffect(()=>{!e&&!i&&!n&&t("danger","Non sei autorizzato")},[]),e===null?null:e?h.jsx(U.Outlet,{}):h.jsx(U.Navigate,{to:"/",replace:!0})},wc=({value:e,defaultValue:t=!1,onChange:n})=>{const i=e!==void 0,[s,o]=p.useState(t),r=i?e:s,a=()=>{const l=!r;i||o(l),n&&n(l)};return p.useEffect(()=>{i||o(t)},[t,i]),h.jsx("button",{type:"button",onClick:a,className:`w-14 h-6 flex items-center rounded-full p-1 transition-colors cursor-pointer ${r?"bg-blue-500":"bg-gray-300"}`,"aria-pressed":r,children:h.jsx("div",{className:`bg-white w-4 h-4 rounded-full shadow-md transform transition-transform ${r?"translate-x-8":"translate-x-0"}`})})},Sc=()=>{const{logout:e,createAxiosInstances:t}=Fn(),{usersEndpoint:n}=Le(),{setIsLoading:i}=It(),{activeAlert:s}=Ct(),{token:o,user:r}=hn(),{success:a,error:l,info:c,warning:u,promise:d}=hr(),[f,m]=p.useState(null),[y,T]=p.useState(!1),[x,v]=p.useState(!1),b=(B,J)=>d(B,{loading:{title:J.loading||"Caricamento..."},success:{title:J.success||"Fatto!"},error:{title:J.error||"Errore!"}}),S=async()=>{try{if(T(!0),!o){e(),s("danger","Sessione Scaduta");return}const B=await t(),ye=(await b(B.get(`${n}`),{loading:"Caricamento utenti...",success:"Utenti caricati!"})).data;m(ye)}catch(B){console.error(B),i(!1)}finally{T(!1)}},j=B=>{v(B),s("info",`Alert impostato su ${B?"Mobile":"Desktop"} `)},w=(B="Operazione riuscita!")=>{x?a("Successo",B):s("success",B,!0)},R=(B="Si è verificato un errore!")=>{x?l("Errore",B):s("danger",B,!0)},L=(B="Informazione generica")=>{x?c("Info",B):s("info",B,!0)},M=(B="Attenzione!")=>{x?u("Attenzione",B):s("warning",B,!0)},I=()=>{e(),s("info","Hai effettuato il logout")};return h.jsx("section",{children:h.jsxs("div",{className:"container mx-auto py-8",children:[h.jsxs("div",{className:"flex items-center justify-center gap-8 h-20",children:[h.jsxs("h1",{className:"text-4xl text-center text-slate-800",children:["Email: ",r.email]}),h.jsx("button",{onClick:I,className:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded-full cursor-pointer shadow-[0_4px_10px_rgba(239,68,68,0.3),0_2px_4px_rgba(239,68,68,0.2)] hover:shadow-[0_6px_14px_rgba(185,28,28,0.4),0_3px_6px_rgba(185,28,28,0.3)] active:shadow-[0_2px_5px_rgba(239,68,68,0.3)] transition-all duration-200 active:translate-y-[2px]",children:"Logout"})]}),h.jsxs("div",{className:"flex justify-center items-center gap-4 my-8 flex-wrap",children:[h.jsx("button",{onClick:()=>w("Questo è un toast di successo!"),className:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-full shadow-md transition-all",children:"Success"}),h.jsx("button",{onClick:()=>R("Questo è un toast di errore!"),className:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded-full shadow-md transition-all",children:"Error"}),h.jsx("button",{onClick:()=>L("Questo è un toast informativo!"),className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full shadow-md transition-all",children:"Info"}),h.jsx("button",{onClick:()=>M("Questo è un toast di avviso!"),className:"bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded-full shadow-md transition-all",children:"Warning"}),h.jsxs("div",{className:"flex items-center gap-4 my-4",children:[h.jsx("span",{children:"Desktop"}),h.jsx(wc,{value:x,onChange:j}),h.jsx("span",{children:"Mobile"})]})]}),h.jsx("div",{className:"flex justify-center items-center my-12 gap-8",children:h.jsx("button",{onClick:S,className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full disabled:bg-blue-300 disabled:text-gray-500 disabled:cursor-not-allowed cursor-pointer transition-all duration-200 active:translate-y-[2px] shadow-[0_4px_10px_rgba(59,130,246,0.3),0_2px_4px_rgba(59,130,246,0.2)] hover:shadow-[0_6px_14px_rgba(29,78,216,0.4),0_3px_6px_rgba(29,78,216,0.3)] active:shadow-[0_2px_5px_rgba(59,130,246,0.3)]",disabled:y,children:"Lista degli utenti"})}),h.jsx("div",{className:"flex justify-center items-center",children:f&&h.jsx("ul",{children:f.map(B=>h.jsxs("li",{className:"text-xl my-4",children:[B.id," - ",B.email]},`user-${B.id}`))})})]})})},Jm=e=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",xmlSpace:"preserve",id:"svg1",width:409.748,height:409.748,viewBox:"0 0 108.413 108.413",...e},V.createElement("defs",{id:"defs1"},V.createElement("linearGradient",{id:"linearGradient27"},V.createElement("stop",{id:"stop27",offset:0,style:{stopColor:"red",stopOpacity:1}}),V.createElement("stop",{id:"stop28",offset:1,style:{stopColor:"#ffca00",stopOpacity:.96862745}})),V.createElement("linearGradient",{xlinkHref:"#linearGradient27",id:"linearGradient28",x1:35.002,x2:143.414,y1:192.355,y2:83.942,gradientUnits:"userSpaceOnUse"})),V.createElement("g",{id:"layer1",transform:"translate(-35.002 -83.942)"},V.createElement("rect",{id:"rect26",width:108.413,height:108.413,x:35.002,y:83.942,rx:30,ry:30,style:{fill:"url(#linearGradient28)",fillOpacity:1,fillRule:"evenodd",stroke:"#ff9b01",strokeWidth:0,strokeOpacity:1,paintOrder:"stroke markers fill"}}),V.createElement("g",{id:"g1",style:{strokeWidth:1.10252},transform:"translate(9.37 14.003)scale(.90701)"},V.createElement("path",{id:"path272",d:"M103.624 105.014c-.27.002-.79.209-1.004.4a2.5 2.5 0 0 0-.313.395l-.181.277-.018 18.064-.018 18.064h-3.047v-9.75c0-10.412-.004-10.52-.345-11.948-1.398-5.861-6.243-10.128-12.213-10.755-1.515-.16-19.836-.16-20.462-.003l-.002-.004-19.984 3.575 18.852 2.16v6.078l-17.36 3.103 17.36 1.99v6.523l-17.36 3.103 14.275 1.636-.016 4.905-.019 5.726-.63.126c-1.587.315-3.197 1.068-4.528 2.117-2.206 1.737-3.742 4.446-4.053 7.144-.37 3.213.552 6.199 2.657 8.602 1.688 1.926 4.174 3.26 6.696 3.592.824.108 2.933.031 3.671-.134.932-.21 1.79-.515 2.637-.939 2.065-1.033 3.824-2.775 4.827-4.784.504-1.01.91-2.207 1.026-3.029l.047-.329h18.828v.214c0 .117.064.468.142.78.904 3.589 3.509 6.46 6.975 7.686 1.343.475 1.946.568 3.655.564 1.32-.003 1.612-.025 2.182-.158 3.368-.785 6.026-2.86 7.515-5.865.44-.89.882-2.203.972-2.892l.043-.329 7.183-.002c7.08-.002 7.188-.003 7.495-.143.647-.293.9-.703.9-1.457 0-.569-.168-.945-.55-1.225-.505-.373-.225-.36-7.9-.36h-7.115l-.117-.597c-.261-1.329-.848-2.71-1.682-3.957-.57-.854-2.02-2.296-2.864-2.852-1.214-.798-2.805-1.463-4-1.673l-.502-.088-.018-21.17-.018-21.17-.154-.312c-.258-.521-.88-.903-1.465-.9zm9.34.76c-1.961 0-3.686 1.068-4.532 2.806-.536 1.103-.53 1.026-.507 6.443l.02 4.78.189.556c.62 1.83 2.225 3.176 4.083 3.424.241.032 2.715.053 5.496.046 5.705-.015 5.342.017 6.547-.574.548-.269.757-.422 1.25-.918.49-.49.649-.709.917-1.252.538-1.096.535-1.045.535-6.262 0-4.846-.013-5.061-.328-5.862-.764-1.94-2.613-3.187-4.727-3.187h-.557l-.003 4.14-.003 4.139-1.878 1.49a123 123 0 0 1-1.964 1.54c-.056.033-.792-.513-2.034-1.507l-1.947-1.56v-8.242zm2.29.553v6.927l1.084.87c.596.478 1.106.86 1.132.85s.535-.41 1.132-.886l1.085-.866-.017-3.43-.017-3.429-2.2-.018zm-47.247 6.508 9.197.025c9.138.025 9.2.026 9.889.175 2.276.495 4.009 1.425 5.576 2.993 1.563 1.563 2.494 3.26 3.002 5.472.15.658.15.664.17 10.686l.018 10.028h-2.393l-2.91-2.91c-2.148-2.147-2.999-2.954-3.252-3.082l-.342-.174H68.007v-11.606zm44.87 16.355c-.846 0-1.356.1-1.977.386-1.351.623-2.296 1.666-2.771 3.059l-.184.539-.02 4.745c-.023 5.4-.023 5.392.503 6.478.506 1.043 1.244 1.779 2.297 2.294.347.17.83.351 1.073.404.354.077 1.48.097 5.603.1 5.817.004 5.683.015 6.749-.507 1.377-.674 2.299-1.8 2.674-3.27.13-.505.137-.783.137-5.222 0-4.448-.007-4.717-.137-5.237-.233-.926-.636-1.636-1.32-2.324-.515-.519-.69-.645-1.318-.948-.817-.396-1.263-.497-2.19-.497h-.646v8.223l-1.91 1.518c-1.049.834-1.938 1.527-1.974 1.54s-.938-.673-2.004-1.524l-1.939-1.548v-8.209zm2.377.554.004 3.447.004 3.446 1.052.845c.58.464 1.08.845 1.112.848s.555-.39 1.16-.874l1.101-.878v-6.834h-2.217zm-50.295 9.491H85.98l3.015 3.002c2.568 2.557 3.058 3.014 3.3 3.083.206.058 1.624.08 5.04.08h4.755v3.16l-.537.094c-1.12.195-2.648.81-3.729 1.498-1.69 1.076-3.119 2.7-3.994 4.536-.443.931-.884 2.341-.884 2.83v.214H74.119l-.046-.329c-.174-1.222-.844-2.861-1.707-4.174-.532-.809-1.996-2.292-2.8-2.836-1.322-.897-2.958-1.574-4.282-1.772l-.325-.05v-4.668z",style:{fill:"#000",strokeWidth:1.10252}}),V.createElement("path",{id:"path268",d:"M103.624 103.562c-.27.002-.79.209-1.004.4a2.5 2.5 0 0 0-.313.395l-.181.277-.018 18.064-.018 18.064h-3.047v-9.75c0-10.412-.004-10.52-.345-11.948-1.398-5.861-6.243-10.129-12.213-10.755-1.515-.16-19.836-.16-20.462-.003l-.002-.004-19.984 3.575 18.852 2.16v6.078l-17.36 3.103 17.36 1.99v6.523l-17.36 3.103 14.275 1.635-.016 4.906-.019 5.726-.63.125c-1.587.316-3.197 1.069-4.528 2.118-2.206 1.737-3.742 4.445-4.053 7.144-.37 3.213.552 6.199 2.657 8.602 1.688 1.926 4.174 3.26 6.696 3.592.824.108 2.933.031 3.671-.134.932-.21 1.79-.515 2.637-.939 2.066-1.033 3.824-2.775 4.827-4.784.504-1.01.91-2.207 1.027-3.029l.046-.33h18.828v.215c0 .117.064.468.142.779a10.96 10.96 0 0 0 6.975 7.687c1.343.475 1.946.568 3.655.564 1.32-.003 1.613-.025 2.182-.158 3.368-.785 6.027-2.86 7.515-5.865.44-.89.882-2.204.972-2.892l.043-.33 7.183-.001c7.08-.002 7.188-.003 7.495-.143.647-.293.9-.703.9-1.457 0-.569-.168-.945-.55-1.225-.505-.373-.225-.36-7.899-.36h-7.116l-.117-.597c-.261-1.329-.848-2.71-1.682-3.958-.57-.853-2.02-2.295-2.864-2.85-1.214-.799-2.805-1.465-4-1.674l-.502-.088-.018-21.17-.018-21.17-.154-.312c-.258-.521-.88-.903-1.465-.9zm9.34.76c-1.961 0-3.686 1.068-4.532 2.806-.536 1.103-.53 1.026-.507 6.443l.02 4.78.189.556c.62 1.83 2.225 3.176 4.083 3.424.241.032 2.715.053 5.496.046 5.705-.015 5.343.017 6.547-.574.548-.269.757-.422 1.25-.918.49-.49.65-.709.917-1.252.539-1.096.535-1.045.535-6.262 0-4.846-.012-5.061-.328-5.862-.764-1.94-2.613-3.187-4.727-3.187h-.557l-.003 4.14-.003 4.139-1.878 1.49a116 116 0 0 1-1.964 1.54c-.056.033-.792-.513-2.034-1.507l-1.947-1.56v-8.242zm2.29.553v6.927l1.084.87c.597.478 1.106.86 1.132.85s.535-.41 1.132-.886l1.085-.866-.017-3.43-.017-3.429-2.2-.018zm-47.247 6.508 9.197.025c9.138.025 9.2.026 9.889.175 2.276.495 4.009 1.425 5.576 2.993 1.563 1.563 2.494 3.26 3.002 5.472.15.658.15.664.17 10.686l.018 10.028h-2.393l-2.91-2.91c-2.148-2.147-2.999-2.954-3.252-3.082l-.342-.174H68.007V122.99zm44.87 16.355c-.846 0-1.356.1-1.976.386-1.352.623-2.297 1.666-2.772 3.059l-.184.539-.02 4.745c-.023 5.4-.023 5.392.503 6.477.507 1.044 1.244 1.78 2.297 2.295.347.17.83.351 1.073.404.354.077 1.48.097 5.603.1 5.817.005 5.683.015 6.749-.507 1.377-.674 2.299-1.8 2.674-3.27.13-.505.137-.783.137-5.222 0-4.448-.007-4.717-.137-5.237-.233-.926-.636-1.636-1.32-2.324-.515-.519-.69-.645-1.318-.948-.817-.396-1.263-.497-2.19-.497h-.646v8.223l-1.91 1.518c-1.049.834-1.938 1.527-1.974 1.54s-.938-.673-2.004-1.524l-1.939-1.548v-8.209zm2.377.554.004 3.447.004 3.446 1.052.844c.58.465 1.08.846 1.112.849s.555-.39 1.16-.874l1.101-.878v-6.834h-2.217zm-50.295 9.491H85.98l3.015 3.002c2.568 2.557 3.058 3.014 3.3 3.083.206.058 1.624.08 5.04.08h4.755v3.16l-.537.094c-1.12.195-2.648.809-3.729 1.498-1.69 1.076-3.118 2.7-3.994 4.536-.443.931-.884 2.341-.884 2.83v.214H74.119l-.046-.329c-.174-1.222-.844-2.861-1.707-4.174-.532-.809-1.996-2.292-2.8-2.836-1.322-.897-2.958-1.574-4.282-1.773l-.325-.048v-4.669z",style:{fill:"#fff",strokeWidth:1.10252}})))),Qm=e=>{const{publicRoutes:t,privateRoutes:n}=uc(),{firstPrivatePath:i,routes:s,defaultTitle:o}=Le();pc(s,o);const{logoImg:r=Jm,pathImg:a="./src/assets/MyWarehouse.svg",firstPrivateElement:l=h.jsx(Sc,{}),globalLayout:c,isMain:u,headerComponent:d,showHeaderOnLogin:f,headerExcludedRoutes:m,footerComponent:y,showFooterOnLogin:T,footerExcludedRoutes:x,privateProvider:v,customProvider:b}=e;let S;c==="none"?S=null:p.isValidElement(c)?S=c:S=h.jsx(vc,{isMain:u,headerComponent:d,showHeaderOnLogin:f,headerExcludedRoutes:m,footerComponent:y,showFooterOnLogin:T,footerExcludedRoutes:x});const j=p.useMemo(()=>v?p.cloneElement(v,{},b?p.cloneElement(b,{},h.jsx(Cn,{children:h.jsx(U.Outlet,{})})):h.jsx(Cn,{children:h.jsx(U.Outlet,{})})):b?p.cloneElement(b,{},h.jsx(Cn,{children:h.jsx(U.Outlet,{})})):h.jsx(Cn,{children:h.jsx(U.Outlet,{})}),[v,b]),w=()=>{const R=document.querySelector("link[rel='icon']");a&&(R.href=a)};return p.useEffect(()=>{w()},[]),h.jsx(U.Routes,{children:h.jsxs(U.Route,{element:S,children:[h.jsxs(U.Route,{path:"/",children:[h.jsx(U.Route,{index:!0,element:h.jsx(xc,{Logo:r})}),t.map((R,L)=>h.jsx(U.Route,{path:R.path,element:R.element},`public-${L}`))]}),h.jsxs(U.Route,{element:j,children:[h.jsx(U.Route,{path:`${i??"/dashboard/"}:id`,element:l}),n.map((R,L)=>h.jsx(U.Route,{path:R.path,element:R.element},`private-${L}`))]})]})})},e0=({children:e})=>{var s;const{user:t}=hn(),n=U.useLocation(),{activeAlert:i}=Ct();return p.useEffect(()=>{(!t||!t.admin)&&i("warning","Non puoi accedere a questa pagina")},[t]),!t||!t.admin?h.jsx(U.Navigate,{to:((s=n.state)==null?void 0:s.from)||"/",replace:!0}):e},t0=({spinner:e=!0,spinnerStyle:t,text:n,textStyle:i,children:s,containerStyle:o,overrideStyle:r={}})=>h.jsxs("div",{className:r.container||`w-full h-full relative flex items-center justify-center ${o}`,children:[e&&h.jsx(gc,{className:r.spinner||`text-[20rem] animate-spin text-black ${t}`}),s||h.jsx("p",{className:r.text||`text-black text-2xl select-none absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${i}`,children:n||"Loading..."})]}),Ls=({isTag:e=!1,value:t,label:n,placeholder:i,id:s,onChange:o,error:r=null})=>h.jsxs("div",{className:`flex items-center justify-center relative ${e?"gap-4 mb-2":"gap-1 m-4"}`,children:[h.jsx(Si,{labelId:s,label:n,overrideStyle:`text-xl font-bold text-color-label ${e?"":"basis-1/3"}`}),h.jsx(wi,{type:"text",inputId:s,inputPlaceholder:i,inputValue:t||"",disabled:e,inputChange:o,overrideStyle:`${e?"w-full":"basis-2/3"} ${r?"border-red-600 focus:ring focus:ring-red-600 focus:border-red-600 focus:shadow-[0_0_0_4px_rgba(255,0,0,0.5)]":""} bg-input-bg border border-input-border text-input-text text-input-placeholder input-rounded focus:ring focus:ring-focus-ring focus:border-spot-rfid-input-border focus:outline-none focus:shadow-spot-rfid-input block w-full p-input`}),r&&h.jsx("p",{className:"text-red-600 text-[13px] absolute bottom-0 left-26 translate-y-[20px]",children:r})]}),n0=({title:e,showTag:t,value:n,tag:i,showButton:s,handleClick:o})=>h.jsxs("div",{className:`border border-slate-300 rounded-xl p-2 m-2 shadow-xl transition-all duration-700 transform ${e==="TAG B"?"delay-200":"mb-4"} ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-10"}`,children:[h.jsx("h2",{className:"text-center mb-2 text-2xl",children:e}),h.jsx(Ls,{label:"TID",placeholder:`Leggi ${e}`,id:i?`tid-${i}`:"tid",isTag:!0,value:(n==null?void 0:n.valueTID)||""}),h.jsx(Ls,{label:"EPC",placeholder:`Leggi ${e}`,id:i?`epc-${i}`:"epc",isTag:!0,value:(n==null?void 0:n.valueEPC)||""}),!s&&h.jsx("div",{className:"flex items-center justify-center",children:h.jsx("button",{onClick:o,disabled:!(n!=null&&n.valueTID)&&!(n!=null&&n.valueEPC),className:"my-1 bg-write-button disabled:bg-write-button/40 text-white px-4 py-2 rounded-lg shadow-md disabled:transition-none disabled:active:translate-y-0 transition-all duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer uppercase",children:"Scrivi tag"})})]});function i0(e){return St({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.04 1.33L12.71 3l.29.71v.33h-.5l-.5.5v-.83l-1.67-1.67H10v4H4v-4H2v10h3l-.5 1H2l-1-1v-10l1-1h8.33l.71.29zM7 5h2V2H7v3zm6.5 0L15 6.5l-.02.69-5.5 5.5-.13.12-.37.37-.1.09-3 1.5-.67-.67 1.5-3 .09-.1.37-.37.12-.13 5.5-5.5h.71zm-6.22 7.24l-.52 1 1.04-.48-.52-.52zm.69-1.03l.79.79 5.15-5.15-.79-.79-5.15 5.15z"},child:[]}]})(e)}const s0=({minReadingPower:e,maxReadingPower:t,stepRangePower:n,rangeValue:i,setRangeValue:s,show:o,handleClick:r})=>{const a=(i-e)/(t-e)*100;return h.jsxs("div",{className:`border border-slate-300 rounded-xl p-2 m-2 shadow-xl transition-all duration-700 transform ${o?"opacity-100 translate-y-0":"opacity-0 translate-y-10"}`,children:[h.jsx("h2",{className:"text-center my-4 text-2xl",children:"Configurazione Potenza"}),h.jsxs("div",{className:"relative my-12 w-[90%] mx-auto",children:[h.jsx("input",{id:"power",type:"range",min:e,max:t,step:n,value:i,onChange:l=>s(Number(l.target.value)),className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-primary-accent"}),h.jsx("div",{className:"absolute bottom-8 transform -translate-x-1/2 bg-white border border-gray-200 text-sm text-gray-800 py-1 px-2 rounded-lg shadow-md transition-opacity",style:{left:`${a}%`},children:i})]}),h.jsx("div",{className:"flex items-center justify-center my-4",children:h.jsxs("button",{onClick:()=>r(i),className:"py-2 px-4 flex items-center justify-center gap-1 bg-save-button text-white rounded-lg shadow-md transition duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer",children:["Salva",h.jsx(i0,{})]})})]})},r0=({show:e,isConfigPage:t,handleSelectFile:n})=>h.jsxs("div",{className:`${t?`${e?"opacity-100 translate-y-0 delay-200":"opacity-0 translate-y-10"}`:""} p-4 text-center transition-all duration-700 transform`,children:[h.jsxs("h2",{className:"text-xl my-4",children:["Seleziona il file ",h.jsx("strong",{children:"config.json"})," per recuperare le chiavi univoche del dispositivo"]}),h.jsx("button",{onClick:n,className:"my-4 bg-blue-500 text-white px-4 py-2 rounded-lg",children:"Seleziona file"})]});function o0(e){return St({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M312 372c-7.7 0-14 6.3-14 14 0 9.9-8.1 18-18 18H94c-9.9 0-18-8.1-18-18V126c0-9.9 8.1-18 18-18h186c9.9 0 18 8.1 18 18 0 7.7 6.3 14 14 14s14-6.3 14-14c0-25.4-20.6-46-46-46H94c-25.4 0-46 20.6-46 46v260c0 25.4 20.6 46 46 46h186c25.4 0 46-20.6 46-46 0-7.7-6.3-14-14-14z"},child:[]},{tag:"path",attr:{d:"M372.9 158.1c-2.6-2.6-6.1-4.1-9.9-4.1-3.7 0-7.3 1.4-9.9 4.1-5.5 5.5-5.5 14.3 0 19.8l65.2 64.2H162c-7.7 0-14 6.3-14 14s6.3 14 14 14h256.6L355 334.2c-5.4 5.4-5.4 14.3 0 19.8l.1.1c2.7 2.5 6.2 3.9 9.8 3.9 3.8 0 7.3-1.4 9.9-4.1l82.6-82.4c4.3-4.3 6.5-9.3 6.5-14.7 0-5.3-2.3-10.3-6.5-14.5l-84.5-84.2z"},child:[]}]})(e)}function a0(e){return St({tag:"svg",attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 9.059v-2.559c0-.256-.098-.512-.293-.708-.195-.195-.451-.292-.707-.292s-.512.097-.707.292l-6.293 6.208 6.293 6.207c.195.195.451.293.707.293s.512-.098.707-.293.293-.452.293-.707v-2.489c2.75.068 5.755.566 8 3.989v-1c0-4.633-3.5-8.443-8-8.941z"},child:[]}]})(e)}const l0=e=>V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",xmlSpace:"preserve",id:"svg1",width:409.748,height:409.748,viewBox:"0 0 108.413 108.413",...e},V.createElement("defs",{id:"defs1"},V.createElement("linearGradient",{id:"linearGradient27"},V.createElement("stop",{id:"stop27",offset:0,style:{stopColor:"red",stopOpacity:1}}),V.createElement("stop",{id:"stop28",offset:1,style:{stopColor:"#ffca00",stopOpacity:.96862745}})),V.createElement("linearGradient",{xlinkHref:"#linearGradient27",id:"linearGradient28",x1:35.002,x2:143.414,y1:192.355,y2:83.942,gradientUnits:"userSpaceOnUse"})),V.createElement("g",{id:"layer1",transform:"translate(-35.002 -83.942)"},V.createElement("rect",{id:"rect26",width:108.413,height:108.413,x:35.002,y:83.942,rx:30,ry:30,style:{fill:"url(#linearGradient28)",fillOpacity:1,fillRule:"evenodd",stroke:"#ff9b01",strokeWidth:0,strokeOpacity:1,paintOrder:"stroke markers fill"}}),V.createElement("g",{id:"g1",style:{strokeWidth:.892424},transform:"matrix(1.08335 0 0 1.15901 -13.02 -26.51)"},V.createElement("path",{id:"path1",d:"M93.826 176.603c-.169-.034-1.837-.443-3.708-.909s-6.894-1.707-11.162-2.759a2463 2463 0 0 1-8.036-1.986 1.26 1.26 0 0 1-.84-.72c-.135-.297-.142-.67-.144-7.586l-.002-7.275-1.586-.388c-.873-.214-2.732-.663-4.131-.998-1.664-.399-2.62-.664-2.765-.767-.451-.321-.673-1.178-.44-1.7.05-.114 1.348-1.542 2.882-3.173l4.473-4.751c.925-.983 1.682-1.813 1.682-1.846 0-.032-2.013-2.197-4.473-4.811s-4.513-4.845-4.564-4.96c-.124-.278-.122-.806.005-1.108.137-.329.59-.717.947-.812a377 377 0 0 1 3.04-.735 4957 4957 0 0 0 16.208-3.91c3.114-.76 3.63-.84 4.028-.63.113.059 1.108 1.071 2.211 2.249a1906 1906 0 0 0 4.454 4.731l2.447 2.591.578-.603c.73-.762 7.41-7.89 7.899-8.429.533-.588 1.164-.826 1.676-.632.098.037 1.949.488 4.115 1.003 2.165.515 5.554 1.325 7.53 1.802l7.11 1.713c1.934.466 3.612.885 3.727.931.44.176.82.811.821 1.372 0 .11-.077.339-.171.51-.146.264-2.64 2.954-7.92 8.542-.595.63-1.074 1.174-1.062 1.207.011.034 2.015 2.18 4.453 4.768s4.493 4.832 4.565 4.985c.232.491.124 1.107-.27 1.528-.244.262-.464.356-1.276.544-.4.093-2.137.51-3.86.927l-3.307.798-.172.04v7.212c0 5.18-.025 7.285-.087 7.472a1.6 1.6 0 0 1-.287.477c-.211.23-.693.509-.877.509-.06 0-4.2 1.011-9.197 2.248-12.941 3.202-13.804 3.411-14.017 3.4a4 4 0 0 1-.497-.071m-.115-14.064c0-6.938-.027-12.614-.059-12.614s-1.13 1.144-2.44 2.542c-5.288 5.648-5.758 6.135-6.045 6.267-.478.22.5.423-8.925-1.857-2.27-.549-4.327-1.045-4.568-1.102l-.44-.103v13.955l.975.24c6.052 1.49 19.206 4.741 20.126 4.974a30 30 0 0 0 1.28.306c.076.005.096-2.563.096-12.608m12.576 9.853c5.93-1.467 10.857-2.684 10.951-2.706l.171-.04.02-6.992c.018-6.187.006-6.99-.094-6.958-.063.019-1.698.416-3.632.883-1.934.466-4.72 1.14-6.192 1.497-3.653.887-3.407.84-3.789.725-.186-.056-.463-.233-.65-.416-.18-.175-2.039-2.141-4.13-4.37-2.092-2.229-3.833-4.063-3.868-4.077s-.063 5.656-.063 12.601v12.627l.248-.054c.137-.03 5.1-1.253 11.028-2.72m-20.964-15.644c.885-.919 7.626-8.102 8.034-8.56.163-.184.284-.345.268-.36-.03-.026-1.291-.333-7.062-1.721l-9.387-2.26-5.87-1.413-.512.554a2343 2343 0 0 0-8.041 8.564c-.267.285-.47.533-.45.552s1.89.48 4.158 1.025c9.94 2.387 16.933 4.072 17.464 4.209.316.08.598.149.627.151s.376-.33.771-.74m20.235.401c.78-.189 3.86-.93 6.845-1.648 12.242-2.942 13.984-3.364 14.015-3.396.019-.018-.237-.321-.568-.673l-4.112-4.38-3.921-4.178-.413-.437-6.82 1.638c-3.75.9-8.299 1.997-10.107 2.437s-3.76.91-4.339 1.047c-.578.137-1.05.278-1.05.313 0 .06 1.972 2.177 6.918 7.426 1.135 1.204 2.08 2.191 2.1 2.193.019.002.672-.152 1.452-.342m-9.338-11.001c.954-.227 3.678-.885 6.054-1.461a4296 4296 0 0 1 11.257-2.72c.41-.097.746-.196.746-.22 0-.042-2.28-.6-11.889-2.913a3300 3300 0 0 1-5.734-1.386c-1.219-.297-2.268-.538-2.331-.536s-1.388.313-2.944.691-4.05.982-5.543 1.34c-1.492.36-4.434 1.07-6.536 1.58-2.103.508-4.072.982-4.377 1.054-.305.07-.554.148-.554.17s.61.186 1.357.362c.746.177 4.831 1.16 9.078 2.188l8.525 2.06c.441.106.882.196.98.199s.958-.18 1.911-.408m-23.175-5.507c1.616-.385 15.137-3.644 18.927-4.562.914-.222 1.663-.423 1.663-.447 0-.043-2.176-2.373-6.494-6.955a220 220 0 0 1-2.417-2.588c-.068-.09-.257-.065-1.223.168-2.153.52-10.698 2.575-15.93 3.832-2.876.692-5.247 1.274-5.267 1.295-.046.045-.21-.132 4.76 5.153 2.23 2.371 4.083 4.358 4.117 4.415s.074.105.09.105.815-.187 1.774-.416m44.726.017c.668-.727 2.633-2.823 4.61-4.915 3.59-3.802 4.074-4.323 4.04-4.356-.019-.019-.892-.24-1.942-.491a14930 14930 0 0 1-17.845-4.296l-2.558-.62-.225.256c-.123.141-.763.824-1.42 1.518-.66.694-2.26 2.397-3.559 3.784a573 573 0 0 1-3.073 3.264c-.392.408-.712.773-.712.812 0 .081 1.221.382 13.259 3.264 4.832 1.157 8.803 2.12 8.824 2.141.102.102.267.003.601-.361",style:{fill:"#fff",fillOpacity:1,strokeWidth:0,strokeDasharray:"none"}}),V.createElement("path",{id:"path2",d:"M94.237 147.397c-.19-.076-.536-.44-.83-.87-.138-.202-.98-1.552-1.87-3.001-6.428-10.455-9.515-15.547-9.95-16.413-.459-.916-.982-2.465-1.178-3.493-.478-2.499-.335-4.879.435-7.235 1.186-3.633 3.713-6.577 7.144-8.326a14.6 14.6 0 0 1 4.316-1.388c1.018-.165 3.183-.165 4.201 0a14.6 14.6 0 0 1 5.902 2.32c3.031 2.03 5.227 5.32 5.959 8.928.623 3.072.293 6.038-.986 8.869-.359.792-3.667 6.345-7.571 12.703l-3.23 5.263c-.787 1.285-1.265 1.992-1.542 2.284-.398.42-.519.473-.8.36m1.266-20.98a6.44 6.44 0 0 0 4.949-4.23c.294-.862.38-1.48.33-2.368-.098-1.758-.749-3.161-2.028-4.375-1.216-1.153-2.656-1.723-4.35-1.723-1.69 0-3.132.57-4.345 1.72-.963.913-1.534 1.855-1.868 3.078-.13.48-.154.72-.151 1.567.003.873.026 1.084.183 1.657a6.43 6.43 0 0 0 3.963 4.37 6.3 6.3 0 0 0 3.317.303",style:{fill:"#d30000",fillOpacity:1,strokeWidth:.892424}}),V.createElement("path",{id:"rect2",d:"M158.632 137.745h3.539v1.387h-3.539z",style:{fill:"#fff",fillOpacity:1,fillRule:"evenodd",stroke:"#ff9b01",strokeWidth:0,strokeDasharray:"none",paintOrder:"stroke markers fill"},transform:"matrix(.98806 .15405 -.46962 .88287 0 0)"}),V.createElement("path",{id:"rect3",d:"M120.628 170.946h3.167v1.222h-3.167z",style:{fill:"#fff",fillOpacity:1,fillRule:"evenodd",stroke:"#ff9b01",strokeWidth:0,strokeDasharray:"none",paintOrder:"stroke markers fill"},transform:"rotate(8.335)scale(.9449 1)skewY(-18.126)"})))),c0=({Logo:e,logo:t})=>{const{logout:n}=Fn(),{activeAlert:i}=Ct(),{autoLogin:s,configRoutes:o,firstPrivateTitle:r,showHeaderButton:a}=Le(),{isLoading:l}=It(),c=U.useLocation(),u=U.useNavigate(),d=()=>{n(),i("info","Hai effettuato il logout")},f=o.find(y=>y.path===c.pathname),m=U.useMatch("home/:id");return h.jsx("header",{className:l?"hidden":"",children:h.jsxs("nav",{className:"header-size flex items-center justify-between px-2 shadow-lg border-b gap-2 border-b-gray-300",children:[h.jsx("figure",{children:e&&typeof e=="function"?h.jsx(e,{className:"header-logo-size"}):t?h.jsx("img",{src:t,alt:"Logo",className:"header-logo-size"}):h.jsx(l0,{className:"header-logo-size"})}),h.jsx("div",{children:h.jsx("p",{children:(f==null?void 0:f.title)||r})}),h.jsxs("div",{children:[!s&&m&&h.jsx("button",{className:"h-[48px] w-[48px] flex items-center justify-center bg-red-600 text-white rounded-lg shadow-md transition duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer",type:"button",onClick:d,children:h.jsx(o0,{className:"text-4xl w-full"})}),!m&&a&&h.jsx("button",{className:"h-[48px] w-[48px] flex items-center justify-center bg-sky-600 text-white rounded-lg shadow-md transition duration-200 ease-in-out transform active:translate-y-[2px] cursor-pointer",type:"button",onClick:()=>u(-1),children:h.jsx(a0,{className:"text-4xl w-full"})})]})]})})};function u0(e){return St({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M763.024 259.968C718.4 141.536 622.465 66.527 477.553 66.527c-184.384 0-313.392 136.912-324.479 315.536C64.177 410.495.002 501.183.002 603.903c0 125.744 98.848 231.968 215.823 231.968h92.448c17.664 0 32-14.336 32-32 0-17.68-14.336-32-32-32h-92.448c-82.304 0-152.832-76.912-152.832-167.968 0-80.464 56.416-153.056 127.184-165.216l29.04-5.008-2.576-29.328-.24-.368c0-155.872 102.576-273.44 261.152-273.44 127.104 0 198.513 62.624 231.537 169.44l6.847 22.032 23.056.496c118.88 2.496 223.104 98.945 223.104 218.77 0 109.055-72.273 230.591-181.696 230.591h-73.12c-17.664 0-32 14.336-32 32 0 17.68 14.336 32 32 32l72.88-.095c160-4.224 243.344-157.071 243.344-294.495 0-147.712-115.76-265.744-260.48-281.312zM535.985 514.941c-.176-.192-.241-.352-.354-.512l-8.095-8.464c-4.432-4.688-10.336-7.008-16.24-6.976-5.905-.048-11.777 2.288-16.289 6.975l-8.095 8.464c-.16.16-.193.353-.336.513L371.072 642.685c-8.944 9.344-8.944 24.464 0 33.84l8.064 5.471c8.945 9.344 23.44 6.32 32.368-3.024l68.113-75.935v322.432c0 17.664 14.336 32 32 32s32-14.336 32-32V603.34l70.368 77.631c8.944 9.344 23.408 12.369 32.336 3.025l8.064-5.472c8.945-9.376 8.945-24.496 0-33.84z"},child:[]}]})(e)}const d0=e=>{const[t,n]=p.useState(!1),{onFilesSelect:i,id:s="dropzone-file",containerStyle:o="flex items-center justify-center w-full relative h-full",dropzoneStyle:r="flex flex-col items-center justify-center text-body px-6 text-center pt-5 pb-6 pointer-events-none",labelStyle:a=`flex flex-col items-center justify-center w-full h-full rounded-2xl transition-all duration-300 bg-slate-100/80 shadow-lg border border-slate-300 rounded-base cursor-pointer hover:bg-slate-200/80 hover:border-slate-500 hover:shadow-xl ${t?"bg-slate-200/80 border-slate-600 shadow-xl shadow-primary-strong":"border-default-strong"}`,dragActiveStyle:l="absolute w-full h-full top-0 left-0 rounded-2xl border-2 border-primary-strong/70 animate-pulse"}=e,c=p.useCallback(f=>{f.preventDefault(),f.stopPropagation(),f.type==="dragenter"||f.type==="dragover"?n(!0):f.type==="dragleave"&&n(!1)},[]),u=p.useCallback(f=>{f.preventDefault(),f.stopPropagation(),n(!1),f.dataTransfer.files&&f.dataTransfer.files.length>0&&(i==null||i(Array.from(f.dataTransfer.files)))},[i]),d=f=>{f.target.files&&f.target.files.length>0&&(i==null||i(Array.from(f.target.files)))};return h.jsxs("div",{className:o,onDragEnter:c,children:[h.jsxs("label",{htmlFor:s,className:a,children:[h.jsxs("div",{className:r,children:[h.jsx(u0,{className:"text-8xl"}),h.jsxs("p",{className:"mb-2",children:[h.jsx("span",{className:"font-semibold",children:"Clicca per caricare"})," o trascina qui i file"]}),h.jsx("p",{className:"text-sm opacity-70",children:"Puoi selezionare più file"})]}),h.jsx("input",{id:s,type:"file",multiple:!0,className:"hidden",onChange:d})]}),t&&h.jsx("div",{className:l,onDragEnter:c,onDragLeave:c,onDragOver:c,onDrop:u})]})},Vs=e=>{const{id:t,name:n,value:i,onChange:s,disabled:o,required:r,labelStyle:a,containerStyle:l,inputStyle:c,title:u,children:d}=e;return h.jsxs("div",{className:l||"flex flex-col gap-1 mx-auto w-full",children:[h.jsx("label",{htmlFor:t,className:a||"mb-1 text-input-label font-medium text-color-label",children:u}),h.jsx("input",{type:"date",id:t,name:n,value:i||"",onChange:s,disabled:o,required:r,className:c||"bg-input-bg border border-input-border rounded-lg text-input-text placeholder:text-input-placeholder rounded-input focus:ring focus:ring-primary focus:border-primary focus:outline-none focus:shadow-[var(--shadow-primary-input)] block w-full h-[43px] p-input disabled:bg-gray-100 disabled:text-gray-400 disabled:cursor-not-allowed disabled:opacity-60"}),d]})},f0=e=>{const{startId:t,endId:n,startName:i,endName:s,startValue:o,endValue:r,onChange:a,disabled:l,required:c,dateError:u,startTitle:d,endTitle:f,startStyle:m,endStyle:y,labelStyle:T,containerStyle:x,startContainerStyle:v,endContainerStyle:b,endDateShow:S=!0,children:j}=e;return h.jsxs("div",{className:x||"flex gap-4 mx-auto w-full mb-4",children:[h.jsx(Vs,{id:t,name:i,value:o,onChange:a,disabled:l,required:c,title:d,labelStyle:T,containerStyle:v,inputStyle:m}),S&&h.jsx(Vs,{id:n,name:s,value:r,onChange:a,disabled:l,required:c,title:f,labelStyle:T,containerStyle:b,inputStyle:y,children:u&&h.jsx("p",{className:"text-red-500 text-[13px] mt-1",children:u})}),j]})},Tc=({sizeContainer:e,Logo:t,spinnerColor:n})=>h.jsxs("div",{className:`relative ${e||"h-60 w-60"}`,children:[h.jsx("svg",{className:"absolute inset-0 w-full h-full animate-spin-slow z-10",viewBox:"0 0 100 100",children:h.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:n||"#60A5FA",strokeWidth:"6",strokeLinecap:"round",strokeDasharray:"280",strokeDashoffset:"210"})}),h.jsx("figure",{className:"h-full w-full rounded-full overflow-hidden relative",children:h.jsx(t,{className:"h-full w-full"})})]}),h0=({gradients:e,moreGradients:t,containerSize:n,overlayStyle:i,NewLogoLoader:s,Logo:o,spinnerColor:r})=>{const{customLoginTimeout:a}=Le(),{isLoading:l}=It(),[c,u]=p.useState(l),[d,f]=p.useState(!1),m=["bg-gradient-to-br from-blue-500 via-blue-400 to-blue-200","bg-gradient-to-br from-blue-200 via-blue-400 to-purple-300","bg-gradient-to-br from-blue-400 via-cyan-300 to-blue-200","bg-gradient-to-br from-blue-100 via-purple-200 to-pink-100","bg-gradient-to-br from-blue-400 via-blue-500 to-blue-600","bg-gradient-to-br from-blue-300 via-cyan-400 to-indigo-400","bg-gradient-to-br from-cyan-200 via-blue-300 to-blue-500","bg-gradient-to-br from-indigo-300 via-blue-400 to-purple-400",...t||[]],y=e??[...m,...t??[]],T=y[Math.floor(Math.random()*y.length)],x=n||"h-[420px] w-[420px]";return p.useEffect(()=>{if(l){u(!0);const v=setTimeout(()=>f(!0),10);return()=>clearTimeout(v)}else{f(!1);const v=setTimeout(()=>u(!1),300);return()=>clearTimeout(v)}},[l,a]),h.jsx("div",{className:`${i||"fixed top-0 bottom-0 left-0 right-0 flex items-center justify-center z-999 transition-opacity duration-300"} ${T} ${d?"opacity-100":"opacity-0"}`,children:s?h.jsx(s,{}):h.jsx(Tc,{sizeContainer:x,Logo:o,spinnerColor:r})})};Object.defineProperty(exports,"BrowserRouter",{enumerable:!0,get:()=>U.BrowserRouter});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>U.Link});Object.defineProperty(exports,"NavLink",{enumerable:!0,get:()=>U.NavLink});Object.defineProperty(exports,"Outlet",{enumerable:!0,get:()=>U.Outlet});Object.defineProperty(exports,"Route",{enumerable:!0,get:()=>U.Route});Object.defineProperty(exports,"Routes",{enumerable:!0,get:()=>U.Routes});Object.defineProperty(exports,"useLocation",{enumerable:!0,get:()=>U.useLocation});Object.defineProperty(exports,"useMatch",{enumerable:!0,get:()=>U.useMatch});Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:()=>U.useNavigate});Object.defineProperty(exports,"useParams",{enumerable:!0,get:()=>U.useParams});exports.axios=oa;exports.ReactDOM=aa;exports.Alert=Ds;exports.AlertProvider=Nm;exports.AuthAdmin=e0;exports.AuthPage=Cn;exports.AuthProvider=Bm;exports.CardInputRange=s0;exports.CardInputTag=n0;exports.ConfigFileReader=r0;exports.ConfigProvider=qc;exports.Dashboard=Sc;exports.DefaultLayout=vc;exports.ErrorPage=ca;exports.FileDropzone=d0;exports.Header=c0;exports.Input=wi;exports.InputDate=Vs;exports.InputGroup=Ls;exports.InputLabel=Si;exports.InputStartEndDate=f0;exports.Loader=h0;exports.Loading=yc;exports.LoadingComponent=t0;exports.LoadingProvider=Hc;exports.Login=xc;exports.LoginForm=bc;exports.LoginFormProvider=Fm;exports.LogoLoader=Tc;exports.ModalProvider=$m;exports.PackageRoutes=Qm;exports.RouteProvider=_m;exports.SwitchRadio=wc;exports.UsePageTitle=pc;exports.fetchAxiosConfig=ac;exports.useAlert=Ct;exports.useAuth=Fn;exports.useAuthStorage=hn;exports.useConfig=Le;exports.useDevice=ga;exports.useIndexedDB=zm;exports.useLoading=It;exports.useLoginForm=pr;exports.useModal=hc;exports.useOrientation=Um;exports.useRoutesInjection=uc;exports.useSafeArea=Hm;exports.useStorage=Ms;exports.useToast=hr;exports.useViewportHeight=mc;
|