@g4rcez/components 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +151 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +7 -1
package/dist/index.umd.js
CHANGED
|
@@ -104,7 +104,7 @@ Valid keys: `+JSON.stringify(Object.keys(C),null," "));var B=le(V,X,ee,H,I+"."+
|
|
|
104
104
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nw(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function rw(t){if(Array.isArray(t))return ol(t)}function Vd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function $d(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vd(Object(n),!0).forEach(function(r){jd(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _o(t,e){return sw(t)||iw(t,e)||Bd(t,e)||ow()}function ow(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
105
105
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bd(t,e){if(t){if(typeof t=="string")return ol(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ol(t,e)}}function ol(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function iw(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function sw(t){if(Array.isArray(t))return t}var aw="file-invalid-type",lw="file-too-large",cw="file-too-small",uw="too-many-files",fw=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var n=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:aw,message:"File type must be ".concat(n)}},zd=function(e){return{code:lw,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},Hd=function(e){return{code:cw,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},dw={code:uw,message:"Too many files"};function Wd(t,e){var n=t.type==="application/x-moz-file"||ew(t,e);return[n,n?null:fw(e)]}function Ud(t,e,n){if(er(t.size))if(er(e)&&er(n)){if(t.size>n)return[!1,zd(n)];if(t.size<e)return[!1,Hd(e)]}else{if(er(e)&&t.size<e)return[!1,Hd(e)];if(er(n)&&t.size>n)return[!1,zd(n)]}return[!0,null]}function er(t){return t!=null}function hw(t){var e=t.files,n=t.accept,r=t.minSize,o=t.maxSize,i=t.multiple,s=t.maxFiles,a=t.validator;return!i&&e.length>1||i&&s>=1&&e.length>s?!1:e.every(function(l){var c=Wd(l,n),u=_o(c,1),f=u[0],d=Ud(l,r,o),h=_o(d,1),p=h[0],m=a?a(l):null;return f&&p&&!m})}function zi(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function Hi(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function Gd(t){t.preventDefault()}function pw(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function mw(t){return t.indexOf("Edge/")!==-1}function gw(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return pw(t)||mw(t)}function qt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return e.some(function(a){return!zi(r)&&a&&a.apply(void 0,[r].concat(i)),zi(r)})}}function yw(){return"showOpenFilePicker"in window}function vw(t){if(er(t)){var e=Object.entries(t).filter(function(n){var r=_o(n,2),o=r[0],i=r[1],s=!0;return Kd(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(Zd))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=_o(r,2),i=o[0],s=o[1];return $d($d({},n),{},jd({},i,s))},{});return[{description:"Files",accept:e}]}return t}function bw(t){if(er(t))return Object.entries(t).reduce(function(e,n){var r=_o(n,2),o=r[0],i=r[1];return[].concat(Nd(e),[o],Nd(i))},[]).filter(function(e){return Kd(e)||Zd(e)}).join(",")}function xw(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function ww(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function Kd(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||/\w+\/[-+.\w]+/g.test(t)}function Zd(t){return/^.*\.[\w]+$/.test(t)}var Sw=["children"],Tw=["open"],Ew=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Cw=["refKey","onChange","onClick"];function Aw(t){return Ow(t)||Pw(t)||qd(t)||_w()}function _w(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
106
106
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pw(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ow(t){if(Array.isArray(t))return sl(t)}function il(t,e){return Dw(t)||kw(t,e)||qd(t,e)||Iw()}function Iw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
107
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qd(t,e){if(t){if(typeof t=="string")return sl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sl(t,e)}}function sl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function kw(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Dw(t){if(Array.isArray(t))return t}function Yd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ue(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yd(Object(n),!0).forEach(function(r){al(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function al(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wi(t,e){if(t==null)return{};var n=Mw(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Mw(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}var ll=x.forwardRef(function(t,e){var n=t.children,r=Wi(t,Sw),o=Jd(r),i=o.open,s=Wi(o,Tw);return x.useImperativeHandle(e,function(){return{open:i}},[i]),x.createElement(x.Fragment,null,n(Ue(Ue({},s),{},{open:i})))});ll.displayName="Dropzone";var Xd={disabled:!1,getFilesFromEvent:Ux,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ll.defaultProps=Xd,ll.propTypes={children:Le.func,accept:Le.objectOf(Le.arrayOf(Le.string)),multiple:Le.bool,preventDropOnDocument:Le.bool,noClick:Le.bool,noKeyboard:Le.bool,noDrag:Le.bool,noDragEventsBubbling:Le.bool,minSize:Le.number,maxSize:Le.number,maxFiles:Le.number,disabled:Le.bool,getFilesFromEvent:Le.func,onFileDialogCancel:Le.func,onFileDialogOpen:Le.func,useFsAccessApi:Le.bool,autoFocus:Le.bool,onDragEnter:Le.func,onDragLeave:Le.func,onDragOver:Le.func,onDrop:Le.func,onDropAccepted:Le.func,onDropRejected:Le.func,onError:Le.func,validator:Le.func};var cl={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Jd(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Ue(Ue({},Xd),t),n=e.accept,r=e.disabled,o=e.getFilesFromEvent,i=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,u=e.onDragLeave,f=e.onDragOver,d=e.onDrop,h=e.onDropAccepted,p=e.onDropRejected,m=e.onFileDialogCancel,y=e.onFileDialogOpen,v=e.useFsAccessApi,b=e.autoFocus,g=e.preventDropOnDocument,S=e.noClick,w=e.noKeyboard,T=e.noDrag,P=e.noDragEventsBubbling,O=e.onError,k=e.validator,D=x.useMemo(function(){return bw(n)},[n]),L=x.useMemo(function(){return vw(n)},[n]),A=x.useMemo(function(){return typeof y=="function"?y:Qd},[y]),j=x.useMemo(function(){return typeof m=="function"?m:Qd},[m]),F=x.useRef(null),_=x.useRef(null),M=x.useReducer(Rw,cl),N=il(M,2),z=N[0],q=N[1],C=z.isFocused,$=z.isFileDialogActive,Y=x.useRef(typeof window<"u"&&window.isSecureContext&&v&&yw()),re=function(){!Y.current&&$&&setTimeout(function(){if(_.current){var oe=_.current.files;oe.length||(q({type:"closeDialog"}),j())}},300)};x.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[_,$,j,Y]);var ee=x.useRef([]),H=function(oe){F.current&&F.current.contains(oe.target)||(oe.preventDefault(),ee.current=[])};x.useEffect(function(){return g&&(document.addEventListener("dragover",Gd,!1),document.addEventListener("drop",H,!1)),function(){g&&(document.removeEventListener("dragover",Gd),document.removeEventListener("drop",H))}},[F,g]),x.useEffect(function(){return!r&&b&&F.current&&F.current.focus(),function(){}},[F,b,r]);var I=x.useCallback(function(Z){O?O(Z):console.error(Z)},[O]),V=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),pe(Z),ee.current=[].concat(Aw(ee.current),[Z.target]),Hi(Z)&&Promise.resolve(o(Z)).then(function(oe){if(!(zi(Z)&&!P)){var Fe=oe.length,Ke=Fe>0&&hw({files:oe,accept:D,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:k}),ft=Fe>0&&!Ke;q({isDragAccept:Ke,isDragReject:ft,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(oe){return I(oe)})},[o,c,I,P,D,s,i,a,l,k]),W=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),pe(Z);var oe=Hi(Z);if(oe&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return oe&&f&&f(Z),!1},[f,P]),K=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),pe(Z);var oe=ee.current.filter(function(Ke){return F.current&&F.current.contains(Ke)}),Fe=oe.indexOf(Z.target);Fe!==-1&&oe.splice(Fe,1),ee.current=oe,!(oe.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Hi(Z)&&u&&u(Z))},[F,u,P]),X=x.useCallback(function(Z,oe){var Fe=[],Ke=[];Z.forEach(function(ft){var ln=Wd(ft,D),nt=il(ln,2),cn=nt[0],mi=nt[1],lo=Ud(ft,s,i),sa=il(lo,2),Du=sa[0],Mu=sa[1],Ru=k?k(ft):null;if(cn&&Du&&!Ru)Fe.push(ft);else{var Fu=[mi,Mu];Ru&&(Fu=Fu.concat(Ru)),Ke.push({file:ft,errors:Fu.filter(function(sk){return sk})})}}),(!a&&Fe.length>1||a&&l>=1&&Fe.length>l)&&(Fe.forEach(function(ft){Ke.push({file:ft,errors:[dw]})}),Fe.splice(0)),q({acceptedFiles:Fe,fileRejections:Ke,type:"setFiles"}),d&&d(Fe,Ke,oe),Ke.length>0&&p&&p(Ke,oe),Fe.length>0&&h&&h(Fe,oe)},[q,a,D,s,i,l,d,h,p,k]),le=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),pe(Z),ee.current=[],Hi(Z)&&Promise.resolve(o(Z)).then(function(oe){zi(Z)&&!P||X(oe,Z)}).catch(function(oe){return I(oe)}),q({type:"reset"})},[o,X,I,P]),B=x.useCallback(function(){if(Y.current){q({type:"openDialog"}),A();var Z={multiple:a,types:L};window.showOpenFilePicker(Z).then(function(oe){return o(oe)}).then(function(oe){X(oe,null),q({type:"closeDialog"})}).catch(function(oe){xw(oe)?(j(oe),q({type:"closeDialog"})):ww(oe)?(Y.current=!1,_.current?(_.current.value=null,_.current.click()):I(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):I(oe)});return}_.current&&(q({type:"openDialog"}),A(),_.current.value=null,_.current.click())},[q,A,j,v,X,I,L,a]),ke=x.useCallback(function(Z){!F.current||!F.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),B())},[F,B]),We=x.useCallback(function(){q({type:"focus"})},[]),Xe=x.useCallback(function(){q({type:"blur"})},[]),se=x.useCallback(function(){S||(gw()?setTimeout(B,0):B())},[S,B]),Ae=function(oe){return r?null:oe},Se=function(oe){return w?null:Ae(oe)},Ce=function(oe){return T?null:Ae(oe)},pe=function(oe){P&&oe.stopPropagation()},Pe=x.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Fe=oe===void 0?"ref":oe,Ke=Z.role,ft=Z.onKeyDown,ln=Z.onFocus,nt=Z.onBlur,cn=Z.onClick,mi=Z.onDragEnter,lo=Z.onDragOver,sa=Z.onDragLeave,Du=Z.onDrop,Mu=Wi(Z,Ew);return Ue(Ue(al({onKeyDown:Se(qt(ft,ke)),onFocus:Se(qt(ln,We)),onBlur:Se(qt(nt,Xe)),onClick:Ae(qt(cn,se)),onDragEnter:Ce(qt(mi,V)),onDragOver:Ce(qt(lo,W)),onDragLeave:Ce(qt(sa,K)),onDrop:Ce(qt(Du,le)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},Fe,F),!r&&!w?{tabIndex:0}:{}),Mu)}},[F,ke,We,Xe,se,V,W,K,le,w,T,r]),tt=x.useCallback(function(Z){Z.stopPropagation()},[]),Tt=x.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Fe=oe===void 0?"ref":oe,Ke=Z.onChange,ft=Z.onClick,ln=Wi(Z,Cw),nt=al({accept:D,multiple:a,type:"file",style:{display:"none"},onChange:Ae(qt(Ke,le)),onClick:Ae(qt(ft,tt)),tabIndex:-1},Fe,_);return Ue(Ue({},nt),ln)}},[_,n,a,le,r]);return Ue(Ue({},z),{},{isFocused:C&&!r,getRootProps:Pe,getInputProps:Tt,rootRef:F,inputRef:_,open:Ae(B)})}function Rw(t,e){switch(e.type){case"focus":return Ue(Ue({},t),{},{isFocused:!0});case"blur":return Ue(Ue({},t),{},{isFocused:!1});case"openDialog":return Ue(Ue({},cl),{},{isFileDialogActive:!0});case"closeDialog":return Ue(Ue({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ue(Ue({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Ue(Ue({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Ue({},cl);default:return t}}function Qd(){}function eh(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=eh(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function Fw(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=eh(t))&&(r&&(r+=" "),r+=e);return r}const th=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,nh=Fw,Lw=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return nh(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const d=th(u)||th(f);return o[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...c,f,d]:c},[]);return nh(t,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ui=x.forwardRef(function({as:e,...n},r){const o=e||"span";return E.jsx(o,{...n,ref:r})}),Nw=Lw("inline-flex gap-1.5 text-main-foreground border-2 border-transparent items-center hover:bg-opacity-80 justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50 disabled:text-opacity-60 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary text-primary-foreground",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Gi=x.forwardRef(function({className:e,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return E.jsxs(Ui,{...l,ref:c,type:i,"data-theme":o,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:zt(Nw({size:s,rounded:a,theme:r?"loading":u?"disabled":o}),e),children:[l.children,n]})}),Vw=t=>E.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:t.buttons.map(e=>E.jsx("li",{className:"flex flex-1",children:E.jsx("button",{...e,type:e.type||"button","data-active":t.active===e.name?"true":"false",className:zt("border-main-bg flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0 hover:bg-opacity-80","hover:bg-main-bg hover:text-main cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${e.name}`))}),$w={isImage:t=>t.type.includes("image")},jw=t=>{const[e,n]=x.useState({url:"",type:"",size:""});return x.useEffect(()=>{if($w.isImage(t.file)){const r=URL.createObjectURL(t.file);return n({url:r,type:"img",size:vd(t.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:t.file.type,size:vd(t.file.size)})},[t.file]),e.type==="img"?E.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[E.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[E.jsx("img",{src:e.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${t.file.name}`}),E.jsxs("div",{className:"flex flex-col",children:[E.jsx("span",{children:t.file.name}),E.jsx("span",{children:e.size})]})]}),E.jsx(Gi,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:E.jsx(xo,{})})]}):E.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[E.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[E.jsx(w0,{size:48}),E.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[E.jsx("span",{children:t.file.name}),E.jsx("span",{children:e.size})]})]}),E.jsx(Gi,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:E.jsx(xo,{className:"text-danger"})})]})},Bw=t=>E.jsx("ul",{className:"w-full space-y-jade-200",children:t.files.map(e=>E.jsx(jw,{onDeleteFile:t.onDeleteFile,file:e},e.name))}),zw=t=>t.isDragActive?E.jsx("p",{children:"Solte os arquivos selecionados"}):t.files.length>0?E.jsx(Bw,{onDeleteFile:t.onDeleteFile,files:t.files}):E.jsx(x.Fragment,{children:t.idle}),Hw=E.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[E.jsx(E0,{size:64}),E.jsxs("p",{children:["You can drag your files or"," ",E.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),Ww=({idle:t=Hw,onDeleteFile:e,onDrop:n,...r})=>{var u;const[o,i]=x.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=Jd({onDrop:s});return E.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[E.jsx("input",{...l(r),name:r.name,id:r.name}),E.jsx(zw,{onDeleteFile:e,isDragActive:c,idle:t,files:r.files??o})]})},Uw=["INPUT","SELECT"],rh=t=>{if(!t)return;Array.from(t.elements).forEach(n=>{Uw.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},Gw=t=>{const e=n=>{var r;n.persist(),n.preventDefault(),(r=t.onSubmit)==null||r.call(t,n)};return E.jsx("form",{...t,onSubmit:e})},Kw=({children:t,...e})=>{const n=x.useId(),[r,o]=x.useState(!1),i=e.checked??r,s=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=e==null?void 0:e.onCheck)==null||u.call(e,c)};return E.jsxs("div",{className:"flex items-center",children:[E.jsx("input",{...e,hidden:!0,type:"checkbox",checked:i,onChange:a=>o(a.target.checked)}),E.jsx("button",{type:"button",role:"switch",onClick:s,"aria-checked":i,"data-checked":i,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:E.jsx("span",{"aria-hidden":"true","data-checked":i,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch pointer-events-none inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),E.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:E.jsx("span",{className:"font-medium text-foreground",children:t})})]})},Zw=t=>E.jsx(Ui,{...t,as:"div",className:zt("rounded-lg bg-card-background p-8 border-card-border border shadow",t.className)}),Po=t=>{const[e,n]=x.useState(t.open),r=x.useRef(null),o=x.useMemo(()=>[Ea(10),pf({fallbackAxisSideDirection:"end"}),hf(),mf({padding:5,element:r})],[t.arrow]),{refs:i,floatingStyles:s,context:a}=Da({open:e,transform:!0,whileElementsMounted:Ta,middleware:o,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(n(p),(v=t.onChange)==null||v.call(t,p))}}),l=o0(a),c=ka(a),u=La(a),{getReferenceProps:f,getFloatingProps:d}=Ra([l,c,u]),h=mo();return E.jsxs(x.Fragment,{children:[E.jsx("button",{ref:i.setReference,...f(),children:t.trigger}),e&&E.jsx(Ff,{returnFocus:!0,visuallyHiddenDismiss:!0,restoreFocus:!0,context:a,modal:!1,children:E.jsxs("div",{className:"bg-floating-background isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:i.setFloating,style:s,"aria-labelledby":h,...d(),children:[E.jsx(wf,{ref:r,context:a,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),E.jsx("header",{className:"mb-2",children:E.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-tight text-left",children:t.title})}),t.children]})})]})},qw=({children:t,as:e,title:n,...r})=>{const[o,i]=x.useState(!1),s=x.useRef(null),a=e||"div",{refs:l,floatingStyles:c,context:u}=Da({open:o,onOpenChange:i,whileElementsMounted:Ta,transform:!0,middleware:[Ea(5),pf({fallbackAxisSideDirection:"start"}),hf(),mf({element:s,padding:5})]}),f=Kb(u,{move:!1}),d=l0(u),h=ka(u),p=La(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=Ra([f,d,h,p]);return E.jsxs(x.Fragment,{children:[E.jsx(a,{ref:l.setReference,...m(r),children:n}),E.jsx(kf,{children:o&&E.jsxs(Ui,{ref:l.setFloating,style:c,...y(),className:"bg-tooltip-background text-foreground border border-tooltip-border p-4 rounded-lg",children:[E.jsx(wf,{ref:s,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),t]})})]})},Ki=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Zi=x.createContext({}),qi=x.createContext(null),ul=typeof document<"u",Yi=ul?x.useLayoutEffect:x.useEffect,oh=x.createContext({strict:!1}),fl=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ih="data-"+fl("framerAppearId"),Yw={skipAnimations:!1,useManualTiming:!1};class sh{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Xw(t){let e=new sh,n=new sh,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&o,d=f?e:n;return c&&s.add(l),d.add(l)&&f&&o&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let c=0;c<r;c++){const u=e.order[c];s.has(u)&&(a.schedule(u),t()),u(l)}o=!1,i&&(i=!1,a.process(l))}};return a}const Xi=["read","resolveKeyframes","update","preRender","render","postRender"],Jw=40;function ah(t,e){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=Xi.reduce((f,d)=>(f[d]=Xw(()=>n=!0),f),{}),s=f=>{i[f].process(o)},a=()=>{const f=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(f-o.timestamp,Jw),1),o.timestamp=f,o.isProcessing=!0,Xi.forEach(s),o.isProcessing=!1,n&&e&&(r=!1,t(a))},l=()=>{n=!0,r=!0,o.isProcessing||t(a)};return{schedule:Xi.reduce((f,d)=>{const h=i[d];return f[d]=(p,m=!1,y=!1)=>(n||l(),h.schedule(p,m,y)),f},{}),cancel:f=>Xi.forEach(d=>i[d].cancel(f)),state:o,steps:i}}const{schedule:dl,cancel:uk}=ah(queueMicrotask,!1);function Rr(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const lh=x.createContext({});let ch=!1;function Qw(t,e,n,r,o){const{visualElement:i}=x.useContext(Zi),s=x.useContext(oh),a=x.useContext(qi),l=x.useContext(Ki).reducedMotion,c=x.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=x.useContext(lh);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&tS(c.current,n,o,f),x.useInsertionEffect(()=>{u&&u.update(n,a)});const d=x.useRef(!!(n[ih]&&!window.HandoffComplete));return Yi(()=>{u&&(u.updateFeatures(),dl.render(u.render),d.current&&u.animationState&&u.animationState.animateChanges())}),x.useEffect(()=>{u&&(!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,ch||(ch=!0,queueMicrotask(eS))))}),u}function eS(){window.HandoffComplete=!0}function tS(t,e,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:uh(t.parent)),t.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Rr(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function uh(t){if(t)return t.options.allowProjection!==!1?t.projection:uh(t.parent)}function nS(t,e,n){return x.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Rr(n)&&(n.current=r))},[e])}function Oo(t){return typeof t=="string"||Array.isArray(t)}function Ji(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const hl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pl=["initial",...hl];function Qi(t){return Ji(t.animate)||pl.some(e=>Oo(t[e]))}function fh(t){return!!(Qi(t)||t.variants)}function rS(t,e){if(Qi(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Oo(n)?n:void 0,animate:Oo(r)?r:void 0}}return t.inherit!==!1?e:{}}function oS(t){const{initial:e,animate:n}=rS(t,x.useContext(Zi));return x.useMemo(()=>({initial:e,animate:n}),[dh(e),dh(n)])}function dh(t){return Array.isArray(t)?t.join(" "):t}const hh={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"]},Fr={};for(const t in hh)Fr[t]={isEnabled:e=>hh[t].some(n=>!!e[n])};function iS(t){for(const e in t)Fr[e]={...Fr[e],...t[e]}}const Io=x.createContext({}),sS=Symbol.for("motionComponentSymbol"),lt=t=>t;let Lr=lt,Ht=lt;process.env.NODE_ENV!=="production"&&(Lr=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Ht=(t,e)=>{if(!t)throw new Error(e)});function aS({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:o}){t&&iS(t);function i(a,l){let c;const u={...x.useContext(Ki),...a,layoutId:lS(a)},{isStatic:f}=u,d=oS(a),h=r(a,f);if(!f&&ul){cS(u,t);const p=uS(u);c=p.MeasureLayout,d.visualElement=Qw(o,h,u,e,p.ProjectionNode)}return E.jsxs(Zi.Provider,{value:d,children:[c&&d.visualElement?E.jsx(c,{visualElement:d.visualElement,...u}):null,n(o,a,nS(h,d.visualElement,l),h,f,d.visualElement)]})}const s=x.forwardRef(i);return s[sS]=o,s}function lS({layoutId:t}){const e=x.useContext(Io).id;return e&&t!==void 0?e+"-"+t:t}function cS(t,e){const n=x.useContext(oh).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Lr(!1,r):Ht(!1,r)}}function uS(t){const{drag:e,layout:n}=Fr;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function fS(t){function e(r,o={}){return aS(t(r,o))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const dS=["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 ml(t){return typeof t!="string"||t.includes("-")?!1:!!(dS.indexOf(t)>-1||/[A-Z]/u.test(t))}const es={};function hS(t){Object.assign(es,t)}const ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tr=new Set(ko);function ph(t,{layout:e,layoutId:n}){return tr.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!es[t]||t==="opacity")}const ct=t=>!!(t&&t.getVelocity),pS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mS=ko.length;function gS(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,o){let i="";for(let s=0;s<mS;s++){const a=ko[s];if(t[a]!==void 0){const l=pS[a]||a;i+=`${l}(${t[a]}) `}}return e&&!t.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(t,r?"":i):n&&r&&(i="none"),i}const mh=t=>e=>typeof e=="string"&&e.startsWith(t),gh=mh("--"),yS=mh("var(--"),gl=t=>yS(t)?vS.test(t.split("/*")[0].trim()):!1,vS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,bS=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Dn=(t,e,n)=>n>e?e:n<t?t:n,Nr={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Do={...Nr,transform:t=>Dn(0,1,t)},ts={...Nr,default:1},Mo=t=>Math.round(t*1e5)/1e5,yl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,xS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,wS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ro(t){return typeof t=="string"}function SS(t){return t==null}const Fo=t=>({test:e=>Ro(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Mn=Fo("deg"),Yt=Fo("%"),ce=Fo("px"),TS=Fo("vh"),ES=Fo("vw"),yh={...Yt,parse:t=>Yt.parse(t)/100,transform:t=>Yt.transform(t*100)},vh={...Nr,transform:Math.round},bh={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,size:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,rotate:Mn,rotateX:Mn,rotateY:Mn,rotateZ:Mn,scale:ts,scaleX:ts,scaleY:ts,scaleZ:ts,skew:Mn,skewX:Mn,skewY:Mn,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:Do,originX:yh,originY:yh,originZ:ce,zIndex:vh,backgroundPositionX:ce,backgroundPositionY:ce,fillOpacity:Do,strokeOpacity:Do,numOctaves:vh};function vl(t,e,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const f in e){const d=e[f];if(gh(f)){i[f]=d;continue}const h=bh[f],p=bS(d,h);if(tr.has(f)){if(l=!0,s[f]=p,!u)continue;d!==(h.default||0)&&(u=!1)}else f.startsWith("origin")?(c=!0,a[f]=p):o[f]=p}if(e.transform||(l||r?o.transform=gS(t.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:f="50%",originY:d="50%",originZ:h=0}=a;o.transformOrigin=`${f} ${d} ${h}`}}const bl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xh(t,e,n){for(const r in e)!ct(e[r])&&!ph(r,n)&&(t[r]=e[r])}function CS({transformTemplate:t},e,n){return x.useMemo(()=>{const r=bl();return vl(r,e,{enableHardwareAcceleration:!n},t),Object.assign({},r.vars,r.style)},[e])}function AS(t,e,n){const r=t.style||{},o={};return xh(o,r,t),Object.assign(o,CS(t,e,n)),o}function _S(t,e,n){const r={},o=AS(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=o,r}const PS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ns(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||PS.has(t)}let wh=t=>!ns(t);function OS(t){t&&(wh=e=>e.startsWith("on")?!ns(e):t(e))}try{OS(require("@emotion/is-prop-valid").default)}catch{}function IS(t,e,n){const r={};for(const o in t)o==="values"&&typeof t.values=="object"||(wh(o)||n===!0&&ns(o)||!e&&!ns(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function Sh(t,e,n){return typeof t=="string"?t:ce.transform(e+n*t)}function kS(t,e,n){const r=Sh(e,t.x,t.width),o=Sh(n,t.y,t.height);return`${r} ${o}`}const DS={offset:"stroke-dashoffset",array:"stroke-dasharray"},MS={offset:"strokeDashoffset",array:"strokeDasharray"};function RS(t,e,n=1,r=0,o=!0){t.pathLength=1;const i=o?DS:MS;t[i.offset]=ce.transform(-r);const s=ce.transform(e),a=ce.transform(n);t[i.array]=`${s} ${a}`}function xl(t,{attrX:e,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,f,d){if(vl(t,c,u,d),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:m}=t;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(o!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=kS(m,o!==void 0?o:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&RS(h,s,a,l,!1)}const Th=()=>({...bl(),attrs:{}}),wl=t=>typeof t=="string"&&t.toLowerCase()==="svg";function FS(t,e,n,r){const o=x.useMemo(()=>{const i=Th();return xl(i,e,{enableHardwareAcceleration:!1},wl(r),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};xh(i,t.style,t),o.style={...i,...o.style}}return o}function LS(t=!1){return(n,r,o,{latestValues:i},s)=>{const l=(ml(n)?FS:_S)(r,i,s,n),c=IS(r,typeof n=="string",t),u=n!==x.Fragment?{...c,...l,ref:o}:{},{children:f}=r,d=x.useMemo(()=>ct(f)?f.get():f,[f]);return x.createElement(n,{...u,children:d})}}function Eh(t,{style:e,vars:n},r,o){Object.assign(t.style,e,o&&o.getProjectionStyles(r));for(const i in n)t.style.setProperty(i,n[i])}const Ch=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ah(t,e,n,r){Eh(t,e,void 0,r);for(const o in e.attrs)t.setAttribute(Ch.has(o)?o:fl(o),e.attrs[o])}function Sl(t,e,n){var r;const{style:o}=t,i={};for(const s in o)(ct(o[s])||e.style&&ct(e.style[s])||ph(s,t)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return i}function _h(t,e,n){const r=Sl(t,e,n);for(const o in t)if(ct(t[o])||ct(e[o])){const i=ko.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=t[o]}return r}function Ph(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Tl(t,e,n,r){if(typeof e=="function"){const[o,i]=Ph(r);e=e(n!==void 0?n:t.custom,o,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,i]=Ph(r);e=e(n!==void 0?n:t.custom,o,i)}return e}function nr(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const El=t=>Array.isArray(t),NS=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),VS=t=>El(t)?t[t.length-1]||0:t;function rs(t){const e=ct(t)?t.get():t;return NS(e)?e.toValue():e}function $S({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,o,i){const s={latestValues:jS(r,o,i,t),renderState:e()};return n&&(s.mount=a=>n(r,a,s)),s}const Oh=t=>(e,n)=>{const r=x.useContext(Zi),o=x.useContext(qi),i=()=>$S(t,e,r,o);return n?i():nr(i)};function jS(t,e,n,r){const o={},i=r(t,{});for(const d in i)o[d]=rs(i[d]);let{initial:s,animate:a}=t;const l=Qi(t),c=fh(t);e&&c&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const f=u?a:s;return f&&typeof f!="boolean"&&!Ji(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=Tl(t,h);if(!p)return;const{transitionEnd:m,transition:y,...v}=p;for(const b in v){let g=v[b];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(o[b]=g)}for(const b in m)o[b]=m[b]}),o}const{schedule:_e,cancel:Xt,state:ut,steps:Cl}=ah(typeof requestAnimationFrame<"u"?requestAnimationFrame:lt,!0),BS={useVisualState:Oh({scrapeMotionValuesFromProps:_h,createRenderState:Th,onMount:(t,e,{renderState:n,latestValues:r})=>{_e.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),_e.render(()=>{xl(n,r,{enableHardwareAcceleration:!1},wl(e.tagName),t.transformTemplate),Ah(e,n)})}})},zS={useVisualState:Oh({scrapeMotionValuesFromProps:Sl,createRenderState:bl})};function HS(t,{forwardMotionProps:e=!1},n,r){return{...ml(t)?BS:zS,preloadedFeatures:n,useRender:LS(e),createVisualElement:r,Component:t}}function pn(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const Ih=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function os(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const WS=t=>e=>Ih(e)&&t(e,os(e));function mn(t,e,n,r){return pn(t,e,WS(n),r)}const US=(t,e)=>n=>e(t(n)),gn=(...t)=>t.reduce(US);function kh(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Dh=kh("dragHorizontal"),Mh=kh("dragVertical");function Rh(t){let e=!1;if(t==="y")e=Mh();else if(t==="x")e=Dh();else{const n=Dh(),r=Mh();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function Fh(){const t=Rh(!0);return t?(t(),!1):!0}class Rn{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Lh(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||Fh())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[r];l&&_e.postRender(()=>l(i,s))};return mn(t.current,n,o,{passive:!t.getProps()[r]})}class GS extends Rn{mount(){this.unmount=gn(Lh(this.node,!0),Lh(this.node,!1))}unmount(){}}class KS extends Rn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gn(pn(this.node.current,"focus",()=>this.onFocus()),pn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Nh=(t,e)=>e?t===e?!0:Nh(t,e.parentElement):!1;function Al(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,os(n))}class ZS extends Rn{constructor(){super(...arguments),this.removeStartListeners=lt,this.removeEndListeners=lt,this.removeAccessibleListeners=lt,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=mn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),d=!f&&!Nh(this.node.current,a.target)?u:c;d&&_e.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=mn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=gn(i,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Al("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&_e.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=pn(this.node.current,"keyup",s),Al("down",(a,l)=>{this.startPress(a,l)})},n=pn(this.node.current,"keydown",e),r=()=>{this.isPressing&&Al("cancel",(i,s)=>this.cancelPress(i,s))},o=pn(this.node.current,"blur",r);this.removeAccessibleListeners=gn(n,o)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&_e.postRender(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Fh()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&_e.postRender(()=>r(e,n))}mount(){const e=this.node.getProps(),n=mn(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=pn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=gn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _l=new WeakMap,Pl=new WeakMap,qS=t=>{const e=_l.get(t.target);e&&e(t)},YS=t=>{t.forEach(qS)};function XS({root:t,...e}){const n=t||document;Pl.has(n)||Pl.set(n,{});const r=Pl.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(YS,{root:t,...e})),r[o]}function JS(t,e,n){const r=XS(e);return _l.set(t,n),r.observe(t),()=>{_l.delete(t),r.unobserve(t)}}const QS={some:0,all:1};class eT extends Rn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:QS[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return JS(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(tT(e,n))&&this.startObserver()}unmount(){}}function tT({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const nT={inView:{Feature:eT},tap:{Feature:ZS},focus:{Feature:KS},hover:{Feature:GS}};function Vh(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function is(t,e,n){const r=t.getProps();return Tl(r,e,n!==void 0?n:r.custom,t)}const yn=t=>t*1e3,vn=t=>t/1e3,rT={type:"spring",stiffness:500,damping:25,restSpeed:10},oT=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),iT={type:"keyframes",duration:.8},sT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},aT=(t,{keyframes:e})=>e.length>2?iT:tr.has(t)?t.startsWith("scale")?oT(e[1]):rT:sT;function lT({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Ol(t,e){return t[e]||t.default||t}const cT=t=>t!==null;function ss(t,{repeat:e,repeatType:n="loop"},r){const o=t.filter(cT),i=e&&n!=="loop"&&e%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let as;function uT(){as=void 0}const Fn={now:()=>(as===void 0&&Fn.set(ut.isProcessing||Yw.useManualTiming?ut.timestamp:performance.now()),as),set:t=>{as=t,queueMicrotask(uT)}},$h=t=>/^0[^.\s]+$/u.test(t);function fT(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||$h(t):!0}const jh=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),dT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hT(t){const e=dT.exec(t);if(!e)return[,];const[,n,r,o]=e;return[`--${n??r}`,o]}const pT=4;function Bh(t,e,n=1){Ht(n<=pT,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,o]=hT(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const s=i.trim();return jh(s)?parseFloat(s):s}return gl(o)?Bh(o,e,n+1):o}const mT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),zh=t=>t===Nr||t===ce,Hh=(t,e)=>parseFloat(t.split(", ")[e]),Wh=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Hh(o[1],e);{const i=r.match(/^matrix\((.+)\)$/u);return i?Hh(i[1],t):0}},gT=new Set(["x","y","z"]),yT=ko.filter(t=>!gT.has(t));function vT(t){const e=[];return yT.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Vr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Wh(4,13),y:Wh(5,14)};Vr.translateX=Vr.x,Vr.translateY=Vr.y;const Uh=t=>e=>e.test(t),Gh=[Nr,ce,Yt,Mn,ES,TS,{test:t=>t==="auto",parse:t=>t}],Kh=t=>Gh.find(Uh(t)),rr=new Set;let Il=!1,kl=!1;function Zh(){if(kl){const t=Array.from(rr).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const o=vT(r);o.length&&(n.set(r,o),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}kl=!1,Il=!1,rr.forEach(t=>t.complete()),rr.clear()}function qh(){rr.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(kl=!0)})}function bT(){qh(),Zh()}class Dl{constructor(e,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(rr.add(this),Il||(Il=!0,_e.read(qh),_e.resolveKeyframes(Zh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:o}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),o&&s===void 0&&o.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),rr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,rr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ml=(t,e)=>n=>!!(Ro(n)&&wS.test(n)&&n.startsWith(t)||e&&!SS(n)&&Object.prototype.hasOwnProperty.call(n,e)),Yh=(t,e,n)=>r=>{if(!Ro(r))return r;const[o,i,s,a]=r.match(yl);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},xT=t=>Dn(0,255,t),Rl={...Nr,transform:t=>Math.round(xT(t))},or={test:Ml("rgb","red"),parse:Yh("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Rl.transform(t)+", "+Rl.transform(e)+", "+Rl.transform(n)+", "+Mo(Do.transform(r))+")"};function wT(t){let e="",n="",r="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Fl={test:Ml("#"),parse:wT,transform:or.transform},$r={test:Ml("hsl","hue"),parse:Yh("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Yt.transform(Mo(e))+", "+Yt.transform(Mo(n))+", "+Mo(Do.transform(r))+")"},pt={test:t=>or.test(t)||Fl.test(t)||$r.test(t),parse:t=>or.test(t)?or.parse(t):$r.test(t)?$r.parse(t):Fl.parse(t),transform:t=>Ro(t)?t:t.hasOwnProperty("red")?or.transform(t):$r.transform(t)};function ST(t){var e,n;return isNaN(t)&&Ro(t)&&(((e=t.match(yl))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(xS))===null||n===void 0?void 0:n.length)||0)>0}const Xh="number",Jh="color",TT="var",ET="var(",Qh="${}",CT=/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 Lo(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=e.replace(CT,l=>(pt.test(l)?(r.color.push(i),o.push(Jh),n.push(pt.parse(l))):l.startsWith(ET)?(r.var.push(i),o.push(TT),n.push(l)):(r.number.push(i),o.push(Xh),n.push(parseFloat(l))),++i,Qh)).split(Qh);return{values:n,split:a,indexes:r,types:o}}function ep(t){return Lo(t).values}function tp(t){const{split:e,types:n}=Lo(t),r=e.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],o[s]!==void 0){const a=n[s];a===Xh?i+=Mo(o[s]):a===Jh?i+=pt.transform(o[s]):i+=o[s]}return i}}const AT=t=>typeof t=="number"?0:t;function _T(t){const e=ep(t);return tp(t)(e.map(AT))}const Ln={test:ST,parse:ep,createTransformer:tp,getAnimatableNone:_T},PT=new Set(["brightness","contrast","saturate","opacity"]);function OT(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(yl)||[];if(!r)return t;const o=n.replace(r,"");let i=PT.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const IT=/\b([a-z-]*)\(.*?\)/gu,Ll={...Ln,getAnimatableNone:t=>{const e=t.match(IT);return e?e.map(OT).join(" "):t}},kT={...bh,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:Ll,WebkitFilter:Ll},Nl=t=>kT[t];function np(t,e){let n=Nl(t);return n!==Ll&&(n=Ln),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const DT=new Set(["auto","none","0"]);function MT(t,e,n){let r=0,o;for(;r<t.length&&!o;){const i=t[r];typeof i=="string"&&!DT.has(i)&&Lo(i).values.length&&(o=t[r]),r++}if(o&&n)for(const i of e)t[i]=np(n,o)}class rp extends Dl{constructor(e,n,r,o){super(e,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),gl(c))){const u=Bh(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!mT.has(r)||e.length!==2)return;const[o,i]=e,s=Kh(o),a=Kh(i);if(s!==a)if(zh(s)&&zh(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let o=0;o<e.length;o++)fT(e[o])&&r.push(o);r.length&&MT(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&e.getValue(r,o).jump(o,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=Vr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function op(t){let e;return()=>(e===void 0&&(e=t()),e)}const ip=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ln.test(t)||t==="0")&&!t.startsWith("url("));function RT(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function FT(t,e,n,r){const o=t[0];if(o===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],s=ip(o,e),a=ip(i,e);return Lr(s===a,`You are trying to animate ${e} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:RT(t)||n==="spring"&&r}class sp{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&bT(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!FT(e,r,o,i))if(s)this.options.duration=0;else{l==null||l(ss(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function ap(t,e){return e?t*(1e3/e):0}const LT=5;function lp(t,e,n){const r=Math.max(e-LT,0);return ap(n-t(r),e-r)}const Vl=.001,NT=.01,cp=10,VT=.05,$T=1;function jT({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i;Lr(t<=yn(cp),"Spring duration must be 10 seconds or less");let s=1-e;s=Dn(VT,$T,s),t=Dn(NT,cp,vn(t)),s<1?(o=c=>{const u=c*s,f=u*t,d=u-n,h=$l(c,s),p=Math.exp(-f);return Vl-d/h*p},i=c=>{const f=c*s*t,d=f*n+n,h=Math.pow(s,2)*Math.pow(c,2)*t,p=Math.exp(-f),m=$l(Math.pow(c,2),s);return(-o(c)+Vl>0?-1:1)*((d-h)*p)/m}):(o=c=>{const u=Math.exp(-c*t),f=(c-n)*t+1;return-Vl+u*f},i=c=>{const u=Math.exp(-c*t),f=(n-c)*(t*t);return u*f});const a=5/t,l=zT(o,i,a);if(t=yn(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:t}}}const BT=12;function zT(t,e,n){let r=n;for(let o=1;o<BT;o++)r=r-t(r)/e(r);return r}function $l(t,e){return t*Math.sqrt(1-e*e)}const HT=["duration","bounce"],WT=["stiffness","damping","mass"];function up(t,e){return e.some(n=>t[n]!==void 0)}function UT(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!up(t,WT)&&up(t,HT)){const n=jT(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function fp({keyframes:t,restDelta:e,restSpeed:n,...r}){const o=t[0],i=t[t.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=UT({...r,velocity:-vn(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=i-o,y=vn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let b;if(p<1){const g=$l(y,p);b=S=>{const w=Math.exp(-p*y*S);return i-w*((h+p*y*m)/g*Math.sin(g*S)+m*Math.cos(g*S))}}else if(p===1)b=g=>i-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);b=S=>{const w=Math.exp(-p*y*S),T=Math.min(g*S,300);return i-w*((h+p*y*m)*Math.sinh(T)+g*m*Math.cosh(T))/g}}return{calculatedDuration:d&&u||null,next:g=>{const S=b(g);if(d)s.done=g>=u;else{let w=h;g!==0&&(p<1?w=lp(b,g,S):w=0);const T=Math.abs(w)<=n,P=Math.abs(i-S)<=e;s.done=T&&P}return s.value=s.done?i:S,s}}}function dp({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=O=>a!==void 0&&O<a||l!==void 0&&O>l,p=O=>a===void 0?l:l===void 0||Math.abs(a-O)<Math.abs(l-O)?a:l;let m=n*e;const y=f+m,v=s===void 0?y:s(y);v!==y&&(m=v-f);const b=O=>-m*Math.exp(-O/r),g=O=>v+b(O),S=O=>{const k=b(O),D=g(O);d.done=Math.abs(k)<=c,d.value=d.done?v:D};let w,T;const P=O=>{h(d.value)&&(w=O,T=fp({keyframes:[d.value,p(d.value)],velocity:lp(g,O,d.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:O=>{let k=!1;return!T&&w===void 0&&(k=!0,S(O),P(O)),w!==void 0&&O>=w?T.next(O-w):(!k&&S(O),d)}}}const hp=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,GT=1e-7,KT=12;function ZT(t,e,n,r,o){let i,s,a=0;do s=e+(n-e)/2,i=hp(s,r,o)-t,i>0?n=s:e=s;while(Math.abs(i)>GT&&++a<KT);return s}function No(t,e,n,r){if(t===e&&n===r)return lt;const o=i=>ZT(i,0,1,t,n);return i=>i===0||i===1?i:hp(o(i),e,r)}const qT=No(.42,0,1,1),YT=No(0,0,.58,1),pp=No(.42,0,.58,1),XT=t=>Array.isArray(t)&&typeof t[0]!="number",mp=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,gp=t=>e=>1-t(1-e),jl=t=>1-Math.sin(Math.acos(t)),yp=gp(jl),JT=mp(jl),vp=No(.33,1.53,.69,.99),Bl=gp(vp),QT=mp(Bl),bp={linear:lt,easeIn:qT,easeInOut:pp,easeOut:YT,circIn:jl,circInOut:JT,circOut:yp,backIn:Bl,backInOut:QT,backOut:vp,anticipate:t=>(t*=2)<1?.5*Bl(t):.5*(2-Math.pow(2,-10*(t-1)))},xp=t=>{if(Array.isArray(t)){Ht(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,o]=t;return No(e,n,r,o)}else if(typeof t=="string")return Ht(bp[t]!==void 0,`Invalid easing type '${t}'`),bp[t];return t},Vo=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Be=(t,e,n)=>t+(e-t)*n;function zl(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function eE({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,i=0,s=0;if(!e)o=i=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=zl(l,a,t+1/3),i=zl(l,a,t),s=zl(l,a,t-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function ls(t,e){return n=>n>0?e:t}const Hl=(t,e,n)=>{const r=t*t,o=n*(e*e-r)+r;return o<0?0:Math.sqrt(o)},tE=[Fl,or,$r],nE=t=>tE.find(e=>e.test(t));function wp(t){const e=nE(t);if(Lr(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===$r&&(n=eE(n)),n}const Sp=(t,e)=>{const n=wp(t),r=wp(e);if(!n||!r)return ls(t,e);const o={...n};return i=>(o.red=Hl(n.red,r.red,i),o.green=Hl(n.green,r.green,i),o.blue=Hl(n.blue,r.blue,i),o.alpha=Be(n.alpha,r.alpha,i),or.transform(o))},Wl=new Set(["none","hidden"]);function rE(t,e){return Wl.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function oE(t,e){return n=>Be(t,e,n)}function Ul(t){return typeof t=="number"?oE:typeof t=="string"?gl(t)?ls:pt.test(t)?Sp:aE:Array.isArray(t)?Tp:typeof t=="object"?pt.test(t)?Sp:iE:ls}function Tp(t,e){const n=[...t],r=n.length,o=t.map((i,s)=>Ul(i)(i,e[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function iE(t,e){const n={...t,...e},r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=Ul(t[o])(t[o],e[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function sE(t,e){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],a=t.indexes[s][o[s]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const aE=(t,e)=>{const n=Ln.createTransformer(e),r=Lo(t),o=Lo(e);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Wl.has(t)&&!o.values.length||Wl.has(e)&&!r.values.length?rE(t,e):gn(Tp(sE(r,o),o.values),n):(Lr(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ls(t,e))};function Ep(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Be(t,e,n):Ul(t)(t,e)}function lE(t,e,n){const r=[],o=n||Ep,i=t.length-1;for(let s=0;s<i;s++){let a=o(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||lt:e;a=gn(l,a)}r.push(a)}return r}function Cp(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;if(Ht(i===e.length,"Both input and output ranges must be the same length"),i===1)return()=>e[0];if(i===2&&t[0]===t[1])return()=>e[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=lE(e,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const f=Vo(t[u],t[u+1],c);return s[u](f)};return n?c=>l(Dn(t[0],t[i-1],c)):l}function cE(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const o=Vo(0,e,r);t.push(Be(n,1,o))}}function uE(t){const e=[0];return cE(e,t.length-1),e}function fE(t,e){return t.map(n=>n*e)}function dE(t,e){return t.map(()=>e||pp).splice(0,t.length-1)}function cs({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const o=XT(r)?r.map(xp):xp(r),i={done:!1,value:e[0]},s=fE(n&&n.length===e.length?n:uE(e),t),a=Cp(s,e,{ease:Array.isArray(o)?o:dE(e,o)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const Ap=2e4;function hE(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Ap;)e+=n,r=t.next(e);return e>=Ap?1/0:e}const pE=t=>{const e=({timestamp:n})=>t(n);return{start:()=>_e.update(e,!0),stop:()=>Xt(e),now:()=>ut.isProcessing?ut.timestamp:Fn.now()}},mE={decay:dp,inertia:dp,tween:cs,keyframes:cs,spring:fp},gE=t=>t/100;class Gl extends sp{constructor({KeyframeResolver:e=Dl,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new e(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=mE[n]||cs;let l,c;a!==cs&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ht(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=gn(gE,Ep(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});i==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=hE(u));const{calculatedDuration:f}=u,d=f+o,h=d*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,S=i;if(h){const O=Math.min(this.currentTime,u)/f;let k=Math.floor(O),D=O%1;!D&&O>=1&&(D=1),D===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(p==="reverse"?(D=1-D,m&&(D-=m/f)):p==="mirror"&&(S=s)),g=Dn(0,1,D)*f}const w=b?{done:!1,value:l[0]}:S.next(g);a&&(w.value=a(w.value));let{done:T}=w;!b&&c!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return P&&o!==void 0&&(w.value=ss(l,this.options,o)),y&&y(w.value),P&&this.finish(),w}get duration(){const{resolved:e}=this;return e?vn(e.calculatedDuration):0}get time(){return vn(this.currentTime)}set time(e){e=yn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=vn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=pE,onPlay:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const _p=t=>Array.isArray(t)&&typeof t[0]=="number";function Pp(t){return!!(!t||typeof t=="string"&&t in Kl||_p(t)||Array.isArray(t)&&t.every(Pp))}const $o=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Kl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$o([0,.65,.55,1]),circOut:$o([.55,0,1,.45]),backIn:$o([.31,.01,.66,-.59]),backOut:$o([.33,1.53,.69,.99])};function yE(t){return Op(t)||Kl.easeOut}function Op(t){if(t)return _p(t)?$o(t):Array.isArray(t)?t.map(yE):Kl[t]}function vE(t,e,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Op(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const bE=op(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xE=new Set(["opacity","clipPath","filter","transform"]),us=10,wE=2e4;function SE(t){return t.type==="spring"||t.name==="backgroundColor"||!Pp(t.ease)}function TE(t,e){const n=new Gl({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const o=[];let i=0;for(;!r.done&&i<wE;)r=n.sample(i),o.push(r.value),i+=us;return{times:void 0,keyframes:o,duration:i-us,ease:"linear"}}class Ip extends sp{constructor(e){super(e);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new rp(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(e,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(SE(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,...p}=this.options,m=TE(e,p);e=m.keyframes,e.length===1&&(e[1]=e[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=vE(l.owner.current,c,e,{...this.options,duration:o,times:i,ease:s});return u.startTime=Fn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(ss(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return vn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return vn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return lt;const{animation:r}=n;r.timeline=e,r.onfinish=null}return lt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:c,onComplete:u,...f}=this.options,d=new Gl({...f,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),h=yn(this.time);l.setWithVelocity(d.sample(h-us).value,d.sample(h).value,us)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=e;return bE()&&r&&xE.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function EE(t,e){let n;const r=()=>{const{currentTime:o}=e,s=(o===null?0:o.value)/100;n!==s&&t(s),n=s};return _e.update(r,!0),()=>Xt(r)}const CE=op(()=>window.ScrollTimeline!==void 0);class AE{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e){const n=this.animations.map(r=>{if(CE()&&r.attachTimeline)r.attachTimeline(e);else return r.pause(),EE(o=>{r.time=r.duration*o},e)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Zl=(t,e,n,r={},o,i)=>s=>{const a=Ol(r,t)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-yn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:o};lT(a)||(u={...u,...aT(t,u)}),u.duration&&(u.duration=yn(u.duration)),u.repeatDelay&&(u.repeatDelay=yn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(f=!0)),f&&!i&&e.get()!==void 0){const d=ss(u.keyframes,a);if(d!==void 0)return _e.update(()=>{u.onUpdate(d),u.onComplete()}),new AE([])}return!i&&Ip.supports(u)?new Ip(u):new Gl(u)};function fs(t){return!!(ct(t)&&t.add)}function ql(t,e){t.indexOf(e)===-1&&t.push(e)}function Yl(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function _E([...t],e,n){const r=e<0?t.length+e:e;if(r>=0&&r<t.length){const o=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(o,0,i)}return t}class Xl{constructor(){this.subscriptions=[]}add(e){return ql(this.subscriptions,e),()=>Yl(this.subscriptions,e)}notify(e,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const kp=new Set;function Jl(t,e,n){t||kp.has(e)||(console.warn(e),kp.add(e))}const Dp=30,PE=t=>!isNaN(parseFloat(t)),jo={current:void 0};class OE{constructor(e,n={}){this.version="11.2.13",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Fn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Fn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=PE(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Jl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Xl);const r=this.events[e].add(n);return e==="change"?()=>{r(),_e.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return jo.current&&jo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Fn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Dp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dp);return ap(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function jr(t,e){return new OE(t,e)}function IE(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,jr(n))}function kE(t,e){const n=is(t,e);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=VS(i[s]);IE(t,s,a)}}function Mp(t){return t.getProps()[ih]}function DE({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Rp(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;const c=t.getValue("willChange");r&&(s=r);const u=[],f=o&&t.animationState&&t.animationState.getState()[o];for(const d in l){const h=t.getValue(d,(i=t.latestValues[d])!==null&&i!==void 0?i:null),p=l[d];if(p===void 0||f&&DE(f,d))continue;const m={delay:n,elapsed:0,...Ol(s||{},d)};let y=!1;if(window.HandoffAppearAnimations){const b=Mp(t);if(b){const g=window.HandoffAppearAnimations(b,d,h,_e);g!==null&&(m.elapsed=g,y=!0)}}h.start(Zl(d,h,p,t.shouldReduceMotion&&tr.has(d)?{type:!1}:m,t,y));const v=h.animation;v&&(fs(c)&&(c.add(d),v.then(()=>c.remove(d))),u.push(v))}return a&&Promise.all(u).then(()=>{_e.update(()=>{a&&kE(t,a)})}),u}function Ql(t,e,n={}){var r;const o=is(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Rp(t,o,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return ME(t,e,u+c,f,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function ME(t,e,n=0,r=0,o=1,i){const s=[],a=(t.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort(RE).forEach((c,u)=>{c.notify("AnimationStart",e),s.push(Ql(c,e,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(s)}function RE(t,e){return t.sortNodePosition(e)}function FE(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const o=e.map(i=>Ql(t,i,n));r=Promise.all(o)}else if(typeof e=="string")r=Ql(t,e,n);else{const o=typeof e=="function"?is(t,e,n.custom):e;r=Promise.all(Rp(t,o,n))}return r.then(()=>{_e.postRender(()=>{t.notify("AnimationComplete",e)})})}const LE=[...hl].reverse(),NE=hl.length;function VE(t){return e=>Promise.all(e.map(({animation:n,options:r})=>FE(t,n,r)))}function $E(t){let e=VE(t),n=Fp(),r=!0;const o=l=>(c,u)=>{var f;const d=is(t,u,l==="exit"?(f=t.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;c={...c,...m,...p}}return c};function i(l){e=l(t)}function s(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},f=[],d=new Set;let h={},p=1/0;for(let y=0;y<NE;y++){const v=LE[y],b=n[v],g=c[v]!==void 0?c[v]:u[v],S=Oo(g),w=v===l?b.isActive:null;w===!1&&(p=y);let T=g===u[v]&&g!==c[v]&&S;if(T&&r&&t.manuallyAnimateOnMount&&(T=!1),b.protectedKeys={...h},!b.isActive&&w===null||!g&&!b.prevProp||Ji(g)||typeof g=="boolean")continue;let O=jE(b.prevProp,g)||v===l&&b.isActive&&!T&&S||y>p&&S,k=!1;const D=Array.isArray(g)?g:[g];let L=D.reduce(o(v),{});w===!1&&(L={});const{prevResolvedValues:A={}}=b,j={...A,...L},F=_=>{O=!0,d.has(_)&&(k=!0,d.delete(_)),b.needsAnimating[_]=!0;const M=t.getValue(_);M&&(M.liveStyle=!1)};for(const _ in j){const M=L[_],N=A[_];if(h.hasOwnProperty(_))continue;let z=!1;El(M)&&El(N)?z=!Vh(M,N):z=M!==N,z?M!=null?F(_):d.add(_):M!==void 0&&d.has(_)?F(_):b.protectedKeys[_]=!0}b.prevProp=g,b.prevResolvedValues=L,b.isActive&&(h={...h,...L}),r&&t.blockInitialAnimation&&(O=!1),O&&(!T||k)&&f.push(...D.map(_=>({animation:_,options:{type:v}})))}if(d.size){const y={};d.forEach(v=>{const b=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=b??null}),f.push({animation:y})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=s(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Fp(),r=!0}}}function jE(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Vh(e,t):!1}function ir(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fp(){return{animate:ir(!0),whileInView:ir(),whileHover:ir(),whileTap:ir(),whileDrag:ir(),whileFocus:ir(),exit:ir()}}class BE extends Rn{constructor(e){super(e),e.animationState||(e.animationState=$E(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ji(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let zE=0;class HE extends Rn{constructor(){super(...arguments),this.id=zE++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const WE={animation:{Feature:BE},exit:{Feature:HE}},Lp=(t,e)=>Math.abs(t-e);function UE(t,e){const n=Lp(t.x,e.x),r=Lp(t.y,e.y);return Math.sqrt(n**2+r**2)}class Np{constructor(e,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=tc(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=UE(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:m}=ut;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;d||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ec(d,this.transformPagePoint),_e.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=tc(f.type==="pointercancel"?this.lastMoveEventInfo:ec(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,y),p&&p(f,y)},!Ih(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=os(e),a=ec(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=ut;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,tc(a,this.history)),this.removeListeners=gn(mn(this.contextWindow,"pointermove",this.handlePointerMove),mn(this.contextWindow,"pointerup",this.handlePointerUp),mn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Xt(this.updatePoint)}}function ec(t,e){return e?{point:e(t.point)}:t}function Vp(t,e){return{x:t.x-e.x,y:t.y-e.y}}function tc({point:t},e){return{point:t,delta:Vp(t,$p(e)),offset:Vp(t,GE(e)),velocity:KE(e,.1)}}function GE(t){return t[0]}function $p(t){return t[t.length-1]}function KE(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const o=$p(t);for(;n>=0&&(r=t[n],!(o.timestamp-r.timestamp>yn(e)));)n--;if(!r)return{x:0,y:0};const i=vn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Mt(t){return t.max-t.min}function nc(t,e=0,n=.01){return Math.abs(t-e)<=n}function jp(t,e,n,r=.5){t.origin=r,t.originPoint=Be(e.min,e.max,t.origin),t.scale=Mt(n)/Mt(e),(nc(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Be(n.min,n.max,t.origin)-t.originPoint,(nc(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Bo(t,e,n,r){jp(t.x,e.x,n.x,r?r.originX:void 0),jp(t.y,e.y,n.y,r?r.originY:void 0)}function Bp(t,e,n){t.min=n.min+e.min,t.max=t.min+Mt(e)}function ZE(t,e,n){Bp(t.x,e.x,n.x),Bp(t.y,e.y,n.y)}function zp(t,e,n){t.min=e.min-n.min,t.max=t.min+Mt(e)}function zo(t,e,n){zp(t.x,e.x,n.x),zp(t.y,e.y,n.y)}function qE(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Be(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Be(n,t,r.max):Math.min(t,n)),t}function Hp(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function YE(t,{top:e,left:n,bottom:r,right:o}){return{x:Hp(t.x,n,o),y:Hp(t.y,e,r)}}function Wp(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function XE(t,e){return{x:Wp(t.x,e.x),y:Wp(t.y,e.y)}}function JE(t,e){let n=.5;const r=Mt(t),o=Mt(e);return o>r?n=Vo(e.min,e.max-r,t.min):r>o&&(n=Vo(t.min,t.max-o,e.min)),Dn(0,1,n)}function QE(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const rc=.35;function e1(t=rc){return t===!1?t=0:t===!0&&(t=rc),{x:Up(t,"left","right"),y:Up(t,"top","bottom")}}function Up(t,e,n){return{min:Gp(t,e),max:Gp(t,n)}}function Gp(t,e){return typeof t=="number"?t:t[e]||0}const Kp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Br=()=>({x:Kp(),y:Kp()}),Zp=()=>({min:0,max:0}),qe=()=>({x:Zp(),y:Zp()});function Nt(t){return[t("x"),t("y")]}function qp({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function t1({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function n1(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function oc(t){return t===void 0||t===1}function ic({scale:t,scaleX:e,scaleY:n}){return!oc(t)||!oc(e)||!oc(n)}function sr(t){return ic(t)||Yp(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Yp(t){return Xp(t.x)||Xp(t.y)}function Xp(t){return t&&t!=="0%"}function ds(t,e,n){const r=t-n,o=e*r;return n+o}function Jp(t,e,n,r,o){return o!==void 0&&(t=ds(t,o,r)),ds(t,n,r)+e}function sc(t,e=0,n=1,r,o){t.min=Jp(t.min,e,n,r,o),t.max=Jp(t.max,e,n,r,o)}function Qp(t,{x:e,y:n}){sc(t.x,e.translate,e.scale,e.originPoint),sc(t.y,n.translate,n.scale,n.originPoint)}function r1(t,e,n,r=!1){const o=n.length;if(!o)return;e.x=e.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const l=i.instance;l&&l.style&&l.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&zr(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Qp(t,s)),r&&sr(i.latestValues)&&zr(t,i.latestValues))}e.x=em(e.x),e.y=em(e.y)}function em(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Nn(t,e){t.min=t.min+e,t.max=t.max+e}function tm(t,e,[n,r,o]){const i=e[o]!==void 0?e[o]:.5,s=Be(t.min,t.max,i);sc(t,e[n],e[r],s,e.scale)}const o1=["x","scaleX","originX"],i1=["y","scaleY","originY"];function zr(t,e){tm(t.x,e,o1),tm(t.y,e,i1)}function nm(t,e){return qp(n1(t.getBoundingClientRect(),e))}function s1(t,e,n){const r=nm(t,n),{scroll:o}=e;return o&&(Nn(r.x,o.offset.x),Nn(r.y,o.offset.y)),r}const rm=({current:t})=>t?t.ownerDocument.defaultView:null,a1=new WeakMap;class l1{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=qe(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(os(u,"page").point)},i=(u,f)=>{const{drag:d,dragPropagation:h,onDragStart:p}=this.getProps();if(d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Rh(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Nt(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Yt.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const g=b.layout.layoutBox[y];g&&(v=Mt(g)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&_e.postRender(()=>p(u,f));const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},s=(u,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:y}=f;if(h&&this.currentDirection===null){this.currentDirection=c1(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Nt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Np(e,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:rm(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&_e.postRender(()=>i(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:o}=this.getProps();if(!r||!hs(e,o,this.currentDirection))return;const i=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=qE(s,this.constraints[e],this.elastic[e])),i.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;n&&Rr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=YE(o.layoutBox,n):this.constraints=!1,this.elastic=e1(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Nt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=QE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Rr(e))return!1;const r=e.current;Ht(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=s1(r,o.root,this.visualElement.getTransformPagePoint());let s=XE(o.layout.layoutBox,i);if(n){const a=n(t1(s));this.hasMutatedConstraints=!!a,a&&(s=qp(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Nt(u=>{if(!hs(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(Zl(e,r,0,n,this.visualElement))}stopAnimation(){Nt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Nt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Nt(n=>{const{drag:r}=this.getProps();if(!hs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(e[n]-Be(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Rr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Nt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=JE({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Nt(s=>{if(!hs(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Be(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;a1.set(this.visualElement,this);const e=this.visualElement.current,n=mn(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Rr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_e.read(r);const s=pn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Nt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=rc,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function hs(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function c1(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class u1 extends Rn{constructor(e){super(e),this.removeGroupControls=lt,this.removeListeners=lt,this.controls=new l1(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const om=t=>(e,n)=>{t&&_e.postRender(()=>t(e,n))};class f1 extends Rn{constructor(){super(...arguments),this.removePointerDownListener=lt}onPointerDown(e){this.session=new Np(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rm(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:om(e),onStart:om(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&_e.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=mn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function d1(){const t=x.useContext(qi);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,o=x.useId();return x.useEffect(()=>r(o),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}const ps={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function im(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ho={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ce.test(t))t=parseFloat(t);else return t;const n=im(t,e.target.x),r=im(t,e.target.y);return`${n}% ${r}%`}},h1={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,o=Ln.parse(t);if(o.length>5)return r;const i=Ln.createTransformer(t),s=typeof o[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+s]/=a,o[1+s]/=l;const c=Be(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class p1 extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=e;hS(m1),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ps.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?s.promote():s.relegate()||_e.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),dl.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function sm(t){const[e,n]=d1(),r=x.useContext(Io);return E.jsx(p1,{...t,layoutGroup:r,switchLayoutGroup:x.useContext(lh),isPresent:e,safeToRemove:n})}const m1={borderRadius:{...Ho,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ho,borderTopRightRadius:Ho,borderBottomLeftRadius:Ho,borderBottomRightRadius:Ho,boxShadow:h1},am=["TopLeft","TopRight","BottomLeft","BottomRight"],g1=am.length,lm=t=>typeof t=="string"?parseFloat(t):t,cm=t=>typeof t=="number"||ce.test(t);function y1(t,e,n,r,o,i){o?(t.opacity=Be(0,n.opacity!==void 0?n.opacity:1,v1(r)),t.opacityExit=Be(e.opacity!==void 0?e.opacity:1,0,b1(r))):i&&(t.opacity=Be(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<g1;s++){const a=`border${am[s]}Radius`;let l=um(e,a),c=um(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||cm(l)===cm(c)?(t[a]=Math.max(Be(lm(l),lm(c),r),0),(Yt.test(c)||Yt.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=Be(e.rotate||0,n.rotate||0,r))}function um(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const v1=fm(0,.5,yp),b1=fm(.5,.95,lt);function fm(t,e,n){return r=>r<t?0:r>e?1:n(Vo(t,e,r))}function dm(t,e){t.min=e.min,t.max=e.max}function Vt(t,e){dm(t.x,e.x),dm(t.y,e.y)}function hm(t,e,n,r,o){return t-=e,t=ds(t,1/n,r),o!==void 0&&(t=ds(t,1/o,r)),t}function x1(t,e=0,n=1,r=.5,o,i=t,s=t){if(Yt.test(e)&&(e=parseFloat(e),e=Be(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Be(i.min,i.max,r);t===i&&(a-=e),t.min=hm(t.min,e,n,a,o),t.max=hm(t.max,e,n,a,o)}function pm(t,e,[n,r,o],i,s){x1(t,e[n],e[r],e[o],e.scale,i,s)}const w1=["x","scaleX","originX"],S1=["y","scaleY","originY"];function mm(t,e,n,r){pm(t.x,e,w1,n?n.x:void 0,r?r.x:void 0),pm(t.y,e,S1,n?n.y:void 0,r?r.y:void 0)}function gm(t){return t.translate===0&&t.scale===1}function ym(t){return gm(t.x)&&gm(t.y)}function T1(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function vm(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function bm(t){return Mt(t.x)/Mt(t.y)}class E1{constructor(){this.members=[]}add(e){ql(this.members,e),e.scheduleRender()}remove(e){if(Yl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function xm(t,e,n){let r="";const o=t.x.translate/e.x,i=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const C1=(t,e)=>t.depth-e.depth;class A1{constructor(){this.children=[],this.isDirty=!1}add(e){ql(this.children,e),this.isDirty=!0}remove(e){Yl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(C1),this.isDirty=!1,this.children.forEach(e)}}function _1(t,e){const n=Fn.now(),r=({timestamp:o})=>{const i=o-n;i>=e&&(Xt(r),t(i-e))};return _e.read(r,!0),()=>Xt(r)}function P1(t){window.MotionDebug&&window.MotionDebug.record(t)}function O1(t){return t instanceof SVGElement&&t.tagName!=="svg"}function I1(t,e,n){const r=ct(t)?t:jr(t);return r.start(Zl("",r,e,n)),r.animation}const ac=["","X","Y","Z"],k1={visibility:"hidden"},wm=1e3;let D1=0;const ar={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function lc(t,e,n,r){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Sm(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?Mp(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?Sm(t.parent):!1:!1}function Tm({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=e==null?void 0:e()){this.id=D1++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ar.totalNodes=ar.resolvedTargetDeltas=ar.recalculatedProjection=0,this.nodes.forEach(F1),this.nodes.forEach(j1),this.nodes.forEach(B1),this.nodes.forEach(L1),P1(ar)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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 A1)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Xl),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=O1(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let f;const d=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=_1(d,250),ps.hasAnimatedSinceResize&&(ps.hasAnimatedSinceResize=!1,this.nodes.forEach(Cm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||G1,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!vm(this.targetLayout,p)||h,g=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const S={...Ol(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else d||Cm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xt(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(z1),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Sm(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Em);return}this.isUpdating||this.nodes.forEach(V1),this.isUpdating=!1,this.nodes.forEach($1),this.nodes.forEach(M1),this.nodes.forEach(R1),this.clearAllSnapshots();const a=Fn.now();ut.delta=Dn(0,1e3/60,a-ut.timestamp),ut.timestamp=a,ut.isProcessing=!0,Cl.update.process(ut),Cl.preRender.process(ut),Cl.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,dl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(N1),this.sharedNodes.forEach(H1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_e.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_e.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=qe(),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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ym(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||sr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),K1(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return qe();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(Nn(a.x,l.offset.x),Nn(a.y,l.offset.y)),a}removeElementScroll(s){const a=qe();Vt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){Vt(a,s);const{scroll:d}=this.root;d&&(Nn(a.x,-d.offset.x),Nn(a.y,-d.offset.y))}Nn(a.x,u.offset.x),Nn(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=qe();Vt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&zr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),sr(u.latestValues)&&zr(l,u.latestValues)}return sr(this.latestValues)&&zr(l,this.latestValues),l}removeTransform(s){const a=qe();Vt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!sr(c.latestValues))continue;ic(c.latestValues)&&c.updateSnapshot();const u=qe(),f=c.measurePageBox();Vt(u,f),mm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return sr(this.latestValues)&&mm(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=ut.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qe(),this.relativeTargetOrigin=qe(),zo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=qe(),this.targetWithTransforms=qe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ZE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vt(this.target,this.layout.layoutBox),Qp(this.target,this.targetDelta)):Vt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qe(),this.relativeTargetOrigin=qe(),zo(this.relativeTargetOrigin,this.target,h.target),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ar.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ic(this.parent.latestValues)||Yp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ut.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;Vt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;r1(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=qe());const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=Br(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Br(),this.projectionDeltaWithTransform=Br());const m=this.projectionTransform;Bo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=xm(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),ar.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Br();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=qe(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,y=this.getStack(),v=!y||y.members.length<=1,b=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(U1));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const w=S/1e3;Am(f.x,s.x,w),Am(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),W1(this.relativeTarget,this.relativeTargetOrigin,d,w),g&&T1(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=qe()),Vt(g,this.relativeTarget)),m&&(this.animationValues=u,y1(u,c,this.latestValues,w,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_e.update(()=>{ps.hasAnimatedSinceResize=!0,this.currentAnimation=I1(0,wm,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&km(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||qe();const f=Mt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=Mt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}Vt(a,l),zr(a,u),Bo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new E1),this.sharedNodes.get(s).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 s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&lc("z",s,c,this.animationValues);for(let u=0;u<ac.length;u++)lc(`rotate${ac[u]}`,s,c,this.animationValues),lc(`skew${ac[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return k1;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=rs(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=rs(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!sr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=xm(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in es){if(d[m]===void 0)continue;const{correct:y,applyTo:v}=es[m],b=c.transform==="none"?d[m]:y(d[m],f);if(v){const g=v.length;for(let S=0;S<g;S++)c[v[S]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=f===this?rs(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Em),this.root.sharedNodes.clear()}}}function M1(t){t.updateLayout()}function R1(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=t.layout,{animationType:i}=t.options,s=n.source!==t.layout.source;i==="size"?Nt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=Mt(d);d.min=r[f].min,d.max=d.min+h}):km(i,n.layoutBox,r)&&Nt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=Mt(r[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=Br();Bo(a,r,n.layoutBox);const l=Br();s?Bo(l,t.applyTransform(o,!0),n.measuredBox):Bo(l,r,n.layoutBox);const c=!ym(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=qe();zo(p,n.layoutBox,d.layoutBox);const m=qe();zo(m,r,h.layoutBox),vm(p,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function F1(t){ar.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function L1(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function N1(t){t.clearSnapshot()}function Em(t){t.clearMeasurements()}function V1(t){t.isLayoutDirty=!1}function $1(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Cm(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function j1(t){t.resolveTargetDelta()}function B1(t){t.calcProjection()}function z1(t){t.resetSkewAndRotation()}function H1(t){t.removeLeadSnapshot()}function Am(t,e,n){t.translate=Be(e.translate,0,n),t.scale=Be(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _m(t,e,n,r){t.min=Be(e.min,n.min,r),t.max=Be(e.max,n.max,r)}function W1(t,e,n,r){_m(t.x,e.x,n.x,r),_m(t.y,e.y,n.y,r)}function U1(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const G1={duration:.45,ease:[.4,0,.1,1]},Pm=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Om=Pm("applewebkit/")&&!Pm("chrome/")?Math.round:lt;function Im(t){t.min=Om(t.min),t.max=Om(t.max)}function K1(t){Im(t.x),Im(t.y)}function km(t,e,n){return t==="position"||t==="preserve-aspect"&&!nc(bm(e),bm(n),.2)}const Z1=Tm({attachResizeListener:(t,e)=>pn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cc={current:void 0},Dm=Tm({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!cc.current){const t=new Z1({});t.mount(window),t.setOptions({layoutScroll:!0}),cc.current=t}return cc.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),q1={pan:{Feature:f1},drag:{Feature:u1,ProjectionNode:Dm,MeasureLayout:sm}},uc={current:null},Mm={current:!1};function Y1(){if(Mm.current=!0,!!ul)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>uc.current=t.matches;t.addListener(e),e()}else uc.current=!1}function X1(t,e,n){const{willChange:r}=e;for(const o in e){const i=e[o],s=n[o];if(ct(i))t.addValue(o,i),fs(r)&&r.add(o),process.env.NODE_ENV==="development"&&Jl(i.version==="11.2.13",`Attempting to mix Framer Motion versions ${i.version} with 11.2.13 may not work as expected.`);else if(ct(s))t.addValue(o,jr(i,{owner:t})),fs(r)&&r.remove(o);else if(s!==i)if(t.hasValue(o)){const a=t.getValue(o);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=t.getStaticValue(o);t.addValue(o,jr(a!==void 0?a:i,{owner:t}))}}for(const o in n)e[o]===void 0&&t.removeValue(o);return e}const Rm=new WeakMap,J1=[...Gh,pt,Ln],Q1=t=>J1.find(Uh(t)),Fm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],eC=pl.length;class tC{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.resolveKeyframes=(d,h,p,m)=>new this.KeyframeResolver(d,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Dl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>_e.render(this.render,!1,!0);const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Qi(n),this.isVariantNode=fh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&ct(h)&&(h.set(l[d],!1),fs(u)&&u.add(d))}}mount(e){this.current=e,Rm.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Mm.current||Y1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:uc.current,process.env.NODE_ENV!=="production"&&Jl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Rm.delete(this.current),this.projection&&this.projection.unmount(),Xt(this.notifyUpdate),Xt(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const r=tr.has(e),o=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&_e.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Fr){const n=Fr[e];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[e]&&o&&r(this.props)&&(this.features[e]=new o(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):qe()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Fm.length;r++){const o=Fm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=e[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=X1(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<eC;r++){const o=pl[r],i=this.props[o];(Oo(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=jr(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(jh(o)||$h(o))?o=parseFloat(o):!Q1(o)&&Ln.test(n)&&(o=np(e,n)),this.setBaseTarget(e,ct(o)?o.get():o)),ct(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=Tl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[e])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ct(i)?i:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Xl),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Lm extends tC{constructor(){super(...arguments),this.KeyframeResolver=rp}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}}function nC(t){return window.getComputedStyle(t)}class rC extends Lm{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(tr.has(n)){const r=Nl(n);return r&&r.default||0}else{const r=nC(e),o=(gh(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return nm(e,n)}build(e,n,r,o){vl(e,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Sl(e,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ct(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,o){Eh(e,n,r,o)}}class oC extends Lm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(tr.has(n)){const r=Nl(n);return r&&r.default||0}return n=Ch.has(n)?n:fl(n),e.getAttribute(n)}measureInstanceViewportBox(){return qe()}scrapeMotionValuesFromProps(e,n,r){return _h(e,n,r)}build(e,n,r,o){xl(e,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(e,n,r,o){Ah(e,n,r,o)}mount(e){this.isSVGTag=wl(e.tagName),super.mount(e)}}const iC=(t,e)=>ml(t)?new oC(e,{enableHardwareAcceleration:!1}):new rC(e,{allowProjection:t!==x.Fragment,enableHardwareAcceleration:!0}),sC={...WE,...nT,...q1,...{layout:{ProjectionNode:Dm,MeasureLayout:sm}}},fc=fS((t,e)=>HS(t,e,sC,iC));function Nm(){const t=x.useRef(!1);return Yi(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Vm(){const t=Nm(),[e,n]=x.useState(0),r=x.useCallback(()=>{t.current&&n(e+1)},[e]);return[x.useCallback(()=>_e.postRender(r),[r]),e]}class aC extends R.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function lC({children:t,isPresent:e}){const n=x.useId(),r=x.useRef(null),o=x.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=x.useContext(Ki);return x.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(e||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
107
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qd(t,e){if(t){if(typeof t=="string")return sl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sl(t,e)}}function sl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function kw(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(t);!(o=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Dw(t){if(Array.isArray(t))return t}function Yd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ue(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yd(Object(n),!0).forEach(function(r){al(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function al(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wi(t,e){if(t==null)return{};var n=Mw(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Mw(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}var ll=x.forwardRef(function(t,e){var n=t.children,r=Wi(t,Sw),o=Jd(r),i=o.open,s=Wi(o,Tw);return x.useImperativeHandle(e,function(){return{open:i}},[i]),x.createElement(x.Fragment,null,n(Ue(Ue({},s),{},{open:i})))});ll.displayName="Dropzone";var Xd={disabled:!1,getFilesFromEvent:Ux,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ll.defaultProps=Xd,ll.propTypes={children:Le.func,accept:Le.objectOf(Le.arrayOf(Le.string)),multiple:Le.bool,preventDropOnDocument:Le.bool,noClick:Le.bool,noKeyboard:Le.bool,noDrag:Le.bool,noDragEventsBubbling:Le.bool,minSize:Le.number,maxSize:Le.number,maxFiles:Le.number,disabled:Le.bool,getFilesFromEvent:Le.func,onFileDialogCancel:Le.func,onFileDialogOpen:Le.func,useFsAccessApi:Le.bool,autoFocus:Le.bool,onDragEnter:Le.func,onDragLeave:Le.func,onDragOver:Le.func,onDrop:Le.func,onDropAccepted:Le.func,onDropRejected:Le.func,onError:Le.func,validator:Le.func};var cl={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Jd(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Ue(Ue({},Xd),t),n=e.accept,r=e.disabled,o=e.getFilesFromEvent,i=e.maxSize,s=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,u=e.onDragLeave,f=e.onDragOver,d=e.onDrop,h=e.onDropAccepted,p=e.onDropRejected,m=e.onFileDialogCancel,y=e.onFileDialogOpen,v=e.useFsAccessApi,b=e.autoFocus,g=e.preventDropOnDocument,S=e.noClick,w=e.noKeyboard,T=e.noDrag,P=e.noDragEventsBubbling,O=e.onError,k=e.validator,D=x.useMemo(function(){return bw(n)},[n]),L=x.useMemo(function(){return vw(n)},[n]),A=x.useMemo(function(){return typeof y=="function"?y:Qd},[y]),j=x.useMemo(function(){return typeof m=="function"?m:Qd},[m]),F=x.useRef(null),_=x.useRef(null),M=x.useReducer(Rw,cl),N=il(M,2),z=N[0],q=N[1],C=z.isFocused,$=z.isFileDialogActive,Y=x.useRef(typeof window<"u"&&window.isSecureContext&&v&&yw()),re=function(){!Y.current&&$&&setTimeout(function(){if(_.current){var oe=_.current.files;oe.length||(q({type:"closeDialog"}),j())}},300)};x.useEffect(function(){return window.addEventListener("focus",re,!1),function(){window.removeEventListener("focus",re,!1)}},[_,$,j,Y]);var ee=x.useRef([]),H=function(oe){F.current&&F.current.contains(oe.target)||(oe.preventDefault(),ee.current=[])};x.useEffect(function(){return g&&(document.addEventListener("dragover",Gd,!1),document.addEventListener("drop",H,!1)),function(){g&&(document.removeEventListener("dragover",Gd),document.removeEventListener("drop",H))}},[F,g]),x.useEffect(function(){return!r&&b&&F.current&&F.current.focus(),function(){}},[F,b,r]);var I=x.useCallback(function(Z){O?O(Z):console.error(Z)},[O]),V=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),pe(Z),ee.current=[].concat(Aw(ee.current),[Z.target]),Hi(Z)&&Promise.resolve(o(Z)).then(function(oe){if(!(zi(Z)&&!P)){var Fe=oe.length,Ke=Fe>0&&hw({files:oe,accept:D,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:k}),ft=Fe>0&&!Ke;q({isDragAccept:Ke,isDragReject:ft,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(oe){return I(oe)})},[o,c,I,P,D,s,i,a,l,k]),W=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),pe(Z);var oe=Hi(Z);if(oe&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return oe&&f&&f(Z),!1},[f,P]),K=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),pe(Z);var oe=ee.current.filter(function(Ke){return F.current&&F.current.contains(Ke)}),Fe=oe.indexOf(Z.target);Fe!==-1&&oe.splice(Fe,1),ee.current=oe,!(oe.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Hi(Z)&&u&&u(Z))},[F,u,P]),X=x.useCallback(function(Z,oe){var Fe=[],Ke=[];Z.forEach(function(ft){var ln=Wd(ft,D),nt=il(ln,2),cn=nt[0],mi=nt[1],lo=Ud(ft,s,i),sa=il(lo,2),Du=sa[0],Mu=sa[1],Ru=k?k(ft):null;if(cn&&Du&&!Ru)Fe.push(ft);else{var Fu=[mi,Mu];Ru&&(Fu=Fu.concat(Ru)),Ke.push({file:ft,errors:Fu.filter(function(sk){return sk})})}}),(!a&&Fe.length>1||a&&l>=1&&Fe.length>l)&&(Fe.forEach(function(ft){Ke.push({file:ft,errors:[dw]})}),Fe.splice(0)),q({acceptedFiles:Fe,fileRejections:Ke,type:"setFiles"}),d&&d(Fe,Ke,oe),Ke.length>0&&p&&p(Ke,oe),Fe.length>0&&h&&h(Fe,oe)},[q,a,D,s,i,l,d,h,p,k]),le=x.useCallback(function(Z){Z.preventDefault(),Z.persist(),pe(Z),ee.current=[],Hi(Z)&&Promise.resolve(o(Z)).then(function(oe){zi(Z)&&!P||X(oe,Z)}).catch(function(oe){return I(oe)}),q({type:"reset"})},[o,X,I,P]),B=x.useCallback(function(){if(Y.current){q({type:"openDialog"}),A();var Z={multiple:a,types:L};window.showOpenFilePicker(Z).then(function(oe){return o(oe)}).then(function(oe){X(oe,null),q({type:"closeDialog"})}).catch(function(oe){xw(oe)?(j(oe),q({type:"closeDialog"})):ww(oe)?(Y.current=!1,_.current?(_.current.value=null,_.current.click()):I(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):I(oe)});return}_.current&&(q({type:"openDialog"}),A(),_.current.value=null,_.current.click())},[q,A,j,v,X,I,L,a]),ke=x.useCallback(function(Z){!F.current||!F.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),B())},[F,B]),We=x.useCallback(function(){q({type:"focus"})},[]),Xe=x.useCallback(function(){q({type:"blur"})},[]),se=x.useCallback(function(){S||(gw()?setTimeout(B,0):B())},[S,B]),Ae=function(oe){return r?null:oe},Se=function(oe){return w?null:Ae(oe)},Ce=function(oe){return T?null:Ae(oe)},pe=function(oe){P&&oe.stopPropagation()},Pe=x.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Fe=oe===void 0?"ref":oe,Ke=Z.role,ft=Z.onKeyDown,ln=Z.onFocus,nt=Z.onBlur,cn=Z.onClick,mi=Z.onDragEnter,lo=Z.onDragOver,sa=Z.onDragLeave,Du=Z.onDrop,Mu=Wi(Z,Ew);return Ue(Ue(al({onKeyDown:Se(qt(ft,ke)),onFocus:Se(qt(ln,We)),onBlur:Se(qt(nt,Xe)),onClick:Ae(qt(cn,se)),onDragEnter:Ce(qt(mi,V)),onDragOver:Ce(qt(lo,W)),onDragLeave:Ce(qt(sa,K)),onDrop:Ce(qt(Du,le)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},Fe,F),!r&&!w?{tabIndex:0}:{}),Mu)}},[F,ke,We,Xe,se,V,W,K,le,w,T,r]),tt=x.useCallback(function(Z){Z.stopPropagation()},[]),Tt=x.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=Z.refKey,Fe=oe===void 0?"ref":oe,Ke=Z.onChange,ft=Z.onClick,ln=Wi(Z,Cw),nt=al({accept:D,multiple:a,type:"file",style:{display:"none"},onChange:Ae(qt(Ke,le)),onClick:Ae(qt(ft,tt)),tabIndex:-1},Fe,_);return Ue(Ue({},nt),ln)}},[_,n,a,le,r]);return Ue(Ue({},z),{},{isFocused:C&&!r,getRootProps:Pe,getInputProps:Tt,rootRef:F,inputRef:_,open:Ae(B)})}function Rw(t,e){switch(e.type){case"focus":return Ue(Ue({},t),{},{isFocused:!0});case"blur":return Ue(Ue({},t),{},{isFocused:!1});case"openDialog":return Ue(Ue({},cl),{},{isFileDialogActive:!0});case"closeDialog":return Ue(Ue({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ue(Ue({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Ue(Ue({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Ue({},cl);default:return t}}function Qd(){}function eh(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=eh(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function Fw(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=eh(t))&&(r&&(r+=" "),r+=e);return r}const th=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,nh=Fw,Lw=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return nh(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const d=th(u)||th(f);return o[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...c,f,d]:c},[]);return nh(t,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ui=x.forwardRef(function({as:e,...n},r){const o=e||"span";return E.jsx(o,{...n,ref:r})}),Nw=Lw("inline-flex gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50 disabled:text-opacity-60 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary hover:bg-primary-hover text-primary-foreground",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Gi=x.forwardRef(function({className:e,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return E.jsxs(Ui,{...l,ref:c,type:i,"data-theme":o,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:zt(Nw({size:s,rounded:a,theme:r?"loading":u?"disabled":o}),e),children:[l.children,n]})}),Vw=t=>E.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:t.buttons.map(e=>E.jsx("li",{className:"flex flex-1",children:E.jsx("button",{...e,type:e.type||"button","data-active":t.active===e.name?"true":"false",className:zt("border-main-bg flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","hover:text-main cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${e.name}`))}),$w={isImage:t=>t.type.includes("image")},jw=t=>{const[e,n]=x.useState({url:"",type:"",size:""});return x.useEffect(()=>{if($w.isImage(t.file)){const r=URL.createObjectURL(t.file);return n({url:r,type:"img",size:vd(t.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:t.file.type,size:vd(t.file.size)})},[t.file]),e.type==="img"?E.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[E.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[E.jsx("img",{src:e.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${t.file.name}`}),E.jsxs("div",{className:"flex flex-col",children:[E.jsx("span",{children:t.file.name}),E.jsx("span",{children:e.size})]})]}),E.jsx(Gi,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:E.jsx(xo,{})})]}):E.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[E.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[E.jsx(w0,{size:48}),E.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[E.jsx("span",{children:t.file.name}),E.jsx("span",{children:e.size})]})]}),E.jsx(Gi,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=t.onDeleteFile)==null||o.call(t,t.file)},children:E.jsx(xo,{className:"text-danger"})})]})},Bw=t=>E.jsx("ul",{className:"w-full space-y-jade-200",children:t.files.map(e=>E.jsx(jw,{onDeleteFile:t.onDeleteFile,file:e},e.name))}),zw=t=>t.isDragActive?E.jsx("p",{children:"Solte os arquivos selecionados"}):t.files.length>0?E.jsx(Bw,{onDeleteFile:t.onDeleteFile,files:t.files}):E.jsx(x.Fragment,{children:t.idle}),Hw=E.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[E.jsx(E0,{size:64}),E.jsxs("p",{children:["You can drag your files or"," ",E.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),Ww=({idle:t=Hw,onDeleteFile:e,onDrop:n,...r})=>{var u;const[o,i]=x.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=Jd({onDrop:s});return E.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[E.jsx("input",{...l(r),name:r.name,id:r.name}),E.jsx(zw,{onDeleteFile:e,isDragActive:c,idle:t,files:r.files??o})]})},Uw=["INPUT","SELECT"],rh=t=>{if(!t)return;Array.from(t.elements).forEach(n=>{Uw.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},Gw=t=>{const e=n=>{var r;n.persist(),n.preventDefault(),(r=t.onSubmit)==null||r.call(t,n)};return E.jsx("form",{...t,onSubmit:e})},Kw=({children:t,...e})=>{const n=x.useId(),[r,o]=x.useState(!1),i=e.checked??r,s=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=e==null?void 0:e.onCheck)==null||u.call(e,c)};return E.jsxs("div",{className:"flex items-center",children:[E.jsx("input",{...e,hidden:!0,type:"checkbox",checked:i,onChange:a=>o(a.target.checked)}),E.jsx("button",{type:"button",role:"switch",onClick:s,"aria-checked":i,"data-checked":i,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:E.jsx("span",{"aria-hidden":"true","data-checked":i,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch pointer-events-none inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),E.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:E.jsx("span",{className:"font-medium text-foreground",children:t})})]})},Zw=t=>E.jsx(Ui,{...t,as:"div",className:zt("rounded-lg bg-card-background p-8 border-card-border border shadow",t.className)}),Po=t=>{const[e,n]=x.useState(t.open),r=x.useRef(null),o=x.useMemo(()=>[Ea(10),pf({fallbackAxisSideDirection:"end"}),hf(),mf({padding:5,element:r})],[t.arrow]),{refs:i,floatingStyles:s,context:a}=Da({open:e,transform:!0,whileElementsMounted:Ta,middleware:o,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(n(p),(v=t.onChange)==null||v.call(t,p))}}),l=o0(a),c=ka(a),u=La(a),{getReferenceProps:f,getFloatingProps:d}=Ra([l,c,u]),h=mo();return E.jsxs(x.Fragment,{children:[E.jsx("button",{ref:i.setReference,...f(),children:t.trigger}),e&&E.jsx(Ff,{returnFocus:!0,visuallyHiddenDismiss:!0,restoreFocus:!0,context:a,modal:!1,children:E.jsxs("div",{className:"bg-floating-background isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:i.setFloating,style:s,"aria-labelledby":h,...d(),children:[E.jsx(wf,{ref:r,context:a,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),E.jsx("header",{className:"mb-2",children:E.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-tight text-left",children:t.title})}),t.children]})})]})},qw=({children:t,as:e,title:n,...r})=>{const[o,i]=x.useState(!1),s=x.useRef(null),a=e||"div",{refs:l,floatingStyles:c,context:u}=Da({open:o,onOpenChange:i,whileElementsMounted:Ta,transform:!0,middleware:[Ea(5),pf({fallbackAxisSideDirection:"start"}),hf(),mf({element:s,padding:5})]}),f=Kb(u,{move:!1}),d=l0(u),h=ka(u),p=La(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=Ra([f,d,h,p]);return E.jsxs(x.Fragment,{children:[E.jsx(a,{ref:l.setReference,...m(r),children:n}),E.jsx(kf,{children:o&&E.jsxs(Ui,{ref:l.setFloating,style:c,...y(),className:"bg-tooltip-background text-foreground border border-tooltip-border p-4 rounded-lg",children:[E.jsx(wf,{ref:s,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),t]})})]})},Ki=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Zi=x.createContext({}),qi=x.createContext(null),ul=typeof document<"u",Yi=ul?x.useLayoutEffect:x.useEffect,oh=x.createContext({strict:!1}),fl=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ih="data-"+fl("framerAppearId"),Yw={skipAnimations:!1,useManualTiming:!1};class sh{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Xw(t){let e=new sh,n=new sh,r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&o,d=f?e:n;return c&&s.add(l),d.add(l)&&f&&o&&(r=e.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let c=0;c<r;c++){const u=e.order[c];s.has(u)&&(a.schedule(u),t()),u(l)}o=!1,i&&(i=!1,a.process(l))}};return a}const Xi=["read","resolveKeyframes","update","preRender","render","postRender"],Jw=40;function ah(t,e){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=Xi.reduce((f,d)=>(f[d]=Xw(()=>n=!0),f),{}),s=f=>{i[f].process(o)},a=()=>{const f=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(f-o.timestamp,Jw),1),o.timestamp=f,o.isProcessing=!0,Xi.forEach(s),o.isProcessing=!1,n&&e&&(r=!1,t(a))},l=()=>{n=!0,r=!0,o.isProcessing||t(a)};return{schedule:Xi.reduce((f,d)=>{const h=i[d];return f[d]=(p,m=!1,y=!1)=>(n||l(),h.schedule(p,m,y)),f},{}),cancel:f=>Xi.forEach(d=>i[d].cancel(f)),state:o,steps:i}}const{schedule:dl,cancel:uk}=ah(queueMicrotask,!1);function Rr(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const lh=x.createContext({});let ch=!1;function Qw(t,e,n,r,o){const{visualElement:i}=x.useContext(Zi),s=x.useContext(oh),a=x.useContext(qi),l=x.useContext(Ki).reducedMotion,c=x.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=x.useContext(lh);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&tS(c.current,n,o,f),x.useInsertionEffect(()=>{u&&u.update(n,a)});const d=x.useRef(!!(n[ih]&&!window.HandoffComplete));return Yi(()=>{u&&(u.updateFeatures(),dl.render(u.render),d.current&&u.animationState&&u.animationState.animateChanges())}),x.useEffect(()=>{u&&(!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,ch||(ch=!0,queueMicrotask(eS))))}),u}function eS(){window.HandoffComplete=!0}function tS(t,e,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:uh(t.parent)),t.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Rr(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function uh(t){if(t)return t.options.allowProjection!==!1?t.projection:uh(t.parent)}function nS(t,e,n){return x.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Rr(n)&&(n.current=r))},[e])}function Oo(t){return typeof t=="string"||Array.isArray(t)}function Ji(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const hl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pl=["initial",...hl];function Qi(t){return Ji(t.animate)||pl.some(e=>Oo(t[e]))}function fh(t){return!!(Qi(t)||t.variants)}function rS(t,e){if(Qi(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Oo(n)?n:void 0,animate:Oo(r)?r:void 0}}return t.inherit!==!1?e:{}}function oS(t){const{initial:e,animate:n}=rS(t,x.useContext(Zi));return x.useMemo(()=>({initial:e,animate:n}),[dh(e),dh(n)])}function dh(t){return Array.isArray(t)?t.join(" "):t}const hh={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"]},Fr={};for(const t in hh)Fr[t]={isEnabled:e=>hh[t].some(n=>!!e[n])};function iS(t){for(const e in t)Fr[e]={...Fr[e],...t[e]}}const Io=x.createContext({}),sS=Symbol.for("motionComponentSymbol"),lt=t=>t;let Lr=lt,Ht=lt;process.env.NODE_ENV!=="production"&&(Lr=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Ht=(t,e)=>{if(!t)throw new Error(e)});function aS({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:o}){t&&iS(t);function i(a,l){let c;const u={...x.useContext(Ki),...a,layoutId:lS(a)},{isStatic:f}=u,d=oS(a),h=r(a,f);if(!f&&ul){cS(u,t);const p=uS(u);c=p.MeasureLayout,d.visualElement=Qw(o,h,u,e,p.ProjectionNode)}return E.jsxs(Zi.Provider,{value:d,children:[c&&d.visualElement?E.jsx(c,{visualElement:d.visualElement,...u}):null,n(o,a,nS(h,d.visualElement,l),h,f,d.visualElement)]})}const s=x.forwardRef(i);return s[sS]=o,s}function lS({layoutId:t}){const e=x.useContext(Io).id;return e&&t!==void 0?e+"-"+t:t}function cS(t,e){const n=x.useContext(oh).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Lr(!1,r):Ht(!1,r)}}function uS(t){const{drag:e,layout:n}=Fr;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function fS(t){function e(r,o={}){return aS(t(r,o))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const dS=["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 ml(t){return typeof t!="string"||t.includes("-")?!1:!!(dS.indexOf(t)>-1||/[A-Z]/u.test(t))}const es={};function hS(t){Object.assign(es,t)}const ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tr=new Set(ko);function ph(t,{layout:e,layoutId:n}){return tr.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!es[t]||t==="opacity")}const ct=t=>!!(t&&t.getVelocity),pS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mS=ko.length;function gS(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,o){let i="";for(let s=0;s<mS;s++){const a=ko[s];if(t[a]!==void 0){const l=pS[a]||a;i+=`${l}(${t[a]}) `}}return e&&!t.z&&(i+="translateZ(0)"),i=i.trim(),o?i=o(t,r?"":i):n&&r&&(i="none"),i}const mh=t=>e=>typeof e=="string"&&e.startsWith(t),gh=mh("--"),yS=mh("var(--"),gl=t=>yS(t)?vS.test(t.split("/*")[0].trim()):!1,vS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,bS=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Dn=(t,e,n)=>n>e?e:n<t?t:n,Nr={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Do={...Nr,transform:t=>Dn(0,1,t)},ts={...Nr,default:1},Mo=t=>Math.round(t*1e5)/1e5,yl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,xS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,wS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ro(t){return typeof t=="string"}function SS(t){return t==null}const Fo=t=>({test:e=>Ro(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Mn=Fo("deg"),Yt=Fo("%"),ce=Fo("px"),TS=Fo("vh"),ES=Fo("vw"),yh={...Yt,parse:t=>Yt.parse(t)/100,transform:t=>Yt.transform(t*100)},vh={...Nr,transform:Math.round},bh={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,size:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,rotate:Mn,rotateX:Mn,rotateY:Mn,rotateZ:Mn,scale:ts,scaleX:ts,scaleY:ts,scaleZ:ts,skew:Mn,skewX:Mn,skewY:Mn,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:Do,originX:yh,originY:yh,originZ:ce,zIndex:vh,backgroundPositionX:ce,backgroundPositionY:ce,fillOpacity:Do,strokeOpacity:Do,numOctaves:vh};function vl(t,e,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const f in e){const d=e[f];if(gh(f)){i[f]=d;continue}const h=bh[f],p=bS(d,h);if(tr.has(f)){if(l=!0,s[f]=p,!u)continue;d!==(h.default||0)&&(u=!1)}else f.startsWith("origin")?(c=!0,a[f]=p):o[f]=p}if(e.transform||(l||r?o.transform=gS(t.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:f="50%",originY:d="50%",originZ:h=0}=a;o.transformOrigin=`${f} ${d} ${h}`}}const bl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xh(t,e,n){for(const r in e)!ct(e[r])&&!ph(r,n)&&(t[r]=e[r])}function CS({transformTemplate:t},e,n){return x.useMemo(()=>{const r=bl();return vl(r,e,{enableHardwareAcceleration:!n},t),Object.assign({},r.vars,r.style)},[e])}function AS(t,e,n){const r=t.style||{},o={};return xh(o,r,t),Object.assign(o,CS(t,e,n)),o}function _S(t,e,n){const r={},o=AS(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=o,r}const PS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ns(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||PS.has(t)}let wh=t=>!ns(t);function OS(t){t&&(wh=e=>e.startsWith("on")?!ns(e):t(e))}try{OS(require("@emotion/is-prop-valid").default)}catch{}function IS(t,e,n){const r={};for(const o in t)o==="values"&&typeof t.values=="object"||(wh(o)||n===!0&&ns(o)||!e&&!ns(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}function Sh(t,e,n){return typeof t=="string"?t:ce.transform(e+n*t)}function kS(t,e,n){const r=Sh(e,t.x,t.width),o=Sh(n,t.y,t.height);return`${r} ${o}`}const DS={offset:"stroke-dashoffset",array:"stroke-dasharray"},MS={offset:"strokeDashoffset",array:"strokeDasharray"};function RS(t,e,n=1,r=0,o=!0){t.pathLength=1;const i=o?DS:MS;t[i.offset]=ce.transform(-r);const s=ce.transform(e),a=ce.transform(n);t[i.array]=`${s} ${a}`}function xl(t,{attrX:e,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,f,d){if(vl(t,c,u,d),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:m}=t;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(o!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=kS(m,o!==void 0?o:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&RS(h,s,a,l,!1)}const Th=()=>({...bl(),attrs:{}}),wl=t=>typeof t=="string"&&t.toLowerCase()==="svg";function FS(t,e,n,r){const o=x.useMemo(()=>{const i=Th();return xl(i,e,{enableHardwareAcceleration:!1},wl(r),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};xh(i,t.style,t),o.style={...i,...o.style}}return o}function LS(t=!1){return(n,r,o,{latestValues:i},s)=>{const l=(ml(n)?FS:_S)(r,i,s,n),c=IS(r,typeof n=="string",t),u=n!==x.Fragment?{...c,...l,ref:o}:{},{children:f}=r,d=x.useMemo(()=>ct(f)?f.get():f,[f]);return x.createElement(n,{...u,children:d})}}function Eh(t,{style:e,vars:n},r,o){Object.assign(t.style,e,o&&o.getProjectionStyles(r));for(const i in n)t.style.setProperty(i,n[i])}const Ch=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ah(t,e,n,r){Eh(t,e,void 0,r);for(const o in e.attrs)t.setAttribute(Ch.has(o)?o:fl(o),e.attrs[o])}function Sl(t,e,n){var r;const{style:o}=t,i={};for(const s in o)(ct(o[s])||e.style&&ct(e.style[s])||ph(s,t)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return i}function _h(t,e,n){const r=Sl(t,e,n);for(const o in t)if(ct(t[o])||ct(e[o])){const i=ko.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=t[o]}return r}function Ph(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Tl(t,e,n,r){if(typeof e=="function"){const[o,i]=Ph(r);e=e(n!==void 0?n:t.custom,o,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,i]=Ph(r);e=e(n!==void 0?n:t.custom,o,i)}return e}function nr(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const El=t=>Array.isArray(t),NS=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),VS=t=>El(t)?t[t.length-1]||0:t;function rs(t){const e=ct(t)?t.get():t;return NS(e)?e.toValue():e}function $S({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,o,i){const s={latestValues:jS(r,o,i,t),renderState:e()};return n&&(s.mount=a=>n(r,a,s)),s}const Oh=t=>(e,n)=>{const r=x.useContext(Zi),o=x.useContext(qi),i=()=>$S(t,e,r,o);return n?i():nr(i)};function jS(t,e,n,r){const o={},i=r(t,{});for(const d in i)o[d]=rs(i[d]);let{initial:s,animate:a}=t;const l=Qi(t),c=fh(t);e&&c&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const f=u?a:s;return f&&typeof f!="boolean"&&!Ji(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=Tl(t,h);if(!p)return;const{transitionEnd:m,transition:y,...v}=p;for(const b in v){let g=v[b];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(o[b]=g)}for(const b in m)o[b]=m[b]}),o}const{schedule:_e,cancel:Xt,state:ut,steps:Cl}=ah(typeof requestAnimationFrame<"u"?requestAnimationFrame:lt,!0),BS={useVisualState:Oh({scrapeMotionValuesFromProps:_h,createRenderState:Th,onMount:(t,e,{renderState:n,latestValues:r})=>{_e.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),_e.render(()=>{xl(n,r,{enableHardwareAcceleration:!1},wl(e.tagName),t.transformTemplate),Ah(e,n)})}})},zS={useVisualState:Oh({scrapeMotionValuesFromProps:Sl,createRenderState:bl})};function HS(t,{forwardMotionProps:e=!1},n,r){return{...ml(t)?BS:zS,preloadedFeatures:n,useRender:LS(e),createVisualElement:r,Component:t}}function pn(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const Ih=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function os(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const WS=t=>e=>Ih(e)&&t(e,os(e));function mn(t,e,n,r){return pn(t,e,WS(n),r)}const US=(t,e)=>n=>e(t(n)),gn=(...t)=>t.reduce(US);function kh(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Dh=kh("dragHorizontal"),Mh=kh("dragVertical");function Rh(t){let e=!1;if(t==="y")e=Mh();else if(t==="x")e=Dh();else{const n=Dh(),r=Mh();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function Fh(){const t=Rh(!0);return t?(t(),!1):!0}class Rn{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Lh(t,e){const n=e?"pointerenter":"pointerleave",r=e?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||Fh())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[r];l&&_e.postRender(()=>l(i,s))};return mn(t.current,n,o,{passive:!t.getProps()[r]})}class GS extends Rn{mount(){this.unmount=gn(Lh(this.node,!0),Lh(this.node,!1))}unmount(){}}class KS extends Rn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gn(pn(this.node.current,"focus",()=>this.onFocus()),pn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Nh=(t,e)=>e?t===e?!0:Nh(t,e.parentElement):!1;function Al(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,os(n))}class ZS extends Rn{constructor(){super(...arguments),this.removeStartListeners=lt,this.removeEndListeners=lt,this.removeAccessibleListeners=lt,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=mn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),d=!f&&!Nh(this.node.current,a.target)?u:c;d&&_e.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=mn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=gn(i,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Al("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&_e.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=pn(this.node.current,"keyup",s),Al("down",(a,l)=>{this.startPress(a,l)})},n=pn(this.node.current,"keydown",e),r=()=>{this.isPressing&&Al("cancel",(i,s)=>this.cancelPress(i,s))},o=pn(this.node.current,"blur",r);this.removeAccessibleListeners=gn(n,o)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&_e.postRender(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Fh()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&_e.postRender(()=>r(e,n))}mount(){const e=this.node.getProps(),n=mn(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=pn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=gn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _l=new WeakMap,Pl=new WeakMap,qS=t=>{const e=_l.get(t.target);e&&e(t)},YS=t=>{t.forEach(qS)};function XS({root:t,...e}){const n=t||document;Pl.has(n)||Pl.set(n,{});const r=Pl.get(n),o=JSON.stringify(e);return r[o]||(r[o]=new IntersectionObserver(YS,{root:t,...e})),r[o]}function JS(t,e,n){const r=XS(e);return _l.set(t,n),r.observe(t),()=>{_l.delete(t),r.unobserve(t)}}const QS={some:0,all:1};class eT extends Rn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:QS[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return JS(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(tT(e,n))&&this.startObserver()}unmount(){}}function tT({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const nT={inView:{Feature:eT},tap:{Feature:ZS},focus:{Feature:KS},hover:{Feature:GS}};function Vh(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function is(t,e,n){const r=t.getProps();return Tl(r,e,n!==void 0?n:r.custom,t)}const yn=t=>t*1e3,vn=t=>t/1e3,rT={type:"spring",stiffness:500,damping:25,restSpeed:10},oT=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),iT={type:"keyframes",duration:.8},sT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},aT=(t,{keyframes:e})=>e.length>2?iT:tr.has(t)?t.startsWith("scale")?oT(e[1]):rT:sT;function lT({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Ol(t,e){return t[e]||t.default||t}const cT=t=>t!==null;function ss(t,{repeat:e,repeatType:n="loop"},r){const o=t.filter(cT),i=e&&n!=="loop"&&e%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let as;function uT(){as=void 0}const Fn={now:()=>(as===void 0&&Fn.set(ut.isProcessing||Yw.useManualTiming?ut.timestamp:performance.now()),as),set:t=>{as=t,queueMicrotask(uT)}},$h=t=>/^0[^.\s]+$/u.test(t);function fT(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||$h(t):!0}const jh=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),dT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hT(t){const e=dT.exec(t);if(!e)return[,];const[,n,r,o]=e;return[`--${n??r}`,o]}const pT=4;function Bh(t,e,n=1){Ht(n<=pT,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,o]=hT(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const s=i.trim();return jh(s)?parseFloat(s):s}return gl(o)?Bh(o,e,n+1):o}const mT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),zh=t=>t===Nr||t===ce,Hh=(t,e)=>parseFloat(t.split(", ")[e]),Wh=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Hh(o[1],e);{const i=r.match(/^matrix\((.+)\)$/u);return i?Hh(i[1],t):0}},gT=new Set(["x","y","z"]),yT=ko.filter(t=>!gT.has(t));function vT(t){const e=[];return yT.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Vr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Wh(4,13),y:Wh(5,14)};Vr.translateX=Vr.x,Vr.translateY=Vr.y;const Uh=t=>e=>e.test(t),Gh=[Nr,ce,Yt,Mn,ES,TS,{test:t=>t==="auto",parse:t=>t}],Kh=t=>Gh.find(Uh(t)),rr=new Set;let Il=!1,kl=!1;function Zh(){if(kl){const t=Array.from(rr).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const o=vT(r);o.length&&(n.set(r,o),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}kl=!1,Il=!1,rr.forEach(t=>t.complete()),rr.clear()}function qh(){rr.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(kl=!0)})}function bT(){qh(),Zh()}class Dl{constructor(e,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(rr.add(this),Il||(Il=!0,_e.read(qh),_e.resolveKeyframes(Zh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:o}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),o&&s===void 0&&o.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),rr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,rr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ml=(t,e)=>n=>!!(Ro(n)&&wS.test(n)&&n.startsWith(t)||e&&!SS(n)&&Object.prototype.hasOwnProperty.call(n,e)),Yh=(t,e,n)=>r=>{if(!Ro(r))return r;const[o,i,s,a]=r.match(yl);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},xT=t=>Dn(0,255,t),Rl={...Nr,transform:t=>Math.round(xT(t))},or={test:Ml("rgb","red"),parse:Yh("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Rl.transform(t)+", "+Rl.transform(e)+", "+Rl.transform(n)+", "+Mo(Do.transform(r))+")"};function wT(t){let e="",n="",r="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Fl={test:Ml("#"),parse:wT,transform:or.transform},$r={test:Ml("hsl","hue"),parse:Yh("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Yt.transform(Mo(e))+", "+Yt.transform(Mo(n))+", "+Mo(Do.transform(r))+")"},pt={test:t=>or.test(t)||Fl.test(t)||$r.test(t),parse:t=>or.test(t)?or.parse(t):$r.test(t)?$r.parse(t):Fl.parse(t),transform:t=>Ro(t)?t:t.hasOwnProperty("red")?or.transform(t):$r.transform(t)};function ST(t){var e,n;return isNaN(t)&&Ro(t)&&(((e=t.match(yl))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(xS))===null||n===void 0?void 0:n.length)||0)>0}const Xh="number",Jh="color",TT="var",ET="var(",Qh="${}",CT=/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 Lo(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=e.replace(CT,l=>(pt.test(l)?(r.color.push(i),o.push(Jh),n.push(pt.parse(l))):l.startsWith(ET)?(r.var.push(i),o.push(TT),n.push(l)):(r.number.push(i),o.push(Xh),n.push(parseFloat(l))),++i,Qh)).split(Qh);return{values:n,split:a,indexes:r,types:o}}function ep(t){return Lo(t).values}function tp(t){const{split:e,types:n}=Lo(t),r=e.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=e[s],o[s]!==void 0){const a=n[s];a===Xh?i+=Mo(o[s]):a===Jh?i+=pt.transform(o[s]):i+=o[s]}return i}}const AT=t=>typeof t=="number"?0:t;function _T(t){const e=ep(t);return tp(t)(e.map(AT))}const Ln={test:ST,parse:ep,createTransformer:tp,getAnimatableNone:_T},PT=new Set(["brightness","contrast","saturate","opacity"]);function OT(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(yl)||[];if(!r)return t;const o=n.replace(r,"");let i=PT.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const IT=/\b([a-z-]*)\(.*?\)/gu,Ll={...Ln,getAnimatableNone:t=>{const e=t.match(IT);return e?e.map(OT).join(" "):t}},kT={...bh,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:Ll,WebkitFilter:Ll},Nl=t=>kT[t];function np(t,e){let n=Nl(t);return n!==Ll&&(n=Ln),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const DT=new Set(["auto","none","0"]);function MT(t,e,n){let r=0,o;for(;r<t.length&&!o;){const i=t[r];typeof i=="string"&&!DT.has(i)&&Lo(i).values.length&&(o=t[r]),r++}if(o&&n)for(const i of e)t[i]=np(n,o)}class rp extends Dl{constructor(e,n,r,o){super(e,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),gl(c))){const u=Bh(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!mT.has(r)||e.length!==2)return;const[o,i]=e,s=Kh(o),a=Kh(i);if(s!==a)if(zh(s)&&zh(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let o=0;o<e.length;o++)fT(e[o])&&r.push(o);r.length&&MT(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&e.getValue(r,o).jump(o,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=Vr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function op(t){let e;return()=>(e===void 0&&(e=t()),e)}const ip=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ln.test(t)||t==="0")&&!t.startsWith("url("));function RT(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function FT(t,e,n,r){const o=t[0];if(o===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],s=ip(o,e),a=ip(i,e);return Lr(s===a,`You are trying to animate ${e} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:RT(t)||n==="spring"&&r}class sp{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&bT(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!FT(e,r,o,i))if(s)this.options.duration=0;else{l==null||l(ss(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function ap(t,e){return e?t*(1e3/e):0}const LT=5;function lp(t,e,n){const r=Math.max(e-LT,0);return ap(n-t(r),e-r)}const Vl=.001,NT=.01,cp=10,VT=.05,$T=1;function jT({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i;Lr(t<=yn(cp),"Spring duration must be 10 seconds or less");let s=1-e;s=Dn(VT,$T,s),t=Dn(NT,cp,vn(t)),s<1?(o=c=>{const u=c*s,f=u*t,d=u-n,h=$l(c,s),p=Math.exp(-f);return Vl-d/h*p},i=c=>{const f=c*s*t,d=f*n+n,h=Math.pow(s,2)*Math.pow(c,2)*t,p=Math.exp(-f),m=$l(Math.pow(c,2),s);return(-o(c)+Vl>0?-1:1)*((d-h)*p)/m}):(o=c=>{const u=Math.exp(-c*t),f=(c-n)*t+1;return-Vl+u*f},i=c=>{const u=Math.exp(-c*t),f=(n-c)*(t*t);return u*f});const a=5/t,l=zT(o,i,a);if(t=yn(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:t}}}const BT=12;function zT(t,e,n){let r=n;for(let o=1;o<BT;o++)r=r-t(r)/e(r);return r}function $l(t,e){return t*Math.sqrt(1-e*e)}const HT=["duration","bounce"],WT=["stiffness","damping","mass"];function up(t,e){return e.some(n=>t[n]!==void 0)}function UT(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!up(t,WT)&&up(t,HT)){const n=jT(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function fp({keyframes:t,restDelta:e,restSpeed:n,...r}){const o=t[0],i=t[t.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=UT({...r,velocity:-vn(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=i-o,y=vn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let b;if(p<1){const g=$l(y,p);b=S=>{const w=Math.exp(-p*y*S);return i-w*((h+p*y*m)/g*Math.sin(g*S)+m*Math.cos(g*S))}}else if(p===1)b=g=>i-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);b=S=>{const w=Math.exp(-p*y*S),T=Math.min(g*S,300);return i-w*((h+p*y*m)*Math.sinh(T)+g*m*Math.cosh(T))/g}}return{calculatedDuration:d&&u||null,next:g=>{const S=b(g);if(d)s.done=g>=u;else{let w=h;g!==0&&(p<1?w=lp(b,g,S):w=0);const T=Math.abs(w)<=n,P=Math.abs(i-S)<=e;s.done=T&&P}return s.value=s.done?i:S,s}}}function dp({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=O=>a!==void 0&&O<a||l!==void 0&&O>l,p=O=>a===void 0?l:l===void 0||Math.abs(a-O)<Math.abs(l-O)?a:l;let m=n*e;const y=f+m,v=s===void 0?y:s(y);v!==y&&(m=v-f);const b=O=>-m*Math.exp(-O/r),g=O=>v+b(O),S=O=>{const k=b(O),D=g(O);d.done=Math.abs(k)<=c,d.value=d.done?v:D};let w,T;const P=O=>{h(d.value)&&(w=O,T=fp({keyframes:[d.value,p(d.value)],velocity:lp(g,O,d.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return P(0),{calculatedDuration:null,next:O=>{let k=!1;return!T&&w===void 0&&(k=!0,S(O),P(O)),w!==void 0&&O>=w?T.next(O-w):(!k&&S(O),d)}}}const hp=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,GT=1e-7,KT=12;function ZT(t,e,n,r,o){let i,s,a=0;do s=e+(n-e)/2,i=hp(s,r,o)-t,i>0?n=s:e=s;while(Math.abs(i)>GT&&++a<KT);return s}function No(t,e,n,r){if(t===e&&n===r)return lt;const o=i=>ZT(i,0,1,t,n);return i=>i===0||i===1?i:hp(o(i),e,r)}const qT=No(.42,0,1,1),YT=No(0,0,.58,1),pp=No(.42,0,.58,1),XT=t=>Array.isArray(t)&&typeof t[0]!="number",mp=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,gp=t=>e=>1-t(1-e),jl=t=>1-Math.sin(Math.acos(t)),yp=gp(jl),JT=mp(jl),vp=No(.33,1.53,.69,.99),Bl=gp(vp),QT=mp(Bl),bp={linear:lt,easeIn:qT,easeInOut:pp,easeOut:YT,circIn:jl,circInOut:JT,circOut:yp,backIn:Bl,backInOut:QT,backOut:vp,anticipate:t=>(t*=2)<1?.5*Bl(t):.5*(2-Math.pow(2,-10*(t-1)))},xp=t=>{if(Array.isArray(t)){Ht(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,o]=t;return No(e,n,r,o)}else if(typeof t=="string")return Ht(bp[t]!==void 0,`Invalid easing type '${t}'`),bp[t];return t},Vo=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},Be=(t,e,n)=>t+(e-t)*n;function zl(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function eE({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let o=0,i=0,s=0;if(!e)o=i=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=zl(l,a,t+1/3),i=zl(l,a,t),s=zl(l,a,t-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function ls(t,e){return n=>n>0?e:t}const Hl=(t,e,n)=>{const r=t*t,o=n*(e*e-r)+r;return o<0?0:Math.sqrt(o)},tE=[Fl,or,$r],nE=t=>tE.find(e=>e.test(t));function wp(t){const e=nE(t);if(Lr(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===$r&&(n=eE(n)),n}const Sp=(t,e)=>{const n=wp(t),r=wp(e);if(!n||!r)return ls(t,e);const o={...n};return i=>(o.red=Hl(n.red,r.red,i),o.green=Hl(n.green,r.green,i),o.blue=Hl(n.blue,r.blue,i),o.alpha=Be(n.alpha,r.alpha,i),or.transform(o))},Wl=new Set(["none","hidden"]);function rE(t,e){return Wl.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function oE(t,e){return n=>Be(t,e,n)}function Ul(t){return typeof t=="number"?oE:typeof t=="string"?gl(t)?ls:pt.test(t)?Sp:aE:Array.isArray(t)?Tp:typeof t=="object"?pt.test(t)?Sp:iE:ls}function Tp(t,e){const n=[...t],r=n.length,o=t.map((i,s)=>Ul(i)(i,e[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function iE(t,e){const n={...t,...e},r={};for(const o in n)t[o]!==void 0&&e[o]!==void 0&&(r[o]=Ul(t[o])(t[o],e[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function sE(t,e){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],a=t.indexes[s][o[s]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const aE=(t,e)=>{const n=Ln.createTransformer(e),r=Lo(t),o=Lo(e);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Wl.has(t)&&!o.values.length||Wl.has(e)&&!r.values.length?rE(t,e):gn(Tp(sE(r,o),o.values),n):(Lr(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ls(t,e))};function Ep(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Be(t,e,n):Ul(t)(t,e)}function lE(t,e,n){const r=[],o=n||Ep,i=t.length-1;for(let s=0;s<i;s++){let a=o(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||lt:e;a=gn(l,a)}r.push(a)}return r}function Cp(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;if(Ht(i===e.length,"Both input and output ranges must be the same length"),i===1)return()=>e[0];if(i===2&&t[0]===t[1])return()=>e[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=lE(e,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const f=Vo(t[u],t[u+1],c);return s[u](f)};return n?c=>l(Dn(t[0],t[i-1],c)):l}function cE(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const o=Vo(0,e,r);t.push(Be(n,1,o))}}function uE(t){const e=[0];return cE(e,t.length-1),e}function fE(t,e){return t.map(n=>n*e)}function dE(t,e){return t.map(()=>e||pp).splice(0,t.length-1)}function cs({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const o=XT(r)?r.map(xp):xp(r),i={done:!1,value:e[0]},s=fE(n&&n.length===e.length?n:uE(e),t),a=Cp(s,e,{ease:Array.isArray(o)?o:dE(e,o)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const Ap=2e4;function hE(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Ap;)e+=n,r=t.next(e);return e>=Ap?1/0:e}const pE=t=>{const e=({timestamp:n})=>t(n);return{start:()=>_e.update(e,!0),stop:()=>Xt(e),now:()=>ut.isProcessing?ut.timestamp:Fn.now()}},mE={decay:dp,inertia:dp,tween:cs,keyframes:cs,spring:fp},gE=t=>t/100;class Gl extends sp{constructor({KeyframeResolver:e=Dl,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new e(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=mE[n]||cs;let l,c;a!==cs&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ht(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=gn(gE,Ep(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});i==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=hE(u));const{calculatedDuration:f}=u,d=f+o,h=d*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,S=i;if(h){const O=Math.min(this.currentTime,u)/f;let k=Math.floor(O),D=O%1;!D&&O>=1&&(D=1),D===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(p==="reverse"?(D=1-D,m&&(D-=m/f)):p==="mirror"&&(S=s)),g=Dn(0,1,D)*f}const w=b?{done:!1,value:l[0]}:S.next(g);a&&(w.value=a(w.value));let{done:T}=w;!b&&c!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return P&&o!==void 0&&(w.value=ss(l,this.options,o)),y&&y(w.value),P&&this.finish(),w}get duration(){const{resolved:e}=this;return e?vn(e.calculatedDuration):0}get time(){return vn(this.currentTime)}set time(e){e=yn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=vn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=pE,onPlay:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const _p=t=>Array.isArray(t)&&typeof t[0]=="number";function Pp(t){return!!(!t||typeof t=="string"&&t in Kl||_p(t)||Array.isArray(t)&&t.every(Pp))}const $o=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Kl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$o([0,.65,.55,1]),circOut:$o([.55,0,1,.45]),backIn:$o([.31,.01,.66,-.59]),backOut:$o([.33,1.53,.69,.99])};function yE(t){return Op(t)||Kl.easeOut}function Op(t){if(t)return _p(t)?$o(t):Array.isArray(t)?t.map(yE):Kl[t]}function vE(t,e,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Op(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const bE=op(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xE=new Set(["opacity","clipPath","filter","transform"]),us=10,wE=2e4;function SE(t){return t.type==="spring"||t.name==="backgroundColor"||!Pp(t.ease)}function TE(t,e){const n=new Gl({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const o=[];let i=0;for(;!r.done&&i<wE;)r=n.sample(i),o.push(r.value),i+=us;return{times:void 0,keyframes:o,duration:i-us,ease:"linear"}}class Ip extends sp{constructor(e){super(e);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new rp(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(e,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(SE(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,...p}=this.options,m=TE(e,p);e=m.keyframes,e.length===1&&(e[1]=e[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=vE(l.owner.current,c,e,{...this.options,duration:o,times:i,ease:s});return u.startTime=Fn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(ss(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return vn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return vn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return lt;const{animation:r}=n;r.timeline=e,r.onfinish=null}return lt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:c,onComplete:u,...f}=this.options,d=new Gl({...f,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),h=yn(this.time);l.setWithVelocity(d.sample(h-us).value,d.sample(h).value,us)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=e;return bE()&&r&&xE.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function EE(t,e){let n;const r=()=>{const{currentTime:o}=e,s=(o===null?0:o.value)/100;n!==s&&t(s),n=s};return _e.update(r,!0),()=>Xt(r)}const CE=op(()=>window.ScrollTimeline!==void 0);class AE{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e){const n=this.animations.map(r=>{if(CE()&&r.attachTimeline)r.attachTimeline(e);else return r.pause(),EE(o=>{r.time=r.duration*o},e)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Zl=(t,e,n,r={},o,i)=>s=>{const a=Ol(r,t)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-yn(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:o};lT(a)||(u={...u,...aT(t,u)}),u.duration&&(u.duration=yn(u.duration)),u.repeatDelay&&(u.repeatDelay=yn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(f=!0)),f&&!i&&e.get()!==void 0){const d=ss(u.keyframes,a);if(d!==void 0)return _e.update(()=>{u.onUpdate(d),u.onComplete()}),new AE([])}return!i&&Ip.supports(u)?new Ip(u):new Gl(u)};function fs(t){return!!(ct(t)&&t.add)}function ql(t,e){t.indexOf(e)===-1&&t.push(e)}function Yl(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function _E([...t],e,n){const r=e<0?t.length+e:e;if(r>=0&&r<t.length){const o=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(o,0,i)}return t}class Xl{constructor(){this.subscriptions=[]}add(e){return ql(this.subscriptions,e),()=>Yl(this.subscriptions,e)}notify(e,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const kp=new Set;function Jl(t,e,n){t||kp.has(e)||(console.warn(e),kp.add(e))}const Dp=30,PE=t=>!isNaN(parseFloat(t)),jo={current:void 0};class OE{constructor(e,n={}){this.version="11.2.13",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=Fn.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Fn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=PE(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Jl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Xl);const r=this.events[e].add(n);return e==="change"?()=>{r(),_e.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return jo.current&&jo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Fn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Dp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dp);return ap(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function jr(t,e){return new OE(t,e)}function IE(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,jr(n))}function kE(t,e){const n=is(t,e);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=VS(i[s]);IE(t,s,a)}}function Mp(t){return t.getProps()[ih]}function DE({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Rp(t,e,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;const c=t.getValue("willChange");r&&(s=r);const u=[],f=o&&t.animationState&&t.animationState.getState()[o];for(const d in l){const h=t.getValue(d,(i=t.latestValues[d])!==null&&i!==void 0?i:null),p=l[d];if(p===void 0||f&&DE(f,d))continue;const m={delay:n,elapsed:0,...Ol(s||{},d)};let y=!1;if(window.HandoffAppearAnimations){const b=Mp(t);if(b){const g=window.HandoffAppearAnimations(b,d,h,_e);g!==null&&(m.elapsed=g,y=!0)}}h.start(Zl(d,h,p,t.shouldReduceMotion&&tr.has(d)?{type:!1}:m,t,y));const v=h.animation;v&&(fs(c)&&(c.add(d),v.then(()=>c.remove(d))),u.push(v))}return a&&Promise.all(u).then(()=>{_e.update(()=>{a&&kE(t,a)})}),u}function Ql(t,e,n={}){var r;const o=is(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Rp(t,o,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return ME(t,e,u+c,f,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function ME(t,e,n=0,r=0,o=1,i){const s=[],a=(t.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort(RE).forEach((c,u)=>{c.notify("AnimationStart",e),s.push(Ql(c,e,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(s)}function RE(t,e){return t.sortNodePosition(e)}function FE(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const o=e.map(i=>Ql(t,i,n));r=Promise.all(o)}else if(typeof e=="string")r=Ql(t,e,n);else{const o=typeof e=="function"?is(t,e,n.custom):e;r=Promise.all(Rp(t,o,n))}return r.then(()=>{_e.postRender(()=>{t.notify("AnimationComplete",e)})})}const LE=[...hl].reverse(),NE=hl.length;function VE(t){return e=>Promise.all(e.map(({animation:n,options:r})=>FE(t,n,r)))}function $E(t){let e=VE(t),n=Fp(),r=!0;const o=l=>(c,u)=>{var f;const d=is(t,u,l==="exit"?(f=t.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;c={...c,...m,...p}}return c};function i(l){e=l(t)}function s(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},f=[],d=new Set;let h={},p=1/0;for(let y=0;y<NE;y++){const v=LE[y],b=n[v],g=c[v]!==void 0?c[v]:u[v],S=Oo(g),w=v===l?b.isActive:null;w===!1&&(p=y);let T=g===u[v]&&g!==c[v]&&S;if(T&&r&&t.manuallyAnimateOnMount&&(T=!1),b.protectedKeys={...h},!b.isActive&&w===null||!g&&!b.prevProp||Ji(g)||typeof g=="boolean")continue;let O=jE(b.prevProp,g)||v===l&&b.isActive&&!T&&S||y>p&&S,k=!1;const D=Array.isArray(g)?g:[g];let L=D.reduce(o(v),{});w===!1&&(L={});const{prevResolvedValues:A={}}=b,j={...A,...L},F=_=>{O=!0,d.has(_)&&(k=!0,d.delete(_)),b.needsAnimating[_]=!0;const M=t.getValue(_);M&&(M.liveStyle=!1)};for(const _ in j){const M=L[_],N=A[_];if(h.hasOwnProperty(_))continue;let z=!1;El(M)&&El(N)?z=!Vh(M,N):z=M!==N,z?M!=null?F(_):d.add(_):M!==void 0&&d.has(_)?F(_):b.protectedKeys[_]=!0}b.prevProp=g,b.prevResolvedValues=L,b.isActive&&(h={...h,...L}),r&&t.blockInitialAnimation&&(O=!1),O&&(!T||k)&&f.push(...D.map(_=>({animation:_,options:{type:v}})))}if(d.size){const y={};d.forEach(v=>{const b=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=b??null}),f.push({animation:y})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=s(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Fp(),r=!0}}}function jE(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Vh(e,t):!1}function ir(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fp(){return{animate:ir(!0),whileInView:ir(),whileHover:ir(),whileTap:ir(),whileDrag:ir(),whileFocus:ir(),exit:ir()}}class BE extends Rn{constructor(e){super(e),e.animationState||(e.animationState=$E(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ji(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let zE=0;class HE extends Rn{constructor(){super(...arguments),this.id=zE++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const WE={animation:{Feature:BE},exit:{Feature:HE}},Lp=(t,e)=>Math.abs(t-e);function UE(t,e){const n=Lp(t.x,e.x),r=Lp(t.y,e.y);return Math.sqrt(n**2+r**2)}class Np{constructor(e,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=tc(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=UE(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:m}=ut;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;d||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ec(d,this.transformPagePoint),_e.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=tc(f.type==="pointercancel"?this.lastMoveEventInfo:ec(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,y),p&&p(f,y)},!Ih(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=os(e),a=ec(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=ut;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,tc(a,this.history)),this.removeListeners=gn(mn(this.contextWindow,"pointermove",this.handlePointerMove),mn(this.contextWindow,"pointerup",this.handlePointerUp),mn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Xt(this.updatePoint)}}function ec(t,e){return e?{point:e(t.point)}:t}function Vp(t,e){return{x:t.x-e.x,y:t.y-e.y}}function tc({point:t},e){return{point:t,delta:Vp(t,$p(e)),offset:Vp(t,GE(e)),velocity:KE(e,.1)}}function GE(t){return t[0]}function $p(t){return t[t.length-1]}function KE(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const o=$p(t);for(;n>=0&&(r=t[n],!(o.timestamp-r.timestamp>yn(e)));)n--;if(!r)return{x:0,y:0};const i=vn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Mt(t){return t.max-t.min}function nc(t,e=0,n=.01){return Math.abs(t-e)<=n}function jp(t,e,n,r=.5){t.origin=r,t.originPoint=Be(e.min,e.max,t.origin),t.scale=Mt(n)/Mt(e),(nc(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Be(n.min,n.max,t.origin)-t.originPoint,(nc(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Bo(t,e,n,r){jp(t.x,e.x,n.x,r?r.originX:void 0),jp(t.y,e.y,n.y,r?r.originY:void 0)}function Bp(t,e,n){t.min=n.min+e.min,t.max=t.min+Mt(e)}function ZE(t,e,n){Bp(t.x,e.x,n.x),Bp(t.y,e.y,n.y)}function zp(t,e,n){t.min=e.min-n.min,t.max=t.min+Mt(e)}function zo(t,e,n){zp(t.x,e.x,n.x),zp(t.y,e.y,n.y)}function qE(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Be(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Be(n,t,r.max):Math.min(t,n)),t}function Hp(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function YE(t,{top:e,left:n,bottom:r,right:o}){return{x:Hp(t.x,n,o),y:Hp(t.y,e,r)}}function Wp(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function XE(t,e){return{x:Wp(t.x,e.x),y:Wp(t.y,e.y)}}function JE(t,e){let n=.5;const r=Mt(t),o=Mt(e);return o>r?n=Vo(e.min,e.max-r,t.min):r>o&&(n=Vo(t.min,t.max-o,e.min)),Dn(0,1,n)}function QE(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const rc=.35;function e1(t=rc){return t===!1?t=0:t===!0&&(t=rc),{x:Up(t,"left","right"),y:Up(t,"top","bottom")}}function Up(t,e,n){return{min:Gp(t,e),max:Gp(t,n)}}function Gp(t,e){return typeof t=="number"?t:t[e]||0}const Kp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Br=()=>({x:Kp(),y:Kp()}),Zp=()=>({min:0,max:0}),qe=()=>({x:Zp(),y:Zp()});function Nt(t){return[t("x"),t("y")]}function qp({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function t1({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function n1(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function oc(t){return t===void 0||t===1}function ic({scale:t,scaleX:e,scaleY:n}){return!oc(t)||!oc(e)||!oc(n)}function sr(t){return ic(t)||Yp(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Yp(t){return Xp(t.x)||Xp(t.y)}function Xp(t){return t&&t!=="0%"}function ds(t,e,n){const r=t-n,o=e*r;return n+o}function Jp(t,e,n,r,o){return o!==void 0&&(t=ds(t,o,r)),ds(t,n,r)+e}function sc(t,e=0,n=1,r,o){t.min=Jp(t.min,e,n,r,o),t.max=Jp(t.max,e,n,r,o)}function Qp(t,{x:e,y:n}){sc(t.x,e.translate,e.scale,e.originPoint),sc(t.y,n.translate,n.scale,n.originPoint)}function r1(t,e,n,r=!1){const o=n.length;if(!o)return;e.x=e.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const l=i.instance;l&&l.style&&l.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&zr(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Qp(t,s)),r&&sr(i.latestValues)&&zr(t,i.latestValues))}e.x=em(e.x),e.y=em(e.y)}function em(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Nn(t,e){t.min=t.min+e,t.max=t.max+e}function tm(t,e,[n,r,o]){const i=e[o]!==void 0?e[o]:.5,s=Be(t.min,t.max,i);sc(t,e[n],e[r],s,e.scale)}const o1=["x","scaleX","originX"],i1=["y","scaleY","originY"];function zr(t,e){tm(t.x,e,o1),tm(t.y,e,i1)}function nm(t,e){return qp(n1(t.getBoundingClientRect(),e))}function s1(t,e,n){const r=nm(t,n),{scroll:o}=e;return o&&(Nn(r.x,o.offset.x),Nn(r.y,o.offset.y)),r}const rm=({current:t})=>t?t.ownerDocument.defaultView:null,a1=new WeakMap;class l1{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=qe(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(os(u,"page").point)},i=(u,f)=>{const{drag:d,dragPropagation:h,onDragStart:p}=this.getProps();if(d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Rh(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Nt(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Yt.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const g=b.layout.layoutBox[y];g&&(v=Mt(g)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&_e.postRender(()=>p(u,f));const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},s=(u,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:y}=f;if(h&&this.currentDirection===null){this.currentDirection=c1(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Nt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Np(e,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:rm(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&_e.postRender(()=>i(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:o}=this.getProps();if(!r||!hs(e,o,this.currentDirection))return;const i=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=qE(s,this.constraints[e],this.elastic[e])),i.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,i=this.constraints;n&&Rr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=YE(o.layoutBox,n):this.constraints=!1,this.elastic=e1(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Nt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=QE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Rr(e))return!1;const r=e.current;Ht(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=s1(r,o.root,this.visualElement.getTransformPagePoint());let s=XE(o.layout.layoutBox,i);if(n){const a=n(t1(s));this.hasMutatedConstraints=!!a,a&&(s=qp(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Nt(u=>{if(!hs(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(Zl(e,r,0,n,this.visualElement))}stopAnimation(){Nt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Nt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Nt(n=>{const{drag:r}=this.getProps();if(!hs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(e[n]-Be(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Rr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Nt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=JE({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Nt(s=>{if(!hs(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Be(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;a1.set(this.visualElement,this);const e=this.visualElement.current,n=mn(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Rr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_e.read(r);const s=pn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Nt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=rc,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function hs(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function c1(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class u1 extends Rn{constructor(e){super(e),this.removeGroupControls=lt,this.removeListeners=lt,this.controls=new l1(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const om=t=>(e,n)=>{t&&_e.postRender(()=>t(e,n))};class f1 extends Rn{constructor(){super(...arguments),this.removePointerDownListener=lt}onPointerDown(e){this.session=new Np(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rm(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:om(e),onStart:om(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&_e.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=mn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function d1(){const t=x.useContext(qi);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,o=x.useId();return x.useEffect(()=>r(o),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}const ps={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function im(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ho={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ce.test(t))t=parseFloat(t);else return t;const n=im(t,e.target.x),r=im(t,e.target.y);return`${n}% ${r}%`}},h1={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,o=Ln.parse(t);if(o.length>5)return r;const i=Ln.createTransformer(t),s=typeof o[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;o[0+s]/=a,o[1+s]/=l;const c=Be(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class p1 extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=e;hS(m1),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ps.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?s.promote():s.relegate()||_e.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),dl.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function sm(t){const[e,n]=d1(),r=x.useContext(Io);return E.jsx(p1,{...t,layoutGroup:r,switchLayoutGroup:x.useContext(lh),isPresent:e,safeToRemove:n})}const m1={borderRadius:{...Ho,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ho,borderTopRightRadius:Ho,borderBottomLeftRadius:Ho,borderBottomRightRadius:Ho,boxShadow:h1},am=["TopLeft","TopRight","BottomLeft","BottomRight"],g1=am.length,lm=t=>typeof t=="string"?parseFloat(t):t,cm=t=>typeof t=="number"||ce.test(t);function y1(t,e,n,r,o,i){o?(t.opacity=Be(0,n.opacity!==void 0?n.opacity:1,v1(r)),t.opacityExit=Be(e.opacity!==void 0?e.opacity:1,0,b1(r))):i&&(t.opacity=Be(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<g1;s++){const a=`border${am[s]}Radius`;let l=um(e,a),c=um(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||cm(l)===cm(c)?(t[a]=Math.max(Be(lm(l),lm(c),r),0),(Yt.test(c)||Yt.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=Be(e.rotate||0,n.rotate||0,r))}function um(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const v1=fm(0,.5,yp),b1=fm(.5,.95,lt);function fm(t,e,n){return r=>r<t?0:r>e?1:n(Vo(t,e,r))}function dm(t,e){t.min=e.min,t.max=e.max}function Vt(t,e){dm(t.x,e.x),dm(t.y,e.y)}function hm(t,e,n,r,o){return t-=e,t=ds(t,1/n,r),o!==void 0&&(t=ds(t,1/o,r)),t}function x1(t,e=0,n=1,r=.5,o,i=t,s=t){if(Yt.test(e)&&(e=parseFloat(e),e=Be(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Be(i.min,i.max,r);t===i&&(a-=e),t.min=hm(t.min,e,n,a,o),t.max=hm(t.max,e,n,a,o)}function pm(t,e,[n,r,o],i,s){x1(t,e[n],e[r],e[o],e.scale,i,s)}const w1=["x","scaleX","originX"],S1=["y","scaleY","originY"];function mm(t,e,n,r){pm(t.x,e,w1,n?n.x:void 0,r?r.x:void 0),pm(t.y,e,S1,n?n.y:void 0,r?r.y:void 0)}function gm(t){return t.translate===0&&t.scale===1}function ym(t){return gm(t.x)&&gm(t.y)}function T1(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function vm(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function bm(t){return Mt(t.x)/Mt(t.y)}class E1{constructor(){this.members=[]}add(e){ql(this.members,e),e.scheduleRender()}remove(e){if(Yl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function xm(t,e,n){let r="";const o=t.x.translate/e.x,i=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const C1=(t,e)=>t.depth-e.depth;class A1{constructor(){this.children=[],this.isDirty=!1}add(e){ql(this.children,e),this.isDirty=!0}remove(e){Yl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(C1),this.isDirty=!1,this.children.forEach(e)}}function _1(t,e){const n=Fn.now(),r=({timestamp:o})=>{const i=o-n;i>=e&&(Xt(r),t(i-e))};return _e.read(r,!0),()=>Xt(r)}function P1(t){window.MotionDebug&&window.MotionDebug.record(t)}function O1(t){return t instanceof SVGElement&&t.tagName!=="svg"}function I1(t,e,n){const r=ct(t)?t:jr(t);return r.start(Zl("",r,e,n)),r.animation}const ac=["","X","Y","Z"],k1={visibility:"hidden"},wm=1e3;let D1=0;const ar={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function lc(t,e,n,r){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Sm(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?Mp(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?Sm(t.parent):!1:!1}function Tm({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=e==null?void 0:e()){this.id=D1++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ar.totalNodes=ar.resolvedTargetDeltas=ar.recalculatedProjection=0,this.nodes.forEach(F1),this.nodes.forEach(j1),this.nodes.forEach(B1),this.nodes.forEach(L1),P1(ar)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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 A1)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Xl),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=O1(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let f;const d=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=_1(d,250),ps.hasAnimatedSinceResize&&(ps.hasAnimatedSinceResize=!1,this.nodes.forEach(Cm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||G1,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!vm(this.targetLayout,p)||h,g=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const S={...Ol(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else d||Cm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xt(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(z1),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Sm(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Em);return}this.isUpdating||this.nodes.forEach(V1),this.isUpdating=!1,this.nodes.forEach($1),this.nodes.forEach(M1),this.nodes.forEach(R1),this.clearAllSnapshots();const a=Fn.now();ut.delta=Dn(0,1e3/60,a-ut.timestamp),ut.timestamp=a,ut.isProcessing=!0,Cl.update.process(ut),Cl.preRender.process(ut),Cl.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,dl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(N1),this.sharedNodes.forEach(H1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_e.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_e.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=qe(),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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ym(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||sr(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),K1(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return qe();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(Nn(a.x,l.offset.x),Nn(a.y,l.offset.y)),a}removeElementScroll(s){const a=qe();Vt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){Vt(a,s);const{scroll:d}=this.root;d&&(Nn(a.x,-d.offset.x),Nn(a.y,-d.offset.y))}Nn(a.x,u.offset.x),Nn(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=qe();Vt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&zr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),sr(u.latestValues)&&zr(l,u.latestValues)}return sr(this.latestValues)&&zr(l,this.latestValues),l}removeTransform(s){const a=qe();Vt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!sr(c.latestValues))continue;ic(c.latestValues)&&c.updateSnapshot();const u=qe(),f=c.measurePageBox();Vt(u,f),mm(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return sr(this.latestValues)&&mm(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=ut.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qe(),this.relativeTargetOrigin=qe(),zo(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=qe(),this.targetWithTransforms=qe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ZE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vt(this.target,this.layout.layoutBox),Qp(this.target,this.targetDelta)):Vt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=qe(),this.relativeTargetOrigin=qe(),zo(this.relativeTargetOrigin,this.target,h.target),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ar.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ic(this.parent.latestValues)||Yp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ut.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;Vt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;r1(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=qe());const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=Br(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Br(),this.projectionDeltaWithTransform=Br());const m=this.projectionTransform;Bo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=xm(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==d||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),ar.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Br();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=qe(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,y=this.getStack(),v=!y||y.members.length<=1,b=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(U1));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const w=S/1e3;Am(f.x,s.x,w),Am(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zo(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),W1(this.relativeTarget,this.relativeTargetOrigin,d,w),g&&T1(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=qe()),Vt(g,this.relativeTarget)),m&&(this.animationValues=u,y1(u,c,this.latestValues,w,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_e.update(()=>{ps.hasAnimatedSinceResize=!0,this.currentAnimation=I1(0,wm,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&km(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||qe();const f=Mt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=Mt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}Vt(a,l),zr(a,u),Bo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new E1),this.sharedNodes.get(s).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 s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&lc("z",s,c,this.animationValues);for(let u=0;u<ac.length;u++)lc(`rotate${ac[u]}`,s,c,this.animationValues),lc(`skew${ac[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return k1;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=rs(s==null?void 0:s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=rs(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!sr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=xm(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in es){if(d[m]===void 0)continue;const{correct:y,applyTo:v}=es[m],b=c.transform==="none"?d[m]:y(d[m],f);if(v){const g=v.length;for(let S=0;S<g;S++)c[v[S]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=f===this?rs(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Em),this.root.sharedNodes.clear()}}}function M1(t){t.updateLayout()}function R1(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=t.layout,{animationType:i}=t.options,s=n.source!==t.layout.source;i==="size"?Nt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=Mt(d);d.min=r[f].min,d.max=d.min+h}):km(i,n.layoutBox,r)&&Nt(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=Mt(r[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=Br();Bo(a,r,n.layoutBox);const l=Br();s?Bo(l,t.applyTransform(o,!0),n.measuredBox):Bo(l,r,n.layoutBox);const c=!ym(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=qe();zo(p,n.layoutBox,d.layoutBox);const m=qe();zo(m,r,h.layoutBox),vm(p,m)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function F1(t){ar.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function L1(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function N1(t){t.clearSnapshot()}function Em(t){t.clearMeasurements()}function V1(t){t.isLayoutDirty=!1}function $1(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Cm(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function j1(t){t.resolveTargetDelta()}function B1(t){t.calcProjection()}function z1(t){t.resetSkewAndRotation()}function H1(t){t.removeLeadSnapshot()}function Am(t,e,n){t.translate=Be(e.translate,0,n),t.scale=Be(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _m(t,e,n,r){t.min=Be(e.min,n.min,r),t.max=Be(e.max,n.max,r)}function W1(t,e,n,r){_m(t.x,e.x,n.x,r),_m(t.y,e.y,n.y,r)}function U1(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const G1={duration:.45,ease:[.4,0,.1,1]},Pm=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Om=Pm("applewebkit/")&&!Pm("chrome/")?Math.round:lt;function Im(t){t.min=Om(t.min),t.max=Om(t.max)}function K1(t){Im(t.x),Im(t.y)}function km(t,e,n){return t==="position"||t==="preserve-aspect"&&!nc(bm(e),bm(n),.2)}const Z1=Tm({attachResizeListener:(t,e)=>pn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cc={current:void 0},Dm=Tm({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!cc.current){const t=new Z1({});t.mount(window),t.setOptions({layoutScroll:!0}),cc.current=t}return cc.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),q1={pan:{Feature:f1},drag:{Feature:u1,ProjectionNode:Dm,MeasureLayout:sm}},uc={current:null},Mm={current:!1};function Y1(){if(Mm.current=!0,!!ul)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>uc.current=t.matches;t.addListener(e),e()}else uc.current=!1}function X1(t,e,n){const{willChange:r}=e;for(const o in e){const i=e[o],s=n[o];if(ct(i))t.addValue(o,i),fs(r)&&r.add(o),process.env.NODE_ENV==="development"&&Jl(i.version==="11.2.13",`Attempting to mix Framer Motion versions ${i.version} with 11.2.13 may not work as expected.`);else if(ct(s))t.addValue(o,jr(i,{owner:t})),fs(r)&&r.remove(o);else if(s!==i)if(t.hasValue(o)){const a=t.getValue(o);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=t.getStaticValue(o);t.addValue(o,jr(a!==void 0?a:i,{owner:t}))}}for(const o in n)e[o]===void 0&&t.removeValue(o);return e}const Rm=new WeakMap,J1=[...Gh,pt,Ln],Q1=t=>J1.find(Uh(t)),Fm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],eC=pl.length;class tC{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.resolveKeyframes=(d,h,p,m)=>new this.KeyframeResolver(d,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Dl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>_e.render(this.render,!1,!0);const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Qi(n),this.isVariantNode=fh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&ct(h)&&(h.set(l[d],!1),fs(u)&&u.add(d))}}mount(e){this.current=e,Rm.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Mm.current||Y1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:uc.current,process.env.NODE_ENV!=="production"&&Jl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Rm.delete(this.current),this.projection&&this.projection.unmount(),Xt(this.notifyUpdate),Xt(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const r=tr.has(e),o=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&_e.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Fr){const n=Fr[e];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[e]&&o&&r(this.props)&&(this.features[e]=new o(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):qe()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Fm.length;r++){const o=Fm[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=e[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=X1(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<eC;r++){const o=pl[r],i=this.props[o];(Oo(i)||i===!1)&&(n[o]=i)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=jr(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(jh(o)||$h(o))?o=parseFloat(o):!Q1(o)&&Ln.test(n)&&(o=np(e,n)),this.setBaseTarget(e,ct(o)?o.get():o)),ct(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=Tl(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[e])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ct(i)?i:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Xl),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Lm extends tC{constructor(){super(...arguments),this.KeyframeResolver=rp}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}}function nC(t){return window.getComputedStyle(t)}class rC extends Lm{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(tr.has(n)){const r=Nl(n);return r&&r.default||0}else{const r=nC(e),o=(gh(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return nm(e,n)}build(e,n,r,o){vl(e,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Sl(e,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ct(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,o){Eh(e,n,r,o)}}class oC extends Lm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(tr.has(n)){const r=Nl(n);return r&&r.default||0}return n=Ch.has(n)?n:fl(n),e.getAttribute(n)}measureInstanceViewportBox(){return qe()}scrapeMotionValuesFromProps(e,n,r){return _h(e,n,r)}build(e,n,r,o){xl(e,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(e,n,r,o){Ah(e,n,r,o)}mount(e){this.isSVGTag=wl(e.tagName),super.mount(e)}}const iC=(t,e)=>ml(t)?new oC(e,{enableHardwareAcceleration:!1}):new rC(e,{allowProjection:t!==x.Fragment,enableHardwareAcceleration:!0}),sC={...WE,...nT,...q1,...{layout:{ProjectionNode:Dm,MeasureLayout:sm}}},fc=fS((t,e)=>HS(t,e,sC,iC));function Nm(){const t=x.useRef(!1);return Yi(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Vm(){const t=Nm(),[e,n]=x.useState(0),r=x.useCallback(()=>{t.current&&n(e+1)},[e]);return[x.useCallback(()=>_e.postRender(r),[r]),e]}class aC extends R.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function lC({children:t,isPresent:e}){const n=x.useId(),r=x.useRef(null),o=x.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=x.useContext(Ki);return x.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(e||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
108
108
|
[data-motion-pop-id="${n}"] {
|
|
109
109
|
position: absolute !important;
|
|
110
110
|
width: ${s}px !important;
|