clawpad 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +9 -9
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/ai/write/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/changes/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/changes/record/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/changes/revert/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/changes/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/changes/run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/abort/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/files/pages/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/files/recent/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/files/search/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/files/spaces/[space]/pages/route.js +1 -1
- package/.next/standalone/.next/server/app/api/files/spaces/[space]/pages/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/files/spaces/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/files/watch/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/gateway/detect/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/gateway/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/gateway/features/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/gateway/history/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/gateway/resolve/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/gateway/sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/gateway/status/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/openclaw/commands/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/settings/search-status/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/setup/bootstrap/route.js +83 -1
- package/.next/standalone/.next/server/app/api/setup/bootstrap/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/setup/bootstrap-workspace/route.js +1 -1
- package/.next/standalone/.next/server/app/api/setup/bootstrap-workspace/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/setup/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/setup/status/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/setup/trigger-onboarding/route.js +123 -10
- package/.next/standalone/.next/server/app/api/setup/trigger-onboarding/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/setup/trigger-onboarding/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/connection/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/connection.html +1 -1
- package/.next/standalone/.next/server/app/settings/connection.rsc +4 -4
- package/.next/standalone/.next/server/app/settings/connection.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/settings/connection.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings/connection.segments/_index.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/settings/connection.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings/connection.segments/settings/connection/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings/connection.segments/settings/connection.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings/connection.segments/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +4 -4
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +2 -2
- package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup.html +1 -1
- package/.next/standalone/.next/server/app/setup.rsc +5 -5
- package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/setup.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/setup.segments/_index.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/setup.segments/setup.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspace/[...path]/page.js +1 -1
- package/.next/standalone/.next/server/app/workspace/[...path]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspace/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspace/page.js +2 -2
- package/.next/standalone/.next/server/app/workspace/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspace/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspace/search/page.js +2 -2
- package/.next/standalone/.next/server/app/workspace/search/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspace/search/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspace/search.html +2 -2
- package/.next/standalone/.next/server/app/workspace/search.rsc +6 -6
- package/.next/standalone/.next/server/app/workspace/search.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/workspace/search.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspace/search.segments/_index.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/workspace/search.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspace/search.segments/workspace/search/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspace/search.segments/workspace/search.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspace/search.segments/workspace.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspace.html +2 -2
- package/.next/standalone/.next/server/app/workspace.rsc +6 -6
- package/.next/standalone/.next/server/app/workspace.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/workspace.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspace.segments/_index.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/workspace.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspace.segments/workspace/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspace.segments/workspace.segment.rsc +2 -2
- package/.next/standalone/.next/server/app-paths-manifest.json +9 -9
- package/.next/standalone/.next/server/chunks/2470.js +3 -3
- package/.next/standalone/.next/server/chunks/3251.js +2 -3
- package/.next/standalone/.next/server/chunks/4098.js +9 -0
- package/.next/standalone/.next/server/chunks/{9703.js → 7035.js} +3 -3
- package/.next/standalone/.next/server/chunks/7772.js +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/package.json +2 -1
- package/.next/static/chunks/1178-f2f0bd687a63b9f8.js +4 -0
- package/.next/static/chunks/1592-8d48cfb007c02ef4.js +9 -0
- package/.next/static/chunks/{4839-8d9e473f5fea81c8.js → 20-4cfa0dd1c497eee3.js} +8 -8
- package/.next/static/chunks/3505-9fff91cc0bc3d611.js +1 -0
- package/.next/static/chunks/3678.620cb571eead466f.js +1 -0
- package/.next/static/chunks/385-4c7c8d3ad3b6b7db.js +1 -0
- package/.next/static/chunks/4559-722e02df6a03e69f.js +1 -0
- package/.next/static/chunks/6217-dcce2b95259e116b.js +1 -0
- package/.next/static/chunks/app/layout-c12666d2d05cce33.js +1 -0
- package/.next/static/chunks/app/setup/page-7eac0e007d7fcd58.js +1 -0
- package/.next/static/chunks/app/workspace/[...path]/page-5c4919e22385a024.js +1 -0
- package/.next/static/chunks/app/workspace/layout-9717963f2fdd1346.js +6 -0
- package/.next/static/chunks/app/workspace/page-3869e183f908f2fc.js +1 -0
- package/.next/static/chunks/app/workspace/search/page-d50c5815a7c7dc09.js +1 -0
- package/.next/static/chunks/{ba12c10f-9f20c2943b757ccd.js → ba12c10f-d2d630b861c021fb.js} +1 -1
- package/.next/static/chunks/{webpack-4017efb7c7e87263.js → webpack-2f676db6328b0d7d.js} +1 -1
- package/.next/static/css/a44c237eaaac8354.css +1 -0
- package/bin/clawpad.js +174 -9
- package/package.json +2 -1
- package/public/install.sh +32 -4
- package/skills/README.md +40 -0
- package/skills/workspace-manager/SKILL.md +449 -0
- package/.next/standalone/.next/server/chunks/8385.js +0 -9
- package/.next/static/chunks/3016-27e0c450e2ada8a3.js +0 -1
- package/.next/static/chunks/3678.7aa2a1e7fc03b615.js +0 -1
- package/.next/static/chunks/5488-cb187354d8aaa3d6.js +0 -1
- package/.next/static/chunks/7005-2786bffdf3d8496e.js +0 -9
- package/.next/static/chunks/8485-4d3e303f8e277e8d.js +0 -1
- package/.next/static/chunks/app/layout-8a46ab4a3e2d5cb0.js +0 -4
- package/.next/static/chunks/app/setup/page-a2a70f253bbf4382.js +0 -1
- package/.next/static/chunks/app/workspace/[...path]/page-d59a1f3dbc96308f.js +0 -4
- package/.next/static/chunks/app/workspace/layout-504ed80ab2d05d25.js +0 -10
- package/.next/static/chunks/app/workspace/page-677a7fccfea3cce2.js +0 -4
- package/.next/static/chunks/app/workspace/search/page-c00e5c231c4a1fdd.js +0 -1
- package/.next/static/css/3084c1365b9c9e06.css +0 -1
- /package/.next/static/{wrTc1IgxHQI9epHN29OBD → WjQpy-wj7aRX-ddVHKjXc}/_buildManifest.js +0 -0
- /package/.next/static/{wrTc1IgxHQI9epHN29OBD → WjQpy-wj7aRX-ddVHKjXc}/_ssgManifest.js +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7005],{4524:(t,e,i)=>{i.d(e,{E:()=>s});var n=i(12115);let s=i(24846).B?n.useLayoutEffect:n.useEffect},10887:(t,e,i)=>{i.d(e,{Uu:()=>r});var n=i(25620);let s="u">typeof window;function r(){if(n.r.current=!0,s)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>n.O.current=t.matches;t.addEventListener("change",e),e()}else n.O.current=!1}},15131:(t,e,i)=>{i.d(e,{t:()=>n});let n=(0,i(12115).createContext)(null)},21362:(t,e,i)=>{i.d(e,{A:()=>n});let n=(0,i(90425).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},24846:(t,e,i)=>{i.d(e,{B:()=>n});let n="u">typeof window},24866:(t,e,i)=>{i.d(e,{Q:()=>n});let n=(0,i(12115).createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"})},25620:(t,e,i)=>{i.d(e,{O:()=>n,r:()=>s});let n={current:null},s={current:!1}},28819:(t,e,i)=>{i.d(e,{M:()=>s});var n=i(12115);function s(t){let e=(0,n.useRef)(null);return null===e.current&&(e.current=t()),e.current}},39551:(t,e,i)=>{i.d(e,{L:()=>n});let n=(0,i(12115).createContext)({})},42129:(t,e,i)=>{i.d(e,{A:()=>n});let n=(0,i(90425).A)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]])},44408:(t,e,i)=>{let n,s,r,o,a;i.d(e,{P:()=>rL});let l=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],h=new Set(l),u=(t,e,i)=>i>e?e:i<t?t:i,d={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},c={...d,transform:t=>u(0,1,t)},p={...d,default:1},m=t=>Math.round(1e5*t)/1e5,f=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,g=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,y=(t,e)=>i=>!!("string"==typeof i&&g.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),v=(t,e,i)=>n=>{if("string"!=typeof n)return n;let[s,r,o,a]=n.match(f);return{[t]:parseFloat(s),[e]:parseFloat(r),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},x={...d,transform:t=>Math.round(u(0,255,t))},w={test:y("rgb","red"),parse:v("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+x.transform(t)+", "+x.transform(e)+", "+x.transform(i)+", "+m(c.transform(n))+")"},T={test:y("#"),parse:function(t){let e="",i="",n="",s="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,i+=i,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}},transform:w.transform},P=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),S=P("deg"),b=P("%"),A=P("px"),E=P("vh"),M=P("vw"),V={...b,parse:t=>b.parse(t)/100,transform:t=>b.transform(100*t)},C={test:y("hsl","hue"),parse:v("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+b.transform(m(e))+", "+b.transform(m(i))+", "+m(c.transform(n))+")"},k={test:t=>w.test(t)||T.test(t)||C.test(t),parse:t=>w.test(t)?w.parse(t):C.test(t)?C.parse(t):T.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?w.transform(t):C.transform(t),getAnimatableNone:t=>{let e=k.parse(t);return e.alpha=0,k.transform(e)}},D=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,R="number",L="color",j=/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 B(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},s=[],r=0,o=e.replace(j,t=>(k.test(t)?(n.color.push(r),s.push(L),i.push(k.parse(t))):t.startsWith("var(")?(n.var.push(r),s.push("var"),i.push(t)):(n.number.push(r),s.push(R),i.push(parseFloat(t))),++r,"${}")).split("${}");return{values:i,split:o,indexes:n,types:s}}function F(t){return B(t).values}function I(t){let{split:e,types:i}=B(t),n=e.length;return t=>{let s="";for(let r=0;r<n;r++)if(s+=e[r],void 0!==t[r]){let e=i[r];e===R?s+=m(t[r]):e===L?s+=k.transform(t[r]):s+=t[r]}return s}}let O=t=>"number"==typeof t?0:k.test(t)?k.getAnimatableNone(t):t,U={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(f)?.length||0)+(t.match(D)?.length||0)>0},parse:F,createTransformer:I,getAnimatableNone:function(t){let e=F(t);return I(t)(e.map(O))}},$=new Set(["brightness","contrast","saturate","opacity"]);function W(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(f)||[];if(!n)return t;let s=i.replace(n,""),r=+!!$.has(e);return n!==i&&(r*=100),e+"("+r+s+")"}let N=/\b([a-z-]*)\(.*?\)/gu,z={...U,getAnimatableNone:t=>{let e=t.match(N);return e?e.map(W).join(" "):t}},Y={...d,transform:Math.round},H={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,inset:A,insetBlock:A,insetBlockStart:A,insetBlockEnd:A,insetInline:A,insetInlineStart:A,insetInlineEnd:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,paddingBlock:A,paddingBlockStart:A,paddingBlockEnd:A,paddingInline:A,paddingInlineStart:A,paddingInlineEnd:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,marginBlock:A,marginBlockStart:A,marginBlockEnd:A,marginInline:A,marginInlineStart:A,marginInlineEnd:A,fontSize:A,backgroundPositionX:A,backgroundPositionY:A,rotate:S,rotateX:S,rotateY:S,rotateZ:S,scale:p,scaleX:p,scaleY:p,scaleZ:p,skew:S,skewX:S,skewY:S,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:c,originX:V,originY:V,originZ:A,zIndex:Y,fillOpacity:c,strokeOpacity:c,numOctaves:Y},X={...H,color:k,backgroundColor:k,outlineColor:k,fill:k,stroke:k,borderColor:k,borderTopColor:k,borderRightColor:k,borderBottomColor:k,borderLeftColor:k,filter:z,WebkitFilter:z},K=t=>X[t],q=()=>({translate:0,scale:1,origin:0,originPoint:0}),G=()=>({x:q(),y:q()}),_=()=>({min:0,max:0}),Z=()=>({x:_(),y:_()}),Q=t=>!!(t&&t.getVelocity),J=new Set(["width","height","top","left","right","bottom",...l]),tt=t=>e=>e.test(t),te=[d,A,b,S,M,E,{test:t=>"auto"===t,parse:t=>t}],ti=t=>te.find(tt(t));i(41463);let tn=()=>{},ts=()=>{},tr=t=>e=>"string"==typeof e&&e.startsWith(t),to=tr("--"),ta=tr("var(--"),tl=t=>!!ta(t)&&th.test(t.split("/*")[0].trim()),th=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function tu(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}let td=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,tc=t=>180*t/Math.PI,tp=t=>tf(tc(Math.atan2(t[1],t[0]))),tm={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tp,rotateZ:tp,skewX:t=>tc(Math.atan(t[1])),skewY:t=>tc(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},tf=t=>((t%=360)<0&&(t+=360),t),tg=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ty=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),tv={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tg,scaleY:ty,scale:t=>(tg(t)+ty(t))/2,rotateX:t=>tf(tc(Math.atan2(t[6],t[5]))),rotateY:t=>tf(tc(Math.atan2(-t[2],t[0]))),rotateZ:tp,rotate:tp,skewX:t=>tc(Math.atan(t[4])),skewY:t=>tc(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tx(t){return+!!t.includes("scale")}function tw(t,e){let i,n;if(!t||"none"===t)return tx(e);let s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(s)i=tv,n=s;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=tm,n=e}if(!n)return tx(e);let r=i[e],o=n[1].split(",").map(tT);return"function"==typeof r?r(o):o[r]}function tT(t){return parseFloat(t.trim())}let tP=t=>t===d||t===A,tS=new Set(["x","y","z"]),tb=l.filter(t=>!tS.has(t)),tA={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>tw(e,"x"),y:(t,{transform:e})=>tw(e,"y")};tA.translateX=tA.x,tA.translateY=tA.y;let tE=t=>t,tM={},tV=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tC(t,e){let i=!1,n=!0,s={delta:0,timestamp:0,isProcessing:!1},r=()=>i=!0,o=tV.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,n=new Set,s=!1,r=!1,o=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function h(e){o.has(e)&&(u.schedule(e),t()),l++,e(a)}let u={schedule:(t,e=!1,r=!1)=>{let a=r&&s?i:n;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(a=t,s){r=!0;return}s=!0,[i,n]=[n,i],i.forEach(h),e,l=0,i.clear(),s=!1,r&&(r=!1,u.process(t))}};return u}(r,e?i:void 0),t),{}),{setup:a,read:l,resolveKeyframes:h,preUpdate:u,update:d,preRender:c,render:p,postRender:m}=o,f=()=>{let r=tM.useManualTiming?s.timestamp:performance.now();i=!1,tM.useManualTiming||(s.delta=n?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,a.process(s),l.process(s),h.process(s),u.process(s),d.process(s),c.process(s),p.process(s),m.process(s),s.isProcessing=!1,i&&e&&(n=!1,t(f))};return{schedule:tV.reduce((e,r)=>{let a=o[r];return e[r]=(e,r=!1,o=!1)=>(!i&&(i=!0,n=!0,s.isProcessing||t(f)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<tV.length;e++)o[tV[e]].cancel(t)},state:s,steps:o}}let{schedule:tk,cancel:tD,state:tR,steps:tL}=tC("u">typeof requestAnimationFrame?requestAnimationFrame:tE,!0),tj=new Set,tB=!1,tF=!1,tI=!1;function tO(){if(tF){let t=Array.from(tj).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e,n=(e=[],tb.forEach(i=>{let n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(+!!i.startsWith("scale")))}),e);n.length&&(i.set(t,n),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tF=!1,tB=!1,tj.forEach(t=>t.complete(tI)),tj.clear()}function tU(){tj.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tF=!0)})}class t${constructor(t,e,i,n,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(tj.add(this),tB||(tB=!0,tk.read(tU),tk.resolveKeyframes(tO))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){let s=n?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(i&&e){let n=i.readValue(e,r);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=r),n&&void 0===s&&n.set(t[0])}for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),tj.delete(this)}cancel(){"scheduled"===this.state&&(tj.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function tW(t,e){let i=K(t);return i!==z&&(i=U),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let tN=new Set(["auto","none","0"]);class tz extends t${constructor(t,e,i,n,s){super(t,e,i,n,s,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i<t.length;i++){let n=t[i];if("string"==typeof n&&tl(n=n.trim())){let s=function t(e,i,n=1){ts(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[s,r]=function(t){let e=td.exec(t);if(!e)return[,];let[,i,n,s]=e;return[`--${i??n}`,s]}(e);if(!s)return;let o=window.getComputedStyle(i).getPropertyValue(s);if(o){let t=o.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t)?parseFloat(t):t}return tl(r)?t(r,i,n+1):r}(n,e.current);void 0!==s&&(t[i]=s),i===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!J.has(i)||2!==t.length)return;let[n,s]=t,r=ti(n),o=ti(s);if(tu(n)!==tu(s)&&tA[i]){this.needsMeasurement=!0;return}if(r!==o)if(tP(r)&&tP(o))for(let e=0;e<t.length;e++){let i=t[e];"string"==typeof i&&(t[e]=parseFloat(i))}else tA[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:e}=this,i=[];for(let e=0;e<t.length;e++)(null===t[e]||function(t){if("number"==typeof t)return 0===t;if(null===t)return!0;return"none"===t||"0"===t||/^0[^.\s]+$/u.test(t)}(t[e]))&&i.push(e);i.length&&function(t,e,i){let n,s=0;for(;s<t.length&&!n;){let e=t[s];"string"==typeof e&&!tN.has(e)&&B(e).values.length&&(n=t[s]),s++}if(n&&i)for(let s of e)t[s]=tW(i,n)}(t,i,e)}measureInitialState(){let{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=tA[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;let n=e[e.length-1];void 0!==n&&t.getValue(i,n).jump(n,!1)}measureEndState(){let{element:t,name:e,unresolvedKeyframes:i}=this;if(!t||!t.current)return;let n=t.getValue(e);n&&n.jump(this.measuredOrigin,!1);let s=i.length-1,r=i[s];i[s]=tA[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,i])=>{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}function tY(t,e){-1===t.indexOf(e)&&t.push(e)}function tH(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class tX{constructor(){this.subscriptions=[]}add(t){return tY(this.subscriptions,t),()=>tH(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,i);else for(let s=0;s<n;s++){let n=this.subscriptions[s];n&&n(t,e,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}let{schedule:tK}=tC(queueMicrotask,!1);function tq(){n=void 0}let tG={now:()=>(void 0===n&&tG.set(tR.isProcessing||tM.useManualTiming?tR.timestamp:performance.now()),n),set:t=>{n=t,queueMicrotask(tq)}};class t_{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{let e=tG.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=tG.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new tX);let i=this.events[t].add(e);return"change"===t?()=>{i(),tk.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&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 a&&a.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=tG.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 tZ(t,e){return new t_(t,e)}let tQ=[...te,k,U];var tJ,t0=i(10887);let t1=new WeakMap;function t2(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function t5(t){return"string"==typeof t||Array.isArray(t)}let t3=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],t9=["initial",...t3];function t4(t){return t2(t.animate)||t9.some(e=>t5(t[e]))}function t6(t){return!!(t4(t)||t.variants)}function t8(t){let e=[{},{}];return t?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function t7(t,e,i,n){if("function"==typeof e){let[s,r]=t8(n);e=e(void 0!==i?i:t.custom,s,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[s,r]=t8(n);e=e(void 0!==i?i:t.custom,s,r)}return e}var et=i(25620);let ee=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],ei={};class en{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,skipAnimations:s,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=t$,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=tG.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,tk.render(this.render,!1,!0))};const{latestValues:l,renderState:h}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=h,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=t4(e),this.isVariantNode=t6(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==l[t]&&Q(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(let t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,t1.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((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(et.r.current||(0,t0.Uu)(),this.shouldReduceMotion=et.O.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let t in this.projection&&this.projection.unmount(),tD(this.notifyUpdate),tD(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.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,e){let i;this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let n=h.has(t);n&&this.onBindTransform&&this.onBindTransform();let s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tk.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in ei){let e=ei[t];if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<ee.length;e++){let i=ee[e];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let n=t["on"+i];n&&(this.propEventSubscriptions[i]=this.on(i,n))}this.prevMotionValues=function(t,e,i){for(let n in e){let s=e[n],r=i[n];if(Q(s))t.addValue(n,s);else if(Q(r))t.addValue(n,tZ(s,{owner:t}));else if(r!==s)if(t.hasValue(n)){let e=t.getValue(n);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{let e=t.getStaticValue(n);t.addValue(n,tZ(void 0!==e?e:s,{owner:t}))}}for(let n in i)void 0===e[n]&&t.removeValue(n);return e}(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){let e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=tZ(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];if(null!=i){let n,s;if("string"==typeof i&&(n=i,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(s=i,/^0[^.\s]+$/u.test(s))))i=parseFloat(i);else{let n;n=i,!tQ.find(tt(n))&&U.test(e)&&(i=tW(t,e))}this.setBaseTarget(t,Q(i)?i.get():i)}return Q(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e,{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let n=t7(this.props,i,this.presenceContext?.custom);n&&(e=n[t])}if(i&&void 0!==e)return e;let n=this.getBaseTargetFromProps(this.props,t);return void 0===n||Q(n)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new tX),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){tK.render(this.render)}}class es extends en{constructor(){super(...arguments),this.KeyframeResolver=tz}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){let i=t.style;return i?i[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Q(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function er(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}let eo=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ea={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},el=l.length;function eh(t,e,i){let{style:n,vars:s,transformOrigin:r}=t,o=!1,a=!1;for(let t in e){let i=e[t];if(h.has(t)){o=!0;continue}if(to(t)){s[t]=i;continue}{let e=eo(i,H[t]);t.startsWith("origin")?(a=!0,r[t]=e):n[t]=e}}if(!e.transform&&(o||i?n.transform=function(t,e,i){let n="",s=!0;for(let r=0;r<el;r++){let o=l[r],a=t[o];if(void 0===a)continue;let h=!0;if("number"==typeof a)h=a===+!!o.startsWith("scale");else{let t=parseFloat(a);h=o.startsWith("scale")?1===t:0===t}if(!h||i){let t=eo(a,H[o]);if(!h){s=!1;let e=ea[o]||o;n+=`${e}(${t}) `}i&&(e[o]=t)}}return n=n.trim(),i?n=i(e,s?"":n):s&&(n="none"),n}(e,t.transform,i):n.transform&&(n.transform="none")),a){let{originX:t="50%",originY:e="50%",originZ:i=0}=r;n.transformOrigin=`${t} ${e} ${i}`}}let eu={offset:"stroke-dashoffset",array:"stroke-dasharray"},ed={offset:"strokeDashoffset",array:"strokeDasharray"},ec=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ep(t,{attrX:e,attrY:i,attrScale:n,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},l,h,u){if(eh(t,a,h),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:d,style:c}=t;for(let t of(d.transform&&(c.transform=d.transform,delete d.transform),(c.transform||d.transformOrigin)&&(c.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),c.transform&&(c.transformBox=u?.transformBox??"fill-box",delete d.transformBox),ec))void 0!==d[t]&&(c[t]=d[t],delete d[t]);void 0!==e&&(d.x=e),void 0!==i&&(d.y=i),void 0!==n&&(d.scale=n),void 0!==s&&function(t,e,i=1,n=0,s=!0){t.pathLength=1;let r=s?eu:ed;t[r.offset]=`${-n}`,t[r.array]=`${e} ${i}`}(d,s,r,o,!1)}let em=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"]),ef=t=>"string"==typeof t&&"svg"===t.toLowerCase();function eg(t,{style:e,vars:i},n,s){let r,o=t.style;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,n),i)o.setProperty(r,i[r])}function ey(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let ev={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t)if(!A.test(t))return t;else t=parseFloat(t);let i=ey(t,e.target.x),n=ey(t,e.target.y);return`${i}% ${n}%`}},ex=(t,e,i)=>t+(e-t)*i,ew={borderRadius:{...ev,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ev,borderTopRightRadius:ev,borderBottomLeftRadius:ev,borderBottomRightRadius:ev,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=U.parse(t);if(n.length>5)return t;let s=U.createTransformer(t),r=+("number"!=typeof n[0]),o=i.x.scale*e.x,a=i.y.scale*e.y;n[0+r]/=o,n[1+r]/=a;let l=ex(o,a,.5);return"number"==typeof n[2+r]&&(n[2+r]/=l),"number"==typeof n[3+r]&&(n[3+r]/=l),s(n)}}};function eT(t,{layout:e,layoutId:i}){return h.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!ew[t]||"opacity"===t)}function eP(t,e,i){let n=t.style,s=e?.style,r={};if(!n)return r;for(let e in n)(Q(n[e])||s&&Q(s[e])||eT(e,t)||i?.getValue(e)?.liveStyle!==void 0)&&(r[e]=n[e]);return r}function eS(t,e,i){let n=eP(t,e,i);for(let i in t)(Q(t[i])||Q(e[i]))&&(n[-1!==l.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}class eb extends es{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(h.has(e)){let t=K(e);return t&&t.default||0}return e=em.has(e)?e:er(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return eS(t,e,i)}build(t,e,i){ep(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){for(let i in eg(t,e,void 0,n),e.attrs)t.setAttribute(em.has(i)?i:er(i),e.attrs[i])}mount(t){this.isSVGTag=ef(t.tagName),super.mount(t)}}function eA({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function eE(t){return void 0===t||1===t}function eM({scale:t,scaleX:e,scaleY:i}){return!eE(t)||!eE(e)||!eE(i)}function eV(t){return eM(t)||eC(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function eC(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function ek(t,e,i,n,s){return void 0!==s&&(t=n+s*(t-n)),n+i*(t-n)+e}function eD(t,e=0,i=1,n,s){t.min=ek(t.min,e,i,n,s),t.max=ek(t.max,e,i,n,s)}function eR(t,{x:e,y:i}){eD(t.x,e.translate,e.scale,e.originPoint),eD(t.y,i.translate,i.scale,i.originPoint)}function eL(t,e){t.min=t.min+e,t.max=t.max+e}function ej(t,e,i,n,s=.5){let r=ex(t.min,t.max,s);eD(t,e,i,r,n)}function eB(t,e){ej(t.x,e.x,e.scaleX,e.scale,e.originX),ej(t.y,e.y,e.scaleY,e.scale,e.originY)}function eF(t,e){return eA(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}class eI extends es{constructor(){super(...arguments),this.type="html",this.renderInstance=eg}readValueFromInstance(t,e){if(h.has(e))return this.projection?.isProjecting?tx(e):((t,e)=>{let{transform:i="none"}=getComputedStyle(t);return tw(i,e)})(t,e);{let i=window.getComputedStyle(t),n=(to(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return eF(t,e)}build(t,e,i){eh(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return eP(t,e,i)}}var eO=i(12115);let eU=["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 e$(t){if("string"!=typeof t||t.includes("-"));else if(eU.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}var eW=i(95155),eN=i(39551);let ez=(0,eO.createContext)({strict:!1});var eY=i(24866);let eH=(0,eO.createContext)({});function eX(t){return Array.isArray(t)?t.join(" "):t}let eK=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function eq(t,e,i){for(let n in e)Q(e[n])||eT(n,i)||(t[n]=e[n])}let eG=()=>({...eK(),attrs:{}}),e_=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function eZ(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||e_.has(t)}let eQ=t=>!eZ(t);try{tJ=require("@emotion/is-prop-valid").default,"function"==typeof tJ&&(eQ=t=>t.startsWith("on")?!eZ(t):tJ(t))}catch{}function eJ(t){return Q(t)?t.get():t}var e0=i(15131),e1=i(28819);let e2=t=>(e,i)=>{let n=(0,eO.useContext)(eH),s=(0,eO.useContext)(e0.t),r=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e},i,n,s){return{latestValues:function(t,e,i,n){let s={},r=n(t,{});for(let t in r)s[t]=eJ(r[t]);let{initial:o,animate:a}=t,l=t4(t),h=t6(t);e&&h&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let u=!!i&&!1===i.initial,d=(u=u||!1===o)?a:o;if(d&&"boolean"!=typeof d&&!t2(d)){let e=Array.isArray(d)?d:[d];for(let i=0;i<e.length;i++){let n=t7(t,e[i]);if(n){let{transitionEnd:t,transition:e,...i}=n;for(let t in i){let e=i[t];if(Array.isArray(e)){let t=u?e.length-1:0;e=e[t]}null!==e&&(s[t]=e)}for(let e in t)s[e]=t[e]}}}return s}(i,n,s,t),renderState:e()}})(t,e,n,s);return i?r():(0,e1.M)(r)},e5=e2({scrapeMotionValuesFromProps:eP,createRenderState:eK}),e3=e2({scrapeMotionValuesFromProps:eS,createRenderState:eG});var e9=i(24846);let e4={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"]},e6=!1;function e8(){return!function(){if(e6)return;let t={};for(let e in e4)t[e]={isEnabled:t=>e4[e].some(e=>!!t[e])};ei=t,e6=!0}(),ei}let e7=Symbol.for("motionComponentSymbol"),it="data-"+er("framerAppearId"),ie=(0,eO.createContext)({});function ii(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}var is=i(4524);function ir(t,{forwardMotionProps:e=!1,type:i}={},n,s){n&&function(t){let e=e8();for(let i in t)e[i]={...e[i],...t[i]};ei=e}(n);let r=i?"svg"===i:e$(t),o=r?e3:e5;function a(i,n){var a;let l,h,u,d={...(0,eO.useContext)(eY.Q),...i,layoutId:function({layoutId:t}){let e=(0,eO.useContext)(eN.L).id;return e&&void 0!==t?e+"-"+t:t}(i)},{isStatic:c}=d,p=function(t){let{initial:e,animate:i}=function(t,e){if(t4(t)){let{initial:e,animate:i}=t;return{initial:!1===e||t5(e)?e:void 0,animate:t5(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,eO.useContext)(eH));return(0,eO.useMemo)(()=>({initial:e,animate:i}),[eX(e),eX(i)])}(i),m=o(i,c);if(!c&&e9.B){(0,eO.useContext)(ez).strict;let e=function(t){let{drag:e,layout:i}=e8();if(!e&&!i)return{};let n={...e,...i};return{MeasureLayout:e?.isEnabled(t)||i?.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(d);l=e.MeasureLayout,p.visualElement=function(t,e,i,n,s,r){let{visualElement:o}=(0,eO.useContext)(eH),a=(0,eO.useContext)(ez),l=(0,eO.useContext)(e0.t),h=(0,eO.useContext)(eY.Q),u=h.reducedMotion,d=h.skipAnimations,c=(0,eO.useRef)(null),p=(0,eO.useRef)(!1);n=n||a.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:o,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u,skipAnimations:d,isSVG:r}),p.current&&c.current&&(c.current.manuallyAnimateOnMount=!0));let m=c.current,f=(0,eO.useContext)(ie);m&&!m.projection&&s&&("html"===m.type||"svg"===m.type)&&function(t,e,i,n){let{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:h,layoutCrossfade:u}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&ii(a),visualElement:t,animationType:"string"==typeof r?r:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:l,layoutRoot:h})}(c.current,i,s,f);let g=(0,eO.useRef)(!1);(0,eO.useInsertionEffect)(()=>{m&&g.current&&m.update(i,l)});let y=i[it],v=(0,eO.useRef)(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return(0,is.E)(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,eO.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),m.enteringChildren=void 0)}),m}(t,m,d,s,e.ProjectionNode,r)}return(0,eW.jsxs)(eH.Provider,{value:p,children:[l&&p.visualElement?(0,eW.jsx)(l,{visualElement:p.visualElement,...d}):null,function(t,e,i,{latestValues:n},s,r=!1,o){let a=(o??e$(t)?function(t,e,i,n){let s=(0,eO.useMemo)(()=>{let i=eG();return ep(i,e,ef(n),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};eq(e,t.style,t),s.style={...e,...s.style}}return s}:function(t,e){let i,n,s={},r=(i=t.style||{},eq(n={},i,t),Object.assign(n,function({transformTemplate:t},e){return(0,eO.useMemo)(()=>{let i=eK();return eh(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=r,s})(e,n,s,t),l=function(t,e,i){let n={};for(let s in t)("values"!==s||"object"!=typeof t.values)&&(eQ(s)||!0===i&&eZ(s)||!e&&!eZ(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}(e,"string"==typeof t,r),h=t!==eO.Fragment?{...l,...a,ref:i}:{},{children:u}=e,d=(0,eO.useMemo)(()=>Q(u)?u.get():u,[u]);return(0,eO.createElement)(t,{...h,children:d})}(t,i,(a=p.visualElement,h=(0,eO.useRef)(n),(0,eO.useInsertionEffect)(()=>{h.current=n}),u=(0,eO.useRef)(null),(0,eO.useCallback)(t=>{t&&m.onMount?.(t),a&&(t?a.mount(t):a.unmount());let e=h.current;if("function"==typeof e)if(t){let i=e(t);"function"==typeof i&&(u.current=i)}else u.current?(u.current(),u.current=null):e(t);else e&&(e.current=t)},[a])),m,c,e,r)]})}a.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;let l=(0,eO.forwardRef)(a);return l[e7]=t,l}class io{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ia(t,e,i){let n=t.getProps();return t7(n,e,void 0!==i?i:n.custom,t)}function il(t,e){if(t?.inherit&&e){let{inherit:i,...n}=t;return{...e,...n}}return t}function ih(t,e){let i=t?.[e]??t?.default??t;return i!==t?il(i,t):i}let iu=t=>Array.isArray(t);function id(t,e){let i=t.getValue("willChange");if(Q(i)&&i.add)return i.add(e);if(!i&&tM.WillChange){let i=new tM.WillChange("auto");t.addValue("willChange",i),i.add(e)}}let ic=t=>1e3*t,ip=(t,e)=>i=>e(t(i)),im=(...t)=>t.reduce(ip),ig={layout:0,mainThread:0,waapi:0};function iy(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function iv(t,e){return i=>i>0?e:t}let ix=(t,e,i)=>{let n=t*t,s=i*(e*e-n)+n;return s<0?0:Math.sqrt(s)},iw=[T,w,C];function iT(t){let e=iw.find(e=>e.test(t));if(tn(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let i=e.parse(t);return e===C&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let s=0,r=0,o=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,a=2*i-n;s=iy(a,n,t+1/3),r=iy(a,n,t),o=iy(a,n,t-1/3)}else s=r=o=i;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:n}}(i)),i}let iP=(t,e)=>{let i=iT(t),n=iT(e);if(!i||!n)return iv(t,e);let s={...i};return t=>(s.red=ix(i.red,n.red,t),s.green=ix(i.green,n.green,t),s.blue=ix(i.blue,n.blue,t),s.alpha=ex(i.alpha,n.alpha,t),w.transform(s))},iS=new Set(["none","hidden"]);function ib(t,e){return i=>ex(t,e,i)}function iA(t){return"number"==typeof t?ib:"string"==typeof t?tl(t)?iv:k.test(t)?iP:iV:Array.isArray(t)?iE:"object"==typeof t?k.test(t)?iP:iM:iv}function iE(t,e){let i=[...t],n=i.length,s=t.map((t,i)=>iA(t)(t,e[i]));return t=>{for(let e=0;e<n;e++)i[e]=s[e](t);return i}}function iM(t,e){let i={...t,...e},n={};for(let s in i)void 0!==t[s]&&void 0!==e[s]&&(n[s]=iA(t[s])(t[s],e[s]));return t=>{for(let e in n)i[e]=n[e](t);return i}}let iV=(t,e)=>{let i=U.createTransformer(e),n=B(t),s=B(e);if(!(n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length))return tn(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),iv(t,e);if(iS.has(t)&&!s.values.length||iS.has(e)&&!n.values.length)return iS.has(t)?i=>i<=0?t:e:i=>i>=1?e:t;return im(iE(function(t,e){let i=[],n={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){let r=e.types[s],o=t.indexes[r][n[r]],a=t.values[o]??0;i[s]=a,n[r]++}return i}(n,s),s.values),i)};function iC(t,e,i){return"number"==typeof t&&"number"==typeof e&&"number"==typeof i?ex(t,e,i):iA(t)(t,e)}let ik=t=>{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>tk.update(e,t),stop:()=>tD(e),now:()=>tR.isProcessing?tR.timestamp:tG.now()}},iD=(t,e,i=10)=>{let n="",s=Math.max(Math.round(e/i),2);for(let e=0;e<s;e++)n+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function iR(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}function iL(t,e,i){var n,s;let r=Math.max(e-5,0);return n=i-t(r),(s=e-r)?1e3/s*n:0}let ij=.01,iB=2,iF=.005,iI=.5;function iO(t,e){return t*Math.sqrt(1-e*e)}let iU=["duration","bounce"],i$=["stiffness","damping","mass"];function iW(t,e){return e.some(e=>void 0!==t[e])}function iN(t=.3,e=.3){let i,n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:s,restDelta:r}=n,o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:h,damping:d,mass:c,duration:p,velocity:m,isResolvedFromDuration:f}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!iW(t,i$)&&iW(t,iU))if(t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),n=i*i,s=2*u(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:1,stiffness:n,damping:s}}else{let i=function({duration:t=800,bounce:e=.3,velocity:i=0,mass:n=1}){let s,r;tn(t<=ic(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=u(.05,1,o),t=u(.01,10,t/1e3),o<1?(s=e=>{let n=e*o,s=n*t;return .001-(n-i)/iO(e,o)*Math.exp(-s)},r=e=>{let n=e*o*t,r=Math.pow(o,2)*Math.pow(e,2)*t,a=Math.exp(-n),l=iO(Math.pow(e,2),o);return(n*i+i-r)*a*(-s(e)+.001>0?-1:1)/l}):(s=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),r=e=>t*t*(i-e)*Math.exp(-e*t));let a=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(s,r,5/t);if(t=ic(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{let e=Math.pow(a,2)*n;return{stiffness:e,damping:2*o*Math.sqrt(n*e),duration:t}}}(t);(e={...e,...i,mass:1}).isResolvedFromDuration=!0}return e}({...n,velocity:-((n.velocity||0)/1e3)}),g=m||0,y=d/(2*Math.sqrt(h*c)),v=a-o,x=Math.sqrt(h/c)/1e3,w=5>Math.abs(v);if(s||(s=w?ij:iB),r||(r=w?iF:iI),y<1){let t=iO(x,y);i=e=>a-Math.exp(-y*x*e)*((g+y*x*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}else if(1===y)i=t=>a-Math.exp(-x*t)*(v+(g+x*v)*t);else{let t=x*Math.sqrt(y*y-1);i=e=>{let i=Math.exp(-y*x*e),n=Math.min(t*e,300);return a-i*((g+y*x*v)*Math.sinh(n)+t*v*Math.cosh(n))/t}}let T={calculatedDuration:f&&p||null,next:t=>{let e=i(t);if(f)l.done=t>=p;else{let n=0===t?g:0;y<1&&(n=0===t?ic(g):iL(i,t,e));let o=Math.abs(a-e)<=r;l.done=Math.abs(n)<=s&&o}return l.value=l.done?a:e,l},toString:()=>{let t=Math.min(iR(T),2e4),e=iD(e=>T.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return T}function iz({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:h=.5,restSpeed:u}){let d,c,p=t[0],m={done:!1,value:p},f=i*e,g=p+f,y=void 0===o?g:o(g);y!==g&&(f=y-p);let v=t=>-f*Math.exp(-t/n),x=t=>y+v(t),w=t=>{let e=v(t),i=x(t);m.done=Math.abs(e)<=h,m.value=m.done?y:i},T=t=>{let e;if(e=m.value,void 0!==a&&e<a||void 0!==l&&e>l){var i;d=t,c=iN({keyframes:[m.value,(i=m.value,void 0===a?l:void 0===l||Math.abs(a-i)<Math.abs(l-i)?a:l)],velocity:iL(x,t,m.value),damping:s,stiffness:r,restDelta:h,restSpeed:u})}};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return(c||void 0!==d||(e=!0,w(t),T(t)),void 0!==d&&t>=d)?c.next(t-d):(e||w(t),m)}}}iN.applyToOptions=t=>{let e=function(t,e=100,i){let n=i({...t,keyframes:[0,e]}),s=Math.min(iR(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:s/1e3}}(t,100,iN);return t.ease=e.ease,t.duration=ic(e.duration),t.type="keyframes",t};let iY=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function iH(t,e,i,n){return t===e&&i===n?tE:s=>0===s||1===s?s:iY(function(t,e,i,n,s){let r,o,a=0;do(r=iY(o=e+(i-e)/2,n,s)-t)>0?i=o:e=o;while(Math.abs(r)>1e-7&&++a<12);return o}(s,0,1,t,i),e,n)}let iX=iH(.42,0,1,1),iK=iH(0,0,.58,1),iq=iH(.42,0,.58,1),iG=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,i_=t=>e=>1-t(1-e),iZ=iH(.33,1.53,.69,.99),iQ=i_(iZ),iJ=iG(iQ),i0=t=>(t*=2)<1?.5*iQ(t):.5*(2-Math.pow(2,-10*(t-1))),i1=t=>1-Math.sin(Math.acos(t)),i2=i_(i1),i5=iG(i1),i3=t=>Array.isArray(t)&&"number"==typeof t[0],i9={linear:tE,easeIn:iX,easeInOut:iq,easeOut:iK,circIn:i1,circInOut:i5,circOut:i2,backIn:iQ,backInOut:iJ,backOut:iZ,anticipate:i0},i4=t=>{if(i3(t)){ts(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,i,n,s]=t;return iH(e,i,n,s)}return"string"==typeof t?(ts(void 0!==i9[t],`Invalid easing type '${t}'`,"invalid-easing-type"),i9[t]):t},i6=(t,e,i)=>{let n=e-t;return 0===n?1:(i-t)/n};function i8({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){var s;let r,o=Array.isArray(n)&&"number"!=typeof n[0]?n.map(i4):i4(n),a={done:!1,value:e[0]},l=function(t,e,{clamp:i=!0,ease:n,mixer:s}={}){let r=t.length;if(ts(r===e.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];let o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=function(t,e,i){let n=[],s=i||tM.mix||iC,r=t.length-1;for(let i=0;i<r;i++){let r=s(t[i],t[i+1]);e&&(r=im(Array.isArray(e)?e[i]||tE:e,r)),n.push(r)}return n}(e,n,s),l=a.length,h=i=>{if(o&&i<t[0])return e[0];let n=0;if(l>1)for(;n<t.length-2&&!(i<t[n+1]);n++);let s=i6(t[n],t[n+1],i);return a[n](s)};return i?e=>h(u(t[0],t[r-1],e)):h}((s=i&&i.length===e.length?i:(!function(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let s=i6(0,e,n);t.push(ex(i,1,s))}}(r=[0],e.length-1),r),s.map(e=>e*t)),e,{ease:Array.isArray(o)?o:e.map(()=>o||iq).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(a.value=l(e),a.done=e>=t,a)}}let i7=t=>null!==t;function nt(t,{repeat:e,repeatType:i="loop"},n,s=1){let r=t.filter(i7),o=s<0||e&&"loop"!==i&&e%2==1?0:r.length-1;return o&&void 0!==n?n:r[o]}let ne={decay:iz,inertia:iz,tween:i8,keyframes:i8,spring:iN};function ni(t){"string"==typeof t.type&&(t.type=ne[t.type])}class nn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}let ns=t=>t/100;class nr extends nn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==tG.now()&&this.tick(tG.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},ig.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;ni(t);let{type:e=i8,repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:r=0}=t,{keyframes:o}=t,a=e||i8;a!==i8&&"number"!=typeof o[0]&&(this.mixKeyframes=im(ns,iC(o[0],o[1])),o=[0,100]);let l=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=iR(l));let{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let{generator:i,totalDuration:n,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return i.next(0);let{delay:l=0,keyframes:h,repeat:d,repeatType:c,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>n;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let x=this.currentTime,w=i;if(d){let t=Math.min(this.currentTime,n)/o,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,d+1))%2&&("reverse"===c?(i=1-i,p&&(i-=p/o)):"mirror"===c&&(w=r)),x=u(0,1,i)*o}let T=v?{done:!1,value:h[0]}:w.next(x);s&&(T.value=s(T.value));let{done:P}=T;v||null===a||(P=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&P);return S&&m!==iz&&(T.value=nt(h,this.options,g,this.speed)),f&&f(T.value),S&&this.finish(),T}then(t,e){return this.finished.then(t,e)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+t/1e3}get time(){return this.currentTime/1e3}set time(t){t=ic(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?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(tG.now());let e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:t=ik,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tG.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,ig.mainThread--}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 no(t){let e;return()=>(void 0===e&&(e=t()),e)}let na=no(()=>void 0!==window.ScrollTimeline),nl={},nh=(o=no(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),()=>nl.linearEasing??o()),nu=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,nd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:nu([0,.65,.55,1]),circOut:nu([.55,0,1,.45]),backIn:nu([.31,.01,.66,-.59]),backOut:nu([.33,1.53,.69,.99])};function nc(t){return"function"==typeof t&&"applyToOptions"in t}class np extends nn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:i,keyframes:n,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=t,ts("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return nc(t)&&nh()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:n=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},h){let u={[e]:i};l&&(u.offset=l);let d=function t(e,i){if(e)return"function"==typeof e?nh()?iD(e,i):"ease-out":i3(e)?nu(e):Array.isArray(e)?e.map(e=>t(e,i)||nd.easeOut):nd[e]}(a,s);Array.isArray(d)&&(u.easing=d);let c={delay:n,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};h&&(c.pseudoElement=h);let p=t.animate(u,c);return p}(e,i,n,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let t=nt(n,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):i.startsWith("--")?e.style.setProperty(i,t):e.style[i]=t,this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+t/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ic(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&na())?(this.animation.timeline=t,tE):e(this)}}let nm={anticipate:i0,backInOut:iJ,circInOut:i5};class nf extends np{constructor(t){!function(t){"string"==typeof t.ease&&t.ease in nm&&(t.ease=nm[t.ease])}(t),ni(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:n,element:s,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);let o=new nr({...r,autoplay:!1}),a=Math.max(10,tG.now()-this.startTime),l=u(0,10,a-10);e.setWithVelocity(o.sample(Math.max(0,a-l)).value,o.sample(a).value,l),o.stop()}}let ng=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(U.test(t)||"0"===t)&&!t.startsWith("url("));function ny(t){t.duration=0,t.type="keyframes"}let nv=new Set(["opacity","clipPath","filter","transform"]),nx=no(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class nw extends nn{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:h,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tG.now();const d={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:s,repeatType:r,name:a,motionValue:l,element:h,...u},c=h?.KeyframeResolver||t$;this.keyframeResolver=new c(o,(t,e,i)=>this.onKeyframesResolved(t,e,d,!i),a,l,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){this.keyframeResolver=void 0;let{name:s,type:r,velocity:o,delay:a,isHandoff:l,onUpdate:h}=i;this.resolvedAt=tG.now(),!function(t,e,i,n){let s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;let r=t[t.length-1],o=ng(s,e),a=ng(r,e);return tn(o===a,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!!o&&!!a&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}(t)||("spring"===i||nc(i))&&n)}(t,s,r,o)&&((tM.instantAnimations||!a)&&h?.(nt(t,i,e)),t[0]=t[t.length-1],ny(i),i.repeat=0);let u={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},d=!l&&function(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:s,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:a,transformTemplate:l}=e.owner.getProps();return nx()&&i&&nv.has(i)&&("transform"!==i||!l)&&!a&&!n&&"mirror"!==s&&0!==r&&"inertia"!==o}(u),c=u.motionValue?.owner?.current,p=d?new nf({...u,element:c}):new nr(u);p.finished.then(()=>{this.notifyFinished()}).catch(tE),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tI=!0,tU(),tO(),tI=!1),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()}}let nT={type:"spring",stiffness:500,damping:25,restSpeed:10},nP={type:"keyframes",duration:.8},nS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nb=t=>null!==t,nA=(t,e,i,n={},s,r)=>o=>{let a=ih(n,t)||{},l=a.delay||n.delay||0,{elapsed:u=0}=n;u-=ic(l);let d={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};!function({when:t,delay:e,delayChildren:i,staggerChildren:n,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:h,...u}){return!!Object.keys(u).length}(a)&&Object.assign(d,((t,{keyframes:e})=>e.length>2?nP:h.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:nT:nS)(t,d)),d.duration&&(d.duration=ic(d.duration)),d.repeatDelay&&(d.repeatDelay=ic(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let c=!1;if(!1!==d.type&&(0!==d.duration||d.repeatDelay)||(ny(d),0===d.delay&&(c=!0)),(tM.instantAnimations||tM.skipAnimations||s?.shouldSkipAnimations)&&(c=!0,ny(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,c&&!r&&void 0!==e.get()){let t=function(t,{repeat:e,repeatType:i="loop"},n){let s=t.filter(nb),r=e&&"loop"!==i&&e%2==1?0:s.length-1;return s[r]}(d.keyframes,a);if(void 0!==t)return void tk.update(()=>{d.onUpdate(t),d.onComplete()})}return a.isSync?new nr(d):new nw(d)};function nE(t,e,{delay:i=0,transitionOverride:n,type:s}={}){let{transition:r,transitionEnd:o,...a}=e,l=t.getDefaultTransition();r=r?il(r,l):l;let h=r?.reduceMotion;n&&(r=n);let u=[],d=s&&t.animationState&&t.animationState.getState()[s];for(let e in a){let n=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&function({protectedKeys:t,needsAnimating:e},i){let n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}(d,e))continue;let o={delay:i,...ih(r||{},e)},l=n.get();if(void 0!==l&&!n.isAnimating&&!Array.isArray(s)&&s===l&&!o.velocity)continue;let c=!1;if(window.MotionHandoffAnimation){let i=t.props[it];if(i){let t=window.MotionHandoffAnimation(i,e,tk);null!==t&&(o.startTime=t,c=!0)}}id(t,e);let p=h??t.shouldReduceMotion;n.start(nA(e,n,s,p&&J.has(e)?{type:!1}:o,t,c));let m=n.animation;m&&u.push(m)}if(o){let e=()=>tk.update(()=>{o&&function(t,e){let{transitionEnd:i={},transition:n={},...s}=ia(t,e)||{};for(let e in s={...s,...i}){var r;let i=iu(r=s[e])?r[r.length-1]||0:r;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,tZ(i))}}(t,o)});u.length?Promise.all(u).then(e):e()}return u}function nM(t,e,i,n=0,s=1){let r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*n;return"function"==typeof i?i(r,o):1===s?r*n:a-r*n}function nV(t,e,i={}){let n=ia(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:s=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(s=i.transitionOverride);let r=n?()=>Promise.all(nE(t,n,i)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,i=0,n=0,s=0,r=1,o){let a=[];for(let l of t.variantChildren)l.notify("AnimationStart",e),a.push(nV(l,e,{...o,delay:i+("function"==typeof n?0:n)+nM(t.variantChildren,l,n,s,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,n,r,o,a,i)}:()=>Promise.resolve(),{when:a}=s;if(!a)return Promise.all([r(),o(i.delay)]);{let[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}}let nC=t9.length;function nk(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}let nD=[...t3].reverse(),nR=t3.length;function nL(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nj(){return{animate:nL(!0),whileInView:nL(),whileHover:nL(),whileTap:nL(),whileDrag:nL(),whileFocus:nL(),exit:nL()}}class nB extends io{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e))n=Promise.all(e.map(e=>nV(t,e,i)));else if("string"==typeof e)n=nV(t,e,i);else{let s="function"==typeof e?ia(t,e,i.custom):e;n=Promise.all(nE(t,s,i))}return n.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=nj(),n=!0,s=e=>(i,n)=>{let s=ia(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(s){let{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function r(r){let{props:o}=t,a=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;t<nC;t++){let n=t9[t],s=e.props[n];(t5(s)||!1===s)&&(i[n]=s)}return i}(t.parent)||{},l=[],h=new Set,u={},d=1/0;for(let e=0;e<nR;e++){var c,p;let m=nD[e],f=i[m],g=void 0!==o[m]?o[m]:a[m],y=t5(g),v=m===r?f.isActive:null;!1===v&&(d=e);let x=g===a[m]&&g!==o[m]&&y;if(x&&n&&t.manuallyAnimateOnMount&&(x=!1),f.protectedKeys={...u},!f.isActive&&null===v||!g&&!f.prevProp||t2(g)||"boolean"==typeof g)continue;let w=(c=f.prevProp,"string"==typeof(p=g)?p!==c:!!Array.isArray(p)&&!nk(p,c)),T=w||m===r&&f.isActive&&!x&&y||e>d&&y,P=!1,S=Array.isArray(g)?g:[g],b=S.reduce(s(m),{});!1===v&&(b={});let{prevResolvedValues:A={}}=f,E={...A,...b},M=e=>{T=!0,h.has(e)&&(P=!0,h.delete(e)),f.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in E){let e=b[t],i=A[t];if(!u.hasOwnProperty(t))(iu(e)&&iu(i)?nk(e,i):e===i)?void 0!==e&&h.has(t)?M(t):f.protectedKeys[t]=!0:null!=e?M(t):h.add(t)}f.prevProp=g,f.prevResolvedValues=b,f.isActive&&(u={...u,...b}),n&&t.blockInitialAnimation&&(T=!1);let V=x&&w,C=!V||P;T&&C&&l.push(...S.map(e=>{let i={type:m};if("string"==typeof e&&n&&!V&&t.manuallyAnimateOnMount&&t.parent){let{parent:n}=t,s=ia(n,e);if(n.enteringChildren&&s){let{delayChildren:e}=s.transition||{};i.delay=nM(n.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(h.size){let e={};if("boolean"!=typeof o.initial){let i=ia(t,Array.isArray(o.initial)?o.initial[0]:o.initial);i&&i.transition&&(e.transition=i.transition)}h.forEach(i=>{let n=t.getBaseTarget(i),s=t.getValue(i);s&&(s.liveStyle=!0),e[i]=n??null}),l.push({animation:e})}let m=!!l.length;return n&&(!1===o.initial||o.initial===o.animate)&&!t.manuallyAnimateOnMount&&(m=!1),n=!1,m?e(l):Promise.resolve()}return{animateChanges:r,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;let s=r(e);for(let t in i)i[t].protectedKeys={};return s},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=nj()}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();t2(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let nF=0;class nI extends io{constructor(){super(...arguments),this.id=nF++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;let n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}let nO={x:!1,y:!1};function nU(t){return[t("x"),t("y")]}function n$(t){return t.max-t.min}function nW(t,e,i,n=.5){t.origin=n,t.originPoint=ex(e.min,e.max,t.origin),t.scale=n$(i)/n$(e),t.translate=ex(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function nN(t,e,i,n){nW(t.x,e.x,i.x,n?n.originX:void 0),nW(t.y,e.y,i.y,n?n.originY:void 0)}function nz(t,e,i){t.min=i.min+e.min,t.max=t.min+n$(e)}function nY(t,e,i){t.min=e.min-i.min,t.max=t.min+n$(e)}function nH(t,e,i){nY(t.x,e.x,i.x),nY(t.y,e.y,i.y)}let nX=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),nK=new Set(["INPUT","SELECT","TEXTAREA"]);function nq(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}var nG=i(94601);function n_(t){return(0,nG.G)(t)&&"ownerSVGElement"in t}function nZ(t,e,i){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let n=document;e&&(n=e.current);let s=i?.[t]??n.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}let nQ=new WeakMap,nJ=(t,e,i)=>(n,s)=>s&&s[0]?s[0][t+"Size"]:n_(n)&&"getBBox"in n?n.getBBox()[e]:n[i],n0=nJ("inline","width","offsetWidth"),n1=nJ("block","height","offsetHeight");function n2({target:t,borderBoxSize:e}){nQ.get(t)?.forEach(i=>{i(t,{get width(){return n0(t,e)},get height(){return n1(t,e)}})})}function n5(t){t.forEach(n2)}let n3=new Set;function n9(t,e){let i;return"function"==typeof t?(n3.add(t),r||(r=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};n3.forEach(e=>e(t))},window.addEventListener("resize",r)),()=>{n3.delete(t),n3.size||"function"!=typeof r||(window.removeEventListener("resize",r),r=void 0)}):(!s&&"u">typeof ResizeObserver&&(s=new ResizeObserver(n5)),(i=nZ(t)).forEach(t=>{let i=nQ.get(t);i||(i=new Set,nQ.set(t,i)),i.add(e),s?.observe(t)}),()=>{i.forEach(t=>{let i=nQ.get(t);i?.delete(e),i?.size||s?.unobserve(t)})})}let n4=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function n6(t){return{point:{x:t.pageX,y:t.pageY}}}function n8(t,e,i,n){return nq(t,e,t=>n4(t)&&i(t,n6(t)),n)}let n7=({current:t})=>t?t.ownerDocument.defaultView:null,st=(t,e)=>Math.abs(t-e),se=new Set(["auto","scroll"]);class si{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:s=!1,distanceThreshold:r=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let i=sr(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,s=(t=i.offset,e={x:0,y:0},Math.sqrt(st(t.x,e.x)**2+st(t.y,e.y)**2)>=this.distanceThreshold);if(!n&&!s)return;let{point:r}=i,{timestamp:o}=tR;this.history.push({...r,timestamp:o});let{onStart:a,onMove:l}=this.handlers;n||(a&&a(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=sn(e,this.transformPagePoint),tk.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:s}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&s&&s(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=sr("pointercancel"===t.type?this.lastMoveEventInfo:sn(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,r),n&&n(t,r)},!n4(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=n||window;const a=sn(n6(t),this.transformPagePoint),{point:l}=a,{timestamp:h}=tR;this.history=[{...l,timestamp:h}];const{onSessionStart:u}=e;u&&u(t,sr(a,this.history)),this.removeListeners=im(n8(this.contextWindow,"pointermove",this.handlePointerMove),n8(this.contextWindow,"pointerup",this.handlePointerUp),n8(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(t){let e=t.parentElement;for(;e;){let t=getComputedStyle(e);(se.has(t.overflowX)||se.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let e=this.scrollPositions.get(t);if(!e)return;let i=t===window,n=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:n.x-e.x,y:n.y-e.y};(0!==s.x||0!==s.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,n),tk.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),tD(this.updatePoint)}}function sn(t,e){return e?{point:e(t.point)}:t}function ss(t,e){return{x:t.x-e.x,y:t.y-e.y}}function sr({point:t},e){return{point:t,delta:ss(t,so(e)),offset:ss(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null,s=so(t);for(;i>=0&&(n=t[i],!(s.timestamp-n.timestamp>ic(.1)));)i--;if(!n)return{x:0,y:0};n===t[0]&&t.length>2&&s.timestamp-n.timestamp>2*ic(.1)&&(n=t[1]);let r=(s.timestamp-n.timestamp)/1e3;if(0===r)return{x:0,y:0};let o={x:(s.x-n.x)/r,y:(s.y-n.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,.1)}}function so(t){return t[t.length-1]}function sa(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function sl(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,n]=[n,i]),{min:i,max:n}}function sh(t,e,i){return{min:su(t,e),max:su(t,i)}}function su(t,e){return"number"==typeof t?t:t[e]||0}let sd=new WeakMap;class sc{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=Z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:i}={}){let{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;let s=t=>{e&&this.snapToCursor(n6(t).point),this.stopAnimation()},r=(t,e)=>{let{drag:i,dragPropagation:n,onDragStart:s}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){if("x"===t||"y"===t)if(nO[t])return null;else return nO[t]=!0,()=>{nO[t]=!1};return nO.x||nO.y?null:(nO.x=nO.y=!0,()=>{nO.x=nO.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nU(t=>{let e=this.getAxisMotionValue(t).get()||0;if(b.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[t];n&&(e=n$(n)*(parseFloat(e)/100))}}this.originPoint[t]=e}),s&&tk.update(()=>s(t,e),!1,!0),id(this.visualElement,"transform");let{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},o=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:s,onDrag:r}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:o}=e;if(n&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&s&&s(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),r&&tk.update(()=>r(t,e),!1,!0)},a=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:h}=this.getProps();this.panSession=new si(t,{onSessionStart:s,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:i,contextWindow:n7(this.visualElement),element:this.visualElement.current})}stop(t,e){let i=t||this.latestPointerEvent,n=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!n||!i)return;let{velocity:r}=n;this.startAnimation(r);let{onDragEnd:o}=this.getProps();o&&tk.postRender(()=>o(i,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,i){let{drag:n}=this.getProps();if(!i||!sm(t,n,this.currentDirection))return;let s=this.getAxisMotionValue(t),r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:i},n){return void 0!==e&&t<e?t=n?ex(e,t,n.min):Math.max(t,e):void 0!==i&&t>i&&(t=n?ex(i,t,n.max):Math.min(t,i)),t}(r,this.constraints[t],this.elastic[t])),s.set(r)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&ii(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:n,right:s}){return{x:sa(t.x,i,s),y:sa(t.y,e,n)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:sh(t,"left","right"),y:sh(t,"top","bottom")}}(e),n!==this.constraints&&!ii(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&nU(t=>{var e,n;let s;!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=(e=i.layoutBox[t],n=this.constraints[t],s={},void 0!==n.min&&(s.min=n.min-e.min),void 0!==n.max&&(s.max=n.max-e.min),s))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!ii(e))return!1;let n=e.current;ts(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:s}=this.visualElement;if(!s||!s.layout)return!1;let r=function(t,e,i){let n=eF(t,i),{scroll:s}=e;return s&&(eL(n.x,s.offset.x),eL(n.y,s.offset.y)),n}(n,s.root,this.visualElement.getTransformPagePoint()),o=(t=s.layout.layoutBox,{x:sl(t.x,r.x),y:sl(t.y,r.y)});if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=eA(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:n,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(nU(o=>{if(!sm(o,e,this.currentDirection))return;let l=a&&a[o]||{};r&&(l={min:0,max:0});let h={type:"inertia",velocity:i?t[o]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(o,h)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return id(this.visualElement,t),i.start(nA(t,i,0,e,this.visualElement,!1))}stopAnimation(){nU(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){nU(e=>{let{drag:i}=this.getProps();if(!sm(e,i,this.currentDirection))return;let{projection:n}=this.visualElement,s=this.getAxisMotionValue(e);if(n&&n.layout){let{min:i,max:r}=n.layout.layoutBox[e],o=s.get()||0;s.set(t[e]-ex(i,r,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!ii(e)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};nU(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){var i,s;let r,o,a,l=e.get();n[t]=(i={min:l,max:l},s=this.constraints[t],r=.5,o=n$(i),(a=n$(s))>o?r=i6(s.min,s.max-o,i.min):o>a&&(r=i6(i.min,i.max-a,s.min)),u(0,1,r))}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),nU(e=>{if(!sm(e,t,null))return;let i=this.getAxisMotionValue(e),{min:s,max:r}=this.constraints[e];i.set(ex(s,r,n[e]))}),this.visualElement.render()}addListeners(){let t;if(!this.visualElement.current)return;sd.set(this.visualElement,this);let e=this.visualElement.current,i=n8(e,"pointerdown",t=>{let{drag:i,dragListener:n=!0}=this.getProps(),s=t.target,r=s!==e&&(nK.has(s.tagName)||!0===s.isContentEditable);i&&n&&!r&&this.start(t)}),n=()=>{var i,n,s;let r,o,{dragConstraints:a}=this.getProps();ii(a)&&a.current&&(this.constraints=this.resolveRefConstraints(),t||(i=e,n=a.current,r=n9(i,sp(s=()=>this.scalePositionWithinConstraints())),o=n9(n,sp(s)),t=()=>{r(),o()}))},{projection:s}=this.visualElement,r=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),tk.read(n);let o=nq(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(nU(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{o(),i(),r(),a&&a(),t&&t()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:s=!1,dragElastic:r=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:s,dragElastic:r,dragMomentum:o}}}function sp(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function sm(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class sf extends io{constructor(t){super(t),this.removeGroupControls=tE,this.removeListeners=tE,this.controls=new sc(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tE}update(){let{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}let sg=t=>(e,i)=>{t&&tk.update(()=>t(e,i),!1,!0)};class sy extends io{constructor(){super(...arguments),this.removePointerDownListener=tE}onPointerDown(t){this.session=new si(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:n7(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:sg(t),onStart:sg(e),onMove:sg(i),onEnd:(t,e)=>{delete this.session,n&&tk.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=n8(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let sv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var sx=i(79196);let sw=!1;class sT extends eO.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),i&&i.register&&n&&i.register(s),sw&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sv.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:n,isPresent:s}=this.props,{projection:r}=i;return r&&(r.isPresent=s,t.layoutDependency!==e&&r.setOptions({...r.options,layoutDependency:e}),sw=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?r.promote():r.relegate()||tk.postRender(()=>{let t=r.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),tK.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;sw=!0,n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function sP(t){let[e,i]=(0,sx.xQ)(),n=(0,eO.useContext)(eN.L);return(0,eW.jsx)(sT,{...t,layoutGroup:n,switchLayoutGroup:(0,eO.useContext)(ie),isPresent:e,safeToRemove:i})}let sS=["TopLeft","TopRight","BottomLeft","BottomRight"],sb=sS.length,sA=t=>"string"==typeof t?parseFloat(t):t,sE=t=>"number"==typeof t||A.test(t);function sM(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let sV=sk(0,.5,i2),sC=sk(.5,.95,tE);function sk(t,e,i){return n=>n<t?0:n>e?1:i(i6(t,e,n))}function sD(t,e){t.min=e.min,t.max=e.max}function sR(t,e){sD(t.x,e.x),sD(t.y,e.y)}function sL(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function sj(t,e,i,n,s){return t-=e,t=n+1/i*(t-n),void 0!==s&&(t=n+1/s*(t-n)),t}function sB(t,e,[i,n,s],r,o){!function(t,e=0,i=1,n=.5,s,r=t,o=t){if(b.test(e)&&(e=parseFloat(e),e=ex(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=ex(r.min,r.max,n);t===r&&(a-=e),t.min=sj(t.min,e,i,a,s),t.max=sj(t.max,e,i,a,s)}(t,e[i],e[n],e[s],e.scale,r,o)}let sF=["x","scaleX","originX"],sI=["y","scaleY","originY"];function sO(t,e,i,n){sB(t.x,e,sF,i?i.x:void 0,n?n.x:void 0),sB(t.y,e,sI,i?i.y:void 0,n?n.y:void 0)}function sU(t){return 0===t.translate&&1===t.scale}function s$(t){return sU(t.x)&&sU(t.y)}function sW(t,e){return t.min===e.min&&t.max===e.max}function sN(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function sz(t,e){return sN(t.x,e.x)&&sN(t.y,e.y)}function sY(t){return n$(t.x)/n$(t.y)}function sH(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class sX{constructor(){this.members=[]}add(t){tY(this.members,t),t.scheduleRender()}remove(t){if(tH(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){let e,i=this.members.findIndex(e=>t===e);if(0===i)return!1;for(let t=i;t>=0;t--){let i=this.members[t];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender();let n=i.options.layoutDependency,s=t.options.layoutDependency;(void 0===n||void 0===s||n!==s)&&(t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));let{crossfade:r}=t.options;!1===r&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let sK=(t,e)=>t.depth-e.depth;class sq{constructor(){this.children=[],this.isDirty=!1}add(t){tY(this.children,t),this.isDirty=!0}remove(t){tH(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sK),this.isDirty=!1,this.children.forEach(t)}}let sG=["","X","Y","Z"],s_=0;function sZ(t,e,i,n){let{latestValues:s}=e;s[t]&&(i[t]=s[t],e.setStaticValue(t,0),n&&(n[t]=0))}function sQ({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(t={},i=e?.()){this.id=s_++,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(s1),this.nodes.forEach(s8),this.nodes.forEach(s7),this.nodes.forEach(s2)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new sq)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new tX),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){let i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=n_(e)&&!(n_(e)&&"svg"===e.tagName),this.instance=e;let{layoutId:i,layout:n,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(n||i)&&(this.isLayoutDirty=!0),t){let i,n=0,s=()=>this.root.updateBlockedByResize=!1;tk.read(()=>{n=window.innerWidth}),t(e,()=>{let t=window.innerWidth;if(t!==n){let e,r;n=t,this.root.updateBlockedByResize=!0,i&&i(),e=tG.now(),r=({timestamp:t})=>{let i=t-e;i>=250&&(tD(r),s(i-250))},tk.setup(r,!0),i=()=>tD(r),sv.hasAnimatedSinceResize&&(sv.hasAnimatedSinceResize=!1,this.nodes.forEach(s6))}})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||n)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||s.getDefaultTransition()||rr,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!sz(this.targetLayout,n),h=!e&&i;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...ih(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h)}else e||s6(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tD(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(rt),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let n=i.props[it];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tk,!(t||i))}let{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&t(s)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){let e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}let{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;let n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(s3);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(s9);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(s4),this.nodes.forEach(sJ),this.nodes.forEach(s0)):this.nodes.forEach(s9),this.clearAllSnapshots();let t=tG.now();tR.delta=u(0,1e3/60,t-tR.timestamp),tR.timestamp=t,tR.isProcessing=!0,tL.update.process(tR),tL.preRender.process(tR),tL.render.process(tR),tR.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,tK.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(s5),this.sharedNodes.forEach(re)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tk.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tk.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||n$(this.snapshot.measuredBox.x)||n$(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 t=0;t<this.path.length;t++)this.path[t].updateScroll();let t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Z(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){let e=n(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;let t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!s$(this.projectionDelta),i=this.getTransformTemplate(),n=i?i(this.latestValues,""):void 0,r=n!==this.prevTransformTemplateValue;t&&this.instance&&(e||eV(this.latestValues)||r)&&(s(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){var e;let i=this.measurePageBox(),n=this.removeElementScroll(i);return t&&(n=this.removeTransform(n)),rl((e=n).x),rl(e.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:t}=this.options;if(!t)return Z();let e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ru))){let{scroll:t}=this.root;t&&(eL(e.x,t.offset.x),eL(e.y,t.offset.y))}return e}removeElementScroll(t){let e=Z();if(sR(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){let n=this.path[i],{scroll:s,options:r}=n;n!==this.root&&s&&r.layoutScroll&&(s.wasRoot&&sR(e,t),eL(e.x,s.offset.x),eL(e.y,s.offset.y))}return e}applyTransform(t,e=!1){let i=Z();sR(i,t);for(let t=0;t<this.path.length;t++){let n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&eB(i,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),eV(n.latestValues)&&eB(i,n.latestValues)}return eV(this.latestValues)&&eB(i,this.latestValues),i}removeTransform(t){let e=Z();sR(e,t);for(let t=0;t<this.path.length;t++){let i=this.path[t];if(!i.instance||!eV(i.latestValues))continue;eM(i.latestValues)&&i.updateSnapshot();let n=Z();sR(n,i.measurePageBox()),sO(e,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,n)}return eV(this.latestValues)&&sO(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==tR.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){let e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);let i=!!this.resumingFrom||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:n,layoutId:s}=this.options;if(!this.layout||!(n||s))return;this.resolvedRelativeTargetAt=tR.timestamp;let r=this.getClosestProjectingParent();if(r&&this.linkedParentVersion!==r.layoutVersion&&!r.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(r&&r.layout?this.createRelativeTarget(r,this.layout.layoutBox,r.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=Z(),this.targetWithTransforms=Z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var o,a,l;this.forceRelativeParentToResolveTarget(),o=this.target,a=this.relativeTarget,l=this.relativeParent.target,nz(o.x,a.x,l.x),nz(o.y,a.y,l.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sR(this.target,this.layout.layoutBox),eR(this.target,this.targetDelta)):sR(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,r&&!!r.resumingFrom==!!this.resumingFrom&&!r.options.layoutScroll&&r.target&&1!==this.animationProgress?this.createRelativeTarget(r,this.target,r.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||eM(this.parent.latestValues)||eC(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,i){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),nH(this.relativeTargetOrigin,e,i),sR(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let t=this.getLead(),e=!!this.resumingFrom||this!==t,i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===tR.timestamp&&(i=!1),i)return;let{layout:n,layoutId:s}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(n||s))return;sR(this.layoutCorrected,this.layout.layoutBox);let r=this.treeScale.x,o=this.treeScale.y;!function(t,e,i,n=!1){let s,r,o=i.length;if(o){e.x=e.y=1;for(let a=0;a<o;a++){r=(s=i[a]).projectionDelta;let{visualElement:o}=s.options;(!o||!o.props.style||"contents"!==o.props.style.display)&&(n&&s.options.layoutScroll&&s.scroll&&s!==s.root&&eB(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,eR(t,r)),n&&eV(s.latestValues)&&eB(t,s.latestValues))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=Z());let{target:a}=t;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(sL(this.prevProjectionDelta.x,this.projectionDelta.x),sL(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),nN(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===r&&this.treeScale.y===o&&sH(this.projectionDelta.x,this.prevProjectionDelta.x)&&sH(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=G(),this.projectionDelta=G(),this.projectionDeltaWithTransform=G()}setAnimationOrigin(t,e=!1){let i,n=this.snapshot,s=n?n.latestValues:{},r={...this.latestValues},o=G();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let a=Z(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,d=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(rs));this.animationProgress=0,this.mixTargetDelta=e=>{let n=e/1e3;if(ri(o.x,t.x,n),ri(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,c,p,m,f,g;nH(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=n,rn(p.x,m.x,f.x,g),rn(p.y,m.y,f.y,g),i&&(h=this.relativeTarget,c=i,sW(h.x,c.x)&&sW(h.y,c.y))&&(this.isProjectionDirty=!1),i||(i=Z()),sR(i,this.relativeTarget)}l&&(this.animationValues=r,function(t,e,i,n,s,r){s?(t.opacity=ex(0,i.opacity??1,sV(n)),t.opacityExit=ex(e.opacity??1,0,sC(n))):r&&(t.opacity=ex(e.opacity??1,i.opacity??1,n));for(let s=0;s<sb;s++){let r=`border${sS[s]}Radius`,o=sM(e,r),a=sM(i,r);(void 0!==o||void 0!==a)&&(o||(o=0),a||(a=0),0===o||0===a||sE(o)===sE(a)?(t[r]=Math.max(ex(sA(o),sA(a),n),0),(b.test(a)||b.test(o))&&(t[r]+="%")):t[r]=a)}(e.rotate||i.rotate)&&(t.rotate=ex(e.rotate||0,i.rotate||0,n))}(r,s,this.latestValues,n,d,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(tD(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tk.update(()=>{var e,i,n;let s;sv.hasAnimatedSinceResize=!0,ig.layout++,this.motionValue||(this.motionValue=tZ(0)),this.currentAnimation=(e=this.motionValue,i=[0,1e3],n={...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{ig.layout--},onComplete:()=>{ig.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}},(s=Q(e)?e:tZ(e)).start(nA("",s,i,n)),s.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:n,latestValues:s}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&rh(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||Z();let e=n$(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let n=n$(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}sR(e,i),eB(e,s),nN(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new sX),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let n={};i.z&&sZ("z",t,n,this.animationValues);for(let e=0;e<sG.length;e++)sZ(`rotate${sG[e]}`,t,n,this.animationValues),sZ(`skew${sG[e]}`,t,n,this.animationValues);for(let e in t.render(),n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible){t.visibility="hidden";return}let i=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=eJ(e?.pointerEvents)||"",t.transform=i?i(this.latestValues,""):"none";return}let n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target){this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=eJ(e?.pointerEvents)||""),this.hasProjected&&!eV(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1);return}t.visibility="";let s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let r=function(t,e,i){let n="",s=t.x.translate/e.x,r=t.y.translate/e.y,o=i?.z||0;if((s||r||o)&&(n=`translate3d(${s}px, ${r}px, ${o}px) `),(1!==e.x||1!==e.y)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),i){let{transformPerspective:t,rotate:e,rotateX:s,rotateY:r,skewX:o,skewY:a}=i;t&&(n=`perspective(${t}px) ${n}`),e&&(n+=`rotate(${e}deg) `),s&&(n+=`rotateX(${s}deg) `),r&&(n+=`rotateY(${r}deg) `),o&&(n+=`skewX(${o}deg) `),a&&(n+=`skewY(${a}deg) `)}let a=t.x.scale*e.x,l=t.y.scale*e.y;return(1!==a||1!==l)&&(n+=`scale(${a}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,s);i&&(r=i(s,r)),t.transform=r;let{x:o,y:a}=this.projectionDelta;for(let e in t.transformOrigin=`${100*o.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0,ew){if(void 0===s[e])continue;let{correct:i,applyTo:o,isCSSVariable:a}=ew[e],l="none"===r?s[e]:i(s[e],n);if(o){let e=o.length;for(let i=0;i<e;i++)t[o[i]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?eJ(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(s3),this.root.sharedNodes.clear()}}}function sJ(t){t.updateLayout()}function s0(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:n}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;"size"===s?nU(t=>{let n=r?e.measuredBox[t]:e.layoutBox[t],s=n$(n);n.min=i[t].min,n.max=n.min+s}):rh(s,e.layoutBox,i)&&nU(n=>{let s=r?e.measuredBox[n]:e.layoutBox[n],o=n$(i[n]);s.max=s.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+o)});let o=G();nN(o,i,e.layoutBox);let a=G();r?nN(a,t.applyTransform(n,!0),e.measuredBox):nN(a,i,e.layoutBox);let l=!s$(o),h=!1;if(!t.resumeFrom){let n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:s,layout:r}=n;if(s&&r){let o=Z();nH(o,e.layoutBox,s.layoutBox);let a=Z();nH(a,i,r.layoutBox),sz(o,a)||(h=!0),n.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function s1(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function s2(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function s5(t){t.clearSnapshot()}function s3(t){t.clearMeasurements()}function s9(t){t.isLayoutDirty=!1}function s4(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function s6(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function s8(t){t.resolveTargetDelta()}function s7(t){t.calcProjection()}function rt(t){t.resetSkewAndRotation()}function re(t){t.removeLeadSnapshot()}function ri(t,e,i){t.translate=ex(e.translate,0,i),t.scale=ex(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function rn(t,e,i,n){t.min=ex(e.min,i.min,n),t.max=ex(e.max,i.max,n)}function rs(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let rr={duration:.45,ease:[.4,0,.1,1]},ro=t=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ra=ro("applewebkit/")&&!ro("chrome/")?Math.round:tE;function rl(t){t.min=ra(t.min),t.max=ra(t.max)}function rh(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(sY(e)-sY(i)))}function ru(t){return t!==t.root&&t.scroll?.wasRoot}let rd=sQ({attachResizeListener:(t,e)=>nq(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),rc={current:void 0},rp=sQ({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rc.current){let t=new rd({});t.mount(window),t.setOptions({layoutScroll:!0}),rc.current=t}return rc.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});function rm(t,e){let i=nZ(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}function rf(t,e,i){let{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);let s=n["onHover"+i];s&&tk.postRender(()=>s(e,n6(e)))}class rg extends io{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,s,r]=rm(t,i);return n.forEach(t=>{let i,n=!1,r=!1,o=e=>{i&&(i(e),i=void 0),t.removeEventListener("pointerleave",l)},a=t=>{n=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),r&&(r=!1,o(t))},l=t=>{if("touch"!==t.pointerType){if(n){r=!0;return}o(t)}};t.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||nO.x||nO.y)return;r=!1;let o=e(t,n);"function"==typeof o&&(i=o,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),r}(t,(t,e)=>(rf(this.node,e,"Start"),t=>rf(this.node,t,"End"))))}unmount(){}}class ry extends io{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){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=im(nq(this.node.current,"focus",()=>this.onFocus()),nq(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var rv=i(78757);let rx=(t,e)=>!!e&&(t===e||rx(t,e.parentElement)),rw=new WeakSet;function rT(t){return e=>{"Enter"===e.key&&t(e)}}function rP(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function rS(t){return n4(t)&&!(nO.x||nO.y)}let rb=new WeakSet;function rA(t,e,i){let{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);let s=n["onTap"+("End"===i?"":i)];s&&tk.postRender(()=>s(e,n6(e)))}class rE extends io{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:e,propagate:i}=this.node.props;this.unmount=function(t,e,i={}){let[n,s,r]=rm(t,i),o=t=>{let n=t.currentTarget;if(!rS(t)||rb.has(t))return;rw.add(n),i.stopPropagation&&rb.add(t);let r=e(n,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),rw.has(n)&&rw.delete(n),rS(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,n===window||n===document||i.useGlobalTarget||rx(n,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return n.forEach(t=>{((i.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),(0,rv.s)(t))&&(t.addEventListener("focus",t=>((t,e)=>{let i=t.currentTarget;if(!i)return;let n=rT(()=>{if(rw.has(i))return;rP(i,"down");let t=rT(()=>{rP(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>rP(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)})(t,s)),nX.has(t.tagName)||!0===t.isContentEditable||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}(t,(t,e)=>(rA(this.node,e,"Start"),(t,{success:e})=>rA(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:i?.tap===!1})}unmount(){}}let rM=new WeakMap,rV=new WeakMap,rC=t=>{let e=rM.get(t.target);e&&e(t)},rk=t=>{t.forEach(rC)},rD={some:0,all:1};class rR extends io{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var t;let e;this.unmount();let{viewport:i={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=i,a={root:n?n.current:void 0,rootMargin:s,threshold:"number"==typeof r?r:rD[r]},l=t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,o&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),s=e?i:n;s&&s(t)};return t=this.node.current,e=function({root:t,...e}){let i=t||document;rV.has(i)||rV.set(i,{});let n=rV.get(i),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(rk,{root:t,...e})),n[s]}(a),rM.set(t,l),e.observe(t),()=>{rM.delete(t),e.unobserve(t)}}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}let rL=function(t,e){if("u"<typeof Proxy)return ir;let i=new Map,n=(i,n)=>ir(i,n,t,e);return new Proxy((t,e)=>n(t,e),{get:(s,r)=>"create"===r?n:(i.has(r)||i.set(r,ir(r,void 0,t,e)),i.get(r))})}({animation:{Feature:nB},exit:{Feature:nI},inView:{Feature:rR},tap:{Feature:rE},focus:{Feature:ry},hover:{Feature:rg},pan:{Feature:sy},drag:{Feature:sf,ProjectionNode:rp,MeasureLayout:sP},layout:{ProjectionNode:rp,MeasureLayout:sP}},(t,e)=>e.isSVG??e$(t)?new eb(e):new eI(e,{allowProjection:t!==eO.Fragment}))},49619:(t,e,i)=>{i.d(e,{A:()=>n});let n=(0,i(90425).A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},78757:(t,e,i)=>{i.d(e,{s:()=>s});var n=i(94601);function s(t){return(0,n.G)(t)&&"offsetHeight"in t}},79196:(t,e,i)=>{i.d(e,{xQ:()=>r});var n=i(12115),s=i(15131);function r(t=!0){let e=(0,n.useContext)(s.t);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:o,register:a}=e,l=(0,n.useId)();(0,n.useEffect)(()=>{if(t)return a(l)},[t]);let h=(0,n.useCallback)(()=>t&&o&&o(l),[l,o,t]);return!i&&o?[!1,h]:[!0]}},80642:(t,e,i)=>{i.d(e,{N:()=>x});var n=i(95155),s=i(12115),r=i(39551),o=i(28819),a=i(4524),l=i(15131),h=i(78757),u=i(24866);function d(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}class c extends s.Component{getSnapshotBeforeUpdate(t){let e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let t=e.offsetParent,i=(0,h.s)(t)&&t.offsetWidth||0,n=(0,h.s)(t)&&t.offsetHeight||0,s=this.props.sizeRef.current;s.height=e.offsetHeight||0,s.width=e.offsetWidth||0,s.top=e.offsetTop,s.left=e.offsetLeft,s.right=i-s.width-s.left,s.bottom=n-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function p({children:t,isPresent:e,anchorX:i,anchorY:r,root:o,pop:a}){let l=(0,s.useId)(),h=(0,s.useRef)(null),p=(0,s.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:m}=(0,s.useContext)(u.Q),f=function(...t){return s.useCallback(function(...t){return e=>{let i=!1,n=t.map(t=>{let n=d(t,e);return i||"function"!=typeof n||(i=!0),n});if(i)return()=>{for(let e=0;e<n.length;e++){let i=n[e];"function"==typeof i?i():d(t[e],null)}}}}(...t),t)}(h,t.props?.ref??t?.ref);return(0,s.useInsertionEffect)(()=>{let{width:t,height:n,top:s,left:u,right:d,bottom:c}=p.current;if(e||!1===a||!h.current||!t||!n)return;let f="left"===i?`left: ${u}`:`right: ${d}`,g="bottom"===r?`bottom: ${c}`:`top: ${s}`;h.current.dataset.motionPopId=l;let y=document.createElement("style");m&&(y.nonce=m);let v=o??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
2
|
-
[data-motion-pop-id="${l}"] {
|
|
3
|
-
position: absolute !important;
|
|
4
|
-
width: ${t}px !important;
|
|
5
|
-
height: ${n}px !important;
|
|
6
|
-
${f}px !important;
|
|
7
|
-
${g}px !important;
|
|
8
|
-
}
|
|
9
|
-
`),()=>{v.contains(y)&&v.removeChild(y)}},[e]),(0,n.jsx)(c,{isPresent:e,childRef:h,sizeRef:p,pop:a,children:!1===a?t:s.cloneElement(t,{ref:f})})}let m=({children:t,initial:e,isPresent:i,onExitComplete:r,custom:a,presenceAffectsLayout:h,mode:u,anchorX:d,anchorY:c,root:m})=>{let g=(0,o.M)(f),y=(0,s.useId)(),v=!0,x=(0,s.useMemo)(()=>(v=!1,{id:y,initial:e,isPresent:i,custom:a,onExitComplete:t=>{for(let e of(g.set(t,!0),g.values()))if(!e)return;r&&r()},register:t=>(g.set(t,!1),()=>g.delete(t))}),[i,g,r]);return h&&v&&(x={...x}),(0,s.useMemo)(()=>{g.forEach((t,e)=>g.set(e,!1))},[i]),s.useEffect(()=>{i||g.size||!r||r()},[i]),t=(0,n.jsx)(p,{pop:"popLayout"===u,isPresent:i,anchorX:d,anchorY:c,root:m,children:t}),(0,n.jsx)(l.t.Provider,{value:x,children:t})};function f(){return new Map}var g=i(79196);let y=t=>t.key||"";function v(t){let e=[];return s.Children.forEach(t,t=>{(0,s.isValidElement)(t)&&e.push(t)}),e}let x=({children:t,custom:e,initial:i=!0,onExitComplete:l,presenceAffectsLayout:h=!0,mode:u="sync",propagate:d=!1,anchorX:c="left",anchorY:p="top",root:f})=>{let[x,w]=(0,g.xQ)(d),T=(0,s.useMemo)(()=>v(t),[t]),P=d&&!x?[]:T.map(y),S=(0,s.useRef)(!0),b=(0,s.useRef)(T),A=(0,o.M)(()=>new Map),E=(0,s.useRef)(new Set),[M,V]=(0,s.useState)(T),[C,k]=(0,s.useState)(T);(0,a.E)(()=>{S.current=!1,b.current=T;for(let t=0;t<C.length;t++){let e=y(C[t]);P.includes(e)?(A.delete(e),E.current.delete(e)):!0!==A.get(e)&&A.set(e,!1)}},[C,P.length,P.join("-")]);let D=[];if(T!==M){let t=[...T];for(let e=0;e<C.length;e++){let i=C[e],n=y(i);P.includes(n)||(t.splice(e,0,i),D.push(i))}return"wait"===u&&D.length&&(t=D),k(v(t)),V(T),null}let{forceRender:R}=(0,s.useContext)(r.L);return(0,n.jsx)(n.Fragment,{children:C.map(t=>{let s=y(t),r=(!d||!!x)&&(T===C||P.includes(s));return(0,n.jsx)(m,{isPresent:r,initial:(!S.current||!!i)&&void 0,custom:e,presenceAffectsLayout:h,mode:u,root:f,onExitComplete:r?void 0:()=>{if(E.current.has(s)||(E.current.add(s),!A.has(s)))return;A.set(s,!0);let t=!0;A.forEach(e=>{e||(t=!1)}),t&&(R?.(),k(b.current),d&&w?.(),l&&l())},anchorX:c,anchorY:p,children:t},s)})})}},94514:(t,e,i)=>{i.d(e,{A:()=>n});let n=(0,i(90425).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},94601:(t,e,i)=>{i.d(e,{G:()=>n});function n(t){return"object"==typeof t&&null!==t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8485],{9921:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(90425).A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},21628:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(90425).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},27209:(e,t,r)=>{r.d(t,{q:()=>n});function n(e,[t,r]){return Math.min(r,Math.max(t,e))}},33210:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(90425).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},61878:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(90425).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},66088:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(90425).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},89064:(e,t,r)=>{r.d(t,{UC:()=>eI,In:()=>eR,q7:()=>eA,VF:()=>eL,p4:()=>eD,ZL:()=>eP,bL:()=>eT,wn:()=>eH,PP:()=>eK,l9:()=>eN,WT:()=>eM,LM:()=>eE});var n=r(12115),l=r(47650),o=r(27209),a=r(70379),i=r(76094),s=r(47527),d=r(68599),u=r(1933),c=r(22138),p=r(32007),f=r(16313),h=r(89971),v=r(30945),m=r(5494),w=r(42442),g=r(95155),y=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,w.TL)(`Primitive.${t}`),l=n.forwardRef((e,n)=>{let{asChild:l,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,g.jsx)(l?r:t,{...o,ref:n})});return l.displayName=`Primitive.${t}`,{...e,[t]:l}},{}),x=r(17347),b=r(98979),S=r(66294),C=r(24356),k=r(22954),j=r(5174),T=[" ","Enter","ArrowUp","ArrowDown"],N=[" ","Enter"],M="Select",[R,P,I]=(0,i.N)(M),[E,A]=(0,d.A)(M,[I,v.Bk]),D=(0,v.Bk)(),[L,K]=E(M),[H,_]=E(M),B=e=>{let{__scopeSelect:t,children:r,open:l,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:d,dir:c,name:p,autoComplete:f,disabled:m,required:w,form:y}=e,x=D(t),[S,C]=n.useState(null),[k,j]=n.useState(null),[T,N]=n.useState(!1),P=(0,u.jH)(c),[I,E]=(0,b.i)({prop:l,defaultProp:o??!1,onChange:a,caller:M}),[A,K]=(0,b.i)({prop:i,defaultProp:s,onChange:d,caller:M}),_=n.useRef(null),B=!S||y||!!S.closest("form"),[V,q]=n.useState(new Set),F=Array.from(V).map(e=>e.props.value).join(";");return(0,g.jsx)(v.bL,{...x,children:(0,g.jsxs)(L,{required:w,scope:t,trigger:S,onTriggerChange:C,valueNode:k,onValueNodeChange:j,valueNodeHasChildren:T,onValueNodeHasChildrenChange:N,contentId:(0,h.B)(),value:A,onValueChange:K,open:I,onOpenChange:E,dir:P,triggerPointerDownPosRef:_,disabled:m,children:[(0,g.jsx)(R.Provider,{scope:t,children:(0,g.jsx)(H,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{q(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{q(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:r})}),B?(0,g.jsxs)(eS,{"aria-hidden":!0,required:w,tabIndex:-1,name:p,autoComplete:f,value:A,onChange:e=>K(e.target.value),disabled:m,form:y,children:[void 0===A?(0,g.jsx)("option",{value:""}):null,Array.from(V)]},F):null]})})};B.displayName=M;var V="SelectTrigger",q=n.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:l=!1,...o}=e,i=D(r),d=K(V,r),u=d.disabled||l,c=(0,s.s)(t,d.onTriggerChange),p=P(r),f=n.useRef("touch"),[h,m,w]=ek(e=>{let t=p().filter(e=>!e.disabled),r=t.find(e=>e.value===d.value),n=ej(t,e,r);void 0!==n&&d.onValueChange(n.value)}),x=e=>{u||(d.onOpenChange(!0),w()),e&&(d.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,g.jsx)(v.Mz,{asChild:!0,...i,children:(0,g.jsx)(y.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":eC(d.value)?"":void 0,...o,ref:c,onClick:(0,a.mK)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==f.current&&x(e)}),onPointerDown:(0,a.mK)(o.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(x(e),e.preventDefault())}),onKeyDown:(0,a.mK)(o.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),(!t||" "!==e.key)&&T.includes(e.key)&&(x(),e.preventDefault())})})})});q.displayName=V;var F="SelectValue",O=n.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:l,children:o,placeholder:a="",...i}=e,d=K(F,r),{onValueNodeHasChildrenChange:u}=d,c=void 0!==o,p=(0,s.s)(t,d.onValueNodeChange);return(0,S.N)(()=>{u(c)},[u,c]),(0,g.jsx)(y.span,{...i,ref:p,style:{pointerEvents:"none"},children:eC(d.value)?(0,g.jsx)(g.Fragment,{children:a}):o})});O.displayName=F;var W=n.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...l}=e;return(0,g.jsx)(y.span,{"aria-hidden":!0,...l,ref:t,children:n||"▼"})});W.displayName="SelectIcon";var U=e=>(0,g.jsx)(m.Z,{asChild:!0,...e});U.displayName="SelectPortal";var z="SelectContent",Z=n.forwardRef((e,t)=>{let r=K(z,e.__scopeSelect),[o,a]=n.useState();return((0,S.N)(()=>{a(new DocumentFragment)},[]),r.open)?(0,g.jsx)(G,{...e,ref:t}):o?l.createPortal((0,g.jsx)(X,{scope:e.__scopeSelect,children:(0,g.jsx)(R.Slot,{scope:e.__scopeSelect,children:(0,g.jsx)("div",{children:e.children})})}),o):null});Z.displayName=z;var[X,Y]=E(z),$=(0,w.TL)("SelectContent.RemoveScroll"),G=n.forwardRef((e,t)=>{let{__scopeSelect:r,position:l="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:d,side:u,sideOffset:h,align:v,alignOffset:m,arrowPadding:w,collisionBoundary:y,collisionPadding:x,sticky:b,hideWhenDetached:S,avoidCollisions:C,...T}=e,N=K(z,r),[M,R]=n.useState(null),[I,E]=n.useState(null),A=(0,s.s)(t,e=>R(e)),[D,L]=n.useState(null),[H,_]=n.useState(null),B=P(r),[V,q]=n.useState(!1),F=n.useRef(!1);n.useEffect(()=>{if(M)return(0,k.Eq)(M)},[M]),(0,p.Oh)();let O=n.useCallback(e=>{let[t,...r]=B().map(e=>e.ref.current),[n]=r.slice(-1),l=document.activeElement;for(let r of e)if(r===l||(r?.scrollIntoView({block:"nearest"}),r===t&&I&&(I.scrollTop=0),r===n&&I&&(I.scrollTop=I.scrollHeight),r?.focus(),document.activeElement!==l))return},[B,I]),W=n.useCallback(()=>O([D,M]),[O,D,M]);n.useEffect(()=>{V&&W()},[V,W]);let{onOpenChange:U,triggerPointerDownPosRef:Z}=N;n.useEffect(()=>{if(M){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(Z.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():M.contains(r.target)||U(!1),document.removeEventListener("pointermove",t),Z.current=null};return null!==Z.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[M,U,Z]),n.useEffect(()=>{let e=()=>U(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[U]);let[Y,G]=ek(e=>{let t=B().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=ej(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),ee=n.useCallback((e,t,r)=>{let n=!F.current&&!r;(void 0!==N.value&&N.value===t||n)&&(L(e),n&&(F.current=!0))},[N.value]),et=n.useCallback(()=>M?.focus(),[M]),er=n.useCallback((e,t,r)=>{let n=!F.current&&!r;(void 0!==N.value&&N.value===t||n)&&_(e)},[N.value]),en="popper"===l?J:Q,el=en===J?{side:u,sideOffset:h,align:v,alignOffset:m,arrowPadding:w,collisionBoundary:y,collisionPadding:x,sticky:b,hideWhenDetached:S,avoidCollisions:C}:{};return(0,g.jsx)(X,{scope:r,content:M,viewport:I,onViewportChange:E,itemRefCallback:ee,selectedItem:D,onItemLeave:et,itemTextRefCallback:er,focusSelectedItem:W,selectedItemText:H,position:l,isPositioned:V,searchRef:Y,children:(0,g.jsx)(j.A,{as:$,allowPinchZoom:!0,children:(0,g.jsx)(f.n,{asChild:!0,trapped:N.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,a.mK)(o,e=>{N.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,g.jsx)(c.qW,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:(0,g.jsx)(en,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:e=>e.preventDefault(),...T,...el,onPlaced:()=>q(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:(0,a.mK)(T.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||G(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=B().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>O(t)),e.preventDefault()}})})})})})})});G.displayName="SelectContentImpl";var Q=n.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:l,...a}=e,i=K(z,r),d=Y(z,r),[u,c]=n.useState(null),[p,f]=n.useState(null),h=(0,s.s)(t,e=>f(e)),v=P(r),m=n.useRef(!1),w=n.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:C,focusSelectedItem:k}=d,j=n.useCallback(()=>{if(i.trigger&&i.valueNode&&u&&p&&x&&b&&C){let e=i.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),r=i.valueNode.getBoundingClientRect(),n=C.getBoundingClientRect();if("rtl"!==i.dir){let l=n.left-t.left,a=r.left-l,i=e.left-a,s=e.width+i,d=Math.max(s,t.width),c=window.innerWidth-10,p=(0,o.q)(a,[10,Math.max(10,c-d)]);u.style.minWidth=s+"px",u.style.left=p+"px"}else{let l=t.right-n.right,a=window.innerWidth-r.right-l,i=window.innerWidth-e.right-a,s=e.width+i,d=Math.max(s,t.width),c=window.innerWidth-10,p=(0,o.q)(a,[10,Math.max(10,c-d)]);u.style.minWidth=s+"px",u.style.right=p+"px"}let a=v(),s=window.innerHeight-20,d=x.scrollHeight,c=window.getComputedStyle(p),f=parseInt(c.borderTopWidth,10),h=parseInt(c.paddingTop,10),w=parseInt(c.borderBottomWidth,10),g=f+h+d+parseInt(c.paddingBottom,10)+w,y=Math.min(5*b.offsetHeight,g),S=window.getComputedStyle(x),k=parseInt(S.paddingTop,10),j=parseInt(S.paddingBottom,10),T=e.top+e.height/2-10,N=b.offsetHeight/2,M=f+h+(b.offsetTop+N);if(M<=T){let e=a.length>0&&b===a[a.length-1].ref.current;u.style.bottom="0px";let t=Math.max(s-T,N+(e?j:0)+(p.clientHeight-x.offsetTop-x.offsetHeight)+w);u.style.height=M+t+"px"}else{let e=a.length>0&&b===a[0].ref.current;u.style.top="0px";let t=Math.max(T,f+x.offsetTop+(e?k:0)+N);u.style.height=t+(g-M)+"px",x.scrollTop=M-T+x.offsetTop}u.style.margin="10px 0",u.style.minHeight=y+"px",u.style.maxHeight=s+"px",l?.(),requestAnimationFrame(()=>m.current=!0)}},[v,i.trigger,i.valueNode,u,p,x,b,C,i.dir,l]);(0,S.N)(()=>j(),[j]);let[T,N]=n.useState();(0,S.N)(()=>{p&&N(window.getComputedStyle(p).zIndex)},[p]);let M=n.useCallback(e=>{e&&!0===w.current&&(j(),k?.(),w.current=!1)},[j,k]);return(0,g.jsx)(ee,{scope:r,contentWrapper:u,shouldExpandOnScrollRef:m,onScrollButtonChange:M,children:(0,g.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:(0,g.jsx)(y.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Q.displayName="SelectItemAlignedPosition";var J=n.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:l=10,...o}=e,a=D(r);return(0,g.jsx)(v.UC,{...a,...o,ref:t,align:n,collisionPadding:l,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});J.displayName="SelectPopperPosition";var[ee,et]=E(z,{}),er="SelectViewport",en=n.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:l,...o}=e,i=Y(er,r),d=et(er,r),u=(0,s.s)(t,i.onViewportChange),c=n.useRef(0);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),(0,g.jsx)(R.Slot,{scope:r,children:(0,g.jsx)(y.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:(0,a.mK)(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=d;if(n?.current&&r){let e=Math.abs(c.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,l=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(l<n){let o=l+e,a=Math.min(n,o),i=o-a;r.style.height=a+"px","0px"===r.style.bottom&&(t.scrollTop=i>0?i:0,r.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});en.displayName=er;var el="SelectGroup",[eo,ea]=E(el);n.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,l=(0,h.B)();return(0,g.jsx)(eo,{scope:r,id:l,children:(0,g.jsx)(y.div,{role:"group","aria-labelledby":l,...n,ref:t})})}).displayName=el;var ei="SelectLabel";n.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,l=ea(ei,r);return(0,g.jsx)(y.div,{id:l.id,...n,ref:t})}).displayName=ei;var es="SelectItem",[ed,eu]=E(es),ec=n.forwardRef((e,t)=>{let{__scopeSelect:r,value:l,disabled:o=!1,textValue:i,...d}=e,u=K(es,r),c=Y(es,r),p=u.value===l,[f,v]=n.useState(i??""),[m,w]=n.useState(!1),x=(0,s.s)(t,e=>c.itemRefCallback?.(e,l,o)),b=(0,h.B)(),S=n.useRef("touch"),C=()=>{o||(u.onValueChange(l),u.onOpenChange(!1))};if(""===l)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,g.jsx)(ed,{scope:r,value:l,disabled:o,textId:b,isSelected:p,onItemTextChange:n.useCallback(e=>{v(t=>t||(e?.textContent??"").trim())},[]),children:(0,g.jsx)(R.ItemSlot,{scope:r,value:l,disabled:o,textValue:f,children:(0,g.jsx)(y.div,{role:"option","aria-labelledby":b,"data-highlighted":m?"":void 0,"aria-selected":p&&m,"data-state":p?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...d,ref:x,onFocus:(0,a.mK)(d.onFocus,()=>w(!0)),onBlur:(0,a.mK)(d.onBlur,()=>w(!1)),onClick:(0,a.mK)(d.onClick,()=>{"mouse"!==S.current&&C()}),onPointerUp:(0,a.mK)(d.onPointerUp,()=>{"mouse"===S.current&&C()}),onPointerDown:(0,a.mK)(d.onPointerDown,e=>{S.current=e.pointerType}),onPointerMove:(0,a.mK)(d.onPointerMove,e=>{S.current=e.pointerType,o?c.onItemLeave?.():"mouse"===S.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,a.mK)(d.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,a.mK)(d.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(N.includes(e.key)&&C()," "===e.key&&e.preventDefault())})})})})});ec.displayName=es;var ep="SelectItemText",ef=n.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:a,...i}=e,d=K(ep,r),u=Y(ep,r),c=eu(ep,r),p=_(ep,r),[f,h]=n.useState(null),v=(0,s.s)(t,e=>h(e),c.onItemTextChange,e=>u.itemTextRefCallback?.(e,c.value,c.disabled)),m=f?.textContent,w=n.useMemo(()=>(0,g.jsx)("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:x,onNativeOptionRemove:b}=p;return(0,S.N)(()=>(x(w),()=>b(w)),[x,b,w]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(y.span,{id:c.textId,...i,ref:v}),c.isSelected&&d.valueNode&&!d.valueNodeHasChildren?l.createPortal(i.children,d.valueNode):null]})});ef.displayName=ep;var eh="SelectItemIndicator",ev=n.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return eu(eh,r).isSelected?(0,g.jsx)(y.span,{"aria-hidden":!0,...n,ref:t}):null});ev.displayName=eh;var em="SelectScrollUpButton",ew=n.forwardRef((e,t)=>{let r=Y(em,e.__scopeSelect),l=et(em,e.__scopeSelect),[o,a]=n.useState(!1),i=(0,s.s)(t,l.onScrollButtonChange);return(0,S.N)(()=>{if(r.viewport&&r.isPositioned){let e=function(){a(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?(0,g.jsx)(ex,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});ew.displayName=em;var eg="SelectScrollDownButton",ey=n.forwardRef((e,t)=>{let r=Y(eg,e.__scopeSelect),l=et(eg,e.__scopeSelect),[o,a]=n.useState(!1),i=(0,s.s)(t,l.onScrollButtonChange);return(0,S.N)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?(0,g.jsx)(ex,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ey.displayName=eg;var ex=n.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:l,...o}=e,i=Y("SelectScrollButton",r),s=n.useRef(null),d=P(r),u=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>u(),[u]),(0,S.N)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,g.jsx)(y.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:(0,a.mK)(o.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(l,50))}),onPointerMove:(0,a.mK)(o.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(l,50))}),onPointerLeave:(0,a.mK)(o.onPointerLeave,()=>{u()})})});n.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,g.jsx)(y.div,{"aria-hidden":!0,...n,ref:t})}).displayName="SelectSeparator";var eb="SelectArrow";n.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,l=D(r),o=K(eb,r),a=Y(eb,r);return o.open&&"popper"===a.position?(0,g.jsx)(v.i3,{...l,...n,ref:t}):null}).displayName=eb;var eS=n.forwardRef(({__scopeSelect:e,value:t,...r},l)=>{let o,a=n.useRef(null),i=(0,s.s)(l,a),d=(o=n.useRef({value:t,previous:t}),n.useMemo(()=>(o.current.value!==t&&(o.current.previous=o.current.value,o.current.value=t),o.current.previous),[t]));return n.useEffect(()=>{let e=a.current;if(!e)return;let r=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(d!==t&&r){let n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[d,t]),(0,g.jsx)(y.select,{...r,style:{...C.Qg,...r.style},ref:i,defaultValue:t})});function eC(e){return""===e||void 0===e}function ek(e){let t=(0,x.c)(e),r=n.useRef(""),l=n.useRef(0),o=n.useCallback(e=>{let n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(l.current),""!==t&&(l.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),a=n.useCallback(()=>{r.current="",window.clearTimeout(l.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(l.current),[]),[r,o,a]}function ej(e,t,r){var n,l;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=(n=e,l=Math.max(a,0),n.map((e,t)=>n[(l+t)%n.length]));1===o.length&&(i=i.filter(e=>e!==r));let s=i.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==r?s:void 0}eS.displayName="SelectBubbleInput";var eT=B,eN=q,eM=O,eR=W,eP=U,eI=Z,eE=en,eA=ec,eD=ef,eL=ev,eK=ew,eH=ey},90718:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(90425).A)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]])}}]);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{3163:(e,t,a)=>{"use strict";a.d(t,{e:()=>r});var n=a(1934);let s=0,r=(0,n.v)(e=>({items:[],addItem:t=>e(e=>({items:[{...t,id:`activity-${Date.now()}-${++s}`},...e.items].slice(0,20)})),clear:()=>e({items:[]})}))},18496:(e,t,a)=>{"use strict";a.d(t,{M:()=>r});var n=a(1934),s=a(60464);let r=(0,n.v)((e,t)=>({spaces:[],expandedSpaces:new Set,expandedFolders:new Set,sidebarOpen:!0,activePage:null,recentPages:[],chatPanelOpen:!0,loadingSpaces:!1,loadingPages:new Map,pagesBySpace:new Map,loadSpaces:async()=>{e({loadingSpaces:!0});try{let t=await fetch("/api/files/spaces");if(!t.ok)throw Error("Failed to load spaces");let a=await t.json();e({spaces:a,loadingSpaces:!1})}catch{e({loadingSpaces:!1})}},loadPages:async a=>{let{loadingPages:n}=t(),s=new Map(n);s.set(a,!0),e({loadingPages:s});try{let n=await fetch(`/api/files/spaces/${encodeURIComponent(a)}/pages?recursive=true`);if(!n.ok)throw Error("Failed to load pages");let s=await n.json(),{pagesBySpace:r,loadingPages:o}=t(),i=new Map(r);i.set(a,s);let c=new Map(o);c.set(a,!1),e({pagesBySpace:i,loadingPages:c})}catch{let{loadingPages:n}=t(),s=new Map(n);s.set(a,!1),e({loadingPages:s})}},loadRecentPages:async()=>{try{let t=await fetch("/api/files/recent?limit=5");if(!t.ok)throw Error("Failed to load recent pages");let a=await t.json();e({recentPages:a})}catch{}},setActivePage:t=>e(e=>{if(!t)return{activePage:null};let a=t.replace(/\.md$/,"").split("/").filter(Boolean);if(a.length<=1)return{activePage:t};let n=a[0],r=e.spaces.some(e=>e.path===n),o=r?n:s.Sz,i=r?a.slice(1,-1):a.slice(0,-1),c=new Set(e.expandedFolders),l=o;for(let e of i)l=`${l}/${e}`,c.add(l);return{activePage:t,expandedFolders:c}}),toggleSpace:a=>{let{expandedSpaces:n,pagesBySpace:s}=t(),r=new Set(n);r.has(a)?r.delete(a):(r.add(a),s.has(a)||t().loadPages(a)),e({expandedSpaces:r})},toggleFolder:a=>{let{expandedFolders:n}=t(),s=new Set(n);s.has(a)?s.delete(a):s.add(a),e({expandedFolders:s})},toggleSidebar:()=>e(e=>({sidebarOpen:!e.sidebarOpen})),setSidebarOpen:t=>e({sidebarOpen:t}),toggleChatPanel:()=>e({chatPanelOpen:!0}),setChatPanelOpen:t=>e({chatPanelOpen:t}),createPage:async(e,a)=>{let n=a.toLowerCase().trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E0}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/gu,"").replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");if(!n)throw Error("Title results in an empty filename.");let r=e===s.Sz?n:`${e}/${n}`,o=e===s.Sz?encodeURIComponent(n):[e,n].map(encodeURIComponent).join("/"),i=await fetch(`/api/files/pages/${o}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:`
|
|
2
|
-
# ${a}
|
|
3
|
-
|
|
4
|
-
`,meta:{title:a}})});if(!i.ok){let e="Failed to create page";try{let t=await i.json();t?.error&&(e=t.error)}catch{}throw Error(e)}return t().loadPages(e),t().loadRecentPages(),t().loadSpaces(),r},deletePage:async a=>{if(!(await fetch(`/api/files/pages/${a}`,{method:"DELETE"})).ok)throw Error("Failed to delete page");let n=a.includes("/")?a.split("/")[0]:s.Sz;t().loadPages(n),t().loadRecentPages(),t().loadSpaces();let{activePage:r}=t();r===a&&e({activePage:null})}}))},25044:(e,t,a)=>{"use strict";a.d(t,{Toaster:()=>u});var n=a(95155),s=a(12651),r=a(68822),o=a(41585),i=a(26620),c=a(6296),l=a(70460),d=a(66609);let u=({...e})=>{let{theme:t="system"}=(0,l.D)();return(0,n.jsx)(d.l$,{theme:t,className:"toaster group",icons:{success:(0,n.jsx)(s.A,{className:"size-4"}),info:(0,n.jsx)(r.A,{className:"size-4"}),warning:(0,n.jsx)(o.A,{className:"size-4"}),error:(0,n.jsx)(i.A,{className:"size-4"}),loading:(0,n.jsx)(c.A,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})}},31328:(e,t,a)=>{"use strict";a.d(t,{z:()=>r});var n=a(1934);let s="http://127.0.0.1:18789",r=(0,n.v)((e,t)=>({connected:!1,connecting:!1,wsStatus:"disconnected",wsError:void 0,reason:null,url:s,token:void 0,agentName:void 0,source:void 0,sessions:[],agentStatus:"idle",error:void 0,detect:async()=>{try{let t=await fetch("/api/gateway/detect");if(!t.ok)throw Error("Failed to detect gateway");let a=await t.json();a&&e({url:a.url||s,token:a.token||void 0,agentName:a.agentName||void 0,source:a.source||void 0})}catch(t){e({reason:"server_unreachable",error:`Detection failed: ${String(t)}`})}},connect:async()=>{let{url:a}=t();e({connecting:!0,error:void 0,reason:null});try{let n=await fetch("/api/gateway/status");if(!n.ok)throw Error("Failed to check gateway status");let s=await n.json();s.connected?(e({connected:!0,connecting:!1,agentName:s.agentName||t().agentName,reason:null,error:void 0}),t().loadSessions()):e({connected:!1,connecting:!1,reason:s.reason??"gateway_unreachable",error:s.error||`Cannot connect to ${a}`})}catch(t){e({connected:!1,connecting:!1,reason:"server_unreachable",error:`ClawPad server unreachable: ${String(t)}`})}},disconnect:()=>{e({connected:!1,connecting:!1,wsStatus:"disconnected",reason:null,sessions:[],agentStatus:"idle",error:void 0})},loadSessions:async()=>{try{let t=await fetch("/api/gateway/sessions");if(!t.ok)return;let a=(await t.json()).sessions??[],n=a.some(e=>"active"===e.status),s=a.some(e=>"thinking"===e.status);e({sessions:a,agentStatus:n?"active":s?"thinking":"idle"})}catch{}},setUrl:t=>e({url:t}),setToken:t=>e({token:t||void 0}),setWSStatus:(a,n)=>{e({wsStatus:a,wsError:"connected"===a?void 0:n?.error}),"connected"===a?e({connected:!0,connecting:!1,reason:null,error:void 0}):"connecting"===a||"reconnecting"===a?e({connected:!1,connecting:!0,reason:n?.reason??"gateway_unreachable"}):e({connected:!1,connecting:!1,reason:n?.reason??t().reason??"gateway_unreachable"})},setAgentStatus:t=>e({agentStatus:t})}))},37279:(e,t,a)=>{"use strict";a.d(t,{Providers:()=>w});var n=a(95155),s=a(70460),r=a(29905),o=a(35625),i=a(70872),c=a(12115),l=a(3163),d=a(31328),u=a(46794),p=a(18496),g=a(83099),m=a(60464);function h(){let e,t,a,n,s,r,o,i,h,w,f,v=(0,d.z)(e=>e.detect),y=(0,d.z)(e=>e.connect);return(0,c.useEffect)(()=>{v().then(()=>y())},[v,y]),e=(0,l.e)(e=>e.addItem),t=(0,d.z)(e=>e.setWSStatus),a=(0,d.z)(e=>e.setAgentStatus),n=(0,u.b)(e=>e.addEvent),s=(0,c.useRef)(new Set),r=(0,c.useRef)(0),o=(0,c.useRef)(0),(0,c.useEffect)(()=>{o.current=Date.now();let i=null,c=null,l=null,d=!1,u=a=>{let n,s;if(d||c)return;let o=r.current+1,i=(s=.2*(n=Math.min(3e4,2e3*Math.pow(1.6,r.current)))*(2*Math.random()-1),Math.max(500,Math.round(n+s)));r.current=o,t("reconnecting",{error:a?`${a}. Retrying in ${Math.round(i/1e3)}s (attempt ${o})`:`Reconnecting in ${Math.round(i/1e3)}s (attempt ${o})`,reason:"gateway_unreachable"}),6===o&&e({type:"sub-agent",description:"Gateway reconnection is taking longer than expected",timestamp:Date.now()}),c=setTimeout(()=>{c=null,m()},i)};function m(){d||(t("connecting",{reason:"gateway_unreachable"}),i=new EventSource("/api/gateway/events"),o.current=Date.now(),i.onopen=()=>{o.current=Date.now()},i.addEventListener("status",e=>{try{let a=JSON.parse(e.data);if(t(a.status,{error:a.error,code:a.code,reason:a.reason??void 0}),o.current=Date.now(),"connected"===a.status){r.current=0,c&&(clearTimeout(c),c=null);let e=p.M.getState();e.loadRecentPages(),e.loadSpaces();let t=g.W.getState();t.sessionKey&&t.loadChangeSets()}}catch{}}),i.addEventListener("gateway",t=>{try{let s=JSON.parse(t.data);(function(t){let{event:s,payload:r}=t;switch(s){case"agent":!function(t){let n=t.stream,s=t.runId??"unknown",r=t.sessionKey??"main";if(!n){("final"===t.state||"aborted"===t.state||"error"===t.state)&&w(s,r,"error"===t.state);return}switch(n){case"lifecycle":{let e=t.data?.phase;"start"===e?h(s,r):("end"===e||"error"===e)&&w(s,r,"error"===e);break}case"assistant":h(s,r),a("active");break;case"tool":{var o;h(s,r),a("active");let n=t.data?.name??void 0;n&&e({type:"tool-used",description:`Using ${{Read:"file reader",Edit:"file editor",Write:"file writer",exec:"terminal",web_search:"web search",web_fetch:"web fetcher",browser:"browser",message:"messenger",image:"image analyzer",tts:"text-to-speech",nodes:"node manager",canvas:"canvas",process:"process manager"}[o=n]??o}`,timestamp:Date.now()})}}}(r);break;case"chat":e({type:"chat-message",description:"New chat message",timestamp:Date.now()});break;case"heartbeat":var o;let i,c;i=(o=r).ts,c=o.status,"number"!=typeof i||Number.isNaN(i)||"string"!=typeof c||n({...o,ts:i,status:c})}})(s),o.current=Date.now()}catch{}}),i.onerror=()=>{i?.close(),i=null,t("disconnected",{error:"Event stream disconnected",reason:"gateway_unreachable"}),d||u("Event stream disconnected")})}function h(t,n){s.current.has(t)||(s.current.add(t),a("thinking"),e({type:"sub-agent",description:"Agent started thinking",timestamp:Date.now()}),window.dispatchEvent(new CustomEvent("clawpad:agent-lifecycle",{detail:{phase:"start",runId:t,sessionKey:n,timestamp:Date.now()}})))}function w(t,n,r){s.current.delete(t),0===s.current.size&&a("idle"),e({type:"sub-agent",description:r?"Agent errored":"Agent finished",timestamp:Date.now()}),window.dispatchEvent(new CustomEvent("clawpad:agent-lifecycle",{detail:{phase:"end",runId:t,sessionKey:n,timestamp:Date.now(),error:!!r}}))}return m(),l=setInterval(()=>{d||Date.now()-o.current>45e3&&(i?.close(),i=null,u("Connection stale"))},1e4),()=>{d=!0,c&&clearTimeout(c),l&&clearInterval(l),i?.close()}},[e,t,a,n]),i=(0,l.e)(e=>e.addItem),h=(0,c.useRef)(null),w=(0,c.useRef)(new Set),f=(0,c.useRef)(!1),(0,c.useEffect)(()=>{let e=null,t=null,a=!1,n=0;return!function s(){a||(e=new EventSource("/api/files/watch"),n=0,e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type||"error"===t.type)return;let a=t.path??"",n=a.split("/").pop()?.replace(/\.md$/,"")??a,s={"file-changed":`Edited ${n}`,"file-added":`Created ${n}`,"file-removed":`Deleted ${n}`};i({type:t.type,description:s[t.type]??`${t.type}: ${n}`,path:t.path,timestamp:t.timestamp??Date.now()}),window.dispatchEvent(new CustomEvent("clawpad:file-change",{detail:t}));let r=a.includes("/")?a.split("/")[0]:m.Sz,o="file-added"===t.type||"file-removed"===t.type;r&&w.current.add(r),o&&(f.current=!0),h.current||(h.current=setTimeout(()=>{h.current=null;let{loadRecentPages:e,loadPages:t,loadSpaces:a,pagesBySpace:n}=p.M.getState();for(let e of w.current)n.has(e)&&t(e);w.current.clear(),e(),f.current&&(a(),f.current=!1)},250))}catch{}},e.onerror=()=>{if(e?.close(),e=null,!a){let e=Math.min(3e4,2e3*Math.pow(1.6,n)),a=.2*e*(2*Math.random()-1);n+=1,t=setTimeout(s,Math.max(500,Math.round(e+a)))}})}(),()=>{a=!0,e?.close(),t&&clearTimeout(t),h.current&&(clearTimeout(h.current),h.current=null)}},[i]),(0,c.useEffect)(()=>{let e=async e=>{await fetch("/api/changes/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionKey:e.sessionKey,runId:e.runId,status:e.status,..."start"===e.status?{startedAt:new Date(e.timestamp??Date.now()).toISOString()}:{endedAt:new Date(e.timestamp??Date.now()).toISOString()}})})},t=async t=>{let a=t.detail;if(a?.runId&&a?.sessionKey){if("start"===a.phase){let t=g.W.getState().activeRun;t&&t.runId!==a.runId&&await e({sessionKey:t.sessionKey,runId:t.runId,status:"end",timestamp:a.timestamp??Date.now()}),g.W.getState().setSessionKey(a.sessionKey),g.W.getState().setActiveRun({runId:a.runId,sessionKey:a.sessionKey,startedAt:a.timestamp??Date.now()}),g.W.getState().clearActiveFiles(),await e({sessionKey:a.sessionKey,runId:a.runId,status:"start",timestamp:a.timestamp??Date.now()})}"end"===a.phase&&(g.W.getState().setSessionKey(a.sessionKey),await e({sessionKey:a.sessionKey,runId:a.runId,status:"end",timestamp:a.timestamp??Date.now()}),g.W.getState().setActiveRun(null),g.W.getState().clearActiveFiles(),g.W.getState().loadChangeSets())}},a=async e=>{let t=e.detail;if(!t?.path||!t.type||"connected"===t.type||"error"===t.type)return;let{activeRun:a}=g.W.getState();a&&(g.W.getState().touchFile(t.path),await fetch("/api/changes/record",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionKey:a.sessionKey,runId:a.runId,path:t.path,eventType:t.type,timestamp:t.timestamp??Date.now()})}))};return window.addEventListener("clawpad:agent-lifecycle",t),window.addEventListener("clawpad:file-change",a),()=>{window.removeEventListener("clawpad:agent-lifecycle",t),window.removeEventListener("clawpad:file-change",a)}},[]),null}function w({children:e}){let[t]=(0,c.useState)(()=>new r.E({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}}));return(0,n.jsx)(s.N,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:(0,n.jsx)(o.Ht,{client:t,children:(0,n.jsxs)(i.Bc,{delayDuration:300,children:[(0,n.jsx)(h,{}),e]})})})}},46794:(e,t,a)=>{"use strict";a.d(t,{b:()=>n});let n=(0,a(1934).v)(e=>({lastEvent:void 0,events:[],updatedAt:void 0,addEvent:t=>e(e=>{let a=function(e,t){if(t)return t;let a=(e??"").toLowerCase();if(a){if("failed"===a)return"error";if("sent"===a)return"alert";if(a.startsWith("ok"))return"ok"}}(t.status,t.indicatorType),n={...t,indicatorType:a,actionable:"alert"===a||"error"===a},s=[n,...e.events];return s.length>20&&(s.length=20),{lastEvent:n,events:s,updatedAt:Date.now()}}),clear:()=>e({lastEvent:void 0,events:[],updatedAt:void 0})}))},49397:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,7086,23)),Promise.resolve().then(a.t.bind(a,84438,23)),Promise.resolve().then(a.t.bind(a,51743,23)),Promise.resolve().then(a.bind(a,37279)),Promise.resolve().then(a.bind(a,25044))},51743:()=>{},52799:(e,t,a)=>{"use strict";a.d(t,{cn:()=>r});var n=a(29722),s=a(622);function r(...e){return(0,s.QP)((0,n.$)(e))}},60464:(e,t,a)=>{"use strict";a.d(t,{Sz:()=>n,ke:()=>s});let n="__root__",s="General"},70872:(e,t,a)=>{"use strict";a.d(t,{Bc:()=>o,ZI:()=>l,k$:()=>c,m_:()=>i});var n=a(95155);a(12115);var s=a(28935),r=a(52799);function o({delayDuration:e=0,...t}){return(0,n.jsx)(s.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function i({...e}){return(0,n.jsx)(o,{children:(0,n.jsx)(s.bL,{"data-slot":"tooltip",...e})})}function c({...e}){return(0,n.jsx)(s.l9,{"data-slot":"tooltip-trigger",...e})}function l({className:e,sideOffset:t=0,children:a,...o}){return(0,n.jsx)(s.ZL,{children:(0,n.jsxs)(s.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,r.cn)("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...o,children:[a,(0,n.jsx)(s.i3,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}},83099:(e,t,a)=>{"use strict";a.d(t,{W:()=>n});let n=(0,a(1934).v)((e,t)=>({sessionKey:null,activeRun:null,activeFiles:new Set,changeSets:[],review:{open:!1,changeSetId:null,filePath:null},dismissed:new Set,loading:!1,error:void 0,setSessionKey:t=>e({sessionKey:t}),setActiveRun:t=>e({activeRun:t}),touchFile:t=>e(e=>{let a=new Set(e.activeFiles);return a.add(t),{activeFiles:a}}),clearActiveFiles:()=>e({activeFiles:new Set}),loadChangeSets:async()=>{let a=t().sessionKey;if(a){e({loading:!0,error:void 0});try{let t=await fetch(`/api/changes?sessionKey=${encodeURIComponent(a)}`);if(!t.ok)throw Error("Failed to load change sets");let n=await t.json();e({changeSets:n,loading:!1})}catch(t){e({loading:!1,error:String(t)})}}},openReview:(t,a)=>e({review:{open:!0,changeSetId:t,filePath:a}}),closeReview:()=>e({review:{open:!1,changeSetId:null,filePath:null}}),dismissChangeSet:t=>e(e=>{let a=new Set(e.dismissed);return a.add(t),{dismissed:a}})}))}},e=>{e.O(0,[1817,3334,330,9907,528,3496,6522,8441,3794,7358],()=>e(e.s=49397)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[620],{13545:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(90425).A)("circle-alert",[["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"}]])},39667:(e,t,a)=>{Promise.resolve().then(a.bind(a,69676))},48368:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(90425).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},52799:(e,t,a)=>{"use strict";a.d(t,{cn:()=>n});var s=a(29722),r=a(622);function n(...e){return(0,r.QP)((0,s.$)(e))}},60529:(e,t,a)=>{"use strict";a.d(t,{p:()=>n});var s=a(95155);a(12115);var r=a(52799);function n({className:e,type:t,...a}){return(0,s.jsx)("input",{type:t,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...a})}},69676:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>N});var s=a(95155),r=a(12115),n=a(73321),i=a(80642),l=a(44408),o=a(89239),d=a(60529),c=a(70872),u=a(6296),x=a(94514),m=a(13545),p=a(21362),g=a(42129),h=a(86901),f=a(48368),y=a(49619);let b=(0,a(90425).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var j=a(93571);let v={enter:e=>({x:e>0?80:-80,opacity:0}),center:{x:0,opacity:1},exit:e=>({x:e>0?-80:80,opacity:0})};function N(){let[e,t]=(0,r.useState)(1),[a,o]=(0,r.useState)(1),d=(0,n.useRouter)(),[c,u]=(0,r.useState)(null),[x,m]=(0,r.useState)(!0),[p,g]=(0,r.useState)(""),[h,f]=(0,r.useState)(null),[y,b]=(0,r.useState)(!0),[j,N]=(0,r.useState)(!1),[O,P]=(0,r.useState)(!1),[z,M]=(0,r.useState)(null);(0,r.useEffect)(()=>{fetch("/api/gateway/detect").then(e=>e.json()).then(e=>{u(e),m(!1)}).catch(()=>{u({found:!1}),m(!1)})},[]),(0,r.useEffect)(()=>{fetch("/api/setup/status").then(e=>e.json()).then(e=>{f(e),b(!1)}).catch(()=>b(!1))},[]);let E=(0,r.useCallback)(a=>{o(a>e?1:-1),t(a)},[e]),S=async()=>{N(!0),M(null);try{let e=await fetch("/api/setup/bootstrap",{method:"POST"});if(!e.ok){let t=await e.json().catch(()=>null);throw Error(t?.error||"Failed to bootstrap workspace")}P(!0);let t=await fetch("/api/setup/status");if(t.ok&&f(await t.json()),c?.found)try{await fetch("/api/setup/trigger-onboarding",{method:"POST"})}catch{}}catch(e){M(e?.message||"Could not create workspace. Please retry.")}finally{N(!1)}};return(0,s.jsx)("div",{className:"flex min-h-screen items-center justify-center px-4 bg-background",children:(0,s.jsxs)("div",{className:"w-full max-w-md",children:[(0,s.jsx)(i.N,{mode:"wait",custom:a,children:(0,s.jsx)(l.P.div,{custom:a,variants:v,initial:"enter",animate:"center",exit:"exit",transition:{duration:.3,ease:"easeInOut"},children:(0,s.jsxs)("div",{className:"rounded-xl border bg-card p-8 shadow-lg",children:[1===e&&(0,s.jsx)(w,{gateway:c,detecting:x,manualUrl:p,onManualUrlChange:g,onNext:()=>E(2)}),2===e&&(0,s.jsx)(k,{status:h,loading:y,bootstrapping:j,bootstrapped:O,bootstrapError:z,onBootstrap:S,onNext:()=>E(3)}),3===e&&(0,s.jsx)(A,{onNext:()=>E(4)}),4===e&&(0,s.jsx)(C,{gatewayConnected:c?.found??!1,onOpen:()=>d.push("/workspace?chat=open")})]})},e)}),(0,s.jsx)("div",{className:"flex items-center justify-center gap-2 mt-6",children:[1,2,3,4].map(t=>(0,s.jsx)("div",{className:`h-1.5 rounded-full transition-all duration-300 ${t===e?"w-8 bg-primary":t<e?"w-4 bg-primary/40":"w-4 bg-muted"}`},t))})]})})}function w({gateway:e,detecting:t,manualUrl:a,onManualUrlChange:r,onNext:n}){return(0,s.jsxs)("div",{className:"space-y-6 text-center",children:[(0,s.jsx)(l.P.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.3},className:"mx-auto flex h-20 w-20 items-center justify-center rounded-2xl bg-muted/60 ring-1 ring-border/60",children:(0,s.jsx)(j.R,{variant:"icon",size:44,alt:""})}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Welcome to ClawPad"}),(0,s.jsxs)("p",{className:"text-muted-foreground text-sm",children:["The workspace for"," ",(0,s.jsx)(O,{text:"OpenClaw is your local AI agent platform that runs on your machine.",children:"OpenClaw"})]})]}),(0,s.jsx)("div",{className:"rounded-lg border bg-muted/30 p-4 text-left",children:t?(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(u.A,{className:"h-5 w-5 animate-spin text-muted-foreground"}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-sm font-medium",children:["Detecting"," ",(0,s.jsx)(O,{text:"The gateway is the local server that connects ClawPad to your AI agent. It usually runs at ws://127.0.0.1:18789.",children:"OpenClaw"}),"…"]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Looking for your local gateway"})]})]}):e?.found?(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-green-100 dark:bg-green-900/30",children:(0,s.jsx)(x.A,{className:"h-4 w-4 text-green-600 dark:text-green-400"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium text-green-700 dark:text-green-400",children:"OpenClaw Detected"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:e.agentName?`Agent: ${e.agentName}`:`Found via ${e.source}`})]})]}):(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-yellow-100 dark:bg-yellow-900/30",children:(0,s.jsx)(m.A,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-400"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium text-yellow-700 dark:text-yellow-400",children:"OpenClaw Not Detected"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"You can still use ClawPad as a local workspace"})]})]}),(0,s.jsx)(d.p,{placeholder:"ws://127.0.0.1:18789",value:a,onChange:e=>r(e.target.value),className:"text-sm"})]})}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(o.$,{size:"lg",className:"w-full",onClick:n,children:[e?.found?"Next":"Continue Without Agent",(0,s.jsx)(p.A,{className:"ml-1 h-4 w-4"})]}),!e?.found&&!t&&(0,s.jsx)("button",{onClick:n,className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Skip for now"})]})]})}function k({status:e,loading:t,bootstrapping:a,bootstrapped:r,bootstrapError:n,onBootstrap:i,onNext:d}){let c=e?.hasWorkspace||r;return(0,s.jsxs)("div",{className:"space-y-6 text-center",children:[(0,s.jsx)(l.P.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.1,duration:.3},className:"mx-auto flex h-20 w-20 items-center justify-center rounded-2xl bg-muted",children:(0,s.jsx)(g.A,{className:"h-10 w-10 text-muted-foreground"})}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("h1",{className:"text-2xl font-semibold tracking-tight",children:["Set Up Your"," ",(0,s.jsx)(O,{text:"A workspace is a folder of markdown files that both you and your AI agent can read and edit.",children:"Workspace"})]}),(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:"ClawPad reads and writes markdown files on disk"})]}),(0,s.jsx)("div",{className:"rounded-lg border bg-muted/30 px-4 py-3 font-mono text-sm",children:"~/.openclaw/pages/"}),t?(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground py-2",children:[(0,s.jsx)(u.A,{className:"h-4 w-4 animate-spin"}),"Checking workspace…"]}):c?(0,s.jsxs)("div",{className:"rounded-lg border bg-green-50 dark:bg-green-900/20 p-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 mb-2",children:[(0,s.jsx)(x.A,{className:"h-5 w-5 text-green-600 dark:text-green-400"}),(0,s.jsx)("span",{className:"text-sm font-medium text-green-700 dark:text-green-400",children:"Your workspace is ready"})]}),e&&(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e.totalSpaces," spaces \xb7 ",e.totalPages," pages"]})]}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Create a starter workspace with example spaces?"}),(0,s.jsxs)("div",{className:"rounded-lg border p-3 text-left space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{children:"\uD83D\uDCDD"})," Daily Notes"]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{children:"\uD83D\uDE80"})," Projects"]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{children:"\uD83D\uDCDA"})," Knowledge Base"]})]}),(0,s.jsx)(o.$,{size:"lg",className:"w-full",onClick:i,disabled:a,children:a?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating Workspace…"]}):"Create Workspace"}),n&&(0,s.jsx)("div",{className:"rounded-lg border border-red-300/60 bg-red-50 px-3 py-2 text-xs text-red-700 dark:border-red-900/60 dark:bg-red-950/20 dark:text-red-300",children:n})]}),c&&(0,s.jsxs)(o.$,{size:"lg",className:"w-full",onClick:d,children:["Next",(0,s.jsx)(p.A,{className:"ml-1 h-4 w-4"})]})]})}function A({onNext:e}){return(0,s.jsxs)("div",{className:"space-y-6 text-center",children:[(0,s.jsxs)("div",{className:"relative mx-auto h-28 w-28",children:[P.map((e,t)=>(0,s.jsx)(l.P.div,{initial:{opacity:0,scale:0,x:0,y:0},animate:{opacity:[0,1,1,0],scale:[0,1,1,.5],x:e.x,y:e.y},transition:{duration:1.2,delay:.4+.05*t,ease:"easeOut"},className:"absolute left-1/2 top-1/2 h-2 w-2 rounded-full",style:{backgroundColor:e.color}},t)),(0,s.jsx)(l.P.div,{initial:{scale:0,opacity:.8},animate:{scale:2.5,opacity:0},transition:{duration:.8,delay:.2,ease:"easeOut"},className:"absolute inset-0 m-auto h-20 w-20 rounded-full border-2 border-green-400"}),(0,s.jsx)(l.P.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:200,damping:15,delay:.1},className:"absolute inset-0 m-auto flex h-20 w-20 items-center justify-center rounded-2xl bg-green-100 dark:bg-green-900/30",children:(0,s.jsx)(l.P.div,{initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1},transition:{delay:.4,duration:.4},children:(0,s.jsx)(x.A,{className:"h-10 w-10 text-green-600 dark:text-green-400"})})})]}),(0,s.jsxs)(l.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.5},className:"space-y-2",children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"You're All Set! \uD83C\uDF89"}),(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:"Your workspace is ready. Let's see what you can do."})]}),(0,s.jsxs)(l.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.7},className:"rounded-lg border bg-muted/30 p-4 text-left space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Keyboard Shortcuts"}),(0,s.jsxs)("div",{className:"space-y-1.5 text-sm text-muted-foreground",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("kbd",{className:"rounded border bg-muted px-1.5 py-0.5 text-xs font-mono",children:"⌘K"})," ","Search across all pages"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("kbd",{className:"rounded border bg-muted px-1.5 py-0.5 text-xs font-mono",children:"⌘N"})," ","Create a new page"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("kbd",{className:"rounded border bg-muted px-1.5 py-0.5 text-xs font-mono",children:"⌘⇧L"})," ","Open AI chat panel"]})]})]}),(0,s.jsx)(l.P.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.9},children:(0,s.jsxs)(o.$,{size:"lg",className:"w-full",onClick:e,children:["What's Next?",(0,s.jsx)(p.A,{className:"ml-1 h-4 w-4"})]})})]})}function C({gatewayConnected:e,onOpen:t}){let a=e?[{icon:h.A,title:"Chat with your agent",desc:"Your agent is ready to help you set up. Check the chat panel!",color:"text-purple-500",bg:"bg-purple-100 dark:bg-purple-900/30"},{icon:f.A,title:"Create pages together",desc:"Ask your agent to create documents, plans, or notes.",color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30"},{icon:y.A,title:"Organize your workspace",desc:"Your agent can help structure folders based on your needs.",color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}]:[{icon:f.A,title:"Create your first page",desc:"Hit ⌘N to start a new page in any space.",color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30"},{icon:y.A,title:"Connect your agent",desc:"Your OpenClaw agent can read and edit pages in real-time.",color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"},{icon:h.A,title:"Try AI writing",desc:"Press ⌘⇧L to chat with your agent and generate content.",color:"text-purple-500",bg:"bg-purple-100 dark:bg-purple-900/30"}];return(0,s.jsxs)("div",{className:"space-y-6 text-center",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e?"Your Agent is Ready!":"What's Next?"}),(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:e?"Your agent has started setting up your workspace.":"Here are some things to try first."})]}),(0,s.jsx)("div",{className:"space-y-3 text-left",children:a.map((e,t)=>(0,s.jsxs)(l.P.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.1+.15*t,duration:.3},className:"flex items-start gap-3 rounded-lg border p-3 hover:bg-muted/30 transition-colors",children:[(0,s.jsx)("div",{className:`mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${e.bg}`,children:(0,s.jsx)(e.icon,{className:`h-4 w-4 ${e.color}`})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:e.title}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:e.desc})]})]},e.title))}),(0,s.jsx)(l.P.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:(0,s.jsxs)(o.$,{size:"lg",className:"w-full",onClick:t,children:[e?"Open Chat":"Open Your Workspace",(0,s.jsx)(p.A,{className:"ml-1 h-4 w-4"})]})})]})}function O({children:e,text:t}){return(0,s.jsxs)(c.m_,{children:[(0,s.jsx)(c.k$,{asChild:!0,children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-0.5 underline decoration-dotted underline-offset-2 cursor-help",children:[e,(0,s.jsx)(b,{className:"inline h-3 w-3 text-muted-foreground"})]})}),(0,s.jsx)(c.ZI,{side:"top",className:"max-w-[220px]",children:t})]})}let P=[{x:-40,y:-35,color:"#4A9EFF"},{x:35,y:-40,color:"#00A67E"},{x:-35,y:25,color:"#9333EA"},{x:40,y:20,color:"#F59E0B"},{x:-15,y:-45,color:"#EF4444"},{x:20,y:-30,color:"#10B981"},{x:-45,y:5,color:"#6366F1"},{x:45,y:-10,color:"#F97316"},{x:0,y:40,color:"#EC4899"},{x:-25,y:35,color:"#14B8A6"},{x:30,y:35,color:"#8B5CF6"},{x:10,y:-50,color:"#F43F5E"}]},70872:(e,t,a)=>{"use strict";a.d(t,{Bc:()=>i,ZI:()=>d,k$:()=>o,m_:()=>l});var s=a(95155);a(12115);var r=a(28935),n=a(52799);function i({delayDuration:e=0,...t}){return(0,s.jsx)(r.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function l({...e}){return(0,s.jsx)(i,{children:(0,s.jsx)(r.bL,{"data-slot":"tooltip",...e})})}function o({...e}){return(0,s.jsx)(r.l9,{"data-slot":"tooltip-trigger",...e})}function d({className:e,sideOffset:t=0,children:a,...i}){return(0,s.jsx)(r.ZL,{children:(0,s.jsxs)(r.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,n.cn)("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...i,children:[a,(0,s.jsx)(r.i3,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}},83935:(e,t,a)=>{"use strict";a.d(t,{C:()=>i});var s=a(12115),r=a(47527),n=a(66294),i=e=>{var t;let a,i,{present:o,children:d}=e,c=function(e){var t,a;let[r,i]=s.useState(),o=s.useRef(null),d=s.useRef(e),c=s.useRef("none"),[u,x]=(t=e?"mounted":"unmounted",a={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},s.useReducer((e,t)=>a[e][t]??e,t));return s.useEffect(()=>{let e=l(o.current);c.current="mounted"===u?e:"none"},[u]),(0,n.N)(()=>{let t=o.current,a=d.current;if(a!==e){let s=c.current,r=l(t);e?x("MOUNT"):"none"===r||t?.display==="none"?x("UNMOUNT"):a&&s!==r?x("ANIMATION_OUT"):x("UNMOUNT"),d.current=e}},[e,x]),(0,n.N)(()=>{if(r){let e,t=r.ownerDocument.defaultView??window,a=a=>{let s=l(o.current).includes(CSS.escape(a.animationName));if(a.target===r&&s&&(x("ANIMATION_END"),!d.current)){let a=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=a)})}},s=e=>{e.target===r&&(c.current=l(o.current))};return r.addEventListener("animationstart",s),r.addEventListener("animationcancel",a),r.addEventListener("animationend",a),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",s),r.removeEventListener("animationcancel",a),r.removeEventListener("animationend",a)}}x("ANIMATION_END")},[r,x]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(e=>{o.current=e?getComputedStyle(e):null,i(e)},[])}}(o),u="function"==typeof d?d({present:c.isPresent}):s.Children.only(d),x=(0,r.s)(c.ref,(t=u,(i=(a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?t.ref:(i=(a=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof d||c.isPresent?s.cloneElement(u,{ref:x}):null};function l(e){return e?.animationName||"none"}i.displayName="Presence"},86901:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(90425).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},89239:(e,t,a)=>{"use strict";a.d(t,{$:()=>o});var s=a(95155);a(12115);var r=a(18460),n=a(42442),i=a(52799);let l=(0,r.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o({className:e,variant:t="default",size:a="default",asChild:r=!1,...o}){let d=r?n.bL:"button";return(0,s.jsx)(d,{"data-slot":"button","data-variant":t,"data-size":a,className:(0,i.cn)(l({variant:t,size:a,className:e})),...o})}},93571:(e,t,a)=>{"use strict";a.d(t,{R:()=>o});var s=a(95155),r=a(5772),n=a(52799);let i=265/235,l=1152/235;function o({variant:e="icon",size:t=24,className:a,imageClassName:o,lightImageClassName:d,darkImageClassName:c,theme:u="auto",alt:x="ClawPad",priority:m=!1}){let p="icon"===e,g=Math.round(t*(p?i:l));return(0,s.jsx)("span",{className:(0,n.cn)("inline-flex items-center",a),children:(0,s.jsx)(r.default,{src:p?"/brand/icon.png":"/brand/logo.png",width:g,height:t,alt:x,priority:m,className:(0,n.cn)("block",o,"dark"===u?c:"light"===u?d:void 0)})})}}},e=>{e.O(0,[330,9907,5403,3496,7005,8441,3794,7358],()=>e(e.s=39667)),_N_E=e.O()}]);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8118],{1022:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,98500,23)),Promise.resolve().then(a.bind(a,58206)),Promise.resolve().then(a.bind(a,92232))},18496:(e,t,a)=>{"use strict";a.d(t,{M:()=>r});var s=a(1934),n=a(60464);let r=(0,s.v)((e,t)=>({spaces:[],expandedSpaces:new Set,expandedFolders:new Set,sidebarOpen:!0,activePage:null,recentPages:[],chatPanelOpen:!0,loadingSpaces:!1,loadingPages:new Map,pagesBySpace:new Map,loadSpaces:async()=>{e({loadingSpaces:!0});try{let t=await fetch("/api/files/spaces");if(!t.ok)throw Error("Failed to load spaces");let a=await t.json();e({spaces:a,loadingSpaces:!1})}catch{e({loadingSpaces:!1})}},loadPages:async a=>{let{loadingPages:s}=t(),n=new Map(s);n.set(a,!0),e({loadingPages:n});try{let s=await fetch(`/api/files/spaces/${encodeURIComponent(a)}/pages?recursive=true`);if(!s.ok)throw Error("Failed to load pages");let n=await s.json(),{pagesBySpace:r,loadingPages:i}=t(),o=new Map(r);o.set(a,n);let l=new Map(i);l.set(a,!1),e({pagesBySpace:o,loadingPages:l})}catch{let{loadingPages:s}=t(),n=new Map(s);n.set(a,!1),e({loadingPages:n})}},loadRecentPages:async()=>{try{let t=await fetch("/api/files/recent?limit=5");if(!t.ok)throw Error("Failed to load recent pages");let a=await t.json();e({recentPages:a})}catch{}},setActivePage:t=>e(e=>{if(!t)return{activePage:null};let a=t.replace(/\.md$/,"").split("/").filter(Boolean);if(a.length<=1)return{activePage:t};let s=a[0],r=e.spaces.some(e=>e.path===s),i=r?s:n.Sz,o=r?a.slice(1,-1):a.slice(0,-1),l=new Set(e.expandedFolders),d=i;for(let e of o)d=`${d}/${e}`,l.add(d);return{activePage:t,expandedFolders:l}}),toggleSpace:a=>{let{expandedSpaces:s,pagesBySpace:n}=t(),r=new Set(s);r.has(a)?r.delete(a):(r.add(a),n.has(a)||t().loadPages(a)),e({expandedSpaces:r})},toggleFolder:a=>{let{expandedFolders:s}=t(),n=new Set(s);n.has(a)?n.delete(a):n.add(a),e({expandedFolders:n})},toggleSidebar:()=>e(e=>({sidebarOpen:!e.sidebarOpen})),setSidebarOpen:t=>e({sidebarOpen:t}),toggleChatPanel:()=>e({chatPanelOpen:!0}),setChatPanelOpen:t=>e({chatPanelOpen:t}),createPage:async(e,a)=>{let s=a.toLowerCase().trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E0}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/gu,"").replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");if(!s)throw Error("Title results in an empty filename.");let r=e===n.Sz?s:`${e}/${s}`,i=e===n.Sz?encodeURIComponent(s):[e,s].map(encodeURIComponent).join("/"),o=await fetch(`/api/files/pages/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:`
|
|
2
|
-
# ${a}
|
|
3
|
-
|
|
4
|
-
`,meta:{title:a}})});if(!o.ok){let e="Failed to create page";try{let t=await o.json();t?.error&&(e=t.error)}catch{}throw Error(e)}return t().loadPages(e),t().loadRecentPages(),t().loadSpaces(),r},deletePage:async a=>{if(!(await fetch(`/api/files/pages/${a}`,{method:"DELETE"})).ok)throw Error("Failed to delete page");let s=a.includes("/")?a.split("/")[0]:n.Sz;t().loadPages(s),t().loadRecentPages(),t().loadSpaces();let{activePage:r}=t();r===a&&e({activePage:null})}}))},42317:(e,t,a)=>{"use strict";a.d(t,{L:()=>r});var s=a(95155),n=a(86846);function r(){return(0,s.jsxs)("div",{className:"mx-auto w-full max-w-[720px] px-6",children:[(0,s.jsxs)("div",{className:"pt-20 pb-4",children:[(0,s.jsx)(n.E,{className:"h-10 w-2/3 mb-3"}),(0,s.jsx)(n.E,{className:"h-4 w-1/3"})]}),(0,s.jsxs)("div",{className:"space-y-3 pt-6",children:[(0,s.jsx)(n.E,{className:"h-4 w-full"}),(0,s.jsx)(n.E,{className:"h-4 w-[92%]"}),(0,s.jsx)(n.E,{className:"h-4 w-[78%]"}),(0,s.jsx)("div",{className:"h-3"}),(0,s.jsx)(n.E,{className:"h-4 w-full"}),(0,s.jsx)(n.E,{className:"h-4 w-[85%]"}),(0,s.jsx)(n.E,{className:"h-4 w-[65%]"}),(0,s.jsx)("div",{className:"h-3"}),(0,s.jsx)(n.E,{className:"h-4 w-[90%]"}),(0,s.jsx)(n.E,{className:"h-4 w-[70%]"})]})]})}},52799:(e,t,a)=>{"use strict";a.d(t,{cn:()=>r});var s=a(29722),n=a(622);function r(...e){return(0,n.QP)((0,s.$)(e))}},58206:(e,t,a)=>{"use strict";a.d(t,{PageDiffFallback:()=>i});var s=a(95155),n=a(83099),r=a(87293);function i({filePath:e,fallback:t}){let a=(0,n.W)(e=>e.review),i=(0,n.W)(e=>e.closeReview);return a.open&&a.changeSetId&&a.filePath===e?(0,s.jsx)(r.W,{changeSetId:a.changeSetId,filePath:e,onExit:i}):(0,s.jsx)(s.Fragment,{children:t})}},60464:(e,t,a)=>{"use strict";a.d(t,{Sz:()=>s,ke:()=>n});let s="__root__",n="General"},83099:(e,t,a)=>{"use strict";a.d(t,{W:()=>s});let s=(0,a(1934).v)((e,t)=>({sessionKey:null,activeRun:null,activeFiles:new Set,changeSets:[],review:{open:!1,changeSetId:null,filePath:null},dismissed:new Set,loading:!1,error:void 0,setSessionKey:t=>e({sessionKey:t}),setActiveRun:t=>e({activeRun:t}),touchFile:t=>e(e=>{let a=new Set(e.activeFiles);return a.add(t),{activeFiles:a}}),clearActiveFiles:()=>e({activeFiles:new Set}),loadChangeSets:async()=>{let a=t().sessionKey;if(a){e({loading:!0,error:void 0});try{let t=await fetch(`/api/changes?sessionKey=${encodeURIComponent(a)}`);if(!t.ok)throw Error("Failed to load change sets");let s=await t.json();e({changeSets:s,loading:!1})}catch(t){e({loading:!1,error:String(t)})}}},openReview:(t,a)=>e({review:{open:!0,changeSetId:t,filePath:a}}),closeReview:()=>e({review:{open:!1,changeSetId:null,filePath:null}}),dismissChangeSet:t=>e(e=>{let a=new Set(e.dismissed);return a.add(t),{dismissed:a}})}))},86846:(e,t,a)=>{"use strict";a.d(t,{E:()=>r});var s=a(95155),n=a(52799);function r({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"skeleton",className:(0,n.cn)("bg-accent animate-pulse rounded-md",e),...t})}},87293:(e,t,a)=>{"use strict";a.d(t,{W:()=>u});var s=a(95155),n=a(12115),r=a(80723),i=a(55711),o=a(89239),l=a(52799),d=a(66609),c=a(83099);function u({changeSetId:e,filePath:t,onExit:a}){let[l,u]=(0,n.useState)(null),[p,h]=(0,n.useState)(!0),[f,x]=(0,n.useState)(!1),g=(0,c.W)(e=>e.loadChangeSets),v=(0,n.useCallback)(async()=>{h(!0);try{let t=await fetch(`/api/changes/${encodeURIComponent(e)}`);if(!t.ok)throw Error("Failed to load diff");let a=await t.json();u(a)}catch(e){d.oR.error("Could not load diff")}finally{h(!1)}},[e]);(0,n.useEffect)(()=>{v()},[v]);let w=l?.files.find(e=>e.path===t),b=async()=>{x(!0);try{if(!(await fetch("/api/changes/revert",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({changeSetId:e,mode:"file",path:t})})).ok)throw Error("Undo failed");await v(),await g()}catch{d.oR.error("Undo failed")}finally{x(!1)}},j=async a=>{x(!0);try{if(!(await fetch("/api/changes/revert",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({changeSetId:e,mode:"hunk",path:t,hunkId:a})})).ok)throw Error("Undo failed");await v(),await g()}catch{d.oR.error("Could not apply undo")}finally{x(!1)}};return p?(0,s.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"Loading diff…"}):w?(0,s.jsxs)("div",{className:"flex min-h-full flex-col",children:[(0,s.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between border-b bg-background/90 px-4 py-2 backdrop-blur",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(o.$,{variant:"ghost",size:"icon",onClick:a,children:(0,s.jsx)(r.A,{className:"h-4 w-4"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"Review changes"}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t})]})]}),(0,s.jsxs)(o.$,{variant:"outline",size:"sm",onClick:b,disabled:f,children:[(0,s.jsx)(i.A,{className:"mr-2 h-3.5 w-3.5"}),"Undo file"]})]}),(0,s.jsx)("div",{className:"flex-1 px-4 py-6",children:(0,s.jsx)(m,{file:w,onUndoHunk:j,busy:f})})]}):(0,s.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground",children:[(0,s.jsx)("span",{children:"No diff available for this file."}),(0,s.jsx)(o.$,{variant:"outline",size:"sm",onClick:a,children:"Back to document"})]})}function m({file:e,onUndoHunk:t,busy:a}){if(e.tooLarge)return(0,s.jsx)("div",{className:"rounded-md border border-border p-4 text-sm text-muted-foreground",children:"File is too large to diff."});let n=e.hunks??[];return 0===n.length?(0,s.jsx)("div",{className:"rounded-md border border-border p-4 text-sm text-muted-foreground",children:"No differences found."}):(0,s.jsx)("div",{className:"space-y-4",children:n.map((e,n)=>(0,s.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between bg-muted/60 px-3 py-1.5 text-xs text-muted-foreground",children:[(0,s.jsxs)("span",{children:["Hunk ",n+1," \xb7 +",e.adds," −",e.removes]}),(0,s.jsx)(o.$,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>t(e.id),disabled:a,children:"Undo"})]}),(0,s.jsx)("div",{className:"bg-background",children:(0,s.jsx)("pre",{className:"whitespace-pre-wrap px-3 py-2 text-xs leading-relaxed",children:e.lines.map((t,a)=>{let n=t[0],r=t.slice(1);return(0,s.jsxs)("div",{className:(0,l.cn)("rounded-sm px-1","+"===n&&"bg-emerald-500/15 text-emerald-700 dark:text-emerald-300","-"===n&&"bg-rose-500/15 text-rose-700 dark:text-rose-300 line-through"),children:[(0,s.jsx)("span",{className:"mr-2 text-muted-foreground/70",children:n}),r]},`${e.id}-${a}`)})})})]},e.id))})}},89239:(e,t,a)=>{"use strict";a.d(t,{$:()=>l});var s=a(95155);a(12115);var n=a(18460),r=a(42442),i=a(52799);let o=(0,n.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function l({className:e,variant:t="default",size:a="default",asChild:n=!1,...l}){let d=n?r.bL:"button";return(0,s.jsx)(d,{"data-slot":"button","data-variant":t,"data-size":a,className:(0,i.cn)(o({variant:t,size:a,className:e})),...l})}},92232:(e,t,a)=>{"use strict";a.d(t,{PageEditor:()=>P});var s=a(95155),n=a(12115),r=a(37206),i=a(73321),o=a(60285),l=a(68459),d=a(66609),c=a(42317),u=a(89239),m=a(31887),p=a(52799);function h({...e}){return(0,s.jsx)(m.bL,{"data-slot":"dropdown-menu",...e})}function f({...e}){return(0,s.jsx)(m.l9,{"data-slot":"dropdown-menu-trigger",...e})}function x({className:e,sideOffset:t=4,...a}){return(0,s.jsx)(m.ZL,{children:(0,s.jsx)(m.UC,{"data-slot":"dropdown-menu-content",sideOffset:t,className:(0,p.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...a})})}function g({className:e,inset:t,variant:a="default",...n}){return(0,s.jsx)(m.q7,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":a,className:(0,p.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}var v=a(18496),w=a(83099),b=a(87293);let j=(0,r.default)(()=>Promise.all([a.e(3266),a.e(8425),a.e(7105),a.e(1375),a.e(5004),a.e(277),a.e(2545),a.e(4034),a.e(9352),a.e(6361),a.e(3678)]).then(a.bind(a,3678)),{loadableGenerated:{webpack:()=>[3678]},ssr:!1,loading:()=>(0,s.jsx)(c.L,{})}),y=["\uD83D\uDCDD","\uD83D\uDCC4","\uD83D\uDCCB","\uD83D\uDCCC","\uD83D\uDCCE","\uD83D\uDCD1","\uD83D\uDCD2","\uD83D\uDCD3","\uD83D\uDCD4","\uD83D\uDCD5","\uD83D\uDCD6","\uD83D\uDCD7","\uD83D\uDCD8","\uD83D\uDCD9","\uD83C\uDFAF","\uD83D\uDE80","\uD83D\uDCA1","\uD83D\uDD25","⚡","\uD83C\uDFA8","\uD83E\uDDE0","\uD83D\uDCBB","\uD83D\uDD27","\uD83D\uDCCA","\uD83D\uDDC2️","✨","\uD83C\uDF1F","\uD83D\uDC4B","\uD83C\uDF99️","\uD83C\uDFB5","\uD83D\uDCF7","\uD83D\uDD2C","\uD83C\uDFD7️","\uD83D\uDDFA️","\uD83E\uDDE9"],S=(0,n.memo)(function({status:e}){return"idle"===e?null:(0,s.jsx)("span",{className:`text-xs transition-opacity duration-300 ${{idle:"text-text-muted",saved:"text-success",saving:"text-text-muted",unsaved:"text-warning",error:"text-error"}[e]} ${"saved"===e?"animate-fade-out":""}`,children:{idle:"",saved:"Saved",saving:"Saving…",unsaved:"Unsaved changes",error:"Save failed"}[e]})}),N=(0,n.memo)(function({filePath:e}){let t=e.replace(/\.md$/,"").split("/").map(e=>e.replace(/[-_]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()));return(0,s.jsx)("nav",{className:"flex items-center gap-1 text-[13px] text-text-muted",children:t.map((e,a)=>(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[a>0&&(0,s.jsx)("span",{className:"text-text-muted/50",children:"/"}),(0,s.jsx)("span",{className:a===t.length-1?"text-text-secondary":"",children:e})]},a))})});function k({icon:e,onSelect:t}){let[a,r]=(0,n.useState)(!1),i=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(a)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){i.current&&!i.current.contains(e.target)&&r(!1)}},[a]),(0,s.jsxs)("div",{ref:i,className:"relative inline-block",children:[(0,s.jsx)("button",{type:"button",onClick:()=>r(!a),className:"text-4xl leading-none hover:bg-surface-hover rounded-lg p-1 transition-colors cursor-pointer md:text-4xl text-3xl",title:"Change icon",children:e||"\uD83D\uDCC4"}),a&&(0,s.jsx)("div",{className:"absolute top-full left-0 z-50 mt-1 grid grid-cols-7 gap-1 rounded-lg border border-border bg-popover p-2 shadow-lg",children:y.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>{t(e),r(!1)},className:"flex items-center justify-center w-8 h-8 rounded hover:bg-surface-hover transition-colors text-lg cursor-pointer min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0",children:e},e))})]})}let C=(0,n.memo)(function({status:e,wordCount:t,modified:a}){let[r,i]=(0,n.useState)(!1);(0,n.useEffect)(()=>{i(!0)},[]);let o=new Date(a),l=r?o.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):"",d=r?o.toLocaleDateString(void 0,{month:"short",day:"numeric"}):"";return(0,s.jsxs)("div",{className:"sticky bottom-0 z-10 flex items-center justify-between border-t border-border bg-background/80 backdrop-blur-sm px-4 py-1.5 text-xs text-text-muted md:px-6 max-md:bottom-14",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(S,{status:e}),(0,s.jsxs)("span",{className:"hidden sm:inline",children:[t," words"]})]}),(0,s.jsxs)("span",{className:"hidden sm:inline",children:["Last edited"," ",(0,s.jsx)("span",{suppressHydrationWarning:!0,children:d})," at"," ",(0,s.jsx)("span",{suppressHydrationWarning:!0,children:l})]}),(0,s.jsx)("span",{className:"sm:hidden",children:(0,s.jsx)(S,{status:e})})]})});function P({initialContent:e,meta:t,filePath:a}){let r=(0,i.useRouter)(),{deletePage:m}=(0,v.M)(),p=(0,w.W)(e=>e.review),y=(0,w.W)(e=>e.closeReview),[S,P]=(0,n.useState)(t),[E,F]=(0,n.useState)(e),[R,z]=(0,n.useState)(0),[$,U]=(0,n.useState)(t.icon),[O,_]=(0,n.useState)("idle"),[T,I]=(0,n.useState)(0),[L,W]=(0,n.useState)(t.modified),D=(0,n.useRef)(null),M=(0,n.useRef)(null),A=(0,n.useRef)(t.title),B=(0,n.useRef)("idle"),K=(0,n.useRef)(e),H=(0,n.useRef)(0),J=(0,n.useRef)(null),q=(0,n.useRef)(null),G=(0,n.useRef)(null),Q=(0,n.useRef)(a);(0,n.useEffect)(()=>{B.current=O},[O]),(0,n.useEffect)(()=>{Q.current=a},[a]),(0,n.useEffect)(()=>{P(t),F(e),z(e=>e+1),U(t.icon),W(t.modified),_("idle"),I(0),A.current=t.title,K.current=e,H.current=0,J.current=null,q.current&&(d.oR.dismiss(q.current),q.current=null)},[a,e,t]);let V=(0,n.useCallback)(e=>{M.current&&clearTimeout(M.current),M.current=setTimeout(async()=>{try{let t=await fetch(`/api/files/pages/${encodeURIComponent(a)}`);if(!t.ok)return;let s=await t.json();await fetch(`/api/files/pages/${encodeURIComponent(a)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:s.content,meta:{...e}})});let n=new Date().toISOString();H.current=Date.now(),W(n),P(t=>({...t,...e,modified:n}))}catch(e){console.error("Failed to save meta:",e)}},800)},[a]),Z=(0,n.useCallback)(()=>{let e=D.current?.textContent?.trim()||"Untitled";e!==A.current&&(A.current=e,V({title:e,icon:$}))},[$,V]),X=(0,n.useCallback)(e=>{if("Enter"===e.key){e.preventDefault();let t=document.querySelector(".clawpad-editor .ProseMirror");t?.focus()}},[]),Y=(0,n.useCallback)(e=>{U(e);let t=D.current?.textContent?.trim()||A.current||"Untitled";A.current=t,V({title:t,icon:e})},[V]),ee=(0,n.useCallback)(e=>{let t=new Date().toISOString();K.current=e,H.current=Date.now(),W(t),P(e=>({...e,modified:t}))},[]),et=(0,n.useCallback)(async()=>{try{await m(a),r.push("/workspace")}catch(e){console.error("Failed to delete page:",e)}},[m,a,r]),ea=(0,n.useCallback)((e,t)=>{J.current=null,q.current&&(d.oR.dismiss(q.current),q.current=null),P(t),U(t.icon),W(t.modified),F(e),z(e=>e+1),_("idle"),K.current=e},[]),es=(0,n.useCallback)(async(e=!1)=>{try{let t=await fetch(`/api/files/pages/${encodeURIComponent(Q.current)}`);if(!t.ok){404===t.status&&(d.oR.error("This page was deleted."),r.push("/workspace"));return}let a=await t.json(),s=a.content??"",n=a.meta;if(("unsaved"===B.current||"saving"===B.current)&&!e){J.current={content:s,meta:n},q.current||(q.current=(0,d.oR)("This page changed on disk",{action:{label:"Reload",onClick:()=>es(!0)},duration:6e3}));return}if(s===K.current&&!e){P(n),U(n.icon),W(n.modified);return}ea(s,n)}catch(e){console.error("Failed to refresh page:",e)}},[ea,r]);return((0,n.useEffect)(()=>{A.current=S.title,D.current&&(D.current.textContent=S.title)},[S.title,a]),(0,n.useEffect)(()=>{let e=e=>{let t=e.detail;if(t?.path&&t.path===Q.current){if("file-removed"===t.type){d.oR.error("This page was deleted."),r.push("/workspace");return}t.timestamp&&1e3>Math.abs(t.timestamp-H.current)||(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{es()},250))}};return window.addEventListener("clawpad:file-change",e),()=>{window.removeEventListener("clawpad:file-change",e),G.current&&(clearTimeout(G.current),G.current=null)}},[es,r]),(0,n.useEffect)(()=>()=>{M.current&&clearTimeout(M.current)},[]),p.open&&p.changeSetId&&p.filePath===a)?(0,s.jsx)(b.W,{changeSetId:p.changeSetId,filePath:a,onExit:y}):(0,s.jsxs)("div",{className:"flex min-h-full flex-col max-md:pb-14",children:[(0,s.jsxs)("div",{className:"mx-auto w-full flex-1 px-3 md:px-8",style:{maxWidth:"var(--clawpad-editor-width, 720px)"},children:[(0,s.jsxs)("div",{className:"pt-12 pb-1 md:pt-20",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsx)(k,{icon:$,onSelect:Y}),(0,s.jsxs)(h,{children:[(0,s.jsx)(f,{asChild:!0,children:(0,s.jsxs)(u.$,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",children:[(0,s.jsx)(o.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Page actions"})]})}),(0,s.jsx)(x,{align:"end",className:"w-44",children:(0,s.jsxs)(g,{className:"text-destructive focus:text-destructive",onClick:et,children:[(0,s.jsx)(l.A,{className:"mr-2 h-4 w-4"}),"Delete"]})})]})]}),(0,s.jsx)("h1",{ref:D,className:"mt-2 text-2xl font-semibold leading-tight tracking-tight outline-none md:text-[2rem] empty:before:content-['Untitled'] empty:before:text-text-muted",contentEditable:!0,suppressContentEditableWarning:!0,onInput:Z,onKeyDown:X,spellCheck:!1,dir:"auto"}),(0,s.jsx)("div",{className:"mt-2 mb-4 md:mb-6",children:(0,s.jsx)(N,{filePath:a})})]}),(0,s.jsx)(n.Suspense,{fallback:(0,s.jsx)(c.L,{}),children:(0,s.jsx)(j,{initialContent:E,filePath:a,onSave:ee,onStatusChange:_,onWordCountChange:I,readOnly:!1},`${a}-${R}`)})]}),(0,s.jsx)(C,{status:O,wordCount:T,modified:L})]})}}},e=>{e.O(0,[330,9907,5488,528,8500,3016,8441,3794,7358],()=>e(e.s=1022)),_N_E=e.O()}]);
|