@skybridge/devtools 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,7 +56,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
56
56
|
`;break;case"id":c=x.includes("\0")?void 0:x;break;case"retry":/^\d+$/.test(x)?r(parseInt(x,10)):n(new Uk(`Invalid \`retry\` value: "${x}"`,{type:"invalid-retry",value:x,line:w}));break;default:n(new Uk(`Unknown field "${_.length>20?`${_.slice(0,20)}…`:_}"`,{type:"unknown-field",field:_,value:x,line:w}));break}}function b(){u.length>0&&t({id:c,event:d||void 0,data:u.endsWith(`
|
|
57
57
|
`)?u.slice(0,-1):u}),c=void 0,u="",d=""}function y(_={}){s&&_.consume&&p(s),l=!0,c=void 0,u="",d="",s=""}return{feed:h,reset:y}}function ste(e){const t=[];let n="",r=0;for(;r<e.length;){const o=e.indexOf("\r",r),s=e.indexOf(`
|
|
58
58
|
`,r);let l=-1;if(o!==-1&&s!==-1?l=Math.min(o,s):o!==-1?o===e.length-1?l=-1:l=o:s!==-1&&(l=s),l===-1){n=e.slice(r);break}else{const c=e.slice(r,l);t.push(c),r=l+1,e[r-1]==="\r"&&e[r]===`
|
|
59
|
-
`&&r++}}return[t,n]}class ate extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let o;super({start(s){o=ite({onEvent:l=>{s.enqueue(l)},onError(l){t==="terminate"?s.error(l):typeof t=="function"&&t(l)},onRetry:n,onComment:r})},transform(s){o.feed(s)}})}}const lte={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class tu extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}class cte{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=_ee(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??lte}async _authThenStart(){if(!this._authProvider)throw new eu("No auth provider");let t;try{t=await ig(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new eu;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=QS(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new tu(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),o)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const o=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(s=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${s instanceof Error?s.message:String(s)}`)),this._scheduleReconnection(t,n+1)})},o)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:o,replayMessageId:s}=n;let l,c=!1,u=!1;(async()=>{try{const h=t.pipeThrough(new TextDecoderStream).pipeThrough(new ate({onRetry:b=>{this._serverRetryMs=b}})).getReader();for(;;){const{value:b,done:y}=await h.read();if(y)break;if(b.id&&(l=b.id,c=!0,o?.(b.id)),!!b.data&&(!b.event||b.event==="message"))try{const _=Xb.parse(JSON.parse(b.data));Rd(_)&&(u=!0,s!==void 0&&(_.id=s)),this.onmessage?.(_)}catch(_){this.onerror?.(_)}}(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:l,onresumptiontoken:o,replayMessageId:s},0)}catch(h){if(this.onerror?.(new Error(`SSE stream disconnected: ${h}`)),(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:l,onresumptiontoken:o,replayMessageId:s},0)}catch(b){this.onerror?.(new Error(`Failed to reconnect: ${b instanceof Error?b.message:String(b)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new eu("No auth provider");if(await ig(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new eu("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:o}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:XS(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const s=await this._commonHeaders();s.set("content-type","application/json"),s.set("accept","application/json, text/event-stream");const l={...this._requestInit,method:"POST",headers:s,body:JSON.stringify(t),signal:this._abortController?.signal},c=await(this._fetch??fetch)(this._url,l),u=c.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!c.ok){const g=await c.text().catch(()=>null);if(c.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new tu(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:b,scope:y}=Lk(c);if(this._resourceMetadataUrl=b,this._scope=y,await ig(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new eu;return this._hasCompletedAuthFlow=!0,this.send(t)}if(c.status===403&&this._authProvider){const{resourceMetadataUrl:b,scope:y,error:_}=Lk(c);if(_==="insufficient_scope"){const x=c.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===x)throw new tu(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),b&&(this._resourceMetadataUrl=b),this._lastUpscopingHeader=x??void 0,await ig(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new eu;return this.send(t)}}throw new tu(c.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,c.status===202){await c.body?.cancel(),UX(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const h=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=c.headers.get("content-type");if(h)if(p?.includes("text/event-stream"))this._handleSseStream(c.body,{onresumptiontoken:o},!1);else if(p?.includes("application/json")){const g=await c.json(),b=Array.isArray(g)?g.map(y=>Xb.parse(y)):[Xb.parse(g)];for(const y of b)this.onmessage?.(y)}else throw await c.body?.cancel(),new tu(-1,`Unexpected content type: ${p}`);else await c.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new tu(r.status,`Failed to terminate session: ${r.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}}class ute{client=null;transport=null;async connect(t){const n=typeof t=="string"?new URL(t):t;this.transport=new cte(n),this.client=new xee({name:"mcp-client",version:"1.0.0"},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listTools()).tools}async callTool(t,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.callTool({name:t,arguments:n??{}})}async listResources(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listResources()).resources}async readResource(t){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.readResource({uri:t})}async listPrompts(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listPrompts()).prompts}async getPrompt(t,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...n&&{arguments:n}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const df=new ute;df.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const fte={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:600,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},_N=()=>{const{data:e}=Pj({queryKey:["list-tools"],queryFn:()=>df.listTools()});return e},dte=()=>df.getServerInfo(),hte=()=>{const{setToolData:e}=lf();return IF({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const r=await df.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...fte,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r._meta??null,widgetState:null}}),r}})},P_=()=>{const[e]=e_();return _N().find(n=>n.name===e)??null},dc=()=>{const e=P_();if(!e)throw new Error("No tool is currently selected");return e},pte=e=>Pj({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await df.readResource(e)}});const mte=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gte=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Vk=e=>{const t=gte(e);return t.charAt(0).toUpperCase()+t.slice(1)},EN=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),yte=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var vte={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const bte=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:l,...c},u)=>k.createElement("svg",{ref:u,...vte,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:EN("lucide",o),...!s&&!yte(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,h])=>k.createElement(d,h)),...Array.isArray(s)?s:[s]]));const rs=(e,t)=>{const n=k.forwardRef(({className:r,...o},s)=>k.createElement(bte,{ref:s,iconNode:t,className:EN(`lucide-${mte(Vk(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Vk(e),n};const Ste=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],wte=rs("check",Ste);const xte=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],CN=rs("chevron-down",xte);const _te=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ete=rs("chevron-up",_te);const Cte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Tte=rs("circle-alert",Cte);const Rte=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ote=rs("external-link",Rte);const Ate=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],kte=rs("loader-circle",Ate);const Mte=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],jte=rs("moon",Mte);const Pte=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Nte=rs("play",Pte);const Dte=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],$te=rs("sun",Dte);const Ite=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],zte=rs("trash",Ite);function l0(){return typeof window<"u"}function el(e){return N_(e)?(e.nodeName||"").toLowerCase():"#document"}function Or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function os(e){var t;return(t=(N_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function N_(e){return l0()?e instanceof Node||e instanceof Or(e).Node:!1}function Gn(e){return l0()?e instanceof Element||e instanceof Or(e).Element:!1}function or(e){return l0()?e instanceof HTMLElement||e instanceof Or(e).HTMLElement:!1}function fw(e){return!l0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Or(e).ShadowRoot}const Lte=new Set(["inline","contents"]);function hc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=zo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Lte.has(o)}const Fte=new Set(["table","td","th"]);function Ute(e){return Fte.has(el(e))}const Vte=[":popover-open",":modal"];function c0(e){return Vte.some(t=>{try{return e.matches(t)}catch{return!1}})}const qte=["transform","translate","scale","rotate","perspective"],Bte=["transform","translate","scale","rotate","perspective","filter"],Hte=["paint","layout","strict","content"];function D_(e){const t=u0(),n=Gn(e)?zo(e):e;return qte.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Bte.some(r=>(n.willChange||"").includes(r))||Hte.some(r=>(n.contain||"").includes(r))}function Kte(e){let t=js(e);for(;or(t)&&!ks(t);){if(D_(t))return t;if(c0(t))return null;t=js(t)}return null}function u0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Gte=new Set(["html","body","#document"]);function ks(e){return Gte.has(el(e))}function zo(e){return Or(e).getComputedStyle(e)}function f0(e){return Gn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function js(e){if(el(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fw(e)&&e.host||os(e);return fw(t)?t.host:t}function TN(e){const t=js(e);return ks(t)?e.ownerDocument?e.ownerDocument.body:e.body:or(t)&&hc(t)?t:TN(t)}function Ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=TN(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),l=Or(o);if(s){const c=dw(l);return t.concat(l,l.visualViewport||[],hc(o)?o:[],c&&n?Ma(c):[])}return t.concat(o,Ma(o,[],n))}function dw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const qk={};function Yi(e,t){const n=k.useRef(qk);return n.current===qk&&(n.current=e(t)),n}const m1=Ch[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Zte=m1&&m1!==k.useLayoutEffect?m1:e=>e();function lt(e){const t=Yi(Wte).current;return t.next=e,Zte(t.effect),t.trampoline}function Wte(){const e={next:void 0,callback:Yte,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Yte(){}const Xte=()=>{},rt=typeof document<"u"?k.useLayoutEffect:Xte;function hw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const zd={};function d0(e,t,n,r,o){let s={...pw(e,zd)};return t&&(s=Od(s,t)),n&&(s=Od(s,n)),r&&(s=Od(s,r)),o&&(s=Od(s,o)),s}function Qte(e){if(e.length===0)return zd;if(e.length===1)return pw(e[0],zd);let t={...pw(e[0],zd)};for(let n=1;n<e.length;n+=1)t=Od(t,e[n]);return t}function Od(e,t){return RN(t)?t(e):Jte(e,t)}function Jte(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=hw(e.style,r);break}case"className":{e[n]=ON(e.className,r);break}default:ene(n,r)?e[n]=tne(e[n],r):e[n]=r}}return e}function ene(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function RN(e){return typeof e=="function"}function pw(e,t){return RN(e)?e(t):e??zd}function tne(e,t){return t?e?n=>{if(nne(n)){const o=n;mw(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function mw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ON(e,t){return t?e?t+" "+e:t:e}function nne(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function is(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const AN=k.createContext(void 0);function kN(e=!1){const t=k.useContext(AN);if(t===void 0&&!e)throw new Error(is(16));return t}function rne(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,l=r&&t!==!1,c=r&&t===!1;return{props:k.useMemo(()=>{const d={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(d.tabIndex=o,!s&&n&&(d.tabIndex=t?o:-1)),(s&&(t||l)||!s&&n)&&(d["aria-disabled"]=n),s&&(!t||c)&&(d.disabled=n),d},[r,n,t,l,c,s,o])}}function h0(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=k.useRef(null),l=kN(!0)!==void 0,c=lt(()=>{const g=s.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=rne({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:o}),d=k.useCallback(()=>{const g=s.current;one(g)&&l&&t&&u.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,u.disabled,l]);rt(d,[d]);const h=k.useCallback((g={})=>{const{onClick:b,onMouseDown:y,onKeyUp:_,onKeyDown:x,onPointerDown:w,...v}=g;return d0({type:o?"button":void 0,onClick(S){if(t){S.preventDefault();return}b?.(S)},onMouseDown(S){t||y?.(S)},onKeyDown(S){if(t||(mw(S),x?.(S)),S.baseUIHandlerPrevented)return;const T=S.target===S.currentTarget&&!o&&!c()&&!t,E=S.key==="Enter",O=S.key===" ";T&&((O||E)&&S.preventDefault(),E&&b?.(S))},onKeyUp(S){t||(mw(S),_?.(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!o&&!t&&S.key===" "&&b?.(S)},onPointerDown(S){if(t){S.preventDefault();return}w?.(S)}},o?void 0:{role:"button"},u,v)},[t,u,o,c]),p=lt(g=>{s.current=g,d()});return{getButtonProps:h,buttonRef:p}}function one(e){return or(e)&&e.tagName==="BUTTON"}function qa(e,t,n,r){const o=Yi(MN).current;return sne(o,e,t,n,r)&&jN(o,[e,t,n,r]),o.callback}function ine(e){const t=Yi(MN).current;return ane(t,e)&&jN(t,e),t.callback}function MN(){return{callback:null,cleanup:null,refs:[]}}function sne(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function ane(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function jN(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(r[o]=l);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=r[o];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}const lne=parseInt(k.version,10);function $_(e){return lne>=e}function Bk(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return($_(19)?n?.ref:t.ref)??null}function cne(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function une(e,t){return typeof e=="function"?e(t):e}function fne(e,t){return typeof e=="function"?e(t):e}function jo(){}const Vu=Object.freeze([]),Po=Object.freeze({}),dne={style:{transition:"none"}},hne="data-base-ui-click-trigger",pne={fallbackAxisSide:"none"},mne={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function jr(e,t,n={}){const r=t.render,o=gne(t,n);if(n.enabled===!1)return null;const s=n.state??Po;return yne(e,r,o,s)}function gne(e,t={}){const{className:n,style:r,render:o}=e,{state:s=Po,ref:l,props:c,stateAttributesMapping:u,enabled:d=!0}=t,h=d?une(n,s):void 0,p=d?fne(r,s):void 0,g=d?cne(s,u):Po,b=d?hw(g,Array.isArray(c)?Qte(c):c)??Po:Po;return typeof document<"u"&&(d?Array.isArray(l)?b.ref=ine([b.ref,Bk(o),...l]):b.ref=qa(b.ref,Bk(o),l):qa(null,null)),d?(h!==void 0&&(b.className=ON(b.className,h)),p!==void 0&&(b.style=hw(b.style,p)),b):Po}function yne(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=d0(n,t.props);return o.ref=n.ref,k.cloneElement(t,o)}if(e&&typeof e=="string")return vne(e,n);throw new Error(is(8))}function vne(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}const bne=k.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,...u}=t,d=!!s,{getButtonProps:h,buttonRef:p}=h0({disabled:d,focusableWhenDisabled:l,native:c}),g=k.useMemo(()=>({disabled:d}),[d]);return jr("button",t,{state:g,ref:[n,p],props:[u,h]})});function PN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=PN(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function I_(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=PN(e))&&(r&&(r+=" "),r+=t);return r}const Hk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kk=I_,tl=(e,t)=>n=>{var r;if(t?.variants==null)return Kk(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(d=>{const h=n?.[d],p=s?.[d];if(h===null)return null;const g=Hk(h)||Hk(p);return o[d][g]}),c=n&&Object.entries(n).reduce((d,h)=>{let[p,g]=h;return g===void 0||(d[p]=g),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,h)=>{let{class:p,className:g,...b}=h;return Object.entries(b).every(y=>{let[_,x]=y;return Array.isArray(x)?x.includes({...s,...c}[_]):{...s,...c}[_]===x})?[...d,p,g]:d},[]);return Kk(e,l,u,n?.class,n?.className)},Sne=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},wne=(e,t)=>({classGroupId:e,validator:t}),NN=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),py="-",Gk=[],xne="arbitrary..",_ne=e=>{const t=Cne(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Ene(l);const c=l.split(py),u=c[0]===""&&c.length>1?1:0;return DN(c,u,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const u=r[l],d=n[l];return u?d?Sne(d,u):u:d||Gk}return n[l]||Gk}}},DN=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const d=DN(e,t+1,s);if(d)return d}const l=n.validators;if(l===null)return;const c=t===0?e.join(py):e.slice(t).join(py),u=l.length;for(let d=0;d<u;d++){const h=l[d];if(h.validator(c))return h.classGroupId}},Ene=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?xne+r:void 0})(),Cne=e=>{const{theme:t,classGroups:n}=e;return Tne(n,t)},Tne=(e,t)=>{const n=NN();for(const r in e){const o=e[r];z_(o,n,r,t)}return n},z_=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];Rne(l,t,n,r)}},Rne=(e,t,n,r)=>{if(typeof e=="string"){One(e,t,n);return}if(typeof e=="function"){Ane(e,t,n,r);return}kne(e,t,n,r)},One=(e,t,n)=>{const r=e===""?t:$N(t,e);r.classGroupId=n},Ane=(e,t,n,r)=>{if(Mne(e)){z_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(wne(n,e))},kne=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[c,u]=o[l];z_(u,$N(t,c),n,r)}},$N=(e,t)=>{let n=e;const r=t.split(py),o=r.length;for(let s=0;s<o;s++){const l=r[s];let c=n.nextPart.get(l);c||(c=NN(),n.nextPart.set(l,c)),n=c}return n},Mne=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jne=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},gw="!",Zk=":",Pne=[],Wk=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Nne=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let l=0,c=0,u=0,d;const h=o.length;for(let _=0;_<h;_++){const x=o[_];if(l===0&&c===0){if(x===Zk){s.push(o.slice(u,_)),u=_+1;continue}if(x==="/"){d=_;continue}}x==="["?l++:x==="]"?l--:x==="("?c++:x===")"&&c--}const p=s.length===0?o:o.slice(u);let g=p,b=!1;p.endsWith(gw)?(g=p.slice(0,-1),b=!0):p.startsWith(gw)&&(g=p.slice(1),b=!0);const y=d&&d>u?d-u:void 0;return Wk(s,b,g,y)};if(t){const o=t+Zk,s=r;r=l=>l.startsWith(o)?s(l.slice(o.length)):Wk(Pne,!1,l,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Dne=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",u=t.has(l);c||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},$ne=e=>({cache:jne(e.cacheSize),parseClassName:Nne(e),sortModifiers:Dne(e),..._ne(e)}),Ine=/\s+/,zne=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],c=e.trim().split(Ine);let u="";for(let d=c.length-1;d>=0;d-=1){const h=c[d],{isExternal:p,modifiers:g,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:_}=n(h);if(p){u=h+(u.length>0?" "+u:u);continue}let x=!!_,w=r(x?y.substring(0,_):y);if(!w){if(!x){u=h+(u.length>0?" "+u:u);continue}if(w=r(y),!w){u=h+(u.length>0?" "+u:u);continue}x=!1}const v=g.length===0?"":g.length===1?g[0]:s(g).join(":"),C=b?v+gw:v,S=C+w;if(l.indexOf(S)>-1)continue;l.push(S);const T=o(w,x);for(let E=0;E<T.length;++E){const O=T[E];l.push(C+O)}u=h+(u.length>0?" "+u:u)}return u},Lne=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=IN(n))&&(o&&(o+=" "),o+=r);return o},IN=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=IN(e[r]))&&(n&&(n+=" "),n+=t);return n},Fne=(e,...t)=>{let n,r,o,s;const l=u=>{const d=t.reduce((h,p)=>p(h),e());return n=$ne(d),r=n.cache.get,o=n.cache.set,s=c,c(u)},c=u=>{const d=r(u);if(d)return d;const h=zne(u,n);return o(u,h),h};return s=l,(...u)=>s(Lne(...u))},Une=[],Er=e=>{const t=n=>n[e]||Une;return t.isThemeGetter=!0,t},zN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,LN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Vne=/^\d+\/\d+$/,qne=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bne=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Hne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kne=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gne=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nu=e=>Vne.test(e),kt=e=>!!e&&!Number.isNaN(Number(e)),ba=e=>!!e&&Number.isInteger(Number(e)),g1=e=>e.endsWith("%")&&kt(e.slice(0,-1)),Rs=e=>qne.test(e),Zne=()=>!0,Wne=e=>Bne.test(e)&&!Hne.test(e),FN=()=>!1,Yne=e=>Kne.test(e),Xne=e=>Gne.test(e),Qne=e=>!Qe(e)&&!Je(e),Jne=e=>hf(e,qN,FN),Qe=e=>zN.test(e),Nl=e=>hf(e,BN,Wne),y1=e=>hf(e,ore,kt),Yk=e=>hf(e,UN,FN),ere=e=>hf(e,VN,Xne),sg=e=>hf(e,HN,Yne),Je=e=>LN.test(e),Sd=e=>pf(e,BN),tre=e=>pf(e,ire),Xk=e=>pf(e,UN),nre=e=>pf(e,qN),rre=e=>pf(e,VN),ag=e=>pf(e,HN,!0),hf=(e,t,n)=>{const r=zN.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pf=(e,t,n=!1)=>{const r=LN.exec(e);return r?r[1]?t(r[1]):n:!1},UN=e=>e==="position"||e==="percentage",VN=e=>e==="image"||e==="url",qN=e=>e==="length"||e==="size"||e==="bg-size",BN=e=>e==="length",ore=e=>e==="number",ire=e=>e==="family-name",HN=e=>e==="shadow",sre=()=>{const e=Er("color"),t=Er("font"),n=Er("text"),r=Er("font-weight"),o=Er("tracking"),s=Er("leading"),l=Er("breakpoint"),c=Er("container"),u=Er("spacing"),d=Er("radius"),h=Er("shadow"),p=Er("inset-shadow"),g=Er("text-shadow"),b=Er("drop-shadow"),y=Er("blur"),_=Er("perspective"),x=Er("aspect"),w=Er("ease"),v=Er("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...S(),Je,Qe],E=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],M=()=>[Je,Qe,u],P=()=>[nu,"full","auto",...M()],I=()=>[ba,"none","subgrid",Je,Qe],z=()=>["auto",{span:["full",ba,Je,Qe]},ba,Je,Qe],U=()=>[ba,"auto",Je,Qe],G=()=>["auto","min","max","fr",Je,Qe],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...M()],H=()=>[nu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],Y=()=>[e,Je,Qe],oe=()=>[...S(),Xk,Yk,{position:[Je,Qe]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",nre,Jne,{size:[Je,Qe]}],q=()=>[g1,Sd,Nl],V=()=>["","none","full",d,Je,Qe],D=()=>["",kt,Sd,Nl],B=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[kt,g1,Xk,Yk],ae=()=>["","none",y,Je,Qe],ge=()=>["none",kt,Je,Qe],ke=()=>["none",kt,Je,Qe],Q=()=>[kt,Je,Qe],ie=()=>[nu,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Rs],breakpoint:[Rs],color:[Zne],container:[Rs],"drop-shadow":[Rs],ease:["in","out","in-out"],font:[Qne],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Rs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Rs],shadow:[Rs],spacing:["px",kt],text:[Rs],"text-shadow":[Rs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nu,Qe,Je,x]}],container:["container"],columns:[{columns:[kt,Qe,Je,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ba,"auto",Je,Qe]}],basis:[{basis:[nu,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kt,nu,"auto","initial","none",Qe]}],grow:[{grow:["",kt,Je,Qe]}],shrink:[{shrink:["",kt,Je,Qe]}],order:[{order:[ba,"first","last","none",Je,Qe]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,Sd,Nl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Je,y1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",g1,Qe]}],"font-family":[{font:[tre,Qe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Je,Qe]}],"line-clamp":[{"line-clamp":[kt,"none",Je,y1]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",Je,Qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Je,Qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[kt,"from-font","auto",Je,Nl]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[kt,"auto",Je,Qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je,Qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Je,Qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ba,Je,Qe],radial:["",Je,Qe],conic:[ba,Je,Qe]},rre,ere]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kt,Je,Qe]}],"outline-w":[{outline:["",kt,Sd,Nl]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",h,ag,sg]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",p,ag,sg]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[kt,Nl]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",g,ag,sg]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[kt,Je,Qe]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[kt]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[Je,Qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[kt]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Je,Qe]}],filter:[{filter:["","none",Je,Qe]}],blur:[{blur:ae()}],brightness:[{brightness:[kt,Je,Qe]}],contrast:[{contrast:[kt,Je,Qe]}],"drop-shadow":[{"drop-shadow":["","none",b,ag,sg]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",kt,Je,Qe]}],"hue-rotate":[{"hue-rotate":[kt,Je,Qe]}],invert:[{invert:["",kt,Je,Qe]}],saturate:[{saturate:[kt,Je,Qe]}],sepia:[{sepia:["",kt,Je,Qe]}],"backdrop-filter":[{"backdrop-filter":["","none",Je,Qe]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[kt,Je,Qe]}],"backdrop-contrast":[{"backdrop-contrast":[kt,Je,Qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kt,Je,Qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kt,Je,Qe]}],"backdrop-invert":[{"backdrop-invert":["",kt,Je,Qe]}],"backdrop-opacity":[{"backdrop-opacity":[kt,Je,Qe]}],"backdrop-saturate":[{"backdrop-saturate":[kt,Je,Qe]}],"backdrop-sepia":[{"backdrop-sepia":["",kt,Je,Qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Je,Qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kt,"initial",Je,Qe]}],ease:[{ease:["linear","initial",w,Je,Qe]}],delay:[{delay:[kt,Je,Qe]}],animate:[{animate:["none",v,Je,Qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,Je,Qe]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[Je,Qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Je,Qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Je,Qe]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[kt,Sd,Nl,y1]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},KN=Fne(sre);function pn(...e){return KN(I_(e))}const are=tl("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-none","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ah({className:e,variant:t="default",size:n="default",...r}){return j.jsx(bne,{"data-slot":"button",className:pn(are({variant:t,size:n,className:e})),...r})}const lre=()=>{const e=dte(),t=e?.name,n=e?.version,[,r]=e_();return j.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:j.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[j.jsxs("div",{className:"flex items-center gap-4",children:[j.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{r(null)},children:"Skybridge"}),j.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),j.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[j.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),j.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",n]})]}),j.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[j.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),j.jsx("div",{className:"flex items-center gap-2",children:j.jsx(ah,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:j.jsxs("a",{href:"https://www.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",j.jsx(Ote,{className:"h-3.5 w-3.5"})]})})})]})})},GN=k.createContext({});function cre(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const L_=typeof window<"u",ure=L_?k.useLayoutEffect:k.useEffect,F_=k.createContext(null);function U_(e,t){e.indexOf(t)===-1&&e.push(t)}function V_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ps=(e,t,n)=>n>t?t:n<e?e:n;let q_=()=>{};const Ns={},ZN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function WN(e){return typeof e=="object"&&e!==null}const YN=e=>/^0[^.\s]+$/u.test(e);function B_(e){let t;return()=>(t===void 0&&(t=e()),t)}const oi=e=>e,fre=(e,t)=>n=>t(e(n)),Vh=(...e)=>e.reduce(fre),lh=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class H_{constructor(){this.subscriptions=[]}add(t){return U_(this.subscriptions,t),()=>V_(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ki=e=>e*1e3,ti=e=>e/1e3;function XN(e,t){return t?e*(1e3/t):0}const QN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,dre=1e-7,hre=12;function pre(e,t,n,r,o){let s,l,c=0;do l=t+(n-t)/2,s=QN(l,r,o)-e,s>0?n=l:t=l;while(Math.abs(s)>dre&&++c<hre);return l}function qh(e,t,n,r){if(e===t&&n===r)return oi;const o=s=>pre(s,0,1,e,n);return s=>s===0||s===1?s:QN(o(s),t,r)}const JN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,eD=e=>t=>1-e(1-t),tD=qh(.33,1.53,.69,.99),K_=eD(tD),nD=JN(K_),rD=e=>(e*=2)<1?.5*K_(e):.5*(2-Math.pow(2,-10*(e-1))),G_=e=>1-Math.sin(Math.acos(e)),oD=eD(G_),iD=JN(G_),mre=qh(.42,0,1,1),gre=qh(0,0,.58,1),sD=qh(.42,0,.58,1),yre=e=>Array.isArray(e)&&typeof e[0]!="number",aD=e=>Array.isArray(e)&&typeof e[0]=="number",vre={linear:oi,easeIn:mre,easeInOut:sD,easeOut:gre,circIn:G_,circInOut:iD,circOut:oD,backIn:K_,backInOut:nD,backOut:tD,anticipate:rD},bre=e=>typeof e=="string",Qk=e=>{if(aD(e)){q_(e.length===4);const[t,n,r,o]=e;return qh(t,n,r,o)}else if(bre(e))return vre[e];return e},lg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Sre(e,t){let n=new Set,r=new Set,o=!1,s=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function u(h){l.has(h)&&(d.schedule(h),e()),h(c)}const d={schedule:(h,p=!1,g=!1)=>{const y=g&&o?n:r;return p&&l.add(h),y.has(h)||y.add(h),h},cancel:h=>{r.delete(h),l.delete(h)},process:h=>{if(c=h,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),n.clear(),o=!1,s&&(s=!1,d.process(h))}};return d}const wre=40;function lD(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,l=lg.reduce((C,S)=>(C[S]=Sre(s),C),{}),{setup:c,read:u,resolveKeyframes:d,preUpdate:h,update:p,preRender:g,render:b,postRender:y}=l,_=()=>{const C=Ns.useManualTiming?o.timestamp:performance.now();n=!1,Ns.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(C-o.timestamp,wre),1)),o.timestamp=C,o.isProcessing=!0,c.process(o),u.process(o),d.process(o),h.process(o),p.process(o),g.process(o),b.process(o),y.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(_))},x=()=>{n=!0,r=!0,o.isProcessing||e(_)};return{schedule:lg.reduce((C,S)=>{const T=l[S];return C[S]=(E,O=!1,M=!1)=>(n||x(),T.schedule(E,O,M)),C},{}),cancel:C=>{for(let S=0;S<lg.length;S++)l[lg[S]].cancel(C)},state:o,steps:l}}const{schedule:Zn,cancel:Ba,state:Fr,steps:v1}=lD(typeof requestAnimationFrame<"u"?requestAnimationFrame:oi,!0);let Dg;function xre(){Dg=void 0}const yo={now:()=>(Dg===void 0&&yo.set(Fr.isProcessing||Ns.useManualTiming?Fr.timestamp:performance.now()),Dg),set:e=>{Dg=e,queueMicrotask(xre)}},cD=e=>t=>typeof t=="string"&&t.startsWith(e),uD=cD("--"),_re=cD("var(--"),Z_=e=>_re(e)?Ere.test(e.split("/*")[0].trim()):!1,Ere=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Jk(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const mf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ch={...mf,transform:e=>Ps(0,1,e)},cg={...mf,default:1},Ld=e=>Math.round(e*1e5)/1e5,W_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Cre(e){return e==null}const Tre=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Y_=(e,t)=>n=>!!(typeof n=="string"&&Tre.test(n)&&n.startsWith(e)||t&&!Cre(n)&&Object.prototype.hasOwnProperty.call(n,t)),fD=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,l,c]=r.match(W_);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},Rre=e=>Ps(0,255,e),b1={...mf,transform:e=>Math.round(Rre(e))},ql={test:Y_("rgb","red"),parse:fD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+b1.transform(e)+", "+b1.transform(t)+", "+b1.transform(n)+", "+Ld(ch.transform(r))+")"};function Ore(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const yw={test:Y_("#"),parse:Ore,transform:ql.transform},Bh=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wa=Bh("deg"),Gi=Bh("%"),Ye=Bh("px"),Are=Bh("vh"),kre=Bh("vw"),e5={...Gi,parse:e=>Gi.parse(e)/100,transform:e=>Gi.transform(e*100)},gu={test:Y_("hsl","hue"),parse:fD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Gi.transform(Ld(t))+", "+Gi.transform(Ld(n))+", "+Ld(ch.transform(r))+")"},yr={test:e=>ql.test(e)||yw.test(e)||gu.test(e),parse:e=>ql.test(e)?ql.parse(e):gu.test(e)?gu.parse(e):yw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ql.transform(e):gu.transform(e),getAnimatableNone:e=>{const t=yr.parse(e);return t.alpha=0,yr.transform(t)}},Mre=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function jre(e){return isNaN(e)&&typeof e=="string"&&(e.match(W_)?.length||0)+(e.match(Mre)?.length||0)>0}const dD="number",hD="color",Pre="var",Nre="var(",t5="${}",Dre=/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 uh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const c=t.replace(Dre,u=>(yr.test(u)?(r.color.push(s),o.push(hD),n.push(yr.parse(u))):u.startsWith(Nre)?(r.var.push(s),o.push(Pre),n.push(u)):(r.number.push(s),o.push(dD),n.push(parseFloat(u))),++s,t5)).split(t5);return{values:n,split:c,indexes:r,types:o}}function pD(e){return uh(e).values}function mD(e){const{split:t,types:n}=uh(e),r=t.length;return o=>{let s="";for(let l=0;l<r;l++)if(s+=t[l],o[l]!==void 0){const c=n[l];c===dD?s+=Ld(o[l]):c===hD?s+=yr.transform(o[l]):s+=o[l]}return s}}const $re=e=>typeof e=="number"?0:yr.test(e)?yr.getAnimatableNone(e):e;function Ire(e){const t=pD(e);return mD(e)(t.map($re))}const Ha={test:jre,parse:pD,createTransformer:mD,getAnimatableNone:Ire};function S1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function zre({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,l=0;if(!t)o=s=l=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;o=S1(u,c,e+1/3),s=S1(u,c,e),l=S1(u,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}function my(e,t){return n=>n>0?t:e}const Yn=(e,t,n)=>e+(t-e)*n,w1=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Lre=[yw,ql,gu],Fre=e=>Lre.find(t=>t.test(e));function n5(e){const t=Fre(e);if(!t)return!1;let n=t.parse(e);return t===gu&&(n=zre(n)),n}const r5=(e,t)=>{const n=n5(e),r=n5(t);if(!n||!r)return my(e,t);const o={...n};return s=>(o.red=w1(n.red,r.red,s),o.green=w1(n.green,r.green,s),o.blue=w1(n.blue,r.blue,s),o.alpha=Yn(n.alpha,r.alpha,s),ql.transform(o))},vw=new Set(["none","hidden"]);function Ure(e,t){return vw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Vre(e,t){return n=>Yn(e,t,n)}function X_(e){return typeof e=="number"?Vre:typeof e=="string"?Z_(e)?my:yr.test(e)?r5:Hre:Array.isArray(e)?gD:typeof e=="object"?yr.test(e)?r5:qre:my}function gD(e,t){const n=[...e],r=n.length,o=e.map((s,l)=>X_(s)(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=o[l](s);return n}}function qre(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=X_(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function Bre(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],l=e.indexes[s][r[s]],c=e.values[l]??0;n[o]=c,r[s]++}return n}const Hre=(e,t)=>{const n=Ha.createTransformer(t),r=uh(e),o=uh(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?vw.has(e)&&!o.values.length||vw.has(t)&&!r.values.length?Ure(e,t):Vh(gD(Bre(r,o),o.values),n):my(e,t)};function yD(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Yn(e,t,n):X_(e)(e,t)}const Kre=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Zn.update(t,n),stop:()=>Ba(t),now:()=>Fr.isProcessing?Fr.timestamp:yo.now()}},vD=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},gy=2e4;function Q_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<gy;)t+=n,r=e.next(t);return t>=gy?1/0:t}function Gre(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Q_(r),gy);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:ti(o)}}const Zre=5;function bD(e,t,n){const r=Math.max(t-Zre,0);return XN(n-e(r),t-r)}const rr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},x1=.001;function Wre({duration:e=rr.duration,bounce:t=rr.bounce,velocity:n=rr.velocity,mass:r=rr.mass}){let o,s,l=1-t;l=Ps(rr.minDamping,rr.maxDamping,l),e=Ps(rr.minDuration,rr.maxDuration,ti(e)),l<1?(o=d=>{const h=d*l,p=h*e,g=h-n,b=bw(d,l),y=Math.exp(-p);return x1-g/b*y},s=d=>{const p=d*l*e,g=p*n+n,b=Math.pow(l,2)*Math.pow(d,2)*e,y=Math.exp(-p),_=bw(Math.pow(d,2),l);return(-o(d)+x1>0?-1:1)*((g-b)*y)/_}):(o=d=>{const h=Math.exp(-d*e),p=(d-n)*e+1;return-x1+h*p},s=d=>{const h=Math.exp(-d*e),p=(n-d)*(e*e);return h*p});const c=5/e,u=Xre(o,s,c);if(e=Ki(e),isNaN(u))return{stiffness:rr.stiffness,damping:rr.damping,duration:e};{const d=Math.pow(u,2)*r;return{stiffness:d,damping:l*2*Math.sqrt(r*d),duration:e}}}const Yre=12;function Xre(e,t,n){let r=n;for(let o=1;o<Yre;o++)r=r-e(r)/t(r);return r}function bw(e,t){return e*Math.sqrt(1-t*t)}const Qre=["duration","bounce"],Jre=["stiffness","damping","mass"];function o5(e,t){return t.some(n=>e[n]!==void 0)}function eoe(e){let t={velocity:rr.velocity,stiffness:rr.stiffness,damping:rr.damping,mass:rr.mass,isResolvedFromDuration:!1,...e};if(!o5(e,Jre)&&o5(e,Qre))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Ps(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:rr.mass,stiffness:o,damping:s}}else{const n=Wre(e);t={...t,...n,mass:rr.mass},t.isResolvedFromDuration=!0}return t}function yy(e=rr.visualDuration,t=rr.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:u,damping:d,mass:h,duration:p,velocity:g,isResolvedFromDuration:b}=eoe({...n,velocity:-ti(n.velocity||0)}),y=g||0,_=d/(2*Math.sqrt(u*h)),x=l-s,w=ti(Math.sqrt(u/h)),v=Math.abs(x)<5;r||(r=v?rr.restSpeed.granular:rr.restSpeed.default),o||(o=v?rr.restDelta.granular:rr.restDelta.default);let C;if(_<1){const T=bw(w,_);C=E=>{const O=Math.exp(-_*w*E);return l-O*((y+_*w*x)/T*Math.sin(T*E)+x*Math.cos(T*E))}}else if(_===1)C=T=>l-Math.exp(-w*T)*(x+(y+w*x)*T);else{const T=w*Math.sqrt(_*_-1);C=E=>{const O=Math.exp(-_*w*E),M=Math.min(T*E,300);return l-O*((y+_*w*x)*Math.sinh(M)+T*x*Math.cosh(M))/T}}const S={calculatedDuration:b&&p||null,next:T=>{const E=C(T);if(b)c.done=T>=p;else{let O=T===0?y:0;_<1&&(O=T===0?Ki(y):bD(C,T,E));const M=Math.abs(O)<=r,P=Math.abs(l-E)<=o;c.done=M&&P}return c.value=c.done?l:E,c},toString:()=>{const T=Math.min(Q_(S),gy),E=vD(O=>S.next(T*O).value,T,30);return T+"ms "+E},toTransition:()=>{}};return S}yy.applyToOptions=e=>{const t=Gre(e,100,yy);return e.ease=t.ease,e.duration=Ki(t.duration),e.type="keyframes",e};function Sw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:l,min:c,max:u,restDelta:d=.5,restSpeed:h}){const p=e[0],g={done:!1,value:p},b=M=>c!==void 0&&M<c||u!==void 0&&M>u,y=M=>c===void 0?u:u===void 0||Math.abs(c-M)<Math.abs(u-M)?c:u;let _=n*t;const x=p+_,w=l===void 0?x:l(x);w!==x&&(_=w-p);const v=M=>-_*Math.exp(-M/r),C=M=>w+v(M),S=M=>{const P=v(M),I=C(M);g.done=Math.abs(P)<=d,g.value=g.done?w:I};let T,E;const O=M=>{b(g.value)&&(T=M,E=yy({keyframes:[g.value,y(g.value)],velocity:bD(C,M,g.value),damping:o,stiffness:s,restDelta:d,restSpeed:h}))};return O(0),{calculatedDuration:null,next:M=>{let P=!1;return!E&&T===void 0&&(P=!0,S(M),O(M)),T!==void 0&&M>=T?E.next(M-T):(!P&&S(M),g)}}}function toe(e,t,n){const r=[],o=n||Ns.mix||yD,s=e.length-1;for(let l=0;l<s;l++){let c=o(e[l],e[l+1]);if(t){const u=Array.isArray(t)?t[l]||oi:t;c=Vh(u,c)}r.push(c)}return r}function noe(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(q_(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=toe(t,r,o),u=c.length,d=h=>{if(l&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const g=lh(e[p],e[p+1],h);return c[p](g)};return n?h=>d(Ps(e[0],e[s-1],h)):d}function roe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=lh(0,t,r);e.push(Yn(n,1,o))}}function ooe(e){const t=[0];return roe(t,e.length-1),t}function ioe(e,t){return e.map(n=>n*t)}function soe(e,t){return e.map(()=>t||sD).splice(0,e.length-1)}function Fd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=yre(r)?r.map(Qk):Qk(r),s={done:!1,value:t[0]},l=ioe(n&&n.length===t.length?n:ooe(t),e),c=noe(l,t,{ease:Array.isArray(o)?o:soe(t,o)});return{calculatedDuration:e,next:u=>(s.value=c(u),s.done=u>=e,s)}}const aoe=e=>e!==null;function J_(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(aoe),c=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!c||r===void 0?s[c]:r}const loe={decay:Sw,inertia:Sw,tween:Fd,keyframes:Fd,spring:yy};function SD(e){typeof e.type=="string"&&(e.type=loe[e.type])}class eE{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const coe=e=>e/100;class tE extends eE{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==yo.now()&&this.tick(yo.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;SD(t);const{type:n=Fd,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:l=0}=t;let{keyframes:c}=t;const u=n||Fd;u!==Fd&&typeof c[0]!="number"&&(this.mixKeyframes=Vh(coe,yD(c[0],c[1])),c=[0,100]);const d=u({...t,keyframes:c});s==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...c].reverse(),velocity:-l})),d.calculatedDuration===null&&(d.calculatedDuration=Q_(d));const{calculatedDuration:h}=d;this.calculatedDuration=h,this.resolvedDuration=h+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:l,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:h,repeat:p,repeatType:g,repeatDelay:b,type:y,onUpdate:_,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?w<0:w>o;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let C=this.currentTime,S=r;if(p){const M=Math.min(this.currentTime,o)/c;let P=Math.floor(M),I=M%1;!I&&M>=1&&(I=1),I===1&&P--,P=Math.min(P,p+1),P%2&&(g==="reverse"?(I=1-I,b&&(I-=b/c)):g==="mirror"&&(S=l)),C=Ps(0,1,I)*c}const T=v?{done:!1,value:h[0]}:S.next(C);s&&(T.value=s(T.value));let{done:E}=T;!v&&u!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&y!==Sw&&(T.value=J_(h,this.options,x,this.speed)),_&&_(T.value),O&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return ti(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ti(t)}get time(){return ti(this.currentTime)}set time(t){t=Ki(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(yo.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ti(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Kre,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(yo.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function uoe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Bl=e=>e*180/Math.PI,ww=e=>{const t=Bl(Math.atan2(e[1],e[0]));return xw(t)},foe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ww,rotateZ:ww,skewX:e=>Bl(Math.atan(e[1])),skewY:e=>Bl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},xw=e=>(e=e%360,e<0&&(e+=360),e),i5=ww,s5=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),a5=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),doe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:s5,scaleY:a5,scale:e=>(s5(e)+a5(e))/2,rotateX:e=>xw(Bl(Math.atan2(e[6],e[5]))),rotateY:e=>xw(Bl(Math.atan2(-e[2],e[0]))),rotateZ:i5,rotate:i5,skewX:e=>Bl(Math.atan(e[4])),skewY:e=>Bl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function _w(e){return e.includes("scale")?1:0}function Ew(e,t){if(!e||e==="none")return _w(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=doe,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=foe,o=c}if(!o)return _w(t);const s=r[t],l=o[1].split(",").map(poe);return typeof s=="function"?s(l):l[s]}const hoe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ew(n,t)};function poe(e){return parseFloat(e.trim())}const gf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yf=new Set(gf),l5=e=>e===mf||e===Ye,moe=new Set(["x","y","z"]),goe=gf.filter(e=>!moe.has(e));function yoe(e){const t=[];return goe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ta={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ew(t,"x"),y:(e,{transform:t})=>Ew(t,"y")};Ta.translateX=Ta.x;Ta.translateY=Ta.y;const Gl=new Set;let Cw=!1,Tw=!1,Rw=!1;function wD(){if(Tw){const e=Array.from(Gl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=yoe(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,l])=>{r.getValue(s)?.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Tw=!1,Cw=!1,Gl.forEach(e=>e.complete(Rw)),Gl.clear()}function xD(){Gl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tw=!0)})}function voe(){Rw=!0,xD(),wD(),Rw=!1}class nE{constructor(t,n,r,o,s,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Gl.add(this),Cw||(Cw=!0,Zn.read(xD),Zn.resolveKeyframes(wD))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o?.get(),l=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&s===void 0&&o.set(t[0])}uoe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Gl.delete(this)}cancel(){this.state==="scheduled"&&(Gl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const boe=e=>e.startsWith("--");function Soe(e,t,n){boe(t)?e.style.setProperty(t,n):e.style[t]=n}const woe=B_(()=>window.ScrollTimeline!==void 0),xoe={};function _oe(e,t){const n=B_(e);return()=>xoe[t]??n()}const _D=_oe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ad=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,c5={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ad([0,.65,.55,1]),circOut:Ad([.55,0,1,.45]),backIn:Ad([.31,.01,.66,-.59]),backOut:Ad([.33,1.53,.69,.99])};function ED(e,t){if(e)return typeof e=="function"?_D()?vD(e,t):"ease-out":aD(e)?Ad(e):Array.isArray(e)?e.map(n=>ED(n,t)||c5.easeOut):c5[e]}function Eoe(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:l="loop",ease:c="easeOut",times:u}={},d=void 0){const h={[t]:n};u&&(h.offset=u);const p=ED(c,o);Array.isArray(p)&&(h.easing=p);const g={delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"};return d&&(g.pseudoElement=d),e.animate(h,g)}function CD(e){return typeof e=="function"&&"applyToOptions"in e}function Coe({type:e,...t}){return CD(e)&&_D()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Toe extends eE{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:l=!1,finalKeyframe:c,onComplete:u}=t;this.isPseudoElement=!!s,this.allowFlatten=l,this.options=t,q_(typeof t.type!="string");const d=Coe(t);this.animation=Eoe(n,r,o,d,s),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const h=J_(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(h):Soe(n,r,h),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ti(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ti(t)}get time(){return ti(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ki(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&woe()?(this.animation.timeline=t,oi):n(this)}}const TD={anticipate:rD,backInOut:nD,circInOut:iD};function Roe(e){return e in TD}function Ooe(e){typeof e.ease=="string"&&Roe(e.ease)&&(e.ease=TD[e.ease])}const u5=10;class Aoe extends Toe{constructor(t){Ooe(t),SD(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new tE({...l,autoplay:!1}),u=Ki(this.finishedTime??this.time);n.setWithVelocity(c.sample(u-u5).value,c.sample(u).value,u5),c.stop()}}const f5=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ha.test(e)||e==="0")&&!e.startsWith("url("));function koe(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Moe(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],l=f5(o,t),c=f5(s,t);return!l||!c?!1:koe(e)||(n==="spring"||CD(n))&&r}function Ow(e){e.duration=0,e.type="keyframes"}const joe=new Set(["opacity","clipPath","filter","transform"]),Poe=B_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Noe(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return Poe()&&n&&joe.has(n)&&(n!=="transform"||!d)&&!u&&!r&&o!=="mirror"&&s!==0&&l!=="inertia"}const Doe=40;class $oe extends eE{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:l="loop",keyframes:c,name:u,motionValue:d,element:h,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=yo.now();const g={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:l,name:u,motionValue:d,element:h,...p},b=h?.KeyframeResolver||nE;this.keyframeResolver=new b(c,(y,_,x)=>this.onKeyframesResolved(y,_,g,!x),u,d,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:l,velocity:c,delay:u,isHandoff:d,onUpdate:h}=r;this.resolvedAt=yo.now(),Moe(t,s,l,c)||((Ns.instantAnimations||!u)&&h?.(J_(t,r,n)),t[0]=t[t.length-1],Ow(r),r.repeat=0);const g={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Doe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=!d&&Noe(g)?new Aoe({...g,element:g.motionValue.owner.current}):new tE(g);b.finished.then(()=>this.notifyFinished()).catch(oi),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),voe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Ioe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zoe(e){const t=Ioe.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function RD(e,t,n=1){const[r,o]=zoe(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return ZN(l)?parseFloat(l):l}return Z_(o)?RD(o,t,n+1):o}function rE(e,t){return e?.[t]??e?.default??e}const OD=new Set(["width","height","top","left","right","bottom",...gf]),Loe={test:e=>e==="auto",parse:e=>e},AD=e=>t=>t.test(e),kD=[mf,Ye,Gi,wa,kre,Are,Loe],d5=e=>kD.find(AD(e));function Foe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||YN(e):!0}const Uoe=new Set(["brightness","contrast","saturate","opacity"]);function Voe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(W_)||[];if(!r)return e;const o=n.replace(r,"");let s=Uoe.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const qoe=/\b([a-z-]*)\(.*?\)/gu,Aw={...Ha,getAnimatableNone:e=>{const t=e.match(qoe);return t?t.map(Voe).join(" "):e}},h5={...mf,transform:Math.round},Boe={rotate:wa,rotateX:wa,rotateY:wa,rotateZ:wa,scale:cg,scaleX:cg,scaleY:cg,scaleZ:cg,skew:wa,skewX:wa,skewY:wa,distance:Ye,translateX:Ye,translateY:Ye,translateZ:Ye,x:Ye,y:Ye,z:Ye,perspective:Ye,transformPerspective:Ye,opacity:ch,originX:e5,originY:e5,originZ:Ye},oE={borderWidth:Ye,borderTopWidth:Ye,borderRightWidth:Ye,borderBottomWidth:Ye,borderLeftWidth:Ye,borderRadius:Ye,radius:Ye,borderTopLeftRadius:Ye,borderTopRightRadius:Ye,borderBottomRightRadius:Ye,borderBottomLeftRadius:Ye,width:Ye,maxWidth:Ye,height:Ye,maxHeight:Ye,top:Ye,right:Ye,bottom:Ye,left:Ye,inset:Ye,insetBlock:Ye,insetBlockStart:Ye,insetBlockEnd:Ye,insetInline:Ye,insetInlineStart:Ye,insetInlineEnd:Ye,padding:Ye,paddingTop:Ye,paddingRight:Ye,paddingBottom:Ye,paddingLeft:Ye,paddingBlock:Ye,paddingBlockStart:Ye,paddingBlockEnd:Ye,paddingInline:Ye,paddingInlineStart:Ye,paddingInlineEnd:Ye,margin:Ye,marginTop:Ye,marginRight:Ye,marginBottom:Ye,marginLeft:Ye,marginBlock:Ye,marginBlockStart:Ye,marginBlockEnd:Ye,marginInline:Ye,marginInlineStart:Ye,marginInlineEnd:Ye,backgroundPositionX:Ye,backgroundPositionY:Ye,...Boe,zIndex:h5,fillOpacity:ch,strokeOpacity:ch,numOctaves:h5},Hoe={...oE,color:yr,backgroundColor:yr,outlineColor:yr,fill:yr,stroke:yr,borderColor:yr,borderTopColor:yr,borderRightColor:yr,borderBottomColor:yr,borderLeftColor:yr,filter:Aw,WebkitFilter:Aw},MD=e=>Hoe[e];function jD(e,t){let n=MD(e);return n!==Aw&&(n=Ha),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Koe=new Set(["auto","none","0"]);function Goe(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!Koe.has(s)&&uh(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=jD(n,o)}class Zoe extends nE{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let p=t[h];if(typeof p=="string"&&(p=p.trim(),Z_(p))){const g=RD(p,n.current);g!==void 0&&(t[h]=g),h===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!OD.has(r)||t.length!==2)return;const[o,s]=t,l=d5(o),c=d5(s),u=Jk(o),d=Jk(s);if(u!==d&&Ta[r]){this.needsMeasurement=!0;return}if(l!==c)if(l5(l)&&l5(c))for(let h=0;h<t.length;h++){const p=t[h];typeof p=="string"&&(t[h]=parseFloat(p))}else Ta[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Foe(t[o]))&&r.push(o);r.length&&Goe(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ta[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,l=r[s];r[s]=Ta[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Woe(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const PD=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Yoe(e){return WN(e)&&"offsetHeight"in e}const p5=30,Xoe=e=>!isNaN(parseFloat(e));class Qoe{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=yo.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=yo.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Xoe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new H_);const r=this.events[t].add(n);return t==="change"?()=>{r(),Zn.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=yo.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>p5)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,p5);return XN(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qu(e,t){return new Qoe(e,t)}const{schedule:iE}=lD(queueMicrotask,!1),_i={x:!1,y:!1};function ND(){return _i.x||_i.y}function Joe(e){return e==="x"||e==="y"?_i[e]?null:(_i[e]=!0,()=>{_i[e]=!1}):_i.x||_i.y?null:(_i.x=_i.y=!0,()=>{_i.x=_i.y=!1})}function DD(e,t){const n=Woe(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function m5(e){return!(e.pointerType==="touch"||ND())}function eie(e,t,n={}){const[r,o,s]=DD(e,n),l=c=>{if(!m5(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const h=p=>{m5(p)&&(d(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,o)};return r.forEach(c=>{c.addEventListener("pointerenter",l,o)}),s}const $D=(e,t)=>t?e===t?!0:$D(e,t.parentElement):!1,sE=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,tie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ID(e){return tie.has(e.tagName)||e.isContentEditable===!0}const $g=new WeakSet;function g5(e){return t=>{t.key==="Enter"&&e(t)}}function _1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nie=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=g5(()=>{if($g.has(n))return;_1(n,"down");const o=g5(()=>{_1(n,"up")}),s=()=>_1(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function y5(e){return sE(e)&&!ND()}function rie(e,t,n={}){const[r,o,s]=DD(e,n),l=c=>{const u=c.currentTarget;if(!y5(c))return;$g.add(u);const d=t(u,c),h=(b,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),$g.has(u)&&$g.delete(u),y5(b)&&typeof d=="function"&&d(b,{success:y})},p=b=>{h(b,u===window||u===document||n.useGlobalTarget||$D(u,b.target))},g=b=>{h(b,!1)};window.addEventListener("pointerup",p,o),window.addEventListener("pointercancel",g,o)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",l,o),Yoe(c)&&(c.addEventListener("focus",d=>nie(d,o)),!ID(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function zD(e){return WN(e)&&"ownerSVGElement"in e}function oie(e){return zD(e)&&e.tagName==="svg"}const Xr=e=>!!(e&&e.getVelocity),iie=[...kD,yr,Ha],sie=e=>iie.find(AD(e)),LD=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function aie(e=!0){const t=k.useContext(F_);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=k.useId();k.useEffect(()=>{if(e)return o(s)},[e]);const l=k.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,l]:[!0]}const FD=k.createContext({strict:!1}),v5={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"]},Bu={};for(const e in v5)Bu[e]={isEnabled:t=>v5[e].some(n=>!!t[n])};function lie(e){for(const t in e)Bu[t]={...Bu[t],...e[t]}}const cie=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 vy(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cie.has(e)}let UD=e=>!vy(e);function uie(e){typeof e=="function"&&(UD=t=>t.startsWith("on")?!vy(t):e(t))}try{uie(require("@emotion/is-prop-valid").default)}catch{}function fie(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(UD(o)||n===!0&&vy(o)||!t&&!vy(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const p0=k.createContext({});function m0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function fh(e){return typeof e=="string"||Array.isArray(e)}const aE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lE=["initial",...aE];function g0(e){return m0(e.animate)||lE.some(t=>fh(e[t]))}function VD(e){return!!(g0(e)||e.variants)}function die(e,t){if(g0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||fh(n)?n:void 0,animate:fh(r)?r:void 0}}return e.inherit!==!1?t:{}}function hie(e){const{initial:t,animate:n}=die(e,k.useContext(p0));return k.useMemo(()=>({initial:t,animate:n}),[b5(t),b5(n)])}function b5(e){return Array.isArray(e)?e.join(" "):e}function S5(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ye.test(e))e=parseFloat(e);else return e;const n=S5(e,t.target.x),r=S5(e,t.target.y);return`${n}% ${r}%`}},pie={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ha.parse(e);if(o.length>5)return r;const s=Ha.createTransformer(e),l=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;o[0+l]/=c,o[1+l]/=u;const d=Yn(c,u,.5);return typeof o[2+l]=="number"&&(o[2+l]/=d),typeof o[3+l]=="number"&&(o[3+l]/=d),s(o)}},kw={borderRadius:{...wd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wd,borderTopRightRadius:wd,borderBottomLeftRadius:wd,borderBottomRightRadius:wd,boxShadow:pie};function qD(e,{layout:t,layoutId:n}){return yf.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kw[e]||e==="opacity")}const mie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gie=gf.length;function yie(e,t,n){let r="",o=!0;for(let s=0;s<gie;s++){const l=gf[s],c=e[l];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(l.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const d=PD(c,oE[l]);if(!u){o=!1;const h=mie[l]||l;r+=`${h}(${d}) `}n&&(t[l]=d)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function cE(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let l=!1,c=!1;for(const u in t){const d=t[u];if(yf.has(u)){l=!0;continue}else if(uD(u)){o[u]=d;continue}else{const h=PD(d,oE[u]);u.startsWith("origin")?(c=!0,s[u]=h):r[u]=h}}if(t.transform||(l||n?r.transform=yie(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=s;r.transformOrigin=`${u} ${d} ${h}`}}const uE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function BD(e,t,n){for(const r in t)!Xr(t[r])&&!qD(r,n)&&(e[r]=t[r])}function vie({transformTemplate:e},t){return k.useMemo(()=>{const n=uE();return cE(n,t,e),Object.assign({},n.vars,n.style)},[t])}function bie(e,t){const n=e.style||{},r={};return BD(r,n,e),Object.assign(r,vie(e,t)),r}function Sie(e,t){const n={},r=bie(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const wie={offset:"stroke-dashoffset",array:"stroke-dasharray"},xie={offset:"strokeDashoffset",array:"strokeDasharray"};function _ie(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?wie:xie;e[s.offset]=Ye.transform(-r);const l=Ye.transform(t),c=Ye.transform(n);e[s.array]=`${l} ${c}`}const Eie=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function HD(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...c},u,d,h){if(cE(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=h?.transformBox??"fill-box",delete p.transformBox);for(const b of Eie)p[b]!==void 0&&(g[b]=p[b],delete p[b]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&_ie(p,o,s,l,!1)}const KD=()=>({...uE(),attrs:{}}),GD=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Cie(e,t,n,r){const o=k.useMemo(()=>{const s=KD();return HD(s,t,GD(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};BD(s,e.style,e),o.style={...s,...o.style}}return o}const Tie=["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 fE(e){return typeof e!="string"||e.includes("-")?!1:!!(Tie.indexOf(e)>-1||/[A-Z]/u.test(e))}function Rie(e,t,n,{latestValues:r},o,s=!1,l){const u=(l??fE(e)?Cie:Sie)(t,r,o,e),d=fie(t,typeof e=="string",s),h=e!==k.Fragment?{...d,...u,ref:n}:{},{children:p}=t,g=k.useMemo(()=>Xr(p)?p.get():p,[p]);return k.createElement(e,{...h,children:g})}function w5(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function dE(e,t,n,r){if(typeof t=="function"){const[o,s]=w5(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=w5(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Ig(e){return Xr(e)?e.get():e}function Oie({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Aie(n,r,o,e),renderState:t()}}function Aie(e,t,n,r){const o={},s=r(e,{});for(const g in s)o[g]=Ig(s[g]);let{initial:l,animate:c}=e;const u=g0(e),d=VD(e);t&&d&&!u&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||l===!1;const p=h?c:l;if(p&&typeof p!="boolean"&&!m0(p)){const g=Array.isArray(p)?p:[p];for(let b=0;b<g.length;b++){const y=dE(e,g[b]);if(y){const{transitionEnd:_,transition:x,...w}=y;for(const v in w){let C=w[v];if(Array.isArray(C)){const S=h?C.length-1:0;C=C[S]}C!==null&&(o[v]=C)}for(const v in _)o[v]=_[v]}}}return o}const ZD=e=>(t,n)=>{const r=k.useContext(p0),o=k.useContext(F_),s=()=>Oie(e,t,r,o);return n?s():cre(s)};function hE(e,t,n){const{style:r}=e,o={};for(const s in r)(Xr(r[s])||t.style&&Xr(t.style[s])||qD(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=r[s]);return o}const kie=ZD({scrapeMotionValuesFromProps:hE,createRenderState:uE});function WD(e,t,n){const r=hE(e,t,n);for(const o in e)if(Xr(e[o])||Xr(t[o])){const s=gf.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const Mie=ZD({scrapeMotionValuesFromProps:WD,createRenderState:KD}),jie=Symbol.for("motionComponentSymbol");function Pie(e,t,n){const r=k.useRef(n);k.useInsertionEffect(()=>{r.current=n});const o=k.useRef(null);return k.useCallback(s=>{s&&e.onMount?.(s),t&&(s?t.mount(s):t.unmount());const l=r.current;if(typeof l=="function")if(s){const c=l(s);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):l(s);else l&&(l.current=s)},[t])}const pE=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Nie="framerAppearId",YD="data-"+pE(Nie),XD=k.createContext({});function kd(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Die(e,t,n,r,o,s){const{visualElement:l}=k.useContext(p0),c=k.useContext(FD),u=k.useContext(F_),d=k.useContext(LD).reducedMotion,h=k.useRef(null);r=r||c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,isSVG:s}));const p=h.current,g=k.useContext(XD);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&$ie(h.current,n,o,g);const b=k.useRef(!1);k.useInsertionEffect(()=>{p&&b.current&&p.update(n,u)});const y=n[YD],_=k.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return ure(()=>{p&&(b.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),_.current&&p.animationState&&p.animationState.animateChanges())}),k.useEffect(()=>{p&&(!_.current&&p.animationState&&p.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),_.current=!1),p.enteringChildren=void 0)}),p}function $ie(e,t,n,r){const{layoutId:o,layout:s,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:QD(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!l||c&&kd(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:d})}function QD(e){if(e)return e.options.allowProjection!==!1?e.projection:QD(e.parent)}function E1(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&lie(r);const s=n?n==="svg":fE(e),l=s?Mie:kie;function c(d,h){let p;const g={...k.useContext(LD),...d,layoutId:Iie(d)},{isStatic:b}=g,y=hie(d),_=l(d,b);if(!b&&L_){zie();const x=Lie(g);p=x.MeasureLayout,y.visualElement=Die(e,_,g,o,x.ProjectionNode,s)}return j.jsxs(p0.Provider,{value:y,children:[p&&y.visualElement?j.jsx(p,{visualElement:y.visualElement,...g}):null,Rie(e,d,Pie(_,y.visualElement,h),_,b,t,s)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=k.forwardRef(c);return u[jie]=e,u}function Iie({layoutId:e}){const t=k.useContext(GN).id;return t&&e!==void 0?t+"-"+e:e}function zie(e,t){k.useContext(FD).strict}function Lie(e){const{drag:t,layout:n}=Bu;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Fie(e,t){if(typeof Proxy>"u")return E1;const n=new Map,r=(s,l)=>E1(s,l,e,t),o=(s,l)=>r(s,l);return new Proxy(o,{get:(s,l)=>l==="create"?r:(n.has(l)||n.set(l,E1(l,void 0,e,t)),n.get(l))})}function JD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Uie({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vie(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function C1(e){return e===void 0||e===1}function Mw({scale:e,scaleX:t,scaleY:n}){return!C1(e)||!C1(t)||!C1(n)}function Ll(e){return Mw(e)||e$(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function e$(e){return x5(e.x)||x5(e.y)}function x5(e){return e&&e!=="0%"}function by(e,t,n){const r=e-n,o=t*r;return n+o}function _5(e,t,n,r,o){return o!==void 0&&(e=by(e,o,r)),by(e,n,r)+t}function jw(e,t=0,n=1,r,o){e.min=_5(e.min,t,n,r,o),e.max=_5(e.max,t,n,r,o)}function t$(e,{x:t,y:n}){jw(e.x,t.translate,t.scale,t.originPoint),jw(e.y,n.translate,n.scale,n.originPoint)}const E5=.999999999999,C5=1.0000000000001;function qie(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,l;for(let c=0;c<o;c++){s=n[c],l=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vu(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,t$(e,l)),r&&Ll(s.latestValues)&&vu(e,s.latestValues))}t.x<C5&&t.x>E5&&(t.x=1),t.y<C5&&t.y>E5&&(t.y=1)}function yu(e,t){e.min=e.min+t,e.max=e.max+t}function T5(e,t,n,r,o=.5){const s=Yn(e.min,e.max,o);jw(e,t,n,s,r)}function vu(e,t){T5(e.x,t.x,t.scaleX,t.scale,t.originX),T5(e.y,t.y,t.scaleY,t.scale,t.originY)}function n$(e,t){return JD(Vie(e.getBoundingClientRect(),t))}function Bie(e,t,n){const r=n$(e,n),{scroll:o}=t;return o&&(yu(r.x,o.offset.x),yu(r.y,o.offset.y)),r}const R5=()=>({translate:0,scale:1,origin:0,originPoint:0}),bu=()=>({x:R5(),y:R5()}),O5=()=>({min:0,max:0}),Cr=()=>({x:O5(),y:O5()}),Pw={current:null},r$={current:!1};function Hie(){if(r$.current=!0,!!L_)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pw.current=e.matches;e.addEventListener("change",t),t()}else Pw.current=!1}const Kie=new WeakMap;function Gie(e,t,n){for(const r in t){const o=t[r],s=n[r];if(Xr(o))e.addValue(r,o);else if(Xr(s))e.addValue(r,qu(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(r);e.addValue(r,qu(l!==void 0?l:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const A5=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Zie{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=yo.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Zn.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=g0(n),this.isVariantNode=VD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const b=p[g];u[g]!==void 0&&Xr(b)&&b.set(u[g])}}mount(t){this.current=t,Kie.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(r$.current||Hie(),this.shouldReduceMotion=Pw.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ba(this.notifyUpdate),Ba(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=yf.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Zn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Bu){const n=Bu[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Cr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<A5.length;r++){const o=A5[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,l=t[s];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=Gie(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=qu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(ZN(r)||YN(r))?r=parseFloat(r):!sie(r)&&Ha.test(n)&&(r=jD(t,n)),this.setBaseTarget(t,Xr(r)?r.get():r)),Xr(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=dE(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Xr(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new H_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){iE.render(this.render)}}class o$ extends Zie{constructor(){super(...arguments),this.KeyframeResolver=Zoe}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Xr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function i$(e,{style:t,vars:n},r,o){const s=e.style;let l;for(l in t)s[l]=t[l];o?.applyProjectionStyles(s,r);for(l in n)s.setProperty(l,n[l])}function Wie(e){return window.getComputedStyle(e)}class Yie extends o${constructor(){super(...arguments),this.type="html",this.renderInstance=i$}readValueFromInstance(t,n){if(yf.has(n))return this.projection?.isProjecting?_w(n):hoe(t,n);{const r=Wie(t),o=(uD(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return n$(t,n)}build(t,n,r){cE(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return hE(t,n,r)}}const s$=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 Xie(e,t,n,r){i$(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(s$.has(o)?o:pE(o),t.attrs[o])}class Qie extends o${constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Cr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yf.has(n)){const r=MD(n);return r&&r.default||0}return n=s$.has(n)?n:pE(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return WD(t,n,r)}build(t,n,r){HD(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){Xie(t,n,r,o)}mount(t){this.isSVGTag=GD(t.tagName),super.mount(t)}}const Jie=(e,t)=>t.isSVG??fE(e)?new Qie(t):new Yie(t,{allowProjection:e!==k.Fragment});function Cu(e,t,n){const r=e.getProps();return dE(r,t,n!==void 0?n:r.custom,e)}const Nw=e=>Array.isArray(e);function ese(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qu(n))}function tse(e){return Nw(e)?e[e.length-1]||0:e}function nse(e,t){const n=Cu(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const l in s){const c=tse(s[l]);ese(e,l,c)}}function rse(e){return!!(Xr(e)&&e.add)}function Dw(e,t){const n=e.getValue("willChange");if(rse(n))return n.add(t);if(!n&&Ns.WillChange){const r=new Ns.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function a$(e){return e.props[YD]}const ose=e=>e!==null;function ise(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ose),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const sse={type:"spring",stiffness:500,damping:25,restSpeed:10},ase=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lse={type:"keyframes",duration:.8},cse={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},use=(e,{keyframes:t})=>t.length>2?lse:yf.has(e)?e.startsWith("scale")?ase(t[1]):sse:cse;function fse({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:l,repeatDelay:c,from:u,elapsed:d,...h}){return!!Object.keys(h).length}const mE=(e,t,n,r={},o,s)=>l=>{const c=rE(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ki(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:g=>{t.set(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:o};fse(c)||Object.assign(h,use(e,h)),h.duration&&(h.duration=Ki(h.duration)),h.repeatDelay&&(h.repeatDelay=Ki(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(Ow(h),h.delay===0&&(p=!0)),(Ns.instantAnimations||Ns.skipAnimations)&&(p=!0,Ow(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,p&&!s&&t.get()!==void 0){const g=ise(h.keyframes,c);if(g!==void 0){Zn.update(()=>{h.onUpdate(g),h.onComplete()});return}}return c.isSync?new tE(h):new $oe(h)};function dse({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function l$(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(s=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const h in c){const p=e.getValue(h,e.latestValues[h]??null),g=c[h];if(g===void 0||d&&dse(d,h))continue;const b={delay:n,...rE(s||{},h)},y=p.get();if(y!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===y&&!b.velocity)continue;let _=!1;if(window.MotionHandoffAnimation){const w=a$(e);if(w){const v=window.MotionHandoffAnimation(w,h,Zn);v!==null&&(b.startTime=v,_=!0)}}Dw(e,h),p.start(mE(h,p,g,e.shouldReduceMotion&&OD.has(h)?{type:!1}:b,e,_));const x=p.animation;x&&u.push(x)}return l&&Promise.all(u).then(()=>{Zn.update(()=>{l&&nse(e,l)})}),u}function c$(e,t,n,r=0,o=1){const s=Array.from(e).sort((d,h)=>d.sortNodePosition(h)).indexOf(t),l=e.size,c=(l-1)*r;return typeof n=="function"?n(s,l):o===1?s*r:c-s*r}function $w(e,t,n={}){const r=Cu(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(l$(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=o;return hse(e,t,u,d,h,p,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,d]=c==="beforeChildren"?[s,l]:[l,s];return u().then(()=>d())}else return Promise.all([s(),l(n.delay)])}function hse(e,t,n=0,r=0,o=0,s=1,l){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push($w(u,t,{...l,delay:n+(typeof r=="function"?0:r)+c$(e.variantChildren,u,r,o,s)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function pse(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>$w(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=$w(e,t,n);else{const o=typeof t=="function"?Cu(e,t,n.custom):t;r=Promise.all(l$(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function u$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const mse=lE.length;function f$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?f$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<mse;n++){const r=lE[n],o=e.props[r];(fh(o)||o===!1)&&(t[r]=o)}return t}const gse=[...aE].reverse(),yse=aE.length;function vse(e){return t=>Promise.all(t.map(({animation:n,options:r})=>pse(e,n,r)))}function bse(e){let t=vse(e),n=k5(),r=!0;const o=u=>(d,h)=>{const p=Cu(e,h,u==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:g,transitionEnd:b,...y}=p;d={...d,...y,...b}}return d};function s(u){t=u(e)}function l(u){const{props:d}=e,h=f$(e.parent)||{},p=[],g=new Set;let b={},y=1/0;for(let x=0;x<yse;x++){const w=gse[x],v=n[w],C=d[w]!==void 0?d[w]:h[w],S=fh(C),T=w===u?v.isActive:null;T===!1&&(y=x);let E=C===h[w]&&C!==d[w]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...b},!v.isActive&&T===null||!C&&!v.prevProp||m0(C)||typeof C=="boolean")continue;const O=Sse(v.prevProp,C);let M=O||w===u&&v.isActive&&!E&&S||x>y&&S,P=!1;const I=Array.isArray(C)?C:[C];let z=I.reduce(o(w),{});T===!1&&(z={});const{prevResolvedValues:U={}}=v,G={...U,...z},J=H=>{M=!0,g.has(H)&&(P=!0,g.delete(H)),v.needsAnimating[H]=!0;const Y=e.getValue(H);Y&&(Y.liveStyle=!1)};for(const H in G){const Y=z[H],oe=U[H];if(b.hasOwnProperty(H))continue;let ne=!1;Nw(Y)&&Nw(oe)?ne=!u$(Y,oe):ne=Y!==oe,ne?Y!=null?J(H):g.add(H):Y!==void 0&&g.has(H)?J(H):v.protectedKeys[H]=!0}v.prevProp=C,v.prevResolvedValues=z,v.isActive&&(b={...b,...z}),r&&e.blockInitialAnimation&&(M=!1);const ee=E&&O;M&&(!ee||P)&&p.push(...I.map(H=>{const Y={type:w};if(typeof H=="string"&&r&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,ne=Cu(oe,H);if(oe.enteringChildren&&ne){const{delayChildren:$}=ne.transition||{};Y.delay=c$(oe.enteringChildren,e,$)}}return{animation:H,options:Y}}))}if(g.size){const x={};if(typeof d.initial!="boolean"){const w=Cu(e,Array.isArray(d.initial)?d.initial[0]:d.initial);w&&w.transition&&(x.transition=w.transition)}g.forEach(w=>{const v=e.getBaseTarget(w),C=e.getValue(w);C&&(C.liveStyle=!0),x[w]=v??null}),p.push({animation:x})}let _=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(p):Promise.resolve()}function c(u,d){if(n[u].isActive===d)return Promise.resolve();e.variantChildren?.forEach(p=>p.animationState?.setActive(u,d)),n[u].isActive=d;const h=l(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=k5()}}}function Sse(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!u$(t,e):!1}function Dl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function k5(){return{animate:Dl(!0),whileInView:Dl(),whileHover:Dl(),whileTap:Dl(),whileDrag:Dl(),whileFocus:Dl(),exit:Dl()}}class nl{constructor(t){this.isMounted=!1,this.node=t}update(){}}class wse extends nl{constructor(t){super(t),t.animationState||(t.animationState=bse(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();m0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let xse=0;class _se extends nl{constructor(){super(...arguments),this.id=xse++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Ese={animation:{Feature:wse},exit:{Feature:_se}};function dh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Hh(e){return{point:{x:e.pageX,y:e.pageY}}}const Cse=e=>t=>sE(t)&&e(t,Hh(t));function Ud(e,t,n,r){return dh(e,t,Cse(n),r)}const d$=1e-4,Tse=1-d$,Rse=1+d$,h$=.01,Ose=0-h$,Ase=0+h$;function ao(e){return e.max-e.min}function kse(e,t,n){return Math.abs(e-t)<=n}function M5(e,t,n,r=.5){e.origin=r,e.originPoint=Yn(t.min,t.max,e.origin),e.scale=ao(n)/ao(t),e.translate=Yn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Tse&&e.scale<=Rse||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ose&&e.translate<=Ase||isNaN(e.translate))&&(e.translate=0)}function Vd(e,t,n,r){M5(e.x,t.x,n.x,r?r.originX:void 0),M5(e.y,t.y,n.y,r?r.originY:void 0)}function j5(e,t,n){e.min=n.min+t.min,e.max=e.min+ao(t)}function Mse(e,t,n){j5(e.x,t.x,n.x),j5(e.y,t.y,n.y)}function P5(e,t,n){e.min=t.min-n.min,e.max=e.min+ao(t)}function Sy(e,t,n){P5(e.x,t.x,n.x),P5(e.y,t.y,n.y)}function Xo(e){return[e("x"),e("y")]}const p$=({current:e})=>e?e.ownerDocument.defaultView:null,N5=(e,t)=>Math.abs(e-t);function jse(e,t){const n=N5(e.x,t.x),r=N5(e.y,t.y);return Math.sqrt(n**2+r**2)}class m${constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=R1(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,y=jse(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!y)return;const{point:_}=g,{timestamp:x}=Fr;this.history.push({..._,timestamp:x});const{onStart:w,onMove:v}=this.handlers;b||(w&&w(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,g)},this.handlePointerMove=(g,b)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=T1(b,this.transformPagePoint),Zn.update(this.updatePoint,!0)},this.handlePointerUp=(g,b)=>{this.end();const{onEnd:y,onSessionEnd:_,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=R1(g.type==="pointercancel"?this.lastMoveEventInfo:T1(b,this.transformPagePoint),this.history);this.startEvent&&y&&y(g,w),_&&_(g,w)},!sE(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=o||window;const c=Hh(t),u=T1(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=Fr;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,R1(u,this.history)),this.removeListeners=Vh(Ud(this.contextWindow,"pointermove",this.handlePointerMove),Ud(this.contextWindow,"pointerup",this.handlePointerUp),Ud(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ba(this.updatePoint)}}function T1(e,t){return t?{point:t(e.point)}:e}function D5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function R1({point:e},t){return{point:e,delta:D5(e,g$(t)),offset:D5(e,Pse(t)),velocity:Nse(t,.1)}}function Pse(e){return e[0]}function g$(e){return e[e.length-1]}function Nse(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=g$(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ki(t)));)n--;if(!r)return{x:0,y:0};const s=ti(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function Dse(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Yn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Yn(n,e,r.max):Math.min(e,n)),e}function $5(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function $se(e,{top:t,left:n,bottom:r,right:o}){return{x:$5(e.x,n,o),y:$5(e.y,t,r)}}function I5(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Ise(e,t){return{x:I5(e.x,t.x),y:I5(e.y,t.y)}}function zse(e,t){let n=.5;const r=ao(e),o=ao(t);return o>r?n=lh(t.min,t.max-r,e.min):r>o&&(n=lh(e.min,e.max-o,t.min)),Ps(0,1,n)}function Lse(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Iw=.35;function Fse(e=Iw){return e===!1?e=0:e===!0&&(e=Iw),{x:z5(e,"left","right"),y:z5(e,"top","bottom")}}function z5(e,t,n){return{min:L5(e,t),max:L5(e,n)}}function L5(e,t){return typeof e=="number"?e:e[t]||0}const Use=new WeakMap;class Vse{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Cr(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=p=>{n?(this.stopAnimation(),this.snapToCursor(Hh(p).point)):this.pauseAnimation()},l=(p,g)=>{this.stopAnimation();const{drag:b,dragPropagation:y,onDragStart:_}=this.getProps();if(b&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Joe(b),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xo(w=>{let v=this.getAxisMotionValue(w).get()||0;if(Gi.test(v)){const{projection:C}=this.visualElement;if(C&&C.layout){const S=C.layout.layoutBox[w];S&&(v=ao(S)*(parseFloat(v)/100))}}this.originPoint[w]=v}),_&&Zn.postRender(()=>_(p,g)),Dw(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},c=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:b,dragDirectionLock:y,onDirectionLock:_,onDrag:x}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:w}=g;if(y&&this.currentDirection===null){this.currentDirection=qse(w),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",g.point,w),this.updateAxis("y",g.point,w),this.visualElement.render(),x&&x(p,g)},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>Xo(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:h}=this.getProps();this.panSession=new m$(t,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:p$(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Zn.postRender(()=>c(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ug(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=Dse(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&kd(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=$se(r.layoutBox,t):this.constraints=!1,this.elastic=Fse(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Xo(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Lse(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!kd(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=Bie(r,o.root,this.visualElement.getTransformPagePoint());let l=Ise(o.layout.layoutBox,s);if(n){const c=n(Uie(l));this.hasMutatedConstraints=!!c,c&&(l=JD(c))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=Xo(h=>{if(!ug(h,n,this.currentDirection))return;let p=u&&u[h]||{};l&&(p={min:0,max:0});const g=o?200:1e6,b=o?40:1e7,y={type:"inertia",velocity:r?t[h]:0,bounceStiffness:g,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(h,y)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Dw(this.visualElement,t),r.start(mE(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xo(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xo(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xo(n=>{const{drag:r}=this.getProps();if(!ug(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:c}=o.layout.layoutBox[n],u=s.get()||0;s.set(t[n]-Yn(l,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!kd(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xo(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();o[l]=zse({min:u,max:u},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xo(l=>{if(!ug(l,t,null))return;const c=this.getAxisMotionValue(l),{min:u,max:d}=this.constraints[l];c.set(Yn(u,d,o[l]))})}addListeners(){if(!this.visualElement.current)return;Use.set(this.visualElement,this);const t=this.visualElement.current,n=Ud(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&!ID(u.target)&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();kd(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Zn.read(r);const l=dh(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Xo(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=Iw,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:c}}}function ug(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qse(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Bse extends nl{constructor(t){super(t),this.removeGroupControls=oi,this.removeListeners=oi,this.controls=new Vse(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||oi}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const F5=e=>(t,n)=>{e&&Zn.postRender(()=>e(t,n))};class Hse extends nl{constructor(){super(...arguments),this.removePointerDownListener=oi}onPointerDown(t){this.session=new m$(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:p$(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:F5(t),onStart:F5(n),onMove:r,onEnd:(s,l)=>{delete this.session,o&&Zn.postRender(()=>o(s,l))}}}mount(){this.removePointerDownListener=Ud(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const zg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let O1=!1;class Kse extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),O1&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),zg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:l}=r;return l&&(l.isPresent=s,O1=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Zn.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),iE.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;O1=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function y$(e){const[t,n]=aie(),r=k.useContext(GN);return j.jsx(Kse,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(XD),isPresent:t,safeToRemove:n})}function Gse(e,t,n){const r=Xr(e)?e:qu(e);return r.start(mE("",r,t,n)),r.animation}const Zse=(e,t)=>e.depth-t.depth;class Wse{constructor(){this.children=[],this.isDirty=!1}add(t){U_(this.children,t),this.isDirty=!0}remove(t){V_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Zse),this.isDirty=!1,this.children.forEach(t)}}function Yse(e,t){const n=yo.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Ba(r),e(s-t))};return Zn.setup(r,!0),()=>Ba(r)}const v$=["TopLeft","TopRight","BottomLeft","BottomRight"],Xse=v$.length,U5=e=>typeof e=="string"?parseFloat(e):e,V5=e=>typeof e=="number"||Ye.test(e);function Qse(e,t,n,r,o,s){o?(e.opacity=Yn(0,n.opacity??1,Jse(r)),e.opacityExit=Yn(t.opacity??1,0,eae(r))):s&&(e.opacity=Yn(t.opacity??1,n.opacity??1,r));for(let l=0;l<Xse;l++){const c=`border${v$[l]}Radius`;let u=q5(t,c),d=q5(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||V5(u)===V5(d)?(e[c]=Math.max(Yn(U5(u),U5(d),r),0),(Gi.test(d)||Gi.test(u))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=Yn(t.rotate||0,n.rotate||0,r))}function q5(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Jse=b$(0,.5,oD),eae=b$(.5,.95,oi);function b$(e,t,n){return r=>r<e?0:r>t?1:n(lh(e,t,r))}function B5(e,t){e.min=t.min,e.max=t.max}function wi(e,t){B5(e.x,t.x),B5(e.y,t.y)}function H5(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function K5(e,t,n,r,o){return e-=t,e=by(e,1/n,r),o!==void 0&&(e=by(e,1/o,r)),e}function tae(e,t=0,n=1,r=.5,o,s=e,l=e){if(Gi.test(t)&&(t=parseFloat(t),t=Yn(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=Yn(s.min,s.max,r);e===s&&(c-=t),e.min=K5(e.min,t,n,c,o),e.max=K5(e.max,t,n,c,o)}function G5(e,t,[n,r,o],s,l){tae(e,t[n],t[r],t[o],t.scale,s,l)}const nae=["x","scaleX","originX"],rae=["y","scaleY","originY"];function Z5(e,t,n,r){G5(e.x,t,nae,n?n.x:void 0,r?r.x:void 0),G5(e.y,t,rae,n?n.y:void 0,r?r.y:void 0)}function W5(e){return e.translate===0&&e.scale===1}function S$(e){return W5(e.x)&&W5(e.y)}function Y5(e,t){return e.min===t.min&&e.max===t.max}function oae(e,t){return Y5(e.x,t.x)&&Y5(e.y,t.y)}function X5(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function w$(e,t){return X5(e.x,t.x)&&X5(e.y,t.y)}function Q5(e){return ao(e.x)/ao(e.y)}function J5(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iae{constructor(){this.members=[]}add(t){U_(this.members,t),t.scheduleRender()}remove(t){if(V_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function sae(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,l=n?.z||0;if((o||s||l)&&(r=`translate3d(${o}px, ${s}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:p,rotateY:g,skewX:b,skewY:y}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),b&&(r+=`skewX(${b}deg) `),y&&(r+=`skewY(${y}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const A1=["","X","Y","Z"],aae=1e3;let lae=0;function k1(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function x$(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=a$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Zn,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&x$(r)}function _$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(l={},c=t?.()){this.id=lae++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(fae),this.nodes.forEach(mae),this.nodes.forEach(gae),this.nodes.forEach(dae)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Wse)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new H_),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const u=this.eventHandlers.get(l);u&&u.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=zD(l)&&!oie(l),this.instance=l;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let h,p=0;const g=()=>this.root.updateBlockedByResize=!1;Zn.read(()=>{p=window.innerWidth}),e(l,()=>{const b=window.innerWidth;b!==p&&(p=b,this.root.updateBlockedByResize=!0,h&&h(),h=Yse(g,250),zg.hasAnimatedSinceResize&&(zg.hasAnimatedSinceResize=!1,this.nodes.forEach(nM)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||wae,{onLayoutAnimationStart:_,onLayoutAnimationComplete:x}=d.getProps(),w=!this.targetLayout||!w$(this.targetLayout,b),v=!p&&g;if(this.options.layoutRoot||this.resumeFrom||v||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...rE(y,"layout"),onPlay:_,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(h,v)}else p||nM(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ba(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yae),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&x$(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(eM);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(tM);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(pae),this.nodes.forEach(cae),this.nodes.forEach(uae)):this.nodes.forEach(tM),this.clearAllSnapshots();const c=yo.now();Fr.delta=Ps(0,1e3/60,c-Fr.timestamp),Fr.timestamp=c,Fr.isProcessing=!0,v1.update.process(Fr),v1.preRender.process(Fr),v1.render.process(Fr),Fr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,iE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hae),this.sharedNodes.forEach(vae)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Zn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Zn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ao(this.snapshot.measuredBox.x)&&!ao(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Cr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!S$(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;l&&this.instance&&(c||Ll(this.latestValues)||h)&&(o(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return l&&(u=this.removeTransform(u)),xae(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return Cr();const c=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(_ae))){const{scroll:d}=this.root;d&&(yu(c.x,d.offset.x),yu(c.y,d.offset.y))}return c}removeElementScroll(l){const c=Cr();if(wi(c,l),this.scroll?.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:p}=d;d!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&wi(c,l),yu(c.x,h.offset.x),yu(c.y,h.offset.y))}return c}applyTransform(l,c=!1){const u=Cr();wi(u,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&vu(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Ll(h.latestValues)&&vu(u,h.latestValues)}return Ll(this.latestValues)&&vu(u,this.latestValues),u}removeTransform(l){const c=Cr();wi(c,l);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!Ll(d.latestValues))continue;Mw(d.latestValues)&&d.updateSnapshot();const h=Cr(),p=d.measurePageBox();wi(h,p),Z5(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return Ll(this.latestValues)&&Z5(c,this.latestValues),c}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Fr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(l||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!this.layout||!(h||p))return;this.resolvedRelativeTargetAt=Fr.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Cr(),this.targetWithTransforms=Cr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Mse(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):wi(this.target,this.layout.layoutBox),t$(this.target,this.targetDelta)):wi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Mw(this.parent.latestValues)||e$(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,c,u){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Cr(),this.relativeTargetOrigin=Cr(),Sy(this.relativeTargetOrigin,c,u),wi(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Fr.timestamp&&(u=!1),u)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;wi(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;qie(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Cr());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(H5(this.prevProjectionDelta.x,this.projectionDelta.x),H5(this.prevProjectionDelta.y,this.projectionDelta.y)),Vd(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!J5(this.projectionDelta.x,this.prevProjectionDelta.x)||!J5(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=bu(),this.projectionDelta=bu(),this.projectionDeltaWithTransform=bu()}setAnimationOrigin(l,c=!1){const u=this.snapshot,d=u?u.latestValues:{},h={...this.latestValues},p=bu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=Cr(),b=u?u.source:void 0,y=this.layout?this.layout.source:void 0,_=b!==y,x=this.getStack(),w=!x||x.members.length<=1,v=!!(_&&!w&&this.options.crossfade===!0&&!this.path.some(Sae));this.animationProgress=0;let C;this.mixTargetDelta=S=>{const T=S/1e3;rM(p.x,l.x,T),rM(p.y,l.y,T),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Sy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bae(this.relativeTarget,this.relativeTargetOrigin,g,T),C&&oae(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Cr()),wi(C,this.relativeTarget)),_&&(this.animationValues=h,Qse(h,d,this.latestValues,T,v,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ba(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Zn.update(()=>{zg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=qu(0)),this.currentAnimation=Gse(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),l.onUpdate&&l.onUpdate(c)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(aae),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:u,layout:d,latestValues:h}=l;if(!(!c||!u||!d)){if(this!==l&&this.layout&&d&&E$(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||Cr();const p=ao(this.layout.layoutBox.x);u.x.min=l.target.x.min,u.x.max=u.x.min+p;const g=ao(this.layout.layoutBox.y);u.y.min=l.target.y.min,u.y.max=u.y.min+g}wi(c,u),vu(c,h),Vd(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new iae),this.sharedNodes.get(l).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:u}=l;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const d={};u.z&&k1("z",l,d,this.animationValues);for(let h=0;h<A1.length;h++)k1(`rotate${A1[h]}`,l,d,this.animationValues),k1(`skew${A1[h]}`,l,d,this.animationValues);l.render();for(const h in d)l.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=Ig(c?.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=Ig(c?.pointerEvents)||""),this.hasProjected&&!Ll(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1);return}l.visibility="";const h=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=sae(this.projectionDeltaWithTransform,this.treeScale,h);u&&(p=u(h,p)),l.transform=p;const{x:g,y:b}=this.projectionDelta;l.transformOrigin=`${g.origin*100}% ${b.origin*100}% 0`,d.animationValues?l.opacity=d===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in kw){if(h[y]===void 0)continue;const{correct:_,applyTo:x,isCSSVariable:w}=kw[y],v=p==="none"?h[y]:_(h[y],d);if(x){const C=x.length;for(let S=0;S<C;S++)l[x[S]]=v}else w?this.options.visualElement.renderState.vars[y]=v:l[y]=v}this.options.layoutId&&(l.pointerEvents=d===this?Ig(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(eM),this.root.sharedNodes.clear()}}}function cae(e){e.updateLayout()}function uae(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?Xo(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],g=ao(p);p.min=n[h].min,p.max=p.min+g}):E$(o,t.layoutBox,n)&&Xo(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],g=ao(n[h]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const l=bu();Vd(l,n,t.layoutBox);const c=bu();s?Vd(c,e.applyTransform(r,!0),t.measuredBox):Vd(c,n,t.layoutBox);const u=!S$(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:g}=h;if(p&&g){const b=Cr();Sy(b,t.layoutBox,p.layoutBox);const y=Cr();Sy(y,n,g.layoutBox),w$(b,y)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function fae(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function dae(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hae(e){e.clearSnapshot()}function eM(e){e.clearMeasurements()}function tM(e){e.isLayoutDirty=!1}function pae(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function mae(e){e.resolveTargetDelta()}function gae(e){e.calcProjection()}function yae(e){e.resetSkewAndRotation()}function vae(e){e.removeLeadSnapshot()}function rM(e,t,n){e.translate=Yn(t.translate,0,n),e.scale=Yn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oM(e,t,n,r){e.min=Yn(t.min,n.min,r),e.max=Yn(t.max,n.max,r)}function bae(e,t,n,r){oM(e.x,t.x,n.x,r),oM(e.y,t.y,n.y,r)}function Sae(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const wae={duration:.45,ease:[.4,0,.1,1]},iM=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sM=iM("applewebkit/")&&!iM("chrome/")?Math.round:oi;function aM(e){e.min=sM(e.min),e.max=sM(e.max)}function xae(e){aM(e.x),aM(e.y)}function E$(e,t,n){return e==="position"||e==="preserve-aspect"&&!kse(Q5(t),Q5(n),.2)}function _ae(e){return e!==e.root&&e.scroll?.wasRoot}const Eae=_$({attachResizeListener:(e,t)=>dh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),M1={current:void 0},C$=_$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!M1.current){const e=new Eae({});e.mount(window),e.setOptions({layoutScroll:!0}),M1.current=e}return M1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Cae={pan:{Feature:Hse},drag:{Feature:Bse,ProjectionNode:C$,MeasureLayout:y$}};function lM(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&Zn.postRender(()=>s(t,Hh(t)))}class Tae extends nl{mount(){const{current:t}=this.node;t&&(this.unmount=eie(t,(n,r)=>(lM(this.node,r,"Start"),o=>lM(this.node,o,"End"))))}unmount(){}}class Rae extends nl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vh(dh(this.node.current,"focus",()=>this.onFocus()),dh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function cM(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&Zn.postRender(()=>s(t,Hh(t)))}class Oae extends nl{mount(){const{current:t}=this.node;t&&(this.unmount=rie(t,(n,r)=>(cM(this.node,r,"Start"),(o,{success:s})=>cM(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const zw=new WeakMap,j1=new WeakMap,Aae=e=>{const t=zw.get(e.target);t&&t(e)},kae=e=>{e.forEach(Aae)};function Mae({root:e,...t}){const n=e||document;j1.has(n)||j1.set(n,{});const r=j1.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(kae,{root:e,...t})),r[o]}function jae(e,t,n){const r=Mae(t);return zw.set(e,n),r.observe(e),()=>{zw.delete(e),r.unobserve(e)}}const Pae={some:0,all:1};class Nae extends nl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Pae[o]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,s&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),g=d?h:p;g&&g(u)};return jae(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Dae(t,n))&&this.startObserver()}unmount(){}}function Dae({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $ae={inView:{Feature:Nae},tap:{Feature:Oae},focus:{Feature:Rae},hover:{Feature:Tae}},Iae={layout:{ProjectionNode:C$,MeasureLayout:y$}},zae={...Ese,...$ae,...Cae,...Iae},uM=Fie(zae,Jie),T$=ko.memo(({className:e})=>{const t=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"];return j.jsx("div",{className:pn("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:j.jsxs("svg",{className:"z-0 h-full w-full pointer-events-none absolute",width:"100%",height:"100%",viewBox:"0 0 696 316",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("title",{children:"Background Beams"}),j.jsx("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),t.map((n,r)=>j.jsx(uM.path,{d:n,stroke:`url(#linearGradient-${r})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${r}`)),j.jsxs("defs",{children:[t.map((n,r)=>j.jsxs(uM.linearGradient,{id:`linearGradient-${r}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:"easeInOut",repeat:1/0,delay:0},children:[j.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),j.jsx("stop",{stopColor:"#111111"}),j.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),j.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${r}`)),j.jsxs("radialGradient",{id:"paint0_radial_242_278",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",children:[j.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),j.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),j.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});T$.displayName="BackgroundBeams";const Lae=()=>j.jsxs(j.Fragment,{children:[j.jsx(T$,{className:"absolute inset-0"}),j.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:j.jsxs("div",{className:"text-center",children:[j.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),j.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Bt(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Fae(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Bt(e.additionalItems)}function fM(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const Ms="__additional_property",wy="additionalProperties",Ka="allOf",Kt="anyOf",ai="const",y0="default",gE="dependencies",Uae="enum",qr="__errors",_n="$id",Vae="if",Hu="items",qae="_$junk_option_schema_id$_",Lg="$name",Mt="oneOf",Lw="patternProperties",nn="properties",P1="readonly",R$="required",xy="submitButtonOptions",In="$ref",Md="$schema",O$="root",A$="_",Bae=["discriminator","propertyName"],dM="formContext",Hae="layoutGridLookupMap",yE="__rjsf_additionalProperties",k$="__rjsf_rootSchema",Kae="ui:field",vE="ui:widget",ja="ui:options",Fw="ui:globalOptions",Gae="https://json-schema.org/draft/2019-09/schema",Fg="https://json-schema.org/draft/2020-12/schema";function ct(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const o=e[r];return r===vE&&Bt(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===ja&&Bt(o)?{...n,...o}:{...n,[r.substring(3)]:o}},{...t}):{...t}}function M$(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=ct(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function Uw(e){const t={[qr]:[],addError(n){this[qr].push(n)}};if(Array.isArray(e))return e.reduce((n,r,o)=>({...n,[o]:Uw(r)}),t);if(La(e)){const n=e;return Object.keys(n).reduce((r,o)=>({...r,[o]:Uw(n[o])}),t)}return t}function An(e,t){return nK(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}const Zae=Object.prototype;function jd(e){for(const t in e)if(Zae.hasOwnProperty.call(e,t))return!1;return!0}const Wae=["array","boolean","integer","null","number","object","string"];new Set(Wae);const Yae=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Yae);const Xae=["items","allOf","oneOf","anyOf"];new Set(Xae);const Qae=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Qae);function Ug(e){return typeof e=="object"}function zi(e){return Ug(e)?jd(e):e===!0}function Su(e,t){return e<t?-1:e>t?1:0}function N1(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const s=e;e=t,t=s,r=n}const o=new Set(e);for(let s=0;s<r;s++)o.add(t[s]);return Array.from(o)}function Jae(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const o=e;e=t,t=o}const r=new Set(t);for(let o=0;o<e.length&&r.size>0;o++){const s=e[o];r.delete(s)&&n.push(s)}return n}function hM(e){return e.length===0}function D1(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){const s=e(t[o],n[o]);if(s!==0)return s}return 0}}function j$(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const l=[];let c=0;e:for(let u=0;u<r;u++){const d=n[u];for(let h=0;h<c;h++)if(e(d,l[h])===0)continue e;c=l.push(d)}return l}const o=n.slice().sort(e);let s=0;for(let l=1;l<r;l++)e(o[s],o[l])!==0&&++s!==l&&(o[s]=o[l]);return o.length=s+1,o}}function ele(e){return(t,n)=>{const r=[];let o=t.length,s=n.length;if(o===0||s===0)return r;if(o>s){const h=t;t=n,n=h;const p=o;o=s,s=p}const l=[...t].sort(e),c=[...n].sort(e);let u=0,d=0;for(;u<o&&d<s;){const h=e(l[u],c[d]);h===0?((r.length===0||e(r[r.length-1],l[u])!==0)&&r.push(l[u]),u++,d++):h<0?u++:d++}return r}}function tle(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const pM=tle,P$=()=>0,nle=e=>e===void 0,rle=e=>typeof e!="object",mM={boolean:0,number:1,string:2};function ole(e,t){const n=typeof e,r=typeof t;return n===r?Su(e,t):mM[n]-mM[r]}function ile(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const l=e;e=t,t=l}const o=new Set(e),s=t.length;for(let l=0;l<s;l++){const c=t[l];o.has(c)||e.push(c)}return e}function v0(e,t,n=P$){return(r,o)=>e(r)?e(o)?n(r,o):-1:e(o)?1:t(r,o)}function lu(e){return v0(nle,e)}function xa(e,t){return v0(n=>n===void 0||e(n),t)}function $1(e,t){return v0(Array.isArray,e,t)}const gr=lu(Su),I1=xa(e=>e===0,(e,t)=>e-t);function sle({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=pM(t,_=>Object.keys(_).sort());function r(_){return(x,w)=>{const v=n(x),C=n(w),S=Math.min(v.length,C.length);for(let T=0;T<S;T++){const E=Su(v[T],C[T]);if(E!==0)return E}if(v.length!==C.length)return v.length-C.length;for(let T=0;T<S;T++){const E=v[T],O=_(x[E],w[E]);if(O!==0)return O}return 0}}function o(_){const x=D1(_),w=pM(e,j$(_,{threshold:0}));return(v,C)=>x(w(v),w(C))}const s=o(Su);function l(_,x){if(Ug(_)){if(Ug(x)){const w=Object.keys(_),v=Object.keys(x),C=ile(w,v),S=C.length;for(let T=0;T<S;T++){const E=C[T];if(_[E]===x[E])continue;const M=(y[E]??c)(_[E],x[E]);if(M!==0)return M}return 0}return x===!0&&jd(_)?0:1}return Ug(x)?_===!0&&jd(x)?0:-1:Su(_,x)}const c=lu(d),u=v0(rle,$1(r(c),D1(d)),ole);function d(_,x){return _===null?-1:x===null?1:u(_,x)}const h=lu(l),p=xa(jd,r(h)),g=lu(o(l)),b=xa(zi,l),y={$id:gr,$comment:gr,$defs:p,$ref:gr,$schema:gr,const:c,contains:h,contentEncoding:gr,contentMediaType:gr,default:c,definitions:p,description:gr,else:h,examples:c,exclusiveMaximum:gr,exclusiveMinimum:gr,format:gr,if:h,maximum:gr,maxItems:gr,maxLength:gr,maxProperties:gr,minimum:gr,multipleOf:gr,not:h,pattern:gr,propertyNames:h,readOnly:gr,then:h,title:gr,writeOnly:gr,uniqueItems:xa(_=>_===!1,P$),minLength:I1,minItems:I1,minProperties:I1,required:xa(hM,s),enum:xa(hM,o(d)),type:lu((_,x)=>{const w=Array.isArray(_),v=Array.isArray(x);return!w&&!v?Su(_,x):s(w?_:[_],v?x:[x])}),items:xa(_=>!Array.isArray(_)&&zi(_),$1(l,D1(l))),anyOf:g,allOf:g,oneOf:g,properties:p,patternProperties:p,additionalProperties:b,additionalItems:b,dependencies:xa(jd,r(lu($1(l,s))))};return{compareSchemaValues:d,compareSchemaDefinitions:l}}function gM(e){return e}const N$=(e,t)=>e?N$(t%e,e):t,ale=(e,t)=>Math.abs(e*t)/N$(e,t);function lle(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*z1(e,t,n){const r=e.length,o=t.length;if(r>0&&o>0)for(let s=0;s<r;s++){const l=e[s];for(let c=0;c<o;c++)yield n(l,t[c])}}function L1(e,t){return e||t}function yM(e){return(t,n)=>{const r={...t},o=Object.keys(n),s=o.length;for(let l=0;l<s;l++){const c=o[l];r[c]=t[c]===void 0?n[c]:e(t[c],n[c])}return r}}function cle(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function $l(e,t,n){n===void 0||zi(n)?delete e[t]:e[t]=n}const ule=["properties","patternProperties","additionalProperties"];function vM(e){const t=Object.keys(e),n=t.length,r=[];for(let o=0;o<n;o++){const s=t[o];r.push({regExp:new RegExp(s),schema:e[s]})}return[r,t]}const bM=[[],[]];function SM(e,t,n){const r=n.length;for(let o=0;o<r;o++){const s=n[o];if(!s.regExp.test(t))continue;const l=s.schema;if(l===!1)return!0;e.push(l)}return!1}const fle=["items","additionalItems"],dle=["if","then","else"];function wM(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function F1(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function Il(e,t,n){return[e,t,n]}function hle(e){const t=new Map;for(const[n,r,o]of e){const s=l=>{if(!o(l))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(l[n])}, ${r}: ${JSON.stringify(l[r])})`)};for(const l of[[n,r],[r,n]]){let c=t.get(l[0]);c===void 0&&(c=[],t.set(l[0],c)),c.push({oppositeKey:l[1],check:s})}}return t}const ple=[Il("minimum","maximum",e=>e.maximum>=e.minimum),Il("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Il("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Il("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Il("minLength","maxLength",e=>e.maxLength>=e.minLength),Il("minItems","maxItems",e=>e.maxItems>=e.minItems),Il("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function mle({mergePatterns:e=lle,isSubRegExp:t=Object.is,intersectJson:n=Jae,deduplicateJsonSchemaDef:r=gM,defaultMerger:o=gM,assigners:s=[],checks:l=ple,mergers:c}={}){function u(S){const T=S.length;let E=S[0];for(let O=1;O<T;O++){const M=w(E,S[O]);if(M===!1)return!1;zi(M)||(E=M)}return E}function d(S,T,E,O,M,P,I){if(S.length=0,E===!1)return!1;if(S.push(E),M!==void 0){if(M===!1)return!1;S.push(M)}if(SM(S,T,P))return!1;const U=S.length<2;if(I===!1){if(U)return;if(SM(S,T,O))return!1}else U&&I!==void 0&&S.push(I);return S.length===1?S[0]:u(S)}function h(S,T,E,O,M,P){const I=E.length;if(I>0&&M!==!1)if(P)Object.assign(S,T);else for(let z=0;z<I;z++){const U=E[z];O.has(U)||(S[U]=w(T[U],M))}return S}const p=(S,{properties:T={},patternProperties:E,additionalProperties:O=!0},{properties:M={},patternProperties:P,additionalProperties:I=!0})=>{const z=zi(O),U=zi(I);if(z&&U)return $l(S,"properties",v(T,M)),$l(S,"patternProperties",E&&P?v(E,P):E??P),delete S.additionalProperties,S;const G=w(O,I);$l(S,"additionalProperties",G);const J={},ee=Object.keys(T),Z=ee.length,[H,Y]=E?vM(E):bM,[oe,ne]=P?vM(P):bM,$=[],q=new Set,V=U?void 0:I;for(let ge=0;ge<Z;ge++){const ke=ee[ge];q.add(ke);const Q=d($,ke,T[ke],H,M[ke],oe,V);Q!==void 0&&(J[ke]=Q)}const D=Object.keys(M),B=D.length,te=z?void 0:O;for(let ge=0;ge<B;ge++){const ke=D[ge];if(q.has(ke))continue;const Q=d($,ke,M[ke],oe,void 0,H,te);Q!==void 0&&(J[ke]=Q)}$l(S,"properties",J);let re={};const ae=new Set;if(Y.length>0&&ne.length>0){const ge=z1(Y,ne,(ke,Q)=>{t(ke,Q)&&ae.add(ke),t(Q,ke)&&ae.add(Q),re[e(ke,Q)]=w(E[ke],P[Q])});for(;!ge.next().done;);}return re=h(re,E,Y,ae,I,U),re=h(re,P,ne,ae,O,z),$l(S,"patternProperties",re),S},g=(S,{items:T=[],additionalItems:E},{items:O=[],additionalItems:M})=>{const P=Array.isArray(T),I=Array.isArray(O),z=[];if(S.items=z,P&&I){const[U,G,J]=T.length<O.length?[T.length,E,O]:[O.length,M,T];let ee=0;for(;ee<U;ee++)z.push(w(T[ee],O[ee]));if(G===!1)S.additionalItems=!1;else{const Z=G===void 0||zi(G);for(;ee<J.length;ee++)z.push(Z?J[ee]:w(J[ee],G));$l(S,"additionalItems",E!==void 0&&M!==void 0?w(E,M):E??M)}}else if(P||I){const[U,G,J]=P?[T,O,E]:[O,T,M];$l(S,"additionalItems",J&&w(J,G));for(let ee=0;ee<U.length;ee++)z.push(w(U[ee],G))}else delete S.additionalItems,S.items=w(T,O);return S},b=(S,T,E)=>{wM(S,T);const O=wM({},E);return S.allOf===void 0?S.allOf=[O]:S.allOf=S.allOf.concat(O),S};function y(S,T){return r(Array.from(z1(S,T,w)))}const _=cle([[ule,p],[fle,g],[dle,b],...s]),x=hle(l);function w(S,T){if(S===!1||T===!1)return!1;if(zi(S))return zi(T)?!0:T;if(zi(T))return S;let E={...S};const O=new Set,M=new Set,P=Object.keys(T),I=P.length;for(let z=0;z<I;z++){const U=P[z],G=T[U];if(G===void 0)continue;const J=x.get(U);if(J!==void 0){const Y=J.length;for(let oe=0;oe<Y;oe++){const ne=J[oe];S[ne.oppositeKey]!==void 0&&M.add(ne.check)}}const ee=S[U];if(ee===void 0){E[U]=G;continue}const Z=_.get(U);if(Z){O.add(Z);continue}const H=C[U]??o;E[U]=H(ee,G)}for(const z of O)E=z(E,S,T);for(const z of M)z(E);return E}const v=yM(w),C={$id:o,$ref:o,$schema:o,$comment:o,$defs:v,definitions:v,type:(S,T)=>{if(S===T)return S;const E=Array.isArray(S),O=Array.isArray(T);if(!E&&!O){const M=F1(S,T);if(M!==void 0)return M}else if(E||O){const M=new Set;if(E&&O)for(const I of z1(S,T,F1))I!==void 0&&M.add(I);else{const I=E?S:T,z=E?T:S,U=I.length;for(let G=0;G<U;G++){const J=F1(z,I[G]);J!==void 0&&M.add(J)}}const P=M.size;if(P===1)return M.values().next().value;if(P>1)return Array.from(M)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${S.toString()}, ${T.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(S,T)=>{const E=r([S,T]);return E.length===1?E[0]:{anyOf:E}},pattern:e,readOnly:L1,writeOnly:L1,enum:(S,T)=>{const E=n(S,T);if(E.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(S)}", "${JSON.stringify(T)}"`);return E},anyOf:y,oneOf:y,allOf:(S,T)=>r(S.concat(T)),propertyNames:w,contains:w,dependencies:yM((S,T)=>Array.isArray(S)?Array.isArray(T)?N1(S,T):w(T,{required:S}):Array.isArray(T)?w(S,{required:T}):w(S,T)),examples:(S,T)=>{if(!Array.isArray(S)||!Array.isArray(T))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(S)}" and "${JSON.stringify(T)}"`);return N1(S,T)},multipleOf:(S,T)=>{let E=1;for(;!Number.isInteger(S)||!Number.isInteger(T);)E*=10,S*=10,T*=10;return ale(S,T)/E},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:L1,required:N1,...c};return{mergeSchemaDefinitions:w,mergeArrayOfSchemaDefinitions:u}}function gle(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:o,...s}=r;t.push(s);for(let l=o.length-1;l>=0;l--)n.push(o[l])}return t}function yle(e){return t=>e(gle(t))}var xd={},xM;function vle(){if(xM)return xd;xM=1;var e=/~/,t=/~[01]/g;function n(d){switch(d){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+d)}function r(d){return e.test(d)?d.replace(t,n):d}function o(d,h,p){for(var g,b,y=1,_=h.length;y<_;){if(h[y]==="constructor"||h[y]==="prototype"||h[y]==="__proto__")return d;if(g=r(h[y++]),b=_>y,typeof d[g]>"u"&&(Array.isArray(d)&&g==="-"&&(g=d.length),b&&(h[y]!==""&&h[y]<1/0||h[y]==="-"?d[g]=[]:d[g]={})),!b)break;d=d[g]}var x=d[g];return p===void 0?delete d[g]:d[g]=p,x}function s(d){if(typeof d=="string"){if(d=d.split("/"),d[0]==="")return d;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(d)){for(const h of d)if(typeof h!="string"&&typeof h!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return d}throw new Error("Invalid JSON pointer.")}function l(d,h){if(typeof d!="object")throw new Error("Invalid input object.");h=s(h);var p=h.length;if(p===1)return d;for(var g=1;g<p;){if(d=d[r(h[g++])],p===g)return d;if(typeof d!="object"||d===null)return}}function c(d,h,p){if(typeof d!="object")throw new Error("Invalid input object.");if(h=s(h),h.length===0)throw new Error("Invalid JSON pointer for set.");return o(d,h,p)}function u(d){var h=s(d);return{get:function(p){return l(p,h)},set:function(p,g){return c(p,h,g)}}}return xd.get=l,xd.set=c,xd.compile=u,xd}var ble=vle();const U1=es(ble);var Sle=mN();const bE=es(Sle);function _y(e,t){if(_n in e&&bE.equal(e[_n],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(Gt(r)){const o=_y(r,t);if(o!==void 0)return o}}else if(Gt(n)){const r=_y(n,t);if(r!==void 0)return r}}function Vw(e,t){const n=Ie(e,_n,t);In in e&&(e={...e,[In]:bE.resolve(n,e[In])});for(const[r,o]of Object.entries(e))Array.isArray(o)?e={...e,[r]:o.map(s=>Gt(s)?Vw(s,n):s)}:Gt(o)&&(e={...e,[r]:Vw(o,n)});return e}function SE(e,t){const n=t[e];return[rh(t,[e]),n]}function D$(e,t={},n=[],r=Ie(t,[_n])){const o=e||"";let s;if(o.startsWith("#")){const c=decodeURIComponent(o.substring(1));r===void 0||_n in t&&t[_n]===r?s=U1.get(t,c):t[Md]===Fg&&(s=_y(t,r.replace(/\/$/,"")),s!==void 0&&(s=U1.get(s,c)))}else if(t[Md]===Fg){const c=r?bE.resolve(r,o):o,[u,...d]=c.replace(/#\/?$/,"").split("#");s=_y(t,u.replace(/\/$/,"")),s!==void 0&&(r=s[_n],vr(d)||(s=U1.get(s,decodeURIComponent(d.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${e}.`);const l=s[In];if(l){if(n.includes(l)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[h,...p]=n,g=[...p,o,h].join(" -> ");throw new Error(`Definition for ${h} contains a circular reference through ${g}`)}const[c,u]=SE(In,s),d=D$(u,t,[...n,o],r);return Object.keys(c).length>0?t[Md]===Gae||t[Md]===Fg?{[Ka]:[c,d]}:{...c,...d}:d}return s}function $$(e,t={},n=Ie(t,[_n])){return D$(e,t,[],n)}function Xi(e){let t;const n=Ie(e,Bae);return Fa(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function hh(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function Ri(e){let{type:t}=e;return!t&&e.const?hh(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function Ds(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,o)=>{const s=e?e[o]:{},l=t[o];return e&&o in e&&Bt(l)?r[o]=Ds(s,l):e&&t&&(Ri(e)==="object"||Ri(t)==="object")&&o===R$&&Array.isArray(s)&&Array.isArray(l)?r[o]=xK(s,l):r[o]=l,r},n)}function I$(e,t,n){var r;if(e&&n){const o=Ie(e,n);if(o===void 0)return;for(let s=0;s<t.length;s++){const l=t[s],c=Ie(l,[nn,n],{});if(!(c.type==="object"||c.type==="array")&&(c.const===o||!((r=c.enum)===null||r===void 0)&&r.includes(o)))return s}}}function wE(e,t,n,r,o){if(t===void 0)return 0;const s=I$(t,n,o);if(FP(s))return s;for(let l=0;l<n.length;l++){const c=n[l];if(o&&Ft(c,[nn,o])){const u=Ie(t,o),d=Ie(c,[nn,o],{});if(e.isValid(d,u,r))return l}else if(c[nn]){const u={anyOf:Object.keys(c[nn]).map(h=>({required:[h]}))};let d;if(c.anyOf){const{...h}=c;h.allOf?h.allOf=h.allOf.slice():h.allOf=[],h.allOf.push(u),d=h}else d=Object.assign({},c,u);if(delete d.required,e.isValid(d,t,r))return l}else if(e.isValid(c,t,r))return l}return 0}function Qr(e,t,n={},r,o,s=!1){return Vi(e,t,n,r,void 0,void 0,o,s)[0]}function wle(e,t,n,r,o,s,l){const{if:c,then:u,else:d,...h}=t,p=e.isValid(c,s||{},n);let g=[h],b=[];if(r)u&&typeof u!="boolean"&&(b=b.concat(Vi(e,u,n,s,r,o,l))),d&&typeof d!="boolean"&&(b=b.concat(Vi(e,d,n,s,r,o,l)));else{const y=p?u:d;y&&typeof y!="boolean"&&(b=b.concat(Vi(e,y,n,s,r,o,l)))}return b.length&&(g=b.map(y=>Ds(h,y))),g.flatMap(y=>Vi(e,y,n,s,r,o,l))}function z$(e){return e.reduce((n,r)=>r.length>1?r.flatMap(o=>BP(n.length,s=>[...n[s]].concat(o))):(n.forEach(o=>o.push(r[0])),n),[[]])}function L$(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(fn(n,[r],e.patternProperties[r]),n),{})}function xle(e,t,n,r,o,s,l,c){const u=F$(e,t,n,r,o,s,l,c);if(u.length>1||u[0]!==t)return u;if(gE in t)return U$(e,t,n,r,o,s,l).flatMap(h=>Vi(e,h,n,s,r,o,l));if(Ka in t&&Array.isArray(t[Ka])){const d=t.allOf.map(p=>Vi(e,p,n,s,r,o,l));return z$(d).map(p=>({...t,allOf:p}))}return[t]}function F$(e,t,n,r,o,s,l,c){const u=Tu(t,n,o,void 0,c);return u!==t?Vi(e,u,n,s,r,o,l,c):[t]}function Tu(e,t,n,r,o){if(!Bt(e))return e;let s=e;if(In in s){const{$ref:l,...c}=s;if(n.includes(l))return s;n.push(l),s={...$$(l,t,r),...c},_n in s&&(r=s[_n])}if(nn in s){const l=[],c=vK(s[nn],(u,d,h)=>{const p=[...n];u[h]=Tu(d,t,p,r,o),l.push(p)},{});oK(n,GP(LH(l))),s={...s,[nn]:c}}if(Hu in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Tu(s.items,t,n,r,o)}),o){let l,c;Kt in e&&Array.isArray(e[Kt])?(l=Kt,c=s[Kt]):Mt in e&&Array.isArray(e[Mt])&&(l=Mt,c=s[Mt]),l&&c&&(s={...s,[l]:c.map(u=>Tu(u,t,n,r,o))})}return An(e,s)?e:s}function _le(e,t,n,r,o){const s={...t,properties:{...t.properties}},l=r&&Bt(r)?r:{};return Object.keys(l).forEach(c=>{if(!(c in s.properties)){if(Lw in s){const u=L$(s,c);if(!vr(u)){s.properties[c]=Qr(e,{[Ka]:Object.values(u)},n,Ie(l,[c]),o),fn(s.properties,[c,Ms],!0);return}}if(wy in s&&s.additionalProperties!==!1){let u;typeof s.additionalProperties!="boolean"?In in s.additionalProperties?u=Qr(e,{[In]:Ie(s.additionalProperties,[In])},n,l,o):"type"in s.additionalProperties?u={...s.additionalProperties}:Kt in s.additionalProperties||Mt in s.additionalProperties?u={type:"object",...s.additionalProperties}:u={type:hh(Ie(l,[c]))}:u={type:hh(Ie(l,[c]))},s.properties[c]=u,fn(s.properties,[c,Ms],!0)}else s.properties[c]={type:"null"},fn(s.properties,[c,Ms],!0)}}),s}const{compareSchemaDefinitions:Ele,compareSchemaValues:Cle}=sle(),{mergeArrayOfSchemaDefinitions:Tle}=mle({intersectJson:ele(Cle),deduplicateJsonSchemaDef:j$(Ele)}),Rle=yle(Tle);function Ole(e){return Rle(e)}function Vi(e,t,n,r,o=!1,s=[],l,c){return Bt(t)?xle(e,t,n,o,s,r,l,c).flatMap(d=>{var h;let p=d;if(Vae in p)return wle(e,p,n,o,s,r,l);if(Ka in p){if(o){const{allOf:b,...y}=p;return[...b,y]}try{const b=[],y=[];(h=p.allOf)===null||h===void 0||h.forEach(_=>{typeof _=="object"&&_.contains?b.push(_):y.push(_)}),b.length&&(p={...p,allOf:y}),p=l?l(p):Ole(p),b.length&&(p.allOf=b)}catch(b){console.warn(`could not merge subschemas in allOf:
|
|
59
|
+
`&&r++}}return[t,n]}class ate extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let o;super({start(s){o=ite({onEvent:l=>{s.enqueue(l)},onError(l){t==="terminate"?s.error(l):typeof t=="function"&&t(l)},onRetry:n,onComment:r})},transform(s){o.feed(s)}})}}const lte={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class tu extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}class cte{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=_ee(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??lte}async _authThenStart(){if(!this._authProvider)throw new eu("No auth provider");let t;try{t=await ig(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new eu;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=QS(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new tu(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),o)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const o=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(s=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${s instanceof Error?s.message:String(s)}`)),this._scheduleReconnection(t,n+1)})},o)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:o,replayMessageId:s}=n;let l,c=!1,u=!1;(async()=>{try{const h=t.pipeThrough(new TextDecoderStream).pipeThrough(new ate({onRetry:b=>{this._serverRetryMs=b}})).getReader();for(;;){const{value:b,done:y}=await h.read();if(y)break;if(b.id&&(l=b.id,c=!0,o?.(b.id)),!!b.data&&(!b.event||b.event==="message"))try{const _=Xb.parse(JSON.parse(b.data));Rd(_)&&(u=!0,s!==void 0&&(_.id=s)),this.onmessage?.(_)}catch(_){this.onerror?.(_)}}(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:l,onresumptiontoken:o,replayMessageId:s},0)}catch(h){if(this.onerror?.(new Error(`SSE stream disconnected: ${h}`)),(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:l,onresumptiontoken:o,replayMessageId:s},0)}catch(b){this.onerror?.(new Error(`Failed to reconnect: ${b instanceof Error?b.message:String(b)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new eu("No auth provider");if(await ig(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new eu("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:o}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:XS(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const s=await this._commonHeaders();s.set("content-type","application/json"),s.set("accept","application/json, text/event-stream");const l={...this._requestInit,method:"POST",headers:s,body:JSON.stringify(t),signal:this._abortController?.signal},c=await(this._fetch??fetch)(this._url,l),u=c.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!c.ok){const g=await c.text().catch(()=>null);if(c.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new tu(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:b,scope:y}=Lk(c);if(this._resourceMetadataUrl=b,this._scope=y,await ig(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new eu;return this._hasCompletedAuthFlow=!0,this.send(t)}if(c.status===403&&this._authProvider){const{resourceMetadataUrl:b,scope:y,error:_}=Lk(c);if(_==="insufficient_scope"){const x=c.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===x)throw new tu(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),b&&(this._resourceMetadataUrl=b),this._lastUpscopingHeader=x??void 0,await ig(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new eu;return this.send(t)}}throw new tu(c.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,c.status===202){await c.body?.cancel(),UX(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const h=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=c.headers.get("content-type");if(h)if(p?.includes("text/event-stream"))this._handleSseStream(c.body,{onresumptiontoken:o},!1);else if(p?.includes("application/json")){const g=await c.json(),b=Array.isArray(g)?g.map(y=>Xb.parse(y)):[Xb.parse(g)];for(const y of b)this.onmessage?.(y)}else throw await c.body?.cancel(),new tu(-1,`Unexpected content type: ${p}`);else await c.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new tu(r.status,`Failed to terminate session: ${r.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}}class ute{client=null;transport=null;async connect(t){const n=typeof t=="string"?new URL(t):t;this.transport=new cte(n),this.client=new xee({name:"mcp-client",version:"1.0.0"},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listTools()).tools}async callTool(t,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");const r=await this.client.callTool({name:t,arguments:n??{}}),{_meta:o,...s}=r;return{...s,meta:o}}async listResources(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listResources()).resources}async readResource(t){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.readResource({uri:t})}async listPrompts(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listPrompts()).prompts}async getPrompt(t,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...n&&{arguments:n}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const df=new ute;df.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const fte={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:600,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},_N=()=>{const{data:e}=Pj({queryKey:["list-tools"],queryFn:()=>df.listTools()});return e},dte=()=>df.getServerInfo(),hte=()=>{const{setToolData:e}=lf();return IF({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const r=await df.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...fte,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r.meta??null,widgetState:null}}),r}})},P_=()=>{const[e]=e_();return _N().find(n=>n.name===e)??null},dc=()=>{const e=P_();if(!e)throw new Error("No tool is currently selected");return e},pte=e=>Pj({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await df.readResource(e)}});const mte=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gte=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Vk=e=>{const t=gte(e);return t.charAt(0).toUpperCase()+t.slice(1)},EN=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),yte=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var vte={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const bte=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:l,...c},u)=>k.createElement("svg",{ref:u,...vte,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:EN("lucide",o),...!s&&!yte(c)&&{"aria-hidden":"true"},...c},[...l.map(([d,h])=>k.createElement(d,h)),...Array.isArray(s)?s:[s]]));const rs=(e,t)=>{const n=k.forwardRef(({className:r,...o},s)=>k.createElement(bte,{ref:s,iconNode:t,className:EN(`lucide-${mte(Vk(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Vk(e),n};const Ste=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],wte=rs("check",Ste);const xte=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],CN=rs("chevron-down",xte);const _te=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ete=rs("chevron-up",_te);const Cte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Tte=rs("circle-alert",Cte);const Rte=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ote=rs("external-link",Rte);const Ate=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],kte=rs("loader-circle",Ate);const Mte=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],jte=rs("moon",Mte);const Pte=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Nte=rs("play",Pte);const Dte=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],$te=rs("sun",Dte);const Ite=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],zte=rs("trash",Ite);function l0(){return typeof window<"u"}function el(e){return N_(e)?(e.nodeName||"").toLowerCase():"#document"}function Or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function os(e){var t;return(t=(N_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function N_(e){return l0()?e instanceof Node||e instanceof Or(e).Node:!1}function Gn(e){return l0()?e instanceof Element||e instanceof Or(e).Element:!1}function or(e){return l0()?e instanceof HTMLElement||e instanceof Or(e).HTMLElement:!1}function fw(e){return!l0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Or(e).ShadowRoot}const Lte=new Set(["inline","contents"]);function hc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=zo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Lte.has(o)}const Fte=new Set(["table","td","th"]);function Ute(e){return Fte.has(el(e))}const Vte=[":popover-open",":modal"];function c0(e){return Vte.some(t=>{try{return e.matches(t)}catch{return!1}})}const qte=["transform","translate","scale","rotate","perspective"],Bte=["transform","translate","scale","rotate","perspective","filter"],Hte=["paint","layout","strict","content"];function D_(e){const t=u0(),n=Gn(e)?zo(e):e;return qte.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Bte.some(r=>(n.willChange||"").includes(r))||Hte.some(r=>(n.contain||"").includes(r))}function Kte(e){let t=js(e);for(;or(t)&&!ks(t);){if(D_(t))return t;if(c0(t))return null;t=js(t)}return null}function u0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Gte=new Set(["html","body","#document"]);function ks(e){return Gte.has(el(e))}function zo(e){return Or(e).getComputedStyle(e)}function f0(e){return Gn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function js(e){if(el(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fw(e)&&e.host||os(e);return fw(t)?t.host:t}function TN(e){const t=js(e);return ks(t)?e.ownerDocument?e.ownerDocument.body:e.body:or(t)&&hc(t)?t:TN(t)}function Ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=TN(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),l=Or(o);if(s){const c=dw(l);return t.concat(l,l.visualViewport||[],hc(o)?o:[],c&&n?Ma(c):[])}return t.concat(o,Ma(o,[],n))}function dw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const qk={};function Yi(e,t){const n=k.useRef(qk);return n.current===qk&&(n.current=e(t)),n}const m1=Ch[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Zte=m1&&m1!==k.useLayoutEffect?m1:e=>e();function lt(e){const t=Yi(Wte).current;return t.next=e,Zte(t.effect),t.trampoline}function Wte(){const e={next:void 0,callback:Yte,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Yte(){}const Xte=()=>{},rt=typeof document<"u"?k.useLayoutEffect:Xte;function hw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const zd={};function d0(e,t,n,r,o){let s={...pw(e,zd)};return t&&(s=Od(s,t)),n&&(s=Od(s,n)),r&&(s=Od(s,r)),o&&(s=Od(s,o)),s}function Qte(e){if(e.length===0)return zd;if(e.length===1)return pw(e[0],zd);let t={...pw(e[0],zd)};for(let n=1;n<e.length;n+=1)t=Od(t,e[n]);return t}function Od(e,t){return RN(t)?t(e):Jte(e,t)}function Jte(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=hw(e.style,r);break}case"className":{e[n]=ON(e.className,r);break}default:ene(n,r)?e[n]=tne(e[n],r):e[n]=r}}return e}function ene(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function RN(e){return typeof e=="function"}function pw(e,t){return RN(e)?e(t):e??zd}function tne(e,t){return t?e?n=>{if(nne(n)){const o=n;mw(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function mw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ON(e,t){return t?e?t+" "+e:t:e}function nne(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function is(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const AN=k.createContext(void 0);function kN(e=!1){const t=k.useContext(AN);if(t===void 0&&!e)throw new Error(is(16));return t}function rne(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,l=r&&t!==!1,c=r&&t===!1;return{props:k.useMemo(()=>{const d={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(d.tabIndex=o,!s&&n&&(d.tabIndex=t?o:-1)),(s&&(t||l)||!s&&n)&&(d["aria-disabled"]=n),s&&(!t||c)&&(d.disabled=n),d},[r,n,t,l,c,s,o])}}function h0(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=k.useRef(null),l=kN(!0)!==void 0,c=lt(()=>{const g=s.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=rne({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:o}),d=k.useCallback(()=>{const g=s.current;one(g)&&l&&t&&u.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,u.disabled,l]);rt(d,[d]);const h=k.useCallback((g={})=>{const{onClick:b,onMouseDown:y,onKeyUp:_,onKeyDown:x,onPointerDown:w,...v}=g;return d0({type:o?"button":void 0,onClick(S){if(t){S.preventDefault();return}b?.(S)},onMouseDown(S){t||y?.(S)},onKeyDown(S){if(t||(mw(S),x?.(S)),S.baseUIHandlerPrevented)return;const T=S.target===S.currentTarget&&!o&&!c()&&!t,E=S.key==="Enter",O=S.key===" ";T&&((O||E)&&S.preventDefault(),E&&b?.(S))},onKeyUp(S){t||(mw(S),_?.(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!o&&!t&&S.key===" "&&b?.(S)},onPointerDown(S){if(t){S.preventDefault();return}w?.(S)}},o?void 0:{role:"button"},u,v)},[t,u,o,c]),p=lt(g=>{s.current=g,d()});return{getButtonProps:h,buttonRef:p}}function one(e){return or(e)&&e.tagName==="BUTTON"}function qa(e,t,n,r){const o=Yi(MN).current;return sne(o,e,t,n,r)&&jN(o,[e,t,n,r]),o.callback}function ine(e){const t=Yi(MN).current;return ane(t,e)&&jN(t,e),t.callback}function MN(){return{callback:null,cleanup:null,refs:[]}}function sne(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function ane(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function jN(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(r[o]=l);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=r[o];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}const lne=parseInt(k.version,10);function $_(e){return lne>=e}function Bk(e){if(!k.isValidElement(e))return null;const t=e,n=t.props;return($_(19)?n?.ref:t.ref)??null}function cne(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function une(e,t){return typeof e=="function"?e(t):e}function fne(e,t){return typeof e=="function"?e(t):e}function jo(){}const Vu=Object.freeze([]),Po=Object.freeze({}),dne={style:{transition:"none"}},hne="data-base-ui-click-trigger",pne={fallbackAxisSide:"none"},mne={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function jr(e,t,n={}){const r=t.render,o=gne(t,n);if(n.enabled===!1)return null;const s=n.state??Po;return yne(e,r,o,s)}function gne(e,t={}){const{className:n,style:r,render:o}=e,{state:s=Po,ref:l,props:c,stateAttributesMapping:u,enabled:d=!0}=t,h=d?une(n,s):void 0,p=d?fne(r,s):void 0,g=d?cne(s,u):Po,b=d?hw(g,Array.isArray(c)?Qte(c):c)??Po:Po;return typeof document<"u"&&(d?Array.isArray(l)?b.ref=ine([b.ref,Bk(o),...l]):b.ref=qa(b.ref,Bk(o),l):qa(null,null)),d?(h!==void 0&&(b.className=ON(b.className,h)),p!==void 0&&(b.style=hw(b.style,p)),b):Po}function yne(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=d0(n,t.props);return o.ref=n.ref,k.cloneElement(t,o)}if(e&&typeof e=="string")return vne(e,n);throw new Error(is(8))}function vne(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):k.createElement(e,t)}const bne=k.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,...u}=t,d=!!s,{getButtonProps:h,buttonRef:p}=h0({disabled:d,focusableWhenDisabled:l,native:c}),g=k.useMemo(()=>({disabled:d}),[d]);return jr("button",t,{state:g,ref:[n,p],props:[u,h]})});function PN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=PN(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function I_(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=PN(e))&&(r&&(r+=" "),r+=t);return r}const Hk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kk=I_,tl=(e,t)=>n=>{var r;if(t?.variants==null)return Kk(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(d=>{const h=n?.[d],p=s?.[d];if(h===null)return null;const g=Hk(h)||Hk(p);return o[d][g]}),c=n&&Object.entries(n).reduce((d,h)=>{let[p,g]=h;return g===void 0||(d[p]=g),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,h)=>{let{class:p,className:g,...b}=h;return Object.entries(b).every(y=>{let[_,x]=y;return Array.isArray(x)?x.includes({...s,...c}[_]):{...s,...c}[_]===x})?[...d,p,g]:d},[]);return Kk(e,l,u,n?.class,n?.className)},Sne=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},wne=(e,t)=>({classGroupId:e,validator:t}),NN=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),py="-",Gk=[],xne="arbitrary..",_ne=e=>{const t=Cne(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Ene(l);const c=l.split(py),u=c[0]===""&&c.length>1?1:0;return DN(c,u,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const u=r[l],d=n[l];return u?d?Sne(d,u):u:d||Gk}return n[l]||Gk}}},DN=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const d=DN(e,t+1,s);if(d)return d}const l=n.validators;if(l===null)return;const c=t===0?e.join(py):e.slice(t).join(py),u=l.length;for(let d=0;d<u;d++){const h=l[d];if(h.validator(c))return h.classGroupId}},Ene=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?xne+r:void 0})(),Cne=e=>{const{theme:t,classGroups:n}=e;return Tne(n,t)},Tne=(e,t)=>{const n=NN();for(const r in e){const o=e[r];z_(o,n,r,t)}return n},z_=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];Rne(l,t,n,r)}},Rne=(e,t,n,r)=>{if(typeof e=="string"){One(e,t,n);return}if(typeof e=="function"){Ane(e,t,n,r);return}kne(e,t,n,r)},One=(e,t,n)=>{const r=e===""?t:$N(t,e);r.classGroupId=n},Ane=(e,t,n,r)=>{if(Mne(e)){z_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(wne(n,e))},kne=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[c,u]=o[l];z_(u,$N(t,c),n,r)}},$N=(e,t)=>{let n=e;const r=t.split(py),o=r.length;for(let s=0;s<o;s++){const l=r[s];let c=n.nextPart.get(l);c||(c=NN(),n.nextPart.set(l,c)),n=c}return n},Mne=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jne=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},gw="!",Zk=":",Pne=[],Wk=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Nne=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let l=0,c=0,u=0,d;const h=o.length;for(let _=0;_<h;_++){const x=o[_];if(l===0&&c===0){if(x===Zk){s.push(o.slice(u,_)),u=_+1;continue}if(x==="/"){d=_;continue}}x==="["?l++:x==="]"?l--:x==="("?c++:x===")"&&c--}const p=s.length===0?o:o.slice(u);let g=p,b=!1;p.endsWith(gw)?(g=p.slice(0,-1),b=!0):p.startsWith(gw)&&(g=p.slice(1),b=!0);const y=d&&d>u?d-u:void 0;return Wk(s,b,g,y)};if(t){const o=t+Zk,s=r;r=l=>l.startsWith(o)?s(l.slice(o.length)):Wk(Pne,!1,l,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Dne=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",u=t.has(l);c||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},$ne=e=>({cache:jne(e.cacheSize),parseClassName:Nne(e),sortModifiers:Dne(e),..._ne(e)}),Ine=/\s+/,zne=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],c=e.trim().split(Ine);let u="";for(let d=c.length-1;d>=0;d-=1){const h=c[d],{isExternal:p,modifiers:g,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:_}=n(h);if(p){u=h+(u.length>0?" "+u:u);continue}let x=!!_,w=r(x?y.substring(0,_):y);if(!w){if(!x){u=h+(u.length>0?" "+u:u);continue}if(w=r(y),!w){u=h+(u.length>0?" "+u:u);continue}x=!1}const v=g.length===0?"":g.length===1?g[0]:s(g).join(":"),C=b?v+gw:v,S=C+w;if(l.indexOf(S)>-1)continue;l.push(S);const T=o(w,x);for(let E=0;E<T.length;++E){const O=T[E];l.push(C+O)}u=h+(u.length>0?" "+u:u)}return u},Lne=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=IN(n))&&(o&&(o+=" "),o+=r);return o},IN=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=IN(e[r]))&&(n&&(n+=" "),n+=t);return n},Fne=(e,...t)=>{let n,r,o,s;const l=u=>{const d=t.reduce((h,p)=>p(h),e());return n=$ne(d),r=n.cache.get,o=n.cache.set,s=c,c(u)},c=u=>{const d=r(u);if(d)return d;const h=zne(u,n);return o(u,h),h};return s=l,(...u)=>s(Lne(...u))},Une=[],Er=e=>{const t=n=>n[e]||Une;return t.isThemeGetter=!0,t},zN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,LN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Vne=/^\d+\/\d+$/,qne=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bne=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Hne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kne=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gne=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nu=e=>Vne.test(e),kt=e=>!!e&&!Number.isNaN(Number(e)),ba=e=>!!e&&Number.isInteger(Number(e)),g1=e=>e.endsWith("%")&&kt(e.slice(0,-1)),Rs=e=>qne.test(e),Zne=()=>!0,Wne=e=>Bne.test(e)&&!Hne.test(e),FN=()=>!1,Yne=e=>Kne.test(e),Xne=e=>Gne.test(e),Qne=e=>!Qe(e)&&!Je(e),Jne=e=>hf(e,qN,FN),Qe=e=>zN.test(e),Nl=e=>hf(e,BN,Wne),y1=e=>hf(e,ore,kt),Yk=e=>hf(e,UN,FN),ere=e=>hf(e,VN,Xne),sg=e=>hf(e,HN,Yne),Je=e=>LN.test(e),Sd=e=>pf(e,BN),tre=e=>pf(e,ire),Xk=e=>pf(e,UN),nre=e=>pf(e,qN),rre=e=>pf(e,VN),ag=e=>pf(e,HN,!0),hf=(e,t,n)=>{const r=zN.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},pf=(e,t,n=!1)=>{const r=LN.exec(e);return r?r[1]?t(r[1]):n:!1},UN=e=>e==="position"||e==="percentage",VN=e=>e==="image"||e==="url",qN=e=>e==="length"||e==="size"||e==="bg-size",BN=e=>e==="length",ore=e=>e==="number",ire=e=>e==="family-name",HN=e=>e==="shadow",sre=()=>{const e=Er("color"),t=Er("font"),n=Er("text"),r=Er("font-weight"),o=Er("tracking"),s=Er("leading"),l=Er("breakpoint"),c=Er("container"),u=Er("spacing"),d=Er("radius"),h=Er("shadow"),p=Er("inset-shadow"),g=Er("text-shadow"),b=Er("drop-shadow"),y=Er("blur"),_=Er("perspective"),x=Er("aspect"),w=Er("ease"),v=Er("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...S(),Je,Qe],E=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],M=()=>[Je,Qe,u],P=()=>[nu,"full","auto",...M()],I=()=>[ba,"none","subgrid",Je,Qe],z=()=>["auto",{span:["full",ba,Je,Qe]},ba,Je,Qe],U=()=>[ba,"auto",Je,Qe],G=()=>["auto","min","max","fr",Je,Qe],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...M()],H=()=>[nu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],Y=()=>[e,Je,Qe],oe=()=>[...S(),Xk,Yk,{position:[Je,Qe]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",nre,Jne,{size:[Je,Qe]}],q=()=>[g1,Sd,Nl],V=()=>["","none","full",d,Je,Qe],D=()=>["",kt,Sd,Nl],B=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[kt,g1,Xk,Yk],ae=()=>["","none",y,Je,Qe],ge=()=>["none",kt,Je,Qe],ke=()=>["none",kt,Je,Qe],Q=()=>[kt,Je,Qe],ie=()=>[nu,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Rs],breakpoint:[Rs],color:[Zne],container:[Rs],"drop-shadow":[Rs],ease:["in","out","in-out"],font:[Qne],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Rs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Rs],shadow:[Rs],spacing:["px",kt],text:[Rs],"text-shadow":[Rs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nu,Qe,Je,x]}],container:["container"],columns:[{columns:[kt,Qe,Je,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ba,"auto",Je,Qe]}],basis:[{basis:[nu,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kt,nu,"auto","initial","none",Qe]}],grow:[{grow:["",kt,Je,Qe]}],shrink:[{shrink:["",kt,Je,Qe]}],order:[{order:[ba,"first","last","none",Je,Qe]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,Sd,Nl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Je,y1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",g1,Qe]}],"font-family":[{font:[tre,Qe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Je,Qe]}],"line-clamp":[{"line-clamp":[kt,"none",Je,y1]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",Je,Qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Je,Qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[kt,"from-font","auto",Je,Nl]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[kt,"auto",Je,Qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je,Qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Je,Qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ba,Je,Qe],radial:["",Je,Qe],conic:[ba,Je,Qe]},rre,ere]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kt,Je,Qe]}],"outline-w":[{outline:["",kt,Sd,Nl]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",h,ag,sg]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",p,ag,sg]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[kt,Nl]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",g,ag,sg]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[kt,Je,Qe]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[kt]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[Je,Qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[kt]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Je,Qe]}],filter:[{filter:["","none",Je,Qe]}],blur:[{blur:ae()}],brightness:[{brightness:[kt,Je,Qe]}],contrast:[{contrast:[kt,Je,Qe]}],"drop-shadow":[{"drop-shadow":["","none",b,ag,sg]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",kt,Je,Qe]}],"hue-rotate":[{"hue-rotate":[kt,Je,Qe]}],invert:[{invert:["",kt,Je,Qe]}],saturate:[{saturate:[kt,Je,Qe]}],sepia:[{sepia:["",kt,Je,Qe]}],"backdrop-filter":[{"backdrop-filter":["","none",Je,Qe]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[kt,Je,Qe]}],"backdrop-contrast":[{"backdrop-contrast":[kt,Je,Qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kt,Je,Qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kt,Je,Qe]}],"backdrop-invert":[{"backdrop-invert":["",kt,Je,Qe]}],"backdrop-opacity":[{"backdrop-opacity":[kt,Je,Qe]}],"backdrop-saturate":[{"backdrop-saturate":[kt,Je,Qe]}],"backdrop-sepia":[{"backdrop-sepia":["",kt,Je,Qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Je,Qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kt,"initial",Je,Qe]}],ease:[{ease:["linear","initial",w,Je,Qe]}],delay:[{delay:[kt,Je,Qe]}],animate:[{animate:["none",v,Je,Qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,Je,Qe]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:Q()}],"skew-x":[{"skew-x":Q()}],"skew-y":[{"skew-y":Q()}],transform:[{transform:[Je,Qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Je,Qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Je,Qe]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[kt,Sd,Nl,y1]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},KN=Fne(sre);function pn(...e){return KN(I_(e))}const are=tl("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-none","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ah({className:e,variant:t="default",size:n="default",...r}){return j.jsx(bne,{"data-slot":"button",className:pn(are({variant:t,size:n,className:e})),...r})}const lre=()=>{const e=dte(),t=e?.name,n=e?.version,[,r]=e_();return j.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:j.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[j.jsxs("div",{className:"flex items-center gap-4",children:[j.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{r(null)},children:"Skybridge"}),j.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),j.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[j.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),j.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",n]})]}),j.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[j.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),j.jsx("div",{className:"flex items-center gap-2",children:j.jsx(ah,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:j.jsxs("a",{href:"https://www.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",j.jsx(Ote,{className:"h-3.5 w-3.5"})]})})})]})})},GN=k.createContext({});function cre(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const L_=typeof window<"u",ure=L_?k.useLayoutEffect:k.useEffect,F_=k.createContext(null);function U_(e,t){e.indexOf(t)===-1&&e.push(t)}function V_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ps=(e,t,n)=>n>t?t:n<e?e:n;let q_=()=>{};const Ns={},ZN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function WN(e){return typeof e=="object"&&e!==null}const YN=e=>/^0[^.\s]+$/u.test(e);function B_(e){let t;return()=>(t===void 0&&(t=e()),t)}const oi=e=>e,fre=(e,t)=>n=>t(e(n)),Vh=(...e)=>e.reduce(fre),lh=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class H_{constructor(){this.subscriptions=[]}add(t){return U_(this.subscriptions,t),()=>V_(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const l=this.subscriptions[s];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ki=e=>e*1e3,ti=e=>e/1e3;function XN(e,t){return t?e*(1e3/t):0}const QN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,dre=1e-7,hre=12;function pre(e,t,n,r,o){let s,l,c=0;do l=t+(n-t)/2,s=QN(l,r,o)-e,s>0?n=l:t=l;while(Math.abs(s)>dre&&++c<hre);return l}function qh(e,t,n,r){if(e===t&&n===r)return oi;const o=s=>pre(s,0,1,e,n);return s=>s===0||s===1?s:QN(o(s),t,r)}const JN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,eD=e=>t=>1-e(1-t),tD=qh(.33,1.53,.69,.99),K_=eD(tD),nD=JN(K_),rD=e=>(e*=2)<1?.5*K_(e):.5*(2-Math.pow(2,-10*(e-1))),G_=e=>1-Math.sin(Math.acos(e)),oD=eD(G_),iD=JN(G_),mre=qh(.42,0,1,1),gre=qh(0,0,.58,1),sD=qh(.42,0,.58,1),yre=e=>Array.isArray(e)&&typeof e[0]!="number",aD=e=>Array.isArray(e)&&typeof e[0]=="number",vre={linear:oi,easeIn:mre,easeInOut:sD,easeOut:gre,circIn:G_,circInOut:iD,circOut:oD,backIn:K_,backInOut:nD,backOut:tD,anticipate:rD},bre=e=>typeof e=="string",Qk=e=>{if(aD(e)){q_(e.length===4);const[t,n,r,o]=e;return qh(t,n,r,o)}else if(bre(e))return vre[e];return e},lg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Sre(e,t){let n=new Set,r=new Set,o=!1,s=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function u(h){l.has(h)&&(d.schedule(h),e()),h(c)}const d={schedule:(h,p=!1,g=!1)=>{const y=g&&o?n:r;return p&&l.add(h),y.has(h)||y.add(h),h},cancel:h=>{r.delete(h),l.delete(h)},process:h=>{if(c=h,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),n.clear(),o=!1,s&&(s=!1,d.process(h))}};return d}const wre=40;function lD(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,l=lg.reduce((C,S)=>(C[S]=Sre(s),C),{}),{setup:c,read:u,resolveKeyframes:d,preUpdate:h,update:p,preRender:g,render:b,postRender:y}=l,_=()=>{const C=Ns.useManualTiming?o.timestamp:performance.now();n=!1,Ns.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(C-o.timestamp,wre),1)),o.timestamp=C,o.isProcessing=!0,c.process(o),u.process(o),d.process(o),h.process(o),p.process(o),g.process(o),b.process(o),y.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(_))},x=()=>{n=!0,r=!0,o.isProcessing||e(_)};return{schedule:lg.reduce((C,S)=>{const T=l[S];return C[S]=(E,O=!1,M=!1)=>(n||x(),T.schedule(E,O,M)),C},{}),cancel:C=>{for(let S=0;S<lg.length;S++)l[lg[S]].cancel(C)},state:o,steps:l}}const{schedule:Zn,cancel:Ba,state:Fr,steps:v1}=lD(typeof requestAnimationFrame<"u"?requestAnimationFrame:oi,!0);let Dg;function xre(){Dg=void 0}const yo={now:()=>(Dg===void 0&&yo.set(Fr.isProcessing||Ns.useManualTiming?Fr.timestamp:performance.now()),Dg),set:e=>{Dg=e,queueMicrotask(xre)}},cD=e=>t=>typeof t=="string"&&t.startsWith(e),uD=cD("--"),_re=cD("var(--"),Z_=e=>_re(e)?Ere.test(e.split("/*")[0].trim()):!1,Ere=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Jk(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const mf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ch={...mf,transform:e=>Ps(0,1,e)},cg={...mf,default:1},Ld=e=>Math.round(e*1e5)/1e5,W_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Cre(e){return e==null}const Tre=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Y_=(e,t)=>n=>!!(typeof n=="string"&&Tre.test(n)&&n.startsWith(e)||t&&!Cre(n)&&Object.prototype.hasOwnProperty.call(n,t)),fD=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,l,c]=r.match(W_);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},Rre=e=>Ps(0,255,e),b1={...mf,transform:e=>Math.round(Rre(e))},ql={test:Y_("rgb","red"),parse:fD("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+b1.transform(e)+", "+b1.transform(t)+", "+b1.transform(n)+", "+Ld(ch.transform(r))+")"};function Ore(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const yw={test:Y_("#"),parse:Ore,transform:ql.transform},Bh=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wa=Bh("deg"),Gi=Bh("%"),Ye=Bh("px"),Are=Bh("vh"),kre=Bh("vw"),e5={...Gi,parse:e=>Gi.parse(e)/100,transform:e=>Gi.transform(e*100)},gu={test:Y_("hsl","hue"),parse:fD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Gi.transform(Ld(t))+", "+Gi.transform(Ld(n))+", "+Ld(ch.transform(r))+")"},yr={test:e=>ql.test(e)||yw.test(e)||gu.test(e),parse:e=>ql.test(e)?ql.parse(e):gu.test(e)?gu.parse(e):yw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ql.transform(e):gu.transform(e),getAnimatableNone:e=>{const t=yr.parse(e);return t.alpha=0,yr.transform(t)}},Mre=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function jre(e){return isNaN(e)&&typeof e=="string"&&(e.match(W_)?.length||0)+(e.match(Mre)?.length||0)>0}const dD="number",hD="color",Pre="var",Nre="var(",t5="${}",Dre=/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 uh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const c=t.replace(Dre,u=>(yr.test(u)?(r.color.push(s),o.push(hD),n.push(yr.parse(u))):u.startsWith(Nre)?(r.var.push(s),o.push(Pre),n.push(u)):(r.number.push(s),o.push(dD),n.push(parseFloat(u))),++s,t5)).split(t5);return{values:n,split:c,indexes:r,types:o}}function pD(e){return uh(e).values}function mD(e){const{split:t,types:n}=uh(e),r=t.length;return o=>{let s="";for(let l=0;l<r;l++)if(s+=t[l],o[l]!==void 0){const c=n[l];c===dD?s+=Ld(o[l]):c===hD?s+=yr.transform(o[l]):s+=o[l]}return s}}const $re=e=>typeof e=="number"?0:yr.test(e)?yr.getAnimatableNone(e):e;function Ire(e){const t=pD(e);return mD(e)(t.map($re))}const Ha={test:jre,parse:pD,createTransformer:mD,getAnimatableNone:Ire};function S1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function zre({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,l=0;if(!t)o=s=l=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;o=S1(u,c,e+1/3),s=S1(u,c,e),l=S1(u,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(l*255),alpha:r}}function my(e,t){return n=>n>0?t:e}const Yn=(e,t,n)=>e+(t-e)*n,w1=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Lre=[yw,ql,gu],Fre=e=>Lre.find(t=>t.test(e));function n5(e){const t=Fre(e);if(!t)return!1;let n=t.parse(e);return t===gu&&(n=zre(n)),n}const r5=(e,t)=>{const n=n5(e),r=n5(t);if(!n||!r)return my(e,t);const o={...n};return s=>(o.red=w1(n.red,r.red,s),o.green=w1(n.green,r.green,s),o.blue=w1(n.blue,r.blue,s),o.alpha=Yn(n.alpha,r.alpha,s),ql.transform(o))},vw=new Set(["none","hidden"]);function Ure(e,t){return vw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Vre(e,t){return n=>Yn(e,t,n)}function X_(e){return typeof e=="number"?Vre:typeof e=="string"?Z_(e)?my:yr.test(e)?r5:Hre:Array.isArray(e)?gD:typeof e=="object"?yr.test(e)?r5:qre:my}function gD(e,t){const n=[...e],r=n.length,o=e.map((s,l)=>X_(s)(s,t[l]));return s=>{for(let l=0;l<r;l++)n[l]=o[l](s);return n}}function qre(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=X_(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function Bre(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],l=e.indexes[s][r[s]],c=e.values[l]??0;n[o]=c,r[s]++}return n}const Hre=(e,t)=>{const n=Ha.createTransformer(t),r=uh(e),o=uh(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?vw.has(e)&&!o.values.length||vw.has(t)&&!r.values.length?Ure(e,t):Vh(gD(Bre(r,o),o.values),n):my(e,t)};function yD(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Yn(e,t,n):X_(e)(e,t)}const Kre=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Zn.update(t,n),stop:()=>Ba(t),now:()=>Fr.isProcessing?Fr.timestamp:yo.now()}},vD=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},gy=2e4;function Q_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<gy;)t+=n,r=e.next(t);return t>=gy?1/0:t}function Gre(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Q_(r),gy);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:ti(o)}}const Zre=5;function bD(e,t,n){const r=Math.max(t-Zre,0);return XN(n-e(r),t-r)}const rr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},x1=.001;function Wre({duration:e=rr.duration,bounce:t=rr.bounce,velocity:n=rr.velocity,mass:r=rr.mass}){let o,s,l=1-t;l=Ps(rr.minDamping,rr.maxDamping,l),e=Ps(rr.minDuration,rr.maxDuration,ti(e)),l<1?(o=d=>{const h=d*l,p=h*e,g=h-n,b=bw(d,l),y=Math.exp(-p);return x1-g/b*y},s=d=>{const p=d*l*e,g=p*n+n,b=Math.pow(l,2)*Math.pow(d,2)*e,y=Math.exp(-p),_=bw(Math.pow(d,2),l);return(-o(d)+x1>0?-1:1)*((g-b)*y)/_}):(o=d=>{const h=Math.exp(-d*e),p=(d-n)*e+1;return-x1+h*p},s=d=>{const h=Math.exp(-d*e),p=(n-d)*(e*e);return h*p});const c=5/e,u=Xre(o,s,c);if(e=Ki(e),isNaN(u))return{stiffness:rr.stiffness,damping:rr.damping,duration:e};{const d=Math.pow(u,2)*r;return{stiffness:d,damping:l*2*Math.sqrt(r*d),duration:e}}}const Yre=12;function Xre(e,t,n){let r=n;for(let o=1;o<Yre;o++)r=r-e(r)/t(r);return r}function bw(e,t){return e*Math.sqrt(1-t*t)}const Qre=["duration","bounce"],Jre=["stiffness","damping","mass"];function o5(e,t){return t.some(n=>e[n]!==void 0)}function eoe(e){let t={velocity:rr.velocity,stiffness:rr.stiffness,damping:rr.damping,mass:rr.mass,isResolvedFromDuration:!1,...e};if(!o5(e,Jre)&&o5(e,Qre))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Ps(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:rr.mass,stiffness:o,damping:s}}else{const n=Wre(e);t={...t,...n,mass:rr.mass},t.isResolvedFromDuration=!0}return t}function yy(e=rr.visualDuration,t=rr.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:u,damping:d,mass:h,duration:p,velocity:g,isResolvedFromDuration:b}=eoe({...n,velocity:-ti(n.velocity||0)}),y=g||0,_=d/(2*Math.sqrt(u*h)),x=l-s,w=ti(Math.sqrt(u/h)),v=Math.abs(x)<5;r||(r=v?rr.restSpeed.granular:rr.restSpeed.default),o||(o=v?rr.restDelta.granular:rr.restDelta.default);let C;if(_<1){const T=bw(w,_);C=E=>{const O=Math.exp(-_*w*E);return l-O*((y+_*w*x)/T*Math.sin(T*E)+x*Math.cos(T*E))}}else if(_===1)C=T=>l-Math.exp(-w*T)*(x+(y+w*x)*T);else{const T=w*Math.sqrt(_*_-1);C=E=>{const O=Math.exp(-_*w*E),M=Math.min(T*E,300);return l-O*((y+_*w*x)*Math.sinh(M)+T*x*Math.cosh(M))/T}}const S={calculatedDuration:b&&p||null,next:T=>{const E=C(T);if(b)c.done=T>=p;else{let O=T===0?y:0;_<1&&(O=T===0?Ki(y):bD(C,T,E));const M=Math.abs(O)<=r,P=Math.abs(l-E)<=o;c.done=M&&P}return c.value=c.done?l:E,c},toString:()=>{const T=Math.min(Q_(S),gy),E=vD(O=>S.next(T*O).value,T,30);return T+"ms "+E},toTransition:()=>{}};return S}yy.applyToOptions=e=>{const t=Gre(e,100,yy);return e.ease=t.ease,e.duration=Ki(t.duration),e.type="keyframes",e};function Sw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:l,min:c,max:u,restDelta:d=.5,restSpeed:h}){const p=e[0],g={done:!1,value:p},b=M=>c!==void 0&&M<c||u!==void 0&&M>u,y=M=>c===void 0?u:u===void 0||Math.abs(c-M)<Math.abs(u-M)?c:u;let _=n*t;const x=p+_,w=l===void 0?x:l(x);w!==x&&(_=w-p);const v=M=>-_*Math.exp(-M/r),C=M=>w+v(M),S=M=>{const P=v(M),I=C(M);g.done=Math.abs(P)<=d,g.value=g.done?w:I};let T,E;const O=M=>{b(g.value)&&(T=M,E=yy({keyframes:[g.value,y(g.value)],velocity:bD(C,M,g.value),damping:o,stiffness:s,restDelta:d,restSpeed:h}))};return O(0),{calculatedDuration:null,next:M=>{let P=!1;return!E&&T===void 0&&(P=!0,S(M),O(M)),T!==void 0&&M>=T?E.next(M-T):(!P&&S(M),g)}}}function toe(e,t,n){const r=[],o=n||Ns.mix||yD,s=e.length-1;for(let l=0;l<s;l++){let c=o(e[l],e[l+1]);if(t){const u=Array.isArray(t)?t[l]||oi:t;c=Vh(u,c)}r.push(c)}return r}function noe(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(q_(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=toe(t,r,o),u=c.length,d=h=>{if(l&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const g=lh(e[p],e[p+1],h);return c[p](g)};return n?h=>d(Ps(e[0],e[s-1],h)):d}function roe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=lh(0,t,r);e.push(Yn(n,1,o))}}function ooe(e){const t=[0];return roe(t,e.length-1),t}function ioe(e,t){return e.map(n=>n*t)}function soe(e,t){return e.map(()=>t||sD).splice(0,e.length-1)}function Fd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=yre(r)?r.map(Qk):Qk(r),s={done:!1,value:t[0]},l=ioe(n&&n.length===t.length?n:ooe(t),e),c=noe(l,t,{ease:Array.isArray(o)?o:soe(t,o)});return{calculatedDuration:e,next:u=>(s.value=c(u),s.done=u>=e,s)}}const aoe=e=>e!==null;function J_(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(aoe),c=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!c||r===void 0?s[c]:r}const loe={decay:Sw,inertia:Sw,tween:Fd,keyframes:Fd,spring:yy};function SD(e){typeof e.type=="string"&&(e.type=loe[e.type])}class eE{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const coe=e=>e/100;class tE extends eE{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==yo.now()&&this.tick(yo.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;SD(t);const{type:n=Fd,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:l=0}=t;let{keyframes:c}=t;const u=n||Fd;u!==Fd&&typeof c[0]!="number"&&(this.mixKeyframes=Vh(coe,yD(c[0],c[1])),c=[0,100]);const d=u({...t,keyframes:c});s==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...c].reverse(),velocity:-l})),d.calculatedDuration===null&&(d.calculatedDuration=Q_(d));const{calculatedDuration:h}=d;this.calculatedDuration=h,this.resolvedDuration=h+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:l,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:h,repeat:p,repeatType:g,repeatDelay:b,type:y,onUpdate:_,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?w<0:w>o;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let C=this.currentTime,S=r;if(p){const M=Math.min(this.currentTime,o)/c;let P=Math.floor(M),I=M%1;!I&&M>=1&&(I=1),I===1&&P--,P=Math.min(P,p+1),P%2&&(g==="reverse"?(I=1-I,b&&(I-=b/c)):g==="mirror"&&(S=l)),C=Ps(0,1,I)*c}const T=v?{done:!1,value:h[0]}:S.next(C);s&&(T.value=s(T.value));let{done:E}=T;!v&&u!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&y!==Sw&&(T.value=J_(h,this.options,x,this.speed)),_&&_(T.value),O&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return ti(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ti(t)}get time(){return ti(this.currentTime)}set time(t){t=Ki(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(yo.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ti(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Kre,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(yo.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function uoe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Bl=e=>e*180/Math.PI,ww=e=>{const t=Bl(Math.atan2(e[1],e[0]));return xw(t)},foe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ww,rotateZ:ww,skewX:e=>Bl(Math.atan(e[1])),skewY:e=>Bl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},xw=e=>(e=e%360,e<0&&(e+=360),e),i5=ww,s5=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),a5=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),doe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:s5,scaleY:a5,scale:e=>(s5(e)+a5(e))/2,rotateX:e=>xw(Bl(Math.atan2(e[6],e[5]))),rotateY:e=>xw(Bl(Math.atan2(-e[2],e[0]))),rotateZ:i5,rotate:i5,skewX:e=>Bl(Math.atan(e[4])),skewY:e=>Bl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function _w(e){return e.includes("scale")?1:0}function Ew(e,t){if(!e||e==="none")return _w(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=doe,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=foe,o=c}if(!o)return _w(t);const s=r[t],l=o[1].split(",").map(poe);return typeof s=="function"?s(l):l[s]}const hoe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ew(n,t)};function poe(e){return parseFloat(e.trim())}const gf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yf=new Set(gf),l5=e=>e===mf||e===Ye,moe=new Set(["x","y","z"]),goe=gf.filter(e=>!moe.has(e));function yoe(e){const t=[];return goe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ta={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ew(t,"x"),y:(e,{transform:t})=>Ew(t,"y")};Ta.translateX=Ta.x;Ta.translateY=Ta.y;const Gl=new Set;let Cw=!1,Tw=!1,Rw=!1;function wD(){if(Tw){const e=Array.from(Gl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=yoe(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,l])=>{r.getValue(s)?.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Tw=!1,Cw=!1,Gl.forEach(e=>e.complete(Rw)),Gl.clear()}function xD(){Gl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tw=!0)})}function voe(){Rw=!0,xD(),wD(),Rw=!1}class nE{constructor(t,n,r,o,s,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Gl.add(this),Cw||(Cw=!0,Zn.read(xD),Zn.resolveKeyframes(wD))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o?.get(),l=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&s===void 0&&o.set(t[0])}uoe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Gl.delete(this)}cancel(){this.state==="scheduled"&&(Gl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const boe=e=>e.startsWith("--");function Soe(e,t,n){boe(t)?e.style.setProperty(t,n):e.style[t]=n}const woe=B_(()=>window.ScrollTimeline!==void 0),xoe={};function _oe(e,t){const n=B_(e);return()=>xoe[t]??n()}const _D=_oe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ad=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,c5={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ad([0,.65,.55,1]),circOut:Ad([.55,0,1,.45]),backIn:Ad([.31,.01,.66,-.59]),backOut:Ad([.33,1.53,.69,.99])};function ED(e,t){if(e)return typeof e=="function"?_D()?vD(e,t):"ease-out":aD(e)?Ad(e):Array.isArray(e)?e.map(n=>ED(n,t)||c5.easeOut):c5[e]}function Eoe(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:l="loop",ease:c="easeOut",times:u}={},d=void 0){const h={[t]:n};u&&(h.offset=u);const p=ED(c,o);Array.isArray(p)&&(h.easing=p);const g={delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:l==="reverse"?"alternate":"normal"};return d&&(g.pseudoElement=d),e.animate(h,g)}function CD(e){return typeof e=="function"&&"applyToOptions"in e}function Coe({type:e,...t}){return CD(e)&&_D()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Toe extends eE{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:l=!1,finalKeyframe:c,onComplete:u}=t;this.isPseudoElement=!!s,this.allowFlatten=l,this.options=t,q_(typeof t.type!="string");const d=Coe(t);this.animation=Eoe(n,r,o,d,s),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const h=J_(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(h):Soe(n,r,h),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ti(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ti(t)}get time(){return ti(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ki(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&woe()?(this.animation.timeline=t,oi):n(this)}}const TD={anticipate:rD,backInOut:nD,circInOut:iD};function Roe(e){return e in TD}function Ooe(e){typeof e.ease=="string"&&Roe(e.ease)&&(e.ease=TD[e.ease])}const u5=10;class Aoe extends Toe{constructor(t){Ooe(t),SD(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new tE({...l,autoplay:!1}),u=Ki(this.finishedTime??this.time);n.setWithVelocity(c.sample(u-u5).value,c.sample(u).value,u5),c.stop()}}const f5=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ha.test(e)||e==="0")&&!e.startsWith("url("));function koe(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Moe(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],l=f5(o,t),c=f5(s,t);return!l||!c?!1:koe(e)||(n==="spring"||CD(n))&&r}function Ow(e){e.duration=0,e.type="keyframes"}const joe=new Set(["opacity","clipPath","filter","transform"]),Poe=B_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Noe(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return Poe()&&n&&joe.has(n)&&(n!=="transform"||!d)&&!u&&!r&&o!=="mirror"&&s!==0&&l!=="inertia"}const Doe=40;class $oe extends eE{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:l="loop",keyframes:c,name:u,motionValue:d,element:h,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=yo.now();const g={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:l,name:u,motionValue:d,element:h,...p},b=h?.KeyframeResolver||nE;this.keyframeResolver=new b(c,(y,_,x)=>this.onKeyframesResolved(y,_,g,!x),u,d,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:l,velocity:c,delay:u,isHandoff:d,onUpdate:h}=r;this.resolvedAt=yo.now(),Moe(t,s,l,c)||((Ns.instantAnimations||!u)&&h?.(J_(t,r,n)),t[0]=t[t.length-1],Ow(r),r.repeat=0);const g={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Doe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=!d&&Noe(g)?new Aoe({...g,element:g.motionValue.owner.current}):new tE(g);b.finished.then(()=>this.notifyFinished()).catch(oi),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),voe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Ioe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zoe(e){const t=Ioe.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function RD(e,t,n=1){const[r,o]=zoe(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const l=s.trim();return ZN(l)?parseFloat(l):l}return Z_(o)?RD(o,t,n+1):o}function rE(e,t){return e?.[t]??e?.default??e}const OD=new Set(["width","height","top","left","right","bottom",...gf]),Loe={test:e=>e==="auto",parse:e=>e},AD=e=>t=>t.test(e),kD=[mf,Ye,Gi,wa,kre,Are,Loe],d5=e=>kD.find(AD(e));function Foe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||YN(e):!0}const Uoe=new Set(["brightness","contrast","saturate","opacity"]);function Voe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(W_)||[];if(!r)return e;const o=n.replace(r,"");let s=Uoe.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const qoe=/\b([a-z-]*)\(.*?\)/gu,Aw={...Ha,getAnimatableNone:e=>{const t=e.match(qoe);return t?t.map(Voe).join(" "):e}},h5={...mf,transform:Math.round},Boe={rotate:wa,rotateX:wa,rotateY:wa,rotateZ:wa,scale:cg,scaleX:cg,scaleY:cg,scaleZ:cg,skew:wa,skewX:wa,skewY:wa,distance:Ye,translateX:Ye,translateY:Ye,translateZ:Ye,x:Ye,y:Ye,z:Ye,perspective:Ye,transformPerspective:Ye,opacity:ch,originX:e5,originY:e5,originZ:Ye},oE={borderWidth:Ye,borderTopWidth:Ye,borderRightWidth:Ye,borderBottomWidth:Ye,borderLeftWidth:Ye,borderRadius:Ye,radius:Ye,borderTopLeftRadius:Ye,borderTopRightRadius:Ye,borderBottomRightRadius:Ye,borderBottomLeftRadius:Ye,width:Ye,maxWidth:Ye,height:Ye,maxHeight:Ye,top:Ye,right:Ye,bottom:Ye,left:Ye,inset:Ye,insetBlock:Ye,insetBlockStart:Ye,insetBlockEnd:Ye,insetInline:Ye,insetInlineStart:Ye,insetInlineEnd:Ye,padding:Ye,paddingTop:Ye,paddingRight:Ye,paddingBottom:Ye,paddingLeft:Ye,paddingBlock:Ye,paddingBlockStart:Ye,paddingBlockEnd:Ye,paddingInline:Ye,paddingInlineStart:Ye,paddingInlineEnd:Ye,margin:Ye,marginTop:Ye,marginRight:Ye,marginBottom:Ye,marginLeft:Ye,marginBlock:Ye,marginBlockStart:Ye,marginBlockEnd:Ye,marginInline:Ye,marginInlineStart:Ye,marginInlineEnd:Ye,backgroundPositionX:Ye,backgroundPositionY:Ye,...Boe,zIndex:h5,fillOpacity:ch,strokeOpacity:ch,numOctaves:h5},Hoe={...oE,color:yr,backgroundColor:yr,outlineColor:yr,fill:yr,stroke:yr,borderColor:yr,borderTopColor:yr,borderRightColor:yr,borderBottomColor:yr,borderLeftColor:yr,filter:Aw,WebkitFilter:Aw},MD=e=>Hoe[e];function jD(e,t){let n=MD(e);return n!==Aw&&(n=Ha),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Koe=new Set(["auto","none","0"]);function Goe(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!Koe.has(s)&&uh(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=jD(n,o)}class Zoe extends nE{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let p=t[h];if(typeof p=="string"&&(p=p.trim(),Z_(p))){const g=RD(p,n.current);g!==void 0&&(t[h]=g),h===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!OD.has(r)||t.length!==2)return;const[o,s]=t,l=d5(o),c=d5(s),u=Jk(o),d=Jk(s);if(u!==d&&Ta[r]){this.needsMeasurement=!0;return}if(l!==c)if(l5(l)&&l5(c))for(let h=0;h<t.length;h++){const p=t[h];typeof p=="string"&&(t[h]=parseFloat(p))}else Ta[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Foe(t[o]))&&r.push(o);r.length&&Goe(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ta[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,l=r[s];r[s]=Ta[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Woe(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const PD=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Yoe(e){return WN(e)&&"offsetHeight"in e}const p5=30,Xoe=e=>!isNaN(parseFloat(e));class Qoe{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=yo.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=yo.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Xoe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new H_);const r=this.events[t].add(n);return t==="change"?()=>{r(),Zn.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=yo.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>p5)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,p5);return XN(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qu(e,t){return new Qoe(e,t)}const{schedule:iE}=lD(queueMicrotask,!1),_i={x:!1,y:!1};function ND(){return _i.x||_i.y}function Joe(e){return e==="x"||e==="y"?_i[e]?null:(_i[e]=!0,()=>{_i[e]=!1}):_i.x||_i.y?null:(_i.x=_i.y=!0,()=>{_i.x=_i.y=!1})}function DD(e,t){const n=Woe(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function m5(e){return!(e.pointerType==="touch"||ND())}function eie(e,t,n={}){const[r,o,s]=DD(e,n),l=c=>{if(!m5(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const h=p=>{m5(p)&&(d(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,o)};return r.forEach(c=>{c.addEventListener("pointerenter",l,o)}),s}const $D=(e,t)=>t?e===t?!0:$D(e,t.parentElement):!1,sE=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,tie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ID(e){return tie.has(e.tagName)||e.isContentEditable===!0}const $g=new WeakSet;function g5(e){return t=>{t.key==="Enter"&&e(t)}}function _1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nie=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=g5(()=>{if($g.has(n))return;_1(n,"down");const o=g5(()=>{_1(n,"up")}),s=()=>_1(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function y5(e){return sE(e)&&!ND()}function rie(e,t,n={}){const[r,o,s]=DD(e,n),l=c=>{const u=c.currentTarget;if(!y5(c))return;$g.add(u);const d=t(u,c),h=(b,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),$g.has(u)&&$g.delete(u),y5(b)&&typeof d=="function"&&d(b,{success:y})},p=b=>{h(b,u===window||u===document||n.useGlobalTarget||$D(u,b.target))},g=b=>{h(b,!1)};window.addEventListener("pointerup",p,o),window.addEventListener("pointercancel",g,o)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",l,o),Yoe(c)&&(c.addEventListener("focus",d=>nie(d,o)),!ID(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function zD(e){return WN(e)&&"ownerSVGElement"in e}function oie(e){return zD(e)&&e.tagName==="svg"}const Xr=e=>!!(e&&e.getVelocity),iie=[...kD,yr,Ha],sie=e=>iie.find(AD(e)),LD=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function aie(e=!0){const t=k.useContext(F_);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=k.useId();k.useEffect(()=>{if(e)return o(s)},[e]);const l=k.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,l]:[!0]}const FD=k.createContext({strict:!1}),v5={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"]},Bu={};for(const e in v5)Bu[e]={isEnabled:t=>v5[e].some(n=>!!t[n])};function lie(e){for(const t in e)Bu[t]={...Bu[t],...e[t]}}const cie=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 vy(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cie.has(e)}let UD=e=>!vy(e);function uie(e){typeof e=="function"&&(UD=t=>t.startsWith("on")?!vy(t):e(t))}try{uie(require("@emotion/is-prop-valid").default)}catch{}function fie(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(UD(o)||n===!0&&vy(o)||!t&&!vy(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const p0=k.createContext({});function m0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function fh(e){return typeof e=="string"||Array.isArray(e)}const aE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lE=["initial",...aE];function g0(e){return m0(e.animate)||lE.some(t=>fh(e[t]))}function VD(e){return!!(g0(e)||e.variants)}function die(e,t){if(g0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||fh(n)?n:void 0,animate:fh(r)?r:void 0}}return e.inherit!==!1?t:{}}function hie(e){const{initial:t,animate:n}=die(e,k.useContext(p0));return k.useMemo(()=>({initial:t,animate:n}),[b5(t),b5(n)])}function b5(e){return Array.isArray(e)?e.join(" "):e}function S5(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ye.test(e))e=parseFloat(e);else return e;const n=S5(e,t.target.x),r=S5(e,t.target.y);return`${n}% ${r}%`}},pie={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ha.parse(e);if(o.length>5)return r;const s=Ha.createTransformer(e),l=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;o[0+l]/=c,o[1+l]/=u;const d=Yn(c,u,.5);return typeof o[2+l]=="number"&&(o[2+l]/=d),typeof o[3+l]=="number"&&(o[3+l]/=d),s(o)}},kw={borderRadius:{...wd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wd,borderTopRightRadius:wd,borderBottomLeftRadius:wd,borderBottomRightRadius:wd,boxShadow:pie};function qD(e,{layout:t,layoutId:n}){return yf.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kw[e]||e==="opacity")}const mie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gie=gf.length;function yie(e,t,n){let r="",o=!0;for(let s=0;s<gie;s++){const l=gf[s],c=e[l];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(l.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const d=PD(c,oE[l]);if(!u){o=!1;const h=mie[l]||l;r+=`${h}(${d}) `}n&&(t[l]=d)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function cE(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let l=!1,c=!1;for(const u in t){const d=t[u];if(yf.has(u)){l=!0;continue}else if(uD(u)){o[u]=d;continue}else{const h=PD(d,oE[u]);u.startsWith("origin")?(c=!0,s[u]=h):r[u]=h}}if(t.transform||(l||n?r.transform=yie(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=s;r.transformOrigin=`${u} ${d} ${h}`}}const uE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function BD(e,t,n){for(const r in t)!Xr(t[r])&&!qD(r,n)&&(e[r]=t[r])}function vie({transformTemplate:e},t){return k.useMemo(()=>{const n=uE();return cE(n,t,e),Object.assign({},n.vars,n.style)},[t])}function bie(e,t){const n=e.style||{},r={};return BD(r,n,e),Object.assign(r,vie(e,t)),r}function Sie(e,t){const n={},r=bie(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const wie={offset:"stroke-dashoffset",array:"stroke-dasharray"},xie={offset:"strokeDashoffset",array:"strokeDasharray"};function _ie(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?wie:xie;e[s.offset]=Ye.transform(-r);const l=Ye.transform(t),c=Ye.transform(n);e[s.array]=`${l} ${c}`}const Eie=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function HD(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...c},u,d,h){if(cE(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=h?.transformBox??"fill-box",delete p.transformBox);for(const b of Eie)p[b]!==void 0&&(g[b]=p[b],delete p[b]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&_ie(p,o,s,l,!1)}const KD=()=>({...uE(),attrs:{}}),GD=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Cie(e,t,n,r){const o=k.useMemo(()=>{const s=KD();return HD(s,t,GD(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};BD(s,e.style,e),o.style={...s,...o.style}}return o}const Tie=["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 fE(e){return typeof e!="string"||e.includes("-")?!1:!!(Tie.indexOf(e)>-1||/[A-Z]/u.test(e))}function Rie(e,t,n,{latestValues:r},o,s=!1,l){const u=(l??fE(e)?Cie:Sie)(t,r,o,e),d=fie(t,typeof e=="string",s),h=e!==k.Fragment?{...d,...u,ref:n}:{},{children:p}=t,g=k.useMemo(()=>Xr(p)?p.get():p,[p]);return k.createElement(e,{...h,children:g})}function w5(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function dE(e,t,n,r){if(typeof t=="function"){const[o,s]=w5(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=w5(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Ig(e){return Xr(e)?e.get():e}function Oie({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Aie(n,r,o,e),renderState:t()}}function Aie(e,t,n,r){const o={},s=r(e,{});for(const g in s)o[g]=Ig(s[g]);let{initial:l,animate:c}=e;const u=g0(e),d=VD(e);t&&d&&!u&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||l===!1;const p=h?c:l;if(p&&typeof p!="boolean"&&!m0(p)){const g=Array.isArray(p)?p:[p];for(let b=0;b<g.length;b++){const y=dE(e,g[b]);if(y){const{transitionEnd:_,transition:x,...w}=y;for(const v in w){let C=w[v];if(Array.isArray(C)){const S=h?C.length-1:0;C=C[S]}C!==null&&(o[v]=C)}for(const v in _)o[v]=_[v]}}}return o}const ZD=e=>(t,n)=>{const r=k.useContext(p0),o=k.useContext(F_),s=()=>Oie(e,t,r,o);return n?s():cre(s)};function hE(e,t,n){const{style:r}=e,o={};for(const s in r)(Xr(r[s])||t.style&&Xr(t.style[s])||qD(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=r[s]);return o}const kie=ZD({scrapeMotionValuesFromProps:hE,createRenderState:uE});function WD(e,t,n){const r=hE(e,t,n);for(const o in e)if(Xr(e[o])||Xr(t[o])){const s=gf.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const Mie=ZD({scrapeMotionValuesFromProps:WD,createRenderState:KD}),jie=Symbol.for("motionComponentSymbol");function Pie(e,t,n){const r=k.useRef(n);k.useInsertionEffect(()=>{r.current=n});const o=k.useRef(null);return k.useCallback(s=>{s&&e.onMount?.(s),t&&(s?t.mount(s):t.unmount());const l=r.current;if(typeof l=="function")if(s){const c=l(s);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):l(s);else l&&(l.current=s)},[t])}const pE=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Nie="framerAppearId",YD="data-"+pE(Nie),XD=k.createContext({});function kd(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Die(e,t,n,r,o,s){const{visualElement:l}=k.useContext(p0),c=k.useContext(FD),u=k.useContext(F_),d=k.useContext(LD).reducedMotion,h=k.useRef(null);r=r||c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,isSVG:s}));const p=h.current,g=k.useContext(XD);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&$ie(h.current,n,o,g);const b=k.useRef(!1);k.useInsertionEffect(()=>{p&&b.current&&p.update(n,u)});const y=n[YD],_=k.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return ure(()=>{p&&(b.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),_.current&&p.animationState&&p.animationState.animateChanges())}),k.useEffect(()=>{p&&(!_.current&&p.animationState&&p.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),_.current=!1),p.enteringChildren=void 0)}),p}function $ie(e,t,n,r){const{layoutId:o,layout:s,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:QD(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!l||c&&kd(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:d})}function QD(e){if(e)return e.options.allowProjection!==!1?e.projection:QD(e.parent)}function E1(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&lie(r);const s=n?n==="svg":fE(e),l=s?Mie:kie;function c(d,h){let p;const g={...k.useContext(LD),...d,layoutId:Iie(d)},{isStatic:b}=g,y=hie(d),_=l(d,b);if(!b&&L_){zie();const x=Lie(g);p=x.MeasureLayout,y.visualElement=Die(e,_,g,o,x.ProjectionNode,s)}return j.jsxs(p0.Provider,{value:y,children:[p&&y.visualElement?j.jsx(p,{visualElement:y.visualElement,...g}):null,Rie(e,d,Pie(_,y.visualElement,h),_,b,t,s)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=k.forwardRef(c);return u[jie]=e,u}function Iie({layoutId:e}){const t=k.useContext(GN).id;return t&&e!==void 0?t+"-"+e:e}function zie(e,t){k.useContext(FD).strict}function Lie(e){const{drag:t,layout:n}=Bu;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Fie(e,t){if(typeof Proxy>"u")return E1;const n=new Map,r=(s,l)=>E1(s,l,e,t),o=(s,l)=>r(s,l);return new Proxy(o,{get:(s,l)=>l==="create"?r:(n.has(l)||n.set(l,E1(l,void 0,e,t)),n.get(l))})}function JD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Uie({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vie(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function C1(e){return e===void 0||e===1}function Mw({scale:e,scaleX:t,scaleY:n}){return!C1(e)||!C1(t)||!C1(n)}function Ll(e){return Mw(e)||e$(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function e$(e){return x5(e.x)||x5(e.y)}function x5(e){return e&&e!=="0%"}function by(e,t,n){const r=e-n,o=t*r;return n+o}function _5(e,t,n,r,o){return o!==void 0&&(e=by(e,o,r)),by(e,n,r)+t}function jw(e,t=0,n=1,r,o){e.min=_5(e.min,t,n,r,o),e.max=_5(e.max,t,n,r,o)}function t$(e,{x:t,y:n}){jw(e.x,t.translate,t.scale,t.originPoint),jw(e.y,n.translate,n.scale,n.originPoint)}const E5=.999999999999,C5=1.0000000000001;function qie(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,l;for(let c=0;c<o;c++){s=n[c],l=s.projectionDelta;const{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vu(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,t$(e,l)),r&&Ll(s.latestValues)&&vu(e,s.latestValues))}t.x<C5&&t.x>E5&&(t.x=1),t.y<C5&&t.y>E5&&(t.y=1)}function yu(e,t){e.min=e.min+t,e.max=e.max+t}function T5(e,t,n,r,o=.5){const s=Yn(e.min,e.max,o);jw(e,t,n,s,r)}function vu(e,t){T5(e.x,t.x,t.scaleX,t.scale,t.originX),T5(e.y,t.y,t.scaleY,t.scale,t.originY)}function n$(e,t){return JD(Vie(e.getBoundingClientRect(),t))}function Bie(e,t,n){const r=n$(e,n),{scroll:o}=t;return o&&(yu(r.x,o.offset.x),yu(r.y,o.offset.y)),r}const R5=()=>({translate:0,scale:1,origin:0,originPoint:0}),bu=()=>({x:R5(),y:R5()}),O5=()=>({min:0,max:0}),Cr=()=>({x:O5(),y:O5()}),Pw={current:null},r$={current:!1};function Hie(){if(r$.current=!0,!!L_)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pw.current=e.matches;e.addEventListener("change",t),t()}else Pw.current=!1}const Kie=new WeakMap;function Gie(e,t,n){for(const r in t){const o=t[r],s=n[r];if(Xr(o))e.addValue(r,o);else if(Xr(s))e.addValue(r,qu(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(r);e.addValue(r,qu(l!==void 0?l:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const A5=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Zie{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=yo.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Zn.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=g0(n),this.isVariantNode=VD(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const b=p[g];u[g]!==void 0&&Xr(b)&&b.set(u[g])}}mount(t){this.current=t,Kie.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(r$.current||Hie(),this.shouldReduceMotion=Pw.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ba(this.notifyUpdate),Ba(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=yf.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Zn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Bu){const n=Bu[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Cr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<A5.length;r++){const o=A5[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,l=t[s];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=Gie(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=qu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(ZN(r)||YN(r))?r=parseFloat(r):!sie(r)&&Ha.test(n)&&(r=jD(t,n)),this.setBaseTarget(t,Xr(r)?r.get():r)),Xr(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=dE(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Xr(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new H_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){iE.render(this.render)}}class o$ extends Zie{constructor(){super(...arguments),this.KeyframeResolver=Zoe}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Xr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function i$(e,{style:t,vars:n},r,o){const s=e.style;let l;for(l in t)s[l]=t[l];o?.applyProjectionStyles(s,r);for(l in n)s.setProperty(l,n[l])}function Wie(e){return window.getComputedStyle(e)}class Yie extends o${constructor(){super(...arguments),this.type="html",this.renderInstance=i$}readValueFromInstance(t,n){if(yf.has(n))return this.projection?.isProjecting?_w(n):hoe(t,n);{const r=Wie(t),o=(uD(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return n$(t,n)}build(t,n,r){cE(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return hE(t,n,r)}}const s$=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 Xie(e,t,n,r){i$(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(s$.has(o)?o:pE(o),t.attrs[o])}class Qie extends o${constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Cr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yf.has(n)){const r=MD(n);return r&&r.default||0}return n=s$.has(n)?n:pE(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return WD(t,n,r)}build(t,n,r){HD(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){Xie(t,n,r,o)}mount(t){this.isSVGTag=GD(t.tagName),super.mount(t)}}const Jie=(e,t)=>t.isSVG??fE(e)?new Qie(t):new Yie(t,{allowProjection:e!==k.Fragment});function Cu(e,t,n){const r=e.getProps();return dE(r,t,n!==void 0?n:r.custom,e)}const Nw=e=>Array.isArray(e);function ese(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qu(n))}function tse(e){return Nw(e)?e[e.length-1]||0:e}function nse(e,t){const n=Cu(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const l in s){const c=tse(s[l]);ese(e,l,c)}}function rse(e){return!!(Xr(e)&&e.add)}function Dw(e,t){const n=e.getValue("willChange");if(rse(n))return n.add(t);if(!n&&Ns.WillChange){const r=new Ns.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function a$(e){return e.props[YD]}const ose=e=>e!==null;function ise(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(ose),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const sse={type:"spring",stiffness:500,damping:25,restSpeed:10},ase=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lse={type:"keyframes",duration:.8},cse={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},use=(e,{keyframes:t})=>t.length>2?lse:yf.has(e)?e.startsWith("scale")?ase(t[1]):sse:cse;function fse({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:l,repeatDelay:c,from:u,elapsed:d,...h}){return!!Object.keys(h).length}const mE=(e,t,n,r={},o,s)=>l=>{const c=rE(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ki(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:g=>{t.set(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:o};fse(c)||Object.assign(h,use(e,h)),h.duration&&(h.duration=Ki(h.duration)),h.repeatDelay&&(h.repeatDelay=Ki(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(Ow(h),h.delay===0&&(p=!0)),(Ns.instantAnimations||Ns.skipAnimations)&&(p=!0,Ow(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,p&&!s&&t.get()!==void 0){const g=ise(h.keyframes,c);if(g!==void 0){Zn.update(()=>{h.onUpdate(g),h.onComplete()});return}}return c.isSync?new tE(h):new $oe(h)};function dse({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function l$(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(s=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const h in c){const p=e.getValue(h,e.latestValues[h]??null),g=c[h];if(g===void 0||d&&dse(d,h))continue;const b={delay:n,...rE(s||{},h)},y=p.get();if(y!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===y&&!b.velocity)continue;let _=!1;if(window.MotionHandoffAnimation){const w=a$(e);if(w){const v=window.MotionHandoffAnimation(w,h,Zn);v!==null&&(b.startTime=v,_=!0)}}Dw(e,h),p.start(mE(h,p,g,e.shouldReduceMotion&&OD.has(h)?{type:!1}:b,e,_));const x=p.animation;x&&u.push(x)}return l&&Promise.all(u).then(()=>{Zn.update(()=>{l&&nse(e,l)})}),u}function c$(e,t,n,r=0,o=1){const s=Array.from(e).sort((d,h)=>d.sortNodePosition(h)).indexOf(t),l=e.size,c=(l-1)*r;return typeof n=="function"?n(s,l):o===1?s*r:c-s*r}function $w(e,t,n={}){const r=Cu(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(l$(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=o;return hse(e,t,u,d,h,p,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,d]=c==="beforeChildren"?[s,l]:[l,s];return u().then(()=>d())}else return Promise.all([s(),l(n.delay)])}function hse(e,t,n=0,r=0,o=0,s=1,l){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push($w(u,t,{...l,delay:n+(typeof r=="function"?0:r)+c$(e.variantChildren,u,r,o,s)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function pse(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>$w(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=$w(e,t,n);else{const o=typeof t=="function"?Cu(e,t,n.custom):t;r=Promise.all(l$(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function u$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const mse=lE.length;function f$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?f$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<mse;n++){const r=lE[n],o=e.props[r];(fh(o)||o===!1)&&(t[r]=o)}return t}const gse=[...aE].reverse(),yse=aE.length;function vse(e){return t=>Promise.all(t.map(({animation:n,options:r})=>pse(e,n,r)))}function bse(e){let t=vse(e),n=k5(),r=!0;const o=u=>(d,h)=>{const p=Cu(e,h,u==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:g,transitionEnd:b,...y}=p;d={...d,...y,...b}}return d};function s(u){t=u(e)}function l(u){const{props:d}=e,h=f$(e.parent)||{},p=[],g=new Set;let b={},y=1/0;for(let x=0;x<yse;x++){const w=gse[x],v=n[w],C=d[w]!==void 0?d[w]:h[w],S=fh(C),T=w===u?v.isActive:null;T===!1&&(y=x);let E=C===h[w]&&C!==d[w]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...b},!v.isActive&&T===null||!C&&!v.prevProp||m0(C)||typeof C=="boolean")continue;const O=Sse(v.prevProp,C);let M=O||w===u&&v.isActive&&!E&&S||x>y&&S,P=!1;const I=Array.isArray(C)?C:[C];let z=I.reduce(o(w),{});T===!1&&(z={});const{prevResolvedValues:U={}}=v,G={...U,...z},J=H=>{M=!0,g.has(H)&&(P=!0,g.delete(H)),v.needsAnimating[H]=!0;const Y=e.getValue(H);Y&&(Y.liveStyle=!1)};for(const H in G){const Y=z[H],oe=U[H];if(b.hasOwnProperty(H))continue;let ne=!1;Nw(Y)&&Nw(oe)?ne=!u$(Y,oe):ne=Y!==oe,ne?Y!=null?J(H):g.add(H):Y!==void 0&&g.has(H)?J(H):v.protectedKeys[H]=!0}v.prevProp=C,v.prevResolvedValues=z,v.isActive&&(b={...b,...z}),r&&e.blockInitialAnimation&&(M=!1);const ee=E&&O;M&&(!ee||P)&&p.push(...I.map(H=>{const Y={type:w};if(typeof H=="string"&&r&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,ne=Cu(oe,H);if(oe.enteringChildren&&ne){const{delayChildren:$}=ne.transition||{};Y.delay=c$(oe.enteringChildren,e,$)}}return{animation:H,options:Y}}))}if(g.size){const x={};if(typeof d.initial!="boolean"){const w=Cu(e,Array.isArray(d.initial)?d.initial[0]:d.initial);w&&w.transition&&(x.transition=w.transition)}g.forEach(w=>{const v=e.getBaseTarget(w),C=e.getValue(w);C&&(C.liveStyle=!0),x[w]=v??null}),p.push({animation:x})}let _=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(p):Promise.resolve()}function c(u,d){if(n[u].isActive===d)return Promise.resolve();e.variantChildren?.forEach(p=>p.animationState?.setActive(u,d)),n[u].isActive=d;const h=l(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=k5()}}}function Sse(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!u$(t,e):!1}function Dl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function k5(){return{animate:Dl(!0),whileInView:Dl(),whileHover:Dl(),whileTap:Dl(),whileDrag:Dl(),whileFocus:Dl(),exit:Dl()}}class nl{constructor(t){this.isMounted=!1,this.node=t}update(){}}class wse extends nl{constructor(t){super(t),t.animationState||(t.animationState=bse(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();m0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let xse=0;class _se extends nl{constructor(){super(...arguments),this.id=xse++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Ese={animation:{Feature:wse},exit:{Feature:_se}};function dh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Hh(e){return{point:{x:e.pageX,y:e.pageY}}}const Cse=e=>t=>sE(t)&&e(t,Hh(t));function Ud(e,t,n,r){return dh(e,t,Cse(n),r)}const d$=1e-4,Tse=1-d$,Rse=1+d$,h$=.01,Ose=0-h$,Ase=0+h$;function ao(e){return e.max-e.min}function kse(e,t,n){return Math.abs(e-t)<=n}function M5(e,t,n,r=.5){e.origin=r,e.originPoint=Yn(t.min,t.max,e.origin),e.scale=ao(n)/ao(t),e.translate=Yn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Tse&&e.scale<=Rse||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ose&&e.translate<=Ase||isNaN(e.translate))&&(e.translate=0)}function Vd(e,t,n,r){M5(e.x,t.x,n.x,r?r.originX:void 0),M5(e.y,t.y,n.y,r?r.originY:void 0)}function j5(e,t,n){e.min=n.min+t.min,e.max=e.min+ao(t)}function Mse(e,t,n){j5(e.x,t.x,n.x),j5(e.y,t.y,n.y)}function P5(e,t,n){e.min=t.min-n.min,e.max=e.min+ao(t)}function Sy(e,t,n){P5(e.x,t.x,n.x),P5(e.y,t.y,n.y)}function Xo(e){return[e("x"),e("y")]}const p$=({current:e})=>e?e.ownerDocument.defaultView:null,N5=(e,t)=>Math.abs(e-t);function jse(e,t){const n=N5(e.x,t.x),r=N5(e.y,t.y);return Math.sqrt(n**2+r**2)}class m${constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=R1(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,y=jse(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!y)return;const{point:_}=g,{timestamp:x}=Fr;this.history.push({..._,timestamp:x});const{onStart:w,onMove:v}=this.handlers;b||(w&&w(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,g)},this.handlePointerMove=(g,b)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=T1(b,this.transformPagePoint),Zn.update(this.updatePoint,!0)},this.handlePointerUp=(g,b)=>{this.end();const{onEnd:y,onSessionEnd:_,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=R1(g.type==="pointercancel"?this.lastMoveEventInfo:T1(b,this.transformPagePoint),this.history);this.startEvent&&y&&y(g,w),_&&_(g,w)},!sE(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=o||window;const c=Hh(t),u=T1(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=Fr;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,R1(u,this.history)),this.removeListeners=Vh(Ud(this.contextWindow,"pointermove",this.handlePointerMove),Ud(this.contextWindow,"pointerup",this.handlePointerUp),Ud(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ba(this.updatePoint)}}function T1(e,t){return t?{point:t(e.point)}:e}function D5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function R1({point:e},t){return{point:e,delta:D5(e,g$(t)),offset:D5(e,Pse(t)),velocity:Nse(t,.1)}}function Pse(e){return e[0]}function g$(e){return e[e.length-1]}function Nse(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=g$(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ki(t)));)n--;if(!r)return{x:0,y:0};const s=ti(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function Dse(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Yn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Yn(n,e,r.max):Math.min(e,n)),e}function $5(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function $se(e,{top:t,left:n,bottom:r,right:o}){return{x:$5(e.x,n,o),y:$5(e.y,t,r)}}function I5(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Ise(e,t){return{x:I5(e.x,t.x),y:I5(e.y,t.y)}}function zse(e,t){let n=.5;const r=ao(e),o=ao(t);return o>r?n=lh(t.min,t.max-r,e.min):r>o&&(n=lh(e.min,e.max-o,t.min)),Ps(0,1,n)}function Lse(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Iw=.35;function Fse(e=Iw){return e===!1?e=0:e===!0&&(e=Iw),{x:z5(e,"left","right"),y:z5(e,"top","bottom")}}function z5(e,t,n){return{min:L5(e,t),max:L5(e,n)}}function L5(e,t){return typeof e=="number"?e:e[t]||0}const Use=new WeakMap;class Vse{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Cr(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=p=>{n?(this.stopAnimation(),this.snapToCursor(Hh(p).point)):this.pauseAnimation()},l=(p,g)=>{this.stopAnimation();const{drag:b,dragPropagation:y,onDragStart:_}=this.getProps();if(b&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Joe(b),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xo(w=>{let v=this.getAxisMotionValue(w).get()||0;if(Gi.test(v)){const{projection:C}=this.visualElement;if(C&&C.layout){const S=C.layout.layoutBox[w];S&&(v=ao(S)*(parseFloat(v)/100))}}this.originPoint[w]=v}),_&&Zn.postRender(()=>_(p,g)),Dw(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},c=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:b,dragDirectionLock:y,onDirectionLock:_,onDrag:x}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:w}=g;if(y&&this.currentDirection===null){this.currentDirection=qse(w),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",g.point,w),this.updateAxis("y",g.point,w),this.visualElement.render(),x&&x(p,g)},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>Xo(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:h}=this.getProps();this.panSession=new m$(t,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:p$(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!r)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Zn.postRender(()=>c(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!ug(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=Dse(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&kd(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=$se(r.layoutBox,t):this.constraints=!1,this.elastic=Fse(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Xo(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Lse(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!kd(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=Bie(r,o.root,this.visualElement.getTransformPagePoint());let l=Ise(o.layout.layoutBox,s);if(n){const c=n(Uie(l));this.hasMutatedConstraints=!!c,c&&(l=JD(c))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=Xo(h=>{if(!ug(h,n,this.currentDirection))return;let p=u&&u[h]||{};l&&(p={min:0,max:0});const g=o?200:1e6,b=o?40:1e7,y={type:"inertia",velocity:r?t[h]:0,bounceStiffness:g,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(h,y)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Dw(this.visualElement,t),r.start(mE(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xo(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xo(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xo(n=>{const{drag:r}=this.getProps();if(!ug(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:c}=o.layout.layoutBox[n],u=s.get()||0;s.set(t[n]-Yn(l,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!kd(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xo(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();o[l]=zse({min:u,max:u},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xo(l=>{if(!ug(l,t,null))return;const c=this.getAxisMotionValue(l),{min:u,max:d}=this.constraints[l];c.set(Yn(u,d,o[l]))})}addListeners(){if(!this.visualElement.current)return;Use.set(this.visualElement,this);const t=this.visualElement.current,n=Ud(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&!ID(u.target)&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();kd(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Zn.read(r);const l=dh(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Xo(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:l=Iw,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:l,dragMomentum:c}}}function ug(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qse(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Bse extends nl{constructor(t){super(t),this.removeGroupControls=oi,this.removeListeners=oi,this.controls=new Vse(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||oi}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const F5=e=>(t,n)=>{e&&Zn.postRender(()=>e(t,n))};class Hse extends nl{constructor(){super(...arguments),this.removePointerDownListener=oi}onPointerDown(t){this.session=new m$(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:p$(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:F5(t),onStart:F5(n),onMove:r,onEnd:(s,l)=>{delete this.session,o&&Zn.postRender(()=>o(s,l))}}}mount(){this.removePointerDownListener=Ud(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const zg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let O1=!1;class Kse extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),O1&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),zg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:l}=r;return l&&(l.isPresent=s,O1=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Zn.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),iE.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;O1=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function y$(e){const[t,n]=aie(),r=k.useContext(GN);return j.jsx(Kse,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(XD),isPresent:t,safeToRemove:n})}function Gse(e,t,n){const r=Xr(e)?e:qu(e);return r.start(mE("",r,t,n)),r.animation}const Zse=(e,t)=>e.depth-t.depth;class Wse{constructor(){this.children=[],this.isDirty=!1}add(t){U_(this.children,t),this.isDirty=!0}remove(t){V_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Zse),this.isDirty=!1,this.children.forEach(t)}}function Yse(e,t){const n=yo.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Ba(r),e(s-t))};return Zn.setup(r,!0),()=>Ba(r)}const v$=["TopLeft","TopRight","BottomLeft","BottomRight"],Xse=v$.length,U5=e=>typeof e=="string"?parseFloat(e):e,V5=e=>typeof e=="number"||Ye.test(e);function Qse(e,t,n,r,o,s){o?(e.opacity=Yn(0,n.opacity??1,Jse(r)),e.opacityExit=Yn(t.opacity??1,0,eae(r))):s&&(e.opacity=Yn(t.opacity??1,n.opacity??1,r));for(let l=0;l<Xse;l++){const c=`border${v$[l]}Radius`;let u=q5(t,c),d=q5(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||V5(u)===V5(d)?(e[c]=Math.max(Yn(U5(u),U5(d),r),0),(Gi.test(d)||Gi.test(u))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=Yn(t.rotate||0,n.rotate||0,r))}function q5(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Jse=b$(0,.5,oD),eae=b$(.5,.95,oi);function b$(e,t,n){return r=>r<e?0:r>t?1:n(lh(e,t,r))}function B5(e,t){e.min=t.min,e.max=t.max}function wi(e,t){B5(e.x,t.x),B5(e.y,t.y)}function H5(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function K5(e,t,n,r,o){return e-=t,e=by(e,1/n,r),o!==void 0&&(e=by(e,1/o,r)),e}function tae(e,t=0,n=1,r=.5,o,s=e,l=e){if(Gi.test(t)&&(t=parseFloat(t),t=Yn(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=Yn(s.min,s.max,r);e===s&&(c-=t),e.min=K5(e.min,t,n,c,o),e.max=K5(e.max,t,n,c,o)}function G5(e,t,[n,r,o],s,l){tae(e,t[n],t[r],t[o],t.scale,s,l)}const nae=["x","scaleX","originX"],rae=["y","scaleY","originY"];function Z5(e,t,n,r){G5(e.x,t,nae,n?n.x:void 0,r?r.x:void 0),G5(e.y,t,rae,n?n.y:void 0,r?r.y:void 0)}function W5(e){return e.translate===0&&e.scale===1}function S$(e){return W5(e.x)&&W5(e.y)}function Y5(e,t){return e.min===t.min&&e.max===t.max}function oae(e,t){return Y5(e.x,t.x)&&Y5(e.y,t.y)}function X5(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function w$(e,t){return X5(e.x,t.x)&&X5(e.y,t.y)}function Q5(e){return ao(e.x)/ao(e.y)}function J5(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class iae{constructor(){this.members=[]}add(t){U_(this.members,t),t.scheduleRender()}remove(t){if(V_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function sae(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,l=n?.z||0;if((o||s||l)&&(r=`translate3d(${o}px, ${s}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:p,rotateY:g,skewX:b,skewY:y}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),b&&(r+=`skewX(${b}deg) `),y&&(r+=`skewY(${y}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const A1=["","X","Y","Z"],aae=1e3;let lae=0;function k1(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function x$(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=a$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Zn,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&x$(r)}function _$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(l={},c=t?.()){this.id=lae++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(fae),this.nodes.forEach(mae),this.nodes.forEach(gae),this.nodes.forEach(dae)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Wse)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new H_),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const u=this.eventHandlers.get(l);u&&u.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=zD(l)&&!oie(l),this.instance=l;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let h,p=0;const g=()=>this.root.updateBlockedByResize=!1;Zn.read(()=>{p=window.innerWidth}),e(l,()=>{const b=window.innerWidth;b!==p&&(p=b,this.root.updateBlockedByResize=!0,h&&h(),h=Yse(g,250),zg.hasAnimatedSinceResize&&(zg.hasAnimatedSinceResize=!1,this.nodes.forEach(nM)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||wae,{onLayoutAnimationStart:_,onLayoutAnimationComplete:x}=d.getProps(),w=!this.targetLayout||!w$(this.targetLayout,b),v=!p&&g;if(this.options.layoutRoot||this.resumeFrom||v||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...rE(y,"layout"),onPlay:_,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(h,v)}else p||nM(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ba(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yae),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&x$(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(eM);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(tM);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(pae),this.nodes.forEach(cae),this.nodes.forEach(uae)):this.nodes.forEach(tM),this.clearAllSnapshots();const c=yo.now();Fr.delta=Ps(0,1e3/60,c-Fr.timestamp),Fr.timestamp=c,Fr.isProcessing=!0,v1.update.process(Fr),v1.preRender.process(Fr),v1.render.process(Fr),Fr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,iE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hae),this.sharedNodes.forEach(vae)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Zn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Zn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ao(this.snapshot.measuredBox.x)&&!ao(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Cr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!S$(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;l&&this.instance&&(c||Ll(this.latestValues)||h)&&(o(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return l&&(u=this.removeTransform(u)),xae(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return Cr();const c=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(_ae))){const{scroll:d}=this.root;d&&(yu(c.x,d.offset.x),yu(c.y,d.offset.y))}return c}removeElementScroll(l){const c=Cr();if(wi(c,l),this.scroll?.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:p}=d;d!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&wi(c,l),yu(c.x,h.offset.x),yu(c.y,h.offset.y))}return c}applyTransform(l,c=!1){const u=Cr();wi(u,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&vu(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Ll(h.latestValues)&&vu(u,h.latestValues)}return Ll(this.latestValues)&&vu(u,this.latestValues),u}removeTransform(l){const c=Cr();wi(c,l);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!Ll(d.latestValues))continue;Mw(d.latestValues)&&d.updateSnapshot();const h=Cr(),p=d.measurePageBox();wi(h,p),Z5(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return Ll(this.latestValues)&&Z5(c,this.latestValues),c}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Fr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(l||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!this.layout||!(h||p))return;this.resolvedRelativeTargetAt=Fr.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Cr(),this.targetWithTransforms=Cr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Mse(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):wi(this.target,this.layout.layoutBox),t$(this.target,this.targetDelta)):wi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Mw(this.parent.latestValues)||e$(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,c,u){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Cr(),this.relativeTargetOrigin=Cr(),Sy(this.relativeTargetOrigin,c,u),wi(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Fr.timestamp&&(u=!1),u)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;wi(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;qie(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Cr());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(H5(this.prevProjectionDelta.x,this.projectionDelta.x),H5(this.prevProjectionDelta.y,this.projectionDelta.y)),Vd(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!J5(this.projectionDelta.x,this.prevProjectionDelta.x)||!J5(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=bu(),this.projectionDelta=bu(),this.projectionDeltaWithTransform=bu()}setAnimationOrigin(l,c=!1){const u=this.snapshot,d=u?u.latestValues:{},h={...this.latestValues},p=bu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=Cr(),b=u?u.source:void 0,y=this.layout?this.layout.source:void 0,_=b!==y,x=this.getStack(),w=!x||x.members.length<=1,v=!!(_&&!w&&this.options.crossfade===!0&&!this.path.some(Sae));this.animationProgress=0;let C;this.mixTargetDelta=S=>{const T=S/1e3;rM(p.x,l.x,T),rM(p.y,l.y,T),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Sy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bae(this.relativeTarget,this.relativeTargetOrigin,g,T),C&&oae(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Cr()),wi(C,this.relativeTarget)),_&&(this.animationValues=h,Qse(h,d,this.latestValues,T,v,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ba(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Zn.update(()=>{zg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=qu(0)),this.currentAnimation=Gse(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),l.onUpdate&&l.onUpdate(c)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(aae),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:u,layout:d,latestValues:h}=l;if(!(!c||!u||!d)){if(this!==l&&this.layout&&d&&E$(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||Cr();const p=ao(this.layout.layoutBox.x);u.x.min=l.target.x.min,u.x.max=u.x.min+p;const g=ao(this.layout.layoutBox.y);u.y.min=l.target.y.min,u.y.max=u.y.min+g}wi(c,u),vu(c,h),Vd(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new iae),this.sharedNodes.get(l).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:u}=l;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const d={};u.z&&k1("z",l,d,this.animationValues);for(let h=0;h<A1.length;h++)k1(`rotate${A1[h]}`,l,d,this.animationValues),k1(`skew${A1[h]}`,l,d,this.animationValues);l.render();for(const h in d)l.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=Ig(c?.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=Ig(c?.pointerEvents)||""),this.hasProjected&&!Ll(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1);return}l.visibility="";const h=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=sae(this.projectionDeltaWithTransform,this.treeScale,h);u&&(p=u(h,p)),l.transform=p;const{x:g,y:b}=this.projectionDelta;l.transformOrigin=`${g.origin*100}% ${b.origin*100}% 0`,d.animationValues?l.opacity=d===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in kw){if(h[y]===void 0)continue;const{correct:_,applyTo:x,isCSSVariable:w}=kw[y],v=p==="none"?h[y]:_(h[y],d);if(x){const C=x.length;for(let S=0;S<C;S++)l[x[S]]=v}else w?this.options.visualElement.renderState.vars[y]=v:l[y]=v}this.options.layoutId&&(l.pointerEvents=d===this?Ig(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(eM),this.root.sharedNodes.clear()}}}function cae(e){e.updateLayout()}function uae(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?Xo(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],g=ao(p);p.min=n[h].min,p.max=p.min+g}):E$(o,t.layoutBox,n)&&Xo(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],g=ao(n[h]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const l=bu();Vd(l,n,t.layoutBox);const c=bu();s?Vd(c,e.applyTransform(r,!0),t.measuredBox):Vd(c,n,t.layoutBox);const u=!S$(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:g}=h;if(p&&g){const b=Cr();Sy(b,t.layoutBox,p.layoutBox);const y=Cr();Sy(y,n,g.layoutBox),w$(b,y)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function fae(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function dae(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hae(e){e.clearSnapshot()}function eM(e){e.clearMeasurements()}function tM(e){e.isLayoutDirty=!1}function pae(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function mae(e){e.resolveTargetDelta()}function gae(e){e.calcProjection()}function yae(e){e.resetSkewAndRotation()}function vae(e){e.removeLeadSnapshot()}function rM(e,t,n){e.translate=Yn(t.translate,0,n),e.scale=Yn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oM(e,t,n,r){e.min=Yn(t.min,n.min,r),e.max=Yn(t.max,n.max,r)}function bae(e,t,n,r){oM(e.x,t.x,n.x,r),oM(e.y,t.y,n.y,r)}function Sae(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const wae={duration:.45,ease:[.4,0,.1,1]},iM=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sM=iM("applewebkit/")&&!iM("chrome/")?Math.round:oi;function aM(e){e.min=sM(e.min),e.max=sM(e.max)}function xae(e){aM(e.x),aM(e.y)}function E$(e,t,n){return e==="position"||e==="preserve-aspect"&&!kse(Q5(t),Q5(n),.2)}function _ae(e){return e!==e.root&&e.scroll?.wasRoot}const Eae=_$({attachResizeListener:(e,t)=>dh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),M1={current:void 0},C$=_$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!M1.current){const e=new Eae({});e.mount(window),e.setOptions({layoutScroll:!0}),M1.current=e}return M1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Cae={pan:{Feature:Hse},drag:{Feature:Bse,ProjectionNode:C$,MeasureLayout:y$}};function lM(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&Zn.postRender(()=>s(t,Hh(t)))}class Tae extends nl{mount(){const{current:t}=this.node;t&&(this.unmount=eie(t,(n,r)=>(lM(this.node,r,"Start"),o=>lM(this.node,o,"End"))))}unmount(){}}class Rae extends nl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vh(dh(this.node.current,"focus",()=>this.onFocus()),dh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function cM(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&Zn.postRender(()=>s(t,Hh(t)))}class Oae extends nl{mount(){const{current:t}=this.node;t&&(this.unmount=rie(t,(n,r)=>(cM(this.node,r,"Start"),(o,{success:s})=>cM(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const zw=new WeakMap,j1=new WeakMap,Aae=e=>{const t=zw.get(e.target);t&&t(e)},kae=e=>{e.forEach(Aae)};function Mae({root:e,...t}){const n=e||document;j1.has(n)||j1.set(n,{});const r=j1.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(kae,{root:e,...t})),r[o]}function jae(e,t,n){const r=Mae(t);return zw.set(e,n),r.observe(e),()=>{zw.delete(e),r.unobserve(e)}}const Pae={some:0,all:1};class Nae extends nl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Pae[o]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,s&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),g=d?h:p;g&&g(u)};return jae(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Dae(t,n))&&this.startObserver()}unmount(){}}function Dae({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $ae={inView:{Feature:Nae},tap:{Feature:Oae},focus:{Feature:Rae},hover:{Feature:Tae}},Iae={layout:{ProjectionNode:C$,MeasureLayout:y$}},zae={...Ese,...$ae,...Cae,...Iae},uM=Fie(zae,Jie),T$=ko.memo(({className:e})=>{const t=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"];return j.jsx("div",{className:pn("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:j.jsxs("svg",{className:"z-0 h-full w-full pointer-events-none absolute",width:"100%",height:"100%",viewBox:"0 0 696 316",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[j.jsx("title",{children:"Background Beams"}),j.jsx("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),t.map((n,r)=>j.jsx(uM.path,{d:n,stroke:`url(#linearGradient-${r})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${r}`)),j.jsxs("defs",{children:[t.map((n,r)=>j.jsxs(uM.linearGradient,{id:`linearGradient-${r}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:"easeInOut",repeat:1/0,delay:0},children:[j.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),j.jsx("stop",{stopColor:"#111111"}),j.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),j.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${r}`)),j.jsxs("radialGradient",{id:"paint0_radial_242_278",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",children:[j.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),j.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),j.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});T$.displayName="BackgroundBeams";const Lae=()=>j.jsxs(j.Fragment,{children:[j.jsx(T$,{className:"absolute inset-0"}),j.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:j.jsxs("div",{className:"text-center",children:[j.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),j.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Bt(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Fae(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Bt(e.additionalItems)}function fM(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const Ms="__additional_property",wy="additionalProperties",Ka="allOf",Kt="anyOf",ai="const",y0="default",gE="dependencies",Uae="enum",qr="__errors",_n="$id",Vae="if",Hu="items",qae="_$junk_option_schema_id$_",Lg="$name",Mt="oneOf",Lw="patternProperties",nn="properties",P1="readonly",R$="required",xy="submitButtonOptions",In="$ref",Md="$schema",O$="root",A$="_",Bae=["discriminator","propertyName"],dM="formContext",Hae="layoutGridLookupMap",yE="__rjsf_additionalProperties",k$="__rjsf_rootSchema",Kae="ui:field",vE="ui:widget",ja="ui:options",Fw="ui:globalOptions",Gae="https://json-schema.org/draft/2019-09/schema",Fg="https://json-schema.org/draft/2020-12/schema";function ct(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const o=e[r];return r===vE&&Bt(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===ja&&Bt(o)?{...n,...o}:{...n,[r.substring(3)]:o}},{...t}):{...t}}function M$(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=ct(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function Uw(e){const t={[qr]:[],addError(n){this[qr].push(n)}};if(Array.isArray(e))return e.reduce((n,r,o)=>({...n,[o]:Uw(r)}),t);if(La(e)){const n=e;return Object.keys(n).reduce((r,o)=>({...r,[o]:Uw(n[o])}),t)}return t}function An(e,t){return nK(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}const Zae=Object.prototype;function jd(e){for(const t in e)if(Zae.hasOwnProperty.call(e,t))return!1;return!0}const Wae=["array","boolean","integer","null","number","object","string"];new Set(Wae);const Yae=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Yae);const Xae=["items","allOf","oneOf","anyOf"];new Set(Xae);const Qae=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Qae);function Ug(e){return typeof e=="object"}function zi(e){return Ug(e)?jd(e):e===!0}function Su(e,t){return e<t?-1:e>t?1:0}function N1(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const s=e;e=t,t=s,r=n}const o=new Set(e);for(let s=0;s<r;s++)o.add(t[s]);return Array.from(o)}function Jae(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const o=e;e=t,t=o}const r=new Set(t);for(let o=0;o<e.length&&r.size>0;o++){const s=e[o];r.delete(s)&&n.push(s)}return n}function hM(e){return e.length===0}function D1(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){const s=e(t[o],n[o]);if(s!==0)return s}return 0}}function j$(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const l=[];let c=0;e:for(let u=0;u<r;u++){const d=n[u];for(let h=0;h<c;h++)if(e(d,l[h])===0)continue e;c=l.push(d)}return l}const o=n.slice().sort(e);let s=0;for(let l=1;l<r;l++)e(o[s],o[l])!==0&&++s!==l&&(o[s]=o[l]);return o.length=s+1,o}}function ele(e){return(t,n)=>{const r=[];let o=t.length,s=n.length;if(o===0||s===0)return r;if(o>s){const h=t;t=n,n=h;const p=o;o=s,s=p}const l=[...t].sort(e),c=[...n].sort(e);let u=0,d=0;for(;u<o&&d<s;){const h=e(l[u],c[d]);h===0?((r.length===0||e(r[r.length-1],l[u])!==0)&&r.push(l[u]),u++,d++):h<0?u++:d++}return r}}function tle(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const pM=tle,P$=()=>0,nle=e=>e===void 0,rle=e=>typeof e!="object",mM={boolean:0,number:1,string:2};function ole(e,t){const n=typeof e,r=typeof t;return n===r?Su(e,t):mM[n]-mM[r]}function ile(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const l=e;e=t,t=l}const o=new Set(e),s=t.length;for(let l=0;l<s;l++){const c=t[l];o.has(c)||e.push(c)}return e}function v0(e,t,n=P$){return(r,o)=>e(r)?e(o)?n(r,o):-1:e(o)?1:t(r,o)}function lu(e){return v0(nle,e)}function xa(e,t){return v0(n=>n===void 0||e(n),t)}function $1(e,t){return v0(Array.isArray,e,t)}const gr=lu(Su),I1=xa(e=>e===0,(e,t)=>e-t);function sle({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=pM(t,_=>Object.keys(_).sort());function r(_){return(x,w)=>{const v=n(x),C=n(w),S=Math.min(v.length,C.length);for(let T=0;T<S;T++){const E=Su(v[T],C[T]);if(E!==0)return E}if(v.length!==C.length)return v.length-C.length;for(let T=0;T<S;T++){const E=v[T],O=_(x[E],w[E]);if(O!==0)return O}return 0}}function o(_){const x=D1(_),w=pM(e,j$(_,{threshold:0}));return(v,C)=>x(w(v),w(C))}const s=o(Su);function l(_,x){if(Ug(_)){if(Ug(x)){const w=Object.keys(_),v=Object.keys(x),C=ile(w,v),S=C.length;for(let T=0;T<S;T++){const E=C[T];if(_[E]===x[E])continue;const M=(y[E]??c)(_[E],x[E]);if(M!==0)return M}return 0}return x===!0&&jd(_)?0:1}return Ug(x)?_===!0&&jd(x)?0:-1:Su(_,x)}const c=lu(d),u=v0(rle,$1(r(c),D1(d)),ole);function d(_,x){return _===null?-1:x===null?1:u(_,x)}const h=lu(l),p=xa(jd,r(h)),g=lu(o(l)),b=xa(zi,l),y={$id:gr,$comment:gr,$defs:p,$ref:gr,$schema:gr,const:c,contains:h,contentEncoding:gr,contentMediaType:gr,default:c,definitions:p,description:gr,else:h,examples:c,exclusiveMaximum:gr,exclusiveMinimum:gr,format:gr,if:h,maximum:gr,maxItems:gr,maxLength:gr,maxProperties:gr,minimum:gr,multipleOf:gr,not:h,pattern:gr,propertyNames:h,readOnly:gr,then:h,title:gr,writeOnly:gr,uniqueItems:xa(_=>_===!1,P$),minLength:I1,minItems:I1,minProperties:I1,required:xa(hM,s),enum:xa(hM,o(d)),type:lu((_,x)=>{const w=Array.isArray(_),v=Array.isArray(x);return!w&&!v?Su(_,x):s(w?_:[_],v?x:[x])}),items:xa(_=>!Array.isArray(_)&&zi(_),$1(l,D1(l))),anyOf:g,allOf:g,oneOf:g,properties:p,patternProperties:p,additionalProperties:b,additionalItems:b,dependencies:xa(jd,r(lu($1(l,s))))};return{compareSchemaValues:d,compareSchemaDefinitions:l}}function gM(e){return e}const N$=(e,t)=>e?N$(t%e,e):t,ale=(e,t)=>Math.abs(e*t)/N$(e,t);function lle(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*z1(e,t,n){const r=e.length,o=t.length;if(r>0&&o>0)for(let s=0;s<r;s++){const l=e[s];for(let c=0;c<o;c++)yield n(l,t[c])}}function L1(e,t){return e||t}function yM(e){return(t,n)=>{const r={...t},o=Object.keys(n),s=o.length;for(let l=0;l<s;l++){const c=o[l];r[c]=t[c]===void 0?n[c]:e(t[c],n[c])}return r}}function cle(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function $l(e,t,n){n===void 0||zi(n)?delete e[t]:e[t]=n}const ule=["properties","patternProperties","additionalProperties"];function vM(e){const t=Object.keys(e),n=t.length,r=[];for(let o=0;o<n;o++){const s=t[o];r.push({regExp:new RegExp(s),schema:e[s]})}return[r,t]}const bM=[[],[]];function SM(e,t,n){const r=n.length;for(let o=0;o<r;o++){const s=n[o];if(!s.regExp.test(t))continue;const l=s.schema;if(l===!1)return!0;e.push(l)}return!1}const fle=["items","additionalItems"],dle=["if","then","else"];function wM(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function F1(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function Il(e,t,n){return[e,t,n]}function hle(e){const t=new Map;for(const[n,r,o]of e){const s=l=>{if(!o(l))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(l[n])}, ${r}: ${JSON.stringify(l[r])})`)};for(const l of[[n,r],[r,n]]){let c=t.get(l[0]);c===void 0&&(c=[],t.set(l[0],c)),c.push({oppositeKey:l[1],check:s})}}return t}const ple=[Il("minimum","maximum",e=>e.maximum>=e.minimum),Il("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Il("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Il("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Il("minLength","maxLength",e=>e.maxLength>=e.minLength),Il("minItems","maxItems",e=>e.maxItems>=e.minItems),Il("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function mle({mergePatterns:e=lle,isSubRegExp:t=Object.is,intersectJson:n=Jae,deduplicateJsonSchemaDef:r=gM,defaultMerger:o=gM,assigners:s=[],checks:l=ple,mergers:c}={}){function u(S){const T=S.length;let E=S[0];for(let O=1;O<T;O++){const M=w(E,S[O]);if(M===!1)return!1;zi(M)||(E=M)}return E}function d(S,T,E,O,M,P,I){if(S.length=0,E===!1)return!1;if(S.push(E),M!==void 0){if(M===!1)return!1;S.push(M)}if(SM(S,T,P))return!1;const U=S.length<2;if(I===!1){if(U)return;if(SM(S,T,O))return!1}else U&&I!==void 0&&S.push(I);return S.length===1?S[0]:u(S)}function h(S,T,E,O,M,P){const I=E.length;if(I>0&&M!==!1)if(P)Object.assign(S,T);else for(let z=0;z<I;z++){const U=E[z];O.has(U)||(S[U]=w(T[U],M))}return S}const p=(S,{properties:T={},patternProperties:E,additionalProperties:O=!0},{properties:M={},patternProperties:P,additionalProperties:I=!0})=>{const z=zi(O),U=zi(I);if(z&&U)return $l(S,"properties",v(T,M)),$l(S,"patternProperties",E&&P?v(E,P):E??P),delete S.additionalProperties,S;const G=w(O,I);$l(S,"additionalProperties",G);const J={},ee=Object.keys(T),Z=ee.length,[H,Y]=E?vM(E):bM,[oe,ne]=P?vM(P):bM,$=[],q=new Set,V=U?void 0:I;for(let ge=0;ge<Z;ge++){const ke=ee[ge];q.add(ke);const Q=d($,ke,T[ke],H,M[ke],oe,V);Q!==void 0&&(J[ke]=Q)}const D=Object.keys(M),B=D.length,te=z?void 0:O;for(let ge=0;ge<B;ge++){const ke=D[ge];if(q.has(ke))continue;const Q=d($,ke,M[ke],oe,void 0,H,te);Q!==void 0&&(J[ke]=Q)}$l(S,"properties",J);let re={};const ae=new Set;if(Y.length>0&&ne.length>0){const ge=z1(Y,ne,(ke,Q)=>{t(ke,Q)&&ae.add(ke),t(Q,ke)&&ae.add(Q),re[e(ke,Q)]=w(E[ke],P[Q])});for(;!ge.next().done;);}return re=h(re,E,Y,ae,I,U),re=h(re,P,ne,ae,O,z),$l(S,"patternProperties",re),S},g=(S,{items:T=[],additionalItems:E},{items:O=[],additionalItems:M})=>{const P=Array.isArray(T),I=Array.isArray(O),z=[];if(S.items=z,P&&I){const[U,G,J]=T.length<O.length?[T.length,E,O]:[O.length,M,T];let ee=0;for(;ee<U;ee++)z.push(w(T[ee],O[ee]));if(G===!1)S.additionalItems=!1;else{const Z=G===void 0||zi(G);for(;ee<J.length;ee++)z.push(Z?J[ee]:w(J[ee],G));$l(S,"additionalItems",E!==void 0&&M!==void 0?w(E,M):E??M)}}else if(P||I){const[U,G,J]=P?[T,O,E]:[O,T,M];$l(S,"additionalItems",J&&w(J,G));for(let ee=0;ee<U.length;ee++)z.push(w(U[ee],G))}else delete S.additionalItems,S.items=w(T,O);return S},b=(S,T,E)=>{wM(S,T);const O=wM({},E);return S.allOf===void 0?S.allOf=[O]:S.allOf=S.allOf.concat(O),S};function y(S,T){return r(Array.from(z1(S,T,w)))}const _=cle([[ule,p],[fle,g],[dle,b],...s]),x=hle(l);function w(S,T){if(S===!1||T===!1)return!1;if(zi(S))return zi(T)?!0:T;if(zi(T))return S;let E={...S};const O=new Set,M=new Set,P=Object.keys(T),I=P.length;for(let z=0;z<I;z++){const U=P[z],G=T[U];if(G===void 0)continue;const J=x.get(U);if(J!==void 0){const Y=J.length;for(let oe=0;oe<Y;oe++){const ne=J[oe];S[ne.oppositeKey]!==void 0&&M.add(ne.check)}}const ee=S[U];if(ee===void 0){E[U]=G;continue}const Z=_.get(U);if(Z){O.add(Z);continue}const H=C[U]??o;E[U]=H(ee,G)}for(const z of O)E=z(E,S,T);for(const z of M)z(E);return E}const v=yM(w),C={$id:o,$ref:o,$schema:o,$comment:o,$defs:v,definitions:v,type:(S,T)=>{if(S===T)return S;const E=Array.isArray(S),O=Array.isArray(T);if(!E&&!O){const M=F1(S,T);if(M!==void 0)return M}else if(E||O){const M=new Set;if(E&&O)for(const I of z1(S,T,F1))I!==void 0&&M.add(I);else{const I=E?S:T,z=E?T:S,U=I.length;for(let G=0;G<U;G++){const J=F1(z,I[G]);J!==void 0&&M.add(J)}}const P=M.size;if(P===1)return M.values().next().value;if(P>1)return Array.from(M)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${S.toString()}, ${T.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(S,T)=>{const E=r([S,T]);return E.length===1?E[0]:{anyOf:E}},pattern:e,readOnly:L1,writeOnly:L1,enum:(S,T)=>{const E=n(S,T);if(E.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(S)}", "${JSON.stringify(T)}"`);return E},anyOf:y,oneOf:y,allOf:(S,T)=>r(S.concat(T)),propertyNames:w,contains:w,dependencies:yM((S,T)=>Array.isArray(S)?Array.isArray(T)?N1(S,T):w(T,{required:S}):Array.isArray(T)?w(S,{required:T}):w(S,T)),examples:(S,T)=>{if(!Array.isArray(S)||!Array.isArray(T))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(S)}" and "${JSON.stringify(T)}"`);return N1(S,T)},multipleOf:(S,T)=>{let E=1;for(;!Number.isInteger(S)||!Number.isInteger(T);)E*=10,S*=10,T*=10;return ale(S,T)/E},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:L1,required:N1,...c};return{mergeSchemaDefinitions:w,mergeArrayOfSchemaDefinitions:u}}function gle(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:o,...s}=r;t.push(s);for(let l=o.length-1;l>=0;l--)n.push(o[l])}return t}function yle(e){return t=>e(gle(t))}var xd={},xM;function vle(){if(xM)return xd;xM=1;var e=/~/,t=/~[01]/g;function n(d){switch(d){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+d)}function r(d){return e.test(d)?d.replace(t,n):d}function o(d,h,p){for(var g,b,y=1,_=h.length;y<_;){if(h[y]==="constructor"||h[y]==="prototype"||h[y]==="__proto__")return d;if(g=r(h[y++]),b=_>y,typeof d[g]>"u"&&(Array.isArray(d)&&g==="-"&&(g=d.length),b&&(h[y]!==""&&h[y]<1/0||h[y]==="-"?d[g]=[]:d[g]={})),!b)break;d=d[g]}var x=d[g];return p===void 0?delete d[g]:d[g]=p,x}function s(d){if(typeof d=="string"){if(d=d.split("/"),d[0]==="")return d;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(d)){for(const h of d)if(typeof h!="string"&&typeof h!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return d}throw new Error("Invalid JSON pointer.")}function l(d,h){if(typeof d!="object")throw new Error("Invalid input object.");h=s(h);var p=h.length;if(p===1)return d;for(var g=1;g<p;){if(d=d[r(h[g++])],p===g)return d;if(typeof d!="object"||d===null)return}}function c(d,h,p){if(typeof d!="object")throw new Error("Invalid input object.");if(h=s(h),h.length===0)throw new Error("Invalid JSON pointer for set.");return o(d,h,p)}function u(d){var h=s(d);return{get:function(p){return l(p,h)},set:function(p,g){return c(p,h,g)}}}return xd.get=l,xd.set=c,xd.compile=u,xd}var ble=vle();const U1=es(ble);var Sle=mN();const bE=es(Sle);function _y(e,t){if(_n in e&&bE.equal(e[_n],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(Gt(r)){const o=_y(r,t);if(o!==void 0)return o}}else if(Gt(n)){const r=_y(n,t);if(r!==void 0)return r}}function Vw(e,t){const n=Ie(e,_n,t);In in e&&(e={...e,[In]:bE.resolve(n,e[In])});for(const[r,o]of Object.entries(e))Array.isArray(o)?e={...e,[r]:o.map(s=>Gt(s)?Vw(s,n):s)}:Gt(o)&&(e={...e,[r]:Vw(o,n)});return e}function SE(e,t){const n=t[e];return[rh(t,[e]),n]}function D$(e,t={},n=[],r=Ie(t,[_n])){const o=e||"";let s;if(o.startsWith("#")){const c=decodeURIComponent(o.substring(1));r===void 0||_n in t&&t[_n]===r?s=U1.get(t,c):t[Md]===Fg&&(s=_y(t,r.replace(/\/$/,"")),s!==void 0&&(s=U1.get(s,c)))}else if(t[Md]===Fg){const c=r?bE.resolve(r,o):o,[u,...d]=c.replace(/#\/?$/,"").split("#");s=_y(t,u.replace(/\/$/,"")),s!==void 0&&(r=s[_n],vr(d)||(s=U1.get(s,decodeURIComponent(d.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${e}.`);const l=s[In];if(l){if(n.includes(l)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[h,...p]=n,g=[...p,o,h].join(" -> ");throw new Error(`Definition for ${h} contains a circular reference through ${g}`)}const[c,u]=SE(In,s),d=D$(u,t,[...n,o],r);return Object.keys(c).length>0?t[Md]===Gae||t[Md]===Fg?{[Ka]:[c,d]}:{...c,...d}:d}return s}function $$(e,t={},n=Ie(t,[_n])){return D$(e,t,[],n)}function Xi(e){let t;const n=Ie(e,Bae);return Fa(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function hh(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function Ri(e){let{type:t}=e;return!t&&e.const?hh(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function Ds(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,o)=>{const s=e?e[o]:{},l=t[o];return e&&o in e&&Bt(l)?r[o]=Ds(s,l):e&&t&&(Ri(e)==="object"||Ri(t)==="object")&&o===R$&&Array.isArray(s)&&Array.isArray(l)?r[o]=xK(s,l):r[o]=l,r},n)}function I$(e,t,n){var r;if(e&&n){const o=Ie(e,n);if(o===void 0)return;for(let s=0;s<t.length;s++){const l=t[s],c=Ie(l,[nn,n],{});if(!(c.type==="object"||c.type==="array")&&(c.const===o||!((r=c.enum)===null||r===void 0)&&r.includes(o)))return s}}}function wE(e,t,n,r,o){if(t===void 0)return 0;const s=I$(t,n,o);if(FP(s))return s;for(let l=0;l<n.length;l++){const c=n[l];if(o&&Ft(c,[nn,o])){const u=Ie(t,o),d=Ie(c,[nn,o],{});if(e.isValid(d,u,r))return l}else if(c[nn]){const u={anyOf:Object.keys(c[nn]).map(h=>({required:[h]}))};let d;if(c.anyOf){const{...h}=c;h.allOf?h.allOf=h.allOf.slice():h.allOf=[],h.allOf.push(u),d=h}else d=Object.assign({},c,u);if(delete d.required,e.isValid(d,t,r))return l}else if(e.isValid(c,t,r))return l}return 0}function Qr(e,t,n={},r,o,s=!1){return Vi(e,t,n,r,void 0,void 0,o,s)[0]}function wle(e,t,n,r,o,s,l){const{if:c,then:u,else:d,...h}=t,p=e.isValid(c,s||{},n);let g=[h],b=[];if(r)u&&typeof u!="boolean"&&(b=b.concat(Vi(e,u,n,s,r,o,l))),d&&typeof d!="boolean"&&(b=b.concat(Vi(e,d,n,s,r,o,l)));else{const y=p?u:d;y&&typeof y!="boolean"&&(b=b.concat(Vi(e,y,n,s,r,o,l)))}return b.length&&(g=b.map(y=>Ds(h,y))),g.flatMap(y=>Vi(e,y,n,s,r,o,l))}function z$(e){return e.reduce((n,r)=>r.length>1?r.flatMap(o=>BP(n.length,s=>[...n[s]].concat(o))):(n.forEach(o=>o.push(r[0])),n),[[]])}function L$(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(fn(n,[r],e.patternProperties[r]),n),{})}function xle(e,t,n,r,o,s,l,c){const u=F$(e,t,n,r,o,s,l,c);if(u.length>1||u[0]!==t)return u;if(gE in t)return U$(e,t,n,r,o,s,l).flatMap(h=>Vi(e,h,n,s,r,o,l));if(Ka in t&&Array.isArray(t[Ka])){const d=t.allOf.map(p=>Vi(e,p,n,s,r,o,l));return z$(d).map(p=>({...t,allOf:p}))}return[t]}function F$(e,t,n,r,o,s,l,c){const u=Tu(t,n,o,void 0,c);return u!==t?Vi(e,u,n,s,r,o,l,c):[t]}function Tu(e,t,n,r,o){if(!Bt(e))return e;let s=e;if(In in s){const{$ref:l,...c}=s;if(n.includes(l))return s;n.push(l),s={...$$(l,t,r),...c},_n in s&&(r=s[_n])}if(nn in s){const l=[],c=vK(s[nn],(u,d,h)=>{const p=[...n];u[h]=Tu(d,t,p,r,o),l.push(p)},{});oK(n,GP(LH(l))),s={...s,[nn]:c}}if(Hu in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Tu(s.items,t,n,r,o)}),o){let l,c;Kt in e&&Array.isArray(e[Kt])?(l=Kt,c=s[Kt]):Mt in e&&Array.isArray(e[Mt])&&(l=Mt,c=s[Mt]),l&&c&&(s={...s,[l]:c.map(u=>Tu(u,t,n,r,o))})}return An(e,s)?e:s}function _le(e,t,n,r,o){const s={...t,properties:{...t.properties}},l=r&&Bt(r)?r:{};return Object.keys(l).forEach(c=>{if(!(c in s.properties)){if(Lw in s){const u=L$(s,c);if(!vr(u)){s.properties[c]=Qr(e,{[Ka]:Object.values(u)},n,Ie(l,[c]),o),fn(s.properties,[c,Ms],!0);return}}if(wy in s&&s.additionalProperties!==!1){let u;typeof s.additionalProperties!="boolean"?In in s.additionalProperties?u=Qr(e,{[In]:Ie(s.additionalProperties,[In])},n,l,o):"type"in s.additionalProperties?u={...s.additionalProperties}:Kt in s.additionalProperties||Mt in s.additionalProperties?u={type:"object",...s.additionalProperties}:u={type:hh(Ie(l,[c]))}:u={type:hh(Ie(l,[c]))},s.properties[c]=u,fn(s.properties,[c,Ms],!0)}else s.properties[c]={type:"null"},fn(s.properties,[c,Ms],!0)}}),s}const{compareSchemaDefinitions:Ele,compareSchemaValues:Cle}=sle(),{mergeArrayOfSchemaDefinitions:Tle}=mle({intersectJson:ele(Cle),deduplicateJsonSchemaDef:j$(Ele)}),Rle=yle(Tle);function Ole(e){return Rle(e)}function Vi(e,t,n,r,o=!1,s=[],l,c){return Bt(t)?xle(e,t,n,o,s,r,l,c).flatMap(d=>{var h;let p=d;if(Vae in p)return wle(e,p,n,o,s,r,l);if(Ka in p){if(o){const{allOf:b,...y}=p;return[...b,y]}try{const b=[],y=[];(h=p.allOf)===null||h===void 0||h.forEach(_=>{typeof _=="object"&&_.contains?b.push(_):y.push(_)}),b.length&&(p={...p,allOf:y}),p=l?l(p):Ole(p),b.length&&(p.allOf=b)}catch(b){console.warn(`could not merge subschemas in allOf:
|
|
60
60
|
`,b);const{allOf:y,..._}=p;return _}}return nn in p&&Lw in p&&(p=Object.keys(p.properties).reduce((b,y)=>{const _=L$(b,y);return vr(_)||(b.properties[y]=Qr(e,{allOf:[b.properties[y],...Object.values(_)]},n,Ie(r,[y]),l)),b},{...p,properties:{...p.properties}})),Lw in p||wy in p&&p.additionalProperties!==!1?_le(e,p,n,r,l):p}):[{}]}function Ale(e,t,n,r,o){let s;const{oneOf:l,anyOf:c,...u}=t;if(Array.isArray(l)?s=l:Array.isArray(c)&&(s=c),s){const d=o===void 0&&r?{}:o,h=Xi(t);s=s.map(g=>Tu(g,n,[]));const p=wE(e,d,s,n,h);if(r)return s.map(g=>Ds(u,g));t=Ds(u,s[p])}return[t]}function U$(e,t,n,r,o,s,l){const{dependencies:c,...u}=t;return Ale(e,u,n,r,s).flatMap(h=>V$(e,c,h,n,r,o,s,l))}function V$(e,t,n,r,o,s,l,c){let u=[n];for(const d in t){if(!o&&Ie(l,[d])===void 0||n.properties&&!(d in n.properties))continue;const[h,p]=SE(d,t);return Array.isArray(p)?u[0]=kle(n,p):Bt(p)&&(u=Mle(e,n,r,d,p,o,s,l,c)),u.flatMap(g=>V$(e,h,g,r,o,s,l,c))}return u}function kle(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function Mle(e,t,n,r,o,s,l,c,u){return Vi(e,o,n,c,s,l,u).flatMap(h=>{const{oneOf:p,...g}=h;if(t=Ds(t,g),p===void 0)return t;const b=p.map(_=>typeof _=="boolean"||!(In in _)?[_]:F$(e,_,n,s,l,c));return z$(b).flatMap(_=>jle(e,t,n,r,_,s,l,c,u))})}function jle(e,t,n,r,o,s,l,c,u){const d=o.filter(h=>{if(typeof h=="boolean"||!h||!h.properties)return!1;const{[r]:p}=h.properties;if(p){const g={type:"object",properties:{[r]:p}};return e.isValid(g,c,n)||s}return!1});return!s&&d.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):d.flatMap(h=>{const p=h,[g]=SE(r,p.properties),b={...p,properties:g};return Vi(e,b,n,c,s,l,u).map(_=>Ds(t,_))})}function Pd(e,t,n,r,o,s={},l){if(Array.isArray(n[o])){const u=Xi(n)||r,d=n[o].map(p=>Qr(e,p,t,s,l)),h=Ie(s,u);if(h!==void 0)return d.find(p=>ka(Ie(p,[nn,u,y0],Ie(p,[nn,u,ai])),h))}}function q$(e,t,n,r,o){let s=n;if(Ft(n,In)&&(s=Qr(e,n,t,void 0,o)),vr(r))return s;const l=Array.isArray(r)?r:r.split("."),[c,...u]=l;if(c&&Ft(s,c))return s=Ie(s,c),q$(e,t,s,u,o)}function Vg(e,t,n,r,o,s){const l=q$(e,t,n,r,s);return l===void 0?o:l}const _M={title:"!@#$_UNKNOWN_$#@!"};function Ple(e,t,n,r,o={},s){const l=Array.isArray(r)?[...r]:r.split(".");let c=n;const u=l.pop();l.length&&l.forEach(g=>{c=Vg(e,t,c,[nn,g],{},s),Ft(c,Mt)?c=Pd(e,t,c,u,Mt,Ie(o,g),s):Ft(c,Kt)&&(c=Pd(e,t,c,u,Kt,Ie(o,g),s))}),Ft(c,Mt)?c=Pd(e,t,c,u,Mt,o,s):Ft(c,Kt)&&(c=Pd(e,t,c,u,Kt,o,s));let d=Vg(e,t,c,[nn,u],_M,s);d===_M&&(d=void 0);const h=Vg(e,t,c,R$,[],s);let p;return d&&Array.isArray(h)&&(p=h.includes(u)),{field:d,isRequired:p}}const Nle={type:"object",$id:qae,properties:{__not_really_there__:{type:"number"}}};function qw(e,t,n,r,o){let s=0;return n&&(Gt(n.properties)?s+=pK(n.properties,(l,c,u)=>{const d=Ie(r,u);if(typeof c=="boolean")return l;if(Ft(c,In)){const h=Qr(e,c,t,d,o);return l+qw(e,t,h,d||{},o)}if((Ft(c,Mt)||Ft(c,Kt))&&d){const h=Ft(c,Mt)?Mt:Kt,p=Xi(c);return l+ph(e,t,d,Ie(c,h),-1,p,o)}if(c.type==="object")return Gt(d)&&(l+=1),l+qw(e,t,c,d,o);if(c.type===hh(d)){let h=l+1;return c.default?h+=d===c.default?1:-1:c.const&&(h+=d===c.const?1:-1),h}return l},0):Fa(n.type)&&n.type===hh(r)&&(s+=1)),s}function ph(e,t,n,r,o=-1,s,l){const c=r.map(g=>Tu(g,t,[])),u=I$(n,r,s);if(FP(u))return u;const d=c.reduce((g,b,y)=>(wE(e,n,[Nle,b],t,s)===1&&g.push(y),g),[]);if(d.length===1)return d[0];d.length||BP(c.length,g=>d.push(g));const h=new Set,{bestIndex:p}=d.reduce((g,b)=>{const{bestScore:y}=g,_=c[b],x=qw(e,t,_,n,l);return h.add(x),x>y?{bestIndex:b,bestScore:x}:g},{bestIndex:o,bestScore:0});return h.size===1&&o>=0?o:p}function xE(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Bt(t))}function mh(e,t,n=!1,r=!1,o=!1){if(Array.isArray(t)){const s=Array.isArray(e)?e:[],l=o?s:t,c=o?t:s,u=l.map((d,h)=>c[h]!==void 0?mh(s[h],t[h],n,r,o):d);return(n||o)&&u.length<c.length&&u.push(...c.slice(u.length)),u}if(Bt(t)){const s=Object.assign({},e);return Object.keys(t).reduce((l,c)=>{var u;const d=Ie(t,c),h=Bt(e)&&c in e,p=c in t,g=(u=Ie(e,c))!==null&&u!==void 0?u:{},b=h&&Object.entries(g).some(([,x])=>Bt(x)),y=h&&Bt(Ie(e,c)),_=p&&Bt(d);return y&&_&&!b?(l[c]={...Ie(e,c),...d},l):(l[c]=mh(Ie(e,c),d,n,r,o&&(h||!p)),l)},s)}return r&&(e!==void 0&&ny(t)||typeof t=="number"&&isNaN(t))||o&&!ny(t)?e:t}function gh(e,t,n=!1){return Object.keys(t).reduce((r,o)=>{const s=e?e[o]:{},l=t[o];if(e&&o in e&&Bt(l))r[o]=gh(s,l,n);else if(n&&Array.isArray(s)&&Array.isArray(l)){let c=l;n==="preventDuplicates"&&(c=l.reduce((u,d)=>(s.includes(d)||u.push(d),u),[])),r[o]=s.concat(c)}else r[o]=l;return r},Object.assign({},e))}function B$(e){return Array.isArray(e.enum)&&e.enum.length===1||ai in e}function _E(e,t,n={},r){const o=Qr(e,t,n,void 0,r),s=o.oneOf||o.anyOf;return Array.isArray(o.enum)?!0:Array.isArray(s)?s.every(l=>typeof l!="boolean"&&B$(l)):!1}function EE(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:_E(e,t.items,n,r)}function H$(e){const t=e[ai],n=Ri(e);return Bt(t)&&Fa(t?.$data)&&n!=="object"&&n!=="array"}function Dle(e){if(Uae in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(ai in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Ku(e,t){if(e.enum){let s;if(t){const{enumNames:l}=ct(t);s=l}return e.enum.map((l,c)=>({label:s?.[c]||String(l),value:l}))}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let o=Xi(e);if(t){const{optionsSchemaSelector:s=o}=ct(t);o=s}return n&&n.map((s,l)=>{const{title:c}=ct(r?.[l]),u=s;let d,h=c;if(o){const p=Ie(u,[nn,o],{});d=Ie(p,y0,Ie(p,ai)),h=h||p?.title||u.title||String(d)}else d=Dle(u),h=h||u.title||String(d);return{schema:u,label:h,value:d}})}const $le=["string","number","integer","boolean","null"];var Gu;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(Gu||(Gu={}));function V1(e,t=Gu.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const r=e.items[n];if(typeof r!="boolean")return r}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==Gu.Ignore&&Bt(e.additionalItems)?e.additionalItems:{}}function K$(e,t){const{default:n,type:r}=e;return Array.isArray(r)&&r.includes("null")&&vr(t)&&n===null?null:t}function EM(e,t,n,r,o,s=[],l={},c=!1,u=!1){const{emptyObjectFields:d="populateAllDefaults"}=l;if(r===!0||c)e[t]=n;else if(r==="excludeObjectChildren")(u&&n!==void 0||!Bt(n)||!vr(n))&&(e[t]=n);else if(d!=="skipDefaults"){const h=o===void 0?s.includes(t):o;Bt(n)?d==="skipEmptyDefaults"?vr(n)||(e[t]=n):(!vr(n)||s.includes(t))&&(h||d!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(d==="populateAllDefaults"||d==="skipEmptyDefaults"||h&&s.includes(t))&&(e[t]=n)}}function Pa(e,t,n={}){const{parentDefaults:r,rawFormData:o,rootSchema:s={},includeUndefinedValues:l=!1,_recurseList:c=[],experimental_defaultFormStateBehavior:u=void 0,experimental_customMergeAllOf:d=void 0,required:h,shouldMergeDefaultsIntoFormData:p=!1,initialDefaultsGenerated:g}=n;let b=Bt(o)?o:{};const y=Bt(t)?t:{};let _=r,x=null,w=u,v=c;if(y[ai]!==void 0&&u?.constAsDefaults!=="never"&&!H$(y))_=y[ai];else if(Bt(_)&&Bt(y.default))_=gh(_,y.default);else if(y0 in y&&!y[Kt]&&!y[Mt]&&!y[In])_=y.default;else if(In in y){const T=y[In];c.includes(T)||(v=c.concat(T),x=$$(T,s)),x&&!_&&(_=y.default),p&&x&&!Bt(o)&&(b=o)}else if(gE in y){const T={...CM(e,y,n,_),...b};x=U$(e,y,s,!1,[],T,d)[0]}else if(xE(y))_=y.items.map((T,E)=>Pa(e,T,{rootSchema:s,includeUndefinedValues:l,_recurseList:c,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:d,parentDefaults:Array.isArray(r)?r[E]:void 0,rawFormData:b,required:h,shouldMergeDefaultsIntoFormData:p}));else if(Mt in y){const{oneOf:T,...E}=y;if(T.length===0)return;const O=Xi(y),{type:M="null"}=E;!Array.isArray(M)&&$le.includes(M)&&w?.constAsDefaults==="skipOneOf"&&(w={...w,constAsDefaults:"never"}),x=T[ph(e,s,o??y.default,T,0,O,d)],x=Ds(E,x)}else if(Kt in y){const{anyOf:T,...E}=y;if(T.length===0)return;const O=Xi(y);x=T[ph(e,s,o??y.default,T,0,O,d)],x=Ds(E,x)}if(x)return Pa(e,x,{rootSchema:s,includeUndefinedValues:l,_recurseList:v,experimental_defaultFormStateBehavior:w,experimental_customMergeAllOf:d,parentDefaults:_,rawFormData:o??b,required:h,shouldMergeDefaultsIntoFormData:p,initialDefaultsGenerated:g});_===void 0&&(_=y.default);const C=CM(e,y,n,_);let S=C??_;if(p){const{arrayMinItems:T={}}=u||{},{mergeExtraDefaults:E}=T,O=Ile(e,y,s,o,u,d);(!Bt(o)||Ka in y)&&(S=mh(S,O,E,!0))}return S}function Ile(e,t,n,r,o,s){const l=!B$(t)&&_E(e,t,n,s);let c=r;if(l){const d=Ku(t);c=d?.some(p=>An(p.value,r))?r:void 0}return t[ai]&&o?.constAsDefaults==="always"&&(c=t.const),c}function zle(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}={},p){{const g=Bt(n)?n:{},b=t,y=l?.allOf==="populateDefaults"&&Ka in b?Qr(e,b,r,g,c):b,_=y[ai],x=Object.keys(y.properties||{}).reduce((w,v)=>{var C;const S=Ie(y,[nn,v],{}),T=Bt(_)&&_[v]!==void 0,E=(Bt(S)&&ai in S||T)&&l?.constAsDefaults!=="never"&&!H$(S),O=Pa(e,S,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:Ie(p,[v]),rawFormData:Ie(g,[v]),required:(C=y.required)===null||C===void 0?void 0:C.includes(v),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});return EM(w,v,O,o,u,y.required,l,E,S?.type==="null"),w},{});if(y.additionalProperties&&!h){const w=Bt(y.additionalProperties)?y.additionalProperties:{},v=new Set;Bt(p)&&Object.keys(p).filter(S=>!y.properties||!y.properties[S]).forEach(S=>v.add(S));const C=[];Object.keys(g).filter(S=>!y.properties||!y.properties[S]).forEach(S=>{v.add(S),C.push(S)}),v.forEach(S=>{var T;const E=Pa(e,w,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:Ie(p,[S]),rawFormData:Ie(g,[S]),required:(T=y.required)===null||T===void 0?void 0:T.includes(S),shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});EM(x,S,E,o,u,C)})}return K$(t,x)}}function Lle(e,t,{rawFormData:n,rootSchema:r={},_recurseList:o=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:l=void 0,required:c,requiredAsRoot:u=!1,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}={},p){var g,b;const y=t,_=(g=s?.arrayMinItems)!==null&&g!==void 0?g:{},{populate:x,mergeExtraDefaults:w}=_,v=x==="never",C=x==="requiredOnly",S=x==="all"||!v&&!C,T=(b=_?.computeSkipPopulate)!==null&&b!==void 0?b:(()=>!1),O=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(p)&&(p=p.map((z,U)=>{const G=V1(y,Gu.Fallback,U);return Pa(e,G,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,parentDefaults:z,required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h})})),Array.isArray(n)){const z=V1(y);if(v)p=n;else{const U=n.map((J,ee)=>Pa(e,z,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,rawFormData:J,parentDefaults:Ie(p,[ee]),required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h}));p=mh(p,U,(C&&c||S)&&w)}}if((Bt(y)&&ai in y&&s?.constAsDefaults!=="never")===!1){if(v)return p??O;if(C&&!c)return p||void 0}let P;const I=Array.isArray(p)?p.length:0;if(!y.minItems||EE(e,y,r,l)||T(e,y,r)||y.minItems<=I)P=p||!c&&!u?p:O;else{const z=p||[],U=V1(y,Gu.Invert),G=U.default,J=Array.from({length:y.minItems-I},()=>Pa(e,U,{parentDefaults:G,rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,required:c,shouldMergeDefaultsIntoFormData:d}));P=z.concat(J)}return K$(t,P)}function CM(e,t,n={},r){switch(Ri(t)){case"object":return zle(e,t,n,r);case"array":return Lle(e,t,n,r)}}function G$(e,t,n,r,o=!1,s,l,c){if(!Bt(t))throw new Error("Invalid schema: "+t);const u=Qr(e,t,r,n,l),d=Pa(e,u,{rootSchema:r,includeUndefinedValues:o,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:l,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:c,requiredAsRoot:!0});if(u.type!=="object"&&Bt(u.default))return{...d,...n};if(Bt(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:h}=s||{};return mh(d,n,!0,h==="useDefaultIfFormDataUndefined",!0)}return d}function Z$(e={}){return"widget"in ct(e)&&ct(e).widget!=="hidden"}function W$(e,t,n={},r,o){if(n[vE]==="files")return!0;if(t.items){const s=Qr(e,t.items,r,void 0,o);return s.type==="string"&&s.format==="data-url"}return!1}function Fle(e,t,n={},r,o,s){const l=ct(n,o),{label:c=!0}=l;let u=!!c;if(u){const d=Ri(t),h=Ie(t,Ms,!1);d==="array"&&(u=h||EE(e,t,r,s)||W$(e,t,n,r,s)||Z$(n)),d==="object"&&(u=h),d==="boolean"&&n&&!n[vE]&&(u=!1),n&&n[Kae]&&(u=!1)}return u}const ru=Symbol("no Value");function Bw(e,t,n,r,o={},s){let l;if(Ft(n,nn)){const c={};if(Ft(r,nn)){const h=Ie(r,nn,{});Object.keys(h).forEach(p=>{Ft(o,p)&&(c[p]=void 0)})}const u=Object.keys(Ie(n,nn,{})),d={};u.forEach(h=>{const p=Ie(o,h);let g=Ie(r,[nn,h],{}),b=Ie(n,[nn,h],{});Ft(g,In)&&(g=Qr(e,g,t,p,s)),Ft(b,In)&&(b=Qr(e,b,t,p,s));const y=Ie(g,"type"),_=Ie(b,"type");if(!y||y===_)if(Ft(c,h)&&delete c[h],_==="object"||_==="array"&&Array.isArray(p)){const x=Bw(e,t,b,g,p,s);(x!==void 0||_==="array")&&(d[h]=x)}else{const x=Ie(b,"default",ru),w=Ie(g,"default",ru);x!==ru&&x!==p&&(w===p?c[h]=x:Ie(b,"readOnly")===!0&&(c[h]=void 0));const v=Ie(b,"const",ru),C=Ie(g,"const",ru);v!==ru&&v!==p&&(c[h]=C===p?v:void 0)}}),l={...typeof o=="string"||Array.isArray(o)?void 0:o,...c,...d}}else if(Ie(r,"type")==="array"&&Ie(n,"type")==="array"&&Array.isArray(o)){let c=Ie(r,"items"),u=Ie(n,"items");if(typeof c=="object"&&typeof u=="object"&&!Array.isArray(c)&&!Array.isArray(u)){Ft(c,In)&&(c=Qr(e,c,t,o,s)),Ft(u,In)&&(u=Qr(e,u,t,o,s));const d=Ie(c,"type"),h=Ie(u,"type");if(!d||d===h){const p=Ie(n,"maxItems",-1);h==="object"?l=o.reduce((g,b)=>{const y=Bw(e,t,u,c,b,s);return y!==void 0&&(p<0||g.length<p)&&g.push(y),g},[]):l=p>0&&o.length>p?o.slice(0,p):o}}else typeof c=="boolean"&&typeof u=="boolean"&&c===u&&(l=o)}return l}function Fl(e,t,n,r,o,s=[],l){if(In in t||gE in t||Ka in t){const u=Qr(e,t,r,o,l);if(s.findIndex(h=>An(h,u))===-1)return Fl(e,u,n,r,o,s.concat(u),l)}let c={[Lg]:n.replace(/^\./,"")};if(Mt in t||Kt in t){const u=Mt in t?t.oneOf:t.anyOf,d=Xi(t),h=ph(e,r,o,u,0,d,l),p=u[h];c={...c,...Fl(e,p,n,r,o,s,l)}}if(wy in t&&t[wy]!==!1&&fn(c,yE,!0),Hu in t&&Array.isArray(o)){const{items:u,additionalItems:d}=t;Array.isArray(u)?o.forEach((h,p)=>{u[p]?c[p]=Fl(e,u[p],`${n}.${p}`,r,h,s,l):d?c[p]=Fl(e,d,`${n}.${p}`,r,h,s,l):console.warn(`Unable to generate path schema for "${n}.${p}". No schema defined for it`)}):o.forEach((h,p)=>{c[p]=Fl(e,u,`${n}.${p}`,r,h,s,l)})}else if(nn in t)for(const u in t.properties){const d=Ie(t,[nn,u],{});c[u]=Fl(e,d,`${n}.${u}`,r,Ie(o,[u]),s,l)}return c}function Ule(e,t,n="",r,o,s){return Fl(e,t,n,r,o,void 0,s)}class Vle{constructor(t,n,r,o){n&&n[Md]===Fg?this.rootSchema=Vw(n,Ie(n,_n,"#")):this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=o}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},o){return!t||!n?!1:this.validator!==t||!An(this.rootSchema,n)||!An(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==o}findFieldInSchema(t,n,r){return Ple(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,r,o){return Pd(this.validator,this.rootSchema,t,n,r,o,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,r=!1,o){return G$(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,o)}getDisplayLabel(t,n,r){return Fle(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,o){return ph(this.validator,this.rootSchema,t,n,r,o,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return wE(this.validator,t,n,this.rootSchema,r)}getFromSchema(t,n,r){return Vg(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}isFilesArray(t,n){return W$(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return EE(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return _E(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}retrieveSchema(t,n,r){return Qr(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(t,n,r){return Bw(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return Ule(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function qle(e,t,n={},r){return new Vle(e,t,n,r)}function Ble(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[o,s]=r,[l,...c]=o.split(";"),u=l||"",d=decodeURI(((t=c.map(h=>h.split("=")).find(([h])=>h==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const h=atob(s),p=new Array(h.length);for(let b=0;b<h.length;b++)p[b]=h.charCodeAt(b);return{blob:new window.Blob([new Uint8Array(p)],{type:u}),name:d}}catch(h){throw new Error("File is invalid: "+h.message)}}function _a(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function Y$(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return Y$(t,e).reverse();const n=[];for(let r=e;r<=t;r++)n.push({value:r,label:_a(r,2)});return n}function TM(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const s=n[o];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function Hle(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((o,s)=>{const l=r.findIndex(c=>c===`%${s+1}`);l>=0&&(r[l]=o)}),n=r.join("")}return n}function Kle(e,t){return Hle(e,t)}function Rr(e,t=[],n){if(Array.isArray(e))return e.map(s=>Rr(s,t)).filter(s=>s!==n);const r=e===""||e===null?-1:Number(e),o=t[r];return o?o.value:n}function X$(e,t,n=[]){const r=Rr(e,n);return Array.isArray(t)?t.filter(o=>!An(o,r)):An(r,t)?void 0:t}function Kh(e,t){return Array.isArray(t)?t.some(n=>An(n,e)):An(t,e)}function Q$(e,t=[],n=!1){const r=t.map((o,s)=>Kh(o.value,e)?String(s):void 0).filter(o=>typeof o<"u");return n?r:r[0]}function J$(e,t,n=[]){const r=Rr(e,n);if(!ny(r)){const o=n.findIndex(c=>r===c.value),s=n.map(({value:c})=>c);return t.slice(0,o).concat(r,t.slice(o)).sort((c,u)=>+(s.indexOf(c)>s.indexOf(u)))}return t}class eI{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?Ie(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},mK(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?Nh(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let o=Ie(r,qr);return Array.isArray(o)||(o=[],r[qr]=o),Array.isArray(t)?fn(r,qr,[...new Set([...o,...t])]):fn(r,qr,[...new Set([...o,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),o=Array.isArray(t)?[...new Set([...t])]:[t];return fn(r,qr,o),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return fn(n,qr,[]),this}}function RM(e,t){const n=La(e),r=La(t);if(e===t||!n&&!r)return[];if(n&&!r)return ei(e);if(!n&&r)return ei(t);{const o=ei(fK(e,(l,c)=>!An(l,Ie(t,c)))),s=$H(ei(t),ei(e));return[...o,...s]}}function Gle(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:o,month:s,year:l,hour:c,minute:u,second:d}=e,h={type:"day",range:[1,31],value:o},p={type:"month",range:[1,12],value:s},g={type:"year",range:n,value:l},b=[];switch(r){case"MDY":b.push(p,h,g);break;case"DMY":b.push(h,p,g);break;default:b.push(g,p,h)}return t&&b.push({type:"hour",range:[0,23],value:c},{type:"minute",range:[0,59],value:u},{type:"second",range:[0,59],value:d}),b}function tI(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function nI(e,t,n={},r=!0){const o={type:t||"text",...tI(e)};return n.inputType?o.type=n.inputType:t||(e.type==="number"?(o.type="number",r&&o.step===void 0&&(o.step="any")):e.type==="integer"&&(o.type="number",o.step===void 0&&(o.step=1))),n.autocomplete&&(o.autoComplete=n.autocomplete),n.accept&&(o.accept=n.accept),o}const OM={props:{disabled:!1},submitText:"Submit",norender:!1};function rI(e={}){const t=ct(e);if(t&&t[xy]){const n=t[xy];return{...OM,...n}}return OM}function mt(e,t,n={}){const{templates:r}=t;if(e==="ButtonTemplates")return r[e];if(Object.hasOwn(n,e)&&typeof n[e]=="string"&&Object.hasOwn(r,n[e])){const o=n[e];return r[o]}return n[e]||r[e]}function CE(){if(typeof process>"u"||Ie(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,ZP("test-id-")),e.get(n)}})}var q1={exports:{}},un={};var AM;function Zle(){if(AM)return un;AM=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function _(x){if(typeof x=="object"&&x!==null){var w=x.$$typeof;switch(w){case e:switch(x=x.type,x){case n:case o:case r:case d:case h:return x;default:switch(x=x&&x.$$typeof,x){case c:case l:case u:case g:case p:case s:return x;default:return w}}case t:return w}}}return un.ContextConsumer=l,un.ContextProvider=s,un.Element=e,un.ForwardRef=u,un.Fragment=n,un.Lazy=g,un.Memo=p,un.Portal=t,un.Profiler=o,un.StrictMode=r,un.Suspense=d,un.SuspenseList=h,un.isAsyncMode=function(){return!1},un.isConcurrentMode=function(){return!1},un.isContextConsumer=function(x){return _(x)===l},un.isContextProvider=function(x){return _(x)===s},un.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},un.isForwardRef=function(x){return _(x)===u},un.isFragment=function(x){return _(x)===n},un.isLazy=function(x){return _(x)===g},un.isMemo=function(x){return _(x)===p},un.isPortal=function(x){return _(x)===t},un.isProfiler=function(x){return _(x)===o},un.isStrictMode=function(x){return _(x)===r},un.isSuspense=function(x){return _(x)===d},un.isSuspenseList=function(x){return _(x)===h},un.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===o||x===r||x===d||x===h||x===b||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===p||x.$$typeof===s||x.$$typeof===l||x.$$typeof===u||x.$$typeof===y||x.getModuleId!==void 0)},un.typeOf=_,un}var kM;function Wle(){return kM||(kM=1,q1.exports=Zle()),q1.exports}var Yle=Wle();const MM=es(Yle),B1={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function Xle(e){let t=Ie(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...o})=>j.jsx(e,{options:{...n,...r},...o}),fn(e,"MergedWidget",t)}return t}function Qi(e,t,n={}){const r=Ri(e);if(typeof t=="function"||t&&MM.isForwardRef(k.createElement(t))||MM.isMemo(t))return Xle(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){const o=n[t];return Qi(e,o,n)}if(typeof r=="string"){if(!(r in B1))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in B1[r]){const o=n[B1[r][t]];return Qi(e,o,n)}}throw new Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function Qle(e){let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return t.toString(16)}function Jle(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),JSON.stringify(e,Array.from(t).sort())}function qi(e){return Qle(Jle(e))}function ece(e){return qi(e)}function tce(e,t,n={}){try{return Qi(e,t,n),!0}catch(r){const o=r;if(o.message&&(o.message.startsWith("No widget")||o.message.startsWith("Unsupported widget")))return!1;throw r}}function pc(e,t){return`${Fa(e)?e:e[_n]}__${t}`}function mc(e){return pc(e,"description")}function TE(e){return pc(e,"error")}function yh(e){return pc(e,"examples")}function RE(e){return pc(e,"help")}function b0(e){return pc(e,"title")}function bo(e,t=!1){const n=t?` ${yh(e)}`:"";return`${TE(e)} ${mc(e)} ${RE(e)}${n}`}function Zl(e,t){return`${e}-${t}`}function Bi(e,t){return pc(e,t)}function H1(e,t){return pc(e,`optional${t}`)}function vf(e){return!ny(e)&&(!Gt(e)||Array.isArray(e)||!vr(e))}function nce(e,t){const{rootSchema:n,schemaUtils:r}=e;if(ka(t,n))return!0;if(In in n){const o=r.retrieveSchema(n);return ka(t,o)}return!1}function oI(e,t,n){return t?n:e}function rce(e){return e?new Date(e).toJSON():void 0}function OE(e,t,n){const r=[Hae];return Ft(e,dM)&&r.unshift(dM),Ie(e,[...r,t],n)}function oce(e,t){if(!Array.isArray(t))return e;const n=h=>h.reduce((p,g)=>(p[g]=!0,p),{}),r=h=>h.length>1?`properties '${h.join("', '")}'`:`property '${h[0]}'`,o=n(e),s=t.filter(h=>h==="*"||o[h]),l=n(s),c=e.filter(h=>!l[h]),u=s.indexOf("*");if(u===-1){if(c.length)throw new Error(`uiSchema order list does not contain ${r(c)}`);return s}if(u!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const d=[...s];return d.splice(u,1,...c),d}function K1(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function qd(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return qd(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return qd(e.oneOf[0]);if(e.allOf){const t=n=>qd(n);return e.allOf.some(t)}return!1}function iI(e,t,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:l,state:c}=e;return!TM(l,t)||!TM(c,n)}const{props:o,state:s}=e;return!An(o,t)||!An(s,n)}function jM(e){const t=GP(e.map(n=>Gt(n)?Ri(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function Gh(e,t,n,r){const{enableOptionalDataFieldForType:o=[]}=ct(r,e.globalUiOptions);let s;return Kt in t&&Array.isArray(t[Kt])?s=jM(t[Kt]):Mt in t&&Array.isArray(t[Mt])?s=jM(t[Mt]):s=Ri(t),!nce(e,t)&&!n&&!!s&&!Array.isArray(s)&&!!o.find(l=>l===s)}function PM(e,t=!0){const{year:n,month:r,day:o,hour:s=0,minute:l=0,second:c=0}=e,u=Date.UTC(n,r-1,o,s,l,c),d=new Date(u).toJSON();return t?d:d.slice(0,10)}function AE(e,t=[]){if(!e)return[];let n=[];return qr in e&&(n=n.concat(e[qr].map(r=>{const o=`.${t.join(".")}`;return{property:o,message:r,stack:`${o} ${r}`}}))),Object.keys(e).reduce((r,o)=>{if(o!==qr){const s=e[o];La(s)&&(r=r.concat(AE(s,[...t,o])))}return r},n)}function ice(e){const t=new eI;return e.length&&e.forEach(n=>{const{property:r,message:o}=n,s=r==="."?[]:HP(r);s.length>0&&s[0]===""&&s.splice(0,1),o&&t.addErrors(o,s)}),t.ErrorSchema}function li(e,t,n,r){const o=Array.isArray(n)?n:n?.path,s=e===""?[]:[e],l=o?o.concat(...s):s,c=[t.idPrefix,...l].join(t.idSeparator);let u;return t.nameGenerator&&l.length>0&&(u=t.nameGenerator(l,t.idPrefix,r)),{path:l,[_n]:c,...u!==void 0&&{name:u}}}function sI(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return La(r)?{...t,[n]:sI(r)}:{...t,[n]:r}}},{})}function sce(e){return Object.values(e).every(t=>t!==-1)}function ace(e){const{className:t="form-control",type:n,range:r,value:o,select:s,rootId:l,name:c,disabled:u,readonly:d,autofocus:h,registry:p,onBlur:g,onFocus:b}=e,y=`${l}_${n}`,{SelectWidget:_}=p.widgets,x=k.useCallback(w=>s(n,w),[s,n]);return j.jsx(_,{schema:{type:"integer"},id:y,name:c,className:t,options:{enumOptions:Y$(r[0],r[1])},placeholder:n,value:o,disabled:u,readonly:d,autofocus:h,onChange:x,onBlur:g,onFocus:b,registry:p,label:"","aria-describedby":bo(l)})}function lce(e){const{time:t=!1,disabled:n=!1,readonly:r=!1,options:o,onChange:s,value:l}=e,[c,u]=k.useState(K1(l,t));k.useEffect(()=>{u(K1(l,t))},[t,l]);const d=k.useCallback((b,y)=>{const _={...c,[b]:typeof y>"u"?-1:y};sce(_)?s(PM(_,t)):u(_)},[c,s,t]),h=k.useCallback(b=>{b.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),p=k.useCallback(b=>{if(b.preventDefault(),n||r)return;const y=K1(new Date().toJSON(),t);s(PM(y,t))},[n,r,t,s]);return{elements:k.useMemo(()=>Gle(c,t,o.yearsRange,o.format),[c,t,o.yearsRange,o.format]),handleChange:d,handleClear:h,handleSetNow:p}}function gc(e){const t=k.useRef(e);return ka(e,t.current)||(t.current=e),t.current}function cce(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function uce(e){const{name:t,size:n,type:r}=e;return new Promise((o,s)=>{const l=new window.FileReader;l.onerror=s,l.onload=c=>{var u;typeof((u=c.target)===null||u===void 0?void 0:u.result)=="string"?o({dataURL:cce(c.target.result,t),name:t,size:n,type:r}):o({dataURL:null,name:t,size:n,type:r})},l.readAsDataURL(e)})}function fce(e){return Promise.all(Array.from(e).map(uce))}function NM(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:o}=Ble(n);return[...t,{dataURL:n,name:o,size:r.size,type:r.type}]}catch{return t}},[])}function dce(e,t,n=!1){const r=k.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),o=k.useMemo(()=>Array.isArray(e)?NM(e):NM([e||""]),[e]),s=k.useCallback(c=>{fce(c).then(u=>{const d=u.map(h=>h.dataURL||null);t(n?r.concat(...d):d[0])})},[r,n,t]),l=k.useCallback(c=>{if(n){const u=r.filter((d,h)=>h!==c);t(u)}else t(void 0)},[r,n,t]);return{filesInfo:o,handleChange:s,handleRemove:l}}function hce(e){if(!e)return"";const t=new Date(e),n=_a(t.getFullYear(),4),r=_a(t.getMonth()+1,2),o=_a(t.getDate(),2),s=_a(t.getHours(),2),l=_a(t.getMinutes(),2),c=_a(t.getSeconds(),2),u=_a(t.getMilliseconds(),3);return`${n}-${r}-${o}T${s}:${l}:${c}.${u}`}function qg(e,t,n=!1){if(!t)return e;const{errors:r,errorSchema:o}=e;let s=AE(t),l=t;return vr(o)||(l=gh(o,t,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:l,errors:s}}function pce(e){for(const t in e){const n=e,r=n[t];t===In&&typeof r=="string"&&r.startsWith("#")?n[t]=k$+r:n[t]=kE(r)}return e}function mce(e){for(let t=0;t<e.length;t++)e[t]=kE(e[t]);return e}function kE(e){return Array.isArray(e)?mce([...e]):Gt(e)?pce({...e}):e}var Dt;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(Dt||(Dt={}));function Hw(){return ZP("rjsf-array-item-")}function DM(e){return Array.isArray(e)?e.map(t=>({key:Hw(),item:t})):[]}function aI(e){return Array.isArray(e)?e.map(t=>t.item):[]}function gce(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function lI(e,t,n,r){let{addable:o}=ct(r,e.globalUiOptions);return o!==!1&&(t.maxItems!==void 0?o=n.length<t.maxItems:o=!0),o}function cI(e,t,n,r){if(typeof e.items=="function")try{return e.items(t,n,r)}catch(o){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,o);return}else return e.items}function yce(e,t){const{schemaUtils:n,globalFormOptions:r}=e;let o=t.items;return r.useFallbackUiForUnsupportedType&&!o?o={}:xE(t)&&Fae(t)&&(o=t.additionalItems),n.getDefaultFormState(o)}function vce(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:o=[],disabled:s=!1,readonly:l=!1,autofocus:c=!1,required:u=!1,placeholder:d,onBlur:h,onFocus:p,registry:g,rawErrors:b,name:y,onSelectChange:_}=e,{widgets:x,schemaUtils:w,globalFormOptions:v,globalUiOptions:C}=g,S=w.retrieveSchema(t.items,o),T=Ku(S,r),{widget:E="select",title:O,...M}=ct(r,C),P=Qi(t,E,x),I=O??t.title??y,z=w.getDisplayLabel(t,r,C),U=gc(li("",v,n,!0));return j.jsx(P,{id:U[_n],name:y,multiple:!0,onChange:_,onBlur:h,onFocus:p,options:{...M,enumOptions:T},schema:t,uiSchema:r,registry:g,value:o,disabled:s,readonly:l,required:u,label:I,hideLabel:!z,placeholder:d,autofocus:c,rawErrors:b,htmlName:U.name})}function bce(e){const{schema:t,fieldPathId:n,uiSchema:r,disabled:o=!1,readonly:s=!1,autofocus:l=!1,required:c=!1,hideError:u,placeholder:d,onBlur:h,onFocus:p,formData:g=[],registry:b,rawErrors:y,name:_,onSelectChange:x}=e,{widgets:w,schemaUtils:v,globalFormOptions:C,globalUiOptions:S}=b,{widget:T,title:E,...O}=ct(r,S),M=Qi(t,T,w),P=E??t.title??_,I=v.getDisplayLabel(t,r,S),z=gc(li("",C,n,!0));return j.jsx(M,{id:z[_n],name:_,multiple:!0,onChange:x,onBlur:h,onFocus:p,options:O,schema:t,uiSchema:r,registry:b,value:g,disabled:o,readonly:s,hideError:u,required:c,label:P,hideLabel:!I,placeholder:d,autofocus:l,rawErrors:y,htmlName:z.name})}function Sce(e){const{schema:t,uiSchema:n,fieldPathId:r,name:o,disabled:s=!1,readonly:l=!1,autofocus:c=!1,required:u=!1,onBlur:d,onFocus:h,registry:p,formData:g=[],rawErrors:b,onSelectChange:y}=e,{widgets:_,schemaUtils:x,globalFormOptions:w,globalUiOptions:v}=p,{widget:C="files",title:S,...T}=ct(n,v),E=Qi(t,C,_),O=S??t.title??o,M=x.getDisplayLabel(t,n,v),P=gc(li("",w,r,!0));return j.jsx(E,{options:T,id:P[_n],name:o,multiple:!0,onChange:y,onBlur:d,onFocus:h,schema:t,uiSchema:n,value:g,disabled:s,readonly:l,required:u,registry:p,autofocus:c,rawErrors:b,label:O,hideLabel:!M,htmlName:P.name})}function uI(e){const{itemKey:t,index:n,name:r,disabled:o,hideError:s,readonly:l,registry:c,uiOptions:u,parentUiSchema:d,canAdd:h,canRemove:p=!0,canMoveUp:g,canMoveDown:b,itemSchema:y,itemData:_,itemUiSchema:x,itemFieldPathId:w,itemErrorSchema:v,autofocus:C,onBlur:S,onFocus:T,onChange:E,rawErrors:O,totalItems:M,title:P,handleAddItem:I,handleCopyItem:z,handleRemoveItem:U,handleReorderItems:G}=e,{schemaUtils:J,fields:{ArraySchemaField:ee,SchemaField:Z},globalUiOptions:H}=c,Y=gc(w),oe=ee||Z,ne=mt("ArrayFieldItemTemplate",c,u),$=J.getDisplayLabel(y,x,H),{description:q}=ct(x),V=!!q||!!y.description,{orderable:D=!0,removable:B=!0,copyable:te=!1}=u,re={moveUp:D&&g,moveDown:D&&b,copy:te&&h,remove:B&&p,toolbar:!1};re.toolbar=Object.keys(re).some(_e=>re[_e]);const ae=k.useCallback(_e=>{I(_e,n+1)},[I,n]),ge=k.useCallback(_e=>{z(_e,n)},[z,n]),ke=k.useCallback(_e=>{U(_e,n)},[U,n]),Q=k.useCallback(_e=>{G(_e,n,n-1)},[G,n]),ie=k.useCallback(_e=>{G(_e,n,n+1)},[G,n]),de={children:j.jsx(oe,{name:r,title:P,index:n,schema:y,uiSchema:x,formData:_,errorSchema:v,fieldPathId:Y,required:gce(y),onChange:E,onBlur:S,onFocus:T,registry:c,disabled:o,readonly:l,hideError:s,autofocus:C,rawErrors:O}),buttonsProps:{fieldPathId:Y,disabled:o,readonly:l,canAdd:h,hasCopy:re.copy,hasMoveUp:re.moveUp,hasMoveDown:re.moveDown,hasRemove:re.remove,index:n,totalItems:M,onAddItem:ae,onCopyItem:ge,onRemoveItem:ke,onMoveUpItem:Q,onMoveDownItem:ie,registry:c,schema:y,uiSchema:x},itemKey:t,className:"rjsf-array-item",disabled:o,hasToolbar:re.toolbar,index:n,totalItems:M,readonly:l,registry:c,schema:y,uiSchema:x,parentUiSchema:d,displayLabel:$,hasDescription:V};return j.jsx(ne,{...de})}function wce(e){const{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:o,formData:s,name:l,title:c,disabled:u=!1,readonly:d=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:b,onBlur:y,onFocus:_,rawErrors:x,onChange:w,keyedFormData:v,handleAddItem:C,handleCopyItem:S,handleRemoveItem:T,handleReorderItems:E}=e,O=t.title||c||l,{schemaUtils:M,fields:P,formContext:I,globalFormOptions:z,globalUiOptions:U}=b,{OptionalDataControlsField:G}=P,J=ct(n,U),ee=Gt(t.items)?t.items:{},Z=M.retrieveSchema(ee),H=aI(v),Y=Gh(b,t,p,n),oe=vf(s),ne=lI(b,t,H,n)&&(!Y||oe),$=oe?v:[],q=Y?" rjsf-optional-array-field":"",V=e.childFieldPathId??o,D=Y?j.jsx(G,{...e,fieldPathId:V}):void 0,B={canAdd:ne,items:$.map((re,ae)=>{const{key:ge,item:ke}=re,Q=ke,ie=M.retrieveSchema(ee,Q),de=r?r[ae]:void 0,_e=li(ae,z,V),Te=cI(n,ke,ae,I),xe={itemKey:ge,index:ae,name:l&&`${l}-${ae}`,registry:b,uiOptions:J,hideError:g,readonly:d,disabled:u,required:p,title:O?`${O}-${ae+1}`:void 0,canAdd:ne,canMoveUp:ae>0,canMoveDown:ae<H.length-1,itemSchema:ie,itemFieldPathId:_e,itemErrorSchema:de,itemData:Q,itemUiSchema:Te,autofocus:h&&ae===0,onBlur:y,onFocus:_,rawErrors:x,totalItems:v.length,handleAddItem:C,handleCopyItem:S,handleRemoveItem:T,handleReorderItems:E,onChange:w};return j.jsx(uI,{...xe},ge)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${Z.type}${q}`,disabled:u,fieldPathId:o,uiSchema:n,onAddClick:C,readonly:d,required:p,schema:t,title:O,formData:H,rawErrors:x,registry:b,optionalDataControl:D},te=mt("ArrayFieldTemplate",b,J);return j.jsx(te,{...B})}function xce(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:o,fieldPathId:s,name:l,title:c,disabled:u=!1,readonly:d=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:b,onBlur:y,onFocus:_,rawErrors:x,keyedFormData:w,onChange:v,handleAddItem:C,handleCopyItem:S,handleRemoveItem:T,handleReorderItems:E}=e;let{formData:O=[]}=e;const M=t.title||c||l,{schemaUtils:P,fields:I,formContext:z,globalFormOptions:U,globalUiOptions:G}=b,J=ct(n,G),{OptionalDataControlsField:ee}=I,Z=Gh(b,t,p,n),H=vf(r),oe=(Gt(t.items)?t.items:[]).map((ae,ge)=>P.retrieveSchema(ae,O[ge])),ne=Gt(t.additionalItems)?P.retrieveSchema(t.additionalItems,r):null,$=e.childFieldPathId??s;O.length<oe.length&&(O=O.concat(new Array(oe.length-O.length)));const q=H?w:[],V=Z?" rjsf-optional-array-field":"",D=Z?j.jsx(ee,{...e,fieldPathId:$}):void 0,B=lI(b,t,O,n)&&!!ne&&(!Z||H),te={canAdd:B,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${V}`,disabled:u,fieldPathId:s,formData:r,items:q.map((ae,ge)=>{const{key:ke,item:Q}=ae,ie=Q,de=ge>=oe.length,_e=(de&&Gt(t.additionalItems)?P.retrieveSchema(t.additionalItems,ie):oe[ge])||{},Te=li(ge,U,$);let xe;de?xe=n.additionalItems:Array.isArray(n.items)?xe=n.items[ge]:xe=cI(n,Q,ge,z);const $e=o?o[ge]:void 0,Ze={index:ge,itemKey:ke,name:l&&`${l}-${ge}`,registry:b,uiOptions:J,hideError:g,readonly:d,disabled:u,required:p,title:M?`${M}-${ge+1}`:void 0,canAdd:B,canRemove:de,canMoveUp:ge>=oe.length+1,canMoveDown:de&&ge<O.length-1,itemSchema:_e,itemData:ie,itemUiSchema:xe,itemFieldPathId:Te,itemErrorSchema:$e,autofocus:h&&ge===0,onBlur:y,onFocus:_,rawErrors:x,totalItems:w.length,onChange:v,handleAddItem:C,handleCopyItem:S,handleRemoveItem:T,handleReorderItems:E};return j.jsx(uI,{...Ze},ke)}),onAddClick:C,readonly:d,required:p,registry:b,schema:t,uiSchema:n,title:M,errorSchema:o,rawErrors:x,optionalDataControl:D},re=mt("ArrayFieldTemplate",b,J);return j.jsx(re,{...te})}function _ce(e=[]){const t=k.useMemo(()=>qi(e),[e]),[n,r]=k.useState(()=>({formDataHash:t,keyedFormData:DM(e)}));let{keyedFormData:o,formDataHash:s}=n;if(t!==s){const c=Array.isArray(e)?e:[],u=o||[];o=c.length===u.length?u.map((d,h)=>({key:d.key,item:c[h]})):DM(c),s=t,r({formDataHash:s,keyedFormData:o})}const l=k.useCallback(c=>{const u=aI(c),d=qi(u);return r({formDataHash:d,keyedFormData:c}),u},[]);return{keyedFormData:o,updateKeyedFormData:l}}function Ece(e){const{schema:t,uiSchema:n,errorSchema:r,fieldPathId:o,registry:s,formData:l,onChange:c}=e,{globalFormOptions:u,schemaUtils:d,translateString:h}=s,{keyedFormData:p,updateKeyedFormData:g}=_ce(l),b=e.childFieldPathId??o,y=k.useCallback((E,O)=>{E&&E.preventDefault();let M;if(r){M={};for(const z in r){const U=parseInt(z);O===void 0||U<O?fn(M,[U],r[z]):U>=O&&fn(M,[U+1],r[z])}}const P={key:Hw(),item:yce(s,t)},I=[...p];O!==void 0?I.splice(O,0,P):I.push(P),c(g(I),b.path,M)},[p,s,t,c,g,r,b]),_=k.useCallback((E,O)=>{E&&E.preventDefault();let M;if(r){M={};for(const z in r){const U=parseInt(z);U<=O?fn(M,[U],r[z]):U>O&&fn(M,[U+1],r[z])}}const P={key:Hw(),item:Nh(p[O].item)},I=[...p];O!==void 0?I.splice(O+1,0,P):I.push(P),c(g(I),b.path,M)},[p,c,g,r,b]),x=k.useCallback((E,O)=>{E&&E.preventDefault();let M;if(r){M={};for(const I in r){const z=parseInt(I);z<O?fn(M,[z],r[I]):z>O&&fn(M,[z-1],r[I])}}const P=p.filter((I,z)=>z!==O);c(g(P),b.path,M)},[p,c,g,r,b]),w=k.useCallback((E,O,M)=>{E&&(E.preventDefault(),E.currentTarget.blur());let P;if(r){P={};for(const U in r){const G=parseInt(U);G==O?fn(P,[M],r[O]):G==M?fn(P,[O],r[M]):fn(P,[U],r[G])}}function I(){const U=p.slice();return U.splice(O,1),U.splice(M,0,p[O]),U}const z=I();c(g(z),b.path,P)},[p,c,g,r,b]),v=k.useCallback((E,O,M,P)=>{c(E===void 0?null:E,O,M,P)},[c]),C=k.useCallback(E=>{c(E,b.path,void 0,b?.[_n])},[c,b]),S={...e,formData:l,fieldPathId:b,onSelectChange:C},T={...e,handleAddItem:y,handleCopyItem:_,handleRemoveItem:x,handleReorderItems:w,keyedFormData:p,onChange:v};if(!(Hu in t)){if(!u.useFallbackUiForUnsupportedType){const O=ct(n),M=mt("UnsupportedFieldTemplate",s,O);return j.jsx(M,{schema:t,fieldPathId:o,reason:h(Dt.MissingItems),registry:s})}const E={...t,[Hu]:{type:void 0}};S.schema=E,T.schema=E}return d.isMultiSelect(S.schema)?j.jsx(vce,{...S}):Z$(n)?j.jsx(bce,{...S}):xE(S.schema)?j.jsx(xce,{...T}):d.isFilesArray(S.schema,n)?j.jsx(Sce,{...S}):j.jsx(wce,{...T})}function Cce(e){const{schema:t,name:n,uiSchema:r,fieldPathId:o,formData:s,registry:l,required:c,disabled:u,readonly:d,hideError:h,autofocus:p,title:g,onChange:b,onFocus:y,onBlur:_,rawErrors:x}=e,{title:w}=t,{widgets:v,translateString:C,globalUiOptions:S}=l,{widget:T="checkbox",title:E,label:O=!0,enumNames:M,...P}=ct(r,S),I=Qi(t,T,v),z=C(Dt.YesLabel),U=C(Dt.NoLabel);let G;const J=E??w??g??n;if(Array.isArray(t.oneOf))G=Ku({oneOf:t.oneOf.map(Z=>{if(Gt(Z))return{...Z,title:Z.title||(Z.const===!0?z:U)}}).filter(Z=>Z)},r);else{const Z=t.enum??[!0,!1];!M&&Z.length===2&&Z.every(H=>typeof H=="boolean")?G=[{value:Z[0],label:Z[0]?z:U},{value:Z[1],label:Z[1]?z:U}]:G=Ku({enum:Z},r)}const ee=k.useCallback((Z,H,Y)=>b(Z,o.path,H,Y),[b,o]);return j.jsx(I,{options:{...P,enumOptions:G},schema:t,uiSchema:r,id:o.$id,name:n,onChange:ee,onFocus:y,onBlur:_,label:J,hideLabel:!O,value:s,required:c,disabled:u,readonly:d,hideError:h,registry:l,autofocus:p,rawErrors:x,htmlName:o.name})}function Tce(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Rce(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Oce(e,t){switch(t){case"string":return String(e);case"number":{const n=Number(e);return isNaN(n)?0:n}case"boolean":return!!e;default:return e}}function Ace(e){const{id:t,formData:n,displayLabel:r=!0,schema:o,name:s,uiSchema:l,required:c,disabled:u=!1,readonly:d=!1,onBlur:h,onFocus:p,registry:g,fieldPathId:b,onChange:y,errorSchema:_}=e,{translateString:x,fields:w,globalFormOptions:v}=g,[C,S]=k.useState(Rce(n)),T=ct(l),E=gc(li("__internal_type_selector",v,b)),O=x(Dt.Type),M=k.useMemo(()=>Tce(O),[O]),P=U=>{U!=null&&(S(U),y(Oce(n,U),b.path,_,t))};if(!v.useFallbackUiForUnsupportedType){const{reason:U=x(Dt.UnknownFieldType,[String(o.type)])}=e,G=mt("UnsupportedFieldTemplate",g,T);return j.jsx(G,{schema:o,fieldPathId:b,reason:U,registry:g})}const I=mt("FallbackFieldTemplate",g,T),{SchemaField:z}=w;return j.jsx(I,{schema:o,registry:g,typeSelector:j.jsx(z,{fieldPathId:E,name:`${s}__fallback_type`,schema:M,formData:C,onChange:P,onBlur:h,onFocus:p,registry:g,hideLabel:!r,disabled:u,readonly:d,required:c},n?qi(n):"__empty__"),schemaField:j.jsx(z,{...e,schema:{type:C,title:x(Dt.Value),...C==="object"&&{additionalProperties:!0}}})})}var Hi;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Hi||(Hi={}));var Bd;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Bd||(Bd={}));const kce=/^\$lookup=(.+)/,G1="layoutGrid";function $M(e,t){return e??t}function Mce(e){return/^\d+?$/.test(e)}const Na=CE();function jce(e,t,n,r,o){const s=Ie(n,[Fw],{}),l=Ie(n,e),c={...Ie(l,[ja],{}),...t,...s},u={...l};vr(c)||fn(u,[ja],c),vr(s)||fn(u,[Fw],s);let{readonly:d}=ct(u);return(o===!0||UP(d)&&r===!0)&&(d=!0,Ft(c,P1)?fn(u,[ja,P1],!0):fn(u,`ui:${P1}`,!0)),{fieldUiSchema:u,uiReadonly:d}}function Pce(e,t,n="$0m3tH1nG Un3xP3cT3d"){const r=US([t]).sort(),o=US([n]).sort();switch(e){case Bd.ALL:return ka(r,o);case Bd.SOME:return XO(r,o).length>0;case Bd.NONE:return XO(r,o).length===0;default:return!1}}function S0(e,t,n){let r={},o=e[t];if(La(o)){const{children:s,className:l,...c}=o;if(o=s,l){const d=l.split(" ").map(h=>OE(n,h,h)).join(" ");r={...c,className:d}}else r=c}if(!Array.isArray(o))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:o,gridProps:r}}function IM(e,t,n){let r;if(Mce(n)&&e&&e?.type==="array"&&Ft(e,Hu)){const o=Number(n),s=e[Hu];Array.isArray(s)?o>s.length?r=zP(s):r=s[o]:r=s,t={[_n]:t[_n],path:[...t.path.slice(0,t.path.length-1),o]}}return{rawSchema:r,fieldPathId:t}}function Nce(e,t,n,r,o){const{schemaUtils:s,globalFormOptions:l}=e;let c=n,u=o;const d=t.split("."),h=d.pop();let p=s.retrieveSchema(c,r),g=r,b=p.readOnly;d.forEach(x=>{if(u=li(x,l,u),Ft(p,nn))c=Ie(p,[nn,x],{});else if(p&&(Ft(p,Mt)||Ft(p,Kt))){const w=Ft(p,Mt)?Mt:Kt,v=s.findSelectedOptionInXxxOf(p,x,w,g);c=Ie(v,[nn,x],{})}else{const w=IM(p,u,x);c=w.rawSchema??{},u=w.fieldPathId}g=Ie(g,x,{}),p=s.retrieveSchema(c,g),b=$M(p.readOnly,b)});let y,_=!1;if(vr(p)&&(p=void 0),p&&h){if(p&&(Ft(p,Mt)||Ft(p,Kt))){const w=Ft(p,Mt)?Mt:Kt;p=s.findSelectedOptionInXxxOf(p,h,w,g)}u=li(h,l,u),_=p!==void 0&&Array.isArray(p.required)&&GH(p.required,h);const x=IM(p,u,h);if(x.rawSchema?(p=x.rawSchema,u=x.fieldPathId):(p=Ie(p,[nn,h]),p=p&&s.retrieveSchema(p)),b=$M(p?.readOnly,b),p&&(Ft(p,Mt)||Ft(p,Kt))){const w=Ft(p,Mt)?Mt:Kt,v=Xi(p);y={options:p[w],hasDiscriminator:!!v}}}return{schema:p,isRequired:_,isReadonly:b,optionsInfo:y,fieldPathId:u}}function Dce(e,t){let n=e;return Fa(n)&&(n=OE(t,n)),Oh(n)?n:null}function $ce(e,t){let n,r=null,o={},s;if(Fa(t)||UP(t))n=t??"";else{const{name:l="",render:c,...u}=t;n=l,o=u,vr(o)||IH(o,(d,h)=>{if(Fa(d)){const p=kce.exec(d);if(Array.isArray(p)&&p.length>1){const g=p[1];o[h]=OE(e,g,g)}}}),r=Dce(c,e),!l&&r&&(s=j.jsx(r,{...u,"data-testid":Na.uiComponent}))}return{name:n,UIComponent:r,uiProps:o,rendered:s}}function w0(e){const{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:o,formData:s}=n,{schemaUtils:l}=r,c=l.retrieveSchema(o,s);return t.map(u=>k.createElement(ME,{...n,key:`layoutGrid-${qi(u)}`,schema:c,layoutGridSchema:u}))}function Ice(e){const{layoutGridSchema:t,...n}=e,{formData:r,registry:o}=n,{children:s,gridProps:l}=S0(t,Hi.CONDITION,o),{operator:c,field:u="",value:d}=l,h=Ie(r,u,null);return Pce(c,h,d)?j.jsx(w0,{...n,childrenLayoutGridSchemaId:s}):null}function zce(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:s,gridProps:l}=S0(t,Hi.COLUMN,r),c=ct(o),u=mt("GridTemplate",r,c);return j.jsx(u,{column:!0,"data-testid":Na.col,...l,children:j.jsx(w0,{...n,childrenLayoutGridSchemaId:s})})}function Lce(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:s,gridProps:l}=S0(t,Hi.COLUMNS,r),c=ct(o),u=mt("GridTemplate",r,c);return s.map(d=>j.jsx(u,{column:!0,"data-testid":Na.col,...l,children:j.jsx(w0,{...n,childrenLayoutGridSchemaId:[d]})},`column-${qi(d)}`))}function Fce(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:s,gridProps:l}=S0(t,Hi.ROW,r),c=ct(o),u=mt("GridTemplate",r,c);return j.jsx(u,{...l,"data-testid":Na.row,children:j.jsx(w0,{...n,childrenLayoutGridSchemaId:s})})}function Uce(e){const{gridSchema:t,schema:n,uiSchema:r,errorSchema:o,fieldPathId:s,onBlur:l,onFocus:c,formData:u,readonly:d,registry:h,layoutGridSchema:p,...g}=e,{onChange:b}=g,{fields:y}=h,{SchemaField:_,LayoutMultiSchemaField:x}=y,w=$ce(h,t),{name:v,UIComponent:C,uiProps:S}=w,{schema:T,isRequired:E,isReadonly:O,optionsInfo:M,fieldPathId:P}=Nce(h,v,n,u,s),I=gc(P);if(w.rendered)return w.rendered;if(T){const z=M?.hasDiscriminator?x:_,{fieldUiSchema:U,uiReadonly:G}=jce(v,S,r,O,d);return j.jsx(z,{"data-testid":M?.hasDiscriminator?Na.layoutMultiSchemaField:Na.field,...g,name:v,required:E,readonly:G,schema:T,uiSchema:U,errorSchema:Ie(o,v),fieldPathId:I,formData:Ie(u,v),onChange:b,onBlur:l,onFocus:c,options:M?.options,registry:h})}return C?j.jsx(C,{"data-testid":Na.uiComponent,...g,name:v,required:E,formData:u,readOnly:!!O||d,errorSchema:o,uiSchema:r,schema:n,fieldPathId:s,onBlur:l,onFocus:c,registry:h,...S}):null}function ME(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const r=ct(t);if(!n&&G1 in r&&Gt(r[G1])&&(n=r[G1]),Gt(n)){if(Hi.ROW in n)return j.jsx(Fce,{...e,layoutGridSchema:n});if(Hi.COLUMN in n)return j.jsx(zce,{...e,layoutGridSchema:n});if(Hi.COLUMNS in n)return j.jsx(Lce,{...e,layoutGridSchema:n});if(Hi.CONDITION in n)return j.jsx(Ice,{...e,layoutGridSchema:n})}return j.jsx(Uce,{...e,gridSchema:n})}ME.TEST_IDS=Na;function Vce(e){const{fieldPathId:t,title:n,schema:r,uiSchema:o,required:s,registry:l,name:c}=e,u=ct(o,l.globalUiOptions),{title:d}=u,{title:h}=r,p=d||n||h||c;if(!p)return null;const g=mt("TitleFieldTemplate",l,u);return j.jsx(g,{id:b0(t),title:p,required:s,schema:r,uiSchema:o,registry:l})}function Z1(e,t,n){const r="!@#!@$@#$!@$#";return e.map(({schema:s})=>s).find(s=>{const l=Ie(s,[nn,t]);return Ie(l,y0,Ie(l,ai,r))===n})}function zM(e,t,n,r,o){const s=t.map(u=>n.retrieveSchema(u,o));let l=e;Ft(e,Mt)?l={...e,[Mt]:s}:Ft(e,Kt)&&(l={...e,[Kt]:s});const c=Ku(l,r);if(!c)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(l)}`);return c}function qce(e){const{name:t,baseType:n,disabled:r=!1,formData:o,fieldPathId:s,onBlur:l,onChange:c,options:u,onFocus:d,registry:h,uiSchema:p,schema:g,autofocus:b,readonly:y,required:_,errorSchema:x,hideError:w=!1}=e,{widgets:v,schemaUtils:C,globalUiOptions:S}=h,[T,E]=k.useState(zM(g,u,C,p,o)),O=Ie(s,_n),M=Xi(g),P=mt("FieldErrorTemplate",h,u),I=mt("FieldTemplate",h,u),z=qi(g),U=qi(u),G=p?qi(p):"",J=o?qi(o):"";k.useEffect(()=>{E(zM(g,u,C,p,o))},[z,U,C,G,J]);const{widget:ee=M?"radio":"select",title:Z="",placeholder:H="",optionsSchemaSelector:Y=M,hideError:oe,...ne}=ct(p);if(!Y)throw new Error("No selector field provided for the LayoutMultiSchemaField");const $=Ie(o,Y);let q=Ie(T[0]?.schema,[nn,Y],{});const V=Z1(T,Y,$);q=q?.type?q:{...q,type:V?.type||n};const D=Qi(q,ee,v),B=oe===void 0?w:!!oe,te=Ie(x,[qr],[]),re=rh(x,[qr]),ae=C.getDisplayLabel(g,p,S),ge=ie=>{const de=Z1(T,Y,ie),_e=Z1(T,Y,$);let Te=C.sanitizeDataForNewSchema(de,_e,o);Te&&de&&(Te=C.getDefaultFormState(de,Te,"excludeObjectChildren")),Te&&fn(Te,Y,ie),c(Te,s.path,void 0,O)},ke={enumOptions:T,...ne},Q=!B&&te.length>0?j.jsx(P,{fieldPathId:s,schema:g,errors:te,registry:h}):void 0;return j.jsx(I,{id:O,schema:g,label:(Z||g.title)??"",disabled:r||Array.isArray(T)&&vr(T),uiSchema:p,required:_,readonly:!!y,registry:h,displayLabel:ae,errors:Q,onChange:c,onKeyRename:Pg,onKeyRenameBlur:Pg,onRemoveProperty:Pg,children:j.jsx(D,{id:O,name:t,schema:g,label:(Z||g.title)??"",disabled:r||Array.isArray(T)&&vr(T),uiSchema:p,autofocus:b,readonly:y,required:_,registry:h,multiple:!1,rawErrors:te,hideError:B,hideLabel:!ae,errorSchema:re,placeholder:H,onChange:ge,onBlur:l,onFocus:d,value:$,options:ke,htmlName:s.name})})}class LM extends k.Component{constructor(t){super(t);const{formData:n,options:r,registry:{schemaUtils:o}}=this.props,s=r.map(l=>o.retrieveSchema(l,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(t,n){const{formData:r,options:o,fieldPathId:s}=this.props,{selectedOption:l}=this.state;let c=this.state;if(!An(t.options,o)){const{registry:{schemaUtils:u}}=this.props,d=o.map(h=>u.retrieveSchema(h,r));c={selectedOption:l,retrievedOptions:d}}if(!An(r,t.formData)&&s.$id===t.fieldPathId.$id){const{retrievedOptions:u}=c,d=this.getMatchingOption(l,r,u);n&&d!==l&&(c={selectedOption:d,retrievedOptions:u})}c!==this.state&&this.setState(c)}getMatchingOption(t,n,r){const{schema:o,registry:{schemaUtils:s}}=this.props,l=Xi(o);return s.getClosestMatchingOption(n,r,t,l)}onOptionChange=t=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:o,onChange:s,registry:l,fieldPathId:c}=this.props,{schemaUtils:u}=l,d=t!==void 0?parseInt(t,10):-1;if(d===n)return;const h=d>=0?r[d]:void 0,p=n>=0?r[n]:void 0;let g=u.sanitizeDataForNewSchema(h,p,o);h&&(g=u.getDefaultFormState(h,g,"excludeObjectChildren")),this.setState({selectedOption:d},()=>{s(g,c.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:n}=this.props;return`${t.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:n=!1,errorSchema:r={},formData:o,onBlur:s,onFocus:l,readonly:c,required:u=!1,registry:d,schema:h,uiSchema:p}=this.props,{widgets:g,fields:b,translateString:y,globalUiOptions:_,schemaUtils:x}=d,{SchemaField:w}=b,v=mt("MultiSchemaFieldTemplate",d,_),C=Gh(d,h,u,p),S=vf(o),{selectedOption:T,retrievedOptions:E}=this.state,{widget:O="select",placeholder:M,autofocus:P,autocomplete:I,title:z=h.title,...U}=ct(p,_),G=Qi({type:"number"},O,g),J=Ie(r,qr,[]),ee=rh(r,[qr]),Z=x.getDisplayLabel(h,p,_),H=T>=0&&E[T]||null;let Y;if(H){const{required:te}=h;Y=te?Ds({required:te},H):H}let oe=[];Mt in h&&p&&Mt in p?Array.isArray(p[Mt])?oe=p[Mt]:console.warn(`uiSchema.oneOf is not an array for "${z||t}"`):Kt in h&&p&&Kt in p&&(Array.isArray(p[Kt])?oe=p[Kt]:console.warn(`uiSchema.anyOf is not an array for "${z||t}"`));let ne=p;T>=0&&oe.length>T&&(ne=oe[T]);const $=z?Dt.TitleOptionPrefix:Dt.OptionPrefix,q=z?[z]:[],V=E.map((te,re)=>{const{title:ae=te.title}=ct(oe[re]);return{label:ae||y($,q.concat(String(re+1))),value:re}}),D=!C||S?j.jsx(G,{id:this.getFieldId(),name:`${t}${h.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:l,disabled:n||vr(V),multiple:!1,rawErrors:J,errorSchema:ee,value:T>=0?T:void 0,options:{enumOptions:V,...U},registry:d,placeholder:M,autocomplete:I,autofocus:P,label:z??t,hideLabel:!Z,readonly:c}):void 0,B=Y&&Y.type!=="null"&&j.jsx(w,{...this.props,schema:Y,uiSchema:ne})||null;return j.jsx(v,{schema:h,registry:d,uiSchema:p,selector:D,optionSchemaField:B})}}const Bce=/\.([0-9]*0)*$/,Hce=/[0.]0*$/;function Kce(e){const{registry:t,onChange:n,formData:r,value:o}=e,[s,l]=k.useState(o),{StringField:c}=t.fields;let u=r;const d=k.useCallback((h,p,g,b)=>{l(h),`${h}`.charAt(0)==="."&&(h=`0${h}`);const y=typeof h=="string"&&h.match(Bce)?fM(h.replace(Hce,"")):fM(h);n(y,p,g,b)},[n]);if(typeof s=="string"&&typeof u=="number"){const h=new RegExp(`^(${String(u).replace(".","\\.")})?\\.?0*$`);s.match(h)&&(u=s)}return j.jsx(c,{...e,formData:u,onChange:d})}function Li(){return Li=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Li.apply(null,arguments)}const fg=["strong","em","del","mark"],FM=[["**",fg[0]],["__",fg[0]],["~~",fg[2]],["==",fg[3]],["*","em"],["_","em"]];function Gce(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]!=="\\"?(e[r]==="["&&n++,e[r]==="]"&&n--,r++):r+=2;if(n===0&&r<e.length&&(e[r]==="("||e[r]==="[")){var o=e[r]==="("?")":"]",s=1;for(r++;r<e.length&&s>0;)e[r]!=="\\"?(e[r]==="("&&o===")"&&s++,e[r]===o&&s--,r++):r+=2;if(s===0)return r}return-1}function Zce(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",o=0,s="",l=0;l<6;l++){var c=FM[l][0];if(e.startsWith(c)&&e.length>=2*c.length){r=c,o=c.length,s=FM[l][1];break}}if(!r)return null;for(var u=o,d=!1,h=!1,p="",g=0,b="",y=!1,_="";u<e.length;){var x=e[u];if(y)b+=x,y=!1,_=x,u++;else if(x!=="\\")if(x!=="`"||g!==0){if(x==="["&&!d&&g===0){var w=Gce(e,u);if(w!==-1){b+=e.slice(u,w),u=w,_=e[w-1];continue}}if(h)b+=x,p?x===p&&(p=""):x==='"'||x==="'"?p=x:x===">"&&(h=!1),_=x,u++;else if(x!=="<"||d){if(x===`
|
|
61
61
|
`&&_===`
|
|
62
62
|
`&&!d&&g===0)return null;if(!d&&g===0){for(var v=0;u+v<e.length&&e[u+v]===r[0];)v++;if(v>=o&&(o!==1||r!=="*"&&r!=="_"||e[u-1]!==r&&e[u+1]!==r)){var C=[e.slice(0,u+v),s,b+e.slice(u+o,u+v)];return C.index=0,C.input=e,C}}b+=x,_=x,u++}else{var S=e[u+1],T=e.indexOf(">",u);if(T!==-1){var E=e.slice(u,T+1).endsWith("/>");S==="/"?g=Math.max(0,g-1):E||g++}h=!0,b+=x,_=x,u++}}else d=!d,b+=x,_=x,u++;else b+=x,y=!0,_=x,u++}return null}const Wce=["children","options"],UM=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),VM={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Yce=["style","script","pre"],Xce=["src","href","data","formAction","srcDoc","action"],Qce=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Jce=/\n{2,}$/,qM=/^(\s*>[\s\S]*?)(?=\n\n|$)/,eue=/^ *> ?/gm,tue=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,nue=/^ {2,}\n/,rue=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,BM=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,HM=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,oue=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,iue=/^(?:\n *)*\n/,sue=/\r\n?/g,aue=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,lue=/^\[\^([^\]]+)]/,cue=/\f/g,uue=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,fue=/^\[(x|\s)\]/,KM=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,GM=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,ZM=/^([^\n]+)\n *(=|-)\2{2,} *\n/,jE=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function due(e){const t=jE.exec(e);if(!t)return null;const n=t[1],r=n.toLowerCase(),o=r.length+1;let s=t[0].length;e[s]===`
|