PageSourceSearch

https://turboswap.org/_next/static/chunks/02n7818a-ckvy.js?dpl=dpl_ANS2SjGTC5b3szdpsn1F9CMr3dYg

js turboswap.org collected 2026-10-07 18:47:14 UTC 179,267 bytes, 11 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,649072,e=>{e.v({header:"Header-module__rP_oDa__header"})},864232,e=>{"use strict";let t,i,s;var r,n,a,o,l,h,u,c,d,m=e.i(843476),p=e.i(657688),f=e.i(271645),g=e.i(261567);function x(){return(x=Object.assign.bind()).apply(null,arguments)}let y=function(e){return f.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:86,height:20,fill:"none"},e),o||(o=f.createElement("path",{fill:"currentColor",d:"M4.805 2v7.12H3v1.76h1.805V18h4.607C14.662 18 17 15.218 17 10c0-4.238-2.201-8-7.588-8zm9.406 8c0 3.276-1.586 5.023-4.389 5.023H7.703v-4.144h3.117V9.121H7.703V4.978H9.67c2.874 0 4.54 2.362 4.54 5.022M26.415 15h-3.296V4.818h3.4q1.497 0 2.57.612a4.03 4.03 0 0 1 1.646 1.745q.577 1.133.577 2.72 0 1.59-.582 2.734a4.1 4.1 0 0 1-1.67 1.76q-1.095.61-2.645.611m-1.76-1.342h1.675q1.163 0 1.934-.438.77-.442 1.154-1.277.382-.84.382-2.049 0-1.198-.382-2.033a2.7 2.7 0 0 0-1.129-1.268q-.75-.432-1.864-.432h-1.77zm11.664 1.496q-1.074 0-1.874-.492a3.3 3.3 0 0 1-1.243-1.377q-.442-.886-.442-2.068 0-1.189.442-2.079a3.3 3.3 0 0 1 1.243-1.382q.8-.492 1.874-.492t1.875.492q.8.494 1.243 1.382.442.891.442 2.079 0 1.183-.442 2.068a3.3 3.3 0 0 1-1.243 1.377q-.801.492-1.875.492m.005-1.248q.696 0 1.154-.368.457-.367.676-.98.224-.61.224-1.346 0-.732-.224-1.343a2.2 2.2 0 0 0-.676-.989q-.458-.373-1.154-.373-.7 0-1.163.373a2.2 2.2 0 0 0-.681.99 4 4 0 0 0-.219 1.342q0 .736.219 1.347.224.611.681.98.462.367 1.163.367m8.416 4.117q-.91 0-1.566-.239-.651-.239-1.064-.631a2.65 2.65 0 0 1-.616-.86l1.277-.527q.136.219.358.462.229.249.617.423.393.174 1.009.174.846 0 1.397-.413.552-.408.552-1.303v-1.501h-.095q-.134.243-.387.542a2.1 2.1 0 0 1-.687.517q-.436.219-1.138.219-.905 0-1.63-.423-.721-.427-1.144-1.258-.418-.835-.418-2.053t.413-2.088q.418-.87 1.143-1.332a2.97 2.97 0 0 1 1.646-.468q.711 0 1.148.239.439.234.681.547.25.313.383.552h.11V7.364h1.456v7.805q0 .984-.457 1.616-.458.63-1.238.934-.775.304-1.75.304m-.015-4.37q.642 0 1.084-.299.448-.303.676-.865.234-.567.234-1.357 0-.77-.229-1.357a2 2 0 0 0-.671-.915q-.443-.333-1.094-.333-.67 0-1.119.348-.447.343-.676.935-.223.591-.223 1.322 0 .75.228 1.318.23.566.676.885.453.318 1.114.318m8.745 1.501q-1.128 0-1.944-.482a3.27 3.27 0 0 1-1.253-1.367q-.437-.885-.437-2.073 0-1.174.437-2.069a3.4 3.4 0 0 1 1.233-1.397q.795-.502 1.86-.502.645 0 1.253.214.606.214 1.088.671t.761 1.188q.278.727.278 1.765v.527h-6.07v-1.113h4.614q0-.587-.239-1.04a1.8 1.8 0 0 0-.671-.72 1.9 1.9 0 0 0-1.004-.264 1.94 1.94 0 0 0-1.094.308 2.07 2.07 0 0 0-.716.796 2.3 2.3 0 0 0-.248 1.059v.87q0 .765.268 1.302.273.537.76.82.487.28 1.14.28.421 0 .77-.12.348-.125.601-.368.255-.243.388-.602l1.407.254a2.55 2.55 0 0 1-.607 1.089 2.94 2.94 0 0 1-1.088.72q-.651.255-1.487.254m8.142 0q-1.108 0-1.909-.502a3.33 3.33 0 0 1-1.223-1.397q-.427-.89-.427-2.038 0-1.163.437-2.054a3.35 3.35 0 0 1 1.233-1.397q.795-.502 1.874-.502.87 0 1.552.323.681.318 1.098.895.424.577.502 1.348h-1.446a1.73 1.73 0 0 0-.547-.925q-.423-.388-1.134-.388-.621 0-1.088.328-.463.324-.721.925-.26.597-.259 1.412 0 .835.254 1.442.253.606.716.94.466.332 1.098.332.423 0 .766-.154.348-.16.582-.452.239-.294.333-.706h1.447a2.8 2.8 0 0 1-.483 1.322 2.8 2.8 0 0 1-1.079.915q-.67.333-1.576.333m7.944 0q-1.073 0-1.874-.492a3.3 3.3 0 0 1-1.243-1.377q-.443-.886-.443-2.068 0-1.189.443-2.079a3.3 3.3 0 0 1 1.243-1.382q.8-.492 1.874-.492 1.073 0 1.874.492.8.494 1.243 1.382.442.891.442 2.079 0 1.183-.442 2.068a3.3 3.3 0 0 1-1.243 1.377q-.8.492-1.874.492m.005-1.248q.696 0 1.153-.368.457-.367.676-.98.225-.61.224-1.346 0-.732-.224-1.343a2.2 2.2 0 0 0-.676-.989q-.458-.373-1.153-.373-.701 0-1.164.373a2.2 2.2 0 0 0-.68.99 4 4 0 0 0-.22 1.342q0 .736.22 1.347.222.611.68.98.463.367 1.164.367M74.775 15V7.364h1.486V15zm.75-8.815a.95.95 0 0 1-.666-.258.84.84 0 0 1-.273-.627.83.83 0 0 1 .273-.626.94.94 0 0 1 .666-.263q.389 0 .662.263a.82.82 0 0 1 .278.626q0 .363-.278.627a.93.93 0 0 1-.662.258m4.222 4.28V15h-1.486V7.364h1.427v1.243h.094q.264-.607.826-.975.566-.368 1.426-.368.78 0 1.368.328.585.324.91.965.323.64.323 1.586V15h-1.487v-4.678q0-.83-.432-1.298-.433-.472-1.189-.472-.516 0-.92.224-.397.223-.63.656-.23.428-.23 1.034"})))};var v=e.i(789156);function w(){return(w=Object.assign.bind()).apply(null,arguments)}let b=function(e){return f.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:68,height:20,fill:"none"},e),l||(l=f.createElement("g",{fill:"currentColor",clipPath:"url(#solana_svg__a)"},f.createElement("path",{d:"M4.261 13.685a.54.54 0 0 1 .394-.17h13.567c.248 0 .372.314.197.498l-2.68 2.816a.54.54 0 0 1-.394.171H1.778c-.248 0-.372-.314-.197-.499zM4.262 3.17A.56.56 0 0 1 4.655 3h13.567c.248 0 .372.314.197.499l-2.68 2.816a.54.54 0 0 1-.394.17H1.778c-.248 0-.372-.314-.197-.498zM15.739 8.394a.54.54 0 0 0-.394-.17H1.778c-.248 0-.372.314-.197.498l2.68 2.816c.103.108.244.171.394.171h13.567c.248 0 .372-.314.197-.499z"}))),h||(h=f.createElement("path",{fill:"currentColor",d:"M28.672 7.493a1.45 1.45 0 0 0-.656-1.094q-.578-.393-1.452-.393-.627 0-1.084.2-.458.193-.71.536a1.27 1.27 0 0 0-.25.77q0 .365.17.627.173.264.452.443.283.174.607.293.323.115.621.189l.994.258q.487.12 1 .324.511.203.95.536.436.334.705.826.274.491.274 1.178 0 .866-.448 1.536-.443.671-1.287 1.06-.84.387-2.034.387-1.143 0-1.979-.363-.834-.363-1.307-1.029-.473-.671-.522-1.59h1.541q.045.551.358.919.318.362.81.542.498.174 1.09.174.65 0 1.158-.204.512-.21.805-.577.293-.372.293-.87 0-.452-.258-.74a1.9 1.9 0 0 0-.691-.478 7 7 0 0 0-.98-.333l-1.203-.328q-1.222-.333-1.939-.98-.71-.645-.71-1.71 0-.879.477-1.536.477-.656 1.292-1.02.816-.367 1.84-.367 1.034 0 1.824.363.795.363 1.253 1 .457.63.477 1.45zm6.554 7.661q-1.074 0-1.875-.492a3.3 3.3 0 0 1-1.242-1.377q-.444-.886-.443-2.068 0-1.189.442-2.079a3.3 3.3 0 0 1 1.243-1.382q.801-.492 1.875-.492t1.874.492q.8.494 1.243 1.382.442.891.442 2.079 0 1.183-.442 2.068a3.3 3.3 0 0 1-1.243 1.377q-.8.492-1.874.492m.005-1.248q.696 0 1.153-.368.457-.367.676-.98.224-.61.224-1.346 0-.732-.224-1.343a2.2 2.2 0 0 0-.676-.989q-.458-.373-1.153-.373-.701 0-1.164.373a2.2 2.2 0 0 0-.68.99 4 4 0 0 0-.22 1.342q0 .736.22 1.347.222.611.68.98.463.367 1.164.367m6.7-9.088V15h-1.486V4.818zm4.222 10.351a3.1 3.1 0 0 1-1.312-.268 2.2 2.2 0 0 1-.93-.79q-.338-.518-.338-1.269 0-.645.249-1.064.248-.417.67-.66.423-.245.945-.369a9 9 0 0 1 1.064-.189l1.114-.129q.427-.054.621-.174.195-.12.194-.388v-.034q0-.652-.368-1.01-.363-.357-1.084-.358-.75 0-1.183.333-.427.33-.591.731l-1.397-.318q.248-.695.725-1.124a2.94 2.94 0 0 1 1.11-.626 4.3 4.3 0 0 1 1.317-.199q.457 0 .97.11.516.104.964.387.452.285.74.81.29.523.289 1.358V15H48.47v-1.044h-.06q-.144.288-.432.567t-.741.462-1.084.184m.323-1.193q.617 0 1.054-.244.443-.243.672-.636a1.65 1.65 0 0 0 .233-.85v-.985q-.08.08-.308.15a5 5 0 0 1-.512.114q-.288.045-.562.084l-.457.06a3.7 3.7 0 0 0-.79.184q-.354.129-.567.373-.21.239-.21.636 0 .552.408.835.408.279 1.04.279m6.912-3.51V15h-1.486V7.364h1.426v1.243h.095q.263-.607.825-.975.567-.368 1.427-.368.78 0 1.367.328.587.324.91.965.323.64.323 1.586V15H56.79v-4.678q0-.83-.433-1.298-.432-.472-1.188-.472-.517 0-.92.224a1.6 1.6 0 0 0-.631.656q-.23.428-.229 1.034m9.103 4.703a3.1 3.1 0 0 1-1.312-.268 2.2 2.2 0 0 1-.93-.79q-.338-.518-.338-1.269 0-.645.248-1.064.249-.417.672-.66.422-.245.944-.369a9 9 0 0 1 1.064-.189l1.114-.129q.428-.054.621-.174.194-.12.194-.388v-.034q0-.652-.368-1.01-.363-.357-1.084-.358-.75 0-1.183.333-.427.33-.592.731l-1.396-.318q.248-.695.725-1.124a2.94 2.94 0 0 1 1.109-.626 4.3 4.3 0 0 1 1.318-.199q.457 0 .969.11.517.104.965.387.452.285.74.81.288.523.289 1.358V15h-1.452v-1.044h-.06q-.144.288-.432.567t-.741.462-1.084.184m.323-1.193q.617 0 1.054-.244.443-.243.671-.636a1.65 1.65 0 0 0 .234-.85v-.985q-.08.08-.308.15-.225.064-.512.114-.29.045-.562.084l-.457.06a3.7 3.7 0 0 0-.79.184q-.354.129-.568.373-.209.239-.209.636 0 .552.408.835.407.279 1.04.279"})),u||(u=f.createElement("defs",null,f.createElement("clipPath",{id:"solana_svg__a"},f.createElement("path",{fill:"currentColor",d:"M1.5 3h17v14h-17z"})))))},j=()=>{let{whitelabelTemplate:e}=(0,f.useContext)(g.FeatureFlagsContext);return"solswap"===e?(0,m.jsx)("footer",{className:"w-full flex justify-center items-center py-7",children:(0,m.jsxs)("div",{className:"flex justify-center items-center text-sm font-medium text-white gap-1.5 bg-black/25 px-3 py-1.5 rounded-full",children:[(0,m.jsx)("span",{children:"Built by"}),(0,m.jsx)(v.default,{}),(0,m.jsx)("span",{children:"with love for"}),(0,m.jsx)(b,{})]})}):"turboswap"===e?(0,m.jsx)("footer",{className:"lg:hidden",children:(0,m.jsx)(p.default,{src:"/static/templates/turboswap/coin-frog.png",alt:"",width:400,height:400,className:"w-full max-w-[400px] mx-auto",priority:!0})}):"trumpswap"===e?(0,m.jsx)("footer",{className:"lg:hidden",children:(0,m.jsx)(p.default,{src:"/static/templates/trumpswap/trump-standing.png",alt:"",width:400,height:400,className:"w-full max-w-[400px] mx-auto",priority:!0})}):"dogecoinswap"===e?(0,m.jsxs)("footer",{className:"py-7",children:[(0,m.jsx)("div",{className:" flex justify-center items-center",children:(0,m.jsxs)("div",{className:"flex justify-center items-center gap-1.5 text-sm font-medium bg-white dark:bg-black px-3 py-1.5 rounded-full",children:[(0,m.jsx)("span",{className:"text-secondary",children:"Built by"}),(0,m.jsx)(v.default,{className:"text-black dark:text-white"}),(0,m.jsx)("span",{className:"text-secondary",children:"with love for"}),(0,m.jsx)(y,{className:"text-black dark:text-white"})]})}
1),(0,m.jsx)(p.default,{src:"/static/templates/dogecoinswap/doge-bottom.png",alt:"",loading:"lazy",width:750,height:528,className:"object-contain md:hidden"})]}):"omniswap"===e?(0,m.jsx)("footer",{className:"w-full flex justify-center sm:justify-start items-center p-7",children:(0,m.jsxs)("div",{className:"flex justify-center items-center gap-1.5 text-sm font-medium bg-[#1a1a1a] border border-[#2a2a2a] px-3 py-1.5 rounded-full",children:[(0,m.jsx)("span",{className:"text-neutral-400",children:"Powered by"}),(0,m.jsx)(v.default,{className:"text-white"})]})}):(0,m.jsx)("footer",{className:"w-full flex justify-center items-center py-7",children:(0,m.jsxs)("div",{className:"flex justify-center items-center gap-1.5 text-sm font-medium bg-white dark:bg-black px-3 py-1.5 rounded-full",children:[(0,m.jsx)("span",{className:"text-secondary",children:"Powered by"}),(0,m.jsx)(v.default,{className:"text-black dark:text-white"})]})})};var T=e.i(639827),A=e.i(383024),k=e.i(572226),S=e.i(308486),P=e.i(205951),C=e.i(339045),E=e.i(723451),N=e.i(38725),M=e.i(870326);e.i(247167);let V=(0,f.createContext)({});function R(e){let t=(0,f.useRef)(null);return null===t.current&&(t.current=e()),t.current}let D=(0,f.createContext)(null);var F=f;let L=(0,f.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class I extends F.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function B({children:e,isPresent:t}){let i=(0,F.useId)(),s=(0,F.useRef)(null),r=(0,F.useRef)({width:0,height:0,top:0,left:0}),{nonce:n}=(0,F.useContext)(L);return(0,F.useInsertionEffect)(()=>{let{width:e,height:a,top:o,left:l}=r.current;if(t||!s.current||!e||!a)return;s.current.dataset.motionPopId=i;let h=document.createElement("style");return n&&(h.nonce=n),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
2          [data-motion-pop-id="${i}"] {
3            position: absolute !important;
4            width: ${e}px !important;
5            height: ${a}px !important;
6            top: ${o}px !important;
7            left: ${l}px !important;
8          }
9        `),()=>{document.head.removeChild(h)}},[t]),(0,m.jsx)(I,{isPresent:t,childRef:s,sizeRef:r,children:F.cloneElement(e,{ref:s})})}let H=({children:e,initial:t,isPresent:i,onExitComplete:s,custom:r,presenceAffectsLayout:n,mode:a})=>{let o=R(O),l=(0,f.useId)(),h=(0,f.useCallback)(e=>{for(let t of(o.set(e,!0),o.values()))if(!t)return;s&&s()},[o,s]),u=(0,f.useMemo)(()=>({id:l,initial:t,isPresent:i,custom:r,onExitComplete:h,register:e=>(o.set(e,!1),()=>o.delete(e))}),n?[Math.random(),h]:[i,h]);return(0,f.useMemo)(()=>{o.forEach((e,t)=>o.set(t,!1))},[i]),f.useEffect(()=>{i||o.size||!s||s()},[i]),"popLayout"===a&&(e=(0,m.jsx)(B,{isPresent:i,children:e})),(0,m.jsx)(D.Provider,{value:u,children:e})};function O(){return new Map}function z(e=!0){let t=(0,f.useContext)(D);if(null===t)return[!0,null];let{isPresent:i,onExitComplete:s,register:r}=t,n=(0,f.useId)();(0,f.useEffect)(()=>{e&&r(n)},[e]);let a=(0,f.useCallback)(()=>e&&s&&s(n),[n,s,e]);return!i&&s?[!1,a]:[!0]}let q=e=>e.key||"";function U(e){let t=[];return f.Children.forEach(e,e=>{(0,f.isValidElement)(e)&&t.push(e)}),t}let _="u">typeof window,$=_?f.useLayoutEffect:f.useEffect,W=({children:e,custom:t,initial:i=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:n="sync",propagate:a=!1})=>{let[o,l]=z(a),h=(0,f.useMemo)(()=>U(e),[e]),u=a&&!o?[]:h.map(q),c=(0,f.useRef)(!0),d=(0,f.useRef)(h),p=R(()=>new Map),[g,x]=(0,f.useState)(h),[y,v]=(0,f.useState)(h);$(()=>{c.current=!1,d.current=h;for(let e=0;e<y.length;e++){let t=q(y[e]);u.includes(t)?p.delete(t):!0!==p.get(t)&&p.set(t,!1)}},[y,u.length,u.join("-")]);let w=[];if(h!==g){let e=[...h];for(let t=0;t<y.length;t++){let i=y[t],s=q(i);u.includes(s)||(e.splice(t,0,i),w.push(i))}"wait"===n&&w.length&&(e=w),v(U(e)),x(h);return}let{forceRender:b}=(0,f.useContext)(V);return(0,m.jsx)(m.Fragment,{children:y.map(e=>{let f=q(e),g=(!a||!!o)&&(h===y||u.includes(f));return(0,m.jsx)(H,{isPresent:g,initial:(!c.current||!!i)&&void 0,custom:g?void 0:t,presenceAffectsLayout:r,mode:n,onExitComplete:g?void 0:()=>
9{if(!p.has(f))return;p.set(f,!0);let e=!0;p.forEach(t=>{t||(e=!1)}),e&&(null==b||b(),v(d.current),a&&(null==l||l()),s&&s())},children:e},f)})})};function Z(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}let Y=e=>Array.isArray(e);function K(e,t){if(!Array.isArray(t))return!1;let i=t.length;if(i!==e.length)return!1;for(let s=0;s<i;s++)if(t[s]!==e[s])return!1;return!0}function G(e){return"string"==typeof e||Array.isArray(e)}function X(e){let t=[{},{}];return null==e||e.values.forEach((e,i)=>{t[0][i]=e.get(),t[1][i]=e.getVelocity()}),t}function J(e,t,i,s){if("function"==typeof t){let[r,n]=X(s);t=t(void 0!==i?i:e.custom,r,n)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[r,n]=X(s);t=t(void 0!==i?i:e.custom,r,n)}return t}function Q(e,t,i){let s=e.getProps();return J(s,t,void 0!==i?i:s.custom,e)}let ee=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],et=["initial",...ee],ei=e=>e;function es(e){let t;return()=>(void 0===t&&(t=e()),t)}let er=es(()=>void 0!==window.ScrollTimeline);class en{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=t}attachTimeline(e,t){let i=this.animations.map(i=>er()&&i.attachTimeline?i.attachTimeline(e):"function"==typeof t?t(i):void 0);return()=>{i.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ea extends en{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}let eo=e=>1e3*e;function el(e){let t=0,i=e.next(t);for(;!i.done&&t<2e4;)t+=50,i=e.next(t);return t>=2e4?1/0:t}function eh(e,t){e.timeline=t,e.onfinish=null}let eu=e=>Array.isArray(e)&&"number"==typeof e[0],ec,ed=(i=es(()=>{try{document.createElement("div").animate({opacity:0}
9,{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),()=>{var e;return null!=(e=ec)?e:i()}),em=(e,t,i)=>{let s=t-e;return 0===s?1:(i-e)/s},ep=(e,t,i=10)=>{let s="",r=Math.max(Math.round(t/i),2);for(let t=0;t<r;t++)s+=e(em(0,r-1,t))+", ";return`linear(${s.substring(0,s.length-2)})`},ef=([e,t,i,s])=>`cubic-bezier(${e}, ${t}, ${i}, ${s})`,eg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ef([0,.65,.55,1]),circOut:ef([.55,0,1,.45]),backIn:ef([.31,.01,.66,-.59]),backOut:ef([.33,1.53,.69,.99])};function ex(e,t){return e?e[t]||e.default||e:void 0}function ey(e){return"function"==typeof e}let ev=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ew=new Set(ev),eb=new Set(["width","height","top","left","right","bottom",...ev]),ej=e=>Y(e)?e[e.length-1]||0:e,eT=["read","resolveKeyframes","update","preRender","render","postRender"];function eA(e,t){let i=!1,s=!0,r={delta:0,timestamp:0,isProcessing:!1},n=()=>i=!0,a=eT.reduce((e,t)=>(e[t]=function(e){let t=new Set,i=new Set,s=!1,r=!1,n=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1};function o(t){n.has(t)&&(l.schedule(t),e()),t(a)}let l={schedule:(e,r=!1,a=!1)=>{let o=a&&s?t:i;return r&&n.add(e),o.has(e)||o.add(e),e},cancel:e=>{i.delete(e),n.delete(e)},process:e=>{if(a=e,s){r=!0;return}s=!0,[t,i]=[i,t],t.forEach(o),t.clear(),s=!1,r&&(r=!1,l.process(e))}};return l}(n),e),{}),{read:o,resolveKeyframes:l,update:h,preRender:u,render:c,postRender:d}=a,m=()=>{let n=performance.now();i=!1,r.delta=s?1e3/60:Math.max(Math.min(n-r.timestamp,40),1),r.timestamp=n,r.isProcessing=!0,o.process(r),l.process(r),h.process(r),u.process(r),c.process(r),d.process(r),r.isProcessing=!1,i&&t&&(s=!1,e(m))};return{schedule:eT.reduce((t,n)=>{let o=a[n];return t[n]=(t,n=!1,a=!1)=>(!i&&(i=!0,s=!0,r.isProcessing||e(m)),o.schedule(t,n,a)),t},{}),cancel:e=>{for(let t=0;t<eT.length;t++)a[eT[t]].cancel(e)},state:r,steps:a}}let{schedule:ek,cancel:eS,state:eP,steps:eC}=eA("u">typeof requestAnimationFrame?requestAnimationFrame:ei,!0);function eE(){t=void 0}let eN={now:()=>(void 0===t&&eN.set(eP.isProcessing?eP.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(eE)}};function eM(e,t){-1===e.indexOf(t)&&e.push(t)}function eV(e,t){let i=e.indexOf(t);i>-1&&e.splice(i,1)}class eR{constructor(){this.subscriptions=[]}add(e){return eM(this.subscriptions,e),()=>eV(this.subscriptions,e)}notify(e,t,i){let s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](e,t,i);else for(let r=0;r<s;r++){let s=this.subscriptions[r];s&&s(e,t,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class eD{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let i=eN.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=eN.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new eR);let i=this.events[e].add(t);return"change"===e?()=>{i(),ek.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,i){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return s&&s.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=eN.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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 eF(e,t){return new eD(e,t)}let eL=e=>!!(e&&e.getVelocity);function eI(e,t){let i=e.getValue("willChange");if(eL(i)&&i.add)return i.add(t)}let eB=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),eH="data-"+eB("framerAppearId"),eO=(e,t,i)=>(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e;function ez(e,t,i,s){return e===t&&i===s?ei:r=>0===r||1===r?r:eO(function(e,t,i,s,r){let n,a,o=0;do(n=eO(a=t+(i-t)/2,s,r)-e)>0?i=a:t=a;while(Math.abs(n)>1e-7&&++o<12)return a}(r,0,1,e,i),t,s)}let eq=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,eU=e=>t=>1-e(1-t),e_=ez(.33,1.53,.69,.99),e$=eU(e_),eW=eq(e$),eZ=e=>(e*=2)<1?.5*e$(e):.5*(2-Math.pow(2,-10*(e-1))),eY=e=>1-Math.sin(Math.acos(e)),eK=eU(eY),eG=eq(eY),eX=(e,t,i)=>i>t?t:i<e?e:i,eJ={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},eQ={...eJ,transform:e=>eX(0,1,e)},e0={...eJ,default:1},e1=e=>Math.round(1e5*e)/1e5,e2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,e4=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,e3=(e,t)=>
9i=>!!("string"==typeof i&&e4.test(i)&&i.startsWith(e)||t&&null!=i&&Object.prototype.hasOwnProperty.call(i,t)),e6=(e,t,i)=>s=>{if("string"!=typeof s)return s;let[r,n,a,o]=s.match(e2);return{[e]:parseFloat(r),[t]:parseFloat(n),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},e8={...eJ,transform:e=>Math.round(eX(0,255,e))},e5={test:e3("rgb","red"),parse:e6("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:s=1})=>"rgba("+e8.transform(e)+", "+e8.transform(t)+", "+e8.transform(i)+", "+e1(eQ.transform(s))+")"},e7={test:e3("#"),parse:function(e){let t="",i="",s="",r="";return e.length>5?(t=e.substring(1,3),i=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),i=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,i+=i,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:e5.transform},e9=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),te=e9("deg"),tt=e9("%"),ti=e9("px"),ts=e9("vh"),tr=e9("vw"),tn={...tt,parse:e=>tt.parse(e)/100,transform:e=>tt.transform(100*e)},ta={test:e3("hsl","hue"),parse:e6("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:i,alpha:s=1})=>"hsla("+Math.round(e)+", "+tt.transform(e1(t))+", "+tt.transform(e1(i))+", "+e1(eQ.transform(s))+")"},to={test:e=>e5.test(e)||e7.test(e)||ta.test(e),parse:e=>e5.test(e)?e5.parse(e):ta.test(e)?ta.parse(e):e7.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?e5.transform(e):ta.transform(e)},tl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,th="number",tu="color",tc=/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 td(e){let t=e.toString(),i=[],s={color:[],number:[],var:[]},r=[],n=0,a=t.replace(tc,e=>(to.test(e)?(s.color.push(n),r.push(tu),i.push(to.parse(e))):e.startsWith("var(")?(s.var.push(n),r.push("var"),i.push(e)):(s.number.push(n),r.push(th),i.push(parseFloat(e))),++n,"${}")).split("${}");return{values:i,split:a,indexes:s,types:r}}function tm(e){return td(e).values}function tp(e){let{split:t,types:i}=td(e),s=t.length;return e=>{let r="";for(let n=0;n<s;n++)if(r+=t[n],void 0!==e[n]){let t=i[n];t===th?r+=e1(e[n]):t===tu?r+=to.transform(e[n]):r+=e[n]}return r}}let tf=e=>"number"==typeof e?0:e,tg={test:function(e){var t,i;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(e2))?void 0:t.length)||0)+((null==(i=e.match(tl))?void 0:i.length)||0)>0},parse:tm,createTransformer:tp,getAnimatableNone:function(e){let t=tm(e);return tp(e)(t.map(tf))}},tx=new Set(["brightness","contrast","saturate","opacity"]);function ty(e){let[t,i]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[s]=i.match(e2)||[];if(!s)return e;let r=i.replace(s,""),n=+!!tx.has(t);return s!==i&&(n*=100),t+"("+n+r+")"}let tv=/\b([a-z-]*)\(.*?\)/gu,tw={...tg,getAnimatableNone:e=>{let t=e.match(tv);return t?t.map(ty).join(" "):e}},tb={...eJ,transform:Math.round},tj={borderWidth:ti,borderTopWidth:ti,borderRightWidth:ti,borderBottomWidth:ti,borderLeftWidth:ti,borderRadius:ti,radius:ti,borderTopLeftRadius:ti,borderTopRightRadius:ti,borderBottomRightRadius:ti,borderBottomLeftRadius:ti,width:ti,maxWidth:ti,height:ti,maxHeight:ti,top:ti,right:ti,bottom:ti,left:ti,padding:ti,paddingTop:ti,paddingRight:ti,paddingBottom:ti,paddingLeft:ti,margin:ti,marginTop:ti,marginRight:ti,marginBottom:ti,marginLeft:ti,backgroundPositionX:ti,backgroundPositionY:ti,rotate:te,rotateX:te,rotateY:te,rotateZ:te,scale:e0,scaleX:e0,scaleY:e0,scaleZ:e0,skew:te,skewX:te,skewY:te,distance:ti,translateX:ti,translateY:ti,translateZ:ti,x:ti,y:ti,z:ti,perspective:ti,transformPerspective:ti,opacity:eQ,originX:tn,originY:tn,originZ:ti,zIndex:tb,size:ti,fillOpacity:eQ,strokeOpacity:eQ,numOctaves:tb},tT={...tj,color:to,backgroundColor:to,outlineColor:to,fill:to,stroke:to,borderColor:to,borderTopColor:to,borderRightColor:to,borderBottomColor:to,borderLeftColor:to,filter:tw,WebkitFilter:tw},tA=e=>tT[e];function tk(e,t){let i=tA(e);return i!==tw&&(i=tg),i.getAnimatableNone?i.getAnimatableNone(t):void 0}
9let tS=new Set(["auto","none","0"]),tP=e=>e===eJ||e===ti,tC=(e,t)=>parseFloat(e.split(", ")[t]),tE=(e,t)=>(i,{transform:s})=>{if("none"===s||!s)return 0;let r=s.match(/^matrix3d\((.+)\)$/u);if(r)return tC(r[1],t);{let t=s.match(/^matrix\((.+)\)$/u);return t?tC(t[1],e):0}},tN=new Set(["x","y","z"]),tM=ev.filter(e=>!tN.has(e)),tV={width:({x:e},{paddingLeft:t="0",paddingRight:i="0"})=>e.max-e.min-parseFloat(t)-parseFloat(i),height:({y:e},{paddingTop:t="0",paddingBottom:i="0"})=>e.max-e.min-parseFloat(t)-parseFloat(i),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:tE(4,13),y:tE(5,14)};tV.translateX=tV.x,tV.translateY=tV.y;let tR=new Set,tD=!1,tF=!1;function tL(){if(tF){let e=Array.from(tR).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),i=new Map;t.forEach(e=>{let t,s=(t=[],tM.forEach(i=>{let s=e.getValue(i);void 0!==s&&(t.push([i,s.get()]),s.set(+!!i.startsWith("scale")))}),t);s.length&&(i.set(e,s),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=i.get(e);t&&t.forEach(([t,i])=>{var s;null==(s=e.getValue(t))||s.set(i)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}tF=!1,tD=!1,tR.forEach(e=>e.complete()),tR.clear()}function tI(){tR.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tF=!0)})}class tB{constructor(e,t,i,s,r,n=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=i,this.motionValue=s,this.element=r,this.isAsync=n}scheduleResolve(){this.isScheduled=!0,this.isAsync?(tR.add(this),tD||(tD=!0,ek.read(tI),ek.resolveKeyframes(tL))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:i,motionValue:s}=this;for(let r=0;r<e.length;r++)if(null===e[r])if(0===r){let r=null==s?void 0:s.get(),n=e[e.length-1];if(void 0!==r)e[0]=r;else if(i&&t){let s=i.readValue(t,n);null!=s&&(e[0]=s)}void 0===e[0]&&(e[0]=n),s&&void 0===r&&s.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),tR.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,tR.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let tH=e=>t=>"string"==typeof t&&t.startsWith(e),tO=tH("--"),tz=tH("var(--"),tq=e=>!!tz(e)&&tU.test(e.split("/*")[0].trim()),tU=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,t_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,t$=e=>t=>t.test(e),tW=[eJ,ti,tt,te,tr,ts,{test:e=>"auto"===e,parse:e=>e}],tZ=e=>tW.find(t$(e));class tY extends tB{constructor(e,t,i,s,r){super(e,t,i,s,r,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:i}=this;if(!t||!t.current)return;super.readKeyframes();for(let i=0;i<e.length;i++){let s=e[i];if("string"==typeof s&&tq(s=s.trim())){let r=function e(t,i,s=1){ei(s<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[r,n]=function(e){let t=t_.exec(e);if(!t)return[,];let[,i,s,r]=t;return[`--${null!=i?i:s}`,r]}(t);if(!r)return;let a=window.getComputedStyle(i).getPropertyValue(r);if(a){let e=a.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return tq(n)?e(n,i,s+1):n}(s,t.current);void 0!==r&&(e[i]=r),i===e.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!eb.has(i)||2!==e.length)return;let[s,r]=e,n=tZ(s),a=tZ(r);if(n!==a)if(tP(n)&&tP(a))for(let t=0;t<e.length;t++){let i=e[t];"string"==typeof i&&(e[t]=parseFloat(i))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,i=[];for(let t=0;t<e.length;t++)(function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)})(e[t])&&i.push(t);i.length&&function(e,t,i){let s,r=0;for(;r<e.length&&!s;){let t=e[r];"string"==typeof t&&!tS.has(t)&&td(t).values.length&&(s=e[r]),r++}if(s&&i)for(let r of t)e[r]=tk(i,s)}(e,i,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:i}=this;if(!e||!e.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=tV[i](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let s=t[t.length-1];void 0!==s&&e.getValue(i,s).jump(s,!1)}measureEndState(){var e;let{element:t,name:i,unresolvedKeyframes:s}=this;if(!t||!t.current)return;let r=t.getValue(i);r&&r.jump(this.measuredOrigin,!1);let n=s.length-1,a=s[n];s[n]=tV[i](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEac
9h(([e,i])=>{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}let tK=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(tg.test(e)||"0"===e)&&!e.startsWith("url(")),tG=e=>null!==e;function tX(e,{repeat:t,repeatType:i="loop"},s){let r=e.filter(tG),n=t&&"loop"!==i&&t%2==1?0:r.length-1;return n&&void 0!==s?s:r[n]}class tJ{constructor({autoplay:e=!0,delay:t=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:n="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=eN.now(),this.options={autoplay:e,delay:t,type:i,repeat:s,repeatDelay:r,repeatType:n,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(tI(),tL()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=eN.now(),this.hasAttemptedResolve=!0;let{name:i,type:s,velocity:r,delay:n,onComplete:a,onUpdate:o,isGenerator:l}=this.options;if(!l&&!function(e,t,i,s){let r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;let n=e[e.length-1],a=tK(r,t),o=tK(n,t);return ei(a===o,`You are trying to animate ${t} from "${r}" to "${n}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${n} via the \`style\` property.`),!!a&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let i=0;i<e.length;i++)if(e[i]!==t)return!0}(e)||("spring"===i||ey(i))&&s)}(e,i,s,r))if(n)this.options.duration=0;else{o&&o(tX(e,this.options,t)),a&&a(),this.resolveFinishedPromise();return}let h=this.initPlayback(e,t);!1!==h&&(this._resolved={keyframes:e,finalKeyframe:t,...h},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}let tQ=(e,t,i)=>e+(t-e)*i;function t0(e,t,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?e+(t-e)*6*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function t1(e,t){return i=>i>0?t:e}let t2=(e,t,i)=>{let s=e*e,r=i*(t*t-s)+s;return r<0?0:Math.sqrt(r)},t4=[e7,e5,ta];function t3(e){let t=t4.find(t=>t.test(e));if(ei(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let i=t.parse(e);return t===ta&&(i=function({hue:e,saturation:t,lightness:i,alpha:s}){e/=360,i/=100;let r=0,n=0,a=0;if(t/=100){let s=i<.5?i*(1+t):i+t-i*t,o=2*i-s;r=t0(o,s,e+1/3),n=t0(o,s,e),a=t0(o,s,e-1/3)}else r=n=a=i;return{red:Math.round(255*r),green:Math.round(255*n),blue:Math.round(255*a),alpha:s}}(i)),i}let t6=(e,t)=>{let i=t3(e),s=t3(t);if(!i||!s)return t1(e,t);let r={...i};return e=>(r.red=t2(i.red,s.red,e),r.green=t2(i.green,s.green,e),r.blue=t2(i.blue,s.blue,e),r.alpha=tQ(i.alpha,s.alpha,e),e5.transform(r))},t8=(e,t)=>i=>t(e(i)),t5=(...e)=>e.reduce(t8),t7=new Set(["none","hidden"]);function t9(e,t){return i=>tQ(e,t,i)}function ie(e){return"number"==typeof e?t9:"string"==typeof e?tq(e)?t1:to.test(e)?t6:is:Array.isArray(e)?it:"object"==typeof e?to.test(e)?t6:ii:t1}function it(e,t){let i=[...e],s=i.length,r=e.map((e,i)=>ie(e)(e,t[i]));return e=>{for(let t=0;t<s;t++)i[t]=r[t](e);return i}}function ii(e,t){let i={...e,...t},s={};for(let r in i)void 0!==e[r]&&void 0!==t[r]&&(s[r]=ie(e[r])(e[r],t[r]));return e=>{for(let t in s)i[t]=s[t](e);return i}}let is=(e,t)=>{let i=tg.createTransformer(t),s=td(e),r=td(t);if(!(s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length))return ei(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),t1(e,t);if(t7.has(e)&&!r.values.length||t7.has(t)&&!s.values.length)return t7.has(e)?i=>i<=0?e:t:i=>i>=1?t:e;return t5(it(function(e,t){var i;let s=[],r={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],o=e.indexes[a][r[a]],l=null!=(i=e.values[o])?i:0;s[n]=l,r[a]++}return s}(s,r),r.values),i)};function ir(e,t,i){return"number"==typeof e&&"number"==typeof t&&"number"==typeof i?tQ(e,t,i):ie(e)(e,t)}function ia(e,t,i){var s,r;let n=Math.max(t-5,0);return s=i-e(n),(r=t-n)?1e3/r*s:0}let io=.01,il=2,ih=.005,iu=.5;function ic(e,t){return e*Math.sqrt(1-t*t)}let id=["duration","bounce"],im=["stiffness","damping","mass"];function ip(e,t){return t.some(t=>void 0!==e[t])}function ig(e=.3,t=.3){let i,s="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:r,restDelta:n}=s,a=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],l={done:!1,value:a},{stiffness:h,damping:u,mass:c,duration:d,velocity:m,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ip(e,im)&&ip(e,id))if(e.visualDuration){let i=2*Math.PI/(1.2*e.visualDuration),s=i*i,r=2*eX(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:1,stiffness:s,damping:r}}else{let i=function({duration:e=800,bounce:t=.3,velocity:i=0,mass:s=1}){let r,n;ei(e<=eo(10),"Spring duration must be 10 seconds or less");let a=1-t;a=eX(.05,1,a),e=eX(.01,10,e/1e3),a<1?(r=t=>{let s=t*a,r=s*e;return .001-(s-i)/ic(t,a)*Math.exp(-r)},n=t=>{let s=t*a*e,n=Math.pow(a,2)*Math.pow(t,2)*e,o=Math.exp(-s),l=ic(Math.pow(t,2),a);return(s*i+i-n)*o*(-r(t)+.001>0?-1:1)/l}):(r=t=>-.001+Math.exp(-t*e)*((t-i)*e+1),n=t=>e*e*(i-t)*Math.exp(-t*e));let o=function(e,t,i){let s=i;for(let i=1;i<12;i++)s-=e(s)/t(s);return s}(r,n,5/e);if(e=eo(e),isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(o,2)*s;
9return{stiffness:t,damping:2*a*Math.sqrt(s*t),duration:e}}}(e);(t={...t,...i,mass:1}).isResolvedFromDuration=!0}return t}({...s,velocity:-((s.velocity||0)/1e3)}),f=m||0,g=u/(2*Math.sqrt(h*c)),x=o-a,y=Math.sqrt(h/c)/1e3,v=5>Math.abs(x);if(r||(r=v?io:il),n||(n=v?ih:iu),g<1){let e=ic(y,g);i=t=>o-Math.exp(-g*y*t)*((f+g*y*x)/e*Math.sin(e*t)+x*Math.cos(e*t))}else if(1===g)i=e=>o-Math.exp(-y*e)*(x+(f+y*x)*e);else{let e=y*Math.sqrt(g*g-1);i=t=>{let i=Math.exp(-g*y*t),s=Math.min(e*t,300);return o-i*((f+g*y*x)*Math.sinh(s)+e*x*Math.cosh(s))/e}}let w={calculatedDuration:p&&d||null,next:e=>{let t=i(e);if(p)l.done=e>=d;else{let s=0;g<1&&(s=0===e?eo(f):ia(i,e,t));let a=Math.abs(o-t)<=n;l.done=Math.abs(s)<=r&&a}return l.value=l.done?o:t,l},toString:()=>{let e=Math.min(el(w),2e4),t=ep(t=>w.next(e*t).value,e,30);return e+"ms "+t}};return w}function ix({keyframes:e,velocity:t=0,power:i=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:n=500,modifyTarget:a,min:o,max:l,restDelta:h=.5,restSpeed:u}){let c,d,m=e[0],p={done:!1,value:m},f=i*t,g=m+f,x=void 0===a?g:a(g);x!==g&&(f=x-m);let y=e=>-f*Math.exp(-e/s),v=e=>x+y(e),w=e=>{let t=y(e),i=v(e);p.done=Math.abs(t)<=h,p.value=p.done?x:i},b=e=>{let t;if(t=p.value,void 0!==o&&t<o||void 0!==l&&t>l){var i;c=e,d=ig({keyframes:[p.value,(i=p.value,void 0===o?l:void 0===l||Math.abs(o-i)<Math.abs(l-i)?o:l)],velocity:ia(v,e,p.value),damping:r,stiffness:n,restDelta:h,restSpeed:u})}};return b(0),{calculatedDuration:null,next:e=>{let t=!1;return(d||void 0!==c||(t=!0,w(e),b(e)),void 0!==c&&e>=c)?d.next(e-c):(t||w(e),p)}}}let iy=ez(.42,0,1,1),iv=ez(0,0,.58,1),iw=ez(.42,0,.58,1),ib={linear:ei,easeIn:iy,easeInOut:iw,easeOut:iv,circIn:eY,circInOut:eG,circOut:eK,backIn:e$,backInOut:eW,backOut:e_,anticipate:eZ},ij=e=>{if(eu(e)){ei(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,i,s,r]=e;return ez(t,i,s,r)}return"string"==typeof e?(ei(void 0!==ib[e],`Invalid easing type '${e}'`),ib[e]):e};function iT({duration:e=300,keyframes:t,times:i,ease:s="easeInOut"}){var r;let n,a=Array.isArray(s)&&"number"!=typeof s[0]?s.map(ij):ij(s),o={done:!1,value:t[0]},l=function(e,t,{clamp:i=!0,ease:s,mixer:r}={}){let n=e.length;if(ei(n===t.length,"Both input and output ranges must be the same length"),1===n)return()=>t[0];if(2===n&&t[0]===t[1])return()=>t[1];let a=e[0]===e[1];e[0]>e[n-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,i){let s=[],r=i||ir,n=e.length-1;for(let i=0;i<n;i++){let n=r(e[i],e[i+1]);t&&(n=t5(Array.isArray(t)?t[i]||ei:t,n)),s.push(n)}return s}(t,s,r),l=o.length,h=i=>{if(a&&i<e[0])return t[0];let s=0;if(l>1)for(;s<e.length-2&&!(i<e[s+1]);s++);let r=em(e[s],e[s+1],i);return o[s](r)};return i?t=>h(eX(e[0],e[n-1],t)):h}((r=i&&i.length===t.length?i:(!function(e,t){let i=e[e.length-1];for(let s=1;s<=t;s++){let r=em(0,t,s);e.push(tQ(i,1,r))}}(n=[0],t.length-1),n),r.map(t=>t*e)),t,{ease:Array.isArray(a)?a:t.map(()=>a||iw).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}let iA=e=>{let t=({timestamp:t})=>e(t);return{start:()=>ek.update(t,!0),stop:()=>eS(t),now:()=>eP.isProcessing?eP.timestamp:eN.now()}},ik={decay:ix,inertia:ix,tween:iT,keyframes:iT,spring:ig},iS=e=>e/100;class iP extends tJ{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:e}=this.options;e&&e()};const{name:t,motionValue:i,element:s,keyframes:r}=this.options,n=(null==s?void 0:s.KeyframeResolver)||tB,a=(e,t)=>this.onKeyframesResolved(e,t);this.resolver=new n(r,a,t,i,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let t,i,{type:s="keyframes",repeat:r=0,repeatDelay:n=0,repeatType:a,velocity:o=0}=this.options,l=ey(s)?s:ik[s]||iT;l!==iT&&"number"!=typeof e[0]&&(t=t5(iS,ir(e[0],e[1])),e=[0,100]);let h=l({...this.options,keyframes:e});"mirror"===a&&(i=l({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===h.calculatedDuration&&(h.calculatedDuration=el(h));let{calculatedDuration:u}=h,c=u+n;return{generator:h,mirroredGenerator:i,mapPercentToKeyframes:t,calculatedDuration:u,resolvedDuration:c,totalDuration:c*(r+1)-n}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){let{resolved:i}=this;if(!i){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:s,generator:r,mirroredGenerator:n,mapPercentToKeyframes:a,keyframes:o,c
9alculatedDuration:l,totalDuration:h,resolvedDuration:u}=i;if(null===this.startTime)return r.next(0);let{delay:c,repeat:d,repeatType:m,repeatDelay:p,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-h/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;let g=this.currentTime-c*(this.speed>=0?1:-1),x=this.speed>=0?g<0:g>h;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=h);let y=this.currentTime,v=r;if(d){let e=Math.min(this.currentTime,h)/u,t=Math.floor(e),i=e%1;!i&&e>=1&&(i=1),1===i&&t--,(t=Math.min(t,d+1))%2&&("reverse"===m?(i=1-i,p&&(i-=p/u)):"mirror"===m&&(v=n)),y=eX(0,1,i)*u}let w=x?{done:!1,value:o[0]}:v.next(y);a&&(w.value=a(w.value));let{done:b}=w;x||null===l||(b=this.speed>=0?this.currentTime>=h:this.currentTime<=0);let j=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return j&&void 0!==s&&(w.value=tX(o,this.options,s)),f&&f(w.value),j&&this.finish(),w}get duration(){let{resolved:e}=this;return e?e.calculatedDuration/1e3:0}get time(){return this.currentTime/1e3}set time(e){e=eo(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=this.currentTime/1e3)}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:e=iA,onPlay:t,startTime:i}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=i?i:this.calcStartTime(),"finished"===this.state&&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=null!=(e=this.currentTime)?e:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&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)}}let iC=new Set(["opacity","clipPath","filter","transform"]),iE=es(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),iN={anticipate:eZ,backInOut:eW,cir
9cInOut:eG};class iM extends tJ{constructor(e){super(e);const{name:t,motionValue:i,element:s,keyframes:r}=this.options;this.resolver=new tY(r,(e,t)=>this.onKeyframesResolved(e,t),t,i,s),this.resolver.scheduleResolve()}initPlayback(e,t){var i;let{duration:s=300,times:r,ease:n,type:a,motionValue:o,name:l,startTime:h}=this.options;if(!o.owner||!o.owner.current)return!1;if("string"==typeof n&&ed()&&n in iN&&(n=iN[n]),ey((i=this.options).type)||"spring"===i.type||!function e(t){return!!("function"==typeof t&&ed()||!t||"string"==typeof t&&(t in eg||ed())||eu(t)||Array.isArray(t)&&t.every(e))}(i.ease)){let{onComplete:t,onUpdate:i,motionValue:o,element:l,...h}=this.options,u=function(e,t){let i=new iP({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),s={done:!1,value:e[0]},r=[],n=0;for(;!s.done&&n<2e4;)r.push((s=i.sample(n)).value),n+=10;return{times:void 0,keyframes:r,duration:n-10,ease:"linear"}}(e,h);1===(e=u.keyframes).length&&(e[1]=e[0]),s=u.duration,r=u.times,n=u.ease,a="keyframes"}let u=function(e,t,i,{delay:s=0,duration:r=300,repeat:n=0,repeatType:a="loop",ease:o="easeInOut",times:l}={}){let h={[t]:i};l&&(h.offset=l);let u=function e(t,i){if(t)return"function"==typeof t&&ed()?ep(t,i):eu(t)?ef(t):Array.isArray(t)?t.map(t=>e(t,i)||eg.easeOut):eg[t]}(o,r);return Array.isArray(u)&&(h.easing=u),e.animate(h,{delay:s,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:n+1,direction:"reverse"===a?"alternate":"normal"})}(o.owner.current,l,e,{...this.options,duration:s,times:r,ease:n});return u.startTime=null!=h?h:this.calcStartTime(),this.pendingTimeline?(eh(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{let{onComplete:i}=this.options;o.set(tX(e,this.options,t)),i&&i(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:s,times:r,type:a,ease:n,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return t/1e3}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return(t.currentTime||0)/1e3}set time(e){let{resolved:t}=this;if(!t)return;let{animation:i}=t;i.currentTime=eo(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:i}=t;i.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return"idle";let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){let{resolved:t}=this;if(!t)return ei;let{animation:i}=t;eh(i,e)}else this.pendingTimeline=e;return ei}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:i,duration:s,type:r,ease:n,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:o,element:l,...h}=this.options,u=new iP({...h,keyframes:i,duration:s,type:r,ease:n,times:a,isGenerator:!0}),c=eo(this.time);e.setWithVelocity(u.sample(c-10).value,u.sample(c).value,10)}let{onStop:o}=this.options;o&&o(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:i,repeatDelay:s,repeatType:r,damping:n,type:a}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;let{onUpdate:o,transformTemplate:l}=t.owner.getProps();return iE()&&i&&iC.has(i)&&!o&&!l&&!s&&"mirror"!==r&&0!==n&&"inertia"!==a}}let iV={type:"spring",stiffness:500,damping:25,restSpeed:10},iR={type:"keyframes",duration:.8},iD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},iF=(e,t,i,s={},r,n)=>a=>{let o=ex(s,e)||{},l=o.delay||s.delay||0,{elapsed:h=0}=s;h-=eo(l);let u={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-h,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:n?void 0:r};!function({when:e,delay:t,delayChildren:i,staggerChildren:s,staggerDirection:r,repeat:n,repeatType:a,repeatDelay:o,from:l,elapsed:
9h,...u}){return!!Object.keys(u).length}(o)&&(u={...u,...((e,{keyframes:t})=>t.length>2?iR:ew.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:iV:iD)(e,u)}),u.duration&&(u.duration=eo(u.duration)),u.repeatDelay&&(u.repeatDelay=eo(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let c=!1;if(!1!==u.type&&(0!==u.duration||u.repeatDelay)||(u.duration=0,0===u.delay&&(c=!0)),c&&!n&&void 0!==t.get()){let e=tX(u.keyframes,o);if(void 0!==e)return ek.update(()=>{u.onUpdate(e),u.onComplete()}),new ea([])}return!n&&iM.supports(u)?new iM(u):new iP(u)};function iL(e,t,{delay:i=0,transitionOverride:s,type:r}={}){var n;let{transition:a=e.getDefaultTransition(),transitionEnd:o,...l}=t;s&&(a=s);let h=[],u=r&&e.animationState&&e.animationState.getState()[r];for(let t in l){let s=e.getValue(t,null!=(n=e.latestValues[t])?n:null),r=l[t];if(void 0===r||u&&function({protectedKeys:e,needsAnimating:t},i){let s=e.hasOwnProperty(i)&&!0!==t[i];return t[i]=!1,s}(u,t))continue;let o={delay:i,...ex(a||{},t)},c=!1;if(window.MotionHandoffAnimation){let i=e.props[eH];if(i){let e=window.MotionHandoffAnimation(i,t,ek);null!==e&&(o.startTime=e,c=!0)}}eI(e,t),s.start(iF(t,s,r,e.shouldReduceMotion&&eb.has(t)?{type:!1}:o,e,c));let d=s.animation;d&&h.push(d)}return o&&Promise.all(h).then(()=>{ek.update(()=>{o&&function(e,t){let{transitionEnd:i={},transition:s={},...r}=Q(e,t)||{};for(let t in r={...r,...i}){let i=ej(r[t]);e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,eF(i))}}(e,o)})}),h}function iI(e,t,i={}){var s;let r=Q(e,t,"exit"===i.type?null==(s=e.presenceContext)?void 0:s.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(n=i.transitionOverride);let a=r?()=>Promise.all(iL(e,r,i)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(s=0)=>{let{delayChildren:r=0,staggerChildren:a,staggerDirection:o}=n;return function(e,t,i=0,s=0,r=1,n){let a=[],o=(e.variantChildren.size-1)*s,l=1===r?(e=0)=>e*s:(e=0)=>o-e*s;return Array.from(e.variantChildren).sort(iB).forEach((e,s)=>{e.notify("AnimationStart",t),a.push(iI(e,t,{...n,delay:i+l(s)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(a)}(e,t,r+s,a,o,i)}:()=>Promise.resolve(),{when:l}=n;if(!l)return Promise.all([a(),o(i.delay)]);{let[e,t]="beforeChildren"===l?[a,o]:[o,a];return e().then(()=>t())}}function iB(e,t){return e.sortNodePosition(t)}let iH=et.length,iO=[...ee].reverse(),iz=ee.length;function iq(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iU(){return{animate:iq(!0),whileInView:iq(),whileHover:iq(),whileTap:iq(),whileDrag:iq(),whileFocus:iq(),exit:iq()}}class i_{constructor(e){this.isMounted=!1,this.node=e}update(){}}let i$=0,iW={x:!1,y:!1},iZ=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function iY(e,t,i,s={passive:!0}){return e.addEventListener(t,i,s),()=>e.removeEventListener(t,i)}function iK(e){return{point:{x:e.pageX,y:e.pageY}}}function iG(e,t,i,s){return iY(e,t,e=>iZ(e)&&i(e,iK(e)),s)}let iX=(e,t)=>Math.abs(e-t);class iJ{constructor(e,t,{transformPagePoint:i,contextWindow:s,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let i=i1(this.lastMoveEventInfo,this.history),s=null!==this.startEvent,r=(e=i.offset,t={x:0,y:0},Math.sqrt(iX(e.x,t.x)**2+iX(e.y,t.y)**2)>=3);if(!s&&!r)return;let{point:n}=i,{timestamp:a}=eP;this.history.push({...n,timestamp:a});let{onStart:o,onMove:l}=this.handlers;s||(o&&o(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=iQ(t,this.transformPagePoint),ek.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:i,onSessionEnd:s,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=i1("pointercancel"===e.type?this.lastMoveEventInfo:iQ(t,this.transformPagePoint),this.history);this.startEvent&&i&&i(e,n),s&&s(e,n)},!iZ(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=i,this.contextWindow=s||window;const n=iQ(iK(e),this.transformPagePoint),{point:a}=n,{timestamp:o}=eP;this.history=[{...a,timestamp:o}];const{onSessionStart:l}=t;l&&l(e,i1(n,this.history)),this.removeListeners=t5(iG(this.contextWindow,"pointermove",this.handlePointerMove),iG(this.contextWindow,"pointerup",this.handlePointerUp),iG(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),eS(this.updatePoint)}}function iQ(e,t){return t?{point:t(e.point)}:e}function i0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function i1({point:e},t){return{point:e,delta:i0(e,i2(t)),offset:i0(e,t[0]),velocity:function(e){if(e.length<2)return{x:0,y:0};let t=e.length-1,i=null,s=i2(e);for(;t>=0&&(i=e[t],!(s.timestamp-i.timestamp>eo(.1)));)t--;if(!i)return{x:0,y:0};let r=(s.timestamp-i.timestamp)/1e3;if(0===r)return{x:0,y:0};let n={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return n.x===1/0&&(n.x=0),n.y===1/0&&(n.y=0),n}(t)}}function i2(e){return e[e.length-1]}function i4(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function i3(e){return e.max-e.min}function i6(e,t,i,s=.5){e.origin=s,e.originPoint=tQ(t.min,t.max,e.origin),e.scale=i3(i)/i3(t),e.translate=tQ(i.min,i.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function i8(e,t,i,s){i6(e.x,t.x,i.x,s?s.originX:void 0),i6(e.y,t.y,i.y,s?s.originY:void 0)}function i5(e,t,i){e.min=i.min+t.min,e.max=e.min+i3(t)}function i7(e,t,i){e.min=t.min-i.min,e.max=e.min+i3(t)}function i9(e,t,i){i7(e.x,t.x,i.x),i7(e.y,t.y,i.y)}function se(e,t,i){return{min:void 0!==t?e.min+t:void 0,max:void 0!==i?e.max+i-(e.max-e.min):void 0}}function st(e,t){let i=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,s]=[s,i]),{min:i,max:s}}function si(e,t,i){return{min:ss(e,t),max:ss(e,i)}}function ss(e,t){return"number"==typeof e?e:e[t]||0}let sr=()=>({translate:0,scale:1,origin:0,originPoint:0}),sn=()=>({x:sr(),y:sr()}),sa=()=>({min:0,max:0}),so=()=>({x:sa(),y:sa()});function sl(e){return[e("x"),e("y")]}function sh({top:e,left:t,right:i,bottom:s}){return{x:{min:t,max:i},y:{min:e,max:s}}}function su(e){return void 0===e||1===e}function sc({scale:e,scaleX:t,scaleY:i}){return!su(e)||!su(t)||!su(i)}function sd(e){return sc(e)||sm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function sm(e){var t,i;return(t=e.x)&&"0%"!==t||(i=e.y)&&"0%"!==i}function sp(e,t,i,s,r){return void 0!==r&&(e=s+r*(e-s)),s+i*(e-s)+t}
9function sf(e,t=0,i=1,s,r){e.min=sp(e.min,t,i,s,r),e.max=sp(e.max,t,i,s,r)}function sg(e,{x:t,y:i}){sf(e.x,t.translate,t.scale,t.originPoint),sf(e.y,i.translate,i.scale,i.originPoint)}function sx(e,t){e.min=e.min+t,e.max=e.max+t}function sy(e,t,i,s,r=.5){let n=tQ(e.min,e.max,r);sf(e,t,i,n,s)}function sv(e,t){sy(e.x,t.x,t.scaleX,t.scale,t.originX),sy(e.y,t.y,t.scaleY,t.scale,t.originY)}function sw(e,t){return sh(function(e,t){if(!t)return e;let i=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}(e.getBoundingClientRect(),t))}let sb=({current:e})=>e?e.ownerDocument.defaultView:null,sj=new WeakMap;class sT{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=so(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;let s=e=>{let{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(iK(e).point)},r=(e,t)=>{let{drag:i,dragPropagation:s,onDragStart:r}=this.getProps();if(i&&!s&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"y"===e)if(iW[e])return null;else return iW[e]=!0,()=>{iW[e]=!1};return iW.x||iW.y?null:(iW.x=iW.y=!0,()=>{iW.x=iW.y=!1})}(i),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sl(e=>{let t=this.getAxisMotionValue(e).get()||0;if(tt.test(t)){let{projection:i}=this.visualElement;if(i&&i.layout){let s=i.layout.layoutBox[e];s&&(t=i3(s)*(parseFloat(t)/100))}}this.originPoint[e]=t}),r&&ek.postRender(()=>r(e,t)),eI(this.visualElement,"transform");let{animationState:n}=this.visualElement;n&&n.setActive("whileDrag",!0)},n=(e,t)=>{let{dragPropagation:i,dragDirectionLock:s,onDirectionLock:r,onDrag:n}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:a}=t;if(s&&null===this.currentDirection){this.currentDirection=function(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}(a),null!==this.currentDirection&&r&&r(this.currentDirection);return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),n&&n(e,t)},a=(e,t)=>this.stop(e,t),o=()=>sl(e=>{var t;return"paused"===this.getAnimationState(e)&&(null==(t=this.getAxisMotionValue(e).animation)?void 0:t.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new iJ(e,{onSessionStart:s,onStart:r,onMove:n,onSessionEnd:a,resumeAnimation:o},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:sb(this.visualElement)})}stop(e,t){let i=this.isDragging;if(this.cancel(),!i)return;let{velocity:s}=t;this.startAnimation(s);let{onDragEnd:r}=this.getProps();r&&ek.postRender(()=>r(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){let{drag:s}=this.getProps();if(!i||!sA(e,s,this.currentDirection))return;let r=this.getAxisMotionValue(e),n=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(n=function(e,{min:t,max:i},s){return void 0!==t&&e<t?e=s?tQ(t,e,s.min):Math.max(e,t):void 0!==i&&e>i&&(e=s?tQ(i,e,s.max):Math.min(e,i)),e}(n,this.constraints[e],this.elastic[e])),r.set(n)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,r=this.constraints;t&&i4(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=function(e,{top:t,left:i,bottom:s,right:r}){return{x:se(e.x,i,r),y:se(e.y,t,s)}}(s.layoutBox,t):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:si(e,"left","right"),y:si(e,"to
9p","bottom")}}(i),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&sl(e=>{var t,i;let r;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=s.layoutBox[e],i=this.constraints[e],r={},void 0!==i.min&&(r.min=i.min-t.min),void 0!==i.max&&(r.max=i.max-t.min),r))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!i4(t))return!1;let s=t.current;ei(null!==s,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let n=function(e,t,i){let s=sw(e,i),{scroll:r}=t;return r&&(sx(s.x,r.offset.x),sx(s.y,r.offset.y)),s}(s,r.root,this.visualElement.getTransformPagePoint()),a=(e=r.layout.layoutBox,{x:st(e.x,n.x),y:st(e.y,n.y)});if(i){let e=i(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=sh(e))}return a}startAnimation(e){let{drag:t,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:n,onDragTransitionEnd:a}=this.getProps(),o=this.constraints||{};return Promise.all(sl(a=>{if(!sA(a,t,this.currentDirection))return;let l=o&&o[a]||{};n&&(l={min:0,max:0});let h={type:"inertia",velocity:i?e[a]:0,bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(a,h)})).then(a)}startAxisValueAnimation(e,t){let i=this.getAxisMotionValue(e);return eI(this.visualElement,e),i.start(iF(e,i,0,t,this.visualElement,!1))}stopAnimation(){sl(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){sl(e=>{var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.pause()})}getAnimationState(e){var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps();return i[t]||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){sl(t=>{let{drag:i}=this.getProps();if(!sA(t,i,this.currentDirection))return;let{projection:s}=this.visualElement,r=this.getAxisMotionValue(t);if(s&&s.layout){let{min:i,max:n}=s.layout.layoutBox[t];r.set(e[t]-tQ(i,n,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!i4(t)||!i||!this.constraints)return;this.stopAnimation();let s={x:0,y:0};sl(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var i,r;let n,a,o,l=t.get();s[e]=(i={min:l,max:l},r=this.constraints[e],n=.5,a=i3(i),(o=i3(r))>a?n=em(r.min,r.max-a,i.min):a>o&&(n=em(i.min,i.max-o,r.min)),eX(0,1,n))}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),sl(t=>{if(!sA(t,e,null))return;let i=this.getAxisMotionValue(t),{min:r,max:n}=this.constraints[t];i.set(tQ(r,n,s[t]))})}addListeners(){if(!this.visualElement.current)return;sj.set(this.visualElement,this);let e=iG(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:i=!0}=this.getProps();t&&i&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();i4(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",t);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ek.read(t);let r=iY(window,"resize",()=>this.scalePositionWithinConstraints()),n=i.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(sl(t=>{let i=this.getAxisMotionValue(t);i&&(this.originPoint[t]+=e[t].translate,i.set(i.get()+e[t].translate))}),this.visualElement.render())});return()=>{r(),e(),s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:n=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:n,dragMomentum:a}}}function sA(e,t,i){return(!0===t||t===e)&&(null===i||i===e)}let sk=e=>(t,i)=>{e&&ek.postRender(()=>e(t,i))};var sS=f;let sP=(0,f.createContext)({}),sC={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let sN={correct:(e,t)=>
9{if(!t.target)return e;if("string"==typeof e)if(!ti.test(e))return e;else e=parseFloat(e);let i=sE(e,t.target.x),s=sE(e,t.target.y);return`${i}% ${s}%`}},sM={},{schedule:sV,cancel:sR}=eA(queueMicrotask,!1);class sD extends sS.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=e;Object.assign(sM,sL),r&&(t.group&&t.group.add(r),i&&i.register&&s&&i.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),sC.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:i,drag:s,isPresent:r}=this.props,n=i.projection;return n&&(n.isPresent=r,s||e.layoutDependency!==t||void 0===t?n.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?n.promote():n.relegate()||ek.postRender(()=>{let e=n.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),sV.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function sF(e){let[t,i]=z(),s=(0,sS.useContext)(V);return(0,m.jsx)(sD,{...e,layoutGroup:s,switchLayoutGroup:(0,sS.useContext)(sP),isPresent:t,safeToRemove:i})}let sL={borderRadius:{...sN,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sN,borderTopRightRadius:sN,borderBottomLeftRadius:sN,borderBottomRightRadius:sN,boxShadow:{correct:(e,{treeScale:t,projectionDelta:i})=>{let s=tg.parse(e);if(s.length>5)return e;let r=tg.createTransformer(e),n=+("number"!=typeof s[0]),a=i.x.scale*t.x,o=i.y.scale*t.y;s[0+n]/=a,s[1+n]/=o;let l=tQ(a,o,.5);return"number"==typeof s[2+n]&&(s[2+n]/=l),"number"==typeof s[3+n]&&(s[3+n]/=l),r(s)}}},sI=(e,t)=>e.depth-t.depth;class sB{constructor(){this.children=[],this.isDirty=!1}add(e){eM(this.children,e),this.isDirty=!0}remove(e){eV(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(sI),this.isDirty=!1,this.children.forEach(e)}}function sH(e){let t=eL(e)?e.get():e;return t&&"object"==typeof t&&t.mix&&t.toValue?t.toValue():t}let sO=["TopLeft","TopRight","BottomLeft","BottomRight"],sz=sO.length,sq=e=>"string"==typeof e?parseFloat(e):e,sU=e=>"number"==typeof e||ti.test(e);function s_(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let s$=sZ(0,.5,eK),sW=sZ(.5,.95,ei);function sZ(e,t,i){return s=>s<e?0:s>t?1:i(em(e,t,s))}function sY(e,t){e.min=t.min,e.max=t.max}function sK(e,t){sY(e.x,t.x),sY(e.y,t.y)}function sG(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sX(e,t,i,s,r){return e-=t,e=s+1/i*(e-s),void 0!==r&&(e=s+1/r*(e-s)),e}function sJ(e,t,[i,s,r],n,a){!function(e,t=0,i=1,s=.5,r,n=e,a=e){if(tt.test(t)&&(t=parseFloat(t),t=tQ(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let o=tQ(n.min,n.max,s);e===n&&(o-=t),e.min=sX(e.min,t,i,o,r),e.max=sX(e.max,t,i,o,r)}(e,t[i],t[s],t[r],t.scale,n,a)}let sQ=["x","scaleX","originX"],s0=["y","scaleY","originY"];function s1(e,t,i,s){sJ(e.x,t,sQ,i?i.x:void 0,s?s.x:void 0),sJ(e.y,t,s0,i?i.y:void 0,s?s.y:void 0)}function s2(e){return 0===e.translate&&1===e.scale}function s4(e){return s2(e.x)&&s2(e.y)}function s3(e,t){return e.min===t.min&&e.max===t.max}function s6(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function s8(e,t){return s6(e.x,t.x)&&s6(e.y,t.y)}function s5(e){return i3(e.x)/i3(e.y)}function s7(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class s9{constructor(){this.members=[]}add(e){eM(this.members,e),e.scheduleRender()}remove(e){if(eV(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t,i=this.members.findIndex(t=>e===t);if(0===i)return!1;for(let e=i;e>=0;e--){let i=this.members[e];if(!1!==i.isPresent){t=i;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:s}=e.options;!1===s&&i.hide()}}
9exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let re={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},rt="u">typeof window&&void 0!==window.MotionDebug,ri=["","X","Y","Z"],rs={visibility:"hidden"},rr=0;function rn(e,t,i,s){let{latestValues:r}=t;r[e]&&(i[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function ra({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(e={},i=null==t?void 0:t()){this.id=rr++,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,rt&&(re.totalNodes=re.resolvedTargetDeltas=re.recalculatedProjection=0),this.nodes.forEach(rh),this.nodes.forEach(rg),this.nodes.forEach(rx),this.nodes.forEach(ru),rt&&window.MotionDebug.record(re)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new sB)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new eR),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let i=this.eventHandlers.get(e);i&&i.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,i=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;let{layoutId:s,layout:r,visualElement:n}=this.options;if(n&&!n.current&&n.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),i&&(r||s)&&(this.isLayoutDirty=!0),e){let i,s=()=>this.root.updateBlockedByResize=!1;e(t,()=>{let e,t;this.root.updateBlockedByResize=!0,i&&i(),e=eN.now(),t=({timestamp:i})=>{let r=i-e;r>=250&&(eS(t),s(r-250))},ek.read(t,!0),i=()=>eS(t),sC.hasAnimatedSinceResize&&(sC.hasAnimatedSinceResize=!1,this.nodes.forEach(rf))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&n&&(s||r)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:i,layout:s})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||n.getDefaultTransition()||rT,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=n.getProps(),l=!this.targetLayout||!s8(this.targetLayout,s)||i,h=!t&&i;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||h||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,h);let t={...ex(r,"layout"),onPlay:a,onComplete:o};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||rf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,eS(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.forEac
9h(ry),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:i}=t.options;if(!i)return;let s=i.props[eH];if(window.MotionHasOptimisedAnimation(s,"transform")){let{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",ek,!(e||i))}let{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&e(r)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:i}=this.options;if(void 0===t&&!i)return;let s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(rd);return}this.isUpdating||this.nodes.forEach(rm),this.isUpdating=!1,this.nodes.forEach(rp),this.nodes.forEach(ro),this.nodes.forEach(rl),this.clearAllSnapshots();let e=eN.now();eP.delta=eX(0,1e3/60,e-eP.timestamp),eP.timestamp=e,eP.isProcessing=!0,eC.update.process(eP),eC.preRender.process(eP),eC.render.process(eP),eP.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sV.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rc),this.sharedNodes.forEach(rv)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ek.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ek.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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=so(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=s(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!r)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!s4(this.projectionDelta),i=this.getTransformTemplate(),s=i?i(this.latestValues,""):void 0,n=s!==this.prevTransformTemplateValue;e&&(t||sd(this.latestValues)||n)&&(r(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let i=this.measurePageBox(),s=this.removeElementScroll(i);return e&&(s=this.removeTransform(s)),rS((t=s).x),rS(t.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:s,latestValues:{},source:this.id}}measurePageBox(){var e;let{visualElement:t}=this.options;if(!t)return so();let i=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(rC))){let{scroll:e}=this.root;e&&(sx(i.x,e.offset.x),sx(i.y,e.offset.y))}return i}removeElementScroll(e){var t;let i=so();if(sK(i,e),null==(t=this.scroll)?void 0:t.wasRoot)return i;for(let t=0;t<this.path.length;t++){let s=this.path[t],{scroll:r,options:n}=s;s!==this.root&&r&&n.layoutScroll&&(r.wasRoot&&sK(i,e),sx(i.x,r.offset.x),sx(i.y,r.offset.y))}return i}applyTransform(e,t=!1){let i=so();sK(i,e);for(let e=0;e<this.path.length;e++){let s=this.path[e];!t&&s.options.layoutScroll&&s.scroll&&s!==s.root&&sv(i,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),sd(s.latestValues)&&sv(i,s.latestValues)}return sd(this.latestValues)&&sv(i,this.latestValues),i}removeTransform(e){let t=so();sK(t,e);for(let e=0;e<this.path.length;e++){let i=this.path[e];if(!i.instance||!sd(i.latestValues))continue;sc(i.latestValues)&&i.updateSnapshot();let s=so();sK(s,i.measurePageBox()),s1(t,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,s)}return sd(this.latestValues)&&s1(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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!==eP.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t,i,s,r;let n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isS
9haredProjectionDirty);let a=!!this.resumingFrom||this!==n;if(!(e||a&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:o,layoutId:l}=this.options;if(this.layout&&(o||l)){if(this.resolvedRelativeTargetAt=eP.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=so(),this.relativeTargetOrigin=so(),i9(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),sK(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if((this.target||(this.target=so(),this.targetWithTransforms=so()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target)?(this.forceRelativeParentToResolveTarget(),i=this.target,s=this.relativeTarget,r=this.relativeParent.target,i5(i.x,s.x,r.x),i5(i.y,s.y,r.y)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sK(this.target,this.layout.layoutBox),sg(this.target,this.targetDelta)):sK(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=so(),this.relativeTargetOrigin=so(),i9(this.relativeTargetOrigin,this.target,e.target),sK(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}rt&&re.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||sc(this.parent.latestValues)||sm(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;let t=this.getLead(),i=!!this.resumingFrom||this!==t,s=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(s=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===eP.timestamp&&(s=!1),s)return;let{layout:r,layoutId:n}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||n))return;sK(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;!function(e,t,i,s=!1){let r,n,a=i.length;if(a){t.x=t.y=1;for(let o=0;o<a;o++){n=(r=i[o]).projectionDelta;let{visualElement:a}=r.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&sv(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),n&&(t.x*=n.x.scale,t.y*=n.y.scale,sg(e,n)),s&&sd(r.latestValues)&&sv(e,r.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,i),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=so());let{target:l}=t;if(!l){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(sG(this.prevProjectionDelta.x,this.projectionDelta.x),sG(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),i8(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&s7(this.projectionDelta.x,this.prevProjectionDelta.x)&&s7(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),rt&&re.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=sn(),this.projectionDelta=sn(),this.projectionDeltaWithTransform=sn()}setAnimationOrigin(e,t=!1){let i,s=this.snapshot,r=s?s.latestValues:{},n={...this.latestValues},a=sn();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=so(),l=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,c=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(rj));this.animationProgress=0,this.mixTargetDelta=t=>{let s=t/1e3;if(rw(a.x,e.x,s),rw(a.y,e.y,s),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,d,m,p,f,g;i9(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=o,g=s,rb(m.x,p.x,f.x,g),rb(m.y,p.y,f.y,g),i&&(h=this.relativeTarget,d=i,s3(h.x,d.x)&&s3(h.y,d.y))&&(this.isProjectionDirty=!1),i||(i=so()),sK(i,this.relativeTarget)}l&&(this.animationValues=n,function(e,t,i,s,r,n){r?(e.opacity=tQ(0,void 0!==i.opacity?i.opacity:1,s$(s)),e.opacityExit=tQ(void 0!==t.opacity?t.opacity:1,0,sW(s))):n&&(e.opacity=tQ(void 0!==t.opacity?t.opacity:1,void 0!==i.opacity?i.opacity:1,s));for(let r=0;r<sz;r++){let n=`border${sO[r]}Radius`,a=s_(t,n),o=s_(i,n);(void 0!==a||void 0!==o)&&(a||(a=0),o||(o=0),0===a||0===o||sU(a)===sU(o)?(e[n]=Math.max(tQ(sq(a),sq(o
9),s),0),(tt.test(o)||tt.test(a))&&(e[n]+="%")):e[n]=o)}(t.rotate||i.rotate)&&(e.rotate=tQ(t.rotate||0,i.rotate||0,s))}(n,r,this.latestValues,s,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=s},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(eS(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ek.update(()=>{var t;let i;sC.hasAnimatedSinceResize=!0,this.currentAnimation=(t={...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}},(i=eL(0)?0:eF(0)).start(iF("",i,1e3,t)),i.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:i,layout:s,latestValues:r}=e;if(t&&i&&s){if(this!==e&&this.layout&&s&&rP(this.options.animationType,this.layout.layoutBox,s.layoutBox)){i=this.target||so();let t=i3(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let s=i3(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+s}sK(t,i),sv(t,r),i8(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new s9),this.sharedNodes.get(e).add(t);let i=t.options.initialPromotionConfig;t.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:i}={}){let s=this.getStack();s&&s.promote(this,i),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:i}=e;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(t=!0),!t)return;let s={};i.z&&rn("z",e,s,this.animationValues);for(let t=0;t<ri.length;t++)rn(`rotate${ri[t]}`,e,s,this.animationValues),rn(`skew${ri[t]}`,e,s,this.animationValues);for(let t in e.render(),s)e.setStaticValue(t,s[t]),this.animationValues&&(this.animationValues[t]=s[t]);e.scheduleRender()}getProjectionStyles(e){var t,i;if(!this.instance||this.isSVG)return;if(!this.isVisible)return rs;let s={visibility:""},r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=sH(null==e?void 0:e.pointerEvents)||"",s.transform=r?r(this.latestValues,""):"none",s;let n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target){let t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=sH(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!sd(this.latestValues)&&(t.transform=r?r({},""):"none",this.hasProjected=!1),t}let a=n.animationValues||n.latestValues;this.applyTransformsToTarget(),s.transform=function(e,t,i){let s="",r=e.x.translate/t.x,n=e.y.translate/t.y,a=(null==i?void 0:i.z)||0;if((r||n||a)&&(s=`translate3d(${r}px, ${n}px, ${a}px) `),(1!==t.x||1!==t.y)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),i){let{transformPerspective:e,rotate:t,rotateX:r,rotateY:n,skewX:a,skewY:o}=i;e&&(s=`perspective(${e}px) ${s}`),t&&(s+=`rotate(${t}deg) `),r&&(s+=`rotateX(${r}deg) `),n&&(s+=`rotateY(${n}deg) `),a&&(s+=`skewX(${a}deg) `),o&&(s+=`skewY(${o}deg) `)}let o=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==o||1!==l)&&(s+=`scale(${o}, ${l})`),s||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),r&&(s.transform=r(a,s.transform));let{x:o,y:l}=this.projectionDelta;for(let e in s.transformOrigin=`${100*o.origin}% ${100*l.origin}% 0`,n.animationValues?s.opacity=n===this?null!=(i=null!=(t=a.opacity)?t:this.latestValues.opacity)?i:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:s.opacity=n===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0,sM){if(void 0===a[e])continue;let{correct:t,applyTo:i}=sM[e],r="none"===s.transform?a[e]:t(a[e],n);if(i){let e=i.length;for(let t=0;t<e;t++)s[i[t]]=r}else s[e]=r}return this.options.layoutId&&(s.pointerEvents=n===this?sH(null==e?void 0:e.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}
9resetTree(){this.root.nodes.forEach(e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(rd),this.root.sharedNodes.clear()}}}function ro(e){e.updateLayout()}function rl(e){var t;let i=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:s}=e.layout,{animationType:r}=e.options,n=i.source!==e.layout.source;"size"===r?sl(e=>{let s=n?i.measuredBox[e]:i.layoutBox[e],r=i3(s);s.min=t[e].min,s.max=s.min+r}):rP(r,i.layoutBox,t)&&sl(s=>{let r=n?i.measuredBox[s]:i.layoutBox[s],a=i3(t[s]);r.max=r.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[s].max=e.relativeTarget[s].min+a)});let a=sn();i8(a,t,i.layoutBox);let o=sn();n?i8(o,e.applyTransform(s,!0),i.measuredBox):i8(o,t,i.layoutBox);let l=!s4(a),h=!1;if(!e.resumeFrom){let s=e.getClosestProjectingParent();if(s&&!s.resumeFrom){let{snapshot:r,layout:n}=s;if(r&&n){let a=so();i9(a,i.layoutBox,r.layoutBox);let o=so();i9(o,t,n.layoutBox),s8(a,o)||(h=!0),s.options.layoutRoot&&(e.relativeTarget=o,e.relativeTargetOrigin=a,e.relativeParent=s)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:i,delta:o,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:h})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function rh(e){rt&&re.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ru(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rc(e){e.clearSnapshot()}function rd(e){e.clearMeasurements()}function rm(e){e.isLayoutDirty=!1}function rp(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function rf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rg(e){e.resolveTargetDelta()}function rx(e){e.calcProjection()}function ry(e){e.resetSkewAndRotation()}function rv(e){e.removeLeadSnapshot()}function rw(e,t,i){e.translate=tQ(t.translate,0,i),e.scale=tQ(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function rb(e,t,i,s){e.min=tQ(t.min,i.min,s),e.max=tQ(t.max,i.max,s)}function rj(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let rT={duration:.45,ease:[.4,0,.1,1]},rA=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rk=rA("applewebkit/")&&!rA("chrome/")?Math.round:ei;function rS(e){e.min=rk(e.min),e.max=rk(e.max)}function rP(e,t,i){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(s5(t)-s5(i)))}function rC(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}let rE=ra({attachResizeListener:(e,t)=>iY(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rN={current:void 0},rM=ra({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rN.current){let e=new rE({});e.mount(window),e.setOptions({layoutScroll:!0}),rN.current=e}return rN.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function rV(e,t){let i=function(e){if(e instanceof Element)return[e];if("string"==typeof e){let t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e)}(e),s=new AbortController;return[i,{passive:!0,...t,signal:s.signal},()=>s.abort()]}function rR(e){return t=>{"touch"===t.pointerType||iW.x||iW.y||e(t)}}function rD(e,t,i){let{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover","Start"===i);let r=s["onHover"+i];r&&ek.postRender(()=>r(t,iK(t)))}let rF=(e,t)=>!!t&&(e===t||rF(e,t.parentElement)),rL=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),rI=new WeakSet;function rB(e){return t=>{"Enter"===t.key&&e(t)}}function rH(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function rO(e){return iZ(e)&&!(iW.x||iW.y)}function rz(e,t,i){let{props:s}=e;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap","Start"===i);let r=s["onTap"+("End"===i?"":i)];r&&ek.postRender(()=>r(t,iK(t)))}let rq=new WeakMap,rU=new WeakMap,r_=e=>{let t=rq.get(e.target);t&&t(e)},r$=e=>{e.forEach(r_)},rW={some:0,all:1},rZ=(0,f.createContext)({strict:!1}),rY=(0,f.createContext)({});function rK(e){return Z(e.animate)||et.some(t=>G(e[t]))}function rG(e){return!!(rK(e)||e.variants)}function rX(e){return Array.isArray(e)?e.join(" "):e}let rJ={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"]},rQ={};for(let e in rJ)rQ[e]={isEnabled:t=>rJ[e].some(e=>!!t[e])};let r0=Symbol.for("motionComponentSymbol"),r1=["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 r2(e){if("string"!=typeof e||e.includes("-"));else if(r1.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}let r4=e=>(t,i)=>{let s=(0,f.useContext)(rY),r=(0,f.useContext)(D),n=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:i},s,r,n){let a={latestValues:function(e,t,i,s){let r={},n=s(e,{});for(let e in n)r[e]=sH(n[e]);let{initial:a,animate:o}=e,l=rK(e),h=rG(e);t&&h&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===o&&(o=t.animate));let u=!!i&&!1===i.initial,c=(u=u||!1===a)?o:a;if(c&&"boolean"!=typeof c&&!Z(c)){let t=Array.isArray(c)?c:[c];for(let i=0;i<t.length;i++){let s=J(e,t[i]);if(s){let{transitionEnd:e,transition:t,...i}=s;for(let e in i){let t=i[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}null!==t&&(r[e]=t)}for(let t in e)r[t]=e[t]}}}return r}(s,r,n,e),renderState:t()};return i&&(a.onMount=e=>i({props:s,current:e,...a}),a.onUpdate=e=>i(e)),a})(e,t,s,r);return i?n():R(n)},r3=(e,t)=>
9t&&"number"==typeof e?t.transform(e):e,r6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},r8=ev.length;function r5(e,t,i){let{style:s,vars:r,transformOrigin:n}=e,a=!1,o=!1;for(let e in t){let i=t[e];if(ew.has(e)){a=!0;continue}if(tO(e)){r[e]=i;continue}{let t=r3(i,tj[e]);e.startsWith("origin")?(o=!0,n[e]=t):s[e]=t}}if(!t.transform&&(a||i?s.transform=function(e,t,i){let s="",r=!0;for(let n=0;n<r8;n++){let a=ev[n],o=e[a];if(void 0===o)continue;let l=!0;if(!(l="number"==typeof o?o===+!!a.startsWith("scale"):0===parseFloat(o))||i){let e=r3(o,tj[a]);if(!l){r=!1;let t=r6[a]||a;s+=`${t}(${e}) `}i&&(t[a]=e)}}return s=s.trim(),i?s=i(t,r?"":s):r&&(s="none"),s}(t,e.transform,i):s.transform&&(s.transform="none")),o){let{originX:e="50%",originY:t="50%",originZ:i=0}=n;s.transformOrigin=`${e} ${t} ${i}`}}let r7={offset:"stroke-dashoffset",array:"stroke-dasharray"},r9={offset:"strokeDashoffset",array:"strokeDasharray"};function ne(e,t,i){return"string"==typeof e?e:ti.transform(t+i*e)}function nt(e,{attrX:t,attrY:i,attrScale:s,originX:r,originY:n,pathLength:a,pathSpacing:o=1,pathOffset:l=0,...h},u,c){let d,m;if(r5(e,h,c),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:p,style:f,dimensions:g}=e;p.transform&&(g&&(f.transform=p.transform),delete p.transform),g&&(void 0!==r||void 0!==n||f.transform)&&(d=ne(void 0!==r?r:.5,g.x,g.width),m=ne(void 0!==n?n:.5,g.y,g.height),f.transformOrigin=`${d} ${m}`),void 0!==t&&(p.x=t),void 0!==i&&(p.y=i),void 0!==s&&(p.scale=s),void 0!==a&&function(e,t,i=1,s=0,r=!0){e.pathLength=1;let n=r?r7:r9;e[n.offset]=ti.transform(-s);let a=ti.transform(t),o=ti.transform(i);e[n.array]=`${a} ${o}`}(p,a,o,l,!1)}let ni=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ns=()=>({...ni(),attrs:{}}),nr=e=>"string"==typeof e&&"svg"===e.toLowerCase();function nn(e,{style:t,vars:i},s,r){for(let n in Object.assign(e.style,t,r&&r.getProjectionStyles(s)),i)e.style.setProperty(n,i[n])}let na=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 no(e,t,i,s){for(let i in nn(e,t,void 0,s),t.attrs)e.setAttribute(na.has(i)?i:eB(i),t.attrs[i])}function nl(e,{layout:t,layoutId:i}){return ew.has(e)||e.startsWith("origin")||(t||void 0!==i)&&(!!sM[e]||"opacity"===e)}function nh(e,t,i){var s;let{style:r}=e,n={};for(let a in r)(eL(r[a])||t.style&&eL(t.style[a])||nl(a,e)||(null==(s=null==i?void 0:i.getValue(a))?void 0:s.liveStyle)!==void 0)&&(n[a]=r[a]);return n}function nu(e,t,i){let s=nh(e,t,i);for(let i in e)(eL(e[i])||eL(t[i]))&&(s[-1!==ev.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]);return s}let nc=["x","y","width","height","cx","cy","r"],nd={useVisualState:r4({scrapeMotionValuesFromProps:nu,createRenderState:ns,onUpdate:({props:e,prevProps:t,current:i,renderState:s,latestValues:r})=>{if(!i)return;let n=!!e.drag;if(!n){for(let e in r)if(ew.has(e)){n=!0;break}}if(!n)return;let a=!t;if(t)for(let i=0;i<nc.length;i++){let s=nc[i];e[s]!==t[s]&&(a=!0)}a&&ek.read(()=>{try{s.dimensions="function"==typeof i.getBBox?i.getBBox():i.getBoundingClientRect()}catch(e){s.dimensions={x:0,y:0,width:0,height:0}}ek.render(()=>{nt(s,r,nr(i.tagName),e.transformTemplate),no(i,s)})})}})},nm={useVisualState:r4({scrapeMotionValuesFromProps:nh,createRenderState:ni})};function np(e,t,i){for(let s in t)eL(t[s])||nl(s,i)||(e[s]=t[s])}let nf=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 ng(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||nf.has(e)}let nx=e=>!ng(e);try{(r=(()=>{let e=Error("Cannot find module '@emotion/is-prop-valid'");throw e.code="MODULE_NOT_FOUND",e})().default)&&(nx=e=>e.startsWith("on")?!ng(e):r(e))}catch(e){}let ny={current:null},nv={current:!1},nw=[...tW,to,tg],nb=new WeakMap,nj=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class nT{scrapeMotionValuesFromProps(e,t,i){return{}}constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:r,visualState:n},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=tB,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=eN.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ek.render(this.render,!1,!0))};const{latestValues:o,renderState:l,onUpdate:h}=n;this.onUpdate=h,this.latestValues=o,this.baseTarget={...o},this.initialValues=t.initial?{...o}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=rK(t),this.isVariantNode=rG(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in c){const t=c[e];void 0!==o[e]&&eL(t)&&t.set(o[e],!1)}}mount(e){this.current=e,nb.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.forEac
9h((e,t)=>this.bindToMotionValue(t,e)),nv.current||function(){if(nv.current=!0,_)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ny.current=e.matches;e.addListener(t),t()}else ny.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ny.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in nb.delete(this.current),this.projection&&this.projection.unmount(),eS(this.notifyUpdate),eS(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){let i;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let s=ew.has(e),r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ek.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),n=t.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),n(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in rQ){let t=rQ[e];if(!t)continue;let{isEnabled:i,Feature:s}=t;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):so()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<nj.length;t++){let i=nj[t];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s=e["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=function(e,t,i){for(let s in t){let r=t[s],n=i[s];if(eL(r))e.addValue(s,r);else if(eL(n))e.addValue(s,eF(r,{owner:e}));else if(n!==r)if(e.hasValue(s)){let t=e.getValue(s);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{let t=e.getStaticValue(s);e.addValue(s,eF(void 0!==t?t:r,{owner:e}))}}for(let s in i)void 0===t[s]&&e.removeValue(s);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let i=this.values.get(e);t!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return void 0===i&&void 0!==t&&(i=eF(null===t?void 0:t,{owner:this}),this.addValue(e,i)),i}readValue(e,t){var i;let s=void 0===this.latestValues[e]&&this.current?null!=(i=this.getBaseTargetFromProps(this.props,e))?i:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=s){let i,r;if("string"==typeof s&&(i=s,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i)||(r=s,/^0[^.\s]+$/u.test(r))))s=parseFloat(s);else{let i;i=s,!nw.find(t$(i))&&tg.test(t)&&(s=tk(e,t))}this.setBaseTarget(e,eL(s)?s.get():s)}return eL(s)?s.get():s}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let i,{initial:s}=this.props;if("string"==typeof s||"object"==typeof s){let r=J(this.props,s,null==(t=this.presenceContext)?void 0:t.custom);r&&(i=r[e])}if(s&&void 0!==i)return i;let r=this.getBaseTargetFromProps(this.props,e);return void 0===r||eL(r)?void 0!==this.initialValues[e]&&void 0===i?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new eR),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class nA extends nT{constructor(){super(...arguments),this.KeyframeResolver=tY}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;eL(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class nk extends nA{constructor(){super(...arguments),this.type="html",this.renderInstance=nn}readValueFromInstance(e,t){if(ew.has(t)){let e=tA(t);return e&&e.default||0}{let i=window.getComputedStyle(e),s=(tO(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof s?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:t}){return sw(e,t)}build(e,t,i){r5(e,t,i.transformTemplate)}scrapeMotionValuesFromProps(e,t,i){return nh(e,t,i)}}class nS extends nA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=so}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ew.has(t)){let e=tA(t);return e&&e.default||0}return t=na.has(t)?t:eB(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,i){return nu(e,t,i)}build(e,t,i){nt(e,t,this.isSVGTag,i.transformTemplate)}renderInstance(e,t,i,s){no(e,t,i,s)}mount(e){this.isSVGTag=nr(e.tagName),super.mount(e)}}let nP=function(e){if("u"<typeof Proxy)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(i,s)=>"create"===s?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}((n={animation:{Feature:class extends i_{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:i})=>(function(e,t,i={}){let s;if(e.notify("AnimationStart",t),Array.isArray(t))s=Promise.all(t.map(t=>iI(e,t,i)));else if("string"==typeof t)s=iI(e,t,i);else{let r="function"==typeof t?Q(e,t,i.custom):t;s=Promise.all(iL(e,r,i))}return s.then(()=>
9{e.notify("AnimationComplete",t)})})(e,t,i))),i=iU(),s=!0,r=t=>(i,s)=>{var r;let n=Q(e,s,"exit"===t?null==(r=e.presenceContext)?void 0:r.custom:void 0);if(n){let{transition:e,transitionEnd:t,...s}=n;i={...i,...s,...t}}return i};function n(n){let{props:a}=e,o=function e(t){if(!t)return;if(!t.isControllingVariants){let i=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(i.initial=t.props.initial),i}let i={};for(let e=0;e<iH;e++){let s=et[e],r=t.props[s];(G(r)||!1===r)&&(i[s]=r)}return i}(e.parent)||{},l=[],h=new Set,u={},c=1/0;for(let t=0;t<iz;t++){var d,m;let p=iO[t],f=i[p],g=void 0!==a[p]?a[p]:o[p],x=G(g),y=p===n?f.isActive:null;!1===y&&(c=t);let v=g===o[p]&&g!==a[p]&&x;if(v&&s&&e.manuallyAnimateOnMount&&(v=!1),f.protectedKeys={...u},!f.isActive&&null===y||!g&&!f.prevProp||Z(g)||"boolean"==typeof g)continue;let w=(d=f.prevProp,"string"==typeof(m=g)?m!==d:!!Array.isArray(m)&&!K(m,d)),b=w||p===n&&f.isActive&&!v&&x||t>c&&x,j=!1,T=Array.isArray(g)?g:[g],A=T.reduce(r(p),{});!1===y&&(A={});let{prevResolvedValues:k={}}=f,S={...k,...A},P=t=>{b=!0,h.has(t)&&(j=!0,h.delete(t)),f.needsAnimating[t]=!0;let i=e.getValue(t);i&&(i.liveStyle=!1)};for(let e in S){let t=A[e],i=k[e];if(!u.hasOwnProperty(e))(Y(t)&&Y(i)?K(t,i):t===i)?void 0!==t&&h.has(e)?P(e):f.protectedKeys[e]=!0:null!=t?P(e):h.add(e)}f.prevProp=g,f.prevResolvedValues=A,f.isActive&&(u={...u,...A}),s&&e.blockInitialAnimation&&(b=!1);let C=!(v&&w)||j;b&&C&&l.push(...T.map(e=>({animation:e,options:{type:p}})))}if(h.size){let t={};h.forEach(i=>{let s=e.getBaseTarget(i),r=e.getValue(i);r&&(r.liveStyle=!0),t[i]=null!=s?s:null}),l.push({animation:t})}let p=!!l.length;return s&&(!1===a.initial||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(p=!1),s=!1,p?t(l):Promise.resolve()}return{animateChanges:n,setActive:function(t,s){var r;if(i[t].isActive===s)return Promise.resolve();null==(r=e.variantChildren)||r.forEach(e=>{var i;return null==(i=e.animationState)?void 0:i.setActive(t,s)}),i[t].isActive=s;let a=n(t);for(let e in i)i[e].protectedKeys={};return a},setAnimateFunction:function(i){t=i(e)},getState:()=>i,reset:()=>{i=iU(),s=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Z(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null==(e=this.unmountControls)||e.call(this)}}},exit:{Feature:class extends i_{constructor(){super(...arguments),this.id=i$++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;let s=this.node.animationState.setActive("exit",!e);t&&!e&&s.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends i_{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.unmount();let{viewport:i={}}=this.node.getProps(),{root:s,margin:r,amount:n="some",once:a}=i,o={root:s?s.current:void 0,rootMargin:r,threshold:"number"==typeof n?n:rW[n]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,a&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:i,onViewportLeave:s}=this.node.getProps(),r=t?i:s;r&&r(e)};return e=this.node.current,t=function({root:e,...t}){let i=e||document;rU.has(i)||rU.set(i,{});let s=rU.get(i),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(r$,{root:e,...t})),s[r]}(o),rq.set(e,l),t.observe(e),()=>{rq.delete(e),t.unobserve(e)}}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}(e,t))&&this.startObserver()}unmount(){}}}
9,tap:{Feature:class extends i_{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,i={}){let[s,r,n]=rV(e,i),a=e=>{let s=e.currentTarget;if(!rO(e)||rI.has(s))return;rI.add(s);let n=t(e),a=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),rO(e)&&rI.has(s)&&(rI.delete(s),"function"==typeof n&&n(e,{success:t}))},o=e=>{a(e,i.useGlobalTarget||rF(s,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",l,r)};return s.forEach(e=>{rL.has(e.tagName)||-1!==e.tabIndex||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(i.useGlobalTarget?window:e).addEventListener("pointerdown",a,r),e.addEventListener("focus",e=>((e,t)=>{let i=e.currentTarget;if(!i)return;let s=rB(()=>{if(rI.has(i))return;rH(i,"down");let e=rB(()=>{rH(i,"up")});i.addEventListener("keyup",e,t),i.addEventListener("blur",()=>rH(i,"cancel"),t)});i.addEventListener("keydown",s,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),t)})(e,r),r)}),n}(e,e=>(rz(this.node,e,"Start"),(e,{success:t})=>rz(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends i_{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){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=t5(iY(this.node.current,"focus",()=>this.onFocus()),iY(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends i_{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,i={}){let[s,r,n]=rV(e,i),a=rR(e=>{let{target:i}=e,s=t(e);if("function"!=typeof s||!i)return;let n=rR(e=>{s(e),i.removeEventListener("pointerleave",n)});i.addEventListener("pointerleave",n,r)});return s.forEach(e=>{e.addEventListener("pointerenter",a,r)}),n}(e,e=>(rD(this.node,e,"Start"),e=>rD(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends i_{constructor(){super(...arguments),this.removePointerDownListener=ei}onPointerDown(e){this.session=new iJ(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sb(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:sk(e),onStart:sk(t),onMove:i,onEnd:(e,t)=>{delete this.session,s&&ek.postRender(()=>s(e,t))}}}mount(){this.removePointerDownListener=iG(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends i_{constructor(e){super(e),this.removeGroupControls=ei,this.removeListeners=ei,this.controls=new sT(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ei}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:rM,MeasureLayout:sF},layout:{ProjectionNode:rM,MeasureLayout:sF}},a=(e,t)=>r2(e)?new nS(t):new nk(t,{allowProjection:e!==f.Fragment}),function(e,{forwardMotionProps:t}={forwardMotionProps:!1}){return function({preloadedFeatures:e,createVisualElement:t,useRender:i,useVisualState:s,Component:r}){var n,a;function o(e,n){var a;let o,l={...(0,f.useContext)(L),...e,layoutId:function({layoutId:e}){let t=(0,f.useContext)(V).id;return t&&void 0!==e?t+"-"+e:e}(e)},{isStatic:h}=l,u=function(e){let{initial:t,animate:i}=function(e,t){if(rK(e)){let{initial:t,animate:i}=e;return{initial:!1===t||G(t)?t:void 0,animate:G(i)?i:void 0}}return!1!==e.inherit?t:{}}(e,(0,f.useContext)(rY));return(0,f.useMemo)(()=>({initial:t,animate:i}),[rX(t),rX(i)])}(e),c=s(e,h);if(!h&&_){(0,f.useContext)(rZ).strict;let e=function(e){let{drag:t,layout:i}=rQ;if(!t&&!i)return{};let s={...t,...i};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==i?void 0:i.isEnabled(e))?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}
9(l);o=e.MeasureLayout,u.visualElement=function(e,t,i,s,r){var n,a;let{visualElement:o}=(0,f.useContext)(rY),l=(0,f.useContext)(rZ),h=(0,f.useContext)(D),u=(0,f.useContext)(L).reducedMotion,c=(0,f.useRef)(null);s=s||l.renderer,!c.current&&s&&(c.current=s(e,{visualState:t,parent:o,props:i,presenceContext:h,blockInitialAnimation:!!h&&!1===h.initial,reducedMotionConfig:u}));let d=c.current,m=(0,f.useContext)(sP);d&&!d.projection&&r&&("html"===d.type||"svg"===d.type)&&function(e,t,i,s){let{layoutId:r,layout:n,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:h}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:r,layout:n,alwaysMeasureLayout:!!a||o&&i4(o),visualElement:e,animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:h})}(c.current,i,r,m);let p=(0,f.useRef)(!1);(0,f.useInsertionEffect)(()=>{d&&p.current&&d.update(i,h)});let g=i[eH],x=(0,f.useRef)(!!g&&!(null==(n=window.MotionHandoffIsComplete)?void 0:n.call(window,g))&&(null==(a=window.MotionHasOptimisedAnimation)?void 0:a.call(window,g)));return $(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),sV.render(d.render),x.current&&d.animationState&&d.animationState.animateChanges())}),(0,f.useEffect)(()=>{d&&(!x.current&&d.animationState&&d.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var e;null==(e=window.MotionHandoffMarkAsComplete)||e.call(window,g)}),x.current=!1))}),d}(r,c,l,t,e.ProjectionNode)}return(0,m.jsxs)(rY.Provider,{value:u,children:[o&&u.visualElement?(0,m.jsx)(o,{visualElement:u.visualElement,...l}):null,i(r,e,(a=u.visualElement,(0,f.useCallback)(e=>{e&&c.onMount&&c.onMount(e),a&&(e?a.mount(e):a.unmount()),n&&("function"==typeof n?n(e):i4(n)&&(n.current=e))},[a])),c,h,u.visualElement)]})}e&&function(e){for(let t in e)rQ[t]={...rQ[t],...e[t]}}(e),o.displayName=`motion.${"string"==typeof r?r:`create(${null!=(a=null!=(n=r.displayName)?n:r.name)?a:""})`}`;let l=(0,f.forwardRef)(o);return l[r0]=r,l}({...r2(e)?nd:nm,preloadedFeatures:n,useRender:function(e=!1){return(t,i,s,{latestValues:r},n)=>{let a=(r2(t)?function(e,t,i,s){let r=(0,f.useMemo)(()=>{let i=ns();return nt(i,t,nr(s),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){let t={};np(t,e.style,e),r.style={...t,...r.style}}return r}:function(e,t){let i,s,r={},n=(i=e.style||{},np(s={},i,e),Object.assign(s,function({transformTemplate:e},t){return(0,f.useMemo)(()=>{let i=ni();return r5(i,t,e),Object.assign({},i.vars,i.style)},[t])}(e,t)),s);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r})(i,r,n,t),o=function(e,t,i){let s={};for(let r in e)("values"!==r||"object"!=typeof e.values)&&(nx(r)||!0===i&&ng(r)||!t&&!ng(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}(i,"string"==typeof t,e),l=t!==f.Fragment?{...o,...a,ref:s}:{},{children:h}=i,u=(0,f.useMemo)(()=>eL(h)?h.get():h,[h]);return(0,f.createElement)(t,{...l,children:u})}}(t),createVisualElement:a,Component:e})}));var nC=e.i(377349),nE=e.i(604140),nN=e.i(482155),nM=e.i(337707),nV=e.i(666583);function nR(){return(0,m.jsxs)(P.Dialog.Root,{onOpenChange:e=>!e,children:[(0,m.jsx)(P.Dialog.Trigger,{children:(0,m.jsx)(T.Button,{type:"button",variant:"soft",size:"2",radius:"full",children:(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[(0,m.jsx)(p.default,{src:"/static/icons/wallets/meta-mask.svg",alt:"MetaMask",width:16,height:16}),(0,m.jsx)(A.Text,{weight:"bold",wrap:"nowrap",style:{color:"var(--gray-12)"},children:"Add TurboChain"})]})})}),(0,m.jsxs)(P.Dialog.Content,{minWidth:{initial:"300px",xs:"330px"},maxHeight:{initial:"90vh",xs:"80vh"},className:"p-8","aria-describedby":void 0,children:[(0,m.jsx)(M.VisuallyHidden,{children:(0,m.jsx)(P.Dialog.Title,{children:"Add TurboChain to your MetaMask wallet"})}),(0,m.jsxs)(C.Flex,{direction:"column",align:"center",gap:"5",children:[(0,m.jsxs)(C.Flex,{direction:"column",align:"center",gap:"4",children:[(0,m.jsxs)(E.Heading,{as:"h2",size:"6",className:"text-center font-black",children:["Add TurboCh
9ain",(0,m.jsx)("br",{})," to your MetaMask wallet"]}),(0,m.jsx)(nD,{})]}),(0,m.jsxs)(C.Flex,{direction:"column",align:"center",gap:"2",children:[(0,m.jsx)(A.Text,{size:"2",weight:"bold",align:"center",className:"max-w-96",children:"You can also add the network manually:"}),(0,m.jsxs)(A.Text,{size:"2",color:"gray",weight:"medium",align:"center",className:"max-w-80",children:["Open MetaMask and go to"," ",(0,m.jsx)(A.Text,{style:{color:"var(--gray-12)"},children:"Settings > Networks"}),", then add and save the following details:"]})]}),(0,m.jsxs)(C.Flex,{direction:"column",align:"stretch",className:"w-full",children:[(0,m.jsx)(N.Separator,{className:"w-full"}),(0,m.jsxs)(C.Flex,{py:"3",children:[(0,m.jsxs)(C.Flex,{direction:"column",gap:"1",flexGrow:"1",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",color:"gray",children:"Network Name"}),(0,m.jsx)(A.Text,{size:"2",weight:"bold",children:nM.turbo.name})]}),(0,m.jsx)(C.Flex,{children:(0,m.jsx)(nN.CopyIconButton,{copyValue:nM.turbo.name})})]}),(0,m.jsx)(N.Separator,{className:"w-full"}),(0,m.jsxs)(C.Flex,{py:"3",children:[(0,m.jsxs)(C.Flex,{direction:"column",gap:"1",flexGrow:"1",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",color:"gray",children:"RPC URL"}),(0,m.jsx)(A.Text,{size:"2",weight:"bold",children:nM.turbo.rpcUrls.default.http[0]})]}),(0,m.jsx)(C.Flex,{children:(0,m.jsx)(nN.CopyIconButton,{copyValue:nM.turbo.rpcUrls.default.http[0]})})]}),(0,m.jsx)(N.Separator,{className:"w-full"}),(0,m.jsxs)(C.Flex,{py:"3",children:[(0,m.jsxs)(C.Flex,{direction:"column",gap:"1",flexGrow:"1",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",color:"gray",children:"Chain ID"}),(0,m.jsx)(A.Text,{size:"2",weight:"bold",children:nM.turbo.id})]}),(0,m.jsx)(C.Flex,{children:(0,m.jsx)(nN.CopyIconButton,{copyValue:nM.turbo.id.toString()})})]}),(0,m.jsx)(N.Separator,{className:"w-full"}),(0,m.jsxs)(C.Flex,{py:"3",children:[(0,m.jsxs)(C.Flex,{direction:"column",gap:"1",flexGrow:"1",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",color:"gray",children:"Currency Symbol"}),(0,m.jsx)(A.Text,{size:"2",weight:"bold",children:nM.turbo.nativeCurrency.symbol})]}),(0,m.jsx)(C.Flex,{children:(0,m.jsx)(nN.CopyIconButton,{copyValue:nM.turbo.nativeCurrency.symbol})})]}),(0,m.jsx)(N.Separator,{className:"w-full"}),(0,m.jsxs)(C.Flex,{py:"3",children:[(0,m.jsxs)(C.Flex,{direction:"column",gap:"1",flexGrow:"1",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",color:"gray",children:"Block Explorer URL"}),(0,m.jsx)(A.Text,{size:"2",weight:"bold",children:nM.turbo.blockExplorers.default.url})]}),(0,m.jsx)(C.Flex,{children:(0,m.jsx)(nN.CopyIconButton,{copyValue:nM.turbo.blockExplorers.default.url})})]}),(0,m.jsx)(N.Separator,{className:"w-full"})]})]})]})]})}function nD(){let{switchChainAsync:e}=(0,nE.useSwitchChain)(),[t,i]=(0,f.useTransition)(),{signIn:s,connectors:r,state:n}=(0,nV.useConnectWallet)(),[a,o]=(0,f.useState)(null),[l,h]=(0,f.useState)(!1);return(0,m.jsxs)(C.Flex,{direction:"column",align:"center",gap:"2",children:[(0,m.jsx)(T.Button,{type:"button",variant:l?"soft":"solid",color:l?"green":void 0,size:"3",onClick:()=>{o(null),h(!1),i(async()=>{try{if(null==n.address){var t;await s({id:nV.ChainType.EVM,connector:(t=r).find(e=>"injected"===e.id)??t[0]})}else if(n.chainType!==nV.ChainType.EVM)return void o("Please connect an EVM wallet first, like MetaMask.");await e({chainId:nM.turbo.id,addEthereumChainParameter:{chainName:nM.turbo.name,nativeCurrency:nM.turbo.nativeCurrency,rpcUrls:nM.turbo.rpcUrls.default.http,blockExplorerUrls:[nM.turbo.blockExplorers.default.url]}}),h(!0)}catch(e){e instanceof nC.ProviderNotFoundError?o("Please install an EVM wallet first, like MetaMask."):o("Couldn't add chain automatically. Please try adding manually using the details below.")}})},disabled:t,children:(0,m.jsxs)("div",{className:"grid grid-cols-1 grid-rows-1 items-center justify-items-center w-full",children:[(0,m.jsxs)("div",{className:`col-start-1 row-start-1 inline-flex items-center justify-center gap-2 transition-opacity duration-200 ${l?"opacity-0":"opacity-100"}`,children:[(0,m.jsx)(p.default,{src:"/static/icons/wallets/meta-mask.svg",alt:"MetaMask",width:16,height:16}),(0,m.jsx)(A.Text,{weight:"bold",wrap:"nowrap",children:"Add to MetaMask"})]}),(0,m.jsxs)("div",{className:`col-start-1 row-start-1 inline-flex items-center justify-center gap-2 transition-opacity duration-200 ${l?"opacity-100":"opacity-0"}`,children:[(0,m.jsx)(k.CheckIcon,{width:16,height:16}),(0,m.jsx)(A.Text,{weight:"bold",wrap:"nowrap",children:"Chain Added"})]})]})}),(0,m.jsx)(W,{mode:"sync",children:a&&(0,m.jsx)(nP.div,{initial:{scale:.95,opacity:0}
9,animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},layout:!0,children:(0,m.jsxs)(S.Callout.Root,{color:"yellow",role:"alert",size:"1",children:[(0,m.jsx)(S.Callout.Icon,{children:(0,m.jsx)(k.InfoCircledIcon,{})}),(0,m.jsx)(S.Callout.Text,{weight:"medium",children:a})]})})})]})}var nF=e.i(522016);let nL="/account",nI="/history",nB="/deposit",nH="/otc/create-order",nO=()=>{let{whitelabelTemplate:e}=(0,f.useContext)(g.FeatureFlagsContext);return"solswap"===e?(0,m.jsxs)(nF.default,{href:"/",children:[(0,m.jsx)(p.default,{src:"/static/templates/solswap/logo_dark.svg",alt:"Solswap Logo",width:100,height:32,className:"hidden dark:block"}),(0,m.jsx)(p.default,{src:"/static/templates/solswap/logo.svg",alt:"Solswap Logo",width:100,height:32,className:"dark:hidden"})]}):"turboswap"===e?(0,m.jsxs)(nF.default,{href:"/",children:[(0,m.jsx)(p.default,{src:"/static/templates/turboswap/logo_dark.svg",alt:"Turboswap Logo",width:120,height:32,className:"hidden dark:block"}),(0,m.jsx)(p.default,{src:"/static/templates/turboswap/logo.svg",alt:"Turboswap Logo",width:120,height:32,className:"dark:hidden"})]}):"dogecoinswap"===e?(0,m.jsxs)(nF.default,{href:"/",children:[(0,m.jsx)(p.default,{src:"/static/templates/dogecoinswap/logo_dark.svg",alt:"Dogecoinswap Logo",width:118,height:32,className:"hidden dark:block"}),(0,m.jsx)(p.default,{src:"/static/templates/dogecoinswap/logo.svg",alt:"Dogecoinswap Logo",width:118,height:32,className:"dark:hidden"})]}):"trumpswap"===e?(0,m.jsxs)(nF.default,{href:"/",children:[(0,m.jsx)(p.default,{src:"/static/templates/trumpswap/logo_dark.svg",alt:"TrumpSwap Logo",width:126,height:32,className:"hidden dark:block"}),(0,m.jsx)(p.default,{src:"/static/templates/trumpswap/logo.svg",alt:"TrumpSwap Logo",width:126,height:32,className:"dark:hidden"})]}):"rabitswap"===e?(0,m.jsxs)(nF.default,{href:"/",children:[(0,m.jsx)(p.default,{src:"/static/templates/rabitswap/logo_dark.svg",alt:"RabitSwap Logo",width:126,height:32,className:"hidden dark:block"}),(0,m.jsx)(p.default,{src:"/static/templates/rabitswap/logo.svg",alt:"RabitSwap Logo",width:126,height:32,className:"dark:hidden"})]}):"omniswap"===e?(0,m.jsxs)(nF.default,{href:"/",children:[(0,m.jsx)(p.default,{src:"/static/templates/omniswap/logo_dark.svg",alt:"OmniSwap Logo",width:140,height:30,className:"hidden dark:block"}),(0,m.jsx)(p.default,{src:"/static/templates/omniswap/logo.svg",alt:"OmniSwap Logo",width:140,height:30,className:"dark:hidden"})]}):(0,m.jsxs)(nF.default,{href:"/",children:[(0,m.jsx)(p.default,{src:"/static/templates/near-intents/logo_dark.svg",alt:"Near Intent Logo",width:125,height:32,className:"hidden dark:block"}),(0,m.jsx)(p.default,{src:"/static/templates/near-intents/logo.svg",alt:"Near Intent Logo",width:125,height:32,className:"dark:hidden"})]})};var nz=e.i(874154),nq=e.i(769464);let nU=new Map([["bold",f.createElement(f.Fragment,null,f.createElement("path",{d:"M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204ZM79.51,144.49a12,12,0,1,1,17-17L112,143l47.51-47.52a12,12,0,0,1,17,17l-56,56a12,12,0,0,1-17,0Z"}))],["duotone",f.createElement(f.Fragment,null,f.createElement("path",{d:"M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z",opacity:"0.2"}),f.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0ZM82.34,141.66a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32l-56,56a8,8,0,0,1-11.32,0Z"}))],["fill",f.createElement(f.Fragment,null,f.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm-34.32,69.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",f.createElement(f.Fragment,null,f.createElement("path",{d:"M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76Z"}))],["regular",f.createElement(f.Fragment,null,f.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0ZM82.34,141.66a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32l-56,56a8,8,0,0,1-11.32,0Z"}))],["thin",f.createElement(f.Fragment,null,f.createElement("path",{d:"M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-41.17-10.83a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17Z"}))]]),n_=f.forwardRef((e,t)=>
9f.createElement(nq.default,{ref:t,...e,weights:nU}));n_.displayName="ShieldCheckIcon";var n$=e.i(555897),nW=e.i(286179),nZ=e.i(66678),nY=e.i(343794),nK=e.i(981140),nG=e.i(820783),nX=e.i(30030),nJ=e.i(369340),nQ=e.i(635804),n0=e.i(248425),n1="Switch",[n2,n4]=(0,nX.createContextScope)(n1),[n3,n6]=n2(n1),n8=f.forwardRef((e,t)=>{let{__scopeSwitch:i,name:s,checked:r,defaultChecked:n,required:a,disabled:o,value:l="on",onCheckedChange:h,form:u,...c}=e,[d,p]=f.useState(null),g=(0,nG.useComposedRefs)(t,e=>p(e)),x=f.useRef(!1),y=!d||u||!!d.closest("form"),[v,w]=(0,nJ.useControllableState)({prop:r,defaultProp:n??!1,onChange:h,caller:n1});return(0,m.jsxs)(n3,{scope:i,checked:v,disabled:o,children:[(0,m.jsx)(n0.Primitive.button,{type:"button",role:"switch","aria-checked":v,"aria-required":a,"data-state":ae(v),"data-disabled":o?"":void 0,disabled:o,value:l,...c,ref:g,onClick:(0,nK.composeEventHandlers)(e.onClick,e=>{w(e=>!e),y&&(x.current=e.isPropagationStopped(),x.current||e.stopPropagation())})}),y&&(0,m.jsx)(n9,{control:d,bubbles:!x.current,name:s,value:l,checked:v,required:a,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});n8.displayName=n1;var n5="SwitchThumb",n7=f.forwardRef((e,t)=>{let{__scopeSwitch:i,...s}=e,r=n6(n5,i);return(0,m.jsx)(n0.Primitive.span,{"data-state":ae(r.checked),"data-disabled":r.disabled?"":void 0,...s,ref:t})});n7.displayName=n5;var n9=f.forwardRef(({__scopeSwitch:e,control:t,checked:i,bubbles:s=!0,...r},n)=>{let a,o=f.useRef(null),l=(0,nG.useComposedRefs)(o,n),h=(a=f.useRef({value:i,previous:i}),f.useMemo(()=>(a.current.value!==i&&(a.current.previous=a.current.value,a.current.value=i),a.current.previous),[i])),u=(0,nQ.useSize)(t);return f.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(h!==i&&t){let r=new Event("click",{bubbles:s});t.call(e,i),e.dispatchEvent(r)}},[h,i,s]),(0,m.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i,...r,tabIndex:-1,ref:l,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function ae(e){return e?"checked":"unchecked"}n9.displayName="SwitchBubbleInput",e.s(["Root",0,n8,"Switch",0,n8,"SwitchThumb",0,n7,"Thumb",0,n7,"createSwitchScope",0,n4],57287);var at=e.i(57287),at=at,ai=e.i(513216),as=e.i(651982),ar=e.i(369931),an=e.i(513888),aa=e.i(510712);let ao={size:{type:"enum",className:"rt-r-size",values:["1","2","3"],default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:["classic","surface","soft"],default:"surface"},...ar.colorPropDef,...an.highContrastPropDef,...aa.radiusPropDef},al=f.forwardRef((e,t)=>{let{className:i,color:s,radius:r,...n}=(0,ai.extractProps)(e,ao,as.marginPropDefs);return f.createElement(at.Root,{"data-accent-color":s,"data-radius":r,...n,asChild:!1,ref:t,className:(0,nY.default)("rt-reset","rt-SwitchRoot",i)},f.createElement(at.Thumb,{className:(0,nY.default)("rt-SwitchThumb",{"rt-high-contrast":e.highContrast})}))});al.displayName="Switch";var ah=e.i(34154),au=e.i(363178),ac=e.i(225435),ad=e.i(714541),am=e.i(981586);let ap="https://status.near-intents.org/posts/dashboard";function af(){return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(af.Desktop,{}),(0,m.jsx)(af.Mobile,{})]})}function ag(e){return e?.status==="maintenance"?(0,m.jsx)("span",{className:"bg-yellow-400 w-2 h-2 rounded-full"}):e?.status==="incident"?(0,m.jsx)("span",{className:"bg-red-500 w-2 h-2 rounded-full"}):(0,m.jsx)("span",{className:"bg-blue-400 w-2 h-2 rounded-full"})}function ax(e){return e?.status==="maintenance"?(0,m.jsx)("span",{className:"text-blue-400",children:"Maintenance in progress"}):e?.status==="incident"?(0,m.jsx)("span",{className:"text-red-9",children:"Incident detected"}):(0,m.jsx)("span",{className:"text-blue-400",children:"All systems operational"})}function ay(e){let t=e.find(e=>"incident"===e.status);return t||e.find(e=>"maintenance"===e.status)||null}af.Desktop=function(){let e=(0,am.useSystemStatus)();return(0,m.jsx)("div",{className:"hidden md:block fixed bottom-0 left-0 mx-3 my-6 z-10",children:(0,m.jsx)(nF.default,{href:ap,target:"_blank",children:(0,m.jsx)("div",{className:"flex items-center gap-2 rounded-lg px-3 py-2 w-fit hover:bg-gray-a3 dark:hover:bg-gray-800 text-sm",children:(0,m.jsx)(af.StatusIndicator,{systemStatus:e,hideOperationalStatus:!0})})})})},af.Mobile=function(){let e=(0,am.useSystemStatus)();return(0,m.jsxs)("div",{className:"md:hidden flex flex-col gap-4",children:[(0,m.jsx)(N.Separator,{orientation:"horizontal",size:"4"}),(0,m.jsx)(nF.default,{href:ap,target:"_blank",children:(0,m.jsx)("div",{className:"text-xs",children:(0,m.jsx)(af.StatusIndicator,{systemStatus:e,mobile:!0,hideOperationalStatus:!0})})})]})},af.StatusIndicator=function({systemStatus:e,mobile:t=!1,hideOperationalStatus:i=!1}){let s=e?ay(e):null;return i&&null===s?null:t?(0,m.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[ag(s),ax(s),(0,m.jsx)(k.ExternalLinkIcon,{width:16,height:16})]}):(0,m.jsxs)("span",{className:"flex items-center gap-2",children:[ag(s),ax(s)]})};let av=()=>{let{setTheme:e,resolvedTheme:t}=(0,au.useTheme)(),i=t===ah.default.DARK;return(0,m.jsxs)("div",{className:"flex justify-between items-center gap-4",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",children:"Dark Mode"}),(0,m.jsx)(al,{size:"1",onCheckedChange:t=>{e(t?ah.default.DARK:ah.default.LIGHT)},checked:i})]})},aw=({internalUserAddress:e})=>{let[t,i]=(0,f.useState)(!1);return(0,m.jsxs)(m.Fragment,{children:[t&&(0,m.jsx)(ac.RevealAddressDialog,{internalUserAddress:e,onClose:()=>i(!1)}),(0,m.jsxs)(T.Button,{variant:"soft",color:"gray",radius:"full",className:"text-gray-12",onClick:()=>i(!0),children:[(0,m.jsx)(ad.IntentsIcon,{className:"rounded-full w-4 h-4"}),"Reveal Address"," ",t?(0,m.jsx)(n$.EyeIcon,{weight:"bold"}):(0,m.jsx)(nW.EyeSlashIcon,{weight:"bold"})]})]})},ab=()=>{let{whitelabelTemplate:e}=(0,f.useContext)(g.FeatureFlagsContext),t="bg-black w-[3px] h-[3px] rounded-full dark:bg-gray-100",{state:i}=(0,nV.useConnectWallet)(),{address:s,chainType:r}=i,n=null!=s&&null!=r?nz.authIdentity.authHandleToIntentsUserId(s,r):null;return(0,m.jsx)("div",{children:(0,m.jsxs)(nZ.Popover.Root,{children:[(0,m.jsx)(n
9Z.Popover.Trigger,{children:(0,m.jsxs)("button",{type:"button",className:"w-[32px] h-[32px] flex justify-center items-center rounded-full gap-1 bg-gray-a3 hover:bg-gray-a4 transition-colors",children:[(0,m.jsx)("span",{className:t}),(0,m.jsx)("span",{className:t}),(0,m.jsx)("span",{className:t})]})}),(0,m.jsx)(nZ.Popover.Content,{className:"min-w-[180px] mt-1 dark:bg-black-800 rounded-2xl",children:(0,m.jsxs)("div",{className:"flex flex-col gap-4",children:["turboswap"===e&&(0,m.jsxs)("div",{className:"md:hidden",children:[(0,m.jsx)(nR,{}),(0,m.jsx)(N.Separator,{orientation:"horizontal",size:"4",className:"mt-4"})]}),"rabitswap"===e&&n&&(0,m.jsx)(aw,{internalUserAddress:n}),"rabitswap"!==e&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(av,{}),n&&(0,m.jsx)(aw,{internalUserAddress:n}),(0,m.jsx)(N.Separator,{orientation:"horizontal",size:"4"})]}),(0,m.jsxs)("div",{className:"flex flex-col justify-between items-center gap-1.5",children:[(0,m.jsxs)("a",{href:"https://explorer.near-intents.org",target:"_blank",rel:"noopener noreferrer",className:"w-full flex justify-between items-center gap-2",children:[(0,m.jsxs)("span",{className:"flex items-center gap-2",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",children:"Explorer"}),(0,m.jsx)("span",{className:"text-xs font-medium text-white bg-primary rounded-full px-2 py-0.5",children:"new"})]}),(0,m.jsx)(k.ExternalLinkIcon,{width:16,height:16})]}),(0,m.jsxs)("a",{href:"https://docs.near-intents.org",target:"_blank",rel:"noopener noreferrer",className:"w-full flex justify-between items-center gap-2",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",children:"Docs"}),(0,m.jsx)(k.ExternalLinkIcon,{width:16,height:16})]}),(0,m.jsxs)("a",{href:"https://t.me/near_intents",target:"_blank",rel:"noopener noreferrer",className:"w-full flex justify-between items-center gap-2",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",children:"Help center"}),(0,m.jsx)(k.ExternalLinkIcon,{width:16,height:16})]}),(0,m.jsxs)("a",{href:"mailto:[email protected]",className:"w-full flex justify-between items-center gap-2",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",children:"Request feature"}),(0,m.jsx)(k.ExternalLinkIcon,{width:16,height:16})]}),(0,m.jsx)("a",{href:"/privacy-policy",className:"w-full flex justify-between items-center gap-2",children:(0,m.jsx)(A.Text,{size:"2",weight:"medium",children:"Privacy Policy"})}),(0,m.jsx)("a",{href:"/terms-of-service",className:"w-full flex justify-between items-center gap-2",children:(0,m.jsx)(A.Text,{size:"2",weight:"medium",children:"Terms of Service"})}),"near-intents"===e&&(0,m.jsxs)("a",{href:"/jobs",target:"_blank",rel:"noopener noreferrer",className:"w-full flex justify-between items-center gap-2",children:[(0,m.jsx)(A.Text,{size:"2",weight:"medium",children:"Jobs"}),(0,m.jsx)(k.ExternalLinkIcon,{width:16,height:16})]})]}),(0,m.jsx)(N.Separator,{orientation:"horizontal",size:"4"}),(0,m.jsx)("div",{className:"flex flex-col justify-between items-center gap-1.5",children:(0,m.jsxs)("a",{href:"https://hackenproof.com/programs/near-intents",target:"_blank",rel:"noopener noreferrer",className:"w-full flex justify-between items-center gap-2",children:[(0,m.jsxs)("span",{className:"flex items-center gap-2",children:[(0,m.jsx)(n_,{className:"w-4 h-4 text-muted-foreground","aria-hidden":"true"}),(0,m.jsx)(A.Text,{size:"2",weight:"medium",children:"Bug Bounty"})]}),(0,m.jsx)(k.ExternalLinkIcon,{width:16,height:16})]})}),(0,m.jsx)(af.Mobile,{})]})})]})})};function aj(){var e;let{state:t,signOut:i}=(0,nV.useConnectWallet)(),[s,r]=(0,f.useState)(!1);return(0,f.useEffect)(()=>r(!0),[]),{isHydrated:s,variant:s?void 0===(e=t.chainType)?"anonymous":"webauthn"===e?"passkey":"wallet":"anonymous",chainType:t.chainType,signOut:i}}var aT=e.i(770703),aA=e.i(649072);let ak=(0,aT.default)(()=>e.A(908150),{loadableGenerated:{modules:[999373]},ssr:!1,loading:()=>(0,m.jsx)(T.Button,{type:"button",variant:"solid",size:"2",radius:"full",children:(0,m.jsx)(A.Text,{weight:"bold",wrap:"nowrap",children:"Sign in"})})});function aS({navbarSlot:e,depositSlot:t}){let{whitelabelTemplate:i}=(0,f.useContext)(g.FeatureFlagsContext),{variant:s}=aj();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("header",{className:`${aA.default.header} h-[56px] fixed top-0 left-0 w-full md:relative border-b-[1px] z-50 border-gray-a3`,children:(0,m.jsxs)("div",{className:"h-full flex justify-between items-center px-3",children:[(0,m.jsx)("div",{className:"flex-shrink-0",children:(0,m.jsx)(nO,{})}),(0,m.jsx)("div",{className:"flex-grow flex justify-between items-center pl-8 pr-4",children:("near-intents"!==i||"anonymous"!==s)&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"flex-shrink-0",children:e}),(0,m.jsx)("div",{className:"flex-shrink-0",children:t})]})}),(0,m.jsxs)("div",{className:"flex justify-end items-center gap-4 flex-shrink-0",children:["turboswap"===i&&(0,m.jsx)("div",{className:"hidden md:block",children:(0,m.jsx)(nR,{})}),(0,m.jsx)(ak,{}),(0,m.jsx)(ab,{})]})]})}),(0,m.jsx)("div",{className:"block md:hidden h-[56px]"})]})}aS.DisplayNavbar=function({children:e}){return(0,m.jsx)("div",{className:"hidden md:flex flex-1 justify-center",children:e})},aS.DepositSlot=function({children:e}){return(0,m.jsxs)("div",{className:"hidden md:flex items-center justify-between",children:[e,(0,m.jsx)("div",{className:"h-[20px] w-[1px] bg-gray-5 ml-4"})]})};let aP=new Map([["bold",f.createElement(f.Fragment,null,f.createElement("path",{d:"M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z"}))],["duotone",f.createElement(f.Fragment,null,f.createElement("path",{d:"M208,80v96H48V80Z",opacity:"0.2"}),f.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["fill",f.createElement(f.Fragment,null,f.createElement("path",{d:"M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z"}))],["light",f.createElement(f.Fragment,null,f.createElement("path",{d:"M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z"}))],["regular",f.createElement(f.Fragment,null,f.createElement("path",{d:"M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z"}))],["thin",f.createElement(f.Fragment,null,f.createElement("path",{d:"M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z"}))]]),aC=f.forwardRef((e,t)=>
9f.createElement(nq.default,{ref:t,...e,weights:aP}));aC.displayName="ArrowsLeftRightIcon";var aE=e.i(425911),aN=e.i(356530),aM=e.i(618566);function aV(){let e=(0,aM.usePathname)();return{isActive:(0,f.useMemo)(()=>(t,i=!0)=>i?e===t:e.startsWith(t),[e])}}var aR=e.i(207670),aD=e.i(919056);function aF(...e){return(0,aD.twMerge)((0,aR.clsx)(e))}function aL(){let{isActive:e}=aV(),{whitelabelTemplate:t}=(0,f.useContext)(g.FeatureFlagsContext),{variant:i}=aj();if("near-intents"===t&&"anonymous"===i)return null;let s=e(nL),r=e("/")||e(nH),n=e(nI),a=e(nB);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"fixed bottom-0 z-50 left-0 md:hidden w-full px-5 pt-3 pb-[max(env(safe-area-inset-bottom,0px),theme(spacing.3))] bg-gray-1 border-t-[1px] border-gray-a3",children:(0,m.jsxs)("nav",{className:"flex justify-around items-center gap-4",children:[(0,m.jsx)(aI,{href:nL,label:"Account",isActive:s,iconSlot:(0,m.jsx)(aI.DisplayIcon,{children:(0,m.jsx)(aB,{active:s})})}),(0,m.jsx)(aI,{href:"/",label:"Trade",isActive:r,iconSlot:(0,m.jsx)(aI.DisplayIcon,{children:(0,m.jsx)(aC,{className:aF("size-4",r?"text-gray-12":"text-gray-11"),weight:"bold"})})}),(0,m.jsx)(aI,{href:nI,label:"History",isActive:n,iconSlot:(0,m.jsx)(aI.DisplayIcon,{children:(0,m.jsx)(aE.ClockCounterClockwise,{className:aF("size-4",n?"text-gray-12":"text-gray-11"),weight:"bold"})})}),(0,m.jsx)(aI,{href:nB,label:"Deposit",isActive:a,iconSlot:(0,m.jsx)(aI.DisplayIcon,{children:(0,m.jsx)("div",{className:aF("flex items-center justify-center w-4 h-4 rounded-full",a?"bg-gray-12":"bg-gray-11"),children:(0,m.jsx)(aN.Plus,{className:"size-3 text-gray-1",weight:"bold"})})})})]})}),(0,m.jsx)("div",{className:"block md:hidden h-[calc(44px+max(env(safe-area-inset-bottom,0px),theme(spacing.3)))]"})]})}function aI({href:e,label:t,isActive:i,iconSlot:s}){return(0,m.jsxs)(nF.default,{href:e,className:"flex flex-col items-center text-black",children:[(0,m.jsxs)("div",{className:"relative h-4",children:[(0,m.jsx)("div",{className:"pointer-events-none absolute top-0 right-0 bottom-0 w-4 h-4 bg-transparent"}),(0,m.jsx)("div",{className:"absolute bottom-0 left-0 right-0 flex justify-center mb-1",children:s})]}),(0,m.jsx)("span",{className:aF("text-sm",i?"font-medium text-gray-12":"font-medium text-gray-11"),children:t})]})}function aB({active:e}){return(0,m.jsx)("div",{className:aF("w-4 h-4  [mask-image:url(/static/icons/wallet_no_active.svg)] bg-no-repeat bg-contain",e?"bg-gray-12":"bg-gray-11")})}aI.DisplayIcon=({children:e})=>(0,m.jsx)("div",{className:"relative",children:e});var aH=e.i(996433),aO=e.i(467244),az=e.i(966540),aq=e.i(183769),aU=e.i(219298);let a_=e.g.__bus__?e.g.__bus__:new aU.EventEmitter;e.g.__bus__=a_;let a$=e.g.__bus__;var aW=e.i(875664);let aZ=["gift_created","deposit_initiated","deposit_success","gift_claimed","otc_deal_initiated","swap_initiated","swap_confirmed","otc_confirmed","withdrawal_initiated","withdrawal_confirmed"];var aY=e.i(691162),aK=e.i(330068);
9function aG({open:e,onCancel:t,onBypass:i}){return(0,m.jsx)(aY.Root,{open:e,children:(0,m.jsx)(aK.AlertDialog.Content,{className:"max-w-md p-6 sm:animate-none animate-slide-up",children:(0,m.jsx)(aX,{open:e,onCancel:t,onBypass:i})})})}function aX({open:e,onCancel:t,onBypass:i}){return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"flex flex-col items-center text-center mb-6",children:[(0,m.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950 p-3 rounded-full mb-4",children:(0,m.jsx)(k.ExclamationTriangleIcon,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})}),(0,m.jsx)(aY.Title,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:"Not Supported Wallet Address"}),(0,m.jsx)(aY.Description,{className:"mt-2 text-gray-11",children:"For your safety, your wallet address can't be used with this app."})]}),(0,m.jsx)("div",{className:"bg-gray-50 dark:bg-gray-800 text-gray-11 rounded-lg p-4 mb-5",children:(0,m.jsx)("ul",{className:"space-y-3",children:(0,m.jsxs)("li",{className:"flex items-start gap-3",children:[(0,m.jsx)("div",{className:"bg-amber-100 dark:bg-amber-900 rounded-full p-1 mt-0.5",children:(0,m.jsx)(k.MagnifyingGlassIcon,{className:"w-3 h-3 text-amber-600 dark:text-amber-400"})}),(0,m.jsx)("span",{className:"text-sm",children:"Wallet address was created before EVM support was added to NEAR"})]})})}),(0,m.jsx)(S.Callout.Root,{className:"mb-6 bg-warning px-3 py-2 text-warning-foreground",children:(0,m.jsx)(S.Callout.Text,{className:"text-xs",children:"Please use a different wallet to continue."})}),(0,m.jsxs)("div",{className:"flex flex-col justify-center gap-3 mt-6",children:[(0,m.jsx)(aK.AlertDialog.Cancel,{children:(0,m.jsx)(T.Button,{size:"4",type:"button",variant:"soft",color:"gray",onClick:t,children:"Disconnect"})}),(0,m.jsx)(aK.AlertDialog.Action,{children:(0,m.jsx)(T.Button,{size:"4",type:"button",color:"red",onClick:i,children:"Proceed anyway, I know what I’m doing"})})]})]})}var aJ=e.i(116859);function aQ({open:e,onConfirm:t,onCancel:i,isVerifying:s,isFailure:r}){return(0,m.jsx)(aK.AlertDialog.Root,{open:e,children:(0,m.jsx)(aK.AlertDialog.Content,{className:"max-w-md px-5 pt-5 pb-[max(env(safe-area-inset-bottom,0px),theme(spacing.5))] sm:animate-none animate-slide-up",children:r?(0,m.jsx)(a1,{open:e,onConfirm:t,onCancel:i,isVerifying:s}):(0,m.jsx)(a0,{open:e,onConfirm:t,onCancel:i,isVerifying:s})})})}function a0({open:e,onConfirm:t,onCancel:i,isVerifying:s}){return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"flex flex-col items-center text-center mb-6",children:[(0,m.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950 p-3 rounded-full mb-4",children:(0,m.jsx)(k.LockClosedIcon,{className:"w-6 h-6 text-blue-600 darkL:text-blue-400"})}),(0,m.jsx)(aK.AlertDialog.Title,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:"Signature Check Required"}),(0,m.jsx)(aK.AlertDialog.Description,{className:"mt-2 text-gray-11",children:"Please verify your device compatibility with the platform"})]}),(0,m.jsx)("div",{className:"bg-gray-50 dark:bg-gray-800  text-gray-11 rounded-lg p-4 mb-5",children:(0,m.jsxs)("ul",{className:"space-y-3",children:[(0,m.jsxs)("li",{className:"flex items-center gap-3",children:[(0,m.jsx)("div",{className:"bg-blue-100 dark:bg-blue-900 rounded-full p-1",children:(0,m.jsx)(k.CheckIcon,{className:"w-3 h-3 text-blue-600 dark:text-blue-400"})}),(0,m.jsx)("span",{className:"text-sm",children:"Safe transactions and transfers"})]}),(0,m.jsxs)("li",{className:"flex items-center gap-3",children:[(0,m.jsx)("div",{className:"bg-blue-100 dark:bg-blue-900 rounded-full p-1",children:(0,m.jsx)(k.CheckIcon,{className:"w-3 h-3 text-blue-600 dark:text-blue-400"})}),(0,m.jsx)("span",{className:"text-sm",children:"Full access to all platform features"})]}),(0,m.jsxs)("li",{className:"flex items-center gap-3",children:[(0,m.jsx)("div",{className:"bg-blue-100 dark:bg-blue-900 rounded-full p-1",children:(0,m.jsx)(k.CheckIcon,{className:"w-3 h-3 text-blue-600 dark:text-blue-400"})}),(0,m.jsx)("span",{className:"text-sm",children:"Protection of your funds"})]})]})}),(0,m.jsx)(S.Callout.Root,{className:"mb-6 bg-warning px-3 py-2 text-warning-foreground",children:(0,m.jsx)(S.Callout.Text,{className:"text-xs",children:"Canceling this check will sign you out. You can sign in and verify anytime."})}),(0,m.jsxs)("div",{className:"flex flex-col sm:flex-row justify-end gap-3 mt-6",children:[(0,m.jsx)(aK.AlertDialog.Cancel,{children:(0,m.jsx)(T.Button,{size:"4",type:"button",variant:"soft",color:"gray",onClick:i,children:"Cancel"})}),(0,m.jsx)(aK.AlertDialog.Action,{children:(0,m.jsxs)(T.Button,{size:"4",type:"button",onClick:t,children:[(0,m.jsx)(aJ.Spinner,{loading:s}),s?"Checking...":"Check Compatibility"]})})]})]})}function a1({open:e,onConfirm:t,onCancel:i,isVerifying:s}){return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"flex flex-col items-center text-center mb-6",children:[(0,m.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950 p-3 rounded-full mb-4",children:(0,m.jsx)(k.ExclamationTriangleIcon,{className:"w-6 h-6 text-amber-600 dar
9k:text-amber-400"})}),(0,m.jsx)(aK.AlertDialog.Title,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:"Unable to Verify"}),(0,m.jsx)(aK.AlertDialog.Description,{className:"mt-2 text-gray-11",children:"The compatibility check couldn't be completed"})]}),(0,m.jsx)("div",{className:"bg-gray-50 dark:bg-gray-800 text-gray-11 rounded-lg p-4 mb-5",children:(0,m.jsxs)("ul",{className:"space-y-3",children:[(0,m.jsxs)("li",{className:"flex items-start gap-3",children:[(0,m.jsx)("div",{className:"bg-amber-100 dark:bg-amber-900 rounded-full p-1 mt-0.5",children:(0,m.jsx)(k.Cross2Icon,{className:"w-3 h-3 text-amber-600 dark:text-amber-400"})}),(0,m.jsx)("span",{className:"text-sm",children:"The verification was interrupted or cancelled"})]}),(0,m.jsxs)("li",{className:"flex items-start gap-3",children:[(0,m.jsx)("div",{className:"bg-amber-100 dark:bg-amber-900 rounded-full p-1 mt-0.5",children:(0,m.jsx)(k.MinusCircledIcon,{className:"w-3 h-3 text-amber-600 dark:text-amber-400"})}),(0,m.jsx)("span",{className:"text-sm",children:"Some wallets (or devices) are incompatible with the platform"})]})]})}),(0,m.jsx)(S.Callout.Root,{className:"mb-6 bg-warning px-3 py-2 text-warning-foreground",children:(0,m.jsx)(S.Callout.Text,{className:"text-xs",children:"Try again or choose another sign-in option to continue."})}),(0,m.jsxs)("div",{className:"flex flex-col sm:flex-row justify-end gap-3 mt-6",children:[(0,m.jsx)(aK.AlertDialog.Cancel,{children:(0,m.jsx)(T.Button,{size:"4",type:"button",variant:"soft",color:"gray",onClick:i,children:"Sign out"})}),(0,m.jsx)(aK.AlertDialog.Action,{children:(0,m.jsxs)(T.Button,{size:"4",type:"button",onClick:t,children:[(0,m.jsx)(aJ.Spinner,{loading:s,children:(0,m.jsx)(k.ReloadIcon,{})}),"Try again"]})})]})]})}var a2=e.i(929331),a4=e.i(968207),a3=e.i(807574);let a6=(0,e.i(509820).setup)({types:{},actors:{verifyWallet:(0,a3.fromPromise)(()=>{throw Error("not implemented")})},actions:{logError:(e,{error:t})=>{aW.logger.error(t)},setError:(0,a4.assign)({hadError:(e,{hadError:t})=>t})},guards:{isTrue:(e,t)=>t}}).createMachine({id:"verify-wallet",initial:"idle",context:{hadError:!1},states:{idle:{on:{START:"verifying",ABORT:"aborted"}},error:{on:{START:"verifying",ABORT:"aborted"}},verifying:{invoke:{src:"verifyWallet",onDone:[{target:"verified",guard:{type:"isTrue",params:({event:e})=>e.output}},{target:"idle",actions:[{type:"logError",params:{error:"Wallet produced an unverifiable signature"}},{type:"setError",params:{hadError:!0}}]}],onError:{target:"idle",actions:[{type:"logError",params:({event:e})=>e},{type:"setError",params:{hadError:!0}}]}}},verified:{type:"final"},aborted:{type:"final"}}});var a8=e.i(768834),a5=e.i(579473);let a7=(0,a8.create)()((0,a5.persist)((e,t)=>({walletAddresses:[],addBypassedWalletAddress:i=>e({walletAddresses:[...t().walletAddresses,i]}),isWalletBypassed:e=>t().walletAddresses.includes(e)}),{name:"app_wallets_bypassed_list",storage:(0,a5.createJSONStorage)(()=>localStorage)}));var a9=e.i(914400),oe=e.i(991202),ot=e.i(486961),oi=e.i(182908),os=e.i(190412),or=e.i(157964);async function on(e,t,i){if("NEP413"===e.type)return e.signatureData.accountId===t;let s=(0,oi.formatSignedIntent)(e,{credential:t,credentialType:i});try{return await ot.nearClient.query({request_type:"call_function",account_id:oe.config.env.contractID,method_name:"simulate_intents",args_base64:btoa(JSON.stringify({signed:[s]})),finality:"optimistic"}),!0}catch(e){if((0,or.hasMessage)(e,"invalid signature"))return!1;throw e}}var oa=e.i(266027),oo=e.i(695713);function ol(){let{state:e,signOut:t}=(0,nV.useConnectWallet)(),i=(0,aq.useMixpanel)(),s=(0,aM.useRouter)(),r=(0,aM.usePathname)(),n=(0,oa.useQuery)({queryKey:["banned_account",e.address,e.chainType],queryFn:async()=>{if(!e.address||!e.chainType)return{isBanned:!1};let t=await fetch(`/api/account/validate-banned?address=${encodeURIComponent(e.address)}&chainType=${encodeURIComponent(e.chainType)}`);if(!t.ok)throw Error("Failed to validate banned account");return t.json()},enabled:null!=e.address&&null!=e.chainType}),a=(0,oa.useQuery)({queryKey:["address_safety",e.address],queryFn:async()=>
9{if("evm"===e.chainType){let t=await fetch(`/api/addresses/${e.address}/safety`);if(!t.ok)throw Error("Failed to check safety status");return t.json()}return{safetyStatus:"safe"}},enabled:null!=e.address&&void 0!==e.chainType,staleTime:36e5}),{addWalletAddress:o}=(0,a9.useVerifiedWalletsStore)(),{addBypassedWalletAddress:l,isWalletBypassed:h}=a7();return n.data?.isBanned&&"/account"!==r?(s.push("/wallet/banned"),null):a.isLoading?null:null==e.address||a.data?.safetyStatus!=="unsafe"||h(e.address)?null!=e.address&&(a.data?.safetyStatus==="safe"||h(e.address))&&!e.isVerified?(0,m.jsx)(ou,{onConfirm:()=>{null!=e.address&&o(e.address)},onAbort:()=>{null!=e.chainType&&t({id:e.chainType})}}):null:(0,m.jsx)(oh,{onAbort:()=>{null!=e.chainType&&t({id:e.chainType})},onBypass:()=>{null!=e.address&&(l(e.address),i?.track("wallet_bypassed",{wallet:e.address,wallet_type:e.chainType}))}})}function oh({onAbort:e,onBypass:t}){return(0,m.jsx)(aG,{open:!0,onCancel:e,onBypass:t})}function ou({onConfirm:e,onAbort:t}){let{state:i}=(0,nV.useConnectWallet)(),s=(0,a2.useWalletAgnosticSignMessage)(),r=(0,aq.useMixpanel)(),[n,a,o]=(0,oo.useActor)(a6.provide({actors:{verifyWallet:(0,a3.fromPromise)(async()=>{var e,t;return null!=i.address&&null!=i.chainType&&on(await s((e=i.address,t=i.chainType,(0,os.createWalletVerificationMessage)({signerId:{credential:e,credentialType:t}},t))),i.address,i.chainType)})}})),l=(0,f.useRef)(e);l.current=e;let h=(0,f.useRef)(t);return h.current=t,(0,f.useEffect)(()=>o.subscribe(e=>{e.matches("verified")&&(l.current(),r?.track("wallet_verified",{wallet:i.address,wallet_type:i.chainType})),e.matches("aborted")&&h.current()}).unsubscribe,[o,r,i.address,i.chainType]),(0,m.jsx)(aQ,{open:!0,onConfirm:()=>{a({type:"START"})},onCancel:()=>{a({type:"ABORT"})},isVerifying:n.matches("verifying"),isFailure:n.context.hadError})}function oc(){let{isActive:e}=aV(),t=e(nL),i=e("/")||e(nH),s=e(nI);return(0,m.jsxs)("nav",{className:"flex justify-between items-center gap-4",children:[(0,m.jsx)(od,{label:"Account",isActive:t,href:nL,dataTestId:"account-tab"}),(0,m.jsx)(od,{label:"Trade",isActive:i,href:"/",dataTestId:"trade-tab"}),(0,m.jsx)(od,{label:"History",isActive:s,href:nI,dataTestId:"history-tab"})]})}function od({label:e,isActive:t,href:i,dataTestId:s}){return(0,m.jsx)(nF.default,{href:i,children:(0,m.jsx)(T.Button,{radius:"full",color:"gray",highContrast:!0,variant:t?"solid":"soft",className:aF("relative text-sm transition-colors",t?"text-gray-1":"bg-transparent hover:bg-gray-a3"),"data-testid":s,asChild:!0,children:(0,m.jsx)("span",{className:"text-sm font-bold whitespace-nowrap",children:e})})})}function om(){let{whitelabelTemplate:e}=(0,f.useContext)(g.FeatureFlagsContext),t="omniswap"===e;return(0,m.jsx)(nF.default,{href:nB,"data-testid":"deposit-tab",children:(0,m.jsxs)(T.Button,{radius:"full",color:t?"grass":"gray",highContrast:!t,variant:"soft",className:"flex items-center gap-2 text-sm",children:[(0,m.jsx)(aN.Plus,{className:aF("size-3",t?"text-grass-11":"text-gray-12"),weight:"bold"}),(0,m.jsx)("span",{className:"text-sm font-bold whitespace-nowrap",children:"Deposit"})]})})}var op=e.i(658980);let of="outage-notification-dismissed",og=()=>{let e=(0,aM.usePathname)(),[t,i]=(0,f.useState)(!0),s=(0,am.useSystemStatus)(),r=s?ay(s):null;(0,f.useEffect)(()=>{"true"===sessionStorage.getItem(of)&&i(!1)},[]);let n=r?.message??op.APP_NETWORK_OUTAGE_NOTIFICATION;return t&&("/deposit"===e||"/withdraw"===e||"/"===e)&&n?(0,m.jsx)("div",{className:"bg-yellow-500 text-yellow-900 px-3 py-2 text-center text-xs font-medium border-b border-yellow-600",children:(0,m.jsxs)("div",{className:"flex items-center justify-center gap-2 relative",children:[(0,m.jsxs)("svg",{className:"w-3 h-3 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20","aria-label":"Warning",children:[(0,m.jsx)("title",{children:"Warning"}),(0,m.jsx)("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})]}),(0,m.jsx)("span",{children:n.length>256?`${n.slice(0,256)}...`:n}),(0,m.jsx)("button",{type:"button",onClick:()=>{i(!1),sessionStorage.setItem(of,"true")},className:"absolute right-0 p-0.5 hover:bg-yellow-600 rounded-full transition-colors","aria-label":"Close notification",children:(0,m.jsxs)("svg",{className:"w-3 h-3",fill:"
9currentColor",viewBox:"0 0 20 20","aria-label":"Close",children:[(0,m.jsx)("title",{children:"Close"}),(0,m.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})]})})]})}):null};var ox=e.i(488144),oy=e.i(532106),ov=e.i(831368),ow=e.i(904901);let ob="legacy-btc-notice-dismissed",oj=`/?from=${encodeURIComponent("BTC (LEGACY)")}&to=BTC`;function oT({holdings:e,isHidden:t}){let{state:i}=(0,nV.useConnectWallet)(),s=(0,ow.useTokenList)(ov.LIST_TOKENS),r=(i.isVerified?i.address:void 0)??null,n=i.chainType??null,a=null!=r&&null!=n?nz.authIdentity.authHandleToIntentsUserId(r,n):null,o=(0,ox.useWatchHoldings)({userId:a,tokenList:s}),l=e??o,h=t??null==a,[u,c]=(0,f.useState)(()=>"true"===sessionStorage.getItem(ob)),d=(0,f.useMemo)(()=>(l??[]).some(e=>"btc-legacy"===(0,oy.getTokenAid)(e.token)&&(e.value?.amount??0n)>0n),[l]),p=(0,f.useCallback)(()=>{c(!0),sessionStorage.setItem(ob,"true")},[]),g=(0,f.useCallback)(e=>{e.preventDefault(),window.location.assign(oj)},[]);return h||!d||u?null:(0,m.jsx)("div",{className:"widget-container mx-auto mt-5 md:mt-8 px-3 sm:px-0 md:-mb-4",children:(0,m.jsxs)("div",{className:"flex items-start gap-2 rounded-2xl bg-gray-900 px-3 py-2.5 outline outline-white/5 dark:bg-gray-950",children:[(0,m.jsx)(k.ExclamationTriangleIcon,{className:"mt-0.5 size-4 shrink-0 text-yellow-400"}),(0,m.jsxs)("p",{className:"min-w-0 flex-1 text-gray-400 text-sm font-medium",children:["You have BTC (LEGACY). Swap it to BTC for better routing and support."," ",(0,m.jsx)(nF.default,{href:oj,className:"font-semibold text-white underline underline-offset-2",onClick:g,children:"Swap to BTC"})]}),(0,m.jsxs)("button",{type:"button",onClick:p,className:"-m-1 rounded-md p-1 text-gray-500 hover:bg-white/10 hover:text-gray-200",children:[(0,m.jsx)("span",{className:"sr-only",children:"Dismiss"}),(0,m.jsx)(k.Cross2Icon,{className:"size-4"})]})]})})}let oA=new Map([["bold",f.createElement(f.Fragment,null,f.createElement("path",{d:"M196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Zm48,22.74A84.3,84.3,0,0,1,160.11,180H160a83.52,83.52,0,0,1-23.65-3.38l-7.86,7.87A12,12,0,0,1,120,188H108v12a12,12,0,0,1-12,12H84v12a12,12,0,0,1-12,12H40a20,20,0,0,1-20-20V187.31a19.86,19.86,0,0,1,5.86-14.14l53.52-53.52A84,84,0,1,1,244,98.74ZM202.43,53.57A59.48,59.48,0,0,0,158,36c-32,1-58,27.89-58,59.89a59.69,59.69,0,0,0,4.2,22.19,12,12,0,0,1-2.55,13.21L44,189v23H60V200a12,12,0,0,1,12-12H84V176a12,12,0,0,1,12-12h19l9.65-9.65a12,12,0,0,1,13.22-2.55A59.58,59.58,0,0,0,160,156h.08c32,0,58.87-26.07,59.89-58A59.55,59.55,0,0,0,202.43,53.57Z"}))],["duotone",f.createElement(f.Fragment,null,f.createElement("path",{d:"M232,98.36C230.73,136.92,198.67,168,160.09,168a71.68,71.68,0,0,1-26.92-5.17h0L120,176H96v24H72v24H40a8,8,0,0,1-8-8V187.31a8,8,0,0,1,2.34-5.65l58.83-58.83h0A71.68,71.68,0,0,1,88,95.91c0-38.58,31.08-70.64,69.64-71.87A72,72,0,0,1,232,98.36Z",opacity:"0.2"}),f.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["fill",f.createElement(f.Fragment,null,f.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM180,92a16,16,0,1,1,16-16A16,16,0,0,1,180,92Z"}))],["light",f.createElement(f.Fragment,null,f.createElement("path",{d:"M215.15,40.85A78,78,0,0,0,86.2,121.31l-56.1,56.1a13.94,13.94,0,0,0-4.1,9.9V216a14,14,0,0,0,14,14H
972a6,6,0,0,0,6-6V206H96a6,6,0,0,0,6-6V182h18a6,6,0,0,0,4.24-1.76l10.45-10.44A77.59,77.59,0,0,0,160,174h.1A78,78,0,0,0,215.15,40.85ZM226,98.16c-1.12,35.16-30.67,63.8-65.88,63.84a65.93,65.93,0,0,1-24.51-4.67,6,6,0,0,0-6.64,1.26L117.51,170H96a6,6,0,0,0-6,6v18H72a6,6,0,0,0-6,6v18H40a2,2,0,0,1-2-2V187.31a2,2,0,0,1,.58-1.41l58.83-58.83a6,6,0,0,0,1.26-6.64A65.61,65.61,0,0,1,94,95.92C94,60.71,122.68,31.16,157.83,30A66,66,0,0,1,226,98.16ZM190,76a10,10,0,1,1-10-10A10,10,0,0,1,190,76Z"}))],["regular",f.createElement(f.Fragment,null,f.createElement("path",{d:"M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z"}))],["thin",f.createElement(f.Fragment,null,f.createElement("path",{d:"M213.74,42.26A76,76,0,0,0,88.51,121.84l-57,57A11.93,11.93,0,0,0,28,187.31V216a12,12,0,0,0,12,12H72a4,4,0,0,0,4-4V204H96a4,4,0,0,0,4-4V180h20a4,4,0,0,0,2.83-1.17l11.33-11.34A75.72,75.72,0,0,0,160,172h.1A76,76,0,0,0,213.74,42.26Zm14.22,56c-1.15,36.22-31.6,65.72-67.87,65.77H160a67.52,67.52,0,0,1-25.21-4.83,4,4,0,0,0-4.45.83l-12,12H96a4,4,0,0,0-4,4v20H72a4,4,0,0,0-4,4v20H40a4,4,0,0,1-4-4V187.31a4.06,4.06,0,0,1,1.17-2.83L96,125.66a4,4,0,0,0,.83-4.45A67.51,67.51,0,0,1,92,95.91C92,59.64,121.55,29.19,157.77,28A68,68,0,0,1,228,98.23ZM188,76a8,8,0,1,1-8-8A8,8,0,0,1,188,76Z"}))]]),ok=f.forwardRef((e,t)=>f.createElement(nq.default,{ref:t,...e,weights:oA}));ok.displayName="KeyIcon";var oS=e.i(909607);function oP(){return(oP=Object.assign.bind()).apply(null,arguments)}let oC=function(e){return f.createElement("svg",oP({xmlns:"http://www.w3.org/2000/svg",fill:"none","aria-hidden":"true",viewBox:"0 0 512 512"},e),c||(c=f.createElement("rect",{width:512,height:512,fill:"#00EC97",rx:110})),d||(d=f.createElement("path",{fill:"#000",d:"M373.89 106.199a31.95 31.95 0 0 0-27.213 15.207l-62.631 92.979a6.67 6.67 0 0 0-.989 5.001 6.66 6.66 0 0 0 2.837 4.235 6.67 6.67 0 0 0 8.032-.494l61.643-53.47c1.02-.924 2.599-.827 3.523.193.419.473.644 1.074.644 1.697v167.402a2.49 2.49 0 0 1-2.502 2.491 2.48 2.48 0 0 1-1.912-.891L168.976 117.497a31.93 31.93 0 0 0-24.356-11.298h-6.508c-17.623 0-31.917 14.294-31.917 31.917v235.767c0 17.623 14.294 31.917 31.917 31.917a31.94 31.94 0 0 0 27.213-15.206l62.631-92.98a6.66 6.66 0 0 0-1.847-9.236 6.67 6.67 0 0 0-8.033.494l-61.643 53.471c-1.02.923-2.599.826-3.522
9-.194a2.49 2.49 0 0 1-.634-1.697V173.008a2.49 2.49 0 0 1 2.502-2.492c.731 0 1.439.322 1.912.891l186.313 223.096a31.95 31.95 0 0 0 24.357 11.297h6.508c17.623 0 31.927-14.272 31.938-31.895V138.116c0-17.623-14.294-31.917-31.917-31.917"})))},oE="https://near-intents-app.helpscoutdocs.com/article/257-migration-from-near-intents-to-nearcom",oN="https://near.com/?utm_source=near-intents",oM=()=>(0,m.jsx)("a",{href:oN,target:"_blank",rel:"noopener noreferrer",className:"underline",children:"near.com"}),oV=()=>{let e=window.Beacon;"function"==typeof e&&(Array.isArray(e.readyQueue)||(e("open"),e("navigate","/ask/message/")))},oR=e=>{let t=window.Beacon;"function"==typeof t&&(Array.isArray(t.readyQueue)||(e.preventDefault(),t("article","69de575cfe9deda3e8da017c",{type:"sidebar"})))},oD=()=>{let e=(0,m.jsxs)(m.Fragment,{children:["NEAR Intents has moved to ",(0,m.jsx)(oM,{}),". Same technology by the same team, now in a better app, including confidential swaps."]});return(0,m.jsxs)("section",{className:"w-full max-w-xl rounded-3xl border border-gray-a4 bg-white p-6 shadow-lg sm:p-8 dark:border-gray-a5 dark:bg-black-950",children:[(0,m.jsxs)("div",{className:"flex sm:items-center flex-col sm:flex-row gap-3",children:[(0,m.jsx)(oC,{"aria-hidden":"true",className:"size-8 shrink-0"}),(0,m.jsx)("h2",{id:"near-com-retirement-title",className:"text-gray-12 text-xl sm:text-2xl/8 font-bold",children:"NEAR Intents has moved"})]}),(0,m.jsx)("p",{className:"mt-5 text-gray-11 text-base font-medium",children:e}),(0,m.jsxs)("p",{className:"mt-4 text-gray-11 text-base font-medium",children:[(0,m.jsx)("strong",{className:"font-bold",children:"This website will be decommissioned on June 30, 2026"}),". Please move or migrate before then."]}),(0,m.jsxs)("div",{className:"mt-6",children:[(0,m.jsx)("h3",{className:"text-gray-12 text-lg/6 font-bold",children:"How do I switch?"}),(0,m.jsxs)("div",{className:"mt-4 space-y-2.5",children:[(0,m.jsxs)("div",{className:"rounded-2xl bg-gray-3 p-4 flex sm:flex-row flex-col items-start gap-3",children:[(0,m.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-gray-1 text-gray-12",children:(0,m.jsx)(oS.Wallet,{className:"size-5",weight:"bold"})}),(0,m.jsxs)("div",{className:"mt-1.5",children:[(0,m.jsx)("h4",{className:"text-gray-12 text-base font-bold",children:"Using a wallet?"}),(0,m.jsx)("p",{className:"mt-2 text-gray-11 text-sm font-medium",children:"There is nothing to move or migrate. Connect the same wallet at near.com to keep swapping with NEAR Intents."}),(0,m.jsxs)("a",{href:oN,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-flex items-center gap-0.5 text-gray-12 text-sm font-semibold underline-offset-2 hover:underline",children:[(0,m.jsx)("span",{children:"Open near.com"}),(0,m.jsx)(k.ChevronRightIcon,{className:"size-4 shrink-0 mt-0.5"})]})]})]}),(0,m.jsxs)("div",{className:"rounded-2xl bg-gray-3 p-4 flex sm:flex-row flex-col items-start gap-3",children:[(0,m.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-gray-1 text-gray-12",children:(0,m.jsx)(ok,{className:"size-5",weight:"bold"})}),(0,m.jsxs)("div",{className:"mt-1.5",children:[(0,m.jsx)("h4",{className:"text-gray-12 text-base font-bold",children:"Using a passkey?"}),(0,m.jsx)("p",{className:"mt-2 text-gray-11 text-sm font-medium",children:"Passkey accounts need to migrate because passkeys are domain-specific."}),(0,m.jsxs)("a",{href:oE,target:"_blank",rel:"noopener noreferrer",onClick:oR,className:"mt-3 inline-flex items-center gap-0.5 text-gray-12 text-sm font-semibold underline-offset-2 hover:underline",children:[(0,m.jsx)("span",{children:"Read the migration guide"}),(0,m.jsx)(k.ChevronRightIcon,{className:"size-4 shrink-0"})]})]})]})]})]}),(0,m.jsxs)("p",{className:"mt-5 text-gray-10 text-sm font-medium",children:["Questions?"," ",(0,m.jsx)("button",{type:"button",onClick:oV,className:"text-gray-11 underline",children:"Click here to contact support"}),"."]})]})},oF=()=>{let{whitelabelTemplate:e}=(0,f.useContext)(g.FeatureFlagsContext),{variant:t}=aj();if("near-intents"!==e)return null;let i="passkey"===t?(0,m.jsxs)(m.Fragment,{children:["Because you signed up with a passkey, you’ll need a new account at"," ",(0,m.jsx)(oM,{})," and we’ll help you move your funds. This website will be decommissioned on June 30, 2026."]}):"wallet"===t?(0,m.jsxs)(m.Fragment,{children:["This website will be decommissioned on June 30, 2026. Your wallet already works at ",(0,m.jsx)(oM,{})," — there is nothing to move or migrate. Connect the same wallet there when you’re ready."]}):(0,m.jsxs)(m.Fragment,{children:["The NEAR Intents consumer app has a 
9new home at ",(0,m.jsx)(oM,{}),". Most users just need to reconnect their wallet there — nothing to migrate. This site will soon be retired."]}),s="passkey"===t?(0,m.jsxs)("a",{href:oE,target:"_blank",rel:"noopener noreferrer",onClick:oR,className:"inline-flex items-center gap-1 mt-4 bg-white text-gray-900 px-4 rounded-xl py-3 -tracking-[0.01em]",children:[(0,m.jsx)("span",{className:"text-sm/4 font-semibold",children:"Learn how to migrate"}),(0,m.jsx)(k.ChevronRightIcon,{className:"size-4 shrink-0"})]}):(0,m.jsxs)("a",{href:oN,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 mt-4 bg-white text-gray-900 px-4 rounded-xl py-3 -tracking-[0.01em]",children:[(0,m.jsx)("span",{className:"text-sm/4 font-semibold",children:"Open near.com"}),(0,m.jsx)(k.ChevronRightIcon,{className:"size-4 shrink-0"})]}),r="anonymous"===t?(0,m.jsxs)("p",{className:"text-gray-500 text-xs font-medium mt-3",children:["Signed up with a passkey?"," ",(0,m.jsx)("a",{href:oE,target:"_blank",rel:"noopener noreferrer",onClick:oR,className:"text-gray-300 underline",children:"Read the migration guide"}),"."]}):null;return(0,m.jsx)("div",{className:"widget-container mx-auto mt-5 md:mt-8 px-3 sm:px-0 md:-mb-4",children:(0,m.jsxs)("div",{className:"rounded-3xl bg-gray-900 p-4 sm:p-5 pt-4 dark:bg-gray-950 outline outline-white/5",children:[(0,m.jsxs)("div",{className:"flex items-center gap-3",children:[(0,m.jsx)(oC,{"aria-hidden":"true",className:"size-6 shrink-0"}),(0,m.jsx)("h2",{className:"text-white text-lg/6 font-semibold -tracking-[0.01em]",children:"We’ve moved to near.com"})]}),(0,m.jsx)("p",{className:"text-gray-400 text-sm font-medium mt-3",children:i}),s,r]})})},oL=({children:e})=>{let{whitelabelTemplate:t}=(0,f.useContext)(g.FeatureFlagsContext),{variant:i}=aj();return"turboswap"===t||"trumpswap"===t?(0,m.jsx)("main",{className:"flex-1 w-full max-w-[1280px] mx-auto md:pt-[10vh]",children:(0,m.jsx)("div",{className:"flex justify-center lg:justify-end lg:w-1/2",children:(0,m.jsx)("div",{className:"w-[480px] max-w-full",children:e})})}):"near-intents"===t&&"anonymous"===i?(0,m.jsx)("main",{className:"flex md:flex-1 items-start justify-center px-4 py-16 md:py-24",children:(0,m.jsx)(oD,{})}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(oF,{}),(0,m.jsx)(oT,{}),(0,m.jsx)("main",{className:"flex md:flex-1",children:e})]})};e.s(["default",0,({children:e})=>{let t,i,s,r;return t=(0,aM.usePathname)(),i=(0,aq.useMixpanel)(),(0,f.useEffect)(()=>{let e={"/":"trade","/account":"account","/deposit":"deposit","/gift-card/create-gift":"gift-card-create-gift","/gift-card/view-gift":"gift-card-view-gift","/otc/create-order":"otc-create-order","/otc/order":"otc-order","/withdraw":"withdraw"};e[t]&&i?.track("page_changed",{target_page:e[t],referrer_page:document.referrer})},[t,i]),s=(0,aq.useMixpanel)(),(0,f.useEffect)(()=>{(0,az.setEventEmitter)(a$)},[]),r=(0,f.useCallback)((e,t)=>{s?.track(e,JSON.parse((0,aO.serialize)(t)))},[s]),(0,f.useEffect)(()=>{if(a$){let e=[];for(let t of aZ){let i=e=>{r(t,e)};e.push(i),a$.on(t,i)}return()=>{if(a$)for(let t=0;t<aZ.length;t++)a$.removeListener(aZ[t],e[t])}}aW.logger.error("event bus is not defined")},[r]),(0,m.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,m.jsx)(aS,{navbarSlot:(0,m.jsx)(aS.DisplayNavbar,{children:(0,m.jsx)(oc,{})}),depositSlot:(0,m.jsx)(aS.DepositSlot,{children:(0,m.jsx)(om,{})})}),(0,m.jsx)(og,{}),(0,m.jsx)(oL,{children:e}),(0,m.jsx)(j,{}),(0,m.jsx)(aL,{}),(0,m.jsx)(aH.default,{}),(0,m.jsx)(ol,{}),(0,m.jsx)(af.Desktop,{})]})}],864232)}]);
10
11//# sourceMappingURL=0q~0xd-7lyj81.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.